Index: branches/RC/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r11227 -r11336 --- branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 11227) +++ branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 11336) @@ -125,8 +125,14 @@ if (!isset($params['pass']) && !isset($params['no_pass'])) $params['pass'] = 'm'; if (isset($params['no_pass'])) unset($params['no_pass']); - if( $this->Application->GetVar('admin') ) $params['admin'] = 1; + if ( $this->Application->GetVar('admin') ) { + $params['admin'] = 1; + if (!array_key_exists('editing_mode', $params)) { + $params['editing_mode'] = EDITING_MODE; + } + } + return $this->T($params); } @@ -566,6 +572,7 @@ function GetEquals($params) { $name = $this->SelectParam($params, 'var,name,param'); + $value = $params['value']; if ($this->Application->GetVar($name) == $value) { return 1; @@ -741,77 +748,6 @@ }*/ /** - * Parses block and returns result - * - * @param Array $params - * @return string - * @access public - * - * @todo Fools NParser, that m_ParseBlock exists, need that? - */ - function ParseBlock($params) - { - $parser =& $this->Application->Parser; // recallObject('TemplateParser'); - return $parser->ParseBlock($params); - } - - function RenderElement($params) - { - if (isset($params['design']) && $params['design']) { - $block_name = $params['name']; - if ($block_name != '__this__') { - // prepare content - $block_params = $params; - $block_params['template'] = $block_name; - $block_params['return_params'] = 1; - $block_params['strip_nl'] = 2; - $block_content = $this->MyInclude($block_params); - - if (isset($params['data_exists']) && $params['data_exists'] && !$block_content) { - return ''; - } - - // prepare design - $block_params = Array ( - 'content' => $block_content, - ); - } - - $block_params['name'] = $params['design']; - return $this->Application->ParseBlock($block_params, 1); - } - - return $this->ParseBlock($params); - } - - function RenderElements($params) - { - if (!isset($params['elements']) || !$params['elements']) return; - $elements = explode(',', $params['elements']); - if (isset($params['skip']) && $params['skip']) { - $tmp_skip = explode(',', $params['skip']); - foreach ($tmp_skip as $elem) { - $skip[] = trim($elem); - } - } - else { - $skip = array(); - } - unset($params['elements']); - $o = ''; - foreach ($elements as $an_element) - { - $cur = trim($an_element); - if (in_array($cur,$skip) || !$cur) continue; - $pass_params = $params; - $pass_params['name'] = $cur; - $o .= $this->RenderElement($pass_params); - } - return $o; - - } - - /** * Checks if debug mode is on * * @param Array $params @@ -1019,8 +955,8 @@ else { if (PROTOCOL == 'https://' && $this->Application->ConfigValue('Force_HTTP_When_SSL_Not_Required')) { if ($this->Application->GetVar('__KEEP_SSL__')) return; - $pass = array('pass'=>'m', 'm_cat_id'=>0); - $this->Application->Redirect('', array_merge_recursive2($pass, Array('__SSL__' => 0))); + // $pass_more = Array ('pass' => 'm', 'm_cat_id' => 0, '__SSL__' => 0); + $this->Application->Redirect('', array_merge_recursive2($pass, Array('__SSL__' => 0))); // $pass_more } } } @@ -1066,6 +1002,10 @@ } } + // xml documents are usually long + set_time_limit(0); + ini_set('memory_limit', -1); + return $this->Application->XMLHeader(getArrayValue($params, 'xml_version')); }