Index: trunk/core/kernel/application.php =================================================================== diff -u -r2363 -r2368 --- trunk/core/kernel/application.php (.../application.php) (revision 2363) +++ trunk/core/kernel/application.php (.../application.php) (revision 2368) @@ -300,23 +300,12 @@ $debugger->dumpVars($http_query->_Params); } - $this->ProcessSpecialURL(); $event_manager->ProcessRequest(); + $event_manager->RunRegularEvents(reBEFORE); $this->RequestProcessed = true; } /** - * Raise specific events based on non-standard (no described in config files) - * params given in url if no other params are given - * @todo by now is called before $event_manager->ProcessRequrest() method anyway - * @author Alex - */ - function ProcessSpecialURL() - { - - } - - /** * Actually runs the parser against current template and stores parsing result * * This method gets t variable passed to the script, loads the template given in t variable and @@ -393,8 +382,10 @@ $this->Phrases->UpdateCache(); flush(); - $this->RunScheduledEvents(); + $event_manager =& $this->recallObject('EventManager'); + $event_manager->RunRegularEvents(reAFTER); + $session =& $this->recallObject('Session'); $session->SaveData(); //$this->SaveBlocksCache(); @@ -579,52 +570,7 @@ $this->LinkVar($var, $ses_var, $default); return $this->GetVar($var); } - - /*function ExtractByMask($array, $mask, $key_id=1, $ret_mode=1) - { - $utils =& $this->recallObject('Utilities'); - return $utils->ExtractByMask($array, $mask, $key_id, $ret_mode); - } - - function GetSelectedIDs($mask, $format) - { - $http_query =& $this->recallObject('HTTPQuery'); - return $http_query->GetSelectedIDs($mask, $format); - } - - function GetSelectedIDsArray($mask, $value_mask="%s,") - { - $http_query =& $this->recallObject('HTTPQuery'); - return $http_query->GetSelectedIDsArray($mask, $value_mask); - }*/ - /** - * Returns configurtion option - * - * @param string $option - * @return string - * @access public - */ - /*function ConfigOption($option) - { - $config =& $this->recallObject('Configuration'); - return $config->Get($option); - }*/ - - /** - * Sets configuration option - * - * @param string $option - * @param string $value - * @return bool - * @access public - */ - /*function SetConfigOption($option,$value) - { - $config =& $this->recallObject('Configuration'); - return $config->Set($option, $value); - }*/ - function AddBlock($name, $tpl) { $this->cache[$name] = $tpl; @@ -651,67 +597,12 @@ return $a_tag->DoProcessTag(); } - /* DEFINETLY NEEDS TO BE MOVED AWAY!!!!! */ - /*var $email_body; - function Email($params) - { - $this->email_body = $this->ParseBlock($params); - $from = $this->GetVar('email_from'); - $to = $this->GetVar('email_to'); - $replay = $this->GetVar('email_replay'); - if ( $replay == "" ) $replay = $from; - $subject = $this->GetVar('email_subject'); - $charset = $this->GetVar('email_charset'); - // $display = $this->GetVar('email_display'); - $display = 0; - if (!isset($charset) || $charset == '') $charset = 'US-ASCII'; - $mime = $this->GetVar('email_mime'); - - if ($mime == 'yes') { - $mime_mail = new MIMEMail($to, $from, $subject, $charset); - $mime_mail->mailbody($this->email_body); - - if ($f_name = $this->GetVar('email_attach')) { - $full_path = DOC_ROOT.BASE_PATH.'/'.$f_name; - $data = ''; - if(file_exists($full_path)) { - $fd = fopen($full_path, "r"); - $data = fread($fd, filesize($full_path)); - fclose($fd); - } - else exit; - - $filename = $this->GetVar('email_attach_filename'); - $type = $this->GetVar('email_attach_type'); - - $mime_mail->attachfile_raw($data, $filename, $type); - $mime_mail->send(); - } - } - else { - $headers.="From: $from\n"; - $headers.="Reply-To: $replay\n"; - $headers.="Content-Type: text/html; charset=\"$charset\"\n"; - if ( $display == 1 ) { - echo "
"; - echo " from : $from"; - } - mail($to, $subject, $this->email_body, $headers); - } - }*/ - /** * Return ADODB Connection object * * Returns ADODB Connection object already connected to the project database, configurable in config.php * @access public - * @return ADODBConnection + * @return kDBConnection */ function &GetADODBConnection() { @@ -724,11 +615,6 @@ return $this->Parser->ParseBlock($params, $pass_params, $as_template); } - function &GetXMLFactory() - { - return $this->XMLFactory; - } - /** * Return href for template * @@ -1346,11 +1232,6 @@ return 0; } - function RunScheduledEvents() - { - - } - } ?> \ No newline at end of file
"; - echo " to : $to
"; - echo " replay : $replay
"; - echo " subject : $subject
"; - echo " this->email_body : $this->email_body
"; - echo " headers : $headers
"; - echo "