[MediaWiki-commits] [Gerrit] mediawiki...Patroller[master]: Patroller V2.1
Cblair91 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/331907 ) Change subject: Patroller V2.1 .. Patroller V2.1 Update Patroller to V2.1: Update copyright years to cover 2017 (Happy New Year) Update all SQL to new MediaWiki SQL standards (no hardcoded queries) Fix credits to my username to reflect "Developaws". Cleanup formatting style to standards. Cleaner handling for if/else statements. Change-Id: I2bb276a900c0213d98a77d2853a94b0f140abdf1 --- M Gruntfile.js M Patroller.alias.php M Patroller.hooks.php M Patroller.php M SpecialPatroller.php M composer.json M extension.json 7 files changed, 128 insertions(+), 88 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Patroller refs/changes/07/331907/1 diff --git a/Gruntfile.js b/Gruntfile.js index 545b62a..cb511b1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,12 +1,8 @@ /*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-jsonlint' ); - // grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.initConfig( { - /* banana: { - all: 'i18n/' - }, */ jsonlint: { all: [ '**/*.json', @@ -15,6 +11,6 @@ } } ); - grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] ); + grunt.registerTask( 'test', [ 'jsonlint' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/Patroller.alias.php b/Patroller.alias.php index 22ce3d2..869dde1 100644 --- a/Patroller.alias.php +++ b/Patroller.alias.php @@ -3,8 +3,8 @@ * Patroller * Patroller MediaWiki alises * - * @author: Rob Church, Kris Blair (Cblair91) - * @copyright: 2006-2008 Rob Church, 2015 Kris Blair + * @author: Rob Church , Kris Blair (Developaws) + * @copyright: 2006-2008 Rob Church, 2015-2017 Kris Blair * @license: GNU General Public Licence 2.0 * @package: Patroller * @link: https://mediawiki.org/wiki/Extension:Patroller diff --git a/Patroller.hooks.php b/Patroller.hooks.php index b2385e3..daf23a5 100644 --- a/Patroller.hooks.php +++ b/Patroller.hooks.php @@ -3,8 +3,8 @@ * Patroller * Patroller MediaWiki main hooks * - * @author: Rob Church , Kris Blair (Cblair91) - * @copyright: 2006-2008 Rob Church, 2015 Kris Blair + * @author: Rob Church , Kris Blair (Developaws) + * @copyright: 2006-2008 Rob Church, 2015-2017 Kris Blair * @license: GPL General Public Licence 2.0 * @package: Patroller * @link: https://mediawiki.org/wiki/Extension:Patroller diff --git a/Patroller.php b/Patroller.php index dd02b45..669a512 100644 --- a/Patroller.php +++ b/Patroller.php @@ -3,22 +3,20 @@ * Patroller * Patroller MediaWiki main loader * - * @author: Rob Church , Kris Blair (Cblair91) - * @copyright: 2006-2008 Rob Church, 2015 Kris Blair + * @author: Rob Church , Kris Blair (Developaws) + * @copyright: 2006-2008 Rob Church, 2015-2017 Kris Blair * @license: GPL General Public Licence 2.0 * @package: Patroller * @link: https://mediawiki.org/wiki/Extension:Patroller */ +$dir = __DIR__; + if ( function_exists( 'wfLoadExtension' ) ) { wfLoadExtension( 'Patroller' ); // Keep i18n globals so mergeMessageFileList.php doesn't break - $wgMessagesDirs['Patroller'] = __DIR__ . '/i18n'; - $wgExtensionMessagesFiles['PatrollerAlias'] = __DIR__ . '/Patroller.alias.php'; - /* wfWarn( - 'Deprecated PHP entry point used for Patroller extension. Please use wfLoadExtension instead, ' . - 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' - ); */ + $wgMessagesDirs['Patroller'] = $dir . '/i18n'; + $wgExtensionMessagesFiles['PatrollerAlias'] = $dir . '/Patroller.alias.php'; return true; } @@ -26,22 +24,22 @@ 'path' => __FILE__, 'name' => 'Patroller', 'descriptionmsg'=> 'patrol-desc', - 'author'=> 'Rob Church, Kris Blair (Cblair91)', - 'version' => '2.0.1', + 'author'=> 'Rob Church, Kris Blair (Developaws)', + 'version' => '2.1', 'url' => 'https://www.mediawiki.org/wiki/Extension:Patroller', 'licence-name' => 'GPL-2.0' ]; // Register hooks -$wgAutoloadClasses['PatrollerHooks'] = __DIR__ . '/Patroller.hooks.php'; -$wgAutoloadClasses['SpecialPatroller'] = __DIR__ . '/SpecialPatroller.php'; +$wgAutoloadClasses['PatrollerHooks'] = $dir . '/Patroller.hooks.php'; +$wgAutoloadClasses['SpecialPatroller']
[MediaWiki-commits] [Gerrit] mediawiki...Patroller[master]: Replace removed ChangesList::newFromUser function
Cblair91 has uploaded a new change for review. https://gerrit.wikimedia.org/r/321228 Change subject: Replace removed ChangesList::newFromUser function .. Replace removed ChangesList::newFromUser function newFromUser() was removed during commit 94083 for MediaWiki 1.23. Change-Id: I37c9ae531b466fa7347e8ee98731a0b2981997c1 --- M Patroller.php M SpecialPatroller.php M extension.json 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Patroller refs/changes/28/321228/1 diff --git a/Patroller.php b/Patroller.php index d3ca513..962ce96 100644 --- a/Patroller.php +++ b/Patroller.php @@ -27,7 +27,7 @@ 'name' => 'Patroller', 'descriptionmsg'=> 'patrol-desc', 'author'=> 'Rob Church, Kris Blair (Cblair91)', - 'version' => '2.0', + 'version' => '2.0.1', 'url' => 'https://www.mediawiki.org/wiki/Extension:Patroller', 'licence-name' => 'GPL-2.0' ]; diff --git a/SpecialPatroller.php b/SpecialPatroller.php index 41faa70..afcea01 100644 --- a/SpecialPatroller.php +++ b/SpecialPatroller.php @@ -124,7 +124,7 @@ global $wgUser, $wgOut; $edit->counter = 1; $edit->mAttribs['rc_patrolled'] = 1; - $list = ChangesList::newFromUser( $wgUser ); + $list = ChangesList::newFromContext( RequestContext::GetMain() ); $wgOut->addHTML( $list->beginRecentChangesList() . $list->recentChangesLine( $edit ) diff --git a/extension.json b/extension.json index b253080..4faf63c 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Patroller", - "version": "2.0", + "version": "2.0.1", "author": [ "Rob Church", "Kris Blair (Cblair91)" -- To view, visit https://gerrit.wikimedia.org/r/321228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I37c9ae531b466fa7347e8ee98731a0b2981997c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Patroller Gerrit-Branch: master Gerrit-Owner: Cblair91___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated editToken with getEditToken - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: Replace deprecated editToken with getEditToken .. Replace deprecated editToken with getEditToken Change-Id: I2993e34d3afd98cbe90c601ba561f6fc4e2089aa --- M SpecialPatroller.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cblair91: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialPatroller.php b/SpecialPatroller.php index d38f02e..4ab2c2f 100644 --- a/SpecialPatroller.php +++ b/SpecialPatroller.php @@ -193,7 +193,7 @@ $form .= Html::closeElement( 'tr' ); $form .= Html::closeElement( 'table' ); $form .= Html::Hidden( 'wpRcId', $edit->mAttribs['rc_id'] ); - $form .= Html::Hidden( 'wpToken', $wgUser->editToken() ); + $form .= Html::Hidden( 'wpToken', $wgUser->getEditToken() ); $form .= Html::closeElement( 'form' ); $wgOut->addHTML( $form ); } -- To view, visit https://gerrit.wikimedia.org/r/258907 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2993e34d3afd98cbe90c601ba561f6fc4e2089aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Patroller Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Cblair91 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set manifest_version in extension.json - change (mediawiki...ImportArticles)
Cblair91 has submitted this change and it was merged. Change subject: Set manifest_version in extension.json .. Set manifest_version in extension.json Bug: T100745 Change-Id: I2c95403d1929aed02b7e291cb9447080e949e894 --- M extension.json 1 file changed, 37 insertions(+), 36 deletions(-) Approvals: Cblair91: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 13ef06d..7d6263b 100644 --- a/extension.json +++ b/extension.json @@ -1,36 +1,37 @@ -{ - "name": "ImportArticles", - "version": "1.3", - "author": "Kris Blair (Cblair91)", - "descriptionmsg": "importarticles-desc", - "license-name": "GPL-3.0", - "type": "other", - "MessagesDirs": { - "ImportArticles": [ - "i18n" - ] - }, - "ExtensionMessagesFiles": { - "ImportArticles": "ImportArticles.i18n.php" - }, - "AutoloadClasses": { - "ImportArticles": "ImportArticles.hooks.php" - }, - "ResourceModules": { - "ext.importarticles": { - "scripts": [ - "resources/importarticles.js" - ], - "dependencies": [] - } - }, - "ResourceFileModulePaths": { - "localBasePath": "", - "remoteExtPath": "ImportArticles" - }, - "Hooks": { - "BeforePageDisplay": [ - "ImportArticles::onBeforePageDisplay" - ] - } -} \ No newline at end of file +{ + "name": "ImportArticles", + "version": "1.3", + "author": "Kris Blair (Cblair91)", + "descriptionmsg": "importarticles-desc", + "license-name": "GPL-3.0", + "type": "other", + "MessagesDirs": { + "ImportArticles": [ + "i18n" + ] + }, + "ExtensionMessagesFiles": { + "ImportArticles": "ImportArticles.i18n.php" + }, + "AutoloadClasses": { + "ImportArticles": "ImportArticles.hooks.php" + }, + "ResourceModules": { + "ext.importarticles": { + "scripts": [ + "resources/importarticles.js" + ], + "dependencies": [] + } + }, + "ResourceFileModulePaths": { + "localBasePath": "", + "remoteExtPath": "ImportArticles" + }, + "Hooks": { + "BeforePageDisplay": [ + "ImportArticles::onBeforePageDisplay" + ] + }, + "manifest_version": 1 +} -- To view, visit https://gerrit.wikimedia.org/r/257056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c95403d1929aed02b7e291cb9447080e949e894 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ImportArticles Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Cblair91 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove phpcs errors - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: Remove phpcs errors .. Remove phpcs errors https://integration.wikimedia.org/ci/job/php-composer-test/19374/console Change-Id: I865f3c30ff559f8079b03f2773899b7ee83e --- M Patroller.php M SpecialPatroller.php 2 files changed, 6 insertions(+), 7 deletions(-) Approvals: Cblair91: Looks good to me, approved jenkins-bot: Verified diff --git a/Patroller.php b/Patroller.php index 695c110..025cc27 100644 --- a/Patroller.php +++ b/Patroller.php @@ -32,18 +32,16 @@ 'licence-name' => 'GPL-2.0' ); -$dir = dirname( __FILE__ ) . '/'; - # Register hooks -$wgAutoloadClasses['PatrollerHooks'] = $dir . 'Patroller.hooks.php'; -$wgAutoloadClasses['SpecialPatroller'] = $dir . 'SpecialPatroller.php'; +$wgAutoloadClasses['PatrollerHooks'] = __DIR__ . '/Patroller.hooks.php'; +$wgAutoloadClasses['SpecialPatroller'] = __DIR__ . '/SpecialPatroller.php'; $wgHooks['LoadExtensionSchemaUpdates'][] = 'PatrollerHooks::onLoadExtensionSchemaUpdates'; $wgSpecialPages['Patrol'] = 'SpecialPatroller'; # Register messages -$wgMessagesDir['Patroller']= $dir . 'i18n'; -$wgExtensionMessagesFiles['PatrollerAlias']= $dir . 'Patroller.alias.php'; +$wgMessagesDir['Patroller']= __DIR__ . '/i18n'; +$wgExtensionMessagesFiles['PatrollerAlias']= __DIR__ . '/Patroller.alias.php'; # Register rights $wgAvailableRights[] = 'patroller'; diff --git a/SpecialPatroller.php b/SpecialPatroller.php index a0173f4..d38f02e 100644 --- a/SpecialPatroller.php +++ b/SpecialPatroller.php @@ -51,7 +51,8 @@ # See if something needs to be done if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getText( 'wpToken' ) ) ) { - if ( $rcid = $wgRequest->getIntOrNull( 'wpRcId' ) ) { + $rcid = $wgRequest->getIntOrNull( 'wpRcId' ); + if ( $rcid ) { if ( $wgRequest->getCheck( 'wpPatrolEndorse' ) ) { # Mark the change patrolled if ( !$wgUser->isBlocked( false ) ) { -- To view, visit https://gerrit.wikimedia.org/r/251321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I865f3c30ff559f8079b03f2773899b7ee83e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Patroller Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Cblair91 Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0 Change-Id: I9a2f1da0a3908bf45f08abcbcd18a5ad11f2ed16 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cblair91: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 7c76f0b..f83581d 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require-dev": { "jakub-onderka/php-parallel-lint": "0.9", - "mediawiki/mediawiki-codesniffer": "0.4.0" + "mediawiki/mediawiki-codesniffer": "0.5.0" }, "scripts": { "test": [ -- To view, visit https://gerrit.wikimedia.org/r/248542 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a2f1da0a3908bf45f08abcbcd18a5ad11f2ed16 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Patroller Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Cblair91 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update qqq.json messages - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: Update qqq.json messages .. Update qqq.json messages Change-Id: I66e6ed28de8f6df858b86370d4026695d21a9bc5 --- M i18n/qqq.json 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Cblair91: Verified; Looks good to me, approved diff --git a/i18n/qqq.json b/i18n/qqq.json index ec60b3f..8c24a48 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -12,12 +12,21 @@ ] }, "patrol-desc": "{{desc|what=extension|name=Patroller|url=https://www.mediawiki.org/wiki/Extension:Patroller}};, + "patrol-endorse": "{{Identical|Endorse}}", "patrol-revert": "{{Identical|Revert}}", "patrol-revert-reason": "{{Identical|Reason}}", "patrol-skip": "{{Identical|Skip}}", "patrol-reverting": "{{Identical|Revert}}", + "patrol-nonefound": "This message is for saying it could not find an appropriate edit for patrolling.", + "patrol-endorsed-ok": "{{Identical|Endorse}}", + "patrol-endorsed-failed": "{{Identical|Endorse}}", "patrol-reverted-ok": "{{Identical|Revert}}", "patrol-reverted-failed": "{{Identical|Revert}}", + "patrol-skipped-ok": "{{Identical|Skipped}}", + "patrol-reasons": "{{Identical|Reason}}", + "patrol-another": "{{Identical|Another}}", + "patrol-stopped": "{{Identical|Stopped}}", + "patrol-resume": "{{Identical|Resume}}", "group-patroller": "{{doc-group|patroller}}", "group-patroller-member": "{{doc-group|patroller|member}}", "grouppage-patroller": "{{doc-group|patroller|page}}", -- To view, visit https://gerrit.wikimedia.org/r/239676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66e6ed28de8f6df858b86370d4026695d21a9bc5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Patroller Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Cblair91 Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix i18n - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: Fix i18n .. Fix i18n some of the i18n files became binary which means no messages but random numbers. Change-Id: I55d34e38fb09ba68328f8ece663e4b785b0c09fb --- M i18n/ar.json M i18n/arz.json M i18n/ba.json M i18n/bcl.json M i18n/be-tarask.json M i18n/be.json M i18n/bg.json M i18n/bn.json M i18n/br.json M i18n/bs.json M i18n/ca.json M i18n/ce.json M i18n/ckb.json M i18n/cs.json M i18n/cy.json M i18n/da.json M i18n/de-formal.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/eu.json M i18n/fa.json M i18n/fi.json M i18n/fr.json M i18n/frp.json M i18n/frr.json M i18n/fy.json M i18n/ga.json M i18n/gl.json M i18n/got.json M i18n/grc.json M i18n/gsw.json M i18n/gu.json M i18n/gv.json M i18n/ha.json M i18n/haw.json M i18n/he.json M i18n/hi.json M i18n/hil.json M i18n/hr.json M i18n/hsb.json M i18n/hu.json M i18n/ia.json M i18n/id.json M i18n/ig.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/kn.json M i18n/ko.json M i18n/ksh.json M i18n/la.json M i18n/lb.json M i18n/li.json M i18n/lmo.json M i18n/lt.json M i18n/mg.json M i18n/mhr.json M i18n/mk.json M i18n/ml.json M i18n/mn.json M i18n/mr.json M i18n/ms.json M i18n/mt.json M i18n/myv.json M i18n/nah.json M i18n/nb.json M i18n/nds-nl.json M i18n/ne.json M i18n/niu.json M i18n/nl.json M i18n/nn.json M i18n/nov.json M i18n/oc.json M i18n/or.json M i18n/os.json M i18n/pdc.json M i18n/pms.json M i18n/pt-br.json M i18n/pt.json M i18n/ru.json M i18n/sk.json M i18n/sl.json M i18n/sr-ec.json M i18n/sr-el.json M i18n/stq.json M i18n/su.json M i18n/sv.json M i18n/ta.json M i18n/tl.json M i18n/tr.json M i18n/uk.json M i18n/vi.json M i18n/yue.json M i18n/zh-hans.json M i18n/zh-hant.json 104 files changed, 51 insertions(+), 51 deletions(-) Approvals: Cblair91: Verified; Looks good to me, approved diff --git a/i18n/ar.json b/i18n/ar.json index ff5be9c..dc4f141 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -19,7 +19,7 @@ "patrol-reverted-ok": "التعديل تم استرجاعه.", "patrol-reverted-failed": "لم يمكن استرجاع التعديل.", "patrol-skipped-ok": "تجاهل التعديل.", - "patrol-reasons": "* تخريب بسيط\n* تجربة مستخدم جديد\n* انظر صفحة النقاش", + "patrol-reasons": "* تخريب بسيط\r\n* تجربة مستخدم جديد\r\n* انظر صفحة النقاش", "patrol-another": "اعرض تعديلا آخر، إن أمكن.", "patrol-stopped": "لقد اخترت عدم مراجعة تعديل آخر. $1", "patrol-resume": "اضغط هنا للمتابعة.", diff --git a/i18n/arz.json b/i18n/arz.json index 3d7b917..6efcb17 100644 --- a/i18n/arz.json +++ b/i18n/arz.json @@ -17,7 +17,7 @@ "patrol-reverted-ok": "التعديل تم استرجاعه.", "patrol-reverted-failed": "لم يمكن استرجاع التعديل.", "patrol-skipped-ok": "تجاهل التعديل.", - "patrol-reasons": "* تخريب بسيط\n* تجربة مستخدم جديد\n* انظر صفحة النقاش", + "patrol-reasons": "* تخريب بسيط\r\n* تجربة مستخدم جديد\r\n* انظر صفحة النقاش", "patrol-another": "اعرض تعديلا آخر، إن أمكن.", "patrol-stopped": "لقد اخترت عدم مراجعة تعديل آخر. $1", "patrol-resume": "اضغط هنا للمتابعة.", diff --git a/i18n/ba.json b/i18n/ba.json index 6d927d2..44e8d85 100644 --- a/i18n/ba.json +++ b/i18n/ba.json @@ -18,7 +18,7 @@ "patrol-reverted-ok": "Өлгө кире алынды.", "patrol-reverted-failed": "Өлгөнө кире алып булманы.", "patrol-skipped-ok": "Өлгө торғоҙоп ҡалдырылды.", - "patrol-reasons": "* Ябай вандаллыҡ\n* Яңы ҡатнашыусыны һынау\n* Фекер алышыу битен ҡара", + "patrol-reasons": "* Ябай вандаллыҡ\r\n* Яңы ҡатнашыусыны һынау\r\n* Фекер алышыу битен ҡара", "patrol-another": "Мөмкин булһа, икенсе өлгөнө күрһәтергә.", "patrol-stopped": "Һеҙ икенсе өлгөнө тикшермәҫкә булдығыҙ. $1", "patrol-resume": "Дауам итер өсөн, ошонда баҫығыҙ.", diff --git a/i18n/bcl.json b/i18n/bcl.json index d6a47f8..125c06d 100644 --- a/i18n/bcl.json +++ b/i18n/bcl.json Binary files differ diff --git a/i18n/be-tarask.json b/i18n/be-tarask.json index dc4412c..6b363cd 100644 --- a/i18n/be-tarask.json +++ b/i18n/be-tarask.json Binary files differ diff --git a/i18n/be.json b/i18n/be.json index eeb5760..650d2bb 100644 --- a/i18n/be.json +++ b/i18n/be.json Binary files differ diff --git a/i18n/bg.json b/i18n/bg.json index c72adc7..07cad33 100644 --- a/i18n/bg.json +++ b/i18n/bg.json Binary files differ diff --git a/i18n/bn.json b/i18n/bn.json index 639df9e..84fd090 100644 --- a/i18n/bn.json +++ b/i18n/bn.json Binary files differ diff --git a/i18n/br.json b/i18n/br.json index 2410358..b99cf47 100644 --- a/i18n/br.json +++ b/i18n/br.json Binary files differ diff --git a/i18n/bs.json b/i18n/bs.json index 6b5c9c4..6f2e0ef 100644 --- a/i18n/bs.json +++ b/i18n/bs.json Binary files differ diff --git a/i18n/ca.json b/i18n/ca.json index
[MediaWiki-commits] [Gerrit] Update qqq.json messages - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: Update qqq.json messages .. Update qqq.json messages Change-Id: Ie0571b6030b85aa0636cd977d83242a547792c51 --- M i18n/qqq.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cblair91: Verified; Looks good to me, approved diff --git a/i18n/qqq.json b/i18n/qqq.json index a45efa3..ec60b3f 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -11,7 +11,7 @@ "아라" ] }, - "patrol-desc": "{{desc}}", + "patrol-desc": "{{desc|what=extension|name=Patroller|url=https://www.mediawiki.org/wiki/Extension:Patroller}};, "patrol-revert": "{{Identical|Revert}}", "patrol-revert-reason": "{{Identical|Reason}}", "patrol-skip": "{{Identical|Skip}}", -- To view, visit https://gerrit.wikimedia.org/r/237983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0571b6030b85aa0636cd977d83242a547792c51 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Patroller Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Cblair91 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change wfMsg -> wfMessage, change Xml -> Html, change form &... - change (mediawiki...Patroller)
Cblair91 has uploaded a new change for review. https://gerrit.wikimedia.org/r/238002 Change subject: Change wfMsg -> wfMessage, change Xml -> Html, change form & table to Html .. Change wfMsg -> wfMessage, change Xml -> Html, change form & table to Html Change-Id: I3e9b311cb96733baeabb99a5f7683f9e4b2d51ff --- M SpecialPatroller.php 1 file changed, 44 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Patroller refs/changes/02/238002/1 diff --git a/SpecialPatroller.php b/SpecialPatroller.php index 3341d92..9098a78 100644 --- a/SpecialPatroller.php +++ b/SpecialPatroller.php @@ -56,18 +56,18 @@ # Mark the change patrolled if ( !$wgUser->isBlocked( false ) ) { RecentChange::markPatrolled( $rcid ); - $wgOut->setSubtitle( wfMsgHtml( 'patrol-endorsed-ok' ) ); + $wgOut->setSubtitle( wfMessages( 'patrol-endorsed-ok' )->escaped() ); } else { - $wgOut->setSubtitle( wfMsgHtml( 'patrol-endorsed-failed' ) ); + $wgOut->setSubtitle( wgMessages( 'patrol-endorsed-failed' )->escaped() ); } } elseif ( $wgRequest->getCheck( 'wpPatrolRevert' ) ) { # Revert the change $edit = $this->loadChange( $rcid ); $msg = $this->revert( $edit, $this->revertReason( $wgRequest ) ) ? 'ok' : 'failed'; - $wgOut->setSubtitle( wfMsgHtml( 'patrol-reverted-' . $msg ) ); + $wgOut->setSubtitle( wgMessage( 'patrol-reverted-' . $msg )->escaped() ); } elseif ( $wgRequest->getCheck( 'wpPatrolSkip' ) ) { # Do nothing - $wgOut->setSubtitle( wfMsgHtml( 'patrol-skipped-ok' ) ); + $wgOut->setSubtitle( wgMessage( 'patrol-skipped-ok' )->escaped() ); } } } @@ -76,8 +76,8 @@ if ( $wgRequest->getCheck( 'wpToken' ) && !$wgRequest->getCheck( 'wpAnother' ) ) { $skin =& $wgUser->getSkin(); $self = SpecialPage::getTitleFor( 'Patrol' ); - $link = $skin->makeKnownLinkObj( $self, wfMsgHtml( 'patrol-resume' ) ); - $wgOut->addHTML( wfMsgWikiHtml( 'patrol-stopped', $link ) ); + $link = $skin->makeKnownLinkObj( $self, wfMessage( 'patrol-resume' )->escaped() ); + $wgOut->addHTML( wfMessage( 'patrol-stopped', $link )->escaped() ); return; } @@ -98,7 +98,7 @@ } else { # Can't find a suitable edit $haveEdit = true; # Don't keep going, there's nothing to find - $wgOut->addWikiText( wfMsg( 'patrol-nonefound' ) ); + $wgOut->addWikiText( wfMessage( 'patrol-nonefound' )->text() ); } } } @@ -140,17 +140,40 @@ private function showControls( &$edit ) { global $wgUser, $wgOut; $self = SpecialPage::getTitleFor( 'Patrol' ); - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) ); - $form .= ''; - $form .= '' . Xml::submitButton( wfMsg( 'patrol-endorse' ), array( 'name' => 'wpPatrolEndorse' ) ) . ''; - $form .= '' . Xml::submitButton( wfMsg( 'patrol-revert' ), array( 'name' => 'wpPatrolRevert' ) ) . ''; - $form .= '' . Xml::label( wfMsg( 'patrol-revert-reason' ), 'reason' ) . ''; - $form .= $this->revertReasonsDropdown() . ' / ' . Xml::input( 'wpPatrolRevertReason' ) . ''; - $form .= '' . Xml::submitButton( wfMsg( 'patrol-skip' ), array( 'name' => 'wpPatrolSkip' ) ) . ''; - $form .= '' . Xml::check( 'wpAnother', true ) . '' . wfMsgHtml( 'patrol-another' ) . ''; + $form = Html::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) ); + $form .= Html::openElement( 'table' ); + $form .= Html::openElement( 'tr' ); + $form .= Html::openElement( 'td', array( 'align' => 'right' ) ); + $form .= Html::submitButton( wfMessage( 'patrol-endorse'
[MediaWiki-commits] [Gerrit] Change wfMsg -> wfMessage, change Xml -> Html, change form &... - change (mediawiki...Patroller)
Cblair91 has submitted this change and it was merged. Change subject: Change wfMsg -> wfMessage, change Xml -> Html, change form & table to Html .. Change wfMsg -> wfMessage, change Xml -> Html, change form & table to Html Bug: T112454 Change-Id: I3e9b311cb96733baeabb99a5f7683f9e4b2d51ff --- M SpecialPatroller.php 1 file changed, 44 insertions(+), 21 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Cblair91: Verified; Looks good to me, approved diff --git a/SpecialPatroller.php b/SpecialPatroller.php index 3341d92..9098a78 100644 --- a/SpecialPatroller.php +++ b/SpecialPatroller.php @@ -56,18 +56,18 @@ # Mark the change patrolled if ( !$wgUser->isBlocked( false ) ) { RecentChange::markPatrolled( $rcid ); - $wgOut->setSubtitle( wfMsgHtml( 'patrol-endorsed-ok' ) ); + $wgOut->setSubtitle( wfMessages( 'patrol-endorsed-ok' )->escaped() ); } else { - $wgOut->setSubtitle( wfMsgHtml( 'patrol-endorsed-failed' ) ); + $wgOut->setSubtitle( wgMessages( 'patrol-endorsed-failed' )->escaped() ); } } elseif ( $wgRequest->getCheck( 'wpPatrolRevert' ) ) { # Revert the change $edit = $this->loadChange( $rcid ); $msg = $this->revert( $edit, $this->revertReason( $wgRequest ) ) ? 'ok' : 'failed'; - $wgOut->setSubtitle( wfMsgHtml( 'patrol-reverted-' . $msg ) ); + $wgOut->setSubtitle( wgMessage( 'patrol-reverted-' . $msg )->escaped() ); } elseif ( $wgRequest->getCheck( 'wpPatrolSkip' ) ) { # Do nothing - $wgOut->setSubtitle( wfMsgHtml( 'patrol-skipped-ok' ) ); + $wgOut->setSubtitle( wgMessage( 'patrol-skipped-ok' )->escaped() ); } } } @@ -76,8 +76,8 @@ if ( $wgRequest->getCheck( 'wpToken' ) && !$wgRequest->getCheck( 'wpAnother' ) ) { $skin =& $wgUser->getSkin(); $self = SpecialPage::getTitleFor( 'Patrol' ); - $link = $skin->makeKnownLinkObj( $self, wfMsgHtml( 'patrol-resume' ) ); - $wgOut->addHTML( wfMsgWikiHtml( 'patrol-stopped', $link ) ); + $link = $skin->makeKnownLinkObj( $self, wfMessage( 'patrol-resume' )->escaped() ); + $wgOut->addHTML( wfMessage( 'patrol-stopped', $link )->escaped() ); return; } @@ -98,7 +98,7 @@ } else { # Can't find a suitable edit $haveEdit = true; # Don't keep going, there's nothing to find - $wgOut->addWikiText( wfMsg( 'patrol-nonefound' ) ); + $wgOut->addWikiText( wfMessage( 'patrol-nonefound' )->text() ); } } } @@ -140,17 +140,40 @@ private function showControls( &$edit ) { global $wgUser, $wgOut; $self = SpecialPage::getTitleFor( 'Patrol' ); - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) ); - $form .= ''; - $form .= '' . Xml::submitButton( wfMsg( 'patrol-endorse' ), array( 'name' => 'wpPatrolEndorse' ) ) . ''; - $form .= '' . Xml::submitButton( wfMsg( 'patrol-revert' ), array( 'name' => 'wpPatrolRevert' ) ) . ''; - $form .= '' . Xml::label( wfMsg( 'patrol-revert-reason' ), 'reason' ) . ''; - $form .= $this->revertReasonsDropdown() . ' / ' . Xml::input( 'wpPatrolRevertReason' ) . ''; - $form .= '' . Xml::submitButton( wfMsg( 'patrol-skip' ), array( 'name' => 'wpPatrolSkip' ) ) . ''; - $form .= '' . Xml::check( 'wpAnother', true ) . '' . wfMsgHtml( 'patrol-another' ) . ''; + $form = Html::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) ); + $form .= Html::openElement( 'table' ); + $form .= Html::openElement( 'tr' ); + $form .= Html::openElement( 'td', array( 'align' => 'right' ) ); + $form .= Html::submitButton( wfMessage( 'patrol-endorse'
[MediaWiki-commits] [Gerrit] Version 1.3: Major overhaul of code, bringing up to PHP/MW s... - change (mediawiki...ImportArticles)
Cblair91 has uploaded a new change for review. https://gerrit.wikimedia.org/r/237625 Change subject: Version 1.3: Major overhaul of code, bringing up to PHP/MW standards .. Version 1.3: Major overhaul of code, bringing up to PHP/MW standards Change-Id: Ice7332f23f652fe5541c4f6a4cab56eef68dd2bc --- A ImportArticles.hooks.php A ImportArticles.i18n.php M ImportArticles.php A extension.json A i18n/en.json A i18n/qqq.json A resources/importarticles.js 7 files changed, 249 insertions(+), 129 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ImportArticles refs/changes/25/237625/1 diff --git a/ImportArticles.hooks.php b/ImportArticles.hooks.php new file mode 100644 index 000..d84d85c --- /dev/null +++ b/ImportArticles.hooks.php @@ -0,0 +1,33 @@ +http://www.gnu.org/licenses/gpl.html + * @package: ImportArticles + * @link: https://mediawiki.org/wiki/Extension:ImportArticles + */ + +class ImportArticles { + /** +* Hooks initialized +* +* @var boolean +*/ + private static $initialized = false; + + /** +* Initiates the loading of the JavaScript +* +* @access public +* @return void +*/ + public static function onBeforePageDisplay() { + global $wgOut; + if ( !self::$initialized ) { + $wgOut->addModules( 'ext.importarticles' ); + self::$initialized = true; + } + } +} \ No newline at end of file diff --git a/ImportArticles.i18n.php b/ImportArticles.i18n.php new file mode 100644 index 000..844fe79 --- /dev/null +++ b/ImportArticles.i18n.php @@ -0,0 +1,33 @@ +https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php + * + * Beginning with MediaWiki 1.23, translation strings are stored in json files, + * and the EXTENSION.i18n.php file only exists to provide compatibility with + * older releases of MediaWiki. For more information about this migration, see: + * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format + * + * This shim maintains compatibility back to MediaWiki 1.17. + */ +$messages = array(); +if ( !function_exists( 'wfJsonI18nShimefa4e861731a8843' ) ) { + function wfJsonI18nShimefa4e861731a8843( $cache, $code, &$cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( array_keys( $data ) as $key ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } + $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); + } + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; + } + $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimefa4e861731a8843'; +} \ No newline at end of file diff --git a/ImportArticles.php b/ImportArticles.php index 530e2cb..be98a5f 100644 --- a/ImportArticles.php +++ b/ImportArticles.php @@ -1,140 +1,42 @@ http://www.gnu.org/licenses/>. -*/ + * @author: Kris Blair (Cblair91) + * @license: GPL-3.0 http://www.gnu.org/licenses/gpl.html + * @package: ImportArticles + * @link: https://mediawiki.org/wiki/Extension:ImportArticles + */ # Only run if included by MediaWiki -if ( !defined( 'MEDIAWIKI' ) ) die(); +if ( !defined( 'MEDIAWIKI' ) ) die( 'Invalid entry point.' ); $wgExtensionCredits['other'][] = array( -'name' => 'ImportArticles', -'author' => 'Kris Blair', -'description' => 'Allow the usage of ImportArticles JavaScript to import multiple pages at once', -'version' => 1.2, + 'path' => __FILE__, +'name' => 'ImportArticles', + 'descriptionmsg'=> 'importarticles-desc', +'author' => 'Kris Blair (Cblair91)', + 'url' => 'https://mediawiki.org/wiki/Extension:ImportArticles', +'description' => 'Allow the usage of ImportArticles JavaScript to import multiple pages at once', +'version' => '1.3', + 'licence-name' => 'GPL-3.0' ); -$wgHooks['BeforePageDisplay'][] = 'BeforePageDisplay'; -public static function BeforePageDisplay( &$out, &$skin ) { - $script = << - */ +$dir = dirname( __FILE__ ) . '/'; -/**
[MediaWiki-commits] [Gerrit] Version 1.3: Major overhaul of code, bringing up to PHP/MW s... - change (mediawiki...ImportArticles)
Cblair91 has uploaded a new change for review. https://gerrit.wikimedia.org/r/237635 Change subject: Version 1.3: Major overhaul of code, bringing up to PHP/MW standards .. Version 1.3: Major overhaul of code, bringing up to PHP/MW standards Change-Id: Ice7332f23f652fe5541c4f6a4cab56eef68dd2bc Adding testing stuff Change-Id: I825368971b4f419bbf2b5acbc958b46ce34e53fe --- A .jscsrc A .jshintignore A .jshintrc A Gruntfile.js A ImportArticles.hooks.php A ImportArticles.i18n.php M ImportArticles.php A composer.json A extension.json A i18n/en.json A i18n/qqq.json A package.json A resources/importarticles.js 13 files changed, 343 insertions(+), 129 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ImportArticles refs/changes/35/237635/1 diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 000..9d120e8 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,3 @@ +{ + "preset": "wikimedia" +} \ No newline at end of file diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..b512c09 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..eb42865 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,16 @@ +{ + "bitwise": true, + "eqeqeq": true, + "es3": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + "browser": true, + "globals": { + "mw": false, + "$": false + } +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..89f3328 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,27 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + 'resources/*.js' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + banana: { + all: 'i18n/' + } + } ); + + grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'banana' ] ); + grunt.registerTask( 'test', [ 'lint' ] ); + grunt.registerTask( 'default', 'test' ); +}; \ No newline at end of file diff --git a/ImportArticles.hooks.php b/ImportArticles.hooks.php new file mode 100644 index 000..d84d85c --- /dev/null +++ b/ImportArticles.hooks.php @@ -0,0 +1,33 @@ +http://www.gnu.org/licenses/gpl.html + * @package: ImportArticles + * @link: https://mediawiki.org/wiki/Extension:ImportArticles + */ + +class ImportArticles { + /** +* Hooks initialized +* +* @var boolean +*/ + private static $initialized = false; + + /** +* Initiates the loading of the JavaScript +* +* @access public +* @return void +*/ + public static function onBeforePageDisplay() { + global $wgOut; + if ( !self::$initialized ) { + $wgOut->addModules( 'ext.importarticles' ); + self::$initialized = true; + } + } +} \ No newline at end of file diff --git a/ImportArticles.i18n.php b/ImportArticles.i18n.php new file mode 100644 index 000..844fe79 --- /dev/null +++ b/ImportArticles.i18n.php @@ -0,0 +1,33 @@ +https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php + * + * Beginning with MediaWiki 1.23, translation strings are stored in json files, + * and the EXTENSION.i18n.php file only exists to provide compatibility with + * older releases of MediaWiki. For more information about this migration, see: + * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format + * + * This shim maintains compatibility back to MediaWiki 1.17. + */ +$messages = array(); +if ( !function_exists( 'wfJsonI18nShimefa4e861731a8843' ) ) { + function wfJsonI18nShimefa4e861731a8843( $cache, $code, &$cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( array_keys( $data ) as $key ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } +