<?php

/*
 * LinkorCMS 1.4
 * � 2012 LinkorCMS Development Group
 */
ExtRemovePlugin('userblock', 'test');
                $pcache_name = 'plugins_auto_main';
            } elseif (defined('ADMIN_SCRIPT')) {
                $pcache_name = 'plugins_auto_admin';
            }
            if (System::cache()->HasCache(system_cache, $pcache_name)) {
                $plugins = System::cache()->Get(system_cache, $pcache_name);
            } else {
                if (defined('MAIN_SCRIPT')) {
                    $q = "(`type`='1' or `type`='3') and `enabled`='1'";
                } elseif (defined('ADMIN_SCRIPT')) {
                    $q = "(`type`='1' or `type`='2') and `enabled`='1'";
                }
                $plugins = System::database()->Select('plugins', $q);
                System::cache()->Write(system_cache, $pcache_name, $plugins);
            }
            foreach ($plugins as $plugin) {
                $PluginName = RealPath2($config['plug_dir'] . $plugin['name'] . '/index.php');
                if (is_file($PluginName)) {
                    include $PluginName;
                } else {
                    ExtRemovePlugin($plugin['group'], $plugin['name']);
                }
            }
        }
    }
} elseif (!defined('SETUP_SCRIPT') && !defined('DEV_SCRIPT')) {
    // Система не установлена
    Header("Location: setup.php");
    exit;
}
define('INIT_CORE_END', microtime(true));