phpOpenTracker/phpOpenTracker/API/Plugin AccessStatistics.php,1.3,1.4

Sebastian Bergmann <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.cvs
Message-ID <[email protected]>
Update of /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/API/Plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv16329/phpOpenTracker/API/Plugin

Modified Files:
	AccessStatistics.php 
Log Message:
MFB

Index: AccessStatistics.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/API/Plugin/AccessStatistics.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AccessStatistics.php	22 Dec 2003 03:37:55 -0000	1.3
--- AccessStatistics.php	3 Jan 2004 14:40:22 -0000	1.4
***************
*** 57,69 ****
              $end   = $parameters['end']   ? $parameters['end']   : time();
  
!             for ($i = $parameters['start']; $i < $parameters['end']; $i += $parameters['interval']) {
!                 $correct = ((mktime(0, 0, 0, date('m', $i), date('d', $i) + 1, date('Y', $i))
!                            - mktime(0, 0, 0, date('m', $i), date('d', $i),     date('Y', $i)))
!                            * ($parameters['interval'] / 86400))
!                            - $parameters['interval'];
  
                  $result[$resultIndex]['interval'] = $this->getIntervalString(
!                   $i,
!                   $i + $parameters['interval'] + $correct
                  );
  
--- 57,70 ----
              $end   = $parameters['end']   ? $parameters['end']   : time();
  
!             for ($startTimestamp = $start; $startTimestamp < $end; $startTimestamp += $parameters['interval']) {
!                 $correct      = ((mktime(0, 0, 0, date('m', $startTimestamp), date('d', $startTimestamp) + 1, date('Y', $startTimestamp))
!                                 - mktime(0, 0, 0, date('m', $startTimestamp), date('d', $startTimestamp),     date('Y', $startTimestamp)))
!                                 * ($parameters['interval'] / 86400))
!                                 - $parameters['interval'];
!                 $endTimestamp = $startTimestamp + $parameters['interval'] + $correct - 1;
  
                  $result[$resultIndex]['interval'] = $this->getIntervalString(
!                   $startTimestamp,
!                   $endTimestamp
                  );
  
***************
*** 72,77 ****
                      'client_id'   => $parameters['client_id'],
                      'api_call'    => $parameters['api_call'],
!                     'start'       => $i,
!                     'end'         => $i + $parameters['interval'] + $correct,
                      'constraints' => $parameters['constraints'],
                      'internal'    => true
--- 73,78 ----
                      'client_id'   => $parameters['client_id'],
                      'api_call'    => $parameters['api_call'],
!                     'start'       => $startTimestamp,
!                     'end'         => $endTimestamp,
                      'constraints' => $parameters['constraints'],
                      'internal'    => true
***************
*** 79,83 ****
                  );
  
!                 $i += $correct;
                  $resultIndex++;
              }
--- 80,84 ----
                  );
  
!                 $startTimestamp += $correct;
                  $resultIndex++;
              }




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.