[pLog-svn] r607 - plog/trunk/class/template

Oscar Renalias oscar at renalias.net
Wed Dec 29 17:30:12 GMT 2004


Congrats, first commit ever... :-)

But how about these formatting differences in the diff? Is there a way 
we can avoid them? Otherwise diffs will grow really big and even worse, 
useless because it'll be really difficult to spot what was actually 
changed in between of so many tabs and spaces removed... Did your 
editor redo the formatting for you or did you do it yourself?

Oscar

On 29 Dec 2004, at 18:12, ork at devel.plogworld.net wrote:

> Author: ork
> Date: 2004-12-29 17:12:39 +0000 (Wed, 29 Dec 2004)
> New Revision: 607
>
> Modified:
>    plog/trunk/class/template/template.class.php
> Log:
> formatting and checked if the PHP4LOG constats were already defined
>
>
> Modified: plog/trunk/class/template/template.class.php
> ===================================================================
> --- plog/trunk/class/template/template.class.php	2004-12-29 14:52:15 
> UTC (rev 606)
> +++ plog/trunk/class/template/template.class.php	2004-12-29 17:12:39 
> UTC (rev 607)
> @@ -5,14 +5,15 @@
>       */
>
>
> -	include_once( 
> PLOG_CLASS_PATH.'class/template/smarty/Smarty.class.php' );
> +    include_once( 
> PLOG_CLASS_PATH.'class/template/smarty/Smarty.class.php' );
>      include_once( PLOG_CLASS_PATH.'class/config/config.class.php' );
>
>      /**
>       * path to the configuration file for log4php. This needs to be 
> done *before* we
>       * even include the LoggerManage from log4php
>       */
> -    define( "LOG4PHP_CONFIGURATION", 
> PLOG_CLASS_PATH."config/log4php.properties" );
> +    if ( !defined("LOG4PHP_CONFIGURATION") )
> +        define( "LOG4PHP_CONFIGURATION", 
> PLOG_CLASS_PATH."config/log4php.properties" );
>      include_once( 
> PLOG_CLASS_PATH."class/logger/log4php/LoggerManager.php" );
>
>      /**
> @@ -25,14 +26,14 @@
>       * It is recommended to use the TemplateService class to create 
> the Template objects.
>       */
>      class Template extends Smarty
> -	{
> +    {
>
> -		var $_templateFile;
> +        var $_templateFile;
>
>          // logger object
>          var $log;
>
> -    	/**
> +        /**
>           * Constructor. By default, activates the security mode of 
> Smarty,
>           * disabling for example any kind of PHP code embedded in the 
> Smarty templates.
>           *
> @@ -41,13 +42,13 @@
>           * contents or not.
>           * @param cacheLifeTime How many seconds we would like to 
> cache the objects
>           */
> -		function Template( $templateFile )
> +        function Template( $templateFile )
>          {
> -			// initialize logging
> -			$this->log =& LoggerManager::getLogger( get_class($this));
> +            // initialize logging
> +            $this->log =& LoggerManager::getLogger( get_class($this));
>
> -        	// create the Smarty object and set the security values
> -			$this->Smarty();
> +            // create the Smarty object and set the security values
> +            $this->Smarty();
>              $this->caching = false;
>              //$this->cache_lifetime =  $cacheLifetime;
>              $config =& Config::getConfig();
> @@ -61,7 +62,7 @@
>              // default folders
>              $this->compile_dir  = $config->getValue( 'temp_folder' );
>              $this->template_dir = $config->getValue( 
> 'template_folder' );
> -			$this->compile_check = $config->getValue( 'template_compile_check' 
> );
> +            $this->compile_check = $config->getValue( 
> 'template_compile_check' );
>              // this helps if php is running in 'safe_mode'
>              $this->use_sub_dirs = false;
>          }
> @@ -77,7 +78,7 @@
>           */
>          function setTemplateDir( $templateDir )
>          {
> -        	$this->template_dir = $templateDir;
> +            $this->template_dir = $templateDir;
>
>              return true;
>          }
> @@ -89,7 +90,7 @@
>           */
>          function getTemplateFile()
>          {
> -        	return $this->_templateFile;
> +            return $this->_templateFile;
>          }
>
>          /**
> @@ -99,7 +100,7 @@
>           */
>          function fetch()
>          {
> -        	return Smarty::fetch( $this->_templateFile );
> +            return Smarty::fetch( $this->_templateFile );
>          }
>
>          /**
> @@ -109,18 +110,18 @@
>           */
>          function display()
>          {
> -        	return Smarty::display( $this->_templateFile );
> +            return Smarty::display( $this->_templateFile );
>          }
> -		
> -		/**
> -		 * the Template object is by default not cached
> -		 *
> -		 * @param viewId Not used
> -		 * @return always false
> -		 */
> -		function isCached( $viewId )
> -		{
> -			return false;
> -		}
> +
> +        /**
> +         * the Template object is by default not cached
> +         *
> +         * @param viewId Not used
> +         * @return always false
> +         */
> +        function isCached( $viewId )
> +        {
> +            return false;
> +        }
>      }
>  ?>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>




More information about the pLog-svn mailing list