diff --git a/TODO b/TODO index 61e82cc2a5d0e36abaef63a9edeab297372741bc..403e284251226f1fa0199300c53c6fe6631976d4 100644 --- a/TODO +++ b/TODO @@ -1,18 +1,8 @@ Bugs -- add width+height to sparklines - google chrome/safari bug with calendar + language dropdown http://4.bp.blogspot.com/_B0Ay-jl4bcM/SLRqaqKz7jI/AAAAAAAAD-U/GfMiqCImtD8/s1600-h/piwik.png -- site selector is hidden first, then shown - WRONG::: 147 sites Internet différents (utilisant 147 différentes adresses) -- Undefined text for "loading data..." on piwik.org demo! -- we should call login->logout in installation->welcome instead of duplicating code -- fix images in sub tables when JS loaded -- wrong display seconds 42 min 2563 s total time spent by the visitors -- check that when online archiving disabled, take the last valid archiving -- ACTIONS limit seem not right, seem limited to 50 instead of 200 for root -- editing site web with single quote bugs in siteAdmin??? - something is wrong in JS calendar when year selected -- API request shouldnt be SO DataTable aware (fixed with ResponseBuilder??) To clean - rename LogStats in Tracker diff --git a/config/global.ini.php b/config/global.ini.php index 8c3fd49ddafb550d7cca04218b82f1a601e6122e..16f6db10e8e18ff78b7dd35367613725ad55f777 100755 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -16,7 +16,7 @@ adapter = PDO_MYSQL ; PDO_MYSQL or MYSQLI host = localhost username = root password = -dbname = piwik_tests11 +dbname = piwik_tests tables_prefix = piwiktests_ port = 3306 adapter = PDO_MYSQL @@ -59,7 +59,7 @@ PluginsInstalled[] = UsersManager PluginsInstalled[] = SitesManager PluginsInstalled[] = Installation -[Plugins_LogStats] +[Plugins_Tracker] [Debug] @@ -75,7 +75,7 @@ enable_sql_profiler = false ; Time in seconds after which an archive will be computed again. ; This setting is used only for today's statistics. ; Defaults to 10 seconds so that by default, Piwik provides real time reporting. -time_before_archive_considered_outdated = 10 +time_before_archive_considered_outdated = 3600 ; When loading piwik interface, we redirect the user to 'yesterday' statistics by default ; Possible values: yesterday, today, or any YYYY-MM-DD @@ -107,7 +107,7 @@ minimum_php_version = 5.1.3 minimum_memory_limit = 128 -[LogStats] +[Tracker] ; set to 0 if you want to stop tracking the visitors. Useful if you need to stop all the connections on the DB. record_statistics = 1 diff --git a/core/Cookie.php b/core/Cookie.php index 7bcbe7b92c070bf45d230cb833c9a69a6db8dad1..192ebc3b3b77f0c4ab7ea49ddd73be129b90a47c 100644 --- a/core/Cookie.php +++ b/core/Cookie.php @@ -264,7 +264,7 @@ class Piwik_Cookie } -//$c = new Piwik_Cookie( 'piwik_logstats', 86400); +//$c = new Piwik_Cookie( 'piwik_Tracker', 86400); //echo $c; //$c->set(1,1); //$c->set('test',1); diff --git a/core/FrontController.php b/core/FrontController.php index 8d16f31980bc5d70b86ea3428c7d96314035e382..6ce8922a31446d7b8fb1e48df08ccde5054d910e 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -283,7 +283,7 @@ class Piwik_FrontController Piwik::raiseMemoryLimitIfNecessary(); } catch(Exception $e) { - Piwik_ExitWithMessage($e->getMessage()); + Piwik_ExitWithMessage($e->getMessage(), $e->getTraceAsString()); } } diff --git a/core/Plugin.php b/core/Plugin.php index 9d49a19a96720a2a1931eba6ea7c89fd4057addf..dfd7ff3c8898dba21058af133eecfcf71e94d844 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -26,7 +26,7 @@ abstract class Piwik_Plugin * 'author_homepage' => string // author homepage (or email "mailto:youremail@example.org") * 'homepage' => string // plugin homepage * 'version' => string // plugin version number - * 'LogStatsPlugin' => bool // should we load this plugin during the stats logging process? + * 'TrackerPlugin' => bool // should we load this plugin during the stats logging process? */ abstract function getInformation(); diff --git a/core/PluginsManager.php b/core/PluginsManager.php index 9d0d4220104f992f1d70624236d6c681c74627e8..c8ae201916e5d86522b0ac623bd60f16edcb84a5 100644 --- a/core/PluginsManager.php +++ b/core/PluginsManager.php @@ -88,15 +88,15 @@ class Piwik_PluginsManager } try{ - $pluginsLogStats = Zend_Registry::get('config')->Plugins_LogStats->Plugins_LogStats; - if(!is_null($pluginsLogStats)) + $pluginsTracker = Zend_Registry::get('config')->Plugins_Tracker->Plugins_Tracker; + if(!is_null($pluginsTracker)) { - $pluginsLogStats = $pluginsLogStats->toArray(); - $key = array_search($pluginName,$pluginsLogStats); + $pluginsTracker = $pluginsTracker->toArray(); + $key = array_search($pluginName,$pluginsTracker); if($key !== false) { - unset($pluginsLogStats[$key]); - Zend_Registry::get('config')->Plugins_LogStats = $pluginsLogStats; + unset($pluginsTracker[$key]); + Zend_Registry::get('config')->Plugins_Tracker = $pluginsTracker; } } } catch(Exception $e) {} @@ -261,7 +261,7 @@ class Piwik_PluginsManager $path = 'plugins/' . $pluginFileName; - // case LogStats, we don't throw the exception, we don't want to add the Zend overhead + // case Tracker, we don't throw the exception, we don't want to add the Zend overhead if(class_exists('Zend_Loader') && !Zend_Loader::isReadable($path)) { @@ -365,7 +365,7 @@ class Piwik_PluginsManager */ private function loadTranslation( $plugin, $langCode ) { - // we are certainly in LogStats mode, Zend is not loaded + // we are certainly in Tracker mode, Zend is not loaded if(!class_exists('Zend_Loader')) { return ; @@ -418,7 +418,7 @@ class Piwik_PluginsManager { if(!class_exists('Zend_Registry')) { - throw new Exception("Not possible to list installed plugins (case LogStats module)"); + throw new Exception("Not possible to list installed plugins (case Tracker module)"); } if(!is_null(Zend_Registry::get('config')->PluginsInstalled->PluginsInstalled)) { @@ -450,22 +450,22 @@ class Piwik_PluginsManager $information = $plugin->getInformation(); // if the plugin is to be loaded during the statistics logging - if(isset($information['LogStatsPlugin']) - && $information['LogStatsPlugin'] === true) + if(isset($information['TrackerPlugin']) + && $information['TrackerPlugin'] === true) { - $pluginsLogStats = Zend_Registry::get('config')->Plugins_LogStats->Plugins_LogStats; - if(is_null($pluginsLogStats)) + $pluginsTracker = Zend_Registry::get('config')->Plugins_Tracker->Plugins_Tracker; + if(is_null($pluginsTracker)) { - $pluginsLogStats = array(); + $pluginsTracker = array(); } else { - $pluginsLogStats = $pluginsLogStats->toArray(); + $pluginsTracker = $pluginsTracker->toArray(); } - if(!in_array($pluginName, $pluginsLogStats)) + if(!in_array($pluginName, $pluginsTracker)) { - $pluginsLogStats[] = $pluginName; - Zend_Registry::get('config')->Plugins_LogStats = $pluginsLogStats; + $pluginsTracker[] = $pluginName; + Zend_Registry::get('config')->Plugins_Tracker = $pluginsTracker; } } } diff --git a/core/LogStats.php b/core/Tracker.php similarity index 85% rename from core/LogStats.php rename to core/Tracker.php index c0a26c21de3a1bed4c4b310e8df7f531613023b5..c2a69293c83f4dbe121c7f17333be276876e79b8 100644 --- a/core/LogStats.php +++ b/core/Tracker.php @@ -4,9 +4,9 @@ * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later - * @version $Id: LogStats.php 575 2008-07-26 23:08:32Z matt $ + * @version $Id: Tracker.php 575 2008-07-26 23:08:32Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** @@ -42,9 +42,9 @@ * Configuration options for the statsLogEngine module: * - use_cookie ; defines if we try to get/set a cookie to help recognize a unique visitor * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -class Piwik_LogStats +class Piwik_Tracker { protected $stateValid; @@ -52,7 +52,7 @@ class Piwik_LogStats /** * - * @var Piwik_LogStats_Db + * @var Piwik_Tracker_Db */ static protected $db = null; @@ -83,7 +83,7 @@ class Piwik_LogStats Piwik_PostEvent('Tracker.createDatabase', $db); if(is_null($db)) { - $configDb = Piwik_LogStats_Config::getInstance()->database; + $configDb = Piwik_Tracker_Config::getInstance()->database; // we decode the password. Password is html encoded because it's enclosed between " double quotes $configDb['password'] = htmlspecialchars_decode($configDb['password']); @@ -93,7 +93,7 @@ class Piwik_LogStats $configDb['port'] = '3306'; } - $db = new Piwik_LogStats_Db( $configDb['host'], + $db = new Piwik_Tracker_Db( $configDb['host'], $configDb['username'], $configDb['password'], $configDb['dbname'], @@ -119,17 +119,17 @@ class Piwik_LogStats private function initProcess() { try{ - $pluginsLogStats = Piwik_LogStats_Config::getInstance()->Plugins_LogStats; - if(is_array($pluginsLogStats) - && count($pluginsLogStats) != 0) + $pluginsTracker = Piwik_Tracker_Config::getInstance()->Plugins_Tracker; + if(is_array($pluginsTracker) + && count($pluginsTracker) != 0) { Piwik_PluginsManager::getInstance()->doNotLoadAlwaysActivatedPlugins(); - Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsLogStats['Plugins_LogStats'] ); + Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsTracker['Plugins_Tracker'] ); } } catch(Exception $e) { } - $saveStats = Piwik_LogStats_Config::getInstance()->LogStats['record_statistics']; + $saveStats = Piwik_Tracker_Config::getInstance()->Tracker['record_statistics']; if($saveStats == 0) { @@ -141,7 +141,7 @@ class Piwik_LogStats $this->setState(self::STATE_NO_GET_VARIABLE); } - $downloadVariableName = Piwik_LogStats_Config::getInstance()->LogStats['download_url_var_name']; + $downloadVariableName = Piwik_Tracker_Config::getInstance()->Tracker['download_url_var_name']; $urlDownload = Piwik_Common::getRequestVar( $downloadVariableName, '', 'string'); if( !empty($urlDownload) ) @@ -153,7 +153,7 @@ class Piwik_LogStats $this->setUrlToRedirect ( $urlDownload); } - $outlinkVariableName = Piwik_LogStats_Config::getInstance()->LogStats['outlink_url_var_name']; + $outlinkVariableName = Piwik_Tracker_Config::getInstance()->Tracker['outlink_url_var_name']; $urlOutlink = Piwik_Common::getRequestVar( $outlinkVariableName, '', 'string'); if( !empty($urlOutlink) ) @@ -193,23 +193,23 @@ class Piwik_LogStats } /** - * Returns the LogStats_Visit object. - * This method can be overwritten so that we use a different LogStats_Visit object + * Returns the Tracker_Visit object. + * This method can be overwritten so that we use a different Tracker_Visit object * - * @return Piwik_LogStats_Visit + * @return Piwik_Tracker_Visit */ protected function getNewVisitObject() { $visit = null; - Piwik_PostEvent('LogStats.getNewVisitObject', $visit); + Piwik_PostEvent('Tracker.getNewVisitObject', $visit); if(is_null($visit)) { - $visit = new Piwik_LogStats_Visit(); + $visit = new Piwik_Tracker_Visit(); } - elseif(!($visit instanceof Piwik_LogStats_Visit_Interface )) + elseif(!($visit instanceof Piwik_Tracker_Visit_Interface )) { - throw new Exception("The Visit object set in the plugin must implement Piwik_LogStats_Visit_Interface"); + throw new Exception("The Visit object set in the plugin must implement Piwik_Tracker_Visit_Interface"); } $visit->setDb(self::$db); @@ -270,7 +270,7 @@ class Piwik_LogStats if($GLOBALS['DEBUGPIWIK'] === true) { - Piwik::printSqlProfilingReportLogStats(self::$db); + Piwik::printSqlProfilingReportTracker(self::$db); } self::disconnectDb(); diff --git a/core/LogStats/Action.php b/core/Tracker/Action.php similarity index 90% rename from core/LogStats/Action.php rename to core/Tracker/Action.php index effc0409f9678c1c432cd38d7f40df607b313c0a..2fc7b322f142ece742550a1e9ad1d0b71f8aec80 100644 --- a/core/LogStats/Action.php +++ b/core/Tracker/Action.php @@ -6,16 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Action.php 558 2008-07-20 23:10:38Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** * Interface of the Action object. * New Action classes can be defined in plugins and used instead of the default one. * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -interface Piwik_LogStats_Action_Interface { +interface Piwik_Tracker_Action_Interface { public function getActionId(); public function record( $idVisit, $idRefererAction, $timeSpentRefererAction ); public function setIdSite( $idSite ); @@ -41,9 +41,9 @@ interface Piwik_LogStats_Action_Interface { * PLUGIN_IDEA - An action hit by a visitor is associated to the HTML title of the page that triggered the action and this HTML title is displayed in the interface * * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -class Piwik_LogStats_Action implements Piwik_LogStats_Action_Interface +class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface { private $actionName; private $url; @@ -59,24 +59,24 @@ class Piwik_LogStats_Action implements Piwik_LogStats_Action_Interface const TYPE_OUTLINK = 2; /** - * @param Piwik_LogStats_Db Database object to be used + * @param Piwik_Tracker_Db Database object to be used */ function __construct( $db ) { $this->actionName = Piwik_Common::getRequestVar( 'action_name', '', 'string'); - $downloadVariableName = Piwik_LogStats_Config::getInstance()->LogStats['download_url_var_name']; + $downloadVariableName = Piwik_Tracker_Config::getInstance()->Tracker['download_url_var_name']; $this->downloadUrl = Piwik_Common::getRequestVar( $downloadVariableName, '', 'string'); - $outlinkVariableName = Piwik_LogStats_Config::getInstance()->LogStats['outlink_url_var_name']; + $outlinkVariableName = Piwik_Tracker_Config::getInstance()->Tracker['outlink_url_var_name']; $this->outlinkUrl = Piwik_Common::getRequestVar( $outlinkVariableName, '', 'string'); - $nameVariableName = Piwik_LogStats_Config::getInstance()->LogStats['download_outlink_name_var']; + $nameVariableName = Piwik_Tracker_Config::getInstance()->Tracker['download_outlink_name_var']; $this->nameDownloadOutlink = Piwik_Common::getRequestVar( $nameVariableName, '', 'string'); $this->url = Piwik_Common::getRequestVar( 'url', '', 'string'); $this->db = $db; - $this->defaultActionName = Piwik_LogStats_Config::getInstance()->LogStats['default_action_name']; + $this->defaultActionName = Piwik_Tracker_Config::getInstance()->Tracker['default_action_name']; } @@ -182,7 +182,7 @@ class Piwik_LogStats_Action implements Piwik_LogStats_Action_Interface */ // get the delimiter, by default '/' - $actionCategoryDelimiter = Piwik_LogStats_Config::getInstance()->General['action_category_delimiter']; + $actionCategoryDelimiter = Piwik_Tracker_Config::getInstance()->General['action_category_delimiter']; // case the name is an URL we dont clean the name the same way if(Piwik_Common::isLookLikeUrl($actionName)) diff --git a/core/LogStats/Config.php b/core/Tracker/Config.php similarity index 90% rename from core/LogStats/Config.php rename to core/Tracker/Config.php index 65c38d9144f58e728e1cb46bceeeaa0a7f413ea9..f6e296d02a73788365875f94a85357f93d9c513d 100644 --- a/core/LogStats/Config.php +++ b/core/Tracker/Config.php @@ -6,7 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Config.php 450 2008-04-20 22:33:27Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** @@ -14,21 +14,21 @@ * * This is essentially a simple version of Zend_Config that we wrote * because of performance reasons. - * The LogStats module can't afford a dependency with the Zend_Framework. + * The Tracker module can't afford a dependency with the Zend_Framework. * * It's using the php.net/parse_ini_file function to parse the configuration files. * It can be used to access both user config.ini.php and piwik global.ini.php config file. * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -class Piwik_LogStats_Config +class Piwik_Tracker_Config { static private $instance = null; /** * Returns singleton * - * @return Piwik_LogStats_Config + * @return Piwik_Tracker_Config */ static public function getInstance() { diff --git a/core/LogStats/Db.php b/core/Tracker/Db.php similarity index 96% rename from core/LogStats/Db.php rename to core/Tracker/Db.php index 2f62116bdde58d37bbf7e78299a7e4842ff64723..13d23d1a26be9b8b45c0403f1d6eceb5048b13b2 100644 --- a/core/LogStats/Db.php +++ b/core/Tracker/Db.php @@ -6,17 +6,17 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Db.php 522 2008-06-11 00:31:03Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** * Simple database PDO wrapper. - * We can't afford to have a dependency with the Zend_Db module in LogStats. + * We can't afford to have a dependency with the Zend_Db module in Tracker. * We wrote this simple class * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -class Piwik_LogStats_Db +class Piwik_Tracker_Db { private $connection = null; private $username; @@ -56,7 +56,7 @@ class Piwik_LogStats_Db * Enables the SQL profiling. * For each query, saves in the DB the time spent on this query. * Very useful to see the slow query under heavy load. - * You can then use Piwik::printSqlProfilingReportLogStats(); + * You can then use Piwik::printSqlProfilingReportTracker(); * to display the SQLProfiling report and see which queries take time, etc. */ static public function enableProfiling() @@ -121,7 +121,7 @@ class Piwik_LogStats_Db { static $prefix; if (!isset($prefix)) { - $prefix = Piwik_LogStats_Config::getInstance()->database['tables_prefix']; + $prefix = Piwik_Tracker_Config::getInstance()->database['tables_prefix']; } return $prefix . $suffix; } diff --git a/core/LogStats/Generator.php b/core/Tracker/Generator.php similarity index 92% rename from core/LogStats/Generator.php rename to core/Tracker/Generator.php index dfc6b03052826410857e3df4d21f23c83e4ecff5..cd65d1e9f622b2843299c10feeac262385da2202 100644 --- a/core/LogStats/Generator.php +++ b/core/Tracker/Generator.php @@ -6,7 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Generator.php 492 2008-05-23 01:08:12Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** @@ -33,14 +33,14 @@ * - HTML title * * - * @package Piwik_LogStats - * @subpackage Piwik_LogStats_Generator + * @package Piwik_Tracker + * @subpackage Piwik_Tracker_Generator * * "Le Generator, il est trop Fort!" * - Random fan */ -class Piwik_LogStats_Generator +class Piwik_Tracker_Generator { /** * GET parameters array of values to be used for the current visit @@ -126,7 +126,7 @@ class Piwik_LogStats_Generator // setup database Piwik::createDatabaseObject(); - Piwik_LogStats_Db::enableProfiling(); + Piwik_Tracker_Db::enableProfiling(); $this->timestampToUse = time(); } @@ -218,7 +218,7 @@ class Piwik_LogStats_Generator public function disableProfiler() { $this->profiling = false; - Piwik_LogStats_Db::disableProfiling(); + Piwik_Tracker_Db::disableProfiling(); } /** @@ -229,10 +229,10 @@ class Piwik_LogStats_Generator */ public function end() { - Piwik_LogStats::disconnectDb(); + Piwik_Tracker::disconnectDb(); if($this->profiling) { - Piwik::printSqlProfilingReportLogStats(); + Piwik::printSqlProfilingReportTracker(); } } @@ -285,8 +285,8 @@ class Piwik_LogStats_Generator */ // we get the name of the Download/outlink variables $downloadOrOutlink = array( - Piwik_LogStats_Config::getInstance()->LogStats['download_url_var_name'], - Piwik_LogStats_Config::getInstance()->LogStats['outlink_url_var_name'], + Piwik_Tracker_Config::getInstance()->Tracker['download_url_var_name'], + Piwik_Tracker_Config::getInstance()->Tracker['outlink_url_var_name'], ); // we have a 20% chance to add a download or outlink variable to the URL $this->addParam('piwik_downloadOrOutlink', $downloadOrOutlink); @@ -294,9 +294,9 @@ class Piwik_LogStats_Generator // we get the variables name for the campaign parameters $campaigns = array( - Piwik_LogStats_Config::getInstance()->LogStats['campaign_var_name'], - Piwik_LogStats_Config::getInstance()->LogStats['newsletter_var_name'], - Piwik_LogStats_Config::getInstance()->LogStats['partner_var_name'], + Piwik_Tracker_Config::getInstance()->Tracker['campaign_var_name'], + Piwik_Tracker_Config::getInstance()->Tracker['newsletter_var_name'], + Piwik_Tracker_Config::getInstance()->Tracker['partner_var_name'], ); // we generate a campaign in the URL in 3/18 % of the generated URls $this->addParam('piwik_vars_campaign', $campaigns); @@ -360,7 +360,7 @@ class Piwik_LogStats_Generator { $nbActions = mt_rand(1, $nbActionsMaxPerVisit); - Piwik_LogStats_Generator_Visit::setTimestampToUse($this->getTimestampToUse()); + Piwik_Tracker_Generator_Visit::setTimestampToUse($this->getTimestampToUse()); $this->generateNewVisit(); for($j = 1; $j <= $nbActions; $j++) @@ -420,9 +420,9 @@ class Piwik_LogStats_Generator { // we don't keep the previous action values // reinit them to empty string - $this->setCurrentRequest( Piwik_LogStats_Config::getInstance()->LogStats['download_outlink_name_var'],''); - $this->setCurrentRequest( Piwik_LogStats_Config::getInstance()->LogStats['download_url_var_name'],''); - $this->setCurrentRequest( Piwik_LogStats_Config::getInstance()->LogStats['outlink_url_var_name'],''); + $this->setCurrentRequest( Piwik_Tracker_Config::getInstance()->Tracker['download_outlink_name_var'],''); + $this->setCurrentRequest( Piwik_Tracker_Config::getInstance()->Tracker['download_url_var_name'],''); + $this->setCurrentRequest( Piwik_Tracker_Config::getInstance()->Tracker['outlink_url_var_name'],''); $this->setCurrentRequest( 'action_name', ''); // generate new url referer ; case the visitor stays more than 30min @@ -445,10 +445,10 @@ class Piwik_LogStats_Generator $url .= '?'. $urlVars . '=' . $urlValue; // for a campaign of the CPC kind, we sometimes generate a keyword - if($urlVars == Piwik_LogStats_Config::getInstance()->LogStats['campaign_var_name'] + if($urlVars == Piwik_Tracker_Config::getInstance()->Tracker['campaign_var_name'] && mt_rand(0,1)==0) { - $url .= '&'. Piwik_LogStats_Config::getInstance()->LogStats['campaign_keyword_var_name'] + $url .= '&'. Piwik_Tracker_Config::getInstance()->Tracker['campaign_keyword_var_name'] . '=' . $this->getRandomString(6,3,'ALL');; } } @@ -474,7 +474,7 @@ class Piwik_LogStats_Generator { $nameDownload = $this->getRandomString(6,3,'ALL'); - $this->setCurrentRequest( Piwik_LogStats_Config::getInstance()->LogStats['download_outlink_name_var'] + $this->setCurrentRequest( Piwik_Tracker_Config::getInstance()->Tracker['download_outlink_name_var'] , $nameDownload); } } @@ -648,7 +648,7 @@ class Piwik_LogStats_Generator /** * Saves the visit * - replaces GET and REQUEST by the fake generated request - * - load the LogStats class and call the method to launch the recording + * - load the Tracker class and call the method to launch the recording * * This will save the visit in the database * @@ -657,10 +657,10 @@ class Piwik_LogStats_Generator protected function saveVisit() { $this->setFakeRequest(); - $process = new Piwik_LogStats_Generator_LogStats; + $process = new Piwik_Tracker_Generator_Tracker; $process->main(); } } -require_once "Generator/LogStats.php"; +require_once "Generator/Tracker.php"; require_once "Generator/Visit.php"; diff --git a/core/LogStats/Generator/LogStats.php b/core/Tracker/Generator/Tracker.php similarity index 62% rename from core/LogStats/Generator/LogStats.php rename to core/Tracker/Generator/Tracker.php index 92a8d29c39d0bd6842751ca7804f237c24dd3e60..db3ee22272569b1bf6ad1e810c556935534908d8 100644 --- a/core/LogStats/Generator/LogStats.php +++ b/core/Tracker/Generator/Tracker.php @@ -6,20 +6,20 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Generator.php 404 2008-03-23 01:09:59Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** - * Fake Piwik_LogStats that: + * Fake Piwik_Tracker that: * - overwrite the sendHeader method so that no headers are sent. * - doesn't print the 1pixel transparent GIF at the end of the visit process - * - overwrite the logstat_visit object to use so we use our own logstats_visit @see Piwik_LogStats_Generator_Visit + * - overwrite the Tracker Visit object to use so we use our own Tracker_visit @see Piwik_Tracker_Generator_Visit * - * @package Piwik_LogStats - * @subpackage Piwik_LogStats_Generator + * @package Piwik_Tracker + * @subpackage Piwik_Tracker_Generator */ -class Piwik_LogStats_Generator_LogStats extends Piwik_LogStats +class Piwik_Tracker_Generator_Tracker extends Piwik_Tracker { /** * Does nothing instead of sending headers @@ -40,13 +40,13 @@ class Piwik_LogStats_Generator_LogStats extends Piwik_LogStats } /** - * Returns our 'generator home made' Piwik_LogStats_Generator_Visit object. + * Returns our 'generator home made' Piwik_Tracker_Generator_Visit object. * - * @return Piwik_LogStats_Generator_Visit + * @return Piwik_Tracker_Generator_Visit */ protected function getNewVisitObject() { - $visit = new Piwik_LogStats_Generator_Visit(); + $visit = new Piwik_Tracker_Generator_Visit(); $visit->setDb(self::$db); return $visit; } diff --git a/core/LogStats/Generator/Visit.php b/core/Tracker/Generator/Visit.php similarity index 79% rename from core/LogStats/Generator/Visit.php rename to core/Tracker/Generator/Visit.php index 01396d126ecba95f333ef6ebda044559c3c6b2f1..41535f045c3b03121b61e0dc50344594edc50d6c 100644 --- a/core/LogStats/Generator/Visit.php +++ b/core/Tracker/Generator/Visit.php @@ -6,19 +6,19 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Generator.php 404 2008-03-23 01:09:59Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ /** - * Fake Piwik_LogStats_Visit class that overwrite all the Time related method to be able + * Fake Piwik_Tracker_Visit class that overwrite all the Time related method to be able * to setup a given timestamp for the generated visitor and actions. * * - * @package Piwik_LogStats - * @subpackage Piwik_LogStats_Generator + * @package Piwik_Tracker + * @subpackage Piwik_Tracker_Generator */ -class Piwik_LogStats_Generator_Visit extends Piwik_LogStats_Visit +class Piwik_Tracker_Generator_Visit extends Piwik_Tracker_Visit { static protected $timestampToUse; diff --git a/core/LogStats/Visit.php b/core/Tracker/Visit.php similarity index 91% rename from core/LogStats/Visit.php rename to core/Tracker/Visit.php index 68714cd12957716deac7e7248f0be802aada15ad..bf66f079603b55e98c663eb7f913c1df52ec2130 100644 --- a/core/LogStats/Visit.php +++ b/core/Tracker/Visit.php @@ -6,11 +6,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Visit.php 575 2008-07-26 23:08:32Z matt $ * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -interface Piwik_LogStats_Visit_Interface { +interface Piwik_Tracker_Visit_Interface { function handle(); function setDb($db); } @@ -26,10 +26,10 @@ interface Piwik_LogStats_Visit_Interface { * Whether a visit is NEW or KNOWN we also save the action in the DB. * One request to the piwik.php script is associated to one action. * - * @package Piwik_LogStats + * @package Piwik_Tracker */ -class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface +class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface { protected $cookieLog = null; protected $visitorInfo = array(); @@ -92,7 +92,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface protected function isExcluded() { $excluded = 0; - Piwik_PostEvent('LogStats.Visit.isExcluded', $excluded); + Piwik_PostEvent('Tracker.Visit.isExcluded', $excluded); if($excluded) { printDebug("Visitor excluded."); @@ -103,12 +103,12 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface } /** - * Returns the cookie name used for the Piwik LogStats cookie + * Returns the cookie name used for the Piwik Tracker cookie * @return string */ protected function getCookieName() { - return Piwik_LogStats_Config::getInstance()->LogStats['cookie_name'] . $this->idsite; + return Piwik_Tracker_Config::getInstance()->Tracker['cookie_name'] . $this->idsite; } @@ -151,12 +151,12 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface * We make sure all the data that should saved in the cookie is available. */ - if( false !== ($idVisitor = $this->cookieLog->get( Piwik_LogStats::COOKIE_INDEX_IDVISITOR )) ) + if( false !== ($idVisitor = $this->cookieLog->get( Piwik_Tracker::COOKIE_INDEX_IDVISITOR )) ) { - $timestampLastAction = $this->cookieLog->get( Piwik_LogStats::COOKIE_INDEX_TIMESTAMP_LAST_ACTION ); - $timestampFirstAction = $this->cookieLog->get( Piwik_LogStats::COOKIE_INDEX_TIMESTAMP_FIRST_ACTION ); - $idVisit = $this->cookieLog->get( Piwik_LogStats::COOKIE_INDEX_ID_VISIT ); - $idLastAction = $this->cookieLog->get( Piwik_LogStats::COOKIE_INDEX_ID_LAST_ACTION ); + $timestampLastAction = $this->cookieLog->get( Piwik_Tracker::COOKIE_INDEX_TIMESTAMP_LAST_ACTION ); + $timestampFirstAction = $this->cookieLog->get( Piwik_Tracker::COOKIE_INDEX_TIMESTAMP_FIRST_ACTION ); + $idVisit = $this->cookieLog->get( Piwik_Tracker::COOKIE_INDEX_ID_VISIT ); + $idLastAction = $this->cookieLog->get( Piwik_Tracker::COOKIE_INDEX_ID_LAST_ACTION ); if( $timestampLastAction !== false && is_numeric($timestampLastAction) && $timestampFirstAction !== false && is_numeric($timestampFirstAction) @@ -298,7 +298,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface protected function isLastActionInTheSameVisit() { return $this->visitorInfo['visit_last_action_time'] - >= ($this->getCurrentTimestamp() - Piwik_LogStats_Config::getInstance()->LogStats['visit_standard_length']); + >= ($this->getCurrentTimestamp() - Piwik_Tracker_Config::getInstance()->Tracker['visit_standard_length']); } /** @@ -359,23 +359,23 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface printDebug("We manage the cookie..."); // idcookie has been generated in handleNewVisit or we simply propagate the old value - $this->cookieLog->set( Piwik_LogStats::COOKIE_INDEX_IDVISITOR, + $this->cookieLog->set( Piwik_Tracker::COOKIE_INDEX_IDVISITOR, $this->visitorInfo['visitor_idcookie'] ); // the last action timestamp is the current timestamp - $this->cookieLog->set( Piwik_LogStats::COOKIE_INDEX_TIMESTAMP_LAST_ACTION, + $this->cookieLog->set( Piwik_Tracker::COOKIE_INDEX_TIMESTAMP_LAST_ACTION, $this->visitorInfo['visit_last_action_time'] ); // the first action timestamp is the timestamp of the first action of the current visit - $this->cookieLog->set( Piwik_LogStats::COOKIE_INDEX_TIMESTAMP_FIRST_ACTION, + $this->cookieLog->set( Piwik_Tracker::COOKIE_INDEX_TIMESTAMP_FIRST_ACTION, $this->visitorInfo['visit_first_action_time'] ); // the idvisit has been generated by mysql in handleNewVisit or simply propagated here - $this->cookieLog->set( Piwik_LogStats::COOKIE_INDEX_ID_VISIT, + $this->cookieLog->set( Piwik_Tracker::COOKIE_INDEX_ID_VISIT, $this->visitorInfo['idvisit'] ); // the last action ID is the current exit idaction - $this->cookieLog->set( Piwik_LogStats::COOKIE_INDEX_ID_LAST_ACTION, + $this->cookieLog->set( Piwik_Tracker::COOKIE_INDEX_ID_LAST_ACTION, $this->visitorInfo['visit_exit_idaction'] ); $this->cookieLog->save(); @@ -467,7 +467,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface $returningVisitor = 0; } - $defaultTimeOnePageVisit = Piwik_LogStats_Config::getInstance()->LogStats['default_time_one_page_visit']; + $defaultTimeOnePageVisit = Piwik_Tracker_Config::getInstance()->Tracker['default_time_one_page_visit']; $userInfo = $this->getUserSettingsInformation(); $country = Piwik_Common::getCountry($userInfo['location_browser_lang']); @@ -523,7 +523,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface 'location_continent' => $continent, ); - Piwik_PostEvent('LogStats.newVisitorInformation', $informationToSave); + Piwik_PostEvent('Tracker.newVisitorInformation', $informationToSave); $fields = implode(", ", array_keys($informationToSave)); $values = substr(str_repeat( "?,",count($informationToSave)),0,-1); @@ -550,20 +550,20 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface * Returns an object able to handle the current action * Plugins can return an override Action that for example, does not record the action in the DB * - * @return Piwik_LogStats_Action child or fake but with same public interface + * @return Piwik_Tracker_Action child or fake but with same public interface */ protected function getActionObject() { $action = null; - Piwik_PostEvent('LogStats.newAction', $action); + Piwik_PostEvent('Tracker.newAction', $action); if(is_null($action)) { - $action = new Piwik_LogStats_Action( $this->db ); + $action = new Piwik_Tracker_Action( $this->db ); } - elseif(!($action instanceof Piwik_LogStats_Action_Interface)) + elseif(!($action instanceof Piwik_Tracker_Action_Interface)) { - throw new Exception("The Action object set in the plugin must implement the interface Piwik_LogStats_Action_Interface"); + throw new Exception("The Action object set in the plugin must implement the interface Piwik_Tracker_Action_Interface"); } $action->setIdSite($this->idsite); @@ -724,7 +724,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface { if(isset($this->currentUrlParse['query'])) { - $newsletterVariableName = Piwik_LogStats_Config::getInstance()->LogStats['newsletter_var_name']; + $newsletterVariableName = Piwik_Tracker_Config::getInstance()->Tracker['newsletter_var_name']; $newsletterVar = Piwik_Common::getParameterFromQueryString( $this->currentUrlParse['query'], $newsletterVariableName); if(!empty($newsletterVar)) @@ -744,7 +744,7 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface { if(isset($this->currentUrlParse['query'])) { - $partnerVariableName = Piwik_LogStats_Config::getInstance()->LogStats['partner_var_name']; + $partnerVariableName = Piwik_Tracker_Config::getInstance()->Tracker['partner_var_name']; $partnerVar = Piwik_Common::getParameterFromQueryString($this->currentUrlParse['query'], $partnerVariableName); if(!empty($partnerVar)) @@ -764,12 +764,12 @@ class Piwik_LogStats_Visit implements Piwik_LogStats_Visit_Interface { if(isset($this->currentUrlParse['query'])) { - $campaignVariableName = Piwik_LogStats_Config::getInstance()->LogStats['campaign_var_name']; + $campaignVariableName = Piwik_Tracker_Config::getInstance()->Tracker['campaign_var_name']; $campaignName = Piwik_Common::getParameterFromQueryString($this->currentUrlParse['query'], $campaignVariableName); if( !empty($campaignName)) { - $campaignKeywordVariableName = Piwik_LogStats_Config::getInstance()->LogStats['campaign_keyword_var_name']; + $campaignKeywordVariableName = Piwik_Tracker_Config::getInstance()->Tracker['campaign_keyword_var_name']; $campaignKeyword = Piwik_Common::getParameterFromQueryString($this->currentUrlParse['query'], $campaignKeywordVariableName); $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_CAMPAIGN; diff --git a/core/LogStats/javascriptTag.tpl b/core/Tracker/javascriptTag.tpl similarity index 100% rename from core/LogStats/javascriptTag.tpl rename to core/Tracker/javascriptTag.tpl diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 2503d23eb55848250fc27aa0a78162f67a7b65b7..d36709727891230d8ec48be544fb637021132ded 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -455,7 +455,7 @@ abstract class Piwik_ViewDataTable * - etc. * * The values are loaded: - * - from the generic filters that are applied by default @see Piwik_API_Request::getGenericFiltersInformation() + * - from the generic filters that are applied by default @see Piwik_API_ResponseBuilder::getGenericFiltersInformation() * - from the values already available in the GET array * - from the values set using methods from this class (eg. setSearchPattern(), setLimit(), etc.) * @@ -466,7 +466,7 @@ abstract class Piwik_ViewDataTable // build javascript variables to set $javascriptVariablesToSet = array(); - $genericFilters = Piwik_API_Request::getGenericFiltersInformation(); + $genericFilters = Piwik_API_ResponseBuilder::getGenericFiltersInformation(); foreach($genericFilters as $filter) { foreach($filter as $filterVariableName => $filterInfo) diff --git a/core/testMinimumPhpVersion.php b/core/testMinimumPhpVersion.php index 52c7c6d6088c16ecff491a3af171c10a3e68ad81..1edb46ff876feac44425789e3fdff39d13ae4453 100644 --- a/core/testMinimumPhpVersion.php +++ b/core/testMinimumPhpVersion.php @@ -38,8 +38,12 @@ if($piwik_zend_compatibility_mode == 1) If you want to use Piwik you need to set <pre>zend.ze1_compatibility_mode = Off</pre> in your php.ini configuration file. You may have to ask your system administrator.</p>"; } -function Piwik_ExitWithMessage($message) +function Piwik_ExitWithMessage($message, $optionalTrace) { + if($optionalTrace) + { + $optionalTrace = '<font color="#888888">Backtrace:<br/><pre>'.$optionalTrace.'</pre></font>'; + } $html = '<html> <head> <title>Piwik › Error</title> @@ -51,9 +55,12 @@ function Piwik_ExitWithMessage($message) color: #000; font-family: Georgia, "Times New Roman", Times, serif; margin-left: 20%; - margin-top: 25px; + margin-top: 50px; margin-right: 20%; - padding: .2em 2em; + padding: 1em 2em; + -moz-border-radius: 12px; + -khtml-border-radius: 12px; + -webkit-border-radius: 12px; } #h1 { color: #006; @@ -77,7 +84,8 @@ function Piwik_ExitWithMessage($message) </head> <body> <span id="h1">Piwik </span><span id="subh1"> # open source web analytics</span> - <p>'.$message.'</p> + <p>'.$message.'</p> + '. $optionalTrace .' <ul> <li><a target="_blank" href="misc/redirectToUrl.php?url=http://piwik.org">Piwik homepage</a></li> <li><a target="_blank" href="misc/redirectToUrl.php?url=http://piwik.org/demo">Piwik demo</a></li> diff --git a/misc/generateVisits.php b/misc/generateVisits.php index b509d5c2b8b3909f2a3b560211b34ae88cb1a913..2da8e3e40bc170bf9c92cf5e0f7432fd1679c837 100644 --- a/misc/generateVisits.php +++ b/misc/generateVisits.php @@ -5,9 +5,8 @@ */ $minVisits = 5; $maxVisits = 15; -$nbActions = 15; -$daysToCompute = 1; -$idSite = Piwik_Common::getRequestVar('idSite', 1, 'int'); +$nbActions = 10; +$daysToCompute = 2; //----------------------------------------------------------------------------- error_reporting(E_ALL|E_NOTICE); @@ -28,29 +27,30 @@ define('ENABLE_DISPATCH', false); require_once "index.php"; require_once "FrontController.php"; +$idSite = Piwik_Common::getRequestVar('idSite', 1, 'int'); Piwik_FrontController::getInstance()->init(); Piwik::checkUserIsSuperUser(); require_once "PluginsManager.php"; require_once "Timer.php"; require_once "Cookie.php"; -require_once "LogStats.php"; -require_once "LogStats/Config.php"; -require_once "LogStats/Action.php"; -require_once "LogStats/Db.php"; -require_once "LogStats/Visit.php"; -require_once "LogStats/Generator.php"; +require_once "Tracker.php"; +require_once "Tracker/Config.php"; +require_once "Tracker/Action.php"; +require_once "Tracker/Db.php"; +require_once "Tracker/Visit.php"; +require_once "Tracker/Generator.php"; //Piwik_PluginsManager::getInstance()->unloadPlugins(); // we have to unload the Provider plugin otherwise it tries to lookup the IP for ahostname, and there is no dns server here Piwik_PluginsManager::getInstance()->unloadPlugin('Provider'); -// we set the DO NOT load plugins so that the LogStats generator doesn't load the plugins we've just disabled. +// we set the DO NOT load plugins so that the Tracker generator doesn't load the plugins we've just disabled. // if for some reasons you want to load the plugins, comment this line, and disable the plugin Provider in the plugins interface Piwik_PluginsManager::getInstance()->doNotLoadPlugins(); -$generator = new Piwik_LogStats_Generator; +$generator = new Piwik_Tracker_Generator; $generator->setMaximumUrlDepth(3); //$generator->disableProfiler(); $generator->setIdSite( $idSite ); @@ -74,6 +74,7 @@ while($startTime <= time()) $startTime+=86400; $nbActionsTotal+=$nbActionsTotalThisDay; flush(); + sleep(1); } echo "<br>Total actions: $nbActionsTotal"; diff --git a/piwik.php b/piwik.php index 790a3a40557376a787544f66772bba529d3644b4..7959b315ca22b53573f2fc2c49d6d17ea9b4e030 100644 --- a/piwik.php +++ b/piwik.php @@ -19,12 +19,12 @@ set_include_path(PIWIK_INCLUDE_PATH require_once "Common.php"; require_once "PluginsManager.php"; -require_once "LogStats.php"; -require_once "LogStats/Config.php"; -require_once "LogStats/Action.php"; +require_once "Tracker.php"; +require_once "Tracker/Config.php"; +require_once "Tracker/Action.php"; require_once "Cookie.php"; -require_once "LogStats/Db.php"; -require_once "LogStats/Visit.php"; +require_once "Tracker/Db.php"; +require_once "Tracker/Visit.php"; $GLOBALS['DEBUGPIWIK'] = false; @@ -36,13 +36,13 @@ if($GLOBALS['DEBUGPIWIK'] === true) set_error_handler('Piwik_ErrorHandler'); set_exception_handler('Piwik_ExceptionHandler'); printDebug($_GET); - Piwik_LogStats_Db::enableProfiling(); + Piwik_Tracker_Db::enableProfiling(); Piwik::createConfigObject(); Piwik::createLogObject(); } ob_start(); -$process = new Piwik_LogStats; +$process = new Piwik_Tracker; $process->main(); ob_end_flush(); printDebug($_COOKIE); diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 9b70b899d5cd72eefcd85e39b3d16df168e363b8..66e7199d98c70bbe556d4c63ecc7ffbc287bc37d 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -93,12 +93,12 @@ class Piwik_Actions extends Piwik_Plugin { $archiveProcessing = $notification->getNotificationObject(); - require_once "LogStats/Action.php"; + require_once "Tracker/Action.php"; $this->actionsTablesByType = array( - Piwik_LogStats_Action::TYPE_ACTION => array(), - Piwik_LogStats_Action::TYPE_DOWNLOAD => array(), - Piwik_LogStats_Action::TYPE_OUTLINK => array(), + Piwik_Tracker_Action::TYPE_ACTION => array(), + Piwik_Tracker_Action::TYPE_DOWNLOAD => array(), + Piwik_Tracker_Action::TYPE_OUTLINK => array(), ); // This row is used in the case where an action is know as an exit_action @@ -191,15 +191,15 @@ class Piwik_Actions extends Piwik_Plugin $maximumRowsInDataTableLevelZero = 200; $maximumRowsInSubDataTable = 50; - $dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_LogStats_Action::TYPE_ACTION]); + $dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_ACTION]); $s = $dataTable->getSerialized( $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable ); $record = new Piwik_ArchiveProcessing_Record_BlobArray('Actions_actions', $s); - $dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_LogStats_Action::TYPE_DOWNLOAD]); + $dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_DOWNLOAD]); $s = $dataTable->getSerialized( $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable ); $record = new Piwik_ArchiveProcessing_Record_BlobArray('Actions_downloads', $s); - $dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_LogStats_Action::TYPE_OUTLINK]); + $dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_OUTLINK]); $s = $dataTable->getSerialized( $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable ); $record = new Piwik_ArchiveProcessing_Record_BlobArray('Actions_outlink', $s); diff --git a/plugins/CoreAdminHome/templates/footer.tpl b/plugins/CoreAdminHome/templates/footer.tpl new file mode 100644 index 0000000000000000000000000000000000000000..51f0116ae5ced9c2d49a36f1de50e69cece8f179 --- /dev/null +++ b/plugins/CoreAdminHome/templates/footer.tpl @@ -0,0 +1,2 @@ + +{include file="CoreHome/templates/piwik_tag.tpl"} \ No newline at end of file diff --git a/plugins/CoreAdminHome/templates/index.tpl b/plugins/CoreAdminHome/templates/index.tpl index 431f768e2635cfc301d0b2329338d011af5caffc..370e1b963f1e3ccf0157b9e34ded16b1fe1922cc 100644 --- a/plugins/CoreAdminHome/templates/index.tpl +++ b/plugins/CoreAdminHome/templates/index.tpl @@ -14,3 +14,5 @@ <a href='?module=CoreHome'>{'General_BackToHomepage'|translate}</a> </div> + +{include file="CoreAdminHome/templates/footer.tpl"} \ No newline at end of file diff --git a/plugins/CoreHome/templates/piwik_tag.tpl b/plugins/CoreHome/templates/piwik_tag.tpl index 3f207f6bdaf1f286b8162dce543b88e3db09d29e..7807ceb5bd7c90fc44b4e65091051d3c0780e8ae 100644 --- a/plugins/CoreHome/templates/piwik_tag.tpl +++ b/plugins/CoreHome/templates/piwik_tag.tpl @@ -16,4 +16,4 @@ piwik_log(piwik_action_name, piwik_idsite, piwik_url, piwik_vars); </noscript></object></a> <!-- /Piwik --> {/literal} -{/if} \ No newline at end of file +{/if} diff --git a/plugins/CorePluginsAdmin/templates/manage.tpl b/plugins/CorePluginsAdmin/templates/manage.tpl index 37b8ac9d85c55e3b83dbd69e35818a2991c4399c..209007d1359c4e57a6be67df5ac620d03088fb41 100644 --- a/plugins/CorePluginsAdmin/templates/manage.tpl +++ b/plugins/CorePluginsAdmin/templates/manage.tpl @@ -48,4 +48,5 @@ </tbody> </table> -</div> \ No newline at end of file +</div> +{include file="CoreAdminHome/templates/footer.tpl"} \ No newline at end of file diff --git a/plugins/DBStats/templates/DBStats.tpl b/plugins/DBStats/templates/DBStats.tpl index 3b126057931d949c404147970e684cebb8ec4927..27f0769dcdc560a2b28d4da672b82ee5d05a0920 100644 --- a/plugins/DBStats/templates/DBStats.tpl +++ b/plugins/DBStats/templates/DBStats.tpl @@ -34,4 +34,6 @@ </tbody> </table> -</div> \ No newline at end of file +</div> + +{include file="CoreAdminHome/templates/footer.tpl"} \ No newline at end of file diff --git a/plugins/Provider/Provider.php b/plugins/Provider/Provider.php index e42df824b6894b839d73e96b35df594df1045f1a..81b8090990713217da826e655ae2baa5c3d5034c 100644 --- a/plugins/Provider/Provider.php +++ b/plugins/Provider/Provider.php @@ -23,7 +23,7 @@ class Piwik_Provider extends Piwik_Plugin 'author' => 'Piwik', 'homepage' => 'http://piwik.org/', 'version' => '0.1', - 'LogStatsPlugin' => true, // this plugin must be loaded during the stats logging + 'TrackerPlugin' => true, // this plugin must be loaded during the stats logging ); return $info; @@ -34,7 +34,7 @@ class Piwik_Provider extends Piwik_Plugin $hooks = array( 'ArchiveProcessing_Day.compute' => 'archiveDay', 'ArchiveProcessing_Period.compute' => 'archivePeriod', - 'LogStats.newVisitorInformation' => 'logProviderInfo', + 'Tracker.newVisitorInformation' => 'logProviderInfo', 'WidgetsList.add' => 'addWidget', 'Menu.add' => 'addMenu', ); diff --git a/plugins/SitesManager/templates/SitesManager.tpl b/plugins/SitesManager/templates/SitesManager.tpl index 18d0372ddbdb4fd9da75aaab7bf8a41ae0d7f5ad..e9cec2405a77ce0b2ba7c412a6f09b81ade759db 100644 --- a/plugins/SitesManager/templates/SitesManager.tpl +++ b/plugins/SitesManager/templates/SitesManager.tpl @@ -61,3 +61,4 @@ <div class="addRowSite"><a href="#"><img src='plugins/UsersManager/images/add.png' alt="" /> {'SitesManager_AddSite'|translate}</a></div> {/if} +{include file="CoreAdminHome/templates/footer.tpl"} diff --git a/plugins/UsersManager/templates/UsersManager.tpl b/plugins/UsersManager/templates/UsersManager.tpl index 054a269c0431cd6a6f39788ea00b228651ee18e4..02781df32528fe30a150fffcd2401deb46ebaa2c 100644 --- a/plugins/UsersManager/templates/UsersManager.tpl +++ b/plugins/UsersManager/templates/UsersManager.tpl @@ -140,3 +140,5 @@ <div class="addrow"><a href="#"><img src='plugins/UsersManager/images/add.png'> {'UsersManager_AddUser'|translate}</a></div> <script type="text/javascript" src="plugins/UsersManager/templates/UsersManager.js"></script> + +{include file="CoreAdminHome/templates/footer.tpl"} \ No newline at end of file diff --git a/tests/core/LogStats_Db.test.php b/tests/core/Tracker_Db.test.php similarity index 67% rename from tests/core/LogStats_Db.test.php rename to tests/core/Tracker_Db.test.php index b4cd6a7d3e339ec00ac0c302adbc75ac9e43555e..12d37c7a207f53c31355ca885230bd4314b031fc 100644 --- a/tests/core/LogStats_Db.test.php +++ b/tests/core/Tracker_Db.test.php @@ -7,9 +7,9 @@ if(!defined('CONFIG_TEST_INCLUDED')) require_once PATH_TEST_TO_ROOT ."/../tests/config_test.php"; } -require_once 'LogStats/Db.php'; +require_once 'Tracker/Db.php'; -class Test_Piwik_LogStats_Db extends UnitTestCase +class Test_Piwik_Tracker_Db extends UnitTestCase { function __construct( $title = '') { @@ -30,7 +30,7 @@ class Test_Piwik_LogStats_Db extends UnitTestCase */ public function test_profilingDisabledInProduction() { - $this->assertTrue(Piwik_LogStats_Db::isProfilingEnabled() === false, 'SQL profiler should be disabled in production! See Piwik_LogStats_Db::$profiling'); + $this->assertTrue(Piwik_Tracker_Db::isProfilingEnabled() === false, 'SQL profiler should be disabled in production! See Piwik_Tracker_Db::$profiling'); } }