[BUGFIX] Page Information shows incorrect number of total hits
[Packages/TYPO3.CMS.git] / typo3 / sysext / belog / class.tx_belog_webinfo.php
index d2dbf6c..9e25320 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -27,7 +27,7 @@
 /**
  * Extension classes for log display in Web > Info and Tools > Log modules
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
 
 
 
-
-
-require_once(PATH_t3lib.'class.t3lib_pagetree.php');
-require_once(PATH_t3lib.'class.t3lib_bedisplaylog.php');
-
 /**
  * Extending for Tools > Log. Just setting labels correctly
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tx_belog
  */
@@ -85,12 +80,10 @@ class logFunctions_ext extends t3lib_BEDisplayLog {
 
 
 
-require_once(PATH_t3lib.'class.t3lib_extobjbase.php');
-
 /**
  * Extending for Web>Info
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tx_belog
  */
@@ -176,7 +169,7 @@ class tx_belog_webinfo extends t3lib_extobjbase {
 
                        // Time:
                $starttime=0;
-               $endtime=time();
+               $endtime = $GLOBALS['EXEC_TIME'];
                switch($this->pObj->MOD_SETTINGS['log_time'])           {
                        case 0:
                                // This week
@@ -224,7 +217,7 @@ class tx_belog_webinfo extends t3lib_extobjbase {
                        }
 
                        if (is_array($this->pObj->be_user_Array))       {
-                               while(list(,$val)=each($this->pObj->be_user_Array))     {
+                               foreach ($this->pObj->be_user_Array as $val) {
                                        $selectUsers[]=$val['uid'];
                                }
                        }
@@ -233,6 +226,7 @@ class tx_belog_webinfo extends t3lib_extobjbase {
                } else {
                        $where_part.=' AND userid='.$GLOBALS['BE_USER']->user['uid'];   // Self user
                }
+               $lF->be_user_Array = &$this->pObj->be_user_Array;
 
                if ($GLOBALS['BE_USER']->workspace!==0) {
                        $where_part.=' AND workspace='.intval($GLOBALS['BE_USER']->workspace);
@@ -273,8 +267,8 @@ class tx_belog_webinfo extends t3lib_extobjbase {
        }
 }
 
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/belog/class.tx_belog_webinfo.php'])   {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/belog/class.tx_belog_webinfo.php']);
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/belog/class.tx_belog_webinfo.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/belog/class.tx_belog_webinfo.php']);
 }
 
 ?>
\ No newline at end of file