[Isocial-svn] SF.net SVN: isocial: [103] app
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <agu...@us...> - 2008-03-20 15:57:49
|
Revision: 103 http://isocial.svn.sourceforge.net/isocial/?rev=103&view=rev Author: aguidrevitch Date: 2008-03-20 08:57:54 -0700 (Thu, 20 Mar 2008) Log Message: ----------- using filtering feature (postfiltering) to replace PROJECT_NAME Modified Paths: -------------- app/application_controller.php Removed Paths: ------------- app/vendor/ext_template/ Modified: app/application_controller.php =================================================================== --- app/application_controller.php 2008-03-20 15:43:18 UTC (rev 102) +++ app/application_controller.php 2008-03-20 15:57:54 UTC (rev 103) @@ -3,7 +3,6 @@ require_once(AK_LIB_DIR.DS.'AkActionController.php'); require_once(AK_VENDOR_DIR.DS.'phputf8'.DS.'ucfirst.php'); require_once(AK_APP_DIR.DS.'vendor'.DS.'utf8_to_ascii'.DS.'utf8_to_ascii.php'); -require_once(AK_APP_DIR.DS.'vendor'.DS.'ext_template'.DS.'ExtPhpTemplateHandler.php'); /** * This file is application-wide controller file. You can put all @@ -25,14 +24,13 @@ var $app_helpers = array('AutoComplete', 'City'); var $current_user; - function _loadActionView () { - $this->Template =& new AkActionView($this->_getTemplateBasePath(), $this->Request->getParameters(), $this->Request->getController()); - - $this->Template->_controllerInstance =& $this; - $this->Template->_registerTemplateHandler('tpl','ExtPhpTemplateHandler'); - - return parent::_loadActionView(); + function __construct () { + $this->afterFilter('_replaceProjectName'); } + + function _replaceProjectName (&$controller) { + $controller->Response->body = str_replace('PROJECT_NAME', PROJECT_NAME, $controller->Response->body); + } function beforeAction ( $method = '' ) { $this->_validateLoginStatus(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |