Index: trunk/core/units/admin/admin_tag_processor.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 7391) +++ trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 7635) @@ -163,6 +163,40 @@ } + function SectionInfo($params) + { + $section = $params['section']; + if ($section == '#session#') { + $section = $this->Application->RecallVar('section'); + } + + $sections_helper =& $this->Application->recallObject('SectionsHelper'); + /* @var $sections_helper kSectionsHelper */ + $section_data =& $sections_helper->getSectionData($section); + + if (isset($params['parent']) && $params['parent']) { + do { + $section_data =& $sections_helper->getSectionData($section_data['parent']); + } while (isset($section_data['use_parent_header']) && $section_data['use_parent_header']); + } + + $info = $params['info']; + switch ($info) { + case 'module_path': + $module = $section_data['icon_module']; + $res = $this->ModulePath(array('module' => $module)); + break; + default: + $res = $section_data[$info]; + } + + if ($info == 'label' || isset($params['as_label'])) { + $res = $this->Application->Phrase($res); + } + return $res; + } + + function PrintSection($params) { $section_name = $params['section_name']; @@ -376,17 +410,23 @@ function FCKEditor($params) { - include_once(FULL_PATH.'/core/cmseditor/fckeditor.php'); + if (file_exists(FULL_PATH.'/core/cmseditor/fckeditor.php')) { + $editor_path = 'core/cmseditor/'; + } + else { + $editor_path = 'admin/editor/cmseditor/'; + } + include_once(FULL_PATH.'/'.$editor_path.'/fckeditor.php'); $oFCKeditor = new FCKeditor($params['name']); - $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/'; + $oFCKeditor->BasePath = BASE_PATH.'/'.$editor_path; $oFCKeditor->Width = $params['width'] ; $oFCKeditor->Height = $params['height'] ; $oFCKeditor->ToolbarSet = 'Advanced' ; $oFCKeditor->Value = '' ; $oFCKeditor->Config = Array( //'UserFilesPath' => $pathtoroot.'kernel/user_files', 'ProjectPath' => BASE_PATH.'/', - 'CustomConfigurationsPath' => $this->Application->BaseURL().'core/cmseditor/inp_fckconfig.js', + 'CustomConfigurationsPath' => $this->Application->BaseURL().$editor_path.'fckconfig.js', // 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(), //'StylesXmlPath' => '../../inp_styles.xml', // 'Debug' => 1, @@ -605,7 +645,7 @@ $popup_info = $this->Conn->GetRow($sql); if (!$popup_info) { $this->Application->InitParser(); - $this->Application->Parser->ParseTemplate($t); // dies when SetPopupSize tag found & in ajax requrest + $this->Application->ParseBlock(array('name' => $t)); // dies when SetPopupSize tag found & in ajax requrest return '750x400'; // tag SetPopupSize not found in template -> use default size } return $popup_info['PopupWidth'].'x'.$popup_info['PopupHeight']; @@ -620,6 +660,19 @@ { return (int)$this->Application->ConfigValue('UseToolbarLabels'); } + + /** + * Checks if debug mode enabled (optionally) and specified constant is on + * + * @param Array $params + * @return bool + */ + function ConstOn($params) + { + $constant_name = $this->SelectParam($params, 'name,const'); + $debug_mode = isset($params['debug_mode']) && $params['debug_mode'] ? $this->Application->isDebugMode() : true; + return $debug_mode && constOn($constant_name); + } } ?> \ No newline at end of file