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


PHP ModuleManager::create_load_priority_array方法代码示例

本文整理汇总了PHP中ModuleManager::create_load_priority_array方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleManager::create_load_priority_array方法的具体用法?PHP ModuleManager::create_load_priority_array怎么用?PHP ModuleManager::create_load_priority_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModuleManager的用法示例。


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

示例1: perform_update_end

    protected function perform_update_end()
    {
        $this->turn_on_maintenance_mode();

        Base_ThemeCommon::themeup();
        Base_LangCommon::update_translations();
        ModuleManager::create_load_priority_array();

        Variable::set('version', EPESI_VERSION);
        MaintenanceMode::turn_off();
    }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:11,代码来源:update.php

示例2: get_load_priority_array

 /**
  * Returns an array of installed modules indexed by priority of loading, based on dependencies.
  *
  * Do not use directly.
  *
  * @return array array containing information with modules priorities
  */
 public static final function get_load_priority_array($force = false)
 {
     static $load_prior_array = null;
     if ($load_prior_array === null || $force) {
         $priorities = array();
         $installed_modules = DB::Execute('SELECT * FROM modules ORDER BY priority');
         if ($installed_modules !== false) {
             $load_prior_array = array();
             while ($row = $installed_modules->FetchRow()) {
                 if (isset($priorities[$row['priority']])) {
                     ModuleManager::create_load_priority_array();
                     return self::get_load_priority_array($force);
                 }
                 $priorities[$row['priority']] = true;
                 if (!isset($row['state']) || $row['state'] == self::MODULE_ENABLED) {
                     $load_prior_array[] = $row;
                 }
             }
         }
     }
     return $load_prior_array;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:29,代码来源:module_manager.php

示例3: done

 public function done($d)
 {
     @set_time_limit(0);
     if (count($this->ini) == 1) {
         $pkgs = reset($this->ini);
         $pkgs = $pkgs['package'];
     } else {
         $pkgs = isset($this->ini[$d[0]['setup_type']]['package']) ? $this->ini[$d[0]['setup_type']]['package'] : array();
     }
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': installing "Base" ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     if (!ModuleManager::install('Base', null, false)) {
         print 'Unable to install Base module pack.';
         return false;
     }
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': creating admin user ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     if (!Base_UserCommon::add_user($d['simple_user']['login'])) {
         print 'Unable to create user';
         return false;
     }
     $user_id = Base_UserCommon::get_user_id($d['simple_user']['login']);
     if ($user_id === false) {
         print 'Unable to get admin user id';
         return false;
     }
     if (!DB::Execute('INSERT INTO user_password(user_login_id,password,mail) VALUES(%d,%s, %s)', array($user_id, md5($d['simple_user']['pass']), $d['simple_user']['mail']))) {
         print 'Unable to set user password';
         return false;
     }
     if (!Base_UserCommon::change_admin($user_id, 2)) {
         print 'Unable to update admin account data (groups).';
         return false;
     }
     Acl::set_user($user_id, true);
     Variable::set('anonymous_setup', false);
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': setting mail server ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     $method = $d['simple_mail']['mail_method'];
     Variable::set('mail_method', $method);
     Variable::set('mail_from_addr', $d['simple_user']['mail']);
     Variable::set('mail_from_name', $d['simple_user']['login']);
     if ($method == 'smtp') {
         Variable::set('mail_host', $d['simple_mail_smtp']['mail_host']);
         if ($d['simple_mail_smtp']['mail_user'] !== '' && $d['simple_mail_smtp']['mail_user'] !== '') {
             $auth = true;
         } else {
             $auth = false;
         }
         Variable::set('mail_auth', $auth);
         if ($auth) {
             Variable::set('mail_user', $d['simple_mail_smtp']['mail_user']);
             Variable::set('mail_password', $d['simple_mail_smtp']['mail_password']);
         }
     }
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': Installing modules ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     foreach ($pkgs as $p) {
         if (!is_dir('modules/' . $p)) {
             continue;
         }
         $t2 = microtime(true);
         error_log(' * ' . date('Y-m-d H:i:s') . ' - ' . $p . ' (', 3, DATA_DIR . '/firstrun.log');
         if (!ModuleManager::install(str_replace('/', '_', $p), null, false)) {
             print '<b>Unable to install ' . str_replace('_', '/', $p) . ' module.</b>';
         }
         error_log(microtime(true) - $t2 . "s)\n", 3, DATA_DIR . '/firstrun.log');
     }
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': Refreshing cache of modules ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     ModuleManager::create_load_priority_array();
     Base_SetupCommon::refresh_available_modules();
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': Creating cache of template files ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     Base_ThemeCommon::create_cache();
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $t = microtime(true);
     error_log(date('Y-m-d H:i:s') . ': Updating translation files ...' . "\n", 3, DATA_DIR . '/firstrun.log');
     Base_LangCommon::update_translations();
     error_log(date('Y-m-d H:i:s') . ': done (' . (microtime(true) - $t) . "s).\n", 3, DATA_DIR . '/firstrun.log');
     $processed = ModuleManager::get_processed_modules();
     $_SESSION['first-run_post-install'] = $processed['install'];
     location();
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:89,代码来源:FirstRun_0.php

示例4: array

    } else {
        $auth = SimpleLogin::form();
        if ($auth) {
            print $auth;
            die;
        }
    }
}
if (class_exists('Base_LangCommon')) {
    Base_LangCommon::update_translations();
}
if (class_exists('Base_ThemeCommon')) {
    Base_ThemeCommon::create_cache();
}
if (class_exists('ModuleManager')) {
    ModuleManager::create_load_priority_array();
}
$html = '';
$checks = array();
// checking:
// DB - creating tables, selects, locking tables
// Strict Standards
// error display
// file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration
// memory check
// max_execution_time setting (safe mode)
// upload_max_filesize
// Libs: ZIP, curl
// ********************* DATABASE ***********************
if ($config) {
    ob_start();
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:check.php

示例5: action

 public function action()
 {
     Cache::clear();
     ModuleManager::create_load_priority_array();
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:6,代码来源:ModulesUp.php


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