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

ork at devel.plogworld.net ork at devel.plogworld.net
Mon Apr 4 17:50:08 GMT 2005


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
+?>




More information about the pLog-svn mailing list