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:
authormattab <matthieu.aubry@gmail.com>2013-10-09 07:17:28 +0400
committermattab <matthieu.aubry@gmail.com>2013-10-09 07:17:28 +0400
commit6d46df58dd4b16a5c8402e34ed018439cbbadee1 (patch)
treeefaeabfe94ab8a601a96c80e1333ae83513f803e /plugins/DBStats
parent9fb5490490913717ccfacec6f597181091be214f (diff)
Refs #4202 removing functions Piwik_GetOption and SetOption. Now use: Option::get and Option::set and Option::delete
Diffstat (limited to 'plugins/DBStats')
-rw-r--r--plugins/DBStats/DBStats.php5
-rwxr-xr-xplugins/DBStats/MySQLMetadataProvider.php5
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php
index 7a042565b6..8a9915051b 100644
--- a/plugins/DBStats/DBStats.php
+++ b/plugins/DBStats/DBStats.php
@@ -13,6 +13,7 @@ namespace Piwik\Plugins\DBStats;
use Piwik\Common;
use Piwik\Date;
+use Piwik\Option;
use Piwik\Piwik;
use Piwik\ScheduledTask;
use Piwik\ScheduledTime\Weekly;
@@ -72,7 +73,7 @@ class DBStats extends \Piwik\Plugin
$api->getIndividualMetricsSummary(true);
$now = Date::now()->getLocalized("%longYear%, %shortMonth% %day%");
- Piwik_SetOption(self::TIME_OF_LAST_TASK_RUN_OPTION, $now);
+ Option::set(self::TIME_OF_LAST_TASK_RUN_OPTION, $now);
}
public function getStylesheetFiles(&$stylesheets)
@@ -83,7 +84,7 @@ class DBStats extends \Piwik\Plugin
/** Returns the date when the cacheDataByArchiveNameReports was last run. */
public static function getDateOfLastCachingRun()
{
- return Piwik_GetOption(self::TIME_OF_LAST_TASK_RUN_OPTION);
+ return Option::get(self::TIME_OF_LAST_TASK_RUN_OPTION);
}
public function getReportDisplayProperties(&$properties)
diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php
index 3a9dc5ed1d..fe7d722fd4 100755
--- a/plugins/DBStats/MySQLMetadataProvider.php
+++ b/plugins/DBStats/MySQLMetadataProvider.php
@@ -16,6 +16,7 @@ use Piwik\Config;
use Piwik\DataTable;
use Piwik\Db;
use Piwik\DbHelper;
+use Piwik\Option;
/**
* Utility class that provides general information about databases, including the size of
@@ -227,7 +228,7 @@ class MySQLMetadataProvider
$dataTableOptionName = $this->getCachedOptionName($status['Name'], 'byArchiveName');
// if option exists && !$forceCache, use the cached data, otherwise create the
- $cachedData = Piwik_GetOption($dataTableOptionName);
+ $cachedData = Option::get($dataTableOptionName);
if ($cachedData !== false && !$forceCache) {
$table = new DataTable();
$table->addRowsFromSerializedArray($cachedData);
@@ -243,7 +244,7 @@ class MySQLMetadataProvider
$serializedTables = $table->getSerialized();
$serializedTable = reset($serializedTables);
- Piwik_SetOption($dataTableOptionName, $serializedTable);
+ Option::set($dataTableOptionName, $serializedTable);
}
// add estimated_size column