merge from 1.5.3.2 (~r11225)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@11226 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-09-13 06:14:45 +00:00
parent 54e3a72065
commit 77f5aa2671
313 changed files with 8058 additions and 14251 deletions

View file

@ -97,6 +97,16 @@
return $layout_info;
}
function getLayoutRawData($layout_srl, $columnList = array())
{
$args->layout_srl = $layout_srl;
$output = executeQuery('layout.getLayout', $args, $columnList);
if(!$output->toBool())
return;
return $output->data->extra_vars;
}
/**
* Get a layout path
* @param string $layout_name
@ -104,7 +114,7 @@
* @return string path of layout
**/
function getLayoutPath($layout_name, $layout_type = "P") {
$layout_parse = explode('.', $layout_name);
$layout_parse = explode('|@|', $layout_name);
if (count($layout_parse) > 1){
$class_path = './themes/'.$layout_parse[0].'/layouts/'.$layout_parse[1].'/';
}else if($layout_name == 'faceoff'){
@ -472,7 +482,11 @@
$layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl);
$header_script = trim($layout_config->header_script);
if($header_script) $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('"','\\"',$header_script));
if($header_script)
{
$header_script = str_replace('"','\\"',$header_script);
$buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('$','\$',$header_script));
}
$buff = '<?php if(!defined("__ZBXE__")) exit(); '.$buff.' ?>';
FileHandler::writeFile($cache_file, $buff);