Beispiel #1
0
 function setShopPid($shop_pid)
 {
     $this->shop_pid = $shop_pid;
     $ms = array();
     $tmp = mslib_befe::loadConfiguration($this->shop_pid);
     $ms['MODULES'] = $tmp;
     $ms = mslib_befe::convertConfiguration($ms);
     $this->ms = $ms;
 }
Beispiel #2
0
                 }
                 $content .= '<BR><strong>' . $insert_records . '</strong> ' . ($insert_records == 1 ? 'record' : 'records') . ' added.<hr><BR>';
             }
         } else {
             $content .= 'File is not valid. Restore didn\'t succeed.';
         }
         $content .= '</fieldset>';
         // now remove the backup folder
         if ($fullpath) {
             $tmp = $this->deltree($fullpath);
         }
     }
     // restore database	eof
     break;
 case 'backup':
     $this->ms['MODULES'] = mslib_befe::loadConfiguration($_GET['page_uid']);
     $this->ms = mslib_befe::convertConfiguration($this->ms);
     // backup database
     if ($_GET['action'] == 'backup' and is_numeric($_GET['page_uid'])) {
         $tables = array();
         if (in_array('customers', $_GET['tx_multishop_pi']['selected_tables']) or !count($_GET['tx_multishop_pi']['selected_tables'])) {
             $tables[] = 'tt_address';
             $tables[] = 'fe_users';
         }
         if (in_array('cms', $_GET['tx_multishop_pi']['selected_tables']) or !count($_GET['tx_multishop_pi']['selected_tables'])) {
             $tables[] = 'tx_multishop_cms';
             $tables[] = 'tx_multishop_cms_description';
         }
         if (in_array('configuration', $_GET['tx_multishop_pi']['selected_tables']) or !count($_GET['tx_multishop_pi']['selected_tables'])) {
             $tables[] = 'tx_multishop_configuration';
             $tables[] = 'tx_multishop_configuration_values';
    }
}
if ($this->conf['cacheConfiguration'] == '1' and !$this->ADMIN_USER) {
    $this->ms['MODULES']['CACHE_FRONT_END'] = 1;
}
if ($this->ms['MODULES']['CACHE_FRONT_END']) {
    $string = 'loadConfiguration_' . $this->HTTP_HOST . '_' . $this->shop_pid . '_' . $this->cObj->data['uid'] . '_' . md5(serialize($this->conf));
    if ($this->get['categories_id'] && is_numeric($this->get['categories_id'])) {
        $string .= '_' . $this->get['categories_id'];
    } elseif ($this->get['categories_id'] && is_array($this->get['categories_id']) && count($this->get['categories_id'])) {
        $string .= '_' . implode('_', $this->get['categories_id']);
    }
}
$lifetime = 36000;
if (!$this->ms['MODULES']['CACHE_FRONT_END'] or $this->ms['MODULES']['CACHE_FRONT_END'] and !($tmp = mslib_befe::cacheLite('get', $string, $lifetime, 1))) {
    $tmp = mslib_befe::loadConfiguration($this->shop_pid);
    if ($this->ms['MODULES']['CACHE_FRONT_END']) {
        mslib_befe::cacheLite('save', $string, $lifetime, 1, $tmp);
    }
}
$this->ms['MODULES'] = $tmp;
// make sure the page title always have default delimeter value, when config not yet updated
if (!isset($this->ms['MODULES']['PAGE_TITLE_DELIMETER'])) {
    $this->ms['MODULES']['PAGE_TITLE_DELIMETER'] = ' :: ';
}
$this->ms = mslib_befe::convertConfiguration($this->ms);
//if ($this->ms['MODULES']['CACHE_FRONT_END'] or $this->ms['MODULES']['GLOBAL_MODULES']['CACHE_FRONT_END'])	require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop').'res/Cache_Lite-1.7.8/Lite.php');
//if ($this->ADMIN_USER) {
// load enabled languages
$enabled_countries = array();
if ($this->ms['MODULES']['ENABLED_LANGUAGES']) {