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:
-rwxr-xr-xconfig/global.ini.php3
-rwxr-xr-xmodules/Config.php4
-rw-r--r--modules/LogStats.php2
-rw-r--r--modules/LogStats/Generator.php1
-rw-r--r--plugins/Home/templates/index.tpl18
-rw-r--r--plugins/Home/templates/menu.tpl2
-rw-r--r--plugins/Installation/Controller.php1
-rw-r--r--plugins/Provider/Controller.php24
-rw-r--r--plugins/Provider/Provider.php31
-rwxr-xr-xtests/all_tests.php5
-rwxr-xr-xtests/modules/Database.test.php1
11 files changed, 60 insertions, 32 deletions
diff --git a/config/global.ini.php b/config/global.ini.php
index 0874dea829..4f6a776488 100755
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -15,7 +15,7 @@ adapter = PDO_MYSQL ; PDO_MYSQL or MYSQLI
host = localhost
username = root
password =
-dbname = piwik_tests
+dbname = piwik_tests2
tables_prefix = piwiktests_
adapter = PDO_MYSQL
@@ -45,7 +45,6 @@ Plugins[] = Login
Plugins[] = UsersManager
Plugins[] = SitesManager
-Plugins[] = Openads
Plugins[] = Installation
[Plugins_LogStats]
diff --git a/modules/Config.php b/modules/Config.php
index 9161016b6a..137721de2a 100755
--- a/modules/Config.php
+++ b/modules/Config.php
@@ -26,6 +26,7 @@ class Piwik_Config
protected $pathIniFileUserConfig = null;
protected $pathIniFileDefaultConfig = null;
protected $configFileUpdated = false;
+ public $doWriteFileWhenUpdated = true;
// see http://bugs.php.net/bug.php?id=34206
protected $correctCwd;
@@ -65,7 +66,8 @@ class Piwik_Config
function __destruct()
{
// saves the config file if changed
- if($this->configFileUpdated === true)
+ if($this->configFileUpdated === true
+ && $this->doWriteFileWhenUpdated === true)
{
print("write ini file changed");
diff --git a/modules/LogStats.php b/modules/LogStats.php
index 084bf4bcd4..0f8b000590 100644
--- a/modules/LogStats.php
+++ b/modules/LogStats.php
@@ -85,7 +85,7 @@ class Piwik_LogStats
private function initProcess()
{
Piwik_PluginsManager::getInstance()->setPluginsToLoad(
- Piwik_LogStats_Config::getInstance()->Plugins_LogStats['Plugins']->toArray()
+ Piwik_LogStats_Config::getInstance()->Plugins_LogStats['Plugins']
);
$saveStats = Piwik_LogStats_Config::getInstance()->LogStats['record_statistics'];
diff --git a/modules/LogStats/Generator.php b/modules/LogStats/Generator.php
index c14b862229..e869a18793 100644
--- a/modules/LogStats/Generator.php
+++ b/modules/LogStats/Generator.php
@@ -62,6 +62,7 @@ class Piwik_LogStats_Generator
require_once "modules/Piwik.php";
Piwik::createConfigObject('../config/config.ini.php');
+ Zend_Registry::get('config')->doWriteFileWhenUpdated = false;
// setup database
Piwik::createDatabaseObject();
diff --git a/plugins/Home/templates/index.tpl b/plugins/Home/templates/index.tpl
index 459ebda280..bf7cbc1ac3 100644
--- a/plugins/Home/templates/index.tpl
+++ b/plugins/Home/templates/index.tpl
@@ -280,6 +280,22 @@ Site <select name="idSite" onchange='javascript:this.form.submit()'>
<div id='content'>
</div>
-
+
+{if ereg('http://127.0.0.1|http://localhost|http://piwik.org', $url)}
+<!-- Piwik -->
+<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);">
+<script language="javascript" src="piwik.js" type="text/javascript"></script>
+<script type="text/javascript">
+<!--
+piwik_action_name = '';
+piwik_idsite = 1;
+piwik_url = 'piwik.php';
+piwik_log(piwik_action_name, piwik_idsite, piwik_url);
+//-->
+</script><object>
+<noscript><p>Web analytics<img src="piwik.php" style="border:0" alt="piwik"/></p>
+</noscript></object></a>
+<!-- /Piwik -->
+{/if}
{* useful when working on the UI, the page generation is faster to skip other reports...
{php}exit;{/php}*}
diff --git a/plugins/Home/templates/menu.tpl b/plugins/Home/templates/menu.tpl
index 4cfebc795f..bcbfda6d56 100644
--- a/plugins/Home/templates/menu.tpl
+++ b/plugins/Home/templates/menu.tpl
@@ -2,7 +2,7 @@
<ul class="nav">
{foreach from=$menu key=level1 item=level2}
<li>
- <a href='#'>{$level1} &#8595;</a>
+ <a name=''>{$level1} &#8595;</a>
<ul>
{foreach from=$level2 key=name item=urlParameters}
<li><a href='{$urlParameters|@urlRewriteWithParameters}'>{$name}</a></li>
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 35caf7d6dc..c7cbdf6bde 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -34,7 +34,6 @@ class Piwik_Installation_Controller extends Piwik_Controller
public function __construct()
{
- session_start();
if(!isset($_SESSION['currentStepDone']))
{
$_SESSION['currentStepDone'] = '';
diff --git a/plugins/Provider/Controller.php b/plugins/Provider/Controller.php
new file mode 100644
index 0000000000..fe654244dc
--- /dev/null
+++ b/plugins/Provider/Controller.php
@@ -0,0 +1,24 @@
+<?php
+
+
+require_once "ViewDataTable.php";
+class Piwik_Provider_Controller extends Piwik_Controller
+{
+ /**
+ * Provider
+ */
+ function getProvider()
+ {
+ $view = Piwik_ViewDataTable::factory();
+ $view->init( 'Provider', __FUNCTION__, "Provider.getProvider" );
+
+ $view->setColumnsToDisplay( array(0,1) );
+ $view->setSortedColumn( 1 );
+ $view->setLimit( 5 );
+
+ $view->main();
+ echo $view->render();
+ }
+
+}
+
diff --git a/plugins/Provider/Provider.php b/plugins/Provider/Provider.php
index 66d16f0bf0..5a08a9d928 100644
--- a/plugins/Provider/Provider.php
+++ b/plugins/Provider/Provider.php
@@ -196,27 +196,12 @@ class Piwik_Provider extends Piwik_Plugin
}
-require_once "ViewDataTable.php";
-class Piwik_Provider_Controller extends Piwik_Controller
-{
- /**
- * Provider
- */
- function getProvider()
- {
- $view = Piwik_ViewDataTable::factory();
- $view->init( 'Provider', __FUNCTION__, "Provider.getProvider" );
-
- $view->setColumnsToDisplay( array(0,1) );
- $view->setSortedColumn( 1 );
- $view->setLimit( 5 );
-
- $view->main();
- echo $view->render();
- }
-
+// when the plugin is loaded during LogStats these functions are not defined
+if(function_exists('Piwik_AddWidget'))
+{
+ Piwik_AddWidget( 'Provider', 'getProvider', 'Providers');
}
-
-Piwik_AddWidget( 'Provider', 'getProvider', 'Providers');
-
-Piwik_AddMenu('Visitors', 'Provider', array('module' => 'Provider', 'action'=> 'getProvider'));
+if(function_exists('Piwik_AddMenu'))
+{
+ Piwik_AddMenu('Visitors', 'Provider', array('module' => 'Provider', 'action'=> 'getProvider'));
+} \ No newline at end of file
diff --git a/tests/all_tests.php b/tests/all_tests.php
index 264ee1725a..64399e3314 100755
--- a/tests/all_tests.php
+++ b/tests/all_tests.php
@@ -2,8 +2,9 @@
flush();
require_once "config_test.php";
Piwik::createConfigObject();
-$databaseTestName = Zend_Registry::get('config')->database_tests->dbname;
-
+$databaseTestName = Zend_Registry::get('config')->database_tests->dbname;
+
+Zend_Registry::get('config')->doWriteFileWhenUpdated = false;
?>
<h2>Piwik unit tests</h2>
diff --git a/tests/modules/Database.test.php b/tests/modules/Database.test.php
index 51b601919f..114d6c5bb4 100755
--- a/tests/modules/Database.test.php
+++ b/tests/modules/Database.test.php
@@ -150,6 +150,7 @@ class Test_Database extends UnitTestCase
Piwik::createDatabaseObject();
Zend_Registry::get('config')->setTestEnvironment();
+ Zend_Registry::get('config')->doWriteFileWhenUpdated = false;
Piwik::createLogObject();