Skip to content
Extraits de code Groupes Projets
Valider f4f7b767 rédigé par sgiehl's avatar sgiehl
Parcourir les fichiers

renames method and updates doc

parent d0dba57f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -44,7 +44,7 @@ If the tracker is not initialised correctly, the browser console will display th
* The creation of settings has slightly changed to improve performance. It is now possible to create new settings via the method `$this->makeSetting()` see `Piwik\Plugins\ExampleSettingsPlugin\SystemSettings` for an example.
* It is no longer possible to define an introduction text for settings.
* If requesting multipe periods for one report, the keys that define the range are no longer translated. For example before 3.0 an API response may contain: `<result date="From 2010-02-01 to 2010-02-07">` which is now `<result date="2010-02-01,2010-02-07">`.
* The method `Piwik\Plugin\Archiver::shouldRunWithoutVisits()` has been added. It gives plugin archivers the possibility to decide whether to run if there weren't any visits by overwriting this method.
* The method `Piwik\Plugin\Archiver::shouldRunEvenWhenNoVisits()` has been added. By overwriting this method and returning true, a plugin archiver can force the archiving to run even when there was no visit for the website/date/period/segment combination (by default, archivers are skipped when there is no visit).
* The following deprecated events have been removed as mentioned.
* `Tracker.existingVisitInformation` Use [dimensions](http://developer.piwik.org/guides/dimensions) instead of using `Tracker` events.
* `Tracker.newVisitorInformation`
......
......@@ -115,7 +115,7 @@ class PluginsArchiver
continue;
}
if (!$forceArchivingWithoutVisits && !$visits && !$archiver->shouldRunWithoutVisits()) {
if (!$forceArchivingWithoutVisits && !$visits && !$archiver->shouldRunEvenWhenNoVisits()) {
Log::debug("PluginsArchiver::%s: Skipping archiving for plugin '%s' (no visits).", __FUNCTION__, $pluginName);
continue;
}
......@@ -174,7 +174,7 @@ class PluginsArchiver
$archivers = static::getPluginArchivers();
foreach ($archivers as $pluginName => $archiverClass) {
if ($archiverClass::shouldRunWithoutVisits()) {
if ($archiverClass::shouldRunEvenWhenNoVisits()) {
return true;
}
}
......
......@@ -143,11 +143,13 @@ abstract class Archiver
}
/**
* Whether this Archiver should run even if there aren't any visits.
* By overwriting this method and returning true, a plugin archiver can force the archiving to run even when there
* was no visit for the website/date/period/segment combination
* (by default, archivers are skipped when there is no visit).
*
* @return bool
*/
public static function shouldRunWithoutVisits()
public static function shouldRunEvenWhenNoVisits()
{
return false;
}
......
......@@ -32,7 +32,7 @@ class ArchiveWithNoVisitsTest_MockArchiver extends Archiver
self::$methodsCalled[] = 'aggregateMultipleReports';
}
public static function shouldRunWithoutVisits()
public static function shouldRunEvenWhenNoVisits()
{
return self::$runWithoutVisits;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter