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-11-04 16:03:15 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-11-04 16:03:15 +0300
commit1923aef4bfe1333bcbb642a5e3f6a5ed23bed3fc (patch)
treed0bcf1d50676d665c2a302dfb0de955f7fc0753d
parent36c9af187e36931fda4d29a0937d00546edb415e (diff)
- 0.2.12 including fix for website #330 and #30 done
-rw-r--r--core/Piwik.php25
-rw-r--r--core/Tracker/Visit.php11
-rw-r--r--core/Updates/0.2.12.php25
-rw-r--r--core/Version.php2
-rw-r--r--misc/TODO5
-rw-r--r--piwik.js2
-rw-r--r--plugins/Installation/Controller.php1
7 files changed, 40 insertions, 31 deletions
diff --git a/core/Piwik.php b/core/Piwik.php
index 9e0ab7c0f8..189d2c8513 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -542,7 +542,7 @@ class Piwik
PRIMARY KEY(idaction)
)
",
-
+
'log_visit' => "CREATE TABLE {$prefixTables}log_visit (
idvisit INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
idsite INTEGER(10) UNSIGNED NOT NULL,
@@ -565,7 +565,6 @@ class Piwik
config_browser_name VARCHAR(10) NOT NULL,
config_browser_version VARCHAR(20) NOT NULL,
config_resolution VARCHAR(9) NOT NULL,
- config_color_depth TINYINT(2) UNSIGNED NOT NULL,
config_pdf TINYINT(1) NOT NULL,
config_flash TINYINT(1) NOT NULL,
config_java TINYINT(1) NOT NULL,
@@ -578,9 +577,11 @@ class Piwik
location_browser_lang VARCHAR(20) NOT NULL,
location_country CHAR(3) NOT NULL,
location_continent CHAR(3) NOT NULL,
- PRIMARY KEY(idvisit)
+ PRIMARY KEY(idvisit),
+ INDEX index_idsite(idsite),
+ INDEX index_visit_server_date (visit_server_date)
)
- ",
+ ",
'log_link_visit_action' => "CREATE TABLE {$prefixTables}log_link_visit_action (
idlink_va INTEGER(11) NOT NULL AUTO_INCREMENT,
@@ -588,10 +589,11 @@ class Piwik
idaction INTEGER(10) UNSIGNED NOT NULL,
idaction_ref INTEGER(11) UNSIGNED NOT NULL,
time_spent_ref_action INTEGER(10) UNSIGNED NOT NULL,
- PRIMARY KEY(idlink_va)
+ PRIMARY KEY(idlink_va),
+ INDEX index_idvisit(idvisit)
)
",
-
+
'log_profiling' => "CREATE TABLE {$prefixTables}log_profiling (
query TEXT NOT NULL,
count INTEGER UNSIGNED NULL,
@@ -1032,17 +1034,6 @@ class Piwik
VALUES ( 'anonymous', '', 'anonymous', 'anonymous@example.org', 'anonymous', CURRENT_TIMESTAMP );" );
}
- static public function createTablesIndex()
- {
- $db = Zend_Registry::get('db');
- $prefixTables = Zend_Registry::get('config')->database->tables_prefix;
-
- $db->query('CREATE INDEX index_idvisit ON '.$prefixTables.'log_link_visit_action (idvisit)');
- $db->query('CREATE INDEX index_idaction ON '.$prefixTables.'log_action (idaction)');
- $db->query('CREATE INDEX index_idsite ON '.$prefixTables.'log_visit (idsite)');
- $db->query('CREATE INDEX index_visit_server_date ON '.$prefixTables.'log_visit (visit_server_date);');
- }
-
static public function createTables()
{
$db = Zend_Registry::get('db');
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index bf66f07960..28615cb83b 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -245,8 +245,6 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
$os = Piwik_Common::getOs($userAgent);
$resolution = Piwik_Common::getRequestVar('res', 'unknown', 'string');
- $colorDepth = Piwik_Common::getRequestVar('col', 32, 'numeric');
-
$ip = Piwik_Common::getIp();
$ip = ip2long($ip);
@@ -258,7 +256,6 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
$browserName,
$browserVersion,
$resolution,
- $colorDepth,
$plugin_Flash,
$plugin_Director,
$plugin_RealPlayer,
@@ -275,7 +272,6 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
'config_browser_name' => $browserName,
'config_browser_version' => $browserVersion,
'config_resolution' => $resolution,
- 'config_color_depth' => $colorDepth,
'config_pdf' => $plugin_Pdf,
'config_flash' => $plugin_Flash,
'config_java' => $plugin_Java,
@@ -283,7 +279,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
'config_quicktime' => $plugin_Quicktime,
'config_realplayer' => $plugin_RealPlayer,
'config_windowsmedia' => $plugin_WindowsMedia,
- 'config_cookie' => $plugin_RealPlayer,
+ 'config_cookie' => $plugin_Cookie,
'location_ip' => $ip,
'location_browser_lang' => $browserLang,
);
@@ -508,7 +504,6 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
'config_browser_name' => $userInfo['config_browser_name'],
'config_browser_version' => $userInfo['config_browser_version'],
'config_resolution' => $userInfo['config_resolution'],
- 'config_color_depth' => $userInfo['config_color_depth'],
'config_pdf' => $userInfo['config_pdf'],
'config_flash' => $userInfo['config_flash'],
'config_java' => $userInfo['config_java'],
@@ -811,9 +806,9 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
* Returns a MD5 of all the configuration settings
* @return string
*/
- protected function getConfigHash( $os, $browserName, $browserVersion, $resolution, $colorDepth, $plugin_Flash, $plugin_Director, $plugin_RealPlayer, $plugin_Pdf, $plugin_WindowsMedia, $plugin_Java, $plugin_Cookie, $ip, $browserLang)
+ protected function getConfigHash( $os, $browserName, $browserVersion, $resolution, $plugin_Flash, $plugin_Director, $plugin_RealPlayer, $plugin_Pdf, $plugin_WindowsMedia, $plugin_Java, $plugin_Cookie, $ip, $browserLang)
{
- return md5( $os . $browserName . $browserVersion . $resolution . $colorDepth . $plugin_Flash . $plugin_Director . $plugin_RealPlayer . $plugin_Pdf . $plugin_WindowsMedia . $plugin_Java . $plugin_Cookie . $ip . $browserLang );
+ return md5( $os . $browserName . $browserVersion . $resolution . $plugin_Flash . $plugin_Director . $plugin_RealPlayer . $plugin_Pdf . $plugin_WindowsMedia . $plugin_Java . $plugin_Cookie . $ip . $browserLang );
}
/**
diff --git a/core/Updates/0.2.12.php b/core/Updates/0.2.12.php
new file mode 100644
index 0000000000..5f15022f0d
--- /dev/null
+++ b/core/Updates/0.2.12.php
@@ -0,0 +1,25 @@
+<?php
+
+$mandatoryUpdates = array(
+ "ALTER TABLE ". Piwik::prefixTable('site') . " CHANGE ts_created ts_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL",
+ "ALTER TABLE ". Piwik::prefixTable('log_visit') . " DROP config_color_depth",
+);
+$error = false;
+$message = '';
+foreach($mandatoryUpdates as $update)
+{
+ try {
+ Piwik_Query( $update );
+ } catch (Exception $e) {
+ $error = true;
+ $message .= "Error trying to execute the query '". $update ."'.\nThe error was: " . $e->getMessage() ;
+ }
+}
+
+if($error)
+{
+ $message .= "\n Please make sure you execute the queries on your mysql database.
+When you have executed these queries, you can manually edit the ". Piwik::prefixTable('option')." table in your Piwik database, ".
+" and set the piwik_version value to 0.2.12. ";
+ throw new UpdateErrorException($message);
+} \ No newline at end of file
diff --git a/core/Version.php b/core/Version.php
index 670ac5564f..99b67c7cd0 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -1,6 +1,6 @@
<?php
final class Piwik_Version {
- const VERSION = '0.2.10';
+ const VERSION = '0.2.12';
}
diff --git a/misc/TODO b/misc/TODO
index d2c2b12fb4..491a274226 100644
--- a/misc/TODO
+++ b/misc/TODO
@@ -1,10 +1,9 @@
-update mechanism? port modification to TIMESTAMP fields in site/user
-
Bugs
+- show version number in UI
- WRONG::: 147 sites Internet différents (utilisant 147 différentes adresses)
- something is wrong in JS calendar when year selected
- error message ugly in IE, wrong in chrome
-- make sure deployement don't include logger in file/db/etc
+- write test to make sure deployement don't include logger in file/db/etc
- disable db plugin default
To clean
diff --git a/piwik.js b/piwik.js
index 2a3342e0f9..0405f27203 100644
--- a/piwik.js
+++ b/piwik.js
@@ -95,7 +95,7 @@ function _pk_getUrlLog( _pk_action_name, _pk_site, _pk_pkurl, _pk_custom_vars )
+'?url='+_pk_escape(document.location.href)
+'&action_name='+_pk_escape(_pk_action_name)
+'&idsite='+_pk_site
- +'&res='+screen.width+'x'+screen.height +'&col='+screen.colorDepth
+ +'&res='+screen.width+'x'+screen.height
+'&h='+_pk_da.getHours()+'&m='+_pk_da.getMinutes()+'&s='+_pk_da.getSeconds()
+'&fla='+_pk_fla+'&dir='+_pk_dir+'&qt='+_pk_qt+'&realp='+_pk_rea+'&pdf='+_pk_pdf
+'&wma='+_pk_wma+'&java='+_pk_jav+'&cookie='+_pk_cookie
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index eccc3f33b9..fc957f0bbd 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -203,7 +203,6 @@ class Piwik_Installation_Controller extends Piwik_Controller
{
Piwik::createTables();
Piwik::createAnonymousUser();
- Piwik::createTablesIndex();
require_once "Version.php";
require_once "Updater.php";
$updater = new Piwik_Updater();