-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Started adding settings not available in MTM but available via _paq #943
Open
AltamashShaikh
wants to merge
11
commits into
5.x-dev
Choose a base branch
from
PG-3907-paq-settings-1
base: 5.x-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1d62118
Started adding settings not available in MTM but available via _paq, …
AltamashShaikh 7be4f4f
Added code to hide/show advanced config
AltamashShaikh 9813810
Added more options and css fix
AltamashShaikh 369b7a0
Merged with 5.x-dev
AltamashShaikh ac23f03
Updated tests
AltamashShaikh bc156ac
Fixes failing test
AltamashShaikh 446f7ba
Added migration script and comment added
AltamashShaikh e6a9920
Updated as suggested
AltamashShaikh dffd7e9
Merged with 5.x-dev
AltamashShaikh ffa184d
Added more configurations for consent
AltamashShaikh 833ba18
Fixes for tests
AltamashShaikh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
|
||
/** | ||
* Matomo - free/libre analytics platform | ||
* | ||
* @link https://matomo.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
* | ||
*/ | ||
|
||
namespace Piwik\Plugins\TagManager; | ||
|
||
use Piwik\Plugins\TagManager\Template\Variable\MatomoConfigurationVariable; | ||
use Piwik\Plugins\TagManager\UpdateHelper\NewVariableParameterMigrator; | ||
use Piwik\Updater; | ||
use Piwik\Updater\Migration\Factory as MigrationFactory; | ||
use Piwik\Updates as PiwikUpdates; | ||
|
||
class Updates_5_2_1 extends PiwikUpdates | ||
{ | ||
/** | ||
* @var MigrationFactory | ||
*/ | ||
private $migration; | ||
|
||
public function __construct(MigrationFactory $factory) | ||
{ | ||
$this->migration = $factory; | ||
} | ||
|
||
/** | ||
* Return database migrations to be executed in this update. | ||
* | ||
* Database migrations should be defined here, instead of in `doUpdate()`, since this method is used | ||
* in the `core:update` command when displaying the queries an update will run. If you execute | ||
* migrations directly in `doUpdate()`, they won't be displayed to the user. Migrations will be executed in the | ||
* order as positioned in the returned array. | ||
* | ||
* @param Updater $updater | ||
* @return Migration\Db[] | ||
*/ | ||
public function getMigrations(Updater $updater) | ||
{ | ||
return array( | ||
); | ||
} | ||
|
||
/** | ||
* Perform the incremental version update. | ||
* | ||
* This method should perform all updating logic. If you define queries in the `getMigrations()` method, | ||
* you must call {@link Updater::executeMigrations()} here. | ||
* | ||
* @param Updater $updater | ||
*/ | ||
public function doUpdate(Updater $updater) | ||
{ | ||
$updater->executeMigrations(__FILE__, $this->getMigrations($updater)); | ||
|
||
// Migrate the MatomoConfiguration type variables to all include the newly configured advanced fields. | ||
$migrator = new NewVariableParameterMigrator(MatomoConfigurationVariable::ID, 'customData', []); | ||
$migrator->addField('setDownloadExtensions', ''); | ||
$migrator->addField('addDownloadExtensions', ''); | ||
$migrator->addField('removeDownloadExtensions', ''); | ||
$migrator->addField('setIgnoreClasses', ''); | ||
$migrator->addField('setReferrerUrl', ''); | ||
$migrator->addField('setApiUrl', ''); | ||
$migrator->addField('setPageViewId', ''); | ||
$migrator->addField('setExcludedReferrers', ''); | ||
$migrator->addField('setDownloadClasses', ''); | ||
$migrator->addField('setLinkClasses', ''); | ||
$migrator->addField('setCampaignNameKey', ''); | ||
$migrator->addField('setCampaignKeywordKey', ''); | ||
$migrator->migrate(); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Would it be safer to name it 5.2.1-b1 in case there's a beta version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snake14 Makes sense 👍
Done please check