当前位置: 首页>>代码示例>>PHP>>正文


PHP elgg_filepath_cache_reset函数代码示例

本文整理汇总了PHP中elgg_filepath_cache_reset函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_filepath_cache_reset函数的具体用法?PHP elgg_filepath_cache_reset怎么用?PHP elgg_filepath_cache_reset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elgg_filepath_cache_reset函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elgg_disable_filepath_cache

/**
 * Disables the views file paths disk cache.
 *
 * Uses the 'viewpath_cache_enabled' datalist with a boolean value.
 * Resets the views paths cache.
 *
 * @return null
 */
function elgg_disable_filepath_cache()
{
    global $CONFIG;
    datalist_set('viewpath_cache_enabled', 0);
    $CONFIG->viewpath_cache_enabled = 0;
    elgg_filepath_cache_reset();
}
开发者ID:redvabel,项目名称:Vabelgg,代码行数:15,代码来源:cache.php

示例2: get_input

 * @uses array $_REQUEST['activated_plugin_guids'] Array of plugin guids to activate.
 *
 * @since 1.8
 * @package Elgg.Core
 * @subpackage Administration.Plugins
 */
$active_plugin_guids = get_input('active_plugin_guids', array());
$installed_plugins = elgg_get_plugins('any');
$success = TRUE;
foreach ($installed_plugins as $plugin) {
    // this is only for simple plugins.
    if ($plugin->getManifest()->getAdminInterface() != 'simple') {
        continue;
    }
    // only effect changes to plugins not already in that state.
    if ($plugin->isActive() && !in_array($plugin->guid, $active_plugin_guids)) {
        $success = $success && $plugin->deactivate();
    } elseif (!$plugin->isActive() && in_array($plugin->guid, $active_plugin_guids)) {
        $success = $success && $plugin->activate();
    }
}
if ($success) {
    //system_message(elgg_echo('admin:plugins:simple_simple_success'));
} else {
    register_error(elgg_echo('admin:plugins:simple_simple_fail'));
}
// don't regenerate the simplecache because the plugin won't be
// loaded until next run.  Just invalidate and let it regnerate as needed
elgg_invalidate_simplecache();
elgg_filepath_cache_reset();
forward(REFERER);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:simple_update_states.php

示例3: regenerate_plugin_list

/**
 * Regenerates the list of known plugins and saves it to the current site
 * 
 * Important: You should regenerate simplecache and the viewpath cache after executing this function
 * otherwise you may experience view display artifacts. Do this with the following code:
 * 
 * 		elgg_view_regenerate_simplecache();
 *		elgg_filepath_cache_reset();
 *
 * @param array $pluginorder Optionally, a list of existing plugins and their orders
 * @return array The new list of plugins and their orders
 */
function regenerate_plugin_list($pluginorder = false)
{
    global $CONFIG;
    $CONFIG->pluginlistcache = null;
    if ($site = get_entity($CONFIG->site_guid)) {
        if (empty($pluginorder)) {
            $pluginorder = $site->pluginorder;
            $pluginorder = unserialize($pluginorder);
        } else {
            ksort($pluginorder);
        }
        if (empty($pluginorder)) {
            $pluginorder = array();
        }
        $max = 0;
        if (sizeof($pluginorder)) {
            foreach ($pluginorder as $key => $plugin) {
                if (is_dir($CONFIG->pluginspath . "/" . $plugin)) {
                    if ($key > $max) {
                        $max = $key;
                    }
                } else {
                    unset($pluginorder[$key]);
                }
            }
        }
        // Add new plugins to the end
        if ($handle = opendir($CONFIG->pluginspath)) {
            while ($mod = readdir($handle)) {
                if (!in_array($mod, array('.', '..', '.svn', 'CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
                    if (!in_array($mod, $pluginorder)) {
                        $max = $max + 10;
                        $pluginorder[$max] = $mod;
                    }
                }
            }
        }
        ksort($pluginorder);
        // Now reorder the keys ..
        $key = 10;
        $plugins = array();
        if (sizeof($pluginorder)) {
            foreach ($pluginorder as $plugin) {
                $plugins[$key] = $plugin;
                $key = $key + 10;
            }
        }
        $plugins = serialize($plugins);
        $site->pluginorder = $plugins;
        // Regenerate caches
        elgg_view_regenerate_simplecache();
        elgg_filepath_cache_reset();
        return $plugins;
    }
    return false;
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:68,代码来源:plugins.php


注:本文中的elgg_filepath_cache_reset函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。