Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r6669 -r7391 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 6669) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7391) @@ -69,6 +69,12 @@ return $this->Application->BaseURL(); } + //for compatability with K3 tags + function Base($params) + { + return $this->TemplatesBase($params).'/'; + } + function ProjectBase($params) { return $this->Application->BaseURL(); @@ -256,6 +262,11 @@ return $ret; } + function RemoveVar($params) + { + $this->Application->RemoveVar( $this->SelectParam($params,'name,var,param') ); + } + // bad style to store something from template to session !!! (by Alex) // Used here only to test how session works, nothing more function Store($params) @@ -444,7 +455,7 @@ $if_false=$params['false']; } - if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/", $this->Application->GetVar('t'))) { + if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/i", $this->Application->GetVar('t'))) { return $if_true; } else { @@ -522,6 +533,11 @@ $parser =& $this->Application->Parser; $this->Application->Parser =& $BlockParser; + // this is for the parser to know the master template in case an error occurs, + // ParseTemplate will reset it anyway, but this will allow error handler to display the tempalte + // which tries to include missing template for example + $this->Application->Parser->TemplateName = $parser->TemplateName; + $t = $this->SelectParam($params, 't,template,block,name'); $t = eregi_replace("\.tpl$", '', $t); @@ -773,6 +789,8 @@ (isset($params['permissions']) && $params['permissions'])) { $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + /* @var $perm_helper kPermissionsHelper */ + $perm_status = $perm_helper->TagPermissionCheck($params, 'm_RequireLogin'); if (!$perm_status) { list($redirect_template, $redirect_params) = $perm_helper->getPermissionTemplate($params); @@ -930,4 +948,14 @@ $email_object->attachFile($path); } } + + function CaptchaImage($params){ + $captcha_helper =& $this->Application->recallObject('CaptchaHelper'); + $captcha_helper->GenerateCaptchaImage( + $this->Application->RecallVar($this->Application->GetVar('var')), + $this->Application->GetVar('w'), + $this->Application->GetVar('h'), + true + ); + } }