[pLog-svn] r1710 - plog/branches/plog-1.1-ben/class/view

Jon Daley plogworld at daley.snurgle.org
Mon Apr 4 18:05:30 GMT 2005


 	Can we initialize "now" whenever we want to use it later, ie. if 
isset(now) fails?  Hrm. I was going to say we probably don't need it most 
of the time, but I think we might -- since we are always trying to get 
articles if "post_date < now", right?

On Mon, 4 Apr 2005 ork at devel.plogworld.net wrote:

> Author: ork
> Date: 2005-04-04 17:50:08 +0000 (Mon, 04 Apr 2005)
> New Revision: 1710
>
> Modified:
>   plog/branches/plog-1.1-ben/class/view/blogview.class.php
> Log:
> disables now as default smarty var.. oscar, please check if this var must be present or if we can leave it out.. sourcing Timestamp.class.php takes a large amount of cpu time.. mainly because we're including quite large files .. if we can disable the 'now' setting here, we're saving time, but i'm not sure if we disable some feature somewhere :)
>
>
>
> Modified: plog/branches/plog-1.1-ben/class/view/blogview.class.php
> ===================================================================
> --- plog/branches/plog-1.1-ben/class/view/blogview.class.php	2005-04-04 17:47:18 UTC (rev 1709)
> +++ plog/branches/plog-1.1-ben/class/view/blogview.class.php	2005-04-04 17:50:08 UTC (rev 1710)
> @@ -6,7 +6,6 @@
>     include_once( PLOG_CLASS_PATH.'class/dao/articles.class.php' );
> 	include_once( PLOG_CLASS_PATH.'class/dao/archivelink.class.php' );
>     include_once( PLOG_CLASS_PATH.'class/dao/articles.class.php' );
> -    include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
>     include_once( PLOG_CLASS_PATH.'class/dao/mylinks.class.php' );
>     include_once( PLOG_CLASS_PATH.'class/misc/version.class.php' );
>     include_once( PLOG_CLASS_PATH.'class/dao/mylinkscategories.class.php' );
> @@ -79,7 +78,9 @@
>          * @private
>          */
>         function _getArchives()
> -        {
> +        {
> +            include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
> +
>             $archiveStats = $this->articles->getNumberPostsPerMonth( $this->_blogInfo->getId());
>
>             if( $archiveStats == '' )
> @@ -111,6 +112,8 @@
>          */
>         function _getRecentPosts()
>         {
> +            include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
> +
>             $blogSettings = $this->_blogInfo->getSettings();
>
>             $t = new Timestamp();
> @@ -130,6 +133,8 @@
>          */
>         function _getMonthPosts()
>         {
> +            include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
> +
>         	$t = new Timestamp();
>             $blogSettings = $this->_blogInfo->getSettings();
>             // the values for the month and the year have been included in the session
> @@ -199,9 +204,10 @@
> 			//
> 			// these things can go in since they do not mean much overhead when generating the view...
> 			//
> +
> 			$this->setValue( 'locale', $this->_blogInfo->getLocale());
> 			$this->setValue( 'version', Version::getVersion());
> -			$this->setValue( 'now', new Timestamp());
> +//			$this->setValue( 'now', new Timestamp());
> 			$this->setValue( 'blog', $this->_blogInfo );
> 			$this->setValue( 'url', $this->_blogInfo->getBlogRequestGenerator());
> 			$this->setValue( 'utils', $this->_blogInfo->getBlogRequestGenerator());
> @@ -212,4 +218,4 @@
> 			parent::render();
> 		}
>     }
> -?>
> \ No newline at end of file
> +?>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>

**************************************************************
*     Jonathan M. Daley     *   You've got to take the bull  *
*                           *         by the teeth.          *
*   jondaley at snurgle.org    *      -- Sam Goldwyn, Hollywood *
*                           *                      producer  *
* www.snurgle.org/~jondaley *                                *
**************************************************************



More information about the pLog-svn mailing list