Skip to content

Commit

Permalink
rename again
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Feb 5, 2020
1 parent 8280c20 commit a3282d6
Show file tree
Hide file tree
Showing 58 changed files with 121 additions and 121 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ The Product Changelog at **[matomo.org/changelog](https://matomo.org/changelog)*
* The deprecated Platform API class `\Piwik\DeviceDetectorFactory` has been removed. Use `\Piwik\DeviceDetector\DeviceDetectorFactory` instead
* The JavaScript tracker now uses `sendBeacon` by default if supported by the browser. You can disable this by calling the tracker method `disableAlwaysUseSendBeacon`. As a result, callback parameters won't work anymore and a tracking request might not appear in the developer tools.
* The console option `--piwik-domain` has been removed. Use `--matomo-domain` instead
* The core plugin `CustomPiwikJs` was renamed `CustomTrackerJs`
* The core plugin `CustomPiwikJs` was renamed `CustomJsTracker`

### Deprecations
* The event `CustomPiwikJs.piwikJsChanged` has been deprecated. Use `CustomTrackerJs.trackerJsChanged` instead
* The event `CustomPiwikJs.shouldAddTrackerFile` has been deprecated. Use `CustomTrackerJs.shouldAddTrackerFile` instead
* The event `CustomPiwikJs.piwikJsChanged` has been deprecated. Use `CustomJsTracker.trackerJsChanged` instead
* The event `CustomPiwikJs.shouldAddTrackerFile` has been deprecated. Use `CustomJsTracker.shouldAddTrackerFile` instead

## Matomo 3.13.1

Expand Down
2 changes: 1 addition & 1 deletion config/global.ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@
Plugins[] = Marketplace
Plugins[] = ProfessionalServices
Plugins[] = UserId
Plugins[] = CustomTrackerJs
Plugins[] = CustomJsTracker
Plugins[] = Tour

[PluginsInstalled]
Expand Down
2 changes: 1 addition & 1 deletion config/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,5 @@
/**
* @todo remove in Matomo 5. For BC only
*/
'Piwik\Plugins\CustomPiwikJs\TrackerUpdater' => DI\get(Piwik\Plugins\CustomTrackerJs\TrackerUpdater::class),
'Piwik\Plugins\CustomPiwikJs\TrackerUpdater' => DI\get(Piwik\Plugins\CustomJsTracker\TrackerUpdater::class),
);
8 changes: 4 additions & 4 deletions core/FileIntegrity.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
namespace Piwik;

use Piwik\Container\StaticContainer;
use Piwik\Plugins\CustomTrackerJs\Exception\AccessDeniedException;
use Piwik\Plugins\CustomTrackerJs\TrackerUpdater;
use Piwik\Plugins\CustomJsTracker\Exception\AccessDeniedException;
use Piwik\Plugins\CustomJsTracker\TrackerUpdater;

class FileIntegrity
{
Expand Down Expand Up @@ -372,7 +372,7 @@ protected static function isModifiedPathValid($path)
// as trivial because piwik.js might be already updated, or updated on the next request. We cannot define
// 2 or 3 different filesizes and md5 hashes for one file so we check it here.

if (Plugin\Manager::getInstance()->isPluginActivated('CustomTrackerJs')) {
if (Plugin\Manager::getInstance()->isPluginActivated('CustomJsTracker')) {
$trackerUpdater = new TrackerUpdater();

if ($trackerUpdater->getCurrentTrackerFileContent() === $trackerUpdater->getUpdatedTrackerFileContent()) {
Expand All @@ -383,7 +383,7 @@ protected static function isModifiedPathValid($path)

try {
// the piwik.js tracker file was not updated yet, but may be updated just after the update by
// one of the events CustomTrackerJs is listening to or by a scheduled task.
// one of the events CustomJsTracker is listening to or by a scheduled task.
// In this case, we check whether such an update will succeed later and if it will, the file is
// valid as well as it will be updated on the next request
$trackerUpdater->checkWillSucceed();
Expand Down
4 changes: 2 additions & 2 deletions core/Updates/4.0.0-b1.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ protected function renameTrackerJsPluginInConfig()

foreach ($config->Plugins['Plugins'] as $index => $plugin) {
if ($plugin === 'CustomPiwikJs') {
$config->Plugins['Plugins'][$index] = 'CustomTrackerJs';
$config->Plugins['Plugins'][$index] = 'CustomJsTracker';
}
}

foreach ($config->PluginsInstalled['PluginsInstalled'] as $index => $plugin) {
if ($plugin === 'CustomPiwikJs') {
$config->PluginsInstalled['PluginsInstalled'][$index] = 'CustomTrackerJs';
$config->PluginsInstalled['PluginsInstalled'][$index] = 'CustomJsTracker';
}
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs;
namespace Piwik\Plugins\CustomJsTracker;

use Piwik\Container\StaticContainer;
use Piwik\Piwik;
use Piwik\Plugins\CustomTrackerJs\Exception\AccessDeniedException;
use Piwik\Plugins\CustomJsTracker\Exception\AccessDeniedException;

/**
* API for plugin CustomTrackerJs
* API for plugin CustomJsTracker
*
* @method static \Piwik\Plugins\CustomTrackerJs\API getInstance()
* @method static \Piwik\Plugins\CustomJsTracker\API getInstance()
*/
class API extends \Piwik\Plugin\API
{
Expand All @@ -29,7 +29,7 @@ public function doesIncludePluginTrackersAutomatically()
Piwik::checkUserHasSomeAdminAccess();

try {
$updater = StaticContainer::get('Piwik\Plugins\CustomTrackerJs\TrackerUpdater');
$updater = StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater');
$updater->checkWillSucceed();
return true;
} catch (AccessDeniedException $e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs\Commands;
namespace Piwik\Plugins\CustomJsTracker\Commands;

use Piwik\Container\StaticContainer;
use Piwik\Plugin\ConsoleCommand;
use Piwik\Plugins\CustomTrackerJs\TrackerUpdater;
use Piwik\Plugins\CustomTrackerJs\TrackingCode\PluginTrackerFiles;
use Piwik\Plugins\CustomJsTracker\TrackerUpdater;
use Piwik\Plugins\CustomJsTracker\TrackingCode\PluginTrackerFiles;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down Expand Up @@ -46,7 +46,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

public function updateTracker($sourceFile, $targetFile, $ignoreMinified)
{
$pluginTrackerFiles = StaticContainer::get('Piwik\Plugins\CustomTrackerJs\TrackingCode\PluginTrackerFiles');
$pluginTrackerFiles = StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackingCode\PluginTrackerFiles');

if ($ignoreMinified) {
if (empty($sourceFile) || $sourceFile === $this->getPathOriginalPiwikJs()) {
Expand All @@ -56,7 +56,7 @@ public function updateTracker($sourceFile, $targetFile, $ignoreMinified)
$pluginTrackerFiles->ignoreMinified();
}

$updater = StaticContainer::getContainer()->make('Piwik\Plugins\CustomTrackerJs\TrackerUpdater', array(
$updater = StaticContainer::getContainer()->make('Piwik\Plugins\CustomJsTracker\TrackerUpdater', array(
'fromFile' => $sourceFile, 'toFile' => $targetFile
));
$updater->setTrackerFiles($pluginTrackerFiles);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs;
namespace Piwik\Plugins\CustomJsTracker;

use Piwik\Container\StaticContainer;
use Piwik\Log;
use Piwik\Plugin;

class CustomTrackerJs extends Plugin
class CustomJsTracker extends Plugin
{
public function registerEvents()
{
Expand All @@ -30,8 +30,8 @@ public function registerEvents()
public function updateTracker()
{
try {
if (Plugin\Manager::getInstance()->isPluginActivated('CustomTrackerJs')) {
$trackerUpdater = StaticContainer::get('Piwik\Plugins\CustomTrackerJs\TrackerUpdater');
if (Plugin\Manager::getInstance()->isPluginActivated('CustomJsTracker')) {
$trackerUpdater = StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater');
$trackerUpdater->update();
}
} catch (\Exception $e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\CustomTrackerJs\Diagnostic;
namespace Piwik\Plugins\CustomJsTracker\Diagnostic;

use Piwik\Filechecks;
use Piwik\Filesystem;
use Piwik\Plugins\CustomTrackerJs\File;
use Piwik\Plugins\CustomJsTracker\File;
use Piwik\Plugins\Diagnostics\Diagnostic\Diagnostic;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
use Piwik\SettingsPiwik;
Expand Down Expand Up @@ -54,21 +54,21 @@ public function execute()
}
}

$label = $this->translator->translate('CustomTrackerJs_DiagnosticPiwikJsWritable', $this->makeFilesTitles($filesToCheck));
$label = $this->translator->translate('CustomJsTracker_DiagnosticPiwikJsWritable', $this->makeFilesTitles($filesToCheck));

if (empty($notWritableFiles)) {
return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK, ''));
}

$comment = $this->translator->translate('CustomTrackerJs_DiagnosticPiwikJsNotWritable', $this->makeFilesTitles($notWritableFiles));
$comment = $this->translator->translate('CustomJsTracker_DiagnosticPiwikJsNotWritable', $this->makeFilesTitles($notWritableFiles));

if (!SettingsServer::isWindows()) {
$command = '';
foreach ($notWritableFiles as $notWritableFile) {
$realpath = Filesystem::realpath(PIWIK_INCLUDE_PATH . '/' . $notWritableFile);
$command .= "<br/><code> chmod +w $realpath<br/> chown ". Filechecks::getUserAndGroup() ." " . $realpath . "</code><br />";
}
$comment .= $this->translator->translate('CustomTrackerJs_DiagnosticPiwikJsMakeWritable', array($this->makeFilesTitles($notWritableFiles), $command));
$comment .= $this->translator->translate('CustomJsTracker_DiagnosticPiwikJsMakeWritable', array($this->makeFilesTitles($notWritableFiles), $command));
}

return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_WARNING, $comment));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs\Exception;
namespace Piwik\Plugins\CustomJsTracker\Exception;

use Exception;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs;
namespace Piwik\Plugins\CustomJsTracker;

use Piwik\Plugins\CustomTrackerJs\Exception\AccessDeniedException;
use Piwik\Plugins\CustomJsTracker\Exception\AccessDeniedException;

class File
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs;
namespace Piwik\Plugins\CustomJsTracker;

use Piwik\Container\StaticContainer;

Expand All @@ -19,7 +19,7 @@ public function schedule()

public function updateTracker()
{
$updater = StaticContainer::get('Piwik\Plugins\CustomTrackerJs\TrackerUpdater');
$updater = StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater');
$updater->update();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs;
namespace Piwik\Plugins\CustomJsTracker;

use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Plugins\CustomTrackerJs\TrackingCode\PiwikJsManipulator;
use Piwik\Plugins\CustomTrackerJs\TrackingCode\PluginTrackerFiles;
use Piwik\Plugins\CustomJsTracker\TrackingCode\PiwikJsManipulator;
use Piwik\Plugins\CustomJsTracker\TrackingCode\PluginTrackerFiles;
use Piwik\Piwik;

/**
* Updates the Piwik JavaScript Tracker "piwik.js" in case plugins extend the tracker.
*
* Usage:
* StaticContainer::get('Piwik\Plugins\CustomTrackerJs\TrackerUpdater')->update();
* StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater')->update();
*/
class TrackerUpdater
{
Expand Down Expand Up @@ -54,7 +54,7 @@ public function __construct($fromFile = null, $toFile = null)

$this->setFromFile($fromFile);
$this->setToFile($toFile);
$this->trackerFiles = StaticContainer::get('Piwik\Plugins\CustomTrackerJs\TrackingCode\PluginTrackerFiles');
$this->trackerFiles = StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackingCode\PluginTrackerFiles');
}

public function setFromFile($fromFile)
Expand Down Expand Up @@ -139,7 +139,7 @@ public function update()
*
* @param string $absolutePath The path to the new piwik.js file.
*/
Piwik::postEvent('CustomTrackerJs.trackerJsChanged', [$savedFile]);
Piwik::postEvent('CustomJsTracker.trackerJsChanged', [$savedFile]);

/**
* @todo remove in Matomo 5. For BC only
Expand All @@ -162,7 +162,7 @@ private function updateAlternative($fromFile, $toFile, $newContent)
if ($file->hasWriteAccess() && !$file->isFileContentSame($newContent)) {
$savedFiles = $file->save($newContent);
foreach ($savedFiles as $savedFile) {
Piwik::postEvent('CustomTrackerJs.trackerJsChanged', [$savedFile]);
Piwik::postEvent('CustomJsTracker.trackerJsChanged', [$savedFile]);

/**
* @todo remove in Matomo 5. For BC only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\CustomTrackerJs\TrackingCode;
namespace Piwik\Plugins\CustomJsTracker\TrackingCode;

/**
* Used for when running Piwik tracker tests. We simply include all custom tracker files there.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

namespace Piwik\Plugins\CustomTrackerJs\TrackingCode;
namespace Piwik\Plugins\CustomJsTracker\TrackingCode;

use Piwik\Piwik;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\CustomTrackerJs\TrackingCode;
namespace Piwik\Plugins\CustomJsTracker\TrackingCode;

use Piwik\Piwik;
use Piwik\Plugin;
use Piwik\Plugins\CustomTrackerJs\File;
use Piwik\Plugins\CustomJsTracker\File;

class PluginTrackerFiles
{
Expand Down Expand Up @@ -92,7 +92,7 @@ protected function shouldIncludeFile($pluginName)
* @param bool &$shouldAddFile Decides whether the tracker file belonging to the given plugin should be added or not.
* @param string $pluginName The name of the plugin this file belongs to
*/
Piwik::postEvent('CustomTrackerJs.shouldAddTrackerFile', array(&$shouldAddFile, $pluginName));
Piwik::postEvent('CustomJsTracker.shouldAddTrackerFile', array(&$shouldAddFile, $pluginName));

/**
* @todo remove in Matomo 5. For BC only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return array(
'diagnostics.optional' => DI\add(array(
DI\get('Piwik\Plugins\CustomTrackerJs\Diagnostic\TrackerJsCheck'),
DI\get('Piwik\Plugins\CustomJsTracker\Diagnostic\TrackerJsCheck'),
)),
);
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"DiagnosticPiwikJsWritable": "Zapisovatelný JavaScript záznam (%s)"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"DiagnosticPiwikJsWritable": "JavaScript-sporingsfiler (%s) skrivbare",
"DiagnosticPiwikJsMakeWritable": "Vi anbefaler at gøre %1$s skrivbare ved at køre denne kommando: %2$s"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"PluginDescription": "Ermöglicht es jedem Plugin, die Matomo-JavaScript-Tracking-Datei (matomo.js) zu erweitern und neue Funktionalitäts- und Website-Messfunktionen hinzuzufügen.",
"DiagnosticPiwikJsWritable": "Schreibbarer JavaScript-Tracker (%s)",
"DiagnosticPiwikJsNotWritable": "Für die Matomo JavaScript-Tracker-Datei %s sind keine Schreibrechte vorhanden , das bedeutet, dass andere Plugins den JavaScript-Tracker nicht erweitern können. In Zukunft könnten sogar einige Kernfunktionen nicht wie erwartet funktionieren.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"PluginDescription": "Επιτρέπει σε οποιοδήποτε πρόσθετο να επεκτείνει το αρχείο ιχνηλάτησης σε JavaScript του Matomo (matomo.js) και να προσθέτει νέα λειτουργικότητα και δυνατότητες μετρήσεων των ιστοτόπων.",
"DiagnosticPiwikJsWritable": "Εγγράψιμο Αρχείο Ιχνηλάτησης JavaScript (%s)",
"DiagnosticPiwikJsNotWritable": "Το αρχείο ιχνηλάτησης της JavaScript του Matomo %s δεν είναι εγγράψιμο, που σημαίνει ότι άλλα πρόσθετα δεν μπορούν να επεκτείνουν την ιχνηλάτηση. Μελλοντικά ενδέχεται ορισμένα χαρακτηριστικά του πυρήνα να μην λειτουργούν όπως πρέπει.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"PluginDescription": "Allows any plugin to extend the Matomo JavaScript Tracking file (matomo.js) and add new functionality and website measurement capabilities.",
"DiagnosticPiwikJsWritable": "Writable JavaScript Tracker (%s)",
"DiagnosticPiwikJsNotWritable": "The Matomo JavaScript tracker file %s is not writable which means other plugins cannot extend the JavaScript tracker. In the future even some core features might not work as expected. ",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"DiagnosticPiwikJsWritable": "Skribebla Sekvanta JavaSkripto (%s)",
"DiagnosticPiwikJsNotWritable": "La JavaSkriptan sekvanta dosiero %sne stas skriblebla. Pro tio aliaj kromprogramoj ne povas etendi la JavaSkriptan sekvanto. Estontece eĉ kelkaj kernaj funkcioj povus ne funkcii kiel atendite.",
"DiagnosticPiwikJsMakeWritable": "Ni rekomendas fari %1$sskribebla per funkciado de ĉi tiu komando: %2$s"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CustomTrackerJs": {
"CustomJsTracker": {
"PluginDescription": "Permite a cualquier plugin extender el archivo de rastreo vía JavaScript de Matomo (\"matomo.js\"), y agrega nuevas capacidades de medición de funcionalidad y sitios web.",
"DiagnosticPiwikJsWritable": "Rastreador escribible de JavaScript (%s)",
"DiagnosticPiwikJsNotWritable": "El archivo rastreador vía JavaScript de Matomo %s no es escribible, lo cual significa que otros plugins no pueden extender el rastreador de JavaScript. En el futuro es posible que incluso funciones centrales no funcionen como lo esperado.",
Expand Down
Loading

0 comments on commit a3282d6

Please sign in to comment.