Beispiel #1
0
// Retrieve the URL segments to determine what to load
$class = isset($url[1]) ? Sanitize::variable($url[1]) : '';
$page = isset($url[2]) ? Sanitize::variable($url[2], " -") : '';
// Attempt to load the Admin Pages
if ($class and $page) {
    // Load the Class Config
    $classConfig = Classes_Meta::getConfig($class);
    // Attempt to load an admin file
    $adminFile = $classConfig->data['path'] . "/admin/" . $page . ".php";
    if (is_file($adminFile)) {
        require $adminFile;
        exit;
    }
}
// Scan through the plugins directory
$classList = Classes_Meta::getClassList();
// Prepare Values
$linkList = array();
// Cycle through the plugins to find any admin pages available.
foreach ($classList as $class) {
    // Reject class names that aren't valid
    if (!ctype_alnum($class)) {
        continue;
    }
    if ($classConfig = Classes_Meta::getConfig($class)) {
        // If there is no "isInstalled" method, don't show the entry
        if (!method_exists($classConfig->pluginName . "_config", "isInstalled")) {
            continue;
        }
        // If the plugin isn't installed, don't show it
        if (!($installed = call_user_func(array($classConfig->pluginName . "_config", "isInstalled")))) {
    public static function massDeletion($core = false, $addon = false, $app = false)
    {
        // Convert Core Classes
        if ($core) {
            echo '<h2>Core Class HHVM Deletions</h2>';
            $classList = Classes_Meta::getClassList(CORE_PLUGIN_PATH);
            foreach ($classList as $class) {
                echo '
				<span style="font-weight:bold;">' . $class . '</span>: HHVM Deletion Complete.<br />';
                self::delete($class, CORE_PLUGIN_PATH);
            }
        }
        // Convert Plugin Classes
        if ($addon) {
            echo '<h2>Addon Class HHVM Deletions</h2>';
            $classList = Classes_Meta::getClassList(ADDON_PLUGIN_PATH);
            foreach ($classList as $class) {
                echo '
				<span style="font-weight:bold;">' . $class . '</span>: HHVM Deletion Complete.<br />';
                self::delete($class, ADDON_PLUGIN_PATH);
            }
        }
        // Convert App Classes
        if ($app) {
            echo '<h2>App Class HHVM Deletions</h2>';
            $classList = Classes_Meta::getClassList(PLUGIN_PATH);
            foreach ($classList as $class) {
                echo '
				<span style="font-weight:bold;">' . $class . '</span>: HHVM Deletion Complete.<br />';
                self::delete($class, PLUGIN_PATH);
            }
        }
    }