Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-10 18:04:08 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-10 18:04:08 +0300
commit0bc0409030a18e3ffa04f49e11c8d11af83887a6 (patch)
treed5ca9ba31bed5de4ee50187d9a3e0e11565d3373
parentfce89438f49758e86bab66a9ede6345dd9745ca7 (diff)
Some cleaning + started removing/fixing some TODO in the code
-rw-r--r--README5
-rwxr-xr-xconfig/global.ini.php4
-rw-r--r--misc/generateVisits.php1
-rw-r--r--misc/generateVisitsData/AcceptLanguage.php3
-rw-r--r--misc/generateVisitsData/Referers.php3
-rw-r--r--misc/generateVisitsData/UserAgent.php3
-rw-r--r--modules/Archive.php6
-rw-r--r--modules/Controller.php3
-rw-r--r--modules/LogStats.php2
-rw-r--r--modules/LogStats/Db.php12
-rw-r--r--modules/LogStats/Generator.php4
-rw-r--r--modules/LogStats/Visit.php3
-rwxr-xr-xmodules/Piwik.php1
-rw-r--r--modules/Plugin.php9
-rw-r--r--modules/PluginsManager.php2
-rw-r--r--modules/SmartyPlugins/function.url.php1
-rw-r--r--modules/ViewDataTable.php6
-rw-r--r--modules/iView.php3
-rw-r--r--piwik.php2
-rw-r--r--plugins/Installation/Controller.php6
-rw-r--r--plugins/Installation/View.php1
-rw-r--r--plugins/Login/Controller.php2
-rw-r--r--plugins/Login/Form.php2
-rw-r--r--plugins/Logout/Controller.php1
-rw-r--r--plugins/Provider.php9
-rw-r--r--plugins/Referers.php2
-rw-r--r--plugins/SitesManager/Controller.php3
-rw-r--r--plugins/UsersManager/Controller.php1
-rw-r--r--themes/default/common.js3
29 files changed, 44 insertions, 59 deletions
diff --git a/README b/README
index baee1ee564..73cf8d19db 100644
--- a/README
+++ b/README
@@ -1,10 +1,5 @@
Piwik - piwik.org
-----------------
-
-Mission statement
-« To create, as a community, the leading international open source web analytics application,
- providing access to all functionality through open components and open APIs,
- while focusing on the user experience. »
Install
=======
diff --git a/config/global.ini.php b/config/global.ini.php
index 8077bef37a..7e76553e6a 100755
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -16,8 +16,8 @@ adapter = PDO_MYSQL ; PDO_MYSQL or MYSQLI
[database_tests]
host = localhost
username = root
-password = nintendo
-dbname = piwiktests
+password =
+dbname = piwik_tests2
tables_prefix = piwiktests_
adapter = PDO_MYSQL
diff --git a/misc/generateVisits.php b/misc/generateVisits.php
index 5bb0dad4e1..8f2b27e58b 100644
--- a/misc/generateVisits.php
+++ b/misc/generateVisits.php
@@ -70,4 +70,3 @@ echo "<br>".$t;
$generator->end();
ob_end_flush();
-?>
diff --git a/misc/generateVisitsData/AcceptLanguage.php b/misc/generateVisitsData/AcceptLanguage.php
index d3bb56af57..bd46067b1a 100644
--- a/misc/generateVisitsData/AcceptLanguage.php
+++ b/misc/generateVisitsData/AcceptLanguage.php
@@ -2001,5 +2001,4 @@ $acceptLanguages = array(
"fr",
"en-us,en;q=0.5",
);
-
-?>
+ \ No newline at end of file
diff --git a/misc/generateVisitsData/Referers.php b/misc/generateVisitsData/Referers.php
index 0f03dc32aa..7d2798d880 100644
--- a/misc/generateVisitsData/Referers.php
+++ b/misc/generateVisitsData/Referers.php
@@ -8033,5 +8033,4 @@ $referers = array(
"http://www.ffmc24.org/ecrire/?exec=admin_plugin",
"http://forum.hardware.fr/hfr/WindowsSoftware/ajout-compteur-site-sujet_172698_1.htm",
"http://www.gougueule.com/Spongestats",
- );
-?>
+ ); \ No newline at end of file
diff --git a/misc/generateVisitsData/UserAgent.php b/misc/generateVisitsData/UserAgent.php
index 515b197436..433e74bcf3 100644
--- a/misc/generateVisitsData/UserAgent.php
+++ b/misc/generateVisitsData/UserAgent.php
@@ -50,5 +50,4 @@ $userAgent = array(
"OmniWeb/2.7-beta-3 OWF/1.0",
"SearchExpress",
"Microsoft URL Control - 6.00.8862",
-)
-?>
+);
diff --git a/modules/Archive.php b/modules/Archive.php
index 98efe1591d..6658a2cc14 100644
--- a/modules/Archive.php
+++ b/modules/Archive.php
@@ -1,9 +1,5 @@
<?php
-/**
- * Archiving process
- *
- * Requirements
- *
+/**
*
* TODO delete logs once used for days
* it means that we have to keep the useful information for months/week etc.
diff --git a/modules/Controller.php b/modules/Controller.php
index 8bf0087eff..1e70e3f472 100644
--- a/modules/Controller.php
+++ b/modules/Controller.php
@@ -5,5 +5,4 @@ abstract class Piwik_Controller
{
return 'index';
}
-}
-?>
+} \ No newline at end of file
diff --git a/modules/LogStats.php b/modules/LogStats.php
index b6f088582c..5f3f60eb34 100644
--- a/modules/LogStats.php
+++ b/modules/LogStats.php
@@ -194,8 +194,6 @@ class Piwik_LogStats
}
}
-
-
function printDebug( $info = '' )
{
if(isset($GLOBALS['DEBUGPIWIK']) && $GLOBALS['DEBUGPIWIK'])
diff --git a/modules/LogStats/Db.php b/modules/LogStats/Db.php
index ed4309f098..3ee956dad6 100644
--- a/modules/LogStats/Db.php
+++ b/modules/LogStats/Db.php
@@ -155,8 +155,10 @@ class Piwik_LogStats_Db
public function __destruct()
{
if(self::$profiling)
- {
- self::$profiling= false;
+ {
+ // turn off the profiler so we don't profile the following queries
+ self::$profiling = false;
+
foreach($this->queriesProfiling as $query => $info)
{
$time = $info['sum_time_ms'];
@@ -167,8 +169,10 @@ class Piwik_LogStats_Db
ON DUPLICATE KEY
UPDATE count=count+$count,sum_time_ms=sum_time_ms+$time";
$this->query($queryProfiling,array($query));
- }
- self::$profiling= true;
+ }
+
+ // turn back on profiling
+ self::$profiling = true;
}
}
}
diff --git a/modules/LogStats/Generator.php b/modules/LogStats/Generator.php
index fa9362685d..9d11690f97 100644
--- a/modules/LogStats/Generator.php
+++ b/modules/LogStats/Generator.php
@@ -4,7 +4,7 @@
* Class used to generate fake visits.
* Useful to test performances, general functional testing, etc.
*
- * Requirements of the visits generator script. It is to edit *
+ * Requirements of the visits generator script. Fields that can be edited:
* - url => campaigns
* - newsletter
* - partner
@@ -37,7 +37,7 @@ class Piwik_LogStats_Generator
public $profiling = true;
public $reinitProfilingAtEveryRequest = true;
- //TODO also make this variable dynamic so that a visitor can make hit on several hosts and
+ //we could make this variable dynamic so that a visitor can make hit on several hosts and
// only the good ones are kept
public $host = 'http://localhost';
diff --git a/modules/LogStats/Visit.php b/modules/LogStats/Visit.php
index 426e941fc2..2b1c559d5f 100644
--- a/modules/LogStats/Visit.php
+++ b/modules/LogStats/Visit.php
@@ -620,9 +620,6 @@ class Piwik_LogStats_Visit
{
$query = $refererUrlParse['query'];
- //TODO: change the search engine file and use REGEXP; performance downside?
- //TODO: port the phpmyvisites google-images hack here
-
// search for keywords now &vname=keyword
$key = trim(strtolower(Piwik_Common::getParameterFromQueryString($query, $variableName)));
diff --git a/modules/Piwik.php b/modules/Piwik.php
index 14cf6f49c7..82ed70e6cb 100755
--- a/modules/Piwik.php
+++ b/modules/Piwik.php
@@ -636,7 +636,6 @@ class Piwik
$configAPI = Zend_Registry::get('config')->log;
$aLoggers = array(
-// 'logger_query_profile' => new Piwik_Log_QueryProfile, // TODO Piwik_Log_QueryProfile
'logger_api_call' => new Piwik_Log_APICall,
'logger_exception' => new Piwik_Log_Exception,
'logger_error' => new Piwik_Log_Error,
diff --git a/modules/Plugin.php b/modules/Plugin.php
index 58a678e68a..17706cf56a 100644
--- a/modules/Plugin.php
+++ b/modules/Plugin.php
@@ -53,6 +53,15 @@ abstract class Piwik_Plugin
* Returns the plugin details
*/
abstract function getInformation();
+
+ /**
+ * Returns the plugin name
+ */
+ public function getName()
+ {
+ $info = $this->getInformation();
+ return $info['name'];
+ }
/**
* Returns the list of hooks registered with the methods names
diff --git a/modules/PluginsManager.php b/modules/PluginsManager.php
index c78757bec1..68e1aa8cd0 100644
--- a/modules/PluginsManager.php
+++ b/modules/PluginsManager.php
@@ -137,7 +137,7 @@ class Piwik_PluginsManager
try{
$plugin->install();
} catch(Exception $e) {
- //TODO Better plugin management....
+ throw new Exception("There was a problem installing the plugin ". $plugin->getName() . " = " . $e->getMessage() );
}
}
}
diff --git a/modules/SmartyPlugins/function.url.php b/modules/SmartyPlugins/function.url.php
index 810687efe8..e602311b52 100644
--- a/modules/SmartyPlugins/function.url.php
+++ b/modules/SmartyPlugins/function.url.php
@@ -34,4 +34,3 @@ function smarty_function_url($params, &$smarty)
/* vim: set expandtab: */
-?>
diff --git a/modules/ViewDataTable.php b/modules/ViewDataTable.php
index 57e5e0584d..d1777f39b5 100644
--- a/modules/ViewDataTable.php
+++ b/modules/ViewDataTable.php
@@ -37,13 +37,11 @@ class Piwik_ViewDataTable
$type = Piwik_Common::getRequestVar('viewDataTable', 'table', 'string');
}
- // TODO: instead of giving the parameter to the constructor we should really
- // have only one class per type view renderer
switch($type)
{
case 'cloud':
require_once "ViewDataTable/Cloud.php";
- return new Piwik_ViewDataTable_Cloud($type);
+ return new Piwik_ViewDataTable_Cloud();
break;
case 'graphPie':
@@ -68,7 +66,7 @@ class Piwik_ViewDataTable
case 'table':
default:
- return new Piwik_ViewDataTable($type);
+ return new Piwik_ViewDataTable();
break;
}
}
diff --git a/modules/iView.php b/modules/iView.php
index 9ecfa2e152..de5cd19411 100644
--- a/modules/iView.php
+++ b/modules/iView.php
@@ -2,5 +2,4 @@
interface iView
{
function render();
-}
-?>
+} \ No newline at end of file
diff --git a/piwik.php b/piwik.php
index 7ca3bee82e..561e147b07 100644
--- a/piwik.php
+++ b/piwik.php
@@ -4,8 +4,6 @@
*
* - after a day is archived, we delete all the useless information from the log table, keeping only the useful data for weeks/month
* maybe we create a new table containing only these aggregate and we can delete the rows of the day in the log table
- * - To avoid join two huge tables (log_visit, log_link_visit_action) we may have to denormalize (idsite, date)#
- * -
*/
/*
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index bf6f9929ce..bc9fffe8d4 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -393,10 +393,6 @@ class Piwik_Installation_Controller extends Piwik_Controller
Piwik::createDatabaseObject($dbInfos);
}
-
-
-
-
protected function getSystemInformation()
{
$minimumPhpVersion = Zend_Registry::get('config')->General->minimumPhpVersion;
@@ -426,8 +422,6 @@ class Piwik_Installation_Controller extends Piwik_Controller
if (in_array('pdo_mysql', $extensions))
{
$infos['pdo_mysql_ok'] = true;
- //TODO add the mysql version report and check mini 4.1
-// $infos['pdo_mysql_version'] = getMysqlVersion();
}
// server version
diff --git a/plugins/Installation/View.php b/plugins/Installation/View.php
index 5235872591..d7876b578a 100644
--- a/plugins/Installation/View.php
+++ b/plugins/Installation/View.php
@@ -14,7 +14,6 @@ class Piwik_Install_View extends Piwik_View
function render()
{
// prepare the all steps templates
- // TODO add translation here
$this->allStepsTitle = $this->steps;
$this->currentStepId = array_search($this->currentStepName, $this->steps);
$this->totalNumberOfSteps = count($this->steps);
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index 3f6ee1778f..7810cd5bff 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -57,4 +57,4 @@ class Piwik_Login_Controller extends Piwik_Controller
echo $view->render();
}
}
-?>
+
diff --git a/plugins/Login/Form.php b/plugins/Login/Form.php
index 852f921ea7..8d5304abdb 100644
--- a/plugins/Login/Form.php
+++ b/plugins/Login/Form.php
@@ -31,4 +31,4 @@ class Piwik_Login_Form extends Piwik_Form
}
-?>
+
diff --git a/plugins/Logout/Controller.php b/plugins/Logout/Controller.php
index b8dc78e8fe..fc25a2fe6e 100644
--- a/plugins/Logout/Controller.php
+++ b/plugins/Logout/Controller.php
@@ -12,4 +12,3 @@ class Piwik_Logout_Controller extends Piwik_Controller
Piwik_Url::redirectToUrl($baseUrl);
}
}
-?>
diff --git a/plugins/Provider.php b/plugins/Provider.php
index 638e7e3174..8a9765d344 100644
--- a/plugins/Provider.php
+++ b/plugins/Provider.php
@@ -23,8 +23,13 @@ class Piwik_Provider extends Piwik_Plugin
function install()
{
// add column hostname / hostname ext in the visit table
- $query = "ALTER TABLE `".Piwik::prefixTable('log_visit')."` ADD `location_provider` VARCHAR( 100 ) NOT NULL";
- Zend_Registry::get('db')->query($query);
+ $query = "ALTER IGNORE TABLE `".Piwik::prefixTable('log_visit')."` ADD `location_provider` VARCHAR( 100 ) NOT NULL";
+
+ // if the column already exist do not throw error. Could be installed twice...
+ try {
+ Zend_Registry::get('db')->query($query);
+ }
+ catch(Exception $e){}
}
function uninstall()
diff --git a/plugins/Referers.php b/plugins/Referers.php
index ff1dba9a02..4556541833 100644
--- a/plugins/Referers.php
+++ b/plugins/Referers.php
@@ -28,7 +28,7 @@ class Piwik_Referers extends Piwik_Plugin
}
function install()
- {
+ {
}
function uninstall()
diff --git a/plugins/SitesManager/Controller.php b/plugins/SitesManager/Controller.php
index b1d224ff45..abd8455a34 100644
--- a/plugins/SitesManager/Controller.php
+++ b/plugins/SitesManager/Controller.php
@@ -14,5 +14,4 @@ class Piwik_SitesManager_Controller extends Piwik_Controller
$view->sites = $sites;
echo $view->render();
}
-}
-?>
+} \ No newline at end of file
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php
index c0d1550d96..4ca6105066 100644
--- a/plugins/UsersManager/Controller.php
+++ b/plugins/UsersManager/Controller.php
@@ -52,4 +52,3 @@ class Piwik_UsersManager_Controller extends Piwik_Controller
echo $view->render();
}
}
-?>
diff --git a/themes/default/common.js b/themes/default/common.js
index 162f637329..37b6224287 100644
--- a/themes/default/common.js
+++ b/themes/default/common.js
@@ -7,6 +7,7 @@ function ajaxShowError( string )
{
$('#ajaxError').html(string).show();
}
+
function ajaxHideError()
{
$('#ajaxError').hide();
@@ -16,6 +17,7 @@ function ajaxToggleLoading()
{
$('#ajaxLoading').toggle();
}
+
function ajaxHandleResponse(response)
{
if(response.result == "error")
@@ -28,6 +30,7 @@ function ajaxHandleResponse(response)
}
ajaxToggleLoading();
}
+
function toggleAjaxLoading()
{
$('#ajaxLoading').toggle();