33         $sDir = 
$myConfig->getConfigParam(
'sShopDir') . 
'/documentation/admin';
 
   35         $sAbbr = $oLang->getLanguageAbbr($oLang->getTplLanguage());
 
   40             $sDir = 
$myConfig->getConfigParam(
'sShopURL') . 
'documentation/admin';
 
   46             $sDir = 
"http://docu.oxid-esales.com/PE/{$oShop->oxshops__oxversion->value}/" . $iLang . 
'/admin';
 
   49         $this->_aViewData[
'sHelpURL'] = $sDir;
 
   65     protected function _getTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet = null)
 
   67         if ($this->_oEditor === null) {
 
   71             $sEditorPath = 
'wysiwigpro';
 
   72             $sEditorFile = getShopBasePath() . 
"core/" . $sEditorPath . 
'/wysiwygPro.class.php';
 
   76             $this->_oEditor = 
false;
 
   78             if ($sEditorFile && file_exists($sEditorFile)) {
 
   79                 include_once $sEditorFile;
 
   82                 $this->_oEditor = 
new wysiwygPro();
 
   90                 $this->_oEditor->editorURL = $sEditorUrl;
 
   91                 $this->_oEditor->urlFormat = 
'preserve';
 
   94                 $sPictureDir = 
$myConfig->getPictureDir(
false) . 
'wysiwigpro/';
 
   95                 $sPictureUrl = 
$myConfig->getPictureUrl(null, 
false) . 
'wysiwigpro/';
 
   96                 $this->_oEditor->documentDir = $this->_oEditor->imageDir = $sPictureDir;
 
   97                 $this->_oEditor->documentURL = $this->_oEditor->imageURL = $sPictureUrl;
 
  100                 $this->_oEditor->upload = 
true;
 
  103                 $this->_oEditor->emptyValue = 
"<p> </p>";
 
  106                 $this->_oEditor->deleteFiles = 
true;
 
  107                 $this->_oEditor->deleteFolders = 
true;
 
  110                 $this->_oEditor->allowedImageExtensions = 
'.jpg, .jpeg, .gif, .png';
 
  113                 $this->_oEditor->allowedDocExtensions = 
'.html, .htm, .pdf, .doc, .rtf, .txt, .xl, .xls, .ppt, .pps, ' .
 
  114                                                         '.zip, .tar, .swf, .wmv, .rm, .mov, .jpg, .jpeg, .gif, .png';
 
  117                 $this->_oEditor->name = $sField;
 
  121                 $this->_oEditor->lang = $oLang->translateString(
'editor_language', $oLang->getTplLanguage());
 
  124                 if ($sEditObjectValue = $this->
_getEditValue($oObject, $sField)) {
 
  125                     $this->_oEditor->value = $sEditObjectValue;
 
  126                     $this->_oEditor->encoding = $this->
getConfig()->isUtf() ? 
'UTF-8' : 
'ISO-8859-15';
 
  131                 $sCSSPath = 
$myConfig->getResourcePath(
"{$sStylesheet}", 
false);
 
  132                 $sCSSUrl = 
$myConfig->getResourceUrl(
"{$sStylesheet}", 
false);
 
  134                 $aCSSPaths = array();
 
  137                 if (is_file($sCSSPath)) {
 
  139                     $aCSSPaths[] = $sCSSUrl;
 
  141                     if (is_readable($sCSSPath)) {
 
  142                         $aCSS = @file($sCSSPath);
 
  143                         if (isset($aCSS) && $aCSS) {
 
  146                             foreach ($aCSS as $key => $sLine) {
 
  147                                 $sLine = trim($sLine);
 
  149                                 if ($sLine[0] == 
'.' && !$oStr->strstr($sLine, 
'default')) {
 
  151                                     $sTag = $oStr->substr($sLine, 1);
 
  152                                     $iEnd = $oStr->strpos($sTag, 
' ');
 
  153                                     if (!isset($iEnd) || !$iEnd) {
 
  154                                         $iEnd = $oStr->strpos($sTag, 
'\n');
 
  157                                     if ($sTag = $oStr->substr($sTag, 0, $iEnd)) {
 
  158                                         $aClasses[
"span class='{$sTag}'"] = $sTag;
 
  162                             $this->_oEditor->stylesMenu = $aClasses;
 
  167                 foreach ($aCSSPaths as $sCssPath) {
 
  168                     $this->_oEditor->addStylesheet($sCssPath);
 
  173                 $this->_oEditor->loadPlugin(
'templateFilter');
 
  174                 $this->_oEditor->plugins[
'templateFilter']->protect(
'[{', 
'}]');
 
  175                 if (
$myConfig->getConfigParam(
'bl_perfParseLongDescinSmarty')) {
 
  176                     $sCurrentHomeDir = 
'[{$oViewConf->getCurrentHomeDir()}]';
 
  177                     $this->_oEditor->plugins[
'templateFilter']->assign($sCurrentHomeDir, 
$myConfig->getShopURL());
 
  180                     $this->_oEditor->plugins[
'templateFilter']->assign($sCurrentHomeDir, 
$myConfig->getSSLShopURL());
 
  198         $sEditObjectValue = 
'';
 
  199         if ($oObject && $sField && isset($oObject->$sField)) {
 
  201             if ($oObject->$sField instanceof 
oxField) {
 
  202                 $sEditObjectValue = $oObject->$sField->getRawValue();
 
  204                 $sEditObjectValue = $oObject->$sField->value;
 
  208             $oObject->$sField = 
new oxField($sEditObjectValue, 
oxField::T_RAW);
 
  211         return $sEditObjectValue;
 
  226         if (!$this->
getConfig()->getConfigParam(
'bl_perfParseLongDescinSmarty')) {
 
  227             $aReplace = array(
'[{$shop->currenthomedir}]', 
'[{$oViewConf->getCurrentHomeDir()}]');
 
  228             $sValue = str_replace($aReplace, $this->
getConfig()->getCurrentShopURL(
false), $sValue);
 
  248         if (strpos($iWidth, 
'%') === 
false) {
 
  251         if (strpos($iHeight, 
'%') === 
false) {
 
  255         return "<textarea id='editor_{$sField}' style='width:{$iWidth}; height:{$iHeight};'>{$sEditObjectValue}</textarea>";
 
  272         if ($oEditor = $this->
_getTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet)) {
 
  274             $sEditorHtml = $oEditor->fetch($iWidth, $iHeight);
 
  276             $sEditorHtml = $this->
_getPlainEditor($iWidth, $iHeight, $oObject, $sField);
 
  319     protected function _createCategoryTree($sTplVarName, $sEditCatId = 
'', $blForceNonCache = 
false, $iTreeShopId = null)
 
  322         if (!isset($this->oCatTree) || $blForceNonCache) {
 
  323             $this->oCatTree = 
oxNew(
'oxCategoryList');
 
  324             $this->oCatTree->setShopID($iTreeShopId);
 
  327             $oBase = $this->oCatTree->getBaseObject();
 
  328             $oBase->setLanguage($this->_iEditLang);
 
  330             $this->oCatTree->loadList();
 
  334         $oCatTree = $this->oCatTree;
 
  336         if ($sEditCatId && isset($oCatTree[$sEditCatId])) {
 
  337             unset($oCatTree[$sEditCatId]);
 
  341         $oRoot = 
oxNew(
'oxcategory');
 
  342         $oRoot->oxcategories__oxtitle = 
new oxField(
'--');
 
  344         $oCatTree->assign(array_merge(array(
'' => $oRoot), $oCatTree->getArray()));
 
  347         $this->_aViewData[$sTplVarName] = $oCatTree;
 
  364     protected function _getCategoryTree($sTplVarName, $sSelectedCatId, $sEditCatId = 
'', $blForceNonCache = 
false, $iTreeShopId = null)
 
  366         $oCatTree = $this->
_createCategoryTree($sTplVarName, $sEditCatId, $blForceNonCache, $iTreeShopId);
 
  369         if ($sSelectedCatId) {
 
  371             foreach ($oCatTree as $oCategory) {
 
  372                 if ($oCategory->getId() == $sSelectedCatId) {
 
  373                     $oCategory->selected = 1;
 
  380             if ($oCat = $oCatTree->current()) {
 
  382                 $sSelectedCatId = $oCat->getId();
 
  387         $this->_aViewData[$sTplVarName] = $oCatTree;
 
  389         return $sSelectedCatId;
 
  400         if ($sFolderClass == 
'oxcontent' && $sFolder == 
'CMSFOLDER_NONE') {
 
  404         $oObject = 
oxNew($sFolderClass);
 
  405         if ($oObject->load($this->getEditObjectId())) {
 
  406             $oObject->{$oObject->getCoreTableName() . 
'__oxfolder'} = 
new oxField($sFolder);
 
  416     protected function _setupNavigation($sNode)
 
  421             $myAdminNavig = $this->getNavigation();
 
  424             $this->_aViewData[
'default_edit'] = $myAdminNavig->getActiveTab($sNode, $this->_iDefEdit);
 
  427             $this->_aViewData[
'bottom_buttons'] = $myAdminNavig->getBtn($sNode);
 
  436     protected function _resetCounts($aIds)
 
  439         foreach ($aIds as $sType => $aResetInfo) {
 
  440             foreach ($aResetInfo as $sResetId => $iPos) {
 
  443                         $this->resetCounter(
"vendorArticle", $sResetId);
 
  446                         $this->resetCounter(
"manufacturerArticle", $sResetId);