[pLog-svn] r3621 - plog/trunk/class/summary/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Jun 19 04:24:24 GMT 2006


Author: mark
Date: 2006-06-19 04:24:23 +0000 (Mon, 19 Jun 2006)
New Revision: 3621

Modified:
   plog/trunk/class/summary/dao/summarystats.class.php
Log:
I think this way is more flexible.

Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php	2006-06-19 01:59:09 UTC (rev 3620)
+++ plog/trunk/class/summary/dao/summarystats.class.php	2006-06-19 04:24:23 UTC (rev 3621)
@@ -30,7 +30,7 @@
             $this->Model();
 
             $this->_now = $this->getNow();
-            $this->_startTime = $this->getStartTime();
+            $this->_startTime = $this->getStartTime( SUMMARY_DEFAULT_TIME_FENCE );
             
             // get the summary_page_show_max from config
             $config =& Config::getConfig();
@@ -368,11 +368,11 @@
 			return $now;
 		}
 
-		function getStartTime() {
+		function getStartTime( $duration ) {
 			include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
 
             $time = new Timestamp();
-            $time->subtractSeconds( SUMMARY_DEFAULT_TIME_FENCE * 24 * 60 * 60 );
+            $time->subtractSeconds( $duration * 24 * 60 * 60 );
 			$startTime = $time->getYear().$time->getMonth();
 			if( $time->getDay() < 10 )
 				$startTime .= "0";



More information about the pLog-svn mailing list