97 $myConfig->setConfigParam(
'blAdmin',
true );
102 $this->_sShopTitle = $oShop->oxshops__oxname->getRawValue();
103 $this->_sShopVersion = $oShop->oxshops__oxversion->value;
117 if ( !$this->_oEditShop ) {
118 $this->_oEditShop = $this->
getConfig()->getActiveShop();
119 if ( $this->_oEditShop->getId() != $sShopId ) {
120 $oEditShop =
oxNew(
'oxshop' );
121 if ( $oEditShop->load( $sShopId ) ) {
122 $this->_oEditShop = $oEditShop;
149 $this->_iEditLang = $oLang->getEditLanguage();
150 $oLang->setBaseLanguage();
174 $sURL =
$myConfig->getConfigParam(
'sShopURL' ).
$myConfig->getConfigParam(
'sAdminDir' ) .
"/";
176 if (
$myConfig->getConfigParam(
'sAdminSSLURL')) {
177 $sURL =
$myConfig->getConfigParam(
'sAdminSSLURL');
181 $oViewConf->setViewConfigParam(
'selflink',
oxRegistry::get(
"oxUtilsUrl")->processUrl($sURL.
'index.php?editlanguage='.$this->_iEditLang,
false) );
182 $oViewConf->setViewConfigParam(
'ajaxlink', str_replace(
'&',
'&',
oxRegistry::get(
"oxUtilsUrl")->processUrl( $sURL.
'oxajax.php?editlanguage='.$this->_iEditLang,
false ) ) );
183 $oViewConf->setViewConfigParam(
'sServiceUrl', $this->
getServiceUrl() );
184 $oViewConf->setViewConfigParam(
'blLoadDynContents',
$myConfig->getConfigParam(
'blLoadDynContents' ) );
185 $oViewConf->setViewConfigParam(
'sShopCountry',
$myConfig->getConfigParam(
'sShopCountry' ) );
188 $iDynInterfaceLanguage =
$myConfig->getConfigParam(
'iDynInterfaceLanguage' );
190 $this->_aViewData[
'adminlang'] = isset( $iDynInterfaceLanguage )?$iDynInterfaceLanguage:$oLang->getTplLanguage();
191 $this->_aViewData[
'charset'] = $this->
getCharSet();
194 $this->_aViewData[
"oActCur"] =
$myConfig->getActShopCurrencyObject();
206 return $this->
getConfig()->isSsl() ?
'https' :
'http';
218 if ( $this->_sServiceUrl === null ) {
224 $sUrl = $sProtocol .
'://admin.oxid-esales.com/CE/';
230 $sLangAbbr = $oLang->getLanguageAbbr( $oLang->getTplLanguage() );
233 if ( $sLangAbbr !=
"de" ) {
237 $this->_sServiceUrl = $sUrl . $this->
_getShopVersionNr().
"/{$sCountry}/{$sLangAbbr}/";
252 if ( $sShopID =
$myConfig->getShopId() ) {
253 $sQ =
"select oxversion from oxshops where oxid = '$sShopID' ";
254 $sVersion =
oxDb::getDb()->getOne( $sQ,
false,
false );
257 $sVersion = preg_replace(
"/(^[^0-9]+)(.+)$/",
"$2", $sVersion );
258 return trim( $sVersion );
279 $sActTab = $iActTab?
"&actedit=$iActTab":
'';
285 $this->_aViewData[
'listurl'] = $myAdminNavig->getListUrl( $sNode ).$sActTab;
288 $this->_aViewData[
'editurl'] = $myAdminNavig->getEditUrl( $sNode, $iActTab ).$sActTab;
304 $aHistory = explode(
'|', $myUtilsServer->getOxCookie(
'oxidadminhistory'));
305 if (!is_array($aHistory)) {
309 if (!in_array($sNode, $aHistory)) {
310 $aHistory[] = $sNode;
313 $myUtilsServer->setOxCookie(
'oxidadminhistory', implode(
'|', $aHistory));
334 $this->_aViewData[
'oxid'] = ( !$sOxId )?-1:$sOxId;
340 $this->_aViewData[
"shopid"] =
$myConfig->getShopId();
345 $this->_aViewData[
'actshopobj'] = $this->
_getEditShop( $sActShopId );
349 $this->_aViewData[
'actlang'] = $iLanguage = $oLang->getBaseLanguage();
351 $this->_aViewData[
'languages'] = $oLang->getLanguageArray( $iLanguage );
354 list( $this->_aViewData[
'iMaxUploadFileSize'], $this->_aViewData[
'sMaxFormattedFileSize']) = $this->
_getMaxUploadFileInfo( @ini_get(
"upload_max_filesize") );
357 if ( !isset( $this->_aViewData[
'updatelist'] ) ) {
374 $iMaxFileSize = $iMaxFileSize?$iMaxFileSize:
'2M';
377 $iMaxFileSize = trim( $iMaxFileSize );
378 $sParam = strtolower( $iMaxFileSize{ strlen( $iMaxFileSize )-1 } );
381 $iMaxFileSize *= 1024;
383 $iMaxFileSize *= 1024;
385 $iMaxFileSize *= 1024;
389 $aMarkers = array (
'KB',
'MB',
'GB' );
390 $sFormattedMaxSize =
'';
392 $iSize = floor( $iMaxFileSize / 1024 );
393 while ( $iSize && current( $aMarkers ) ) {
394 $sFormattedMaxSize = $iSize .
" " . current( $aMarkers );
395 $iSize = floor( $iSize / 1024 );
399 return array( $iMaxFileSize, $sFormattedMaxSize );
420 $blDeleteCacheOnLogout = $this->
getConfig()->getConfigParam(
'blClearCacheOnLogout' );
422 if ( !$blDeleteCacheOnLogout || $blForceReset ) {
441 $blDeleteCacheOnLogout = $this->
getConfig()->getConfigParam(
'blClearCacheOnLogout' );
444 if ( !$blDeleteCacheOnLogout ) {
445 switch ( $sCounterType ) {
446 case 'priceCatArticle':
447 $myUtilsCount->resetPriceCatArticleCount( $sValue );
450 $myUtilsCount->resetCatArticleCount( $sValue );
452 case 'vendorArticle':
453 $myUtilsCount->resetVendorArticleCount( $sValue );
455 case 'manufacturerArticle':
456 $myUtilsCount->resetManufacturerArticleCount( $sValue );
489 $sCountry =
'international';
491 if ( !empty( $sCountryCode ) ) {
493 $iEnglishId = array_search(
"en", $aLangIds);
494 if (
false !== $iEnglishId ) {
495 $sViewName = getViewName(
"oxcountry", $iEnglishId );
496 $sQ =
"select oxtitle from {$sViewName} where oxisoalpha2 = " .
oxDb::getDb()->quote( $sCountryCode );
497 $sCountryName =
oxDb::getDb()->getOne( $sQ,
false,
false );
498 if ( $sCountryName ) {
499 $sCountry = $sCountryName;
503 switch ( $sCountryCode ) {
507 return 'international';
511 return strtolower( $sCountry );
535 if ( self::$_oNaviTree == null ) {
536 self::$_oNaviTree =
oxNew(
'oxnavigationtree' );
548 $sClassName = strtolower( get_class( $this ) );
573 $aTypes = array(
'oxarticle',
'oxcategory',
'oxvendor',
'oxcontent',
'dynamic',
'oxmanufacturer' );
575 foreach ( $aTypes as $sType ) {
576 $oEncoder->markAsExpired( null, $sShopId, 1, null,
"oxtype = '{$sType}'" );
580 $oTagCloud =
oxNew(
'oxtagcloud');
581 $oTagCloud->resetCache();
601 if ( null === ( $sId = $this->_sEditObjectId ) ) {
618 $this->_sEditObjectId = $sId;
619 $this->_aViewData[
"updatelist"] = 1;