function computeArticles() { $articles = array(); foreach (findPlugins() as $plugin) { if ($plugin->hasMehod('getArticles')) { $reflectionMethod = $plugin->getMethod('getArticles'); if ($reflectionMethod->isStatic) { $items = $reflectionMethod->invokeI(null); } else { $pluginInstance = $plugin->newInstance(); $items = $reflectionMethod->invoke($pluginInstance); } } $articles = array_merge($articles, $items); } return $articles; }
/** * Created by PhpStorm. * User: Administrator * Date: 2015/12/21 * Time: 16:42 */ function ComputeMenu() { $menu = array(); foreach (findPlugins() as $plugin) { if ($plugin->hasMethod('getMenuItems')) { $reflectionMethod = $plugin->getMethod('getMenuItems'); if ($reflectionMethod->isStatic()) { $items = $reflectionMethod->invoke(null); } else { $pluginInstance = $plugin->newInstance(); $items = $reflectionMethod->invoke($pluginInstance); } $menu = array_merge($menu, $items); } } return $menu; }
define("LOGIN", false); } if (LOGIN) { #------------------------------- header('content-type: text/html; charset=' . CHARSET . ''); if (defined('MULTI_USER') and MULTI_USER and getRequestValue('logout_other_users', 'post') == "true") { define('LOGOUT_OTHER_USERS', true); # der trick ist hier das true da damit die eigene function destroy aufgerufen wird session_regenerate_id(true); } # Achtung nojs darf nur von nicht ajax anfragen benutzt werden if (getRequestValue('nojs', 'get')) { session_regenerate_id(true); } # wird für den Editor gebraucht list($activ_plugins, $deactiv_plugins, $plugin_first) = findPlugins(); # Backup Erinnerung bestätigen if (isset($_POST["lastbackup_yes"]) and $_POST["lastbackup_yes"] == "true") { $ADMIN_CONF->set("lastbackup", time()); ajax_return("success", true); } # mod_rewrite test if (getRequestValue('moderewrite', 'get') and getRequestValue('moderewrite', 'get') == "ok") { echo contend_template(array("home_serverinfo" => array(array('<span id="mod-rewrite-true">' . getLanguageValue("home_mod_rewrite") . '</span>', getLanguageValue("yes")))), array("home_serverinfo" => array("ok"))); exit; } require_once BASE_DIR_ADMIN . "filesystem.php"; if (!is_file(SORT_CAT_PAGE)) { $cat_page_sort_array = array(); $cats = getDirAsArray(CONTENT_DIR_REL, "dir"); foreach ($cats as $cat) {