[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Numbers in the parser profiling data are not internationalized
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401413 ) Change subject: Numbers in the parser profiling data are not internationalized .. Numbers in the parser profiling data are not internationalized Bug: T158607 Change-Id: I7c2939e3171e320dce6a11d1c3ba0caf36c81d8f --- M includes/parser/Parser.php 1 file changed, 17 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/401413/1 diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e7e7aa0..919686e 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -510,39 +510,47 @@ * @return string */ protected function makeLimitReport() { - global $wgShowHostnames; + global $wgShowHostnames, $wgLang; + + $interfaceLang = $wgLang; $maxIncludeSize = $this->mOptions->getMaxIncludeSize(); $cpuTime = $this->mOutput->getTimeSinceStart( 'cpu' ); if ( $cpuTime !== null ) { $this->mOutput->setLimitReportData( 'limitreport-cputime', - sprintf( "%.3f", $cpuTime ) + $interfaceLang->formatNum( sprintf( "%.3f", $cpuTime ) ) ); } $wallTime = $this->mOutput->getTimeSinceStart( 'wall' ); $this->mOutput->setLimitReportData( 'limitreport-walltime', - sprintf( "%.3f", $wallTime ) + $interfaceLang->formatNum( sprintf( "%.3f", $wallTime ) ) ); $this->mOutput->setLimitReportData( 'limitreport-ppvisitednodes', - [ $this->mPPNodeCount, $this->mOptions->getMaxPPNodeCount() ] + [ $interfaceLang->formatNum( $this->mPPNodeCount ), + $interfaceLang->formatNum( $this->mOptions->getMaxPPNodeCount() ) ] ); $this->mOutput->setLimitReportData( 'limitreport-ppgeneratednodes', - [ $this->mGeneratedPPNodeCount, $this->mOptions->getMaxGeneratedPPNodeCount() ] + [ $interfaceLang->formatNum( $this->mGeneratedPPNodeCount ), + $interfaceLang->formatNum( $this->mOptions->getMaxGeneratedPPNodeCount() ) ] ); $this->mOutput->setLimitReportData( 'limitreport-postexpandincludesize', - [ $this->mIncludeSizes['post-expand'], $maxIncludeSize ] + [ $interfaceLang->formatNum( $this->mIncludeSizes['post-expand'] ), + $interfaceLang->formatNum( $maxIncludeSize ) ] ); $this->mOutput->setLimitReportData( 'limitreport-templateargumentsize', - [ $this->mIncludeSizes['arg'], $maxIncludeSize ] + [ $interfaceLang->formatNum( $this->mIncludeSizes['arg'] ), + $interfaceLang->formatNum( $maxIncludeSize ) ] ); $this->mOutput->setLimitReportData( 'limitreport-expansiondepth', - [ $this->mHighestExpansionDepth, $this->mOptions->getMaxPPExpandDepth() ] + [ $interfaceLang->formatNum( $this->mHighestExpansionDepth ), + $interfaceLang->formatNum( $this->mOptions->getMaxPPExpandDepth() ) ] ); $this->mOutput->setLimitReportData( 'limitreport-expensivefunctioncount', - [ $this->mExpensiveFunctionCount, $this->mOptions->getExpensiveParserFunctionLimit() ] + [ $interfaceLang->formatNum( $this->mExpensiveFunctionCount ), + $interfaceLang->formatNum( $this->mOptions->getExpensiveParserFunctionLimit() ) ] ); Hooks::run( 'ParserLimitReportPrepare', [ $this, $this->mOutput ] ); -- To view, visit https://gerrit.wikimedia.org/r/401413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c2939e3171e320dce6a11d1c3ba0caf36c81d8f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Maintenance script to generate fake login attemps from any IP
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401410 ) Change subject: Maintenance script to generate fake login attemps from any IP .. Maintenance script to generate fake login attemps from any IP Change-Id: I01221923387a9e94499efdda39b2e40ee207e27c --- A maintenance/loginAttempt.php 1 file changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LoginNotify refs/changes/10/401410/1 diff --git a/maintenance/loginAttempt.php b/maintenance/loginAttempt.php new file mode 100644 index 000..2c301e7 --- /dev/null +++ b/maintenance/loginAttempt.php @@ -0,0 +1,56 @@ +addDescription( 'Registers a login attempt for a given user' ); + $this->addArg( 'user', 'Target user', true ); + $this->addArg( 'success', 'Whether login attempt was successful (true/false)', false ); + $this->addArg( 'ip', 'IP address of the login attempt', false ); + $this->addArg( 'ua', 'User-agent tsrign of the login attempt', false ); + + $this->requireExtension( 'LoginNotify' ); + } + + public function execute(){ +$username = $this->getArg( 0 ); + $success = $this->getArg( 1, false ) === 'true'; + $ip = $this->getArg( 2, '127.0.0.1' ); + $ua = $this->getArg( 3, 'Login attempt by LoginNotify maintenance script' ); + + $user = User::newFromName( $username, 'usable' ); + if ( !$user ) { + echo "User {$username} does not exist!"; + return; + } + + $user->getRequest()->setIP($ip); + + if ( $success ) { + $res = AuthenticationResponse::newPass( $username ); + } else { + $msg = new Message( 'Failed login from LoginNotify maintenance script' ); + $res = AuthenticationResponse::newFail( $msg ); + } + +\Hooks::run( 'AuthManagerLoginAuthenticateAudit', [ $res, $user, $username ] ); + } +} + +$maintClass = LoginAttempt::class; +require_once RUN_MAINTENANCE_IF_MAIN; -- To view, visit https://gerrit.wikimedia.org/r/401410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01221923387a9e94499efdda39b2e40ee207e27c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LoginNotify Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Expand the access to 2FA on fawiki
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392224 ) Change subject: Expand the access to 2FA on fawiki .. Expand the access to 2FA on fawiki Bug: T180648 Change-Id: Ie2b5953022cdc07f9ac857d0404a08bedeee96ae --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/24/392224/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index dd734f2..0a07855 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9767,7 +9767,7 @@ // Default should include any privileged group that's on more than a few wikis 'default' => [ 'botadmin', 'bureaucrat', 'checkuser', 'eliminator', 'interface-editor', 'sysop', 'oversight' ], '+enwiki' => [ 'abusefilter' ], - '+fawiki' => [ 'templateeditor' ], + '+fawiki' => [ 'templateeditor', 'rollbacker', 'extendedconfirmed' ], '+fishbowl' => [ 'user' ], '+incubatorwiki' => [ 'translator' ], '+metawiki' => [ 'centralnoticeadmin', 'global-renamer', 'wmf-officeit', 'wmf-supportsafety' ], -- To view, visit https://gerrit.wikimedia.org/r/392224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2b5953022cdc07f9ac857d0404a08bedeee96ae Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: UserGroupsChanged documentation updated
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391148 ) Change subject: UserGroupsChanged documentation updated .. UserGroupsChanged documentation updated The order of variables in the docs now matches the two use cases in /tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php and in Echo's Hooks.php Bug: T180292 Change-Id: If00f07431a91b6e1439567834c16415a0fab0876 --- M docs/hooks.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/391148/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 6c1597f..ba0a12d 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1080,10 +1080,10 @@ $user: User who is adding the tags. 'ChangeUserGroups': Called before user groups are changed. -$performer: The User who will perform the change $user: The User whose groups will be changed &$add: The groups that will be added &$remove: The groups that will be removed +$performer: The User who will perform the change 'Collation::factory': Called if $wgCategoryCollation is an unknown collation. $collationName: Name of the collation in question -- To view, visit https://gerrit.wikimedia.org/r/391148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If00f07431a91b6e1439567834c16415a0fab0876 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Update the blockrange message in AbuseFilter, remove "/16" f...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390889 ) Change subject: Update the blockrange message in AbuseFilter, remove "/16" from it .. Update the blockrange message in AbuseFilter, remove "/16" from it This should have really been done as part of I8dfa17f55 but it's never too late! Bug: T179456 Change-Id: I833df28634835c675944e3a20e123b5739e05205 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/89/390889/1 diff --git a/i18n/en.json b/i18n/en.json index df36d71..757e6f6 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -158,7 +158,7 @@ "abusefilter-edit-action-degroup": "Remove the user from all privileged groups", "abusefilter-edit-action-block": "Block the user and/or IP address from editing", "abusefilter-edit-action-throttle": "Trigger actions only if the user trips a rate limit", - "abusefilter-edit-action-rangeblock": "Block the /16 range from which the user originates", + "abusefilter-edit-action-rangeblock": "Block the respective IP range from which the user originates", "abusefilter-edit-action-tag": "Tag the edit for further review", "abusefilter-edit-throttle-count": "Number of actions to allow:", "abusefilter-edit-throttle-period": "Period of time:", -- To view, visit https://gerrit.wikimedia.org/r/390889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I833df28634835c675944e3a20e123b5739e05205 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Set a default value for $reason in onUserGroupsChanged
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390851 ) Change subject: Set a default value for $reason in onUserGroupsChanged .. Set a default value for $reason in onUserGroupsChanged This will help avoiding errors in unit tests Bug: T180292 Change-Id: I89e83bd66b7a976b7b5233c897d76000373a31ef --- M Hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/51/390851/1 diff --git a/Hooks.php b/Hooks.php index 71f490b..cdf0255 100644 --- a/Hooks.php +++ b/Hooks.php @@ -701,7 +701,7 @@ * @return bool */ public static function onUserGroupsChanged( $user, $add, $remove, $performer, - $reason, array $oldUGMs = [], array $newUGMs = [] ) { + $reason = false, array $oldUGMs = [], array $newUGMs = [] ) { if ( !$performer ) { // TODO: Implement support for autopromotion return true; -- To view, visit https://gerrit.wikimedia.org/r/390851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89e83bd66b7a976b7b5233c897d76000373a31ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: UserGroupsChanged hook should specify the performer of the c...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390850 ) Change subject: UserGroupsChanged hook should specify the performer of the change .. UserGroupsChanged hook should specify the performer of the change Otherwise, there will be a unit-testing error when Echo is enabled Bug: T180292 Change-Id: Ibc185c82ad2a03e06e5727a633e6ab6bccce3345 --- M tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/390850/1 diff --git a/tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php index 6970313..457d7af 100644 --- a/tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php @@ -73,7 +73,7 @@ ); $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin ); - \Hooks::run( 'UserGroupsChanged', [ $user, [ 'added' ], [ 'removed' ] ] ); + \Hooks::run( 'UserGroupsChanged', [ $user, [ 'added' ], [ 'removed' ], $user ] ); } public function testOnUserLoggedIn() { -- To view, visit https://gerrit.wikimedia.org/r/390850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc185c82ad2a03e06e5727a633e6ab6bccce3345 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Page count should be localized in MassMessage messages
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387967 ) Change subject: Page count should be localized in MassMessage messages .. Page count should be localized in MassMessage messages Change-Id: I5e03c8f69ed9a913574b33cc258043417c82f1c4 --- M includes/SpecialMassMessage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/67/387967/1 diff --git a/includes/SpecialMassMessage.php b/includes/SpecialMassMessage.php index 9ab37e7..f8db4bd 100644 --- a/includes/SpecialMassMessage.php +++ b/includes/SpecialMassMessage.php @@ -75,7 +75,7 @@ $result = $form->tryAuthorizedSubmit(); if ( $result === true || ( $result instanceof Status && $result->isGood() ) ) { if ( $this->state === 'submit' ) { // If it's preview, everything is shown already. - $msg = $this->msg( 'massmessage-submitted' )->params( $this->count )->plain(); + $msg = $this->msg( 'massmessage-submitted' )->numParams( $this->count )->plain(); $output->addWikiText( $msg ); $output->addWikiMsg( 'massmessage-nextsteps' ); } -- To view, visit https://gerrit.wikimedia.org/r/387967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e03c8f69ed9a913574b33cc258043417c82f1c4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: AbuseFilter block range should not exceed wgBlockCIDRLimit
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387761 ) Change subject: AbuseFilter block range should not exceed wgBlockCIDRLimit .. AbuseFilter block range should not exceed wgBlockCIDRLimit This patch introduces a config variable for the range block sizes. It changes the defaut IPv6 block from /16 to /19 using the same reasoning as Ia25e156fd8234519c4d74f1d41d93f94a313ce14 Using a config var (as opposed to hardcoded range size) allows future changes proposed in T179454 to make the range size vary for different IPs, based on the actual subnet they belong to. Bug: T179455, T179456 Change-Id: I8dfa17f553a7af524f0a11c0fd51c48773e27be5 --- M extension.json M includes/AbuseFilter.class.php 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/61/387761/1 diff --git a/extension.json b/extension.json index 4bbb34f..8a9dfc7 100644 --- a/extension.json +++ b/extension.json @@ -250,7 +250,11 @@ "AbuseFilterLogIPMaxAge": 7776000, "AbuseFilterProfile": false, "AbuseFilterRuntimeProfile": false, - "AbuseFilterSlowFilterRuntimeLimit": 500 + "AbuseFilterSlowFilterRuntimeLimit": 500, + "AbuseFilterRangeBlockSize" : { + "IPv4": 16, + "IPv6": 19 + } }, "load_composer_autoloader": true, "manifest_version": 1 diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php index 0487452..22b9ad5 100644 --- a/includes/AbuseFilter.class.php +++ b/includes/AbuseFilter.class.php @@ -1447,12 +1447,18 @@ ]; break; case 'rangeblock': + if ( IP::isIPv6( $wgRequest->getIP() ) ) { + $CIDRsize = max( $wgAbuseFilterRangeBlockSize['IPv6'], $wgBlockCIDRLimit['IPv6'] ); + } else { + $CIDRsize = max( $wgAbuseFilterRangeBlockSize['IPv4'], $wgBlockCIDRLimit['IPv4'] ); + } + $blockCIDR = $wgRequest->getIP() . '/' . $CIDRsize; self::doAbuseFilterBlock( [ 'desc' => $rule_desc, 'number' => $rule_number ], - IP::sanitizeRange( $wgRequest->getIP() . '/16' ), + IP::sanitizeRange( $blockCIDR ), '1 week', false ); -- To view, visit https://gerrit.wikimedia.org/r/387761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8dfa17f553a7af524f0a11c0fd51c48773e27be5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Filter ID should always go through formatNum()
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387755 ) Change subject: Filter ID should always go through formatNum() .. Filter ID should always go through formatNum() Change-Id: I2bd833c35128b3c39c7882321747837184095bef --- M includes/special/SpecialAbuseLog.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/55/387755/1 diff --git a/includes/special/SpecialAbuseLog.php b/includes/special/SpecialAbuseLog.php index 16529d3..00aebcb 100644 --- a/includes/special/SpecialAbuseLog.php +++ b/includes/special/SpecialAbuseLog.php @@ -353,7 +353,10 @@ $output = Xml::element( 'legend', null, - $this->msg( 'abusefilter-log-details-legend', $id )->text() + $this->msg( + 'abusefilter-log-details-legend', + $this->getLanguage()->formatNum( $id ) + )->text() ); $output .= Xml::tags( 'p', null, $this->formatRow( $row, false ) ); -- To view, visit https://gerrit.wikimedia.org/r/387755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bd833c35128b3c39c7882321747837184095bef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...HitCounters[master]: Update .gitignore on HitCounters
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385986 ) Change subject: Update .gitignore on HitCounters .. Update .gitignore on HitCounters It was essentially copied from the .gitignore in AbuseFilter Change-Id: I625e32c590d17b14ac6cb29a0f57de62a996c4ee --- M .gitignore 1 file changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HitCounters refs/changes/86/385986/1 diff --git a/.gitignore b/.gitignore index 60e7756..4489bce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,23 @@ /node_modules/ +/vendor/ +/composer.lock + +# Editors +*.kate-swp *~ -.#* \#*# +.#* +.*.swp +.project +.buildpath +.classpath +.settings +cscope.files +cscope.out +*.orig +## NetBeans +nbproject* +project.index +## Sublime +sublime-* +sftp-config.json -- To view, visit https://gerrit.wikimedia.org/r/385986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I625e32c590d17b14ac6cb29a0f57de62a996c4ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/HitCounters Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Remove coding standard rule exclusions
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385411 ) Change subject: Remove coding standard rule exclusions .. Remove coding standard rule exclusions Rename files and remove ClassMatchesFilename.WrongCase exclusion Bug: T178007 Change-Id: I0722312607041b3feeb7f68d28cc99f409eb3afe --- R maintenance/AddMissingLoggingEntries.php R maintenance/PurgeOldLogIPData.php M phpcs.xml 3 files changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/11/385411/1 diff --git a/maintenance/addMissingLoggingEntries.php b/maintenance/AddMissingLoggingEntries.php similarity index 100% rename from maintenance/addMissingLoggingEntries.php rename to maintenance/AddMissingLoggingEntries.php diff --git a/maintenance/purgeOldLogIPData.php b/maintenance/PurgeOldLogIPData.php similarity index 100% rename from maintenance/purgeOldLogIPData.php rename to maintenance/PurgeOldLogIPData.php diff --git a/phpcs.xml b/phpcs.xml index 01df36b..2ca7706 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -5,7 +5,6 @@ - -- To view, visit https://gerrit.wikimedia.org/r/385411 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0722312607041b3feeb7f68d28cc99f409eb3afe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Add missing documentation for protected functions
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385410 ) Change subject: Add missing documentation for protected functions .. Add missing documentation for protected functions Bug: T178007 Change-Id: Ia1ae78b30b889b7a8965354ae0a404bf9a520917 --- M includes/AbuseFilterModifyLogFormatter.php M includes/Views/AbuseFilterViewEdit.php M includes/special/SpecialAbuseFilter.php M includes/special/SpecialAbuseLog.php M phpcs.xml 5 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/10/385410/1 diff --git a/includes/AbuseFilterModifyLogFormatter.php b/includes/AbuseFilterModifyLogFormatter.php index 8a148f2..3a55314 100644 --- a/includes/AbuseFilterModifyLogFormatter.php +++ b/includes/AbuseFilterModifyLogFormatter.php @@ -2,6 +2,9 @@ class AbuseFilterModifyLogFormatter extends LogFormatter { + /** +* @return string +*/ protected function getMessageKey() { return 'abusefilter-logentry-modify'; } diff --git a/includes/Views/AbuseFilterViewEdit.php b/includes/Views/AbuseFilterViewEdit.php index dafa852..9b3938d 100644 --- a/includes/Views/AbuseFilterViewEdit.php +++ b/includes/Views/AbuseFilterViewEdit.php @@ -1124,6 +1124,9 @@ return AbuseFilter::translateFromHistory( $row ); } + /** +* @return null +*/ protected function exposeWarningMessages() { global $wgOut, $wgAbuseFilterDefaultWarningMessage; $wgOut->addJsConfigVars( diff --git a/includes/special/SpecialAbuseFilter.php b/includes/special/SpecialAbuseFilter.php index 04d5819..21687c6 100644 --- a/includes/special/SpecialAbuseFilter.php +++ b/includes/special/SpecialAbuseFilter.php @@ -124,6 +124,9 @@ $this->mFilter = $filter; } + /** +* @return string +*/ protected function getGroupName() { return 'wiki'; } diff --git a/includes/special/SpecialAbuseLog.php b/includes/special/SpecialAbuseLog.php index 1decfeb..e5b30d9 100644 --- a/includes/special/SpecialAbuseLog.php +++ b/includes/special/SpecialAbuseLog.php @@ -629,6 +629,11 @@ } } + /** +* @param int $userId +* @param string $userName +* @return string +*/ protected static function getUserLinks( $userId, $userName ) { static $cache = []; @@ -674,6 +679,9 @@ return (bool)$row->afl_deleted; } + /** +* @return string +*/ protected function getGroupName() { return 'changes'; } diff --git a/phpcs.xml b/phpcs.xml index 01df36b..d710af2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,7 +1,6 @@ - -- To view, visit https://gerrit.wikimedia.org/r/385410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia1ae78b30b889b7a8965354ae0a404bf9a520917 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Changing $wgCheckUserCIDRLimit['IPv6'] from 32 to 19
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383381 ) Change subject: Changing $wgCheckUserCIDRLimit['IPv6'] from 32 to 19 .. Changing $wgCheckUserCIDRLimit['IPv6'] from 32 to 19 Reasoning is the same as Ia25e156fd8234519c4d74f1d41d93f94a313ce14 Bug: T177859 Change-Id: I0b85dace08cee46759deba6b4cc2fdde83fd2b4a --- M extension.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/81/383381/1 diff --git a/extension.json b/extension.json index 0803a14..48aefa6 100644 --- a/extension.json +++ b/extension.json @@ -19,7 +19,7 @@ "@doc": "see CheckUser.php", "CheckUserCIDRLimit": { "IPv4": 16, - "IPv6": 32 + "IPv6": 19 }, "CheckUserMaxBlocks": 200, "CUPublicKey": "", -- To view, visit https://gerrit.wikimedia.org/r/383381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b85dace08cee46759deba6b4cc2fdde83fd2b4a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: CheckUser "contributions" link should be a red link for non-...
Huji has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380420 ) Change subject: CheckUser "contributions" link should be a red link for non-existent accounts .. CheckUser "contributions" link should be a red link for non-existent accounts In Special:CheckUser, when a user had tried create and account while this was prevented by abusefilter, his or her "contributions" link was still blue instead of a red link (as if that user actually exists). The patch add takes advantage of the existing yet unsued css class .mw-anonuserlink, and turn the link to red. Bug: T170507 Change-Id: I669affa176f6c5b0dbf61ac3ca4e77a4fb6eb3e5 --- M i18n/en.json M i18n/qqq.json M specials/SpecialCheckUser.php 3 files changed, 50 insertions(+), 9 deletions(-) Approvals: Huji: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index ce5d335..cfe7fe9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -81,8 +81,7 @@ "checkuser-create-action": "was created", "checkuser-email-action": "sent an email to user \"$1\"", "checkuser-reset-action": "reset password for user \"$1\"", - "checkuser-userlinks-ip": "([[User_talk:$1|talk]] | [[Special:Contributions/$1|contribs]] | [[Special:Block/$1|block]] | [https://www.robtex.com/whois/$1.html WHOIS/RDNS])", - "checkuser-userlinks": "([[User_talk:$1|talk]] | [[Special:Contributions/$1|contribs]] | [[Special:Block/$1|block]])", + "checkuser-userlinks-ip": "([https://www.robtex.com/whois/$1.html WHOIS/RDNS])", "checkuser-toollinks": "[[https://www.robtex.com/whois/$1.html WHOIS/RDNS] ·\n[https://www.robtex.com/rbls/$1.html RBLs] ·\n[http://www.dnsstuff.com/tools/tracert.ch?ip=$1 Traceroute] ·\n[https://www.ip2location.com/$1 Geolocate] ·\n[https://www.dan.me.uk/torcheck?ip=$1 Tor check]]", "checkuser-token-fail": "Session failure. Please try again.", "group-checkuser.css": "/* CSS placed here will affect checkuser only */", diff --git a/i18n/qqq.json b/i18n/qqq.json index a80836a..4a5a710 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -104,7 +104,6 @@ "checkuser-email-action": "Logged text when a user sends an e-mail. Probably preceded by the name of the checkuser.\n\nParameters:\n* $1 - a salted MD5 hash for the user an email was sent to", "checkuser-reset-action": "Logged text when a user resets a password. Parameters:\n* $1 - the username for which the password was reset. Can be used for GENDER.", "checkuser-userlinks-ip": "Links shown next to an IP address in a CheckUser result entry. $1 - IP address\n\nSee also:\n*{{msg-mw|Signature}}\n*{{msg-mw|Checkuser-userlinks}}", - "checkuser-userlinks": "Links shown next to a user in a CheckUser result entry. $1 - Name of user\n\nSee also:\n*{{msg-mw|Signature}}\n*{{msg-mw|Checkuser-userlinks-ip}}", "checkuser-toollinks": "{{notranslate}}\nParameters:\n* $1 - IP address", "checkuser-token-fail": "Error message shown when the CSRF token does not match the current session.", "group-checkuser.css": "{{doc-group|checkuser|css}}", diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index 135d825..cee2dd2 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -1074,12 +1074,34 @@ $s .= ''; $s .= Xml::check( 'users[]', false, [ 'value' => $name ] ) . ''; // Load user object - $user = User::newFromName( $name, false ); + $usernfn = User::newFromName( $name, false ); // Add user page and tool links - $s .= Linker::userLink( -1, $name ) . ' '; + if ( !IP::isIPAddress( $usernfn ) ) { + $idforlinknfn = -1; + } else { + $idforlinknfn = $users_ids[$name]; + } + $user = User::newFromId( $users_ids[$name] ); + $classnouser = false; + if ( IP::isIPAddress( $name ) !== IP::isIPAddress( $user ) ) { + // User does not exist + $idforlink = -1; + $classnouser = true; + } else { + $idforlink = $users_ids[$name]; + } + if ( $classnouser === true ) { + $s .= ''; + } else { + $s .= ''; + } +
[MediaWiki-commits] [Gerrit] mediawiki...HitCounters[master]: Call AbuseFilter hooks for its page-views variable
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381500 ) Change subject: Call AbuseFilter hooks for its page-views variable .. Call AbuseFilter hooks for its page-views variable Goes with I38cd7cbf3e595890b53624a477010bd49c9b8552 Bug: T159069 Change-Id: Ief573fb412d332bd4ad6ad8de3052dd85d534b82 --- M extension.json M includes/HitCounters.hooks.php 2 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HitCounters refs/changes/00/381500/1 diff --git a/extension.json b/extension.json index 193be7a..d2a82ce 100644 --- a/extension.json +++ b/extension.json @@ -42,6 +42,12 @@ ], "SkinTemplateOutputPageBeforeExec": [ "HitCounters\\Hooks::onSkinTemplateOutputPageBeforeExec" + ], + "AbuseFilter-builder": [ + "HitCounter\\Hooks::onAbuseFilterBuilder" + ], + "AbuseFilter-generateTitleVars": [ + "HitCounter\\Hooks:onGenerateTitleVars" ] }, "AutoloadClasses": { diff --git a/includes/HitCounters.hooks.php b/includes/HitCounters.hooks.php index 1d5105f..35d6600 100644 --- a/includes/HitCounters.hooks.php +++ b/includes/HitCounters.hooks.php @@ -125,6 +125,8 @@ ); DeferredUpdates::addUpdate( new SiteStatsUpdate( 1, 0, 0 ) ); } + + Hooks::run( 'AbuseFilter-builder' } public static function onSkinTemplateOutputPageBeforeExec( @@ -160,4 +162,18 @@ } } } + + public static function onAbuseFilterBuilder( + $builderValues + ) { + $builderValues['vars']['article_views'] = 'article-views'; + } + + public static function onGenerateTitleVars( + AbuseFilterVariableHolder $vars, + $title, + $prefix + ) { + $vars->setVar( $prefix . '_VIEWS', HitCoutner::getCount( $title ) ); + } } -- To view, visit https://gerrit.wikimedia.org/r/381500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief573fb412d332bd4ad6ad8de3052dd85d534b82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/HitCounters Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Unregister hooks that interfere with unit testing
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381231 ) Change subject: Unregister hooks that interfere with unit testing .. Unregister hooks that interfere with unit testing Id7403f57cc9d751ada85b611193c1d8f3503e713 did not properly reference the hook Bug: T378652 Change-Id: Ibff72c0efe82ba6fd4458e3c8a96179f50ca21b0 --- M tests/phpunit/includes/user/PasswordResetTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/381231/1 diff --git a/tests/phpunit/includes/user/PasswordResetTest.php b/tests/phpunit/includes/user/PasswordResetTest.php index feae26a..68b7959 100644 --- a/tests/phpunit/includes/user/PasswordResetTest.php +++ b/tests/phpunit/includes/user/PasswordResetTest.php @@ -152,7 +152,7 @@ // Unregister the hooks for proper unit testing $this->mergeMwGlobalArrayValue( 'wgHooks', [ - 'mailPasswordInternal' => [], + 'User::mailPasswordInternal' => [], 'SpecialPasswordResetOnSubmit' => [], ] ); -- To view, visit https://gerrit.wikimedia.org/r/381231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibff72c0efe82ba6fd4458e3c8a96179f50ca21b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not run tests that depend on curl if it is not loaded
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378837 ) Change subject: Do not run tests that depend on curl if it is not loaded .. Do not run tests that depend on curl if it is not loaded Bug: T176193 Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed --- M tests/phpunit/includes/http/HttpTest.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/378837/1 diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php index 3693a27..fdee40f 100644 --- a/tests/phpunit/includes/http/HttpTest.php +++ b/tests/phpunit/includes/http/HttpTest.php @@ -4,6 +4,13 @@ * @group Http */ class HttpTest extends MediaWikiTestCase { + public function setUp() { + parent::setUp(); + if ( !extension_loaded( 'curl' ) ) { + $this->markTestSkipped( "PHP extension 'curl' is not loaded, skipping." ); + } + } + /** * @dataProvider cookieDomains * @covers Cookie::validateCookieDomain -- To view, visit https://gerrit.wikimedia.org/r/378837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Handle password reset in unit tests gracefully
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378772 ) Change subject: Handle password reset in unit tests gracefully .. Handle password reset in unit tests gracefully Bug: T176102 Change-Id: I519622458e9005bb4f886cd4c498aba949fd1221 --- M CheckUser.hooks.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/72/378772/1 diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php index 8f3586a..d09b4ff 100644 --- a/CheckUser.hooks.php +++ b/CheckUser.hooks.php @@ -96,6 +96,13 @@ public static function updateCUPasswordResetData( User $user, $ip, $account ) { global $wgRequest; + if ( !$user->getId() ) { + // Should only occur in unit tests + wfDebugLog( __CLASS__, + __METHOD__ . ': password reset performed on non-existent user account' ); + return false; + } + // Get XFF header $xff = $wgRequest->getHeader( 'X-Forwarded-For' ); list( $xff_ip, $isSquidOnly ) = self::getClientIPfromXFF( $xff ); -- To view, visit https://gerrit.wikimedia.org/r/378772 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I519622458e9005bb4f886cd4c498aba949fd1221 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [PoC] Do not merge
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378764 ) Change subject: [PoC] Do not merge .. [PoC] Do not merge The patch shows how Autoblock test fails Pertinent to Bug T176103 Change-Id: I3a090f7bae5ba266c3cd4500ecf83338fb8503bb --- M tests/phpunit/includes/user/UserTest.php 1 file changed, 68 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/378764/1 diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index aa368de..b2d1a78 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -600,6 +600,13 @@ 'wgSecretKey' => MWCryptRand::generateHex( 64, true ), ] ); + $performingRequest = new FauxRequest(); + $performingRequest->setIP( '1.2.3.4' ); + $performingUser = $this->getMockBuilder( User::class )->getMock(); + $performingUser->expects( $this->any() )->method( 'getRequest' )->willReturn( $performingRequest ); + $performingUser->expects( $this->any() )->method( 'isAllowed' )->willReturn( true ); + $performingUser->expects( $this->any() )->method( 'getId' )->willReturn( 100 ); + // 1. Log in a test user, and block them. $user1tmp = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); @@ -608,9 +615,11 @@ $block = new Block( [ 'enableAutoblock' => true, 'expiry' => wfTimestamp( TS_MW, $expiryFiveHours ), + 'by' => $performingUser->getId(), ] ); $block->setTarget( $user1tmp ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user1 = User::newFromSession( $request1 ); $user1->mBlock = $block; $user1->load(); @@ -619,8 +628,8 @@ $this->assertTrue( $user1->isLoggedIn() ); $this->assertTrue( $user1->isBlocked() ); $this->assertEquals( Block::TYPE_USER, $block->getType() ); - $this->assertTrue( $block->isAutoblocking() ); - $this->assertGreaterThanOrEqual( 1, $block->getId() ); + $this->assertTrue( $block->isAutoblocking(), 'Autoblock works' ); + $this->assertGreaterThanOrEqual( 1, $block->getId(), 'Block ID is correct' ); // Test for the desired cookie name, value, and expiry. $cookies = $request1->response()->getCookies(); @@ -639,7 +648,8 @@ $this->assertTrue( $user2->isAnon() ); $this->assertFalse( $user2->isLoggedIn() ); $this->assertTrue( $user2->isBlocked() ); - $this->assertEquals( true, $user2->getBlock()->isAutoblocking() ); // Non-strict type-check. + // Non-strict type-check. + $this->assertEquals( true, $user2->getBlock()->isAutoblocking(), 'Autoblock still works' ); // Can't directly compare the objects becuase of member type differences. // One day this will work: $this->assertEquals( $block, $user2->getBlock() ); $this->assertEquals( $block->getId(), $user2->getBlock()->getId() ); @@ -672,13 +682,24 @@ 'wgSecretKey' => MWCryptRand::generateHex( 64, true ), ] ); + $performingRequest = new FauxRequest(); + $performingRequest->setIP( '1.2.3.4' ); + $performingUser = $this->getMockBuilder( User::class )->getMock(); + $performingUser->expects( $this->any() )->method( 'getRequest' )->willReturn( $performingRequest ); + $performingUser->expects( $this->any() )->method( 'isAllowed' )->willReturn( true ); + $performingUser->expects( $this->any() )->method( 'getId' )->willReturn( 100 ); + // 1. Log in a test user, and block them. $testUser = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); $request1->getSession()->setUser( $testUser ); - $block = new Block( [ 'enableAutoblock' => true ] ); + $block = new Block( [ + 'enableAutoblock' => true, + 'by' => $performingUser->getId(), + ] ); $block->setTarget( $testUser ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user = User::newFromSession( $request1 ); $user->mBlock = $block; $user->load(); @@ -708,13 +729,26 @@
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Assert that blocks were inserted successfully in UserTest
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378752 ) Change subject: Assert that blocks were inserted successfully in UserTest .. Assert that blocks were inserted successfully in UserTest Bug: T176103 Change-Id: Ia8afc37605a844590abe49eaad1e806bd2c7f6f8 --- M tests/phpunit/includes/user/UserTest.php 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/378752/1 diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index aa368de..a7d8f38 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -610,7 +610,8 @@ 'expiry' => wfTimestamp( TS_MW, $expiryFiveHours ), ] ); $block->setTarget( $user1tmp ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user1 = User::newFromSession( $request1 ); $user1->mBlock = $block; $user1->load(); @@ -678,7 +679,8 @@ $request1->getSession()->setUser( $testUser ); $block = new Block( [ 'enableAutoblock' => true ] ); $block->setTarget( $testUser ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user = User::newFromSession( $request1 ); $user->mBlock = $block; $user->load(); @@ -714,7 +716,8 @@ $request1->getSession()->setUser( $user1Tmp ); $block = new Block( [ 'enableAutoblock' => true, 'expiry' => 'infinity' ] ); $block->setTarget( $user1Tmp ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user1 = User::newFromSession( $request1 ); $user1->mBlock = $block; $user1->load(); @@ -801,7 +804,8 @@ $request1->getSession()->setUser( $user1tmp ); $block = new Block( [ 'enableAutoblock' => true ] ); $block->setTarget( $user1tmp ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user1 = User::newFromSession( $request1 ); $user1->mBlock = $block; $user1->load(); @@ -838,7 +842,8 @@ $request1->getSession()->setUser( $user1tmp ); $block = new Block( [ 'enableAutoblock' => true ] ); $block->setTarget( $user1tmp ); - $block->insert(); + $res = $block->insert(); + $this->assertTrue( (bool)$res['id'], 'Block succeeded' ); $user1 = User::newFromSession( $request1 ); $user1->mBlock = $block; $user1->load(); -- To view, visit https://gerrit.wikimedia.org/r/378752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8afc37605a844590abe49eaad1e806bd2c7f6f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Introduce a userscripts directory
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378734 ) Change subject: Introduce a userscripts directory .. Introduce a userscripts directory Bug: T176147 Change-Id: Ia9fc57243f5b66b20b00911f373c916d79945ceb --- A userscripts/__init__.py 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/378734/1 diff --git a/userscripts/__init__.py b/userscripts/__init__.py new file mode 100644 index 000..02a8c63 --- /dev/null +++ b/userscripts/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +"""THIS DIRECTORY IS TO HOLD USER-DEFINED BOT SCRIPTS.""" -- To view, visit https://gerrit.wikimedia.org/r/378734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9fc57243f5b66b20b00911f373c916d79945ceb Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Do not merge
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378652 ) Change subject: [WIP] Do not merge .. [WIP] Do not merge PaswordResetTest::testExecute_email should pass a mock user as the target of password reset. Bug: T176102 Change-Id: Id7403f57cc9d751ada85b611193c1d8f3503e713 --- M tests/phpunit/includes/user/PasswordResetTest.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/378652/1 diff --git a/tests/phpunit/includes/user/PasswordResetTest.php b/tests/phpunit/includes/user/PasswordResetTest.php index 53f02df..fb01aa6 100644 --- a/tests/phpunit/includes/user/PasswordResetTest.php +++ b/tests/phpunit/includes/user/PasswordResetTest.php @@ -180,7 +180,10 @@ $status = $passwordReset->isAllowed( $performingUser ); $this->assertTrue( $status->isGood() ); - $status = $passwordReset->execute( $performingUser, null, 'f...@bar.baz' ); + $status = $passwordReset->execute( + $performingUser, + $targetUser2->getName(), + 'f...@bar.baz' ); $this->assertTrue( $status->isGood() ); } } -- To view, visit https://gerrit.wikimedia.org/r/378652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7403f57cc9d751ada85b611193c1d8f3503e713 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not run CollationFaTest if 'intl' is not loaded
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378420 ) Change subject: Do not run CollationFaTest if 'intl' is not loaded .. Do not run CollationFaTest if 'intl' is not loaded Bug: T176040 Change-Id: I6b19bf1123d4dca5a1c8e002c0de65bab2138180 --- M tests/phpunit/includes/collation/CollationFaTest.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/378420/1 diff --git a/tests/phpunit/includes/collation/CollationFaTest.php b/tests/phpunit/includes/collation/CollationFaTest.php index f230197..53a4f7b 100644 --- a/tests/phpunit/includes/collation/CollationFaTest.php +++ b/tests/phpunit/includes/collation/CollationFaTest.php @@ -7,6 +7,13 @@ * against a random version of libicu */ + public function setUp() { + parent::setUp(); + if ( !extension_loaded( 'intl' ) ) { + $this->markTestSkipped( "PHP extension 'intl' is not loaded, skipping." ); + } + } + /** * @dataProvider provideGetFirstLetter */ -- To view, visit https://gerrit.wikimedia.org/r/378420 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b19bf1123d4dca5a1c8e002c0de65bab2138180 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Dump should allow getting elections by their ID
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/377373 ) Change subject: Dump should allow getting elections by their ID .. Dump should allow getting elections by their ID Bug: T175652 Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611 --- M cli/dump.php 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/73/377373/1 diff --git a/cli/dump.php b/cli/dump.php index 8521b5f..45a8399 100644 --- a/cli/dump.php +++ b/cli/dump.php @@ -11,6 +11,7 @@ Usage: php dump.php [options...] Options: -o Output to the specified file +--by-id Get election using its numerical ID, instead of its title --votes Include vote records --all-langs Include messages for all languages instead of just the primary --jump Produce a configuration dump suitable for setting up a jump wiki @@ -21,7 +22,12 @@ } $context = new SecurePoll_Context; -$election = $context->getElectionByTitle( $args[0] ); +if ( isset( $options['by-id'] ) ) { + $election = $context->getElection( $args[0] ); +} else { + $election = $context->getElectionByTitle( $args[0] ); +} + if ( !$election ) { spFatal( "There is no election called \"$args[0]\"" ); } -- To view, visit https://gerrit.wikimedia.org/r/377373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Remove HitCounters from AbuseFilter and use hooks instead
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/375531 ) Change subject: Remove HitCounters from AbuseFilter and use hooks instead .. Remove HitCounters from AbuseFilter and use hooks instead Bug: T59059 Change-Id: I38cd7cbf3e595890b53624a477010bd49c9b8552 --- M includes/AbuseFilter.class.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/31/375531/1 diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php index ff2822b..1ba4567 100644 --- a/includes/AbuseFilter.class.php +++ b/includes/AbuseFilter.class.php @@ -350,6 +350,8 @@ } } + Hooks::run( 'AbuseFilter-generateTitleVars', [ $vars, $title, $prefix ] ); + // Use restrictions. global $wgRestrictionTypes; foreach ( $wgRestrictionTypes as $action ) { -- To view, visit https://gerrit.wikimedia.org/r/375531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38cd7cbf3e595890b53624a477010bd49c9b8552 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: The link from CU log to CU and vice versa should preload the...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374851 ) Change subject: The link from CU log to CU and vice versa should preload the target .. The link from CU log to CU and vice versa should preload the target Bug: T174588 Change-Id: I8871ee82c7ee158d88cb1524e2d3daf1d98b6b2d --- M specials/SpecialCheckUser.php M specials/SpecialCheckUserLog.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/51/374851/1 diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index cfc006d..4987754 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -28,17 +28,17 @@ $out = $this->getOutput(); $request = $this->getRequest(); + $user = $request->getText( 'user', $request->getText( 'ip', $subpage ) ); + $user = trim( $user ); if ( $this->getUser()->isAllowed( 'checkuser-log' ) ) { $subtitleLink = $this->getLinkRenderer()->makeKnownLink( - SpecialPage::getTitleFor( 'CheckUserLog' ), + SpecialPage::getTitleFor( 'CheckUserLog', $user ), $this->msg( 'checkuser-showlog' )->text() ); $out->addSubtitle( $subtitleLink ); } - $user = $request->getText( 'user', $request->getText( 'ip', $subpage ) ); - $user = trim( $user ); $reason = $request->getText( 'reason' ); $blockreason = $request->getText( 'blockreason', '' ); $disableUserTalk = $request->getBool( 'blocktalk', false ); diff --git a/specials/SpecialCheckUserLog.php b/specials/SpecialCheckUserLog.php index 33bb29f..feddc1a 100644 --- a/specials/SpecialCheckUserLog.php +++ b/specials/SpecialCheckUserLog.php @@ -16,16 +16,16 @@ $out = $this->getOutput(); $request = $this->getRequest(); + $this->target = trim( $request->getVal( 'cuSearch', $par ) ); if ( $this->getUser()->isAllowed( 'checkuser' ) ) { $subtitleLink = $this->getLinkRenderer()->makeKnownLink( - SpecialPage::getTitleFor( 'CheckUser' ), + SpecialPage::getTitleFor( 'CheckUser', $this->target ), $this->msg( 'checkuser-showmain' )->text() ); $out->addSubtitle( $subtitleLink ); } - $this->target = trim( $request->getVal( 'cuSearch', $par ) ); $type = $request->getVal( 'cuSearchType', 'target' ); $this->displaySearchForm(); -- To view, visit https://gerrit.wikimedia.org/r/374851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8871ee82c7ee158d88cb1524e2d3daf1d98b6b2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BoilerPlate[master]: Add missing i18n messages for BoilerPlate
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374817 ) Change subject: Add missing i18n messages for BoilerPlate .. Add missing i18n messages for BoilerPlate Change-Id: Idb0051906c50221b4eec54103170b59fe9428d65 --- M i18n/en.json M i18n/qqq.json 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BoilerPlate refs/changes/17/374817/1 diff --git a/i18n/en.json b/i18n/en.json index 44c5641..9776526 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -6,5 +6,9 @@ "boilerplate-i18n-welcome": "Welcome to the localization file of the BoilerPlate extension.", "boilerplate-helloworld": "Hello world!", "boilerplate-helloworld-intro": "Welcome to the \"Hello world\" special page of the BoilerPlate extension.", - "helloworld": "Hello world" + "helloworld": "Hello world", + "testform-section1": "Test Form", + "testform-subsection": "Subsection", + "testform-myfield1": "Howdy!", + "testform-myfield2": "Sup?" } diff --git a/i18n/qqq.json b/i18n/qqq.json index a22658a..5486c83 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -12,5 +12,9 @@ "boilerplate-i18n-welcome": "Used to greet the user when reading the i18n/??.json file.", "boilerplate-helloworld": "Page title of the HelloWorld special page.\n{{Identical|Hello World}}", "boilerplate-helloworld-intro": "Text displayed on the HelloWorld SpecialPage.", - "helloworld": "Text of the link to the HelloWorld special page on SpecialPages.\n{{Identical|Hello World}}" + "helloworld": "Text of the link to the HelloWorld special page on SpecialPages.\n{{Identical|Hello World}}", + "testform-section1": "Label for the legend", + "testform-subsection": "Label for another legend", + "testform-myfield1": "Label for a textbox", + "testform-myfield2": "Label for a textbox" } -- To view, visit https://gerrit.wikimedia.org/r/374817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb0051906c50221b4eec54103170b59fe9428d65 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BoilerPlate Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Replace DB_SLAVE with DB_REPLICA
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374807 ) Change subject: Replace DB_SLAVE with DB_REPLICA .. Replace DB_SLAVE with DB_REPLICA Change-Id: I5296eee60dcc30bf4a16342b21d0970ff203d23d --- M cli/makeSimpleList.php M cli/purgePrivateVoteData.php M cli/voterList.php M cli/wm-scripts/bv2013/buildSpamTranslations.php M cli/wm-scripts/bv2013/doSpam.php M cli/wm-scripts/bv2013/populateEditCount.php M cli/wm-scripts/bv2013/voterList.php M cli/wm-scripts/bv2015/doSpam.php M cli/wm-scripts/bv2015/populateEditCount-fixup.php M cli/wm-scripts/bv2015/populateEditCount.php M cli/wm-scripts/bv2015/voterList.php M cli/wm-scripts/bv2017/doSpam.php M cli/wm-scripts/bv2017/populateEditCount.php M cli/wm-scripts/bv2017/voterList.php M cli/wm-scripts/dumpGlobalVoterList.php M includes/jobs/PopulateVoterListJob.php M includes/main/Store.php M includes/pages/VoterEligibilityPage.php 18 files changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/07/374807/1 diff --git a/cli/makeSimpleList.php b/cli/makeSimpleList.php index ecc8b60..30092f2 100644 --- a/cli/makeSimpleList.php +++ b/cli/makeSimpleList.php @@ -16,7 +16,7 @@ $optionsWithArgs = [ 'before', 'edits', 'start-from' ]; require __DIR__ . '/cli.inc'; -$dbr = wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_REPLICA ); $dbw = wfGetDB( DB_MASTER ); $fname = 'makeSimpleList.php'; $before = isset( $options['before'] ) ? $dbr->timestamp( strtotime( $options['before'] ) ) : false; diff --git a/cli/purgePrivateVoteData.php b/cli/purgePrivateVoteData.php index 1db436c..f3f52b0 100644 --- a/cli/purgePrivateVoteData.php +++ b/cli/purgePrivateVoteData.php @@ -50,7 +50,7 @@ $electionsToPurge = []; $deleteSets = []; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); if ( !$dbr->tableExists( 'securepoll_elections' ) ) { $this->output( "`securepoll_elections` table does not exist. Nothing to do.\n" ); diff --git a/cli/voterList.php b/cli/voterList.php index cfc2d9b..d8937b8 100644 --- a/cli/voterList.php +++ b/cli/voterList.php @@ -10,7 +10,7 @@ $optionsWithArgs = [ 'before', 'edits' ]; require $IP . '/maintenance/commandLine.inc'; -$dbr = wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_REPLICA ); $dbw = wfGetDB( DB_MASTER ); $fname = 'voterList.php'; $maxUser = $dbr->selectField( 'user', 'MAX(user_id)', false ); diff --git a/cli/wm-scripts/bv2013/buildSpamTranslations.php b/cli/wm-scripts/bv2013/buildSpamTranslations.php index 1162534..18262bb 100644 --- a/cli/wm-scripts/bv2013/buildSpamTranslations.php +++ b/cli/wm-scripts/bv2013/buildSpamTranslations.php @@ -8,7 +8,7 @@ $wgDebugLogFile = '/dev/stderr'; -$dbr = wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_REPLICA ); $dbr->setFlag( DBO_DEBUG ); $prefix = "Wikimedia_Foundation_elections_2013/Voter_e-mail/"; diff --git a/cli/wm-scripts/bv2013/doSpam.php b/cli/wm-scripts/bv2013/doSpam.php index bf11c59..0d95134 100644 --- a/cli/wm-scripts/bv2013/doSpam.php +++ b/cli/wm-scripts/bv2013/doSpam.php @@ -31,7 +31,7 @@ $election_id = 290; $voted = []; -$vdb = wfGetDB( DB_SLAVE, [], 'votewiki' ); +$vdb = wfGetDB( DB_REPLICA, [], 'votewiki' ); $res = $vdb->select( [ 'securepoll_votes', 'securepoll_voters' ], [ 'voter_name', 'voter_properties' ], @@ -64,7 +64,7 @@ $defaultLang = $wgConf->get( 'wgLanguageCode', $w, null, [ 'lang' => $siteLang ], $tags ); - $db = wfGetDB( DB_SLAVE, null, $w ); + $db = wfGetDB( DB_REPLICA, null, $w ); try { $res = $db->select( @@ -193,7 +193,7 @@ */ function runChecks( $wiki, $usersToCheck /* user ID */ ) { global $users; - $dbr = wfGetDB( DB_SLAVE, null, $wiki ); + $dbr = wfGetDB( DB_REPLICA, null, $wiki ); $res = $dbr->select( 'ipblocks', 'ipb_user', [ diff --git a/cli/wm-scripts/bv2013/populateEditCount.php b/cli/wm-scripts/bv2013/populateEditCount.php index 0daa0a6..aee98cc 100644 --- a/cli/wm-scripts/bv2013/populateEditCount.php +++ b/cli/wm-scripts/bv2013/populateEditCount.php @@ -8,7 +8,7 @@ require __DIR__ . '/../../cli.inc'; -$dbr = wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_REPLICA ); $dbw = wfGetDB( DB_MASTER ); $maxUser = $dbr->selectField( 'user', 'MAX(user_id)', false ); diff --git a/cli/wm-scripts/bv2013/voterList.php b/cli/wm-scripts/bv2013/voterList.php index 184e7fd..c62c4f4 100644 --- a/cli/wm-scripts/bv2013/voterList.php +++ b/cli/wm-scripts/bv2013/voterList.php @@ -1,7 +1,7 @@ $counts ) { if ( $counts[0] == 0 ) { // No recent local edits, remove from consideration @@ -97,7 +97,7 @@ continue; } $lb = wfGetLB( $wiki ); - $db
[MediaWiki-commits] [Gerrit] mediawiki...BoilerPlate[master]: Match the config variable name across its usages in BoilerPlate
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374747 ) Change subject: Match the config variable name across its usages in BoilerPlate .. Match the config variable name across its usages in BoilerPlate Change-Id: I35b968dd16e9f701dd9d454018642941cf696005 --- M specials/SpecialHelloWorld.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BoilerPlate refs/changes/47/374747/1 diff --git a/specials/SpecialHelloWorld.php b/specials/SpecialHelloWorld.php index ca2cedb..c630285 100644 --- a/specials/SpecialHelloWorld.php +++ b/specials/SpecialHelloWorld.php @@ -72,7 +72,7 @@ // If foo is enabled, add another form field. $config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'boilerplate' ); - if ( $config->get( 'EnableFoo' ) ) { + if ( $config->get( 'BoilerPlateEnableFoo' ) ) { $formDescriptor['radiolol'] = [ 'class' => 'HTMLRadioField', 'label' => 'Who do you like?', -- To view, visit https://gerrit.wikimedia.org/r/374747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35b968dd16e9f701dd9d454018642941cf696005 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BoilerPlate Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Migrate from .bind() to .on()
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374037 ) Change subject: Migrate from .bind() to .on() .. Migrate from .bind() to .on() This is to comply with the jQuery upgrade Change-Id: I69b5fd8b0c60ff711e94ea0fadef71036a2e72c2 --- M modules/ext.checkuser.cidr.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/37/374037/1 diff --git a/modules/ext.checkuser.cidr.js b/modules/ext.checkuser.cidr.js index 55a3448..f07bfd1 100644 --- a/modules/ext.checkuser.cidr.js +++ b/modules/ext.checkuser.cidr.js @@ -252,7 +252,7 @@ $( function () { updateCIDRresult(); - $( '#mw-checkuser-iplist' ).bind( 'keyup click', function () { + $( '#mw-checkuser-iplist' ).on( 'keyup click', function () { updateCIDRresult(); } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/374037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69b5fd8b0c60ff711e94ea0fadef71036a2e72c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AntiSpoof[master]: Add more Persian characeter mappings to AntiSpoof
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373596 ) Change subject: Add more Persian characeter mappings to AntiSpoof .. Add more Persian characeter mappings to AntiSpoof Added glyphs are all similar looking to Persian letter Kaf Note that only equivset.in was edited and all other files were generated using generateEquivset.php Bug: T173697 Change-Id: I6c9d41f8c65cf9569e97a046d409f915162a6533 --- M maintenance/equivset.in M maintenance/equivset.txt 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AntiSpoof refs/changes/96/373596/1 diff --git a/maintenance/equivset.in b/maintenance/equivset.in index 9512a2c..fb8868b 100644 --- a/maintenance/equivset.in +++ b/maintenance/equivset.in @@ -565,6 +565,7 @@ 674 ٴ => 654 ٔ 6A0 ڠ => 45 E 6A9 ک => 643 ك +6AA ڪ => 6A9 ک 6BB ڻ => 679 ٹ 6BE ھ => 647 ه 6C1 ہ => 647 ه @@ -5351,6 +5352,8 @@ A4BF ꒿ => A259 ꉙ A4C0 ꓀ => A3AB ꎫ A4C2 ꓂ => A3B5 ꎵ +FED9 ﻙ => 6A9 ک +FEDA ﻚ => 6A9 ک FF10 0 => 0030 0 FF11 1 => 0031 1 FF12 2 => 0032 2 diff --git a/maintenance/equivset.txt b/maintenance/equivset.txt index 5599bb5..e848092 100644 --- a/maintenance/equivset.txt +++ b/maintenance/equivset.txt @@ -103,7 +103,7 @@ ̓ ُ ، ٬ ٔ ٴ -ك ک +ك ک ڪ ﻙ ﻚ ٹ ڻ ه ھ ہ ە ٻ ې -- To view, visit https://gerrit.wikimedia.org/r/373596 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c9d41f8c65cf9569e97a046d409f915162a6533 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AntiSpoof Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Add option to block a user from editing their own talk page
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373119 ) Change subject: Add option to block a user from editing their own talk page .. Add option to block a user from editing their own talk page Bug: T170014 Change-Id: I74b7fd2e036111583e8b69c355e7fb0c51fe67fc --- M i18n/en.json M i18n/qqq.json M includes/AbuseFilter.class.php M includes/Views/AbuseFilterViewEdit.php 4 files changed, 37 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/19/373119/1 diff --git a/i18n/en.json b/i18n/en.json index 649fc3e..4492986 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -157,6 +157,7 @@ "abusefilter-edit-action-blockautopromote": "Revoke the user's autoconfirmed status", "abusefilter-edit-action-degroup": "Remove the user from all privileged groups", "abusefilter-edit-action-block": "Block the user and/or IP address from editing", + "abusefilter-edit-action-blocktalk": "Block the user and/or IP address from editing their own talk page", "abusefilter-edit-action-throttle": "Trigger actions only if the user trips a rate limit", "abusefilter-edit-action-rangeblock": "Block the /16 range from which the user originates", "abusefilter-edit-action-tag": "Tag the edit for further review", @@ -299,6 +300,7 @@ "abusefilter-edit-builder-vars-file-width": "Width of the file in pixels", "abusefilter-edit-builder-vars-file-height": "Height of the file in pixels", "abusefilter-edit-builder-vars-file-bits-per-channel": "Bits per color channel of the file", + "abusefilter-edit-block-form": "Block options:", "abusefilter-filter-log": "Recent filter changes", "abusefilter-history": "Change history for Abuse Filter #$1", "abusefilter-history-foruser": "Changes by $1", diff --git a/i18n/qqq.json b/i18n/qqq.json index a7aff88..97cd839 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -188,6 +188,7 @@ "abusefilter-edit-action-blockautopromote": "{{doc-abusefilter-action}}", "abusefilter-edit-action-degroup": "{{doc-abusefilter-action}}", "abusefilter-edit-action-block": "{{doc-abusefilter-action}}", + "abusefilter-edit-action-blocktalk": "{{doc-abusefilter-action}}", "abusefilter-edit-action-throttle": "{{doc-abusefilter-action}}", "abusefilter-edit-action-rangeblock": "{{doc-abusefilter-action}}", "abusefilter-edit-action-tag": "{{doc-abusefilter-action}}", @@ -330,6 +331,7 @@ "abusefilter-edit-builder-vars-file-width": "This variable contains the width of the file in pixels", "abusefilter-edit-builder-vars-file-height": "This variable contains the height of the file in pixels", "abusefilter-edit-builder-vars-file-bits-per-channel": "This variable contains the number of bits per color channel of the file", + "abusefilter-edit-block-form": "Label for the block options form", "abusefilter-filter-log": "Used as page title.", "abusefilter-history": "Used as page title.\n\n\"Change history\" is the \"history of changes\"\n\nParameters:\n* $1 - filter ID\n\nIf the filter ID is not specified, {{msg-mw|Abusefilter-filter-log}} will be used.", "abusefilter-history-foruser": "Parameters:\n* $1 - a link to the changing user's page\n* $2 - (Optional) the plain text username", diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php index 4b1418f..2748737 100644 --- a/includes/AbuseFilter.class.php +++ b/includes/AbuseFilter.class.php @@ -824,7 +824,7 @@ ) { unset( $actions['disallow'] ); } - +//print_r($actions); die(); // Do the rest of the actions foreach ( $actions as $action => $info ) { $newMsg = self::takeConsequenceAction( @@ -1382,7 +1382,8 @@ ], $wgUser->getName(), $expiry, - true + true, + is_array( $parameters ) && in_array( 'blocktalk', $parameters ) ); $message = [ @@ -1524,7 +1525,7 @@ * @param string $expiry * @param bool $isAutoBlock */ - protected static function doAbuseFilterBlock( array $rule, $target, $expiry, $isAutoBlock ) { + protected static function doAbuseFilterBlock( array $rule, $target, $expiry, $isAutoBlock, $editOwnUserTalk = false ) { $filterUser = self::getFilterUser(); $reason = wfMessage( 'abusefilter-blockreason', @@ -1538,7 +1539,7 @@
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Add option to block user/IP from editing their talk page
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372844 ) Change subject: Add option to block user/IP from editing their talk page .. Add option to block user/IP from editing their talk page Bug: T170014 Change-Id: Ief4c9123e04583cb87698c564b6f9819e3dc2b0c --- M extension.json M i18n/en.json M i18n/qqq.json M includes/AbuseFilter.class.php M includes/Views/AbuseFilterViewEdit.php 5 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/44/372844/1 diff --git a/extension.json b/extension.json index f8d3abc..e88082b 100644 --- a/extension.json +++ b/extension.json @@ -201,6 +201,7 @@ "disallow": true, "blockautopromote": true, "block": true, + "blocktalk": true, "rangeblock": false, "degroup": true, "tag": true, diff --git a/i18n/en.json b/i18n/en.json index 649fc3e..63e6e12 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -157,6 +157,7 @@ "abusefilter-edit-action-blockautopromote": "Revoke the user's autoconfirmed status", "abusefilter-edit-action-degroup": "Remove the user from all privileged groups", "abusefilter-edit-action-block": "Block the user and/or IP address from editing", + "abusefilter-edit-action-blocktalk": "Block the user and/or IP address from editing their own talk page", "abusefilter-edit-action-throttle": "Trigger actions only if the user trips a rate limit", "abusefilter-edit-action-rangeblock": "Block the /16 range from which the user originates", "abusefilter-edit-action-tag": "Tag the edit for further review", diff --git a/i18n/qqq.json b/i18n/qqq.json index a7aff88..fae5f53 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -188,6 +188,7 @@ "abusefilter-edit-action-blockautopromote": "{{doc-abusefilter-action}}", "abusefilter-edit-action-degroup": "{{doc-abusefilter-action}}", "abusefilter-edit-action-block": "{{doc-abusefilter-action}}", + "abusefilter-edit-action-blocktalk": "{{doc-abusefilter-action}}", "abusefilter-edit-action-throttle": "{{doc-abusefilter-action}}", "abusefilter-edit-action-rangeblock": "{{doc-abusefilter-action}}", "abusefilter-edit-action-tag": "{{doc-abusefilter-action}}", diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php index 4b1418f..fd99f50 100644 --- a/includes/AbuseFilter.class.php +++ b/includes/AbuseFilter.class.php @@ -1366,6 +1366,7 @@ break; case 'block': + case 'blocktalk': global $wgAbuseFilterBlockDuration, $wgAbuseFilterAnonBlockDuration, $wgUser; if ( $wgUser->isAnon() && $wgAbuseFilterAnonBlockDuration !== null ) { // The user isn't logged in and the anon block duration @@ -1382,7 +1383,8 @@ ], $wgUser->getName(), $expiry, - true + true, + $action === 'blocktalk' ); $message = [ @@ -1524,7 +1526,7 @@ * @param string $expiry * @param bool $isAutoBlock */ - protected static function doAbuseFilterBlock( array $rule, $target, $expiry, $isAutoBlock ) { + protected static function doAbuseFilterBlock( array $rule, $target, $expiry, $isAutoBlock, $editOwnUserTalk = false ) { $filterUser = self::getFilterUser(); $reason = wfMessage( 'abusefilter-blockreason', @@ -1538,7 +1540,7 @@ $block->isHardblock( false ); $block->isAutoblocking( $isAutoBlock ); $block->prevents( 'createaccount', true ); - $block->prevents( 'editownusertalk', false ); + $block->prevents( 'editownusertalk', $editOwnUserTalk ); $block->mExpiry = SpecialBlock::parseExpiryInput( $expiry ); $success = $block->insert(); diff --git a/includes/Views/AbuseFilterViewEdit.php b/includes/Views/AbuseFilterViewEdit.php index d4f6cc1..e99ae40 100644 --- a/includes/Views/AbuseFilterViewEdit.php +++ b/includes/Views/AbuseFilterViewEdit.php @@ -843,7 +843,7 @@ // abusefilter-edit-action-blockautopromote // abusefilter-edit-action-degroup, abusefilter-edit-action-block // abusefilter-edit-action-throttle, abusefilter-edit-action-rangeblock
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Use json extension for .styleintrc
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372627 ) Change subject: Use json extension for .styleintrc .. Use json extension for .styleintrc Bug: T173516 Change-Id: Ica1e906f4e7e7e8c1ebd60098d1576699dbfcd8d --- R .stylelintrc.json 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/27/372627/1 diff --git a/.stylelintrc b/.stylelintrc.json similarity index 100% rename from .stylelintrc rename to .stylelintrc.json -- To view, visit https://gerrit.wikimedia.org/r/372627 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica1e906f4e7e7e8c1ebd60098d1576699dbfcd8d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Ignore composer.phar file
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372127 ) Change subject: Ignore composer.phar file .. Ignore composer.phar file The file is needed if using composer via PHP Change-Id: I910bc8929d0cf26d9d110eeb1051c4d41c25aa3c --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/372127/1 diff --git a/.gitignore b/.gitignore index 3e97aab..388f354 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ /vendor /composer.lock /composer.local.json +/composer.phar # MediaWiki UI documentation /docs/kss/static -- To view, visit https://gerrit.wikimedia.org/r/372127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I910bc8929d0cf26d9d110eeb1051c4d41c25aa3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Show links to blocked user accounts in italic and lighter color
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370193 ) Change subject: Show links to blocked user accounts in italic and lighter color .. Show links to blocked user accounts in italic and lighter color Extends I14ef2f6411f512578acc4777bf7771c89233dfce Change-Id: Ic65d1871cf01e023d34254bd0ac81787f77fb689 --- M resources/src/mediawiki.skinning/elements.css 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/370193/1 diff --git a/resources/src/mediawiki.skinning/elements.css b/resources/src/mediawiki.skinning/elements.css index d204d5d..20941e4 100644 --- a/resources/src/mediawiki.skinning/elements.css +++ b/resources/src/mediawiki.skinning/elements.css @@ -42,16 +42,38 @@ color: #723; } +a.blocked, +span.blocked a { + font-style: italic; + color: #bbf; +} + +a.blocked:visited, +span.blocked a:visited { + color: #dbf; +} + a.new, #p-personal a.new { color: #ba; } +a.new.blocked, +span.blocked a.new { + font-style: italic; + color: #e99; +} + a.new:visited, #p-personal a.new:visited { color: #a55858; } +a.new.blocked:visited, +span.blocked a.new:visited { + color: #c99; +} + /* Interwiki Styling */ .mw-body-content a.extiw, .mw-body-content a.extiw:active { -- To view, visit https://gerrit.wikimedia.org/r/370193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic65d1871cf01e023d34254bd0ac81787f77fb689 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Links to blocked/locked user accounts should have a class in...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370137 ) Change subject: Links to blocked/locked user accounts should have a class indicating so .. Links to blocked/locked user accounts should have a class indicating so Bug: T172348 Change-Id: I14ef2f6411f512578acc4777bf7771c89233dfce --- M includes/Linker.php M resources/src/mediawiki.skinning/elements.css 2 files changed, 32 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/370137/1 diff --git a/includes/Linker.php b/includes/Linker.php index 4aae3ba..eaab557 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -897,6 +897,10 @@ $page = Title::makeTitle( NS_USER, $userName ); } + if ( User::newFromId( $userId )->getBlock() !== null ) { + $classes .= ' blocked'; + } + // Wrap the output with tags for directionality isolation return self::link( $page, @@ -955,11 +959,16 @@ $items[] = self::emailLink( $userId, $userText ); } + $classes = 'mw-usertoollinks'; + if ( User::newFromId( $userId )->getBlock() !== null ) { + $classes .= ' blocked'; + } + Hooks::run( 'UserToolLinksEdit', [ $userId, $userText, &$items ] ); if ( $items ) { return wfMessage( 'word-separator' )->escaped() - . '' + . '' . wfMessage( 'parentheses' )->rawParams( $wgLang->pipeList( $items ) )->escaped() . ''; } else { diff --git a/resources/src/mediawiki.skinning/elements.css b/resources/src/mediawiki.skinning/elements.css index d204d5d..7218228 100644 --- a/resources/src/mediawiki.skinning/elements.css +++ b/resources/src/mediawiki.skinning/elements.css @@ -42,16 +42,38 @@ color: #723; } +a.blocked, +span.blocked a { + font-style: italic; + color: #bbf; +} + +a.blocked:visited, +span.blocked a:visited { + color: #dbf; +} + a.new, #p-personal a.new { color: #ba; } +a.new.blocked, +span.blocked a.new { + font-style: italic; + color: #e99; +} + a.new:visited, #p-personal a.new:visited { color: #a55858; } +a.new.blocked:visited, +span.blcoked a.new:visited { + color: #c99; +} + /* Interwiki Styling */ .mw-body-content a.extiw, .mw-body-content a.extiw:active { -- To view, visit https://gerrit.wikimedia.org/r/370137 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14ef2f6411f512578acc4777bf7771c89233dfce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Show anchor in redirect target on Special:DoubleRedirects
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368961 ) Change subject: Show anchor in redirect target on Special:DoubleRedirects .. Show anchor in redirect target on Special:DoubleRedirects Bug: T17147 Change-Id: I0d0eba51ca675b18f1fbed2eb0db7cc15ba1ecc7 --- M includes/specials/SpecialDoubleRedirects.php 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/61/368961/1 diff --git a/includes/specials/SpecialDoubleRedirects.php b/includes/specials/SpecialDoubleRedirects.php index d7e99db..cf8f5e7 100644 --- a/includes/specials/SpecialDoubleRedirects.php +++ b/includes/specials/SpecialDoubleRedirects.php @@ -73,6 +73,7 @@ // not actually be a page table row for this target (e.g. for interwiki redirects) 'nsc' => 'rb.rd_namespace', 'tc' => 'rb.rd_title', + 'td' => 'rb.rd_fragment', 'iwc' => 'rb.rd_interwiki', ], 'conds' => [ @@ -146,7 +147,7 @@ } $titleB = Title::makeTitle( $result->nsb, $result->tb ); - $titleC = Title::makeTitle( $result->nsc, $result->tc, '', $result->iwc ); + $titleC = Title::makeTitle( $result->nsc, $result->tc, $result->td, $result->iwc ); $linkA = $linkRenderer->makeKnownLink( $titleA, @@ -179,7 +180,11 @@ [ 'redirect' => 'no' ] ); - $linkC = $linkRenderer->makeKnownLink( $titleC ); + if ( $result->td !== '' ) { + $linkC = $linkRenderer->makeKnownLink( $titleC, $result->tc . '#' . $result->td ); + } else { + $linkC = $linkRenderer->makeKnownLink( $titleC ); + } $lang = $this->getLanguage(); $arr = $lang->getArrow() . $lang->getDirMark(); -- To view, visit https://gerrit.wikimedia.org/r/368961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d0eba51ca675b18f1fbed2eb0db7cc15ba1ecc7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Define a "view source" permission
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368592 ) Change subject: Define a "view source" permission .. Define a "view source" permission Bug: T157875 Change-Id: I574281f9e62cb63d7558d1431780d5622ec80d6d --- M includes/DefaultSettings.php M includes/EditPage.php M languages/i18n/en.json M languages/i18n/qqq.json 4 files changed, 43 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/368592/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 77d7b0e..18a25fe 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5101,6 +5101,7 @@ // Implicit group for all visitors $wgGroupPermissions['*']['createaccount'] = true; $wgGroupPermissions['*']['read'] = true; +$wgGroupPermissions['*']['viewsource'] = true; $wgGroupPermissions['*']['edit'] = true; $wgGroupPermissions['*']['createpage'] = true; $wgGroupPermissions['*']['createtalk'] = true; diff --git a/includes/EditPage.php b/includes/EditPage.php index 229a36a..c9466e0 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -738,47 +738,50 @@ * @param string $errorMessage additional wikitext error message to display */ protected function displayViewSourcePage( Content $content, $errorMessage = '' ) { - global $wgOut; + global $wgOut, $wgUser; + if ( $this->mTitle->userCan( 'viewsource', $wgUser ) ) { + Hooks::run( 'EditPage::showReadOnlyForm:initial', [ $this, &$wgOut ] ); - Hooks::run( 'EditPage::showReadOnlyForm:initial', [ $this, &$wgOut ] ); + $wgOut->setRobotPolicy( 'noindex,nofollow' ); + $wgOut->setPageTitle( $this->context->msg( + 'viewsource-title', + $this->getContextTitle()->getPrefixedText() + ) ); + $wgOut->addBacklinkSubtitle( $this->getContextTitle() ); + $wgOut->addHTML( $this->editFormPageTop ); + $wgOut->addHTML( $this->editFormTextTop ); - $wgOut->setRobotPolicy( 'noindex,nofollow' ); - $wgOut->setPageTitle( $this->context->msg( - 'viewsource-title', - $this->getContextTitle()->getPrefixedText() - ) ); - $wgOut->addBacklinkSubtitle( $this->getContextTitle() ); - $wgOut->addHTML( $this->editFormPageTop ); - $wgOut->addHTML( $this->editFormTextTop ); - - if ( $errorMessage !== '' ) { - $wgOut->addWikiText( $errorMessage ); - $wgOut->addHTML( "\n" ); - } - - # If the user made changes, preserve them when showing the markup - # (This happens when a user is blocked during edit, for instance) - if ( !$this->firsttime ) { - $text = $this->textbox1; - $wgOut->addWikiMsg( 'viewyourtext' ); - } else { - try { - $text = $this->toEditText( $content ); - } catch ( MWException $e ) { - # Serialize using the default format if the content model is not supported - # (e.g. for an old revision with a different model) - $text = $content->serialize(); + if ( $errorMessage !== '' ) { + $wgOut->addWikiText( $errorMessage ); + $wgOut->addHTML( "\n" ); } - $wgOut->addWikiMsg( 'viewsourcetext' ); + + # If the user made changes, preserve them when showing the markup + # (This happens when a user is blocked during edit, for instance) + if ( !$this->firsttime ) { + $text = $this->textbox1; + $wgOut->addWikiMsg( 'viewyourtext' ); + } else { + try { + $text = $this->toEditText( $content ); + } catch ( MWException $e ) { + # Serialize using the default format if the content model is not supported + # (e.g. for an old revision with a different model) + $text = $content->serialize(); + } + $wgOut->addWikiMsg( 'viewsourcetext' ); + } + + $wgOut->addHTML( $this->editFormTextBeforeContent ); +
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: WIP: AbuseLog details page should link to the triggered vers...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368335 ) Change subject: WIP: AbuseLog details page should link to the triggered version of the filter .. WIP: AbuseLog details page should link to the triggered version of the filter Bug: T52806 Change-Id: Idf745db264ece2ef2d8ef900a5a6aef4676958d2 --- M special/SpecialAbuseLog.php 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/35/368335/1 diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php index 853424b..35789dc 100644 --- a/special/SpecialAbuseLog.php +++ b/special/SpecialAbuseLog.php @@ -562,7 +562,19 @@ ->numParams( $globalIndex )->escaped(); $filterLink = Linker::makeExternalLink( $globalURL, $linkText ); } else { - $title = SpecialPage::getTitleFor( 'AbuseFilter', $row->afl_filter ); + // Which version of the filter was in use at the time of the logged action? + $dbr = wfGetDB( DB_SLAVE ); + $triggeredRev = $dbr->selectRow( + [ 'abuse_filter_history' ], + 'MAX(afh_id) AS item', + [ + 'afh_filter' => $row->afl_filter, + 'afh_timestamp <' . $dbr->addQuotes( $row->afl_timestamp ), + ], + __METHOD__ + ); + + $title = SpecialPage::getTitleFor( 'AbuseFilter', $row->afl_filter . '/item/' . $triggeredRev->item); $linkText = $this->msg( 'abusefilter-log-detailedentry-local' ) ->numParams( $row->afl_filter )->text(); $filterLink = $linkRenderer->makeKnownLink( $title, $linkText ); -- To view, visit https://gerrit.wikimedia.org/r/368335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf745db264ece2ef2d8ef900a5a6aef4676958d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Use methods from the IP class to validate IPs and CIDR ranges
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368327 ) Change subject: Use methods from the IP class to validate IPs and CIDR ranges .. Use methods from the IP class to validate IPs and CIDR ranges Bug: T171699 Change-Id: I7609862e8a4310991b4ae6e71616ad3043ad14e7 --- M specials/SpecialCheckUser.php 1 file changed, 20 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/27/368327/1 diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index 952f23e..4ba2dd9 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -1518,43 +1518,36 @@ /** * @param IDatabase $db -* @param string $ip +* @param string $target an IP address or CIDR range * @param string|bool $xfor * @return array|false array for valid conditions, false if invalid */ - public static function getIpConds( $db, $ip, $xfor = false ) { + public static function getIpConds( $db, $target, $xfor = false ) { global $wgCheckUserCIDRLimit; $type = $xfor ? 'xff' : 'ip'; - $matches = []; - if ( preg_match( '#^(\d+\.\d+\.\d+\.\d+)/(\d+)$#', $ip, $matches ) ) { - // IPv4 CIDR, 16-32 bits - if ( $matches[2] < $wgCheckUserCIDRLimit['IPv4'] || $matches[2] > 32 ) { - return false; // invalid + if( strpos( $target, '/' ) !== false ) { + list( $ip, $range ) = explode( '/', $target, 2 ); + if ( IP::isIPv4( $ip ) ) { + // IPv4 CIDR, 16-32 bits + if ( $range < $wgCheckUserCIDRLimit['IPv4'] || $range > 32 ) { + return false; // invalid range, or too wide + } + } elseif ( IP::isIPv6( $ip ) ) { + // IPv6 CIDR, 32-128 bits + if ( $range < $wgCheckUserCIDRLimit['IPv6'] || $range > 128 ) { + return false; // invalid range, or too wide + } } - list( $start, $end ) = IP::parseRange( $ip ); + list( $start, $end ) = IP::parseRange( $target ); return [ 'cuc_' . $type . '_hex BETWEEN ' . $db->addQuotes( $start ) . ' AND ' . $db->addQuotes( $end ) ]; - } elseif ( preg_match( - '#^\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}/(\d+)$#', - $ip, $matches ) - ) { - // IPv6 CIDR, 32-128 bits - if ( $matches[1] < $wgCheckUserCIDRLimit['IPv6'] || $matches[1] > 128 ) { - return false; // invalid + } else { + if ( IP::isIPv4( $target ) || IP::isIPv6( $target ) ) { + return [ "cuc_{$type}_hex" => IP::toHex( $target ) ]; + } else { + return false; //invalid IP } - list( $start, $end ) = IP::parseRange( $ip ); - return [ 'cuc_' . $type . '_hex BETWEEN ' . $db->addQuotes( $start ) . - ' AND ' . $db->addQuotes( $end ) ]; - } elseif ( - // 32 bit IPv4 - preg_match( '#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#', $ip ) || - // 128 bit IPv6 - preg_match( '#^\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}$#', $ip ) - ) { - return [ "cuc_{$type}_hex" => IP::toHex( $ip ) ]; } - // Throw away this query, incomplete IP, these don't get through the entry point anyway - return false; } protected function getTimeConds( $period ) { -- To view, visit https://gerrit.wikimedia.org/r/368327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7609862e8a4310991b4ae6e71616ad3043ad14e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Use methods from the IP class to validate IPs and CIDR ranges
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368324 ) Change subject: Use methods from the IP class to validate IPs and CIDR ranges .. Use methods from the IP class to validate IPs and CIDR ranges Bug: T171699 Change-Id: I87bcba21ab07c364b595d16a762d600f0ef8146c --- M specials/SpecialCheckUser.php 1 file changed, 20 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/24/368324/1 diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index 952f23e..4ba2dd9 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -1518,43 +1518,36 @@ /** * @param IDatabase $db -* @param string $ip +* @param string $target an IP address or CIDR range * @param string|bool $xfor * @return array|false array for valid conditions, false if invalid */ - public static function getIpConds( $db, $ip, $xfor = false ) { + public static function getIpConds( $db, $target, $xfor = false ) { global $wgCheckUserCIDRLimit; $type = $xfor ? 'xff' : 'ip'; - $matches = []; - if ( preg_match( '#^(\d+\.\d+\.\d+\.\d+)/(\d+)$#', $ip, $matches ) ) { - // IPv4 CIDR, 16-32 bits - if ( $matches[2] < $wgCheckUserCIDRLimit['IPv4'] || $matches[2] > 32 ) { - return false; // invalid + if( strpos( $target, '/' ) !== false ) { + list( $ip, $range ) = explode( '/', $target, 2 ); + if ( IP::isIPv4( $ip ) ) { + // IPv4 CIDR, 16-32 bits + if ( $range < $wgCheckUserCIDRLimit['IPv4'] || $range > 32 ) { + return false; // invalid range, or too wide + } + } elseif ( IP::isIPv6( $ip ) ) { + // IPv6 CIDR, 32-128 bits + if ( $range < $wgCheckUserCIDRLimit['IPv6'] || $range > 128 ) { + return false; // invalid range, or too wide + } } - list( $start, $end ) = IP::parseRange( $ip ); + list( $start, $end ) = IP::parseRange( $target ); return [ 'cuc_' . $type . '_hex BETWEEN ' . $db->addQuotes( $start ) . ' AND ' . $db->addQuotes( $end ) ]; - } elseif ( preg_match( - '#^\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}/(\d+)$#', - $ip, $matches ) - ) { - // IPv6 CIDR, 32-128 bits - if ( $matches[1] < $wgCheckUserCIDRLimit['IPv6'] || $matches[1] > 128 ) { - return false; // invalid + } else { + if ( IP::isIPv4( $target ) || IP::isIPv6( $target ) ) { + return [ "cuc_{$type}_hex" => IP::toHex( $target ) ]; + } else { + return false; //invalid IP } - list( $start, $end ) = IP::parseRange( $ip ); - return [ 'cuc_' . $type . '_hex BETWEEN ' . $db->addQuotes( $start ) . - ' AND ' . $db->addQuotes( $end ) ]; - } elseif ( - // 32 bit IPv4 - preg_match( '#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#', $ip ) || - // 128 bit IPv6 - preg_match( '#^\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}$#', $ip ) - ) { - return [ "cuc_{$type}_hex" => IP::toHex( $ip ) ]; } - // Throw away this query, incomplete IP, these don't get through the entry point anyway - return false; } protected function getTimeConds( $period ) { -- To view, visit https://gerrit.wikimedia.org/r/368324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87bcba21ab07c364b595d16a762d600f0ef8146c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Replace deprecated User::makeGroupLinkHTML with the alternat...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365250 ) Change subject: Replace deprecated User::makeGroupLinkHTML with the alternative method from UserGroupMembership class .. Replace deprecated User::makeGroupLinkHTML with the alternative method from UserGroupMembership class Bug: T170675 Change-Id: I53a741b270ba34f05edd05fd27512515e05e7e90 --- M specials/SpecialCheckUser.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/50/365250/1 diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index ea1c84b..952f23e 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -1509,8 +1509,8 @@ protected static function buildGroupLink( $group, $username ) { static $cache = []; if ( !isset( $cache[$group] ) ) { - $cache[$group] = User::makeGroupLinkHTML( - $group, User::getGroupMember( $group, $username ) + $cache[$group] = UserGroupMembership::getLink( + $group, RequestContext::getMain(), 'html' ); } return $cache[$group]; -- To view, visit https://gerrit.wikimedia.org/r/365250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53a741b270ba34f05edd05fd27512515e05e7e90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: List distinct user-agents per IP period in the Show IPs func...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365065 ) Change subject: List distinct user-agents per IP period in the Show IPs function .. List distinct user-agents per IP period in the Show IPs function Bug: T170508 Change-Id: I046ac6383048db1040b25fb47cd4c7433a2049b2 --- M specials/SpecialCheckUser.php 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/65/365065/1 diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index ea1c84b..09a446f 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -513,6 +513,30 @@ $ips_first[$row->cuc_ip] = $row->first; $ips_last[$row->cuc_ip] = $row->last; $ips_hex[$row->cuc_ip] = $row->cuc_ip_hex; + $agent_ret = $dbr->select( + 'cu_changes', + [ + 'cuc_agent', + 'COUNT(*) AS count', + ], + [ + 'cuc_user' => $user_id, + 'cuc_ip' => $row->cuc_ip, + 'cuc_timestamp >= ' . $row->first, + 'cuc_timestamp <= ' . $row->last + ], + __METHOD__, + [ + 'ORDER BY' => 'cuc_agent ASC', + 'GROUP BY' => 'cuc_agent', + 'LIMIT' => 5001, + 'USE INDEX' => 'cuc_user_ip_time', + ] + ); + foreach ( $agent_ret as $agent_row ) { + $ips_agent[$row->cuc_ip][$agent_row->cuc_agent] = $agent_row->count; + } + ++$counter; } // Count pinging might take some time...make sure it is there @@ -561,6 +585,13 @@ $s .= '' . $this->msg( 'checkuser-toollinks', urlencode( $ip ) )->parse() . ''; $s .= ''; + $s .= ''; + foreach ( $ips_agent[$ip] as $agent => $agent_count ) { + $s .= '' . $agent . '' . + ' [' . $agent_count . ']' . + ''; + } + $s .= ''; $s .= "\n"; } $s .= ''; -- To view, visit https://gerrit.wikimedia.org/r/365065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I046ac6383048db1040b25fb47cd4c7433a2049b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Testing patch to demonstrate the problem.
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/361069 ) Change subject: Testing patch to demonstrate the problem. .. Testing patch to demonstrate the problem. DO NOT MERGE Bug: T168728 Change-Id: Ic04fd5f3ef06897d33bf721eed2ac1944e1773a2 --- M php/widgets/CheckboxMultiselectInputWidget.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/69/361069/1 diff --git a/php/widgets/CheckboxMultiselectInputWidget.php b/php/widgets/CheckboxMultiselectInputWidget.php index 01a63dd..4b7fd7e 100644 --- a/php/widgets/CheckboxMultiselectInputWidget.php +++ b/php/widgets/CheckboxMultiselectInputWidget.php @@ -119,6 +119,7 @@ [ 'label' => isset( $opt['label'] ) ? $opt['label'] : $optValue, 'align' => 'inline', + 'help' => 'Some tooltip' ] ); -- To view, visit https://gerrit.wikimedia.org/r/361069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic04fd5f3ef06897d33bf721eed2ac1944e1773a2 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: $cryptTypes and $ballotTypes must be public
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/358299 ) Change subject: $cryptTypes and $ballotTypes must be public .. $cryptTypes and $ballotTypes must be public Reverts parts of I50a1b0392d97418b980bc5306577b321c18d612d Bug: T167596 Change-Id: I01696dee50e6d9c9675f15e1b6d938a718af409e --- M includes/ballots/Ballot.php M includes/crypt/Crypt.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/99/358299/1 diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php index 2e4e321..011938c 100644 --- a/includes/ballots/Ballot.php +++ b/includes/ballots/Ballot.php @@ -6,7 +6,7 @@ abstract class SecurePoll_Ballot { public $election, $context; - private static $ballotTypes = [ + public static $ballotTypes = [ 'approval' => 'SecurePoll_ApprovalBallot', 'preferential' => 'SecurePoll_PreferentialBallot', 'choose' => 'SecurePoll_ChooseBallot', diff --git a/includes/crypt/Crypt.php b/includes/crypt/Crypt.php index c3ccf62..6bb5761 100644 --- a/includes/crypt/Crypt.php +++ b/includes/crypt/Crypt.php @@ -25,7 +25,7 @@ */ abstract function canDecrypt(); - private static $cryptTypes = [ + public static $cryptTypes = [ 'none' => false, 'gpg' => 'SecurePoll_GpgCrypt', ]; -- To view, visit https://gerrit.wikimedia.org/r/358299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01696dee50e6d9c9675f15e1b6d938a718af409e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Watchlist "Mark all visited" synchronization
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/358178 ) Change subject: Watchlist "Mark all visited" synchronization .. Watchlist "Mark all visited" synchronization Bug: T98941 Change-Id: I90635a09a5543d549dbe29d210e623c2038dbf3e --- M includes/specials/SpecialWatchlist.php M includes/user/User.php 2 files changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/358178/1 diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index e9d3f26..af88f81 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -83,7 +83,9 @@ && $request->wasPosted() && $user->matchEditToken( $request->getVal( 'token' ) ) ) { - $user->clearAllNotifications(); + $timestamp = $request->getVal( 'timestamp' ); + if ( $timestamp !== null ) $timestamp = wfTimestamp( TS_UNIX, $timestamp ); + $user->clearAllNotifications( $timestamp ); $output->redirect( $this->getPageTitle()->getFullURL( $opts->getChangedValues() ) ); return; @@ -661,6 +663,7 @@ 'id' => 'mw-watchlist-resetbutton' ] ) . "\n" . Xml::submitButton( $this->msg( 'enotif_reset' )->text(), [ 'name' => 'mw-watchlist-reset-submit' ] ) . "\n" . + Html::hidden( 'timestamp', wfTimestampNow() ) . "\n" . Html::hidden( 'token', $user->getEditToken() ) . "\n" . Html::hidden( 'reset', 'all' ) . "\n"; foreach ( $nondefaults as $key => $value ) { diff --git a/includes/user/User.php b/includes/user/User.php index 4d16594..e44f4c6 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -3744,7 +3744,7 @@ * the next change of any watched page. * @note If the user doesn't have 'editmywatchlist', this will do nothing. */ - public function clearAllNotifications() { + public function clearAllNotifications( $timestamp = null ) { global $wgUseEnotif, $wgShowUpdatedMarker; // Do nothing if not allowed to edit the watchlist if ( wfReadOnly() || !$this->isAllowed( 'editmywatchlist' ) ) { @@ -3762,10 +3762,17 @@ } $dbw = wfGetDB( DB_MASTER ); + $conditions = [ + 'wl_user' => $id, + 'wl_notificationtimestamp IS NOT NULL' + ]; + if ( $timestamp !== null ) { + $conditions[] = 'wl_notificationtimestamp < ' . $dbw->timestamp( $timestamp ); + } $asOfTimes = array_unique( $dbw->selectFieldValues( 'watchlist', 'wl_notificationtimestamp', - [ 'wl_user' => $id, 'wl_notificationtimestamp IS NOT NULL' ], + $conditions, __METHOD__, [ 'ORDER BY' => 'wl_notificationtimestamp DESC', 'LIMIT' => 500 ] ) ); @@ -3792,7 +3799,7 @@ $asOfTimes = array_unique( $dbw->selectFieldValues( 'watchlist', 'wl_notificationtimestamp', - [ 'wl_user' => $id, 'wl_notificationtimestamp IS NOT NULL' ], + $conditions, __METHOD__ ) ); foreach ( array_chunk( $asOfTimes, $wgUpdateRowsPerQuery ) as $asOfTimeBatch ) { -- To view, visit https://gerrit.wikimedia.org/r/358178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90635a09a5543d549dbe29d210e623c2038dbf3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Change AbuseFilter block duration for fawiki
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/358156 ) Change subject: Change AbuseFilter block duration for fawiki .. Change AbuseFilter block duration for fawiki Bug: T167562 Change-Id: I6d9db8b5cf0f3daee8bde26a7dc83e7cd220ea2c --- M wmf-config/abusefilter.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/56/358156/1 diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php index 5c72dc2..b65a015 100644 --- a/wmf-config/abusefilter.php +++ b/wmf-config/abusefilter.php @@ -185,7 +185,7 @@ $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true; $wgAbuseFilterActions = [ 'rangeblock' => true ]; $wgAbuseFilterAnonBlockDuration = '7 days'; // T87317 - $wgAbuseFilterBlockDuration = 'indefinite'; + $wgAbuseFilterBlockDuration = '14 days'; // T167562 $wgAbuseFilterNotifications = false; break; case 'fiwiki': // T59395 -- To view, visit https://gerrit.wikimedia.org/r/358156 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d9db8b5cf0f3daee8bde26a7dc83e7cd220ea2c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make the title of Special:UserRights more generic
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/342630 ) Change subject: Make the title of Special:UserRights more generic .. Make the title of Special:UserRights more generic Bug: T154575 Change-Id: If9899040c88cefeb64a09444ef0f6f42e91ebca6 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/342630/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 2816f31..61948ff 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1128,7 +1128,7 @@ "prefs-help-prefershttps": "This preference will take effect on your next login.", "prefswarning-warning": "You've made changes to your preferences that have not been saved yet.\nIf you leave this page without clicking \"$1\" your preferences will not be updated.", "prefs-tabs-navigation-hint": "Tip: You can use the left and right arrow keys to navigate between the tabs in the tabs list.", - "userrights": "User rights management", + "userrights": "User rights", "userrights-summary": "", "userrights-lookup-user": "Select a user", "userrights-user-editname": "Enter a username:", -- To view, visit https://gerrit.wikimedia.org/r/342630 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9899040c88cefeb64a09444ef0f6f42e91ebca6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Make "Description" edit field bigger when editing AbuseFilter
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/341554 ) Change subject: Make "Description" edit field bigger when editing AbuseFilter .. Make "Description" edit field bigger when editing AbuseFilter Change-Id: I6f180eb9e19aaa4d35d2499125554d7a96048f64 But: T159792 --- M Views/AbuseFilterViewEdit.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/54/341554/1 diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php index 21d4f94..543c54e 100644 --- a/Views/AbuseFilterViewEdit.php +++ b/Views/AbuseFilterViewEdit.php @@ -332,6 +332,8 @@ // Read-only attribute $readOnlyAttrib = array(); $cbReadOnlyAttrib = array(); // For checkboxes + + $styleAttrib = array('style' => 'width:95%'); if ( !$this->canEditFilter( $row ) ) { $readOnlyAttrib['readonly'] = 'readonly'; @@ -349,7 +351,7 @@ 'wpFilterDescription', 45, isset( $row->af_public_comments ) ? $row->af_public_comments : '', - $readOnlyAttrib + array_merge($readOnlyAttrib, $styleAttrib) ); global $wgAbuseFilterValidGroups; -- To view, visit https://gerrit.wikimedia.org/r/341554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f180eb9e19aaa4d35d2499125554d7a96048f64 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rephrase enotif_lastdiff and enotif_lastvisited
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/340832 ) Change subject: Rephrase enotif_lastdiff and enotif_lastvisited .. Rephrase enotif_lastdiff and enotif_lastvisited Bug: T159481 Change-Id: Id8f40c2364f383546a592a76e482f1155aa1a0fa --- M languages/i18n/en.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/340832/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 098adb6..af13fb7 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2193,8 +2193,8 @@ "enotif_body_intro_moved": "The {{SITENAME}} page $1 has been {{GENDER:$2|moved}} on $PAGEEDITDATE by $2, see $3 for the current revision.", "enotif_body_intro_restored": "The {{SITENAME}} page $1 has been {{GENDER:$2|restored}} on $PAGEEDITDATE by $2, see $3 for the current revision.", "enotif_body_intro_changed": "The {{SITENAME}} page $1 has been {{GENDER:$2|changed}} on $PAGEEDITDATE by $2, see $3 for the current revision.", - "enotif_lastvisited": "See $1 for all changes since your last visit.", - "enotif_lastdiff": "See $1 to view this change.", + "enotif_lastvisited": "For all changes since your last visit, see $1", + "enotif_lastdiff": "To view this change, see $1", "enotif_anon_editor": "anonymous user $1", "enotif_body": "Dear $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEditor's summary: $PAGESUMMARY $PAGEMINOREDIT\n\nContact the editor:\nmail: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nThere will be no other notifications in case of further activity unless you visit this page while logged in. You could also reset the notification flags for all your watched pages on your watchlist.\n\nYour friendly {{SITENAME}} notification system\n\n--\nTo change your email notification settings, visit\n{{canonicalurl:{{#special:Preferences\n\nTo change your watchlist settings, visit\n{{canonicalurl:{{#special:EditWatchlist\n\nTo delete the page from your watchlist, visit\n$UNWATCHURL\n\nFeedback and further assistance:\n$HELPPAGE", "created": "created", -- To view, visit https://gerrit.wikimedia.org/r/340832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8f40c2364f383546a592a76e482f1155aa1a0fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Don't use wfDiff() in AbuseFilter
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/339635 ) Change subject: Don't use wfDiff() in AbuseFilter .. Don't use wfDiff() in AbuseFilter Bug: T158850 Change-Id: Ib5bd4eacc3dd26dc2abdf4eedce66ed228b326d8 --- M includes/AFComputedVariable.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/35/339635/1 diff --git a/includes/AFComputedVariable.php b/includes/AFComputedVariable.php index edae665..9c88cde 100644 --- a/includes/AFComputedVariable.php +++ b/includes/AFComputedVariable.php @@ -153,9 +153,11 @@ case 'diff': $text1Var = $parameters['oldtext-var']; $text2Var = $parameters['newtext-var']; - $text1 = $vars->getVar( $text1Var )->toString() . "\n"; - $text2 = $vars->getVar( $text2Var )->toString() . "\n"; - $result = wfDiff( $text1, $text2 ); + $text1 = $vars->getVar( $text1Var )->toString(); + $text2 = $vars->getVar( $text2Var )->toString(); + $diffs = new Diff( explode( "\n", $text1 ), explode( "\n", $text2 ) ); + $format = new UnifiedDiffFormatter(); + $result = $format->format( $diffs ); break; case 'diff-split': $diff = $vars->getVar( $parameters['diff-var'] )->toString(); -- To view, visit https://gerrit.wikimedia.org/r/339635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5bd4eacc3dd26dc2abdf4eedce66ed228b326d8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Remove the "flag the edit in the abuse log" checkbox
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/337427 ) Change subject: Remove the "flag the edit in the abuse log" checkbox .. Remove the "flag the edit in the abuse log" checkbox Bug: T154091 Change-Id: I40c3176127bb168672b376147bffcdbd2aaff237 --- M Views/AbuseFilterViewEdit.php M extension.json M i18n/af.json M i18n/ar.json M i18n/arz.json M i18n/ast.json M i18n/azb.json M i18n/ba.json M i18n/bcl.json M i18n/be-tarask.json M i18n/bg.json M i18n/br.json M i18n/bs.json M i18n/ca.json M i18n/ce.json M i18n/cs.json M i18n/da.json M i18n/de.json M i18n/diq.json M i18n/dsb.json M i18n/el.json M i18n/en.json M i18n/eo.json M i18n/es.json M i18n/et.json M i18n/fa.json M i18n/fi.json M i18n/fo.json M i18n/fr.json M i18n/frp.json M i18n/gl.json M i18n/gsw.json M i18n/he.json M i18n/hi.json M i18n/hr.json M i18n/hrx.json M i18n/hsb.json M i18n/hu.json M i18n/ia.json M i18n/id.json M i18n/ilo.json M i18n/is.json M i18n/it.json M i18n/ja.json M i18n/jv.json M i18n/ka.json M i18n/kk-cyrl.json M i18n/ko.json M i18n/ksh.json M i18n/lad.json M i18n/lb.json M i18n/li.json M i18n/lt.json M i18n/lv.json M i18n/map-bms.json M i18n/mg.json M i18n/mk.json M i18n/ml.json M i18n/mr.json M i18n/ms.json M i18n/mt.json M i18n/nb.json M i18n/nds.json M i18n/nl.json M i18n/nn.json M i18n/oc.json M i18n/or.json M i18n/pfl.json M i18n/pl.json M i18n/pms.json M i18n/pt-br.json M i18n/pt.json M i18n/qqq.json M i18n/ro.json M i18n/roa-tara.json M i18n/ru.json M i18n/rue.json M i18n/sah.json M i18n/scn.json M i18n/sh.json M i18n/si.json M i18n/sk.json M i18n/sl.json M i18n/sq.json M i18n/sr-ec.json M i18n/sr-el.json M i18n/stq.json M i18n/sv.json M i18n/th.json M i18n/tk.json M i18n/tl.json M i18n/tr.json M i18n/ug-arab.json M i18n/uk.json M i18n/ur.json M i18n/vec.json M i18n/vi.json M i18n/yue.json M i18n/zh-hans.json M i18n/zh-hant.json 100 files changed, 1 insertion(+), 108 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/27/337427/1 diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php index a8eddec..21d4f94 100644 --- a/Views/AbuseFilterViewEdit.php +++ b/Views/AbuseFilterViewEdit.php @@ -651,14 +651,6 @@ Xml::buildForm( $throttleFields ) ); return $throttleSettings; - case 'flag': - $checkbox = Xml::checkLabel( - $this->msg( 'abusefilter-edit-action-flag' )->text(), - 'wpFilterActionFlag', - "mw-abusefilter-action-checkbox-$action", - true, - array( 'disabled' => '1', 'class' => 'mw-abusefilter-action-checkbox' ) ); - return Xml::tags( 'p', null, $checkbox ); case 'warn': global $wgAbuseFilterDefaultWarningMessage; $output = ''; @@ -748,7 +740,7 @@ default: // Give grep a chance to find the usages: // abusefilter-edit-action-warn, abusefilter-edit-action-disallow - // abusefilter-edit-action-flag, abusefilter-edit-action-blockautopromote + // abusefilter-edit-action-blockautopromote // abusefilter-edit-action-degroup, abusefilter-edit-action-block // abusefilter-edit-action-throttle, abusefilter-edit-action-rangeblock // abusefilter-edit-action-tag diff --git a/extension.json b/extension.json index 0af7683..f0e9823 100644 --- a/extension.json +++ b/extension.json @@ -199,7 +199,6 @@ "config": { "@doc": "see AbuseFilter.php", "AbuseFilterActions": { - "flag": true, "throttle": true, "warn": true, "disallow": true, diff --git a/i18n/af.json b/i18n/af.json index a504ac5..cc92fb5 100644 --- a/i18n/af.json +++ b/i18n/af.json @@ -113,7 +113,6 @@ "abusefilter-edit-consequences": "Aksies wat geneem is toe ooreenstem", "abusefilter-edit-action-warn": "Trigger hierdie aksies nadat die gebruiker 'n waarskuwing", "abusefilter-edit-action-disallow": "Verhoed dat die gebruiker van die uitvoering van die aksie in die vraag", - "abusefilter-edit-action-flag": "Vlag die wysig in die misbruik log", "abusefilter-edit-action-blockautopromote": "Die gebruiker se intrek motor confirmed status", "abusefilter-edit-action-degroup": "Verwyder die gebruiker van alle bevoorregte
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/me...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335960 ) Change subject: Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter into review/huji/T152934 .. Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter into review/huji/T152934 Change-Id: I7ff071ec79684c6fe71643618fc0017b78132689 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/60/335960/1 -- To view, visit https://gerrit.wikimedia.org/r/335960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ff071ec79684c6fe71643618fc0017b78132689 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: getCategoryLinks should catch invalid category title exceptions
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/329656 ) Change subject: getCategoryLinks should catch invalid category title exceptions .. getCategoryLinks should catch invalid category title exceptions Bug: T154309 Change-Id: Id12ca20f7acbaac78bd3afe76970d3cd7631e1b1 --- M pywikibot/textlib.py 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/56/329656/1 diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 9f7782e..3e4b765 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -1101,11 +1101,17 @@ title, sortKey = rest.split('|', 1) else: title, sortKey = rest, None -cat = pywikibot.Category(pywikibot.Link( - '%s:%s' % (match.group('namespace'), title), - site), - sortKey=sortKey) -result.append(cat) +try: +cat = pywikibot.Category(pywikibot.Link( + '%s:%s' % (match.group('namespace'), title), + site), + sortKey=sortKey) +result.append(cat) +except: +# Category title extracted contains invalid characters +# Likely due to on-the-fly category name creation, see T154309 +pywikibot.warning('Invalid category title extracted: %' % title) + return result -- To view, visit https://gerrit.wikimedia.org/r/329656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id12ca20f7acbaac78bd3afe76970d3cd7631e1b1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HTMLMultiSelect should allow a parameter specifying which op...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328603 ) Change subject: HTMLMultiSelect should allow a parameter specifying which options are disabled .. HTMLMultiSelect should allow a parameter specifying which options are disabled Bug: T153751 Change-Id: I3bcf6720c960e0be962e0f3f37a22ec8778db1d1 --- M includes/htmlform/HTMLFormField.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/328603/1 diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 804bbff..f1d2e0c 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -995,7 +995,7 @@ * @return array Attributes */ public function getAttributes( array $list ) { - static $boolAttribs = [ 'disabled', 'required', 'autofocus', 'multiple', 'readonly' ]; + static $boolAttribs = [ 'required', 'autofocus', 'multiple', 'readonly' ]; $ret = []; foreach ( $list as $key ) { -- To view, visit https://gerrit.wikimedia.org/r/328603 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bcf6720c960e0be962e0f3f37a22ec8778db1d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: OOjs UI should allow `disabled` to contain an array
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328601 ) Change subject: OOjs UI should allow `disabled` to contain an array .. OOjs UI should allow `disabled` to contain an array Bug: T153927 Change-Id: I32fa20e4adb23960d9db6bf6023f79bf128fb600 --- M php/Element.php M php/Widget.php M php/widgets/CheckboxMultiselectInputWidget.php 3 files changed, 30 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/01/328601/1 diff --git a/php/Element.php b/php/Element.php index 9441c7f..962b650 100644 --- a/php/Element.php +++ b/php/Element.php @@ -267,13 +267,13 @@ */ public static function configFromHtmlAttributes( array $attrs ) { $booleanAttrs = [ - 'disabled' => true, 'required' => true, 'autofocus' => true, 'multiple' => true, 'readonly' => true, ]; $attributeToConfig = [ + 'disabled' => 'disabled', 'maxlength' => 'maxLength', 'readonly' => 'readOnly', 'tabindex' => 'tabIndex', diff --git a/php/Widget.php b/php/Widget.php index b5ec488..b41bbf5 100644 --- a/php/Widget.php +++ b/php/Widget.php @@ -64,10 +64,14 @@ * @return $this */ public function setDisabled( $disabled ) { - $this->disabled = !!$disabled; - $this->toggleClasses( [ 'oo-ui-widget-disabled' ], $this->disabled ); - $this->toggleClasses( [ 'oo-ui-widget-enabled' ], !$this->disabled ); - $this->setAttributes( [ 'aria-disabled' => $this->disabled ? 'true' : 'false' ] ); + if( gettype($disabled) == 'array' ) { + $this->disabled = $disabled; + } else { + $this->disabled = !!$disabled; + $this->toggleClasses( [ 'oo-ui-widget-disabled' ], $this->disabled ); + $this->toggleClasses( [ 'oo-ui-widget-enabled' ], !$this->disabled ); + $this->setAttributes( [ 'aria-disabled' => $this->disabled ? 'true' : 'false' ] ); + } return $this; } diff --git a/php/widgets/CheckboxMultiselectInputWidget.php b/php/widgets/CheckboxMultiselectInputWidget.php index a9b8da4..a221556 100644 --- a/php/widgets/CheckboxMultiselectInputWidget.php +++ b/php/widgets/CheckboxMultiselectInputWidget.php @@ -99,6 +99,26 @@ } /** +* Get the value for the `disabled` parameter +* +* If `disabled` is an array, check if the current option +* is in that array, if so return true, else return false. +* +* If `disabled` is not an array, then you would expect it to be boolean +* so simply pass its value. +* +* @param OOUI\CheckboxMultiselectInputWidget $widget The checkboxmultiselect object +* @param string $option The value of the current object +*/ + protected function getDisabled( $widget, $option ){ + if( gettype( $widget->isDisabled() ) == 'array' ) { + return in_array( $option, $widget->isDisabled() ); + } else { + return $widget->isDisabled(); + } + } + + /** * Set the options available for this input. * * @param array[] $options Array of menu options in the format @@ -117,7 +137,7 @@ new CheckboxInputWidget( [ 'name' => $name, 'value' => $optValue, - 'disabled' => $this->isDisabled(), + 'disabled' => $this->getDisabled( $this, $optValue ), ] ), [ 'label' => isset( $opt['label'] ) ? $opt['label'] : $optValue, -- To view, visit https://gerrit.wikimedia.org/r/328601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32fa20e4adb23960d9db6bf6023f79bf128fb600 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: The match percentage is not localized in Translate suggestions
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328436 ) Change subject: The match percentage is not localized in Translate suggestions .. The match percentage is not localized in Translate suggestions Bug: T153514 Change-Id: Icf20cd5bf7cc050d59d454946eb530cecab99d1f --- M resources/js/ext.translate.editor.helpers.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/36/328436/1 diff --git a/resources/js/ext.translate.editor.helpers.js b/resources/js/ext.translate.editor.helpers.js index 5c3ef11..7d8033d 100644 --- a/resources/js/ext.translate.editor.helpers.js +++ b/resources/js/ext.translate.editor.helpers.js @@ -317,7 +317,7 @@ $( '' ) .addClass( 'three columns quality text-right' ) .text( mw.msg( 'tux-editor-tm-match', - Math.floor( translation.quality * 100 ) ) ), + Math.floor( translation.quality * 100 ).toLocaleString( translation.language ) ) ), $( '' ) .addClass( 'row text-right' ) .append( -- To view, visit https://gerrit.wikimedia.org/r/328436 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf20cd5bf7cc050d59d454946eb530cecab99d1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Disabled checked checkboxes in OOjs-UI should look grey
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328393 ) Change subject: Disabled checked checkboxes in OOjs-UI should look grey .. Disabled checked checkboxes in OOjs-UI should look grey Currently they look identical to checked boxes that are not disabled Bug: T153752 Change-Id: Ie14dfbb6d22ce90b7913cf9ef6a8ace1c9fd9c8d --- M src/themes/mediawiki/widgets.less 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/328393/1 diff --git a/src/themes/mediawiki/widgets.less b/src/themes/mediawiki/widgets.less index 92dc8de..12062fd 100644 --- a/src/themes/mediawiki/widgets.less +++ b/src/themes/mediawiki/widgets.less @@ -505,6 +505,13 @@ box-shadow: @box-shadow-progressive-focus; } } + + &:disabled { + & + span { + background-color: @background-color-disabled-filled; + border-color: @border-color-disabled; + } + } } } -- To view, visit https://gerrit.wikimedia.org/r/328393 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie14dfbb6d22ce90b7913cf9ef6a8ace1c9fd9c8d Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Disabled checked checkboxes in OOjs-UI should look grey
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328370 ) Change subject: Disabled checked checkboxes in OOjs-UI should look grey .. Disabled checked checkboxes in OOjs-UI should look grey Currently they look identical to checked boxes that are not disabled Bug: T153752 Change-Id: If0bcedb2df03002e670b79ece1715ae25db80e20 --- M resources/lib/oojs-ui/oojs-ui-core-mediawiki.css 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/328370/1 diff --git a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css index bab34b8..7cfd847 100644 --- a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css +++ b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css @@ -962,6 +962,10 @@ background-color: #36c; border-color: #36c; } +.oo-ui-checkboxInputWidget.oo-ui-widget-enabled [type='checkbox']:disabled + span { + background-color: #c8ccd1; + border-color: #c3ccd1; +} .oo-ui-checkboxInputWidget.oo-ui-widget-enabled [type='checkbox']:checked:hover + span, .oo-ui-checkboxInputWidget.oo-ui-widget-enabled [type='checkbox']:checked:focus:hover + span { background-color: #447ff5; -- To view, visit https://gerrit.wikimedia.org/r/328370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0bcedb2df03002e670b79ece1715ae25db80e20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Always show exceptions of type 'error' in LTR
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326873 ) Change subject: Always show exceptions of type 'error' in LTR .. Always show exceptions of type 'error' in LTR Bug: T153027 Change-Id: Iad5b9a01f5b8cdaa2ed94b3ece937acc1f6faa60 --- M includes/exception/MWExceptionRenderer.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/326873/1 diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php index b600f42..a569bcd 100644 --- a/includes/exception/MWExceptionRenderer.php +++ b/includes/exception/MWExceptionRenderer.php @@ -207,14 +207,14 @@ */ public static function getHTML( $e ) { if ( self::showBackTrace( $e ) ) { - $html = "" . + $html = "" . nl2br( htmlspecialchars( MWExceptionHandler::getLogMessage( $e ) ) ) . 'Backtrace:' . nl2br( htmlspecialchars( MWExceptionHandler::getRedactedTraceAsString( $e ) ) ) . "\n"; } else { $logId = WebRequest::getRequestId(); - $html = "" . + $html = "" . '[' . $logId . '] ' . gmdate( 'Y-m-d H:i:s' ) . ": " . self::msg( "internalerror-fatal-exception", -- To view, visit https://gerrit.wikimedia.org/r/326873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad5b9a01f5b8cdaa2ed94b3ece937acc1f6faa60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: AbuseLog should show a warning when log ID does not exist
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326473 ) Change subject: AbuseLog should show a warning when log ID does not exist .. AbuseLog should show a warning when log ID does not exist Bug: T152973 Change-Id: I2ccd1744a6b3e9a2ed89ef04c859cbe4f0a803df --- M i18n/en.json M i18n/qqq.json M special/SpecialAbuseLog.php 3 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/73/326473/1 diff --git a/i18n/en.json b/i18n/en.json index c168588..962fae1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -69,6 +69,7 @@ "abusefilter-log-hidden": "(entry hidden)", "abusefilter-log-hidden-implicit": "(hidden because revision has been deleted)", "abusefilter-log-cannot-see-details": "You do not have permission to see details of this entry.", + "abusefilter-log-nonexistent": "An entry with the provided ID does not exist", "abusefilter-log-details-hidden": "You cannot view the details for this entry because it is hidden from public view.", "abusefilter-log-private-not-included": "One or more of the filter IDs you specified are private. Because you are not allowed to view details of private filters, these filters have not been searched for.", "abusefilter-log-hide-legend": "Hide log entry", diff --git a/i18n/qqq.json b/i18n/qqq.json index 1e1014f..62dbb6a 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -99,7 +99,8 @@ "abusefilter-log-linkoncontribs-text": "Title for link added on [[Special:Contributions]] and other relevant special pages.", "abusefilter-log-hidden": "Text for a hidden log entry.", "abusefilter-log-hidden-implicit": "Explanatory text to be shown beside an abuse filter log entry if it cannot be viewed due to its corresponding revision being hidden", - "abusefilter-log-cannot-see-details": "Message show instead of log row details for users without permissions to see them.", + "abusefilter-log-cannot-see-details": "Message shown instead of log row details for users without permissions to see them.", + "abusefilter-log-nonexistent": "Message shown instead of log row details when the provided log ID does not exist.", "abusefilter-log-details-hidden": "Message shown instead of log row details when those are hidden.", "abusefilter-log-private-not-included": "Message shown when an unauthorized user searches by ID for private filters.", "abusefilter-log-hide-legend": "Legend for form to hide a log entry.", diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php index 69ac5ec..17801e4 100644 --- a/special/SpecialAbuseLog.php +++ b/special/SpecialAbuseLog.php @@ -307,6 +307,8 @@ ); if ( !$row ) { + $out->addWikiMsg( 'abusefilter-log-nonexistent' ); + return; } -- To view, visit https://gerrit.wikimedia.org/r/326473 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ccd1744a6b3e9a2ed89ef04c859cbe4f0a803df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Log accessing private information in abuse filter logs
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326465 ) Change subject: Log accessing private information in abuse filter logs .. Log accessing private information in abuse filter logs Change-Id: I8049df3b2b9343a6877e9a306d2781d3f27ec657 --- M i18n/en.json M i18n/qqq.json M special/SpecialAbuseLog.php 3 files changed, 153 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/65/326465/1 diff --git a/i18n/en.json b/i18n/en.json index c168588..f474847 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -60,7 +60,7 @@ "abusefilter-log-details-var": "Variable", "abusefilter-log-details-val": "Value", "abusefilter-log-details-vars": "Action parameters", - "abusefilter-log-details-private": "Private data", + "abusefilter-log-details-private": "Private log details", "abusefilter-log-details-ip": "Originating IP address", "abusefilter-log-noactions": "none", "abusefilter-log-details-diff": "Changes made in edit", @@ -78,7 +78,6 @@ "abusefilter-log-hide-forbidden": "You do not have permission to hide abuse log entries.", "abusefilter-logentry-suppress": "hid \"[[$1]]\"", "abusefilter-logentry-unsuppress": "unhid \"[[$1]]\"", - "logentry-abusefilter-hit": "$1 triggered $4, performing the action \"$5\" on $3. Actions taken: $6 ($7)", "abusefilter-management": "Abuse filter management", "abusefilter-list": "All filters", "abusefilter-list-id": "Filter ID", @@ -406,6 +405,10 @@ "abusefilter-import-submit": "Import data", "abusefilter-group-default": "Default", "abusefilter-http-error": "An HTTP error occurred: $1.", + "abusefilter-view-private-submit": "View private details", + "abusefilter-view-private": "View private details", + "abusefilter-view-private-reason": "Reason", + "abusefilter-log-details-id": "Log ID", "apihelp-abusefiltercheckmatch-description": "Check to see if an AbuseFilter matches a set of variables, editor logged AbuseFilter event.\n\nvars, rcid or logid is required however only one may be used.", "apihelp-abusefiltercheckmatch-param-filter": "The full filter text to check for a match.", "apihelp-abusefiltercheckmatch-param-vars": "JSON encoded array of variables to test against.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 1e1014f..b3ace91 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -109,7 +109,6 @@ "abusefilter-log-hide-forbidden": "Message shown instead of a \"hide log entry\" form when not having the correct user rights.", "abusefilter-logentry-suppress": "Log entry when hiding an abuse filter log entry. Parameters:\n* $1 is a link to the log ID with the log ID as description.", "abusefilter-logentry-unsuppress": "Log entry when unhiding an abuse filter log entry. Parameters:\n* $1 is a link to the log ID with the log ID as description.", - "logentry-abusefilter-hit": "This message is for a log entry. Parameters:\n* $1 user\n* $3 link to the page, that the action that triggered the filter was made on\n* $4 link to filter\n* $5 action by user, like 'edit', 'move', 'create' etc.\n* $6 actions taken by the filter\n* $7 action details link", "abusefilter-management": "Title of [[Special:AbuseFilter]]", "abusefilter-list": "Used as HTML heading.\n\nFollowed by the fieldset label {{msg-mw|Abusefilter-list-options}}.", "abusefilter-list-id": "Column header in abuse filter overview for the filter identifier.\n{{Identical|Filter ID}}", @@ -385,6 +384,11 @@ "abusefilter-import-submit": "Used as label for the Submit button.\n\nPreceded by the textarea.\n\nUsed in:\n* {{msg-mw|Abusefilter-import-intro}}.", "abusefilter-group-default": "The name for the default filter group. Most filters will be in this group.\n{{Identical|Default}}", "abusefilter-http-error": "Error message for HTTP requests. Parameters:\n* $1 - HTTP response code.", + "abusefilter-view-private-submit": "Submit button label for viewing private details of an abuse log", + "abusefilter-view-private": "Legend for abuse filter log entry private details form.", + "abusefilter-view-private-reason": "Label for the textbox where the user enters the reason they are accessing private log details.", + "abusefilter-log-details-id": "Row label in private log details.", + "abusefilter-private-log-private-details-legen": "Legend for abuse filter log entry private details display", "apihelp-abusefiltercheckmatch-description": "{{doc-apihelp-description|abusefiltercheckmatch}}", "apihelp-abusefiltercheckmatch-param-filter": "{{doc-apihelp-param|abusefiltercheckmatch|filter}}", "apihelp-abusefiltercheckmatch-param-vars":
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Remove unused message from AbuseFilter i18n files
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326375 ) Change subject: Remove unused message from AbuseFilter i18n files .. Remove unused message from AbuseFilter i18n files Bug: T152933 Change-Id: Ia42f2829cbc827e0d16c38198c33d881d432b5d7 --- M i18n/ar.json M i18n/ast.json M i18n/azb.json M i18n/ba.json M i18n/bcl.json M i18n/be-tarask.json M i18n/bs.json M i18n/ce.json M i18n/ckb.json M i18n/cs.json M i18n/da.json M i18n/de.json M i18n/diq.json M i18n/dsb.json M i18n/en.json M i18n/eo.json M i18n/es.json M i18n/et.json M i18n/fa.json M i18n/fi.json M i18n/fo.json M i18n/fr.json M i18n/gl.json M i18n/gsw.json M i18n/he.json M i18n/hi.json M i18n/hr.json M i18n/hsb.json M i18n/hu.json M i18n/ia.json M i18n/id.json M i18n/ilo.json M i18n/is.json M i18n/it.json M i18n/ja.json M i18n/jv.json M i18n/kk-cyrl.json M i18n/ko.json M i18n/ksh.json M i18n/map-bms.json M i18n/mk.json M i18n/ml.json M i18n/mr.json M i18n/ms.json M i18n/mt.json M i18n/nb.json M i18n/nl.json M i18n/nn.json M i18n/pfl.json M i18n/pl.json M i18n/pms.json M i18n/pt-br.json M i18n/pt.json M i18n/qqq.json M i18n/ro.json M i18n/roa-tara.json M i18n/ru.json M i18n/rue.json M i18n/scn.json M i18n/sk.json M i18n/sl.json M i18n/sr-ec.json M i18n/sr-el.json M i18n/sv.json M i18n/te.json M i18n/th.json M i18n/tl.json M i18n/tr.json M i18n/ug-arab.json M i18n/uk.json M i18n/vi.json M i18n/zh-hans.json M i18n/zh-hant.json 73 files changed, 0 insertions(+), 77 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/75/326375/1 diff --git a/i18n/ar.json b/i18n/ar.json index 69a4d82..23822f1 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -99,7 +99,6 @@ "abusefilter-log-hide-forbidden": "ليس لديك صلاحية لإخفاء إدخالات سجل الإساءة", "abusefilter-logentry-suppress": "تم إخفاء \"[[$1]]\"", "abusefilter-logentry-unsuppress": "تم إظهار \"[[$1]]\"", - "logentry-abusefilter-hit": "$1 أثار $4، تنفيذ الإجراء \"$5\" على $3. الإجراءات المتخذة: $6 ($7)", "abusefilter-management": "التحكم بمرشح الإساءة", "abusefilter-list": "كل المرشحات", "abusefilter-list-id": "رقم المُرشِّح", diff --git a/i18n/ast.json b/i18n/ast.json index 5b64793..e1f717e 100644 --- a/i18n/ast.json +++ b/i18n/ast.json @@ -78,7 +78,6 @@ "abusefilter-log-hide-forbidden": "Nun tienes permisu p'anubrir entraes del rexistru d'abusos.", "abusefilter-logentry-suppress": "anubre \"[[$1]]\"", "abusefilter-logentry-unsuppress": "amuesa \"[[$1]]\"", - "logentry-abusefilter-hit": "$1 provocó $4, realizando l'acción \"$5\" en $3. Acciones tomaes: $6 ($7)", "abusefilter-management": "Xestión del filtru d'abusu", "abusefilter-list": "Tolos filtros", "abusefilter-list-id": "ID del filtru", diff --git a/i18n/azb.json b/i18n/azb.json index 907fab3..e7b5fe0 100644 --- a/i18n/azb.json +++ b/i18n/azb.json @@ -80,7 +80,6 @@ "abusefilter-log-hide-forbidden": "سوی-ایستیفاده ژورنالینداکی قئیدلری گیزلتمک هوقوقونوز یوخدور.", "abusefilter-logentry-suppress": "\"[[$1]]\" گیزلت", "abusefilter-logentry-unsuppress": "\"[[$1]]\" گؤستر", - "logentry-abusefilter-hit": "$1 باعث $4 ، ایش گورمک \" $5 \" در $3 . اقداملار: $6 ( $7 )", "abusefilter-management": "سوی-ایستیفاده سوزگجلرینین ایداره اولونماسی", "abusefilter-list": "بوتون سوزگجلر", "abusefilter-list-id": "اید سوزگجی:", diff --git a/i18n/ba.json b/i18n/ba.json index 65080db..4a8d5ef 100644 --- a/i18n/ba.json +++ b/i18n/ba.json @@ -86,7 +86,6 @@ "abusefilter-log-hide-forbidden": "Һеҙҙең урынһыҙ файҙаланыуҙар яҙмалары журналындағы яҙмаларҙы йәшереү хоҡуғығыҙ юҡ.", "abusefilter-logentry-suppress": "\"[[$1]]\" яҙмаһын йәшерергә", "abusefilter-logentry-unsuppress": "\"[[$1]]\" яҙмаһын күрһәтергә", - "logentry-abusefilter-hit": "$1 ҡулланыусыһы $3 битендә \"$5\" ғәмәлен эшләп $4 фильтрын хәрәкәткә килтерҙе. Башҡарылған хәрәкәт: $6 ($7)", "abusefilter-management": "Урынһыҙ файҙаланыуҙар һөҙгөсө менән идара итеү", "abusefilter-list": "Бар һөҙгөстәр", "abusefilter-list-id": "Һөҙгөс идентификаторы", diff --git a/i18n/bcl.json b/i18n/bcl.json index 328c0ca..58c5dad 100644 --- a/i18n/bcl.json +++ b/i18n/bcl.json @@ -76,7 +76,6 @@ "abusefilter-log-hide-forbidden": "Ika mayong permiso na magtago kan mga entrada sa talaan nin abuso.", "abusefilter-logentry-suppress": "ipinagtago \"[[$1]]\"", "abusefilter-logentry-unsuppress": "dae ipinagtago \"[[$1]]", - "logentry-abusefilter-hit": "$1 kiniblit an $4, pinaghihimo an aksyon na \"$5\" sa $3. Pinaghimong mga aksyon: $6 ($7)", "abusefilter-management": "Pagmamaneho kan saraan nin abuso", "abusefilter-list": "Gabos na mga saraan", "abusefilter-list-id": "ID kan Saraan", diff --git a/i18n/be-tarask.json
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: GENDER should be used for "triggered" in AbuseFilter log mes...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326371 ) Change subject: GENDER should be used for "triggered" in AbuseFilter log messages .. GENDER should be used for "triggered" in AbuseFilter log messages Bug: T152872 Change-Id: I42ce0d741762e01d34590b334a70d30fceb877ce --- M i18n/en.json 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/71/326371/1 diff --git a/i18n/en.json b/i18n/en.json index c168588..a4ed1c9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -48,9 +48,9 @@ "abusefilter-log-search-title": "Title:", "abusefilter-log-search-wiki": "Wiki:", "abusefilter-log-search-submit": "Search", - "abusefilter-log-entry": "$1: $2 triggered an abuse filter, {{GENDER:$8|performing}} the action \"$3\" on $4.\nActions taken: $5;\nFilter description: $6", - "abusefilter-log-entry-withdiff": "$1: $2 triggered an abuse filter, {{GENDER:$8|performing}} the action \"$3\" on $4.\nActions taken: $5;\nFilter description: $6 ($7)", - "abusefilter-log-detailedentry-meta": "$1: $2 triggered $3, {{GENDER:$9|performing}} the action \"$4\" on $5.\nActions taken: $6;\nFilter description: $7 ($8)", + "abusefilter-log-entry": "$1: $2 {{GENDER:$8|triggered}} an abuse filter, {{GENDER:$8|performing}} the action \"$3\" on $4.\nActions taken: $5;\nFilter description: $6", + "abusefilter-log-entry-withdiff": "$1: $2 {{GENDER:$8|triggered}} an abuse filter, {{GENDER:$8|performing}} the action \"$3\" on $4.\nActions taken: $5;\nFilter description: $6 ($7)", + "abusefilter-log-detailedentry-meta": "$1: $2 {{GENDER:$8|triggered}} $3, {{GENDER:$9|performing}} the action \"$4\" on $5.\nActions taken: $6;\nFilter description: $7 ($8)", "abusefilter-log-detailedentry-global": "global filter $1", "abusefilter-log-detailedentry-local": "filter $1", "abusefilter-log-detailslink": "details", -- To view, visit https://gerrit.wikimedia.org/r/326371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42ce0d741762e01d34590b334a70d30fceb877ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Special:Userrights should set isself on page view, not just ...
Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/325820 ) Change subject: Special:Userrights should set isself on page view, not just on submit .. Special:Userrights should set isself on page view, not just on submit Bug: T152600 Change-Id: I5e1171be4cb75a6d7cce5f99b9d31dc0cb5d8db3 --- M includes/specials/SpecialUserrights.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/325820/1 diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 3ba46c1..8fd2a92 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -632,6 +632,7 @@ * whether any groups are changeable */ private function groupCheckboxes( $usergroups, $user ) { + $this->isself = $user->getName() == $this->getUser()->getName(); $allgroups = $this->getAllGroups(); $ret = ''; -- To view, visit https://gerrit.wikimedia.org/r/325820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e1171be4cb75a6d7cce5f99b9d31dc0cb5d8db3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Checkboxes on Special:BotPasswords should be shown on the le...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/325778 Change subject: Checkboxes on Special:BotPasswords should be shown on the left the label .. Checkboxes on Special:BotPasswords should be shown on the left the label Bug: T150079 Change-Id: I962a70a482492ffcda7a648b67306854da3e82ef --- M includes/specials/SpecialBotPasswords.php 1 file changed, 8 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/325778/1 diff --git a/includes/specials/SpecialBotPasswords.php b/includes/specials/SpecialBotPasswords.php index 1dd78d7..2fadeaf 100644 --- a/includes/specials/SpecialBotPasswords.php +++ b/includes/specials/SpecialBotPasswords.php @@ -111,39 +111,24 @@ $lang = $this->getLanguage(); $showGrants = MWGrants::getValidGrants(); - $fields['grants'] = [ - 'type' => 'checkmatrix', + $fields['grants'] = array( + 'type' => 'multiselect', 'label-message' => 'botpasswords-label-grants', 'help-message' => 'botpasswords-help-grants', - 'columns' => [ - $this->msg( 'botpasswords-label-grants-column' )->escaped() => 'grant' - ], - 'rows' => array_combine( + 'options' => array_combine( array_map( 'MWGrants::getGrantsLink', $showGrants ), $showGrants ), 'default' => array_map( function( $g ) { - return "grant-$g"; + return "$g"; }, - $this->botPassword->getGrants() - ), - 'tooltips' => array_combine( - array_map( 'MWGrants::getGrantsLink', $showGrants ), - array_map( - function( $rights ) use ( $lang ) { - return $lang->semicolonList( array_map( 'User::getRightDescription', $rights ) ); - }, - array_intersect_key( MWGrants::getRightsByGrant(), array_flip( $showGrants ) ) + array_merge( + $this->botPassword->getGrants(), + MWGrants::getHiddenGrants() ) ), - 'force-options-on' => array_map( - function( $g ) { - return "grant-$g"; - }, - MWGrants::getHiddenGrants() - ), - ]; + ); $fields['restrictions'] = [ 'class' => 'HTMLRestrictionsField', -- To view, visit https://gerrit.wikimedia.org/r/325778 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I962a70a482492ffcda7a648b67306854da3e82ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Properly use "the" article in AbuseFilter messages
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/325618 Change subject: Properly use "the" article in AbuseFilter messages .. Properly use "the" article in AbuseFilter messages Bug: T152535 Change-Id: I83650b63068f616ad512d9c3ed4f79d1ad2e40aa --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/18/325618/1 diff --git a/i18n/en.json b/i18n/en.json index 6c790f0..8625b7d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -264,7 +264,7 @@ "abusefilter-edit-builder-vars-user-age": "Age of user account", "abusefilter-edit-builder-vars-user-name": "Name of user account", "abusefilter-edit-builder-vars-user-groups": "Groups (including implicit) user is in", - "abusefilter-edit-builder-vars-user-rights": "Rights that a user has", + "abusefilter-edit-builder-vars-user-rights": "Rights that the user has", "abusefilter-edit-builder-vars-user-blocked": "Whether user is blocked", "abusefilter-edit-builder-vars-user-emailconfirm": "Time email address was confirmed", "abusefilter-edit-builder-vars-recent-contributors": "Last ten users to contribute to the page", -- To view, visit https://gerrit.wikimedia.org/r/325618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83650b63068f616ad512d9c3ed4f79d1ad2e40aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: CIDR finder should allow spaces around the minus character
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/325615 Change subject: CIDR finder should allow spaces around the minus character .. CIDR finder should allow spaces around the minus character Bug: T152519 Change-Id: Ief3f03c8a4630e070f31330744c0fe40b609a778 --- M modules/ext.checkuser.cidr.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/15/325615/1 diff --git a/modules/ext.checkuser.cidr.js b/modules/ext.checkuser.cidr.js index 8c4eb3f..c16fa42 100644 --- a/modules/ext.checkuser.cidr.js +++ b/modules/ext.checkuser.cidr.js @@ -30,13 +30,15 @@ ips = text.split( '\t' ); } else if ( text.indexOf( ',' ) !== -1 ) { ips = text.split( ',' ); + } else if ( text.indexOf( ' - ' ) !== -1 ) { + ips = text.split( ' - ' ); } else if ( text.indexOf( '-' ) !== -1 ) { ips = text.split( '-' ); } else if ( text.indexOf( ' ' ) !== -1 ) { ips = text.split( ' ' ); } else { ips = text.split( ';' ); - } + }console.log(ips); var binPrefix = 0; var prefixCidr = 0; var prefix = ''; @@ -49,6 +51,7 @@ for ( var i = 0; i < ips.length; i++ ) { // ...in the spirit of mediawiki.special.block.js, call this "addy" var addy = ips[i].replace( /^\s*|\s*$/, '' ); // trim + console.log(addy); // Match the first IP in each list (ignore other garbage) var ipV4 = mw.util.isIPv4Address( addy, true ); var ipV6 = mw.util.isIPv6Address( addy, true ); -- To view, visit https://gerrit.wikimedia.org/r/325615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief3f03c8a4630e070f31330744c0fe40b609a778 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: ULS link text is rendered connected to the word before it
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/325425 Change subject: ULS link text is rendered connected to the word before it .. ULS link text is rendered connected to the word before it Bug: T152460 Change-Id: Ibbd726a1c41bde9575ac0d432bdd6b62e6c419a0 --- M resources/js/ext.uls.inputsettings.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/25/325425/1 diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 96f76bc..2eea18a 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -205,7 +205,7 @@ $imeLabel.append( $( '' ) .addClass( 'uls-input-settings-name' ) - .text( name ), + .text( name + ' '), $( '' ) .addClass( 'uls-input-settings-description' ) .text( description ), -- To view, visit https://gerrit.wikimedia.org/r/325425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbd726a1c41bde9575ac0d432bdd6b62e6c419a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Misleading messages on Special:Userrights
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/325338 Change subject: Misleading messages on Special:Userrights .. Misleading messages on Special:Userrights Corrects what is not addressed by I57e9ca4f20fe557e4024c4f5a4865170f02ebb45 Bug: T152428 Change-Id: I105be73acc5a2bc088b557ccafbdf9db726480da --- M includes/specials/SpecialUserrights.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/325338/1 diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 5b4f1f8..3ba46c1 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -549,9 +549,14 @@ Xml::element( 'legend', [], - $this->msg( 'userrights-editusergroup', $user->getName() )->text() + $this->msg( + $canChangeAny ? 'userrights-editusergroup' : 'userrights-viewusergroup', + $user->getName() + )->text() ) . - $this->msg( 'editinguser' )->params( wfEscapeWikiText( $user->getName() ) ) + $this->msg( + $canChangeAny ? 'editinguser' : 'viewinguserrights' + )->params( wfEscapeWikiText( $user->getName() ) ) ->rawParams( $userToolLinks )->parse() ); if ( $canChangeAny ) { diff --git a/languages/i18n/en.json b/languages/i18n/en.json index d167904..733f003 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1140,7 +1140,9 @@ "userrights-user-editname": "Enter a username:", "editusergroup": "Load user groups", "editinguser": "Changing user rights of {{GENDER:$1|user}} [[User:$1|$1]] $2", + "viewinguserrights": "Viewing user rights of {{GENDER:$1|user}} [[User:$1|$1]] $2", "userrights-editusergroup": "Edit user groups", + "userrights-viewusergroup": "View user groups", "saveusergroups": "Save {{GENDER:$1|user}} groups", "userrights-groupsmember": "Member of:", "userrights-groupsmember-auto": "Implicit member of:", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 936fd8b..fea648d 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1323,8 +1323,10 @@ "userrights-lookup-user": "Label text when managing user rights ([[Special:UserRights]])", "userrights-user-editname": "Displayed on [[Special:UserRights]].", "editusergroup": "Button name, in page [[Special:Userrights]], in the section named {{MediaWiki:userrights-lookup-user}}. The username or gender of the user is not known when this message is displayed.", - "editinguser": "Appears on [[Special:UserRights]]. Parameters:\n* $1 - a plaintext username\n* $2 - user tool links. e.g. \"(Talk | contribs | block | send email)\"", - "userrights-editusergroup": "Parameter:\n* $1 - (Optional) a username, can be used for GENDER", + "editinguser": "Appears on [[Special:UserRights]]. Parameters:\n* $1 - a plaintext username\n* $2 - user tool links. e.g. \"(Talk | contribs | block | send email)\"\n\nRelated messages:\n* {{msg-mw|viewinguserrights}}", + "viewinguserrights": "Appears on [[Special:UserRights]]. Parameters:\n* $1 - a plaintext username\n* $2 - user tool links. e.g. \"(Talk | contribs | block | send email)\"\n\nRelated messages:\n* {{msg-mw|editinguser}}", + "userrights-editusergroup": "Parameter:\n* $1 - (Optional) a username, can be used for GENDER\n\nRelated messages:\n* {{msg-mw|userrights-viewusergroup}}", + "userrights-viewusergroup": "Parameter:\n* $1 - (Optional) a username, can be used for GENDER\n\nRelated messages:\n* {{msg-mw|userrights-editusergroup}}", "saveusergroups": "Button text when editing user groups.\nParameters:\n* $1 - username, for GENDER support", "userrights-groupsmember": "Used when editing user groups in [[Special:Userrights]].\n\nThe message is followed by a list of group names.\n\nParameters:\n* $1 - (Optional) the number of items in the list following the message, for PLURAL\n* $2 - (Optional) the user name, for GENDER", "userrights-groupsmember-auto": "Used when editing user groups in [[Special:Userrights]]. The message is followed by a list of group names.\n\n\"Implicit\" is for groups that the user was automatically added to (such as \"autoconfirmed\"); cf. {{msg-mw|userrights-groupsmember}}\n\nParameters:\n* $1 - (Optional) the number of items in the list following the message, for PLURAL\n* $2 -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Email footer should state that by responding one reveals the...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/325040 Change subject: Email footer should state that by responding one reveals their address .. Email footer should state that by responding one reveals their address Bug: T152242 Change-Id: I686f7bb8dd1d225620266ac9cbecadcf06bd7705 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/325040/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index afd13f0..dd4e0ab 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2068,7 +2068,7 @@ "emailccsubject": "Copy of your message to $1: $2", "emailsent": "Email sent", "emailsenttext": "Your email message has been sent.", - "emailuserfooter": "This email was {{GENDER:$1|sent}} by $1 to {{GENDER:$2|$2}} by the \"{{int:emailuser}}\" function at {{SITENAME}}.", + "emailuserfooter": "This email was {{GENDER:$1|sent}} by $1 to {{GENDER:$2|$2}} by the \"{{int:emailuser}}\" function at {{SITENAME}}. By responding to this email, {{GENDER:$2|you}} will reveal {{GENDER:$2|your}} email address to the {{GENDER:$1|original sender}} of this email.", "usermessage-summary": "Leaving system message.", "usermessage-editor": "System messenger", "usermessage-template": "MediaWiki:UserMessage", -- To view, visit https://gerrit.wikimedia.org/r/325040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I686f7bb8dd1d225620266ac9cbecadcf06bd7705 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: "Image size limit" text should always read left-to-right
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/323675 Change subject: "Image size limit" text should always read left-to-right .. "Image size limit" text should always read left-to-right Bug: T144386 Change-Id: I10ab5ed71c114bbfefcc841d8a3d4b280bf1acf2 --- M includes/Preferences.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/323675/1 diff --git a/includes/Preferences.php b/includes/Preferences.php index d86b19a..9a46980 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -633,6 +633,7 @@ 'options' => self::getImageSizes( $context ), 'label-message' => 'imagemaxsize', 'section' => 'rendering/files', + 'direction' => 'ltr', ]; $defaultPreferences['thumbsize'] = [ 'type' => 'select', @@ -1212,7 +1213,8 @@ $pixels = $context->msg( 'unit-pixel' )->text(); foreach ( $context->getConfig()->get( 'ImageLimits' ) as $index => $limits ) { - $display = "{$limits[0]}×{$limits[1]}" . $pixels; + // Note: there is a before the × character, see T144386 + $display = "{$limits[0]}×{$limits[1]}" . $pixels; $ret[$display] = $index; } -- To view, visit https://gerrit.wikimedia.org/r/323675 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10ab5ed71c114bbfefcc841d8a3d4b280bf1acf2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Document all messages for SecurePoll
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/323359 Change subject: Document all messages for SecurePoll .. Document all messages for SecurePoll Bug: T151513 Change-Id: I36c18d259dd60104c3f7d9733fc0b721e45901eb --- M i18n/qqq.json 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/59/323359/1 diff --git a/i18n/qqq.json b/i18n/qqq.json index 45f7215..b8d0fe0 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -27,11 +27,16 @@ "securepoll": "Used in the following messages:\n* {{msg-mw|Securepoll-create-title}}\n* {{msg-mw|Securepoll-create-created}}\n* {{msg-mw|Securepoll-edit-title}}\n* {{msg-mw|Securepoll-edit-edited}}\n* {{msg-mw|Securepoll-votereligibility-saved}}\n* {{msg-mw|Securepoll-votereligibility-cleared}}", "securepoll-desc": "{{desc|name=Secure Poll|url=https://www.mediawiki.org/wiki/Extension:SecurePoll}};, "securepoll-invalid-page": "Used as error message. Parameters:\n* $1 - subpage name", + "securepoll-need-admin": "Used as error message.", + "securepoll-too-few-params": "Used as error message.", "securepoll-invalid-election": "Used as error message. Parameters:\n* $1 - invalid election ID", "securepoll-welcome": "Used as welcome message for remote voters. Parameters:\n* $1 - username of remote voter\n{{Identical|Welcome}}", "securepoll-not-started": "Parameters:\n* $1 - (Unused)\n* $2 - the date of it\n* $3 - its time", "securepoll-already-started": "Parameters:\n* $1 - (Unused)\n* $2 - the date of it\n* $3 - its time", + "securepoll-finished": "Used as error message.", "securepoll-not-qualified": "Unused at this time. Paramters:\n* $1 - ...", + "securepoll-change-disallowed": "Used as error message.", + "securepoll-change-allowed": "Used as error message.", "securepoll-submit": "{{Identical|Submit}}", "securepoll-gpg-receipt": "Parameters:\n* $1 - the receipt. Format: \"SPID: (10-digit vote ID)\\n(encrypted vote record)\"\nIf the election doesn't use encryption, the following message is used:\n* {{msg-mw|securepoll-thanks}}", "securepoll-thanks": "If the election use encryption, the following message is used:\n* {{msg-mw|Securepoll-gpg-receipt}}", @@ -42,11 +47,26 @@ "securepoll-full-gpg-error": "GPG stands for [[w:GNU_Privacy_Guard|GNU Privacy Guard]].\n\nParameters:\n* $1 - command line\n* $2 - error message", "securepoll-gpg-config-error": "GPG stands for [[w:GNU_Privacy_Guard|GNU Privacy Guard]].", "securepoll-gpg-parse-error": "GPG stands for [[w:GNU_Privacy_Guard|GNU Privacy Guard]].", + "securepoll-no-decryption-key": "Used as error message.", + "securepoll-jump": "Label of the button than sends the user to the voting wiki.", + "securepoll-no-decryption-key": "Used as error message.", "securepoll-bad-ballot-submission": "Unused at this time. Parameters:\n* $1 - ...", + "securepoll-unanswered-questions": "Used as error message.", + "securepoll-invalid-rank": "Used as error message.", + "securepoll-unranked-options": "Used as error message.", "securepoll-invalid-score": "Used as error message. Parameters:\n* $1 - minimum score\n* $2 - maximum score", + "securepoll-unanswered-options": "Used as error message.", + "securepoll-remote-auth-error": "Used as error message.", + "securepoll-remote-parse-error": "Used as error message.", + "securepoll-api-invalid-params": "Used as error message.", + "securepoll-api-no-user": "Used as error message.", + "securepoll-api-token-mismatch": "Used as error message.", + "securepoll-not-logged-in": "Used as error message.", "securepoll-too-few-edits": "Used as error message. Parameters:\n* $1 - minimum number of edits\n* $2 - number of edits", "securepoll-too-new": "Parameters:\n* $1 - the required registration date\n* $2 - the actual registration date\n* $3 - the required registration time\n* $4 - the actual registration time", + "securepoll-blocked": "Used as error message.", "securepoll-blocked-centrally": "Used as error message. Parameters\n* $1 - number of wikis", + "securepoll-bot": "Used as error message.", "securepoll-not-in-group": "Used as error message. Parameters:\n* $1 - name of MediaWiki group which voters need to be in", "securepoll-not-in-list": "Used as error message.", "securepoll-in-exclude-list": "Used as error message.", @@ -68,13 +88,17 @@ "securepoll-strike-reason": "{{Identical|Reason}}", "securepoll-strike-cancel": "{{Identical|Cancel}}", "securepoll-strike-error": "Used as error message. Parameters:\n* $1 - error message", + "securepoll-strike-token-mismatch": "Used as error message.",
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rewording BotPasswords message to reflect what "grant" reall...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/320110 Change subject: Rewording BotPasswords message to reflect what "grant" really does .. Rewording BotPasswords message to reflect what "grant" really does Bug: T150080 Change-Id: Ie2ba9cc0638ab44966cf31f83dbf90036234c0e7 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/320110/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 8ac4089..b7db77d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -564,7 +564,7 @@ "botpasswords-label-delete": "Delete", "botpasswords-label-resetpassword": "Reset the password", "botpasswords-label-grants": "Applicable grants:", - "botpasswords-help-grants": "Each grant gives access to listed user rights that a user account already has. See the [[Special:ListGrants|table of grants]] for more information.", + "botpasswords-help-grants": "Grants can only allow a access to rights already held to the user account. Enabling a grant here does not provide new access to the user account. All rights must be earned through normal procedures which vary by wiki. See the [[Special:ListGrants|table of grants]] for more information.", "botpasswords-label-grants-column": "Granted", "botpasswords-bad-appid": "The bot name \"$1\" is not valid.", "botpasswords-insert-failed": "Failed to add bot name \"$1\". Was it already added?", -- To view, visit https://gerrit.wikimedia.org/r/320110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2ba9cc0638ab44966cf31f83dbf90036234c0e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Reverting I75cf5954ac8d68e607975e7b1b77170915ffe4d1
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/316291 Change subject: Reverting I75cf5954ac8d68e607975e7b1b77170915ffe4d1 .. Reverting I75cf5954ac8d68e607975e7b1b77170915ffe4d1 It was meant to be temporary. Bug: T148352 Change-Id: Iacfebe512fb791a81be8b0d415163dfb0bab93ab --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/91/316291/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3bf427d..eb2c1e7 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -167,7 +167,6 @@ 'tenwiki' => 'en', 'transitionteamwiki' => 'en', 'usabilitywiki' => 'en', - 'votewiki' => 'fa', // T132667 'wikimania' => 'en', 'wikimaniateamwiki' => 'en', 'zerowiki' => 'en', -- To view, visit https://gerrit.wikimedia.org/r/316291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacfebe512fb791a81be8b0d415163dfb0bab93ab Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update.php should allow for a wiki parameter
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/316288 Change subject: Update.php should allow for a wiki parameter .. Update.php should allow for a wiki parameter Bug: T147817 Change-Id: I984d64db5ed4622e5976c0162a9ea8f386f58a39 --- M maintenance/Maintenance.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/316288/1 diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 1cb5eef..3bf6e63 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -475,6 +475,7 @@ $this->addOption( 'server', "The protocol and server name to use in URLs, e.g. " . "http://en.wikipedia.org. This is sometimes necessary because " . "server name detection may fail in command line scripts.", false, true ); + $this->addOption( 'domain', "Domain name for the wiki being updated (only used for wiki families)", false, true ); $this->addOption( 'profiler', 'Profiler output format (usually "text")', false, true ); # Save generic options to display them separately in help @@ -927,6 +928,11 @@ * Handle the special variables that are global to all scripts */ protected function loadSpecialVars() { + global $serverName; + + if ( $this->hasOption( 'domain' ) ) { + $serverName = $this->getOption( 'domain' ); + } if ( $this->hasOption( 'dbuser' ) ) { $this->mDbUser = $this->getOption( 'dbuser' ); } -- To view, visit https://gerrit.wikimedia.org/r/316288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I984d64db5ed4622e5976c0162a9ea8f386f58a39 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Form section headers in SecurePoll should not use wikitext o...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/315560 Change subject: Form section headers in SecurePoll should not use wikitext or html .. Form section headers in SecurePoll should not use wikitext or html Bug: T147960 Change-Id: Id9153763d8744900c326c2650fa1fd053d162815 --- M i18n/en.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/60/315560/1 diff --git a/i18n/en.json b/i18n/en.json index 680ea01..f60f80c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -208,7 +208,7 @@ "securepoll-votereligibility-title": "Voter eligibility configuration", "securepoll-votereligibility-redirect": "Voter eligibility for this election must be configured on $1", "securepoll-votereligibility-redirect-otherwiki": "the main wiki", - "securepoll-votereligibility-basic": "'''Basic options'''", + "securepoll-votereligibility-basic": "Basic options", "securepoll-votereligibility-basic-info": "Basic options are checked when the user attempts to vote.", "securepoll-votereligibility-invalid-list": "The given voter eligibility list is not known.", "securepoll-votereligibility-list-is-processing": "The given voter eligibility list is being automatically populated, and cannot be edited now.", @@ -218,7 +218,7 @@ "securepoll-votereligibility-label-not_centrally_blocked": "Must not be blocked on too many attached wikis", "securepoll-votereligibility-label-central_block_threshold": "Central block threshold", "securepoll-votereligibility-label-not_bot": "Must not be flagged as a bot", - "securepoll-votereligibility-lists": "'''Voter lists'''", + "securepoll-votereligibility-lists": "Voter lists", "securepoll-votereligibility-lists-info": "Eligible voters may also be listed explicitly. There are three lists:\n* The ''{{int:securepoll-votereligibility-list-voter}}'' is a list of voters who are allowed to vote, if they also meet the basic requirements defined above. This list is often populated automatically.\n* The ''{{int:securepoll-votereligibility-list-include}}'' is a list of voters who are allowed to vote regardless of the basic requirements or the eligibility list.\n* The ''{{int:securepoll-votereligibility-list-exclude}}'' is a list of voters who are not allowed to vote, regardless of any other lists.", "securepoll-votereligibility-list-voter": "Eligibility list", "securepoll-votereligibility-list-include": "Override list", -- To view, visit https://gerrit.wikimedia.org/r/315560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9153763d8744900c326c2650fa1fd053d162815 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Voter eligibility form is inconsistent in dates it suggests ...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/315558 Change subject: Voter eligibility form is inconsistent in dates it suggests and uses .. Voter eligibility form is inconsistent in dates it suggests and uses Bug: T147962 Change-Id: Ib83d5a051ff4d587a3efbf1cc5ac6f0ef4087449 --- M includes/pages/VoterEligibilityPage.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/58/315558/1 diff --git a/includes/pages/VoterEligibilityPage.php b/includes/pages/VoterEligibilityPage.php index acc54af..bfde069 100644 --- a/includes/pages/VoterEligibilityPage.php +++ b/includes/pages/VoterEligibilityPage.php @@ -362,6 +362,8 @@ $date = $this->election->getProperty( 'max-registration', '' ); if ( $date !== '' ) { $date = gmdate( 'Y-m-d', wfTimestamp( TS_UNIX, $date ) ); + } else { + $date = gmdate( 'Y-m-d', strtotime( 'yesterday' ) ); } $formItems['max-registration'] = array( 'section' => 'basic', @@ -501,6 +503,8 @@ $date = $this->election->getProperty( 'list_edits-before-date', '' ); if ( $date !== '' ) { $date = gmdate( 'Y-m-d', wfTimestamp( TS_UNIX, $date ) ); + } else { + $date = gmdate( 'Y-m-d', strtotime( 'yesterday' ) ); } $formItems['list_edits-before-date'] = array( 'section' => 'lists', @@ -538,7 +542,10 @@ $dates = $this->election->getProperty( 'list_edits-between-dates', '' ); if ( $dates === '' ) { - $dates = array(); + $dates = array( + gmdate( 'Y-m-d', strtotime( '2 days ago' ) ), + gmdate( 'Y-m-d', strtotime( 'yesterday' ) ) + ); } else { $dates = explode( '|', $dates ); $dates = array( -- To view, visit https://gerrit.wikimedia.org/r/315558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib83d5a051ff4d587a3efbf1cc5ac6f0ef4087449 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Don't use jquery.ui.datepicker in SecurePoll
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/315516 Change subject: Don't use jquery.ui.datepicker in SecurePoll .. Don't use jquery.ui.datepicker in SecurePoll Bug: T147136 Change-Id: I23304d9a9861323bc77dd64d4f4bea6e191e2700 --- M i18n/en.json M i18n/qqq.json M includes/pages/CreatePage.php 3 files changed, 32 insertions(+), 42 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/16/315516/1 diff --git a/i18n/en.json b/i18n/en.json index 680ea01..6d11d4c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -132,12 +132,6 @@ "securepoll-htmlform-date-invalid": "The value you specified is not a recognized date. Try using -MM-DD format.", "securepoll-htmlform-date-toolow": "The value you specified is before the earliest allowed date of $1.", "securepoll-htmlform-date-toohigh": "The value you specified is after the latest allowed date of $1.", - "securepoll-htmlform-daterange-relative-layout": "Start on $1 and run for $2 days", - "securepoll-htmlform-daterange-absolute-layout": "Start on $1 and end on $2", - "securepoll-htmlform-daterange-days-badoption": "The value you specified for the number of days to run is not a valid option.", - "securepoll-htmlform-daterange-days-invalid": "The value you specified for the number of days to run is not an integer.", - "securepoll-htmlform-daterange-days-toolow": "The value you specified for the number of days to run is below the minimum of {{PLURAL:$1|$1}}.", - "securepoll-htmlform-daterange-days-toohigh": "The value you specified for the number of days to run is above the maximum of {{PLURAL:$1|$1}}.", "securepoll-htmlform-daterange-end-before-start": "The end date given is before the start date.", "securepoll-htmlform-daterange-error-partial": "Both date fields must be filled or left empty.", "securepoll-htmlform-radiorange-missing-message": "Please specify a value for column $1", @@ -151,8 +145,10 @@ "securepoll-create-option-wiki-all_wikis": "All wikis", "securepoll-create-option-wiki-other_wiki": "Other specific wiki", "securepoll-create-label-election_primaryLang": "Primary Language:", - "securepoll-create-label-election_dates": "Election Dates:", - "securepoll-create-layout-election_dates": "Start on $1 (at 00:00 UTC) and run for $2 day(s)", + "securepoll-create-label-election_startdate": "Election Start Date:", + "securepoll-create-layout-election_startdate": "Start on $1 (at 00:00 UTC)", + "securepoll-create-label-election_enddate": "Election End Date:", + "securepoll-create-layout-election_enddate": "End on $1 (at 00:00 UTC)", "securepoll-create-label-election_disallow-change": "Prevent voters from changing their votes", "securepoll-create-label-election_return-url": "Return-to URL:", "securepoll-create-label-election_jump-text": "Jump text:", diff --git a/i18n/qqq.json b/i18n/qqq.json index 45f7215..b072e47 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -113,12 +113,6 @@ "securepoll-htmlform-date-invalid": "Used as error message in HTML forms. This date MUST be formatted in the https://en.wikipedia.org/wiki/ISO_8601 format. You can localise the letters to your language or script, but you should not change the format.\n\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Securepoll-htmlform-date-placeholder}}\n* {{msg-mw|Securepoll-htmlform-date-toolow}}\n* {{msg-mw|Securepoll-htmlform-date-toohigh}}\n* {{msg-mw|Htmlform-required}}", "securepoll-htmlform-date-toolow": "Used as error message in HTML forms. Parameters:\n* $1 - minimum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}\n* {{msg-mw|Securepoll-htmlform-date-invalid}}\n* {{msg-mw|Securepoll-htmlform-date-toohigh}}", "securepoll-htmlform-date-toohigh": "Used as error message in HTML forms. Parameters:\n* $1 - maximum date\nSee also:\n* {{msg-mw|Htmlform-invalid-input}}\n* {{msg-mw|Htmlform-required}}\n* {{msg-mw|Securepoll-htmlform-date-invalid}}\n* {{msg-mw|Securepoll-htmlform-date-toolow}}", - "securepoll-htmlform-daterange-relative-layout": "Used to give context to the form fields in an HTML form date-range element.\n* $1 - HTML for the starting date control\n* $2 - HTML for the number-of-days control. This is an input field to be added by the user and the number is not shown initially, so \"days\" should be translated as a generic plural of an unknown number.", - "securepoll-htmlform-daterange-absolute-layout": "Used to give context to the form fields in an HTML form date-range element.\n* $1 - HTML for the starting date control\n* $2 - HTML for the ending date control", - "securepoll-htmlform-daterange-days-badoption": "Used as error message in HTML forms.\n\n*
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Remove reference to the jump-text parameter from the poll cr...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/315514 Change subject: Remove reference to the jump-text parameter from the poll creation page .. Remove reference to the jump-text parameter from the poll creation page Bug: T145657 Change-Id: Ie843f2c96fc58e0067c7c20d737fba7ea680e8e7 --- M includes/pages/CreatePage.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/14/315514/1 diff --git a/includes/pages/CreatePage.php b/includes/pages/CreatePage.php index 11cca58..f2f071d 100644 --- a/includes/pages/CreatePage.php +++ b/includes/pages/CreatePage.php @@ -968,7 +968,6 @@ ); $this->messages[$this->lang][$eId] = array( 'title' => $formData['election_title'], - 'jump-text' => $formData['jump-text'], ); $admins = $this->getAdminsList( $formData['property_admins'] ); -- To view, visit https://gerrit.wikimedia.org/r/315514 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie843f2c96fc58e0067c7c20d737fba7ea680e8e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Poll owner field exists with no default value
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/315320 Change subject: Poll owner field exists with no default value .. Poll owner field exists with no default value Bug: T147824 Change-Id: I24b6cad9c364309e1772b15321f95152f62ab4f7 --- M includes/entities/Election.php M includes/main/Store.php M includes/pages/CreatePage.php 3 files changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/20/315320/1 diff --git a/includes/entities/Election.php b/includes/entities/Election.php index ff0ef1d..2749639 100644 --- a/includes/entities/Election.php +++ b/includes/entities/Election.php @@ -91,6 +91,7 @@ $this->startDate = $info['startDate']; $this->endDate = $info['endDate']; $this->authType = $info['auth']; + $this->owner = $info['owner']; } /** diff --git a/includes/main/Store.php b/includes/main/Store.php index 776e5ae..49d482e 100644 --- a/includes/main/Store.php +++ b/includes/main/Store.php @@ -40,6 +40,10 @@ */ function getEntityType( $id ); + /** +* Get the user ID for current user. +*/ + function getUserId(); /** * Get information about a set of elections, specifically the data that @@ -168,7 +172,8 @@ 'primaryLang' => 'el_primary_lang', 'startDate' => 'el_start_date', 'endDate' => 'el_end_date', - 'auth' => 'el_auth_type' + 'auth' => 'el_auth_type', + 'owner' => 'el_owner' ); $info = array(); @@ -184,6 +189,11 @@ function getDB( $index = DB_MASTER ) { return wfGetDB( $index ); + } + + function getUserId() { + global $wgUser; + return $wgUser->mId; } function getQuestionInfo( $electionId ) { @@ -343,6 +353,11 @@ 'is disabled.' ); } + function getUserId() { + global $wgUser; + return $wgUser->mId; + } + function callbackValidVotes( $electionId, $callback ) { if ( !isset( $this->votes[$electionId] ) ) { return Status::newGood(); diff --git a/includes/pages/CreatePage.php b/includes/pages/CreatePage.php index 11cca58..cfa9fab 100644 --- a/includes/pages/CreatePage.php +++ b/includes/pages/CreatePage.php @@ -456,6 +456,7 @@ 'el_start_date' => $dbw->timestamp( $election->getStartDate() ), 'el_end_date' => $dbw->timestamp( $election->getEndDate() ), 'el_auth_type' => $election->authType, + 'el_owner' => $election->owner, ); if ( $election->getId() < 0 ) { $eId = self::insertEntity( $dbw, 'election' ); @@ -943,6 +944,7 @@ $endDate = $date->format( 'YmdHis' ); $this->lang = $formData['election_primaryLang']; + $owner = $this->getUserId(); $eId = (int)$formData['election_id'] <= 0 ? --$curId : (int)$formData['election_id']; $this->eId = $eId; @@ -956,6 +958,7 @@ 'startDate' => wfTimestamp( TS_MW, $startDate ), 'endDate' => wfTimestamp( TS_MW, $endDate ), 'auth' => $this->remoteWikis ? 'remote-mw' : 'local', + 'owner' => $owner, 'questions' => array(), ); $this->properties[$eId] = array( -- To view, visit https://gerrit.wikimedia.org/r/315320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24b6cad9c364309e1772b15321f95152f62ab4f7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Password reset link is shown when no reset options are avail...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/313853 Change subject: Password reset link is shown when no reset options are available .. Password reset link is shown when no reset options are available Bug: T144705 Change-Id: I7d6b563e32039e7313121de9629f02ad4f02d351 --- M includes/specialpage/LoginSignupSpecialPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/313853/1 diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index bf83e7b..275e121 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -1070,7 +1070,7 @@ } if ( !$this->isSignup() && $this->showExtraInformation() ) { $passwordReset = new PasswordReset( $this->getConfig(), AuthManager::singleton() ); - if ( $passwordReset->isAllowed( $this->getUser() ) ) { + if ( $passwordReset->isAllowed( $this->getUser() )->isGood() ) { $fieldDefinitions['passwordReset'] = [ 'type' => 'info', 'raw' => true, -- To view, visit https://gerrit.wikimedia.org/r/313853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d6b563e32039e7313121de9629f02ad4f02d351 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add "from" to MediaWiki:Search-redirect
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/313765 Change subject: Add "from" to MediaWiki:Search-redirect .. Add "from" to MediaWiki:Search-redirect Bug: T129941 Change-Id: If8871fe85b1c1c8202895c964d47ef250a1ed110 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/313765/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index cbe755d..b7a0f83 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -993,7 +993,7 @@ "searchprofile-advanced-tooltip": "Search in custom namespaces", "search-result-size": "$1 ({{PLURAL:$2|1 word|$2 words}})", "search-result-category-size": "{{PLURAL:$1|1 member|$1 members}} ({{PLURAL:$2|1 subcategory|$2 subcategories}}, {{PLURAL:$3|1 file|$3 files}})", - "search-redirect": "(redirect $1)", + "search-redirect": "(redirect from $1)", "search-section": "(section $1)", "search-category": "(category $1)", "search-file-match": "(matches file content)", -- To view, visit https://gerrit.wikimedia.org/r/313765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8871fe85b1c1c8202895c964d47ef250a1ed110 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Numbers shown in poll statistics should be localized
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/311128 Change subject: Numbers shown in poll statistics should be localized .. Numbers shown in poll statistics should be localized Change-Id: I371ac0f6d8c4e7ad39573ea497804714336c164c --- M includes/pages/ListPage.php 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/28/311128/1 diff --git a/includes/pages/ListPage.php b/includes/pages/ListPage.php index 44b9ed8..4ea534e 100644 --- a/includes/pages/ListPage.php +++ b/includes/pages/ListPage.php @@ -14,6 +14,7 @@ */ public function execute( $params ) { $out = $this->specialPage->getOutput(); + $lang = $out->getLanguage(); if ( !count( $params ) ) { $out->addWikiMsg( 'securepoll-too-few-params' ); @@ -79,9 +80,13 @@ $struck_votes = $res->result->num_rows; $out->addHTML('' . - $this->msg( 'securepoll-voter-stats', $distinct_voters ) . + $this->msg( 'securepoll-voter-stats', + $lang->formatNum( $distinct_voters ) ) . '' . - $this->msg( 'securepoll-vote-stats', $all_votes, $not_current_votes, $struck_votes ) . + $this->msg( 'securepoll-vote-stats', + $lang->formatNum( $all_votes ), + $lang->formatNum( $not_current_votes ), + $lang->formatNum( $struck_votes ) ) . ''); $pager = new SecurePoll_ListPager( $this ); -- To view, visit https://gerrit.wikimedia.org/r/311128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I371ac0f6d8c4e7ad39573ea497804714336c164c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: User counts should be localized
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/311126 Change subject: User counts should be localized .. User counts should be localized Bug: T145870 Change-Id: I3acfe17b1403517e3f48daa9f7bfefc0d1bdaf04 --- M specials/SpecialCheckUser.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/26/311126/1 diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index 381a82e..f0fb351 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -540,7 +540,9 @@ __METHOD__ ); } if ( $ipedits > $ips_edits[$ip] ) { - $s .= ' (' . $this->msg( 'checkuser-ipeditcount', $ipedits )->escaped() . ')'; + $s .= ' (' . + $this->msg( 'checkuser-ipeditcount', $wgLang->formatNum( $ipedits ) )->escaped() . + ')'; } // If this IP is blocked, give a link to the block log -- To view, visit https://gerrit.wikimedia.org/r/311126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3acfe17b1403517e3f48daa9f7bfefc0d1bdaf04 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Numbers showin poll statistics should be normalized
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/311125 Change subject: Numbers showin poll statistics should be normalized .. Numbers showin poll statistics should be normalized Bug: 145542 Change-Id: Id6a40c31afd02341194d90513dff82069f93ba21 --- M includes/pages/ListPage.php 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/25/311125/1 diff --git a/includes/pages/ListPage.php b/includes/pages/ListPage.php index 44b9ed8..27e147b 100644 --- a/includes/pages/ListPage.php +++ b/includes/pages/ListPage.php @@ -13,6 +13,7 @@ * @param $params array Array of subpage parameters. */ public function execute( $params ) { + global $wgLang; $out = $this->specialPage->getOutput(); if ( !count( $params ) ) { @@ -79,9 +80,13 @@ $struck_votes = $res->result->num_rows; $out->addHTML('' . - $this->msg( 'securepoll-voter-stats', $distinct_voters ) . + $this->msg( 'securepoll-voter-stats', + $wgLang->formatNum( $distinct_voters ) ) . '' . - $this->msg( 'securepoll-vote-stats', $all_votes, $not_current_votes, $struck_votes ) . + $this->msg( 'securepoll-vote-stats', + $wgLang->formatNum( $all_votes ), + $wgLang->formatNum( $not_current_votes ), + $wgLang->formatNum( $struck_votes ) ) . ''); $pager = new SecurePoll_ListPager( $this ); -- To view, visit https://gerrit.wikimedia.org/r/311125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6a40c31afd02341194d90513dff82069f93ba21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Special:SecurePoll should be listed on Special:SpecialPages
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/310960 Change subject: Special:SecurePoll should be listed on Special:SpecialPages .. Special:SecurePoll should be listed on Special:SpecialPages Bug: T145342 Change-Id: I6a1c08b8ac49bc860ff0b10bb200f27b56e89568 --- M includes/main/SpecialSecurePoll.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/60/310960/1 diff --git a/includes/main/SpecialSecurePoll.php b/includes/main/SpecialSecurePoll.php index 558f0d1..e6c59f3 100644 --- a/includes/main/SpecialSecurePoll.php +++ b/includes/main/SpecialSecurePoll.php @@ -5,7 +5,7 @@ * Special:SecurePoll. The actual pages are not actually subclasses of * this or of SpecialPage, they're subclassed from SecurePoll_ActionPage. */ -class SecurePoll_SpecialSecurePoll extends UnlistedSpecialPage { +class SecurePoll_SpecialSecurePoll extends SpecialPage { public static $pages = array( 'create' => 'SecurePoll_CreatePage', 'edit' => 'SecurePoll_CreatePage', -- To view, visit https://gerrit.wikimedia.org/r/310960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a1c08b8ac49bc860ff0b10bb200f27b56e89568 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Dump should return decrypted votes
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/310824 Change subject: Dump should return decrypted votes .. Dump should return decrypted votes Bug: T145695 Change-Id: I6244e0ff576cd006d61dfec172f9dc3ab584515d --- M includes/pages/DumpPage.php 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/24/310824/1 diff --git a/includes/pages/DumpPage.php b/includes/pages/DumpPage.php index a0465de..a90d333 100644 --- a/includes/pages/DumpPage.php +++ b/includes/pages/DumpPage.php @@ -63,7 +63,22 @@ if ( !$this->headersSent ) { $this->sendHeaders(); } - echo "" . $row->vote_record . "\n"; + $record = $row->vote_record; + if ( $this->election->getCrypt() ) { + $status = $this->election->getCrypt()->decrypt( $record ); + if ( !$status->isOK() ) { + // Decrypt failed, e.g. invalid or absent private key + // Still, return the encrypted vote + echo "\n" . $record . "\n\n"; + } else { + $decrypted_record = $status->value; + echo "\n" . $record . + "\n" . $decrypted_record . + "\n\n"; + } + } else { + echo "" . $record . "\n"; + } } public function sendHeaders() { -- To view, visit https://gerrit.wikimedia.org/r/310824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6244e0ff576cd006d61dfec172f9dc3ab584515d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Dump page should work for non-encrypted elections too
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/310558 Change subject: Dump page should work for non-encrypted elections too .. Dump page should work for non-encrypted elections too Bug: T145648 Change-Id: I63501b80faf607b6d885300e88dacab093c466e4 --- M i18n/en.json M includes/entities/Election.php M includes/pages/DumpPage.php 3 files changed, 5 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/58/310558/1 diff --git a/i18n/en.json b/i18n/en.json index 680ea01..7eea65b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -83,8 +83,7 @@ "securepoll-header-admin": "Admin", "securepoll-cookie-dup-list": "Cookie duplicate users", "securepoll-dump-title": "Dump: $1", - "securepoll-dump-no-crypt": "No encrypted election record is available for this election, because the election is not configured to use encryption.", - "securepoll-dump-not-finished": "Encrypted election records are only available after the finish date on $1 at $2", + "securepoll-dump-not-finished": "Election records are only available after the finish date on $1 at $2", "securepoll-dump-no-urandom": "Cannot open /dev/urandom. \nTo maintain voter privacy, encrypted election records are only publically available when they can be shuffled with a secure random number stream.", "securepoll-dump-private": "Sorry, viewing the encrypted record dump for this election is restricted to election administrators.", "securepoll-urandom-not-supported": "This server does not support cryptographic random number generation.\nTo maintain voter privacy, encrypted election records are only publically available when they can be shuffled with a secure random number stream.", diff --git a/includes/entities/Election.php b/includes/entities/Election.php index ff0ef1d..29148b7 100644 --- a/includes/entities/Election.php +++ b/includes/entities/Election.php @@ -360,10 +360,6 @@ * Call a callback function for each valid vote record, in random order. */ function dumpVotesToCallback( $callback ) { - if ( !$this->getCrypt() ) { - return Status::newFatal( 'securepoll-dump-no-crypt' ); - } - $random = $this->context->getRandom(); $status = $random->open(); if ( !$status->isOK() ) { diff --git a/includes/pages/DumpPage.php b/includes/pages/DumpPage.php index a0465de..71cb1ef 100644 --- a/includes/pages/DumpPage.php +++ b/includes/pages/DumpPage.php @@ -29,21 +29,16 @@ $out->setPageTitle( $this->msg( 'securepoll-dump-title', $this->election->getMessage( 'title' ) )->text() ); - if ( !$this->election->getCrypt() ) { - $out->addWikiMsg( 'securepoll-dump-no-crypt' ); + if ( !$this->election->isFinished() ) { + $out->addWikiMsg( 'securepoll-dump-not-finished', + $this->specialPage->getLanguage()->date( $this->election->getEndDate() ), + $this->specialPage->getLanguage()->time( $this->election->getEndDate() ) ); return; } $isAdmin = $this->election->isAdmin( $this->specialPage->getUser() ); if ( $this->election->getProperty( 'voter-privacy' ) && !$isAdmin ) { $out->addWikiMsg( 'securepoll-dump-private' ); - return; - } - - if ( !$this->election->isFinished() ) { - $out->addWikiMsg( 'securepoll-dump-not-finished', - $this->specialPage->getLanguage()->date( $this->election->getEndDate() ), - $this->specialPage->getLanguage()->time( $this->election->getEndDate() ) ); return; } -- To view, visit https://gerrit.wikimedia.org/r/310558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63501b80faf607b6d885300e88dacab093c466e4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Show statistics above teh list of votes
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/310382 Change subject: Show statistics above teh list of votes .. Show statistics above teh list of votes Bug: T145542 Change-Id: I807b2f083873c332eaebe8eb74b3ada08e90574b --- M i18n/en.json M i18n/qqq.json M includes/pages/ListPage.php 3 files changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/82/310382/1 diff --git a/i18n/en.json b/i18n/en.json index 17d28c3..b12eddd 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -254,6 +254,8 @@ "right-securepoll-create-poll": "Create polls", "action-securepoll-create-poll": "create polls", "securepoll-ns-readonly": "The {{ns:SecurePoll}} namespace is read-only", + "securepoll-voter-stats": "Out of all eligible voters, $1 {{PLURAL:$1|voter has|voters have}} voted.", + "securepoll-vote-stats": "A total of $1 {{PLURAL:$1|vote has|votes have}} been cast. Of these, $2 {{PLURAL:$2|is|are}} thrown away because the voter has voted again, and $3 {{PLURAL:$3|is|are}} struk.", "apihelp-strikevote-description": "Allows admins to strike or unstrike a vote.", "apihelp-strikevote-param-option": "Which action to take: strike or unstrike a vote.", "apihelp-strikevote-paramvalue-option-strike": "Strike a vote (remove it from the count).", diff --git a/i18n/qqq.json b/i18n/qqq.json index 747e5b5..45f7215 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -235,6 +235,8 @@ "right-securepoll-create-poll": "{{doc-right|securepoll-create-poll}}", "action-securepoll-create-poll": "{{Doc-action|securepoll-create-poll}}", "securepoll-ns-readonly": "Error message to inform the user that the SecurePoll namespace cannot be edited.", + "securepoll-voter-stats": "Explanation of the unique number of voters who participated in the election; shown above the vote list.", + "securepoll-vote-stats": "Explanation of the total number of votes cast, as well as the number that were excluded because the voter had voted again, and the number that have been struck by an election admin; shown above the vote list.", "apihelp-strikevote-description": "{{doc-apihelp-description|strikevote}}", "apihelp-strikevote-param-option": "{{doc-apihelp-param|strikevote|option}}", "apihelp-strikevote-paramvalue-option-strike": "{{doc-apihelp-paramvalue|strikevote|option|strike}}", diff --git a/includes/pages/ListPage.php b/includes/pages/ListPage.php index cd9fcf5..15e6742 100644 --- a/includes/pages/ListPage.php +++ b/includes/pages/ListPage.php @@ -37,6 +37,52 @@ return; } + $dbw = $this->election->context->getDB(); + + $res = $dbw->select( + 'securepoll_votes', + array( 'DISTINCT vote_voter' ), + array( + 'vote_election' => $this->election->getID() + ) + ); + $distinct_voters = $res->result->num_rows; + + $res = $dbw->select( + 'securepoll_votes', + array( 'vote_id' ), + array( + 'vote_election' => $this->election->getID() + ) + ); + $all_votes = $res->result->num_rows; + + $res = $dbw->select( + 'securepoll_votes', + array( 'vote_id' ), + array( + 'vote_election' => $this->election->getID(), + 'vote_current' => 0 + ) + ); + $not_current_votes = $res->result->num_rows; + + $res = $dbw->select( + 'securepoll_votes', + array( 'vote_id' ), + array( + 'vote_election' => $this->election->getID(), + 'vote_struck' => 1 + ) + ); + $struck_votes = $res->result->num_rows; + + $out->addHTML('' . + $this->msg( 'securepoll-voter-stats', $distinct_voters ) . + '' . + $this->msg( 'securepoll-vote-stats', $all_votes, $not_current_votes, $struck_votes ) . + ''); + $pager = new SecurePoll_ListPager( $this ); $out->addHTML( $pager->getLimitForm() . -- To view, visit https://gerrit.wikimedia.org/r/310382 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I807b2f083873c332eaebe8eb74b3ada08e90574b Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow all users to view Special:UserRights
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/310181 Change subject: Allow all users to view Special:UserRights .. Allow all users to view Special:UserRights Allow Special:UserRights to always be used in read-only mode, rather than completely locking out users who cannot make modifications with it. Bug: T27319 Change-Id: I5e586c09f4e92108d57bd2167a033e58425b7d5d --- M includes/specials/SpecialUserrights.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 58 insertions(+), 119 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/310181/1 diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 8a06abf..cc82177 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -48,32 +48,6 @@ return true; } - public function isRestricted() { - return true; - } - - public function userCanExecute( User $user ) { - return $this->userCanChangeRights( $user, false ); - } - - /** -* @param User $user -* @param bool $checkIfSelf -* @return bool -*/ - public function userCanChangeRights( $user, $checkIfSelf = true ) { - $available = $this->changeableGroups(); - if ( $user->getId() == 0 ) { - return false; - } - - return !empty( $available['add'] ) - || !empty( $available['remove'] ) - || ( ( $this->isself || !$checkIfSelf ) && - ( !empty( $available['add-self'] ) - || !empty( $available['remove-self'] ) ) ); - } - /** * Manage forms to be shown according to posted data. * Depending on the submit button used, call a form or a save function. @@ -82,21 +56,9 @@ * @throws UserBlockedError|PermissionsError */ public function execute( $par ) { - // If the visitor doesn't have permissions to assign or remove - // any groups, it's a bit silly to give them the user search prompt. - $user = $this->getUser(); $request = $this->getRequest(); $out = $this->getOutput(); - - /* -* If the user is blocked and they only have "partial" access -* (e.g. they don't have the userrights permission), then don't -* allow them to use Special:UserRights. -*/ - if ( $user->isBlocked() && !$user->isAllowed( 'userrights' ) ) { - throw new UserBlockedError( $user->getBlock() ); - } if ( $par !== null ) { $this->mTarget = $par; @@ -108,24 +70,7 @@ $this->mTarget = trim( $this->mTarget ); } - $available = $this->changeableGroups(); - - if ( $this->mTarget === null ) { - /* -* If the user specified no target, and they can only -* edit their own groups, automatically set them as the -* target. -*/ - if ( !count( $available['add'] ) && !count( $available['remove'] ) ) { - $this->mTarget = $user->getName(); - } - } - - if ( $this->mTarget !== null && User::getCanonicalName( $this->mTarget ) === $user->getName() ) { - $this->isself = true; - } - - $fetchedStatus = $this->fetchUser( $this->mTarget ); + $fetchedStatus = $this->fetchUser( $this->mTarget, true ); if ( $fetchedStatus->isOK() ) { $this->mFetchedUser = $fetchedStatus->value; if ( $this->mFetchedUser instanceof User ) { @@ -133,23 +78,6 @@ // User logs, UserRights, etc. $this->getSkin()->setRelevantUser( $this->mFetchedUser ); } - } - - if ( !$this->userCanChangeRights( $user, true ) ) { - if ( $this->isself && $request->getCheck( 'success' ) ) { - // bug 48609: if the user just removed its own rights, this would - // leads it in a "permissions error" page. In that case, show a - // message that it can't anymore use this page instead of an error - $this->setHeaders(); - $out->wrapWikiMsg( "\n$1\n", 'userrights-removed-self' ); -
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: SecurePoll tally should show parsed options correctly
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/310051 Change subject: SecurePoll tally should show parsed options correctly .. SecurePoll tally should show parsed options correctly Bug: T145400 Change-Id: Ie8e67a9edcb03dc072f12d282b96a8f61d505fc4 --- M includes/talliers/Tallier.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/51/310051/1 diff --git a/includes/talliers/Tallier.php b/includes/talliers/Tallier.php index 07c7005..ec4ad30 100644 --- a/includes/talliers/Tallier.php +++ b/includes/talliers/Tallier.php @@ -89,7 +89,9 @@ $option = $this->optionsById[$oid]; $s .= "" . Xml::element( 'td', array(), $rank ) . - Xml::element( 'td', array(), $option->parseMessage( 'text', false ) ) . + Xml::openElement( 'td', array() ) . + $option->parseMessage( 'text', false ) . + Xml::closeElement( 'td' ) . "\n"; } $s .= ""; -- To view, visit https://gerrit.wikimedia.org/r/310051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8e67a9edcb03dc072f12d282b96a8f61d505fc4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Display an error message when the validataion of a radio inp...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/309920 Change subject: Display an error message when the validataion of a radio input fails because user did not provide any input. .. Display an error message when the validataion of a radio input fails because user did not provide any input. Bug: T107486 Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b --- M includes/htmlform/fields/HTMLRadioField.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/309920/1 diff --git a/includes/htmlform/fields/HTMLRadioField.php b/includes/htmlform/fields/HTMLRadioField.php index e5b5e68..6ee969c 100644 --- a/includes/htmlform/fields/HTMLRadioField.php +++ b/includes/htmlform/fields/HTMLRadioField.php @@ -12,7 +12,7 @@ } if ( !is_string( $value ) && !is_int( $value ) ) { - return false; + return $this->msg( 'htmlform-required' )->parse();; } $validOptions = HTMLFormField::flattenOptions( $this->getOptions() ); -- To view, visit https://gerrit.wikimedia.org/r/309920 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Test patch, will abandon, please disregard
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/307150 Change subject: Test patch, will abandon, please disregard .. Test patch, will abandon, please disregard Change-Id: Id81b5162c1cb545db1bf1f916b50c3521c519e95 --- M COPYING 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/50/307150/1 diff --git a/COPYING b/COPYING index d159169..7cad5cb 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., -- To view, visit https://gerrit.wikimedia.org/r/307150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id81b5162c1cb545db1bf1f916b50c3521c519e95 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: First letter of the string should be fetched using ms_substr...
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/304681 Change subject: First letter of the string should be fetched using ms_substr() and not using square brackets; the latter is not multibyte compliant. .. First letter of the string should be fetched using ms_substr() and not using square brackets; the latter is not multibyte compliant. Bug: T137066 Change-Id: I78eea4bd09f520b8ae99407c9cbdf1d02df05605 --- M includes/talliers/PairwiseTallier.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/81/304681/1 diff --git a/includes/talliers/PairwiseTallier.php b/includes/talliers/PairwiseTallier.php index 01466c3..5b88dd7 100644 --- a/includes/talliers/PairwiseTallier.php +++ b/includes/talliers/PairwiseTallier.php @@ -49,10 +49,11 @@ $parts = explode( ' ', $text ); $initials = ''; foreach ( $parts as $part ) { - if ( $part === '' || ctype_punct( $part[0] ) ) { + $firstLetter = mb_substr($part, 0, 1); + if ( $part === '' || ctype_punct( $firstLetter ) ) { continue; } - $initials .= $part[0]; + $initials .= $firstLetter; } if ( isset( $abbrevs[$initials] ) ) { $index = 2; -- To view, visit https://gerrit.wikimedia.org/r/304681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78eea4bd09f520b8ae99407c9cbdf1d02df05605 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Remove extra tag from the output of the tallier
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/304679 Change subject: Remove extra tag from the output of the tallier .. Remove extra tag from the output of the tallier Bug: T142922 Change-Id: I0a1888743c8293c342c24de6cea90cd26bfeb8fd --- M includes/talliers/Tallier.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/79/304679/1 diff --git a/includes/talliers/Tallier.php b/includes/talliers/Tallier.php index 0d6fd84..07c7005 100644 --- a/includes/talliers/Tallier.php +++ b/includes/talliers/Tallier.php @@ -89,7 +89,7 @@ $option = $this->optionsById[$oid]; $s .= "" . Xml::element( 'td', array(), $rank ) . - Xml::element( 'td', array(), $option->parseMessage( 'text' ) ) . + Xml::element( 'td', array(), $option->parseMessage( 'text', false ) ) . "\n"; } $s .= ""; -- To view, visit https://gerrit.wikimedia.org/r/304679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a1888743c8293c342c24de6cea90cd26bfeb8fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Botadmin group should not be allowed to assign or remove use... - change (operations/mediawiki-config)
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/289773 Change subject: Botadmin group should not be allowed to assign or remove user groups in FA WP .. Botadmin group should not be allowed to assign or remove user groups in FA WP Bug: T135774 Change-Id: Ia40fef53aa991d981ff1477fa8e9469e04183f72 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/73/289773/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cd60468..a3d8d05 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9149,18 +9149,7 @@ 'uploader', // T71171 'confirmed', // T87348 'patroller', // T118847 - ], - 'botadmin' => [ - 'patroller', - 'Image-reviewer', - 'rollbacker', - 'autopatrol', - 'uploader', - 'templateeditor', // T74146 - 'abusefilter', // T74502 - 'confirmed', // T87348 - 'eliminator' // T87558 - ], // T71411 + ] ], '+fawikibooks' => [ 'sysop' => [ -- To view, visit https://gerrit.wikimedia.org/r/289773 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia40fef53aa991d981ff1477fa8e9469e04183f72 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Usernames containing space cannot be added to voter eligibil... - change (mediawiki...SecurePoll)
Huji has uploaded a new change for review. https://gerrit.wikimedia.org/r/287448 Change subject: Usernames containing space cannot be added to voter eligibility lists using the interface .. Usernames containing space cannot be added to voter eligibility lists using the interface Bug: T134687 Change-Id: Icce52dcc5afebe7cd9df4542f7bb9479cbccc17f --- M includes/pages/VoterEligibilityPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/48/287448/1 diff --git a/includes/pages/VoterEligibilityPage.php b/includes/pages/VoterEligibilityPage.php index 1754f70..6a422ce 100644 --- a/includes/pages/VoterEligibilityPage.php +++ b/includes/pages/VoterEligibilityPage.php @@ -228,7 +228,7 @@ $name = trim( substr( $name, 0, $i ) ); } if ( $wiki !== '' && $name !== '' ) { - $wikiNames[$wiki][] = str_replace( ' ', '_', $name ); + $wikiNames[$wiki][] = $name; } } -- To view, visit https://gerrit.wikimedia.org/r/287448 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icce52dcc5afebe7cd9df4542f7bb9479cbccc17f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits