Index: branches/unlabeled/unlabeled-1.1.4/kernel/admin_templates/img/toolbar/tool_pdf_f2.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.44.2/kernel/admin_templates/incs/form_blocks.tpl =================================================================== diff -u -r5856 -r5882 --- branches/unlabeled/unlabeled-1.44.2/kernel/admin_templates/incs/form_blocks.tpl (.../form_blocks.tpl) (revision 5856) +++ branches/unlabeled/unlabeled-1.44.2/kernel/admin_templates/incs/form_blocks.tpl (.../form_blocks.tpl) (revision 5882) @@ -342,7 +342,7 @@ " type="checkbox" id="_cb_" name="_cb_" class="" onclick="update_checkbox(this, document.getElementById(''))">
- +   Index: branches/unlabeled/unlabeled-1.1.4/kernel/admin_templates/img/toolbar/tool_pdf_f3.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.12.2/core/kernel/parser/tags.php =================================================================== diff -u -r5776 -r5882 --- branches/unlabeled/unlabeled-1.12.2/core/kernel/parser/tags.php (.../tags.php) (revision 5776) +++ branches/unlabeled/unlabeled-1.12.2/core/kernel/parser/tags.php (.../tags.php) (revision 5882) @@ -405,6 +405,11 @@ /*$code = ' $processor =& $application->recallObject(\''.$this->Processor.'_TagProcessor\'); $o .= $processor->ProcessParsedTag(\''.$this->Tag.'\', unserialize(\''.serialize($this->NP).'\'));';*/ + if (isset($pass_params['result_to_var'])) { + $code[] = '$'.$pass_params['result_to_var'].' = $application->Parser->GetParam(\''.$pass_params['result_to_var'].'\');'; + $echo = false; + } + if ($echo) $code[] = ' echo $o;'."\n"; return $code; Index: branches/unlabeled/unlabeled-1.1.4/kernel/admin_templates/img/toolbar/tool_pdf.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php =================================================================== diff -u -r5440 -r5882 --- branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5440) +++ branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5882) @@ -149,6 +149,7 @@ { $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') ); + if (!file_exists($img_path)) return false; $image_info = @getimagesize($img_path); // if( !($img_path && file_exists($img_path) && isset($image_info) ) ) Index: branches/unlabeled/unlabeled-1.61.2/core/kernel/processors/main_processor.php =================================================================== diff -u -r5874 -r5882 --- branches/unlabeled/unlabeled-1.61.2/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 5874) +++ branches/unlabeled/unlabeled-1.61.2/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 5882) @@ -564,6 +564,12 @@ } return $ret; } + + function ModuleEnabled($params) + { + return $this->Application->isModuleEnabled( $params['module'] ); + } + /*function Kernel_Scripts($params) { return ''; @@ -642,6 +648,29 @@ return $this->ParseBlock($params); } + function RenderElements($params) + { + $elements = explode(',',$params['elements']); + if (isset($params['skip']) && $params['skip']) { + $skip = explode(',',$params['skip']); + } + else { + $skip = array(); + } + unset($params['elements']); + $o = ''; + foreach ($elements as $an_element) + { + $cur = trim($an_element); + if (in_array($an_element,$skip)) continue; + $pass_params = $params; + $pass_params['name'] = trim($an_element); + $o .= $this->ParseBlock($pass_params); + } + return $o; + + } + /** * Checks if debug mode is on * @@ -728,7 +757,7 @@ if ((isset($params['perm_event']) && $params['perm_event']) || (isset($params['perm_prefix']) && $params['perm_prefix']) || (isset($params['permissions']) && $params['permissions'])) { - + $perm_helper =& $this->Application->recallObject('PermissionsHelper'); $perm_status = $perm_helper->TagPermissionCheck($params, 'm_RequireLogin'); if (!$perm_status) { Index: branches/unlabeled/unlabeled-1.11.2/core/kernel/processors/tag_processor.php =================================================================== diff -u -r5858 -r5882 --- branches/unlabeled/unlabeled-1.11.2/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 5858) +++ branches/unlabeled/unlabeled-1.11.2/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 5882) @@ -1,7 +1,7 @@ ProcessParsedTag($tag->Tag, $tag->NP, $tag->getPrefixSpecial()); - + /*$Method=$tag->Tag; if(method_exists($this, $Method)) { //echo htmlspecialchars($tag->GetFullTag()).'
'; return $this->$Method($tag->NP); } - else + else { if ($this->Application->hasObject('TagsAggregator')) { $aggregator =& $this->Application->recallObject('TagsAggregator'); $tag_mapping = $aggregator->GetArrayValue($tag->Prefix, $Method); if ($tag_mapping) { - + $mapped_tag =& new Tag('', $this->Application->Parser); $mapped_tag->CopyFrom($tag); $mapped_tag->Processor = $tag_mapping[0]; $mapped_tag->Tag = $tag_mapping[1]; $mapped_tag->NP['PrefixSpecial'] = $tag->getPrefixSpecial(); $mapped_tag->RebuildTagData(); return $mapped_tag->DoProcessTag(); - } + } } trigger_error('Tag '.$Method.' Undefined in '.get_class($this).'[Agregated Tag]:
'.$tag->RebuildTagData().'',E_USER_WARNING); return false; }*/ } - + function ProcessParsedTag($tag, $params, $prefix) { $Method = $tag; @@ -48,26 +48,30 @@ if ($this->Application->isDebugMode() && constOn('DBG_SHOW_TAGS')) { $this->Application->Debugger->appendHTML('Processing PreParsed Tag '.$Method.' in '.$this->Prefix); } - + // pass_params for non ParseBlock tags :) if (isset($params['pass_params']) && $params['pass_params']) { $params = array_merge_recursive2($this->Application->Parser->Params, $params); unset($params['pass_params']); } - + $backup_prefix = $this->Prefix; $backup_special = $this->Special; - + $ret = $this->$Method($params); - + $this->Prefix = $backup_prefix; $this->Special = $backup_special; - + if (isset($params['js_escape']) && $params['js_escape']) { $ret = str_replace('\'', ''', $ret); $ret = addslashes($ret); $ret = str_replace(Array("\r", "\n"), Array('\r', '\n'), $ret); } + if (isset($params['result_to_var'])) { + $this->Application->Parser->SetParam($params['result_to_var'], $ret); + $ret = ''; + } return $ret; } else @@ -83,16 +87,21 @@ $processor->Prefix = $tmp['prefix']; $processor->Special = getArrayValue($tag_mapping, 2) ? $tag_mapping[2] : $tmp['special']; $params['PrefixSpecial'] = $prefix; - return $processor->ProcessParsedTag($tag_mapping[1], $params, $prefix); + $ret = $processor->ProcessParsedTag($tag_mapping[1], $params, $prefix); + if (isset($params['result_to_var'])) { + $this->Application->Parser->SetParam($params['result_to_var'], $ret); + $ret = ''; + } + return $ret; } trigger_error('Tag '.$Method.' Undefined in '.get_class($this).'[Agregated Tag]:
'.$tag.'', E_USER_WARNING); } trigger_error('Tag Undefined:
'.$prefix.':'.$tag.'',E_USER_WARNING); return false; } } - - + + /** * Not tag, method for parameter * selection from list in this TagProcessor @@ -106,7 +115,7 @@ { if (!is_array($params)) return; if (!is_array($possible_names)) - + $possible_names = explode(',', $possible_names); foreach ($possible_names as $name) { @@ -121,13 +130,13 @@ var $Application; var $Prefixes = Array(); var $S; - + function ProcessorsPool() { $this->Application =& KernelApplication::Instance(); $this->S =& $this->Application->Session; } - + function RegisterPrefix($prefix, $path, $class) { // echo " RegisterPrefix $prefix, $path, $class
"; @@ -137,7 +146,7 @@ ); $this->Prefixes[$prefix] = $prefix_item; } - + function CreateProcessor($prefix, &$tag) { // echo " prefix : $prefix
"; @@ -148,12 +157,12 @@ $a_processor =& new $ClassName($prefix); $this->SetProcessor($prefix, $a_processor); } - + function SetProcessor($prefix, &$a_processor) { $this->Processors[$prefix] =& $a_processor; } - + function &GetProcessor($prefix, &$tag) { if (!isset($this->Processors[$prefix])) Index: branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php =================================================================== diff -u -r5440 -r5882 --- branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5440) +++ branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5882) @@ -149,6 +149,7 @@ { $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') ); + if (!file_exists($img_path)) return false; $image_info = @getimagesize($img_path); // if( !($img_path && file_exists($img_path) && isset($image_info) ) ) Index: branches/unlabeled/unlabeled-1.24.2/kernel/units/email_events/email_events_event_handler.php =================================================================== diff -u -r5437 -r5882 --- branches/unlabeled/unlabeled-1.24.2/kernel/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5437) +++ branches/unlabeled/unlabeled-1.24.2/kernel/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5882) @@ -120,7 +120,7 @@ $to_user_id = $event->getEventParam('EmailEventToUserId'); $email_event_type = $event->getEventParam('EmailEventType'); - + $message_object = &$this->Application->recallObject('emailmessages', null, Array('skip_autoload' => true)); $event_table = $this->Application->getUnitOption('emailevents', 'TableName'); @@ -154,7 +154,7 @@ $email_object = &$this->Application->recallObject('kEmailMessage'); $email_object->Clear(); - + // add footer: begin $sql = 'SELECT em.Template FROM '.$message_object->TableName.' em @@ -209,7 +209,6 @@ $email_object->setTo($to_user_email, $to_user_name); $email_object->setSubject('Mail message'); - $email_object->setHeaders($message_headers); if ($message_type == 'html'){ Index: branches/unlabeled/unlabeled-1.24.2/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -r5437 -r5882 --- branches/unlabeled/unlabeled-1.24.2/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5437) +++ branches/unlabeled/unlabeled-1.24.2/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5882) @@ -120,7 +120,7 @@ $to_user_id = $event->getEventParam('EmailEventToUserId'); $email_event_type = $event->getEventParam('EmailEventType'); - + $message_object = &$this->Application->recallObject('emailmessages', null, Array('skip_autoload' => true)); $event_table = $this->Application->getUnitOption('emailevents', 'TableName'); @@ -154,7 +154,7 @@ $email_object = &$this->Application->recallObject('kEmailMessage'); $email_object->Clear(); - + // add footer: begin $sql = 'SELECT em.Template FROM '.$message_object->TableName.' em @@ -209,7 +209,6 @@ $email_object->setTo($to_user_email, $to_user_name); $email_object->setSubject('Mail message'); - $email_object->setHeaders($message_headers); if ($message_type == 'html'){ Index: branches/unlabeled/unlabeled-1.24.2/core/kernel/parser/template_parser.php =================================================================== diff -u -r5856 -r5882 --- branches/unlabeled/unlabeled-1.24.2/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 5856) +++ branches/unlabeled/unlabeled-1.24.2/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 5882) @@ -44,8 +44,10 @@ function SortParams() { uasort($this->ForSort, array ("TemplateParser", "CmpParams")); - $this->Pattern = Array(); - $this->Values = Array(); + +// commented out by Kostja, otherwise when rednerElement is done into var (result_to_var) the other params are reset +// $this->Pattern = Array(); +// $this->Values = Array(); foreach($this->ForSort as $pair) { $this->Pattern[] = $pair[0]; @@ -89,7 +91,7 @@ if ($deep_level > 0) { return isset($this->ParamsStack[$deep_level][$name]) ? $this->ParamsStack[$deep_level][$name] : false; } - + return isset($this->Params[$name]) ? $this->Params[$name] : false; } @@ -359,7 +361,7 @@ $dir = preg_replace('/^'.preg_quote($base_path.'/', '/').'/', '', $dir, 1); $segments = explode('/', $dir); $cur_path = $base_path; - + foreach ($segments as $segment) { // do not add leading / for windows paths (c:\...) $cur_path .= preg_match('/^[a-zA-Z]{1}:/', $segment) ? $segment : '/'.$segment;