Skip to content
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

Replace deprecated $wgUser by RequestContext::getMain()->getUser() #37

Merged
merged 2 commits into from
Jan 2, 2022

Conversation

mnival
Copy link
Contributor

@mnival mnival commented Dec 10, 2021

Hello,

The current version generates an error. This pull replaces deprecated $wgUser by RequestContext::getMain()->getUser()

Copy link
Contributor

@samwilson samwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, although I haven't tested it.

@mnival
Copy link
Contributor Author

mnival commented Dec 13, 2021

Hello,

I just made a commit to remove the empty line after the function.

The workflow is now OK during my test.

Sorry for the mistake.

@bovender
Copy link

Running this now in production with MW 1.37, works fine.

@DaSchTour DaSchTour merged commit 3e9bd0c into DaSchTour:master Jan 2, 2022
Seb35 added a commit that referenced this pull request Oct 27, 2023
This requires MediaWiki 1.34 and works up to (at least) MediaWiki 1.40.

New features since v4.0.0:
* Ignore wiki editors, to restrict analytics to anonymous users

Maintenance since v4.0.0:
* Replace global $wgUser deprecated in MediaWiki 1.35.2
* Replace User::isLoggedIn() deprecated in MediaWiki 1.34
* PSR-4 autoloading
* Added CI and quality checks
* Improved documentation

Thanks to the following people since v4.0.0 🥳

Eduardo Elias (2):
      Ignore wiki editors
      Make README to be parsed

Goldshop (1):
      Update extension.json

Sam Wilson (2):
      Add CI and linting, and fix errors
      Move Matomo.hooks.php to src/Hooks.php and adjust loading

Youri vd Bogert (1):
      Update README.md

felipeforte (1):
      Updated hook

mnival (2):
      Replace deprecated $wgUser by RequestContext::getMain()->getUser()
      Delete empty line

previously contributed as ttenbergen (1):
      allow plugins

Daniel Schuba (5):
      Merge pull request #32 from Goldshop/patch-1
      Merge pull request #26 from YOUR1/patch-1
      Merge pull request #35 from samwilson/phpcs
      Merge pull request #36 from samwilson/classname
      Merge pull request #37 from mnival/master

Seb35 (10):
      Rebase IgnoreEditors feature on 4.0.0
      Fix $wgMatomo* and $wgPiwik* parameters
      Merge pull request #40 from felipeforte/patch-1
      Restrict plugins to composer/installers
      Merge branch 'fix-ci'
      Make explicit the parameter $wgMatomoIgnoreEditors
      Avoid to silently ignore non-existing parameters
      Fix documentation issues
      Update CI
      Version 5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants