Exemplo n.º 1
0
 function __construct()
 {
     $this->here = dirname(__FILE__) . DS . 'gateways' . DS;
     $here = $this->here;
     $shipping_gateways = get_modules('type=shipping_gateway');
     if ($shipping_gateways == false) {
         $shipping_gateways = scan_for_modules("cache_group=modules/global&dir_name={$here}");
     }
     if (!empty($shipping_gateways)) {
         $gw = array();
         foreach ($shipping_gateways as $item) {
             if (!isset($item['gw_file']) and isset($item['module'])) {
                 $item['gw_file'] = $item['module'];
             }
             if (!isset($item['module_base']) and isset($item['module'])) {
                 $item['module_base'] = $item['module'];
             }
             $gw[] = $item;
         }
         $this->modules_list = $gw;
     } else {
         $this->modules_list = $shipping_gateways;
     }
 }
Exemplo n.º 2
0
 function post_update()
 {
     $this->_log_msg('Applying post update actions');
     $system_refresh = new \Microweber\Install\DbInstaller();
     $system_refresh->createSchema();
     //$system_refresh->run();
     if (!ini_get('safe_mode')) {
         if (!strstr(INI_SYSTEM_CHECK_DISABLED, 'ini_set')) {
             ini_set("set_time_limit", 0);
         }
         if (!strstr(INI_SYSTEM_CHECK_DISABLED, 'set_time_limit')) {
             set_time_limit(0);
         }
     }
     mw()->cache_manager->delete('db');
     mw()->cache_manager->delete('update/global');
     mw()->cache_manager->delete('elements/global');
     mw()->cache_manager->delete('templates');
     mw()->cache_manager->delete('modules/global');
     mw()->cache_manager->clear();
     scan_for_modules();
     scan_for_elements();
     mw()->layouts_manager->scan();
     event_trigger('mw_db_init_default');
     event_trigger('mw_db_init_modules');
     event_trigger('mw_db_init');
 }
Exemplo n.º 3
0
    ?>
    <?php 
    $mod = str_replace('___', DS, $load_module);
    $mod = load_module($mod, $attrs = array('view' => 'admin', 'backend' => 'true'));
    print $mod;
} else {
    ?>
    <?php 
    $mod_params = array();
    $mod_params['ui'] = 'any';
    if (isset($params['reload_modules'])) {
        $s = 'skip_cache=1';
        if (isset($params['cleanup_db'])) {
            $s .= '&cleanup_db=1';
        }
        $mods = scan_for_modules($s);
    }
    if (isset($params['category'])) {
        $mod_params['category'] = $params['category'];
    }
    if (isset($params['keyword'])) {
        $mod_params['keyword'] = $params['keyword'];
    }
    if (isset($params['search-keyword'])) {
        $mod_params['keyword'] = $params['search-keyword'];
    }
    if (isset($params['show-ui'])) {
        if ($params['show-ui'] == 'admin') {
            $mod_params['ui_admin'] = '1';
        } else {
            if ($params['show-ui'] == 'live_edit') {