[MediaWiki-commits] [Gerrit] Remove i18n shim - change (mediawiki...CleanChanges)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove i18n shim
..


Remove i18n shim

Change-Id: I2076adc2560f2e17d0cb49c8763cdd5b238ecd21
---
D CleanChanges.i18n.php
M CleanChanges.php
2 files changed, 15 insertions(+), 54 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CleanChanges.i18n.php b/CleanChanges.i18n.php
deleted file mode 100644
index 17bcda6..000
--- a/CleanChanges.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-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( 'wfJsonI18nShimd87671d4445e53f6' ) ) {
-   function wfJsonI18nShimd87671d4445e53f6( $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'][] = 
'wfJsonI18nShimd87671d4445e53f6';
-}
diff --git a/CleanChanges.php b/CleanChanges.php
index e4c1c3c..ebac538 100644
--- a/CleanChanges.php
+++ b/CleanChanges.php
@@ -12,23 +12,6 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-/* Set up messages and includes */
-$dir = __DIR__;
-$wgMessagesDirs['CleanChanges'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['CleanChanges'] = "$dir/CleanChanges.i18n.php";
-$wgAutoloadClasses['NCL'] =  "$dir/CleanChanges_body.php";
-
-require_once __DIR__ . '/Resources.php';
-
-/* Hook into code */
-$wgHooks['FetchChangesList'][] = 'NCL::hook';
-$wgHooks['MakeGlobalVariablesScript'][] = 'NCL::addScriptVariables';
-$wgHooks['SpecialRecentChangesQuery'][] = 'CCFilters::user';
-$wgHooks['SpecialRecentChangesPanel'][] = 'CCFilters::userForm';
-$wgHooks['SpecialRecentChangesQuery'][] = 'CCFilters::trailer';
-$wgHooks['SpecialRecentChangesPanel'][] = 'CCFilters::trailerForm';
-
-
 /* Extension information */
 $wgExtensionCredits['other'][] = array(
'path' => __FILE__,
@@ -40,7 +23,20 @@
'license-name' => 'GPL-2.0+',
 );
 
+/* Set up messages and includes */
+$wgMessagesDirs['CleanChanges'] = __DIR__ . '/i18n';
+$wgAutoloadClasses['NCL'] =  __DIR__ . "/CleanChanges_body.php";
+$wgAutoloadClasses['CCFilters'] = __DIR__ . "/Filters.php";
+
+require_once __DIR__ . '/Resources.php';
+
+/* Hook into code */
+$wgHooks['FetchChangesList'][] = 'NCL::hook';
+$wgHooks['MakeGlobalVariablesScript'][] = 'NCL::addScriptVariables';
+$wgHooks['SpecialRecentChangesQuery'][] = 'CCFilters::user';
+$wgHooks['SpecialRecentChangesPanel'][] = 'CCFilters::userForm';
+$wgHooks['SpecialRecentChangesQuery'][] = 'CCFilters::trailer';
+$wgHooks['SpecialRecentChangesPanel'][] = 'CCFilters::trailerForm';
+
 $wgCCUserFilter = true;
 $wgCCTrailerFilter = false;
-
-$wgAutoloadClasses['CCFilters'] = "$dir/Filters.php";

-- 
To view, visit https://gerrit.wikimedia.org/r/216592
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2076adc2560f2e17d0cb49c8763cdd5b238ecd21
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Callout widget: Improve the hover behavior - change (mediawiki...ContentTranslation)

2015-06-07 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216615

Change subject: Callout widget: Improve the hover behavior
..

Callout widget: Improve the hover behavior

Avoid showing multiple callouts if the trigger is 'hover'.
Also hide the callout, if mouse entered in siblings of triggers,
if present.

For contribution menu, this improves a user experience. Now moving
mouse over contribution list to logout link, horizontally does not
cause the contribution menu hide. With this patch it will hide.

For stats page, we can improve the custom hover handler because
the widget will make sure only one callout is shown. While fixing
that, fixed a small bug that the menu is coming only when tail for
bars(bar with ...) is present.

Change-Id: Iadadf68023eaa7aa8506e9076d80847eef64296c
---
M modules/campaigns/ext.cx.campaigns.contributionsmenu.js
M modules/stats/ext.cx.stats.js
M modules/widgets/callout/ext.cx.callout.js
3 files changed, 12 insertions(+), 12 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/15/216615/1

diff --git a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js 
b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
index 33ef2fe..d58a4a6 100644
--- a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
+++ b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
@@ -65,7 +65,7 @@
$myContributions, $myTranslations, $myUploads,
$menu, callout;
 
-   $trigger = $( '#pt-mycontris a' );
+   $trigger = $( '#pt-mycontris' );
 
$myContributions = $( '' )
.addClass( 'cx-campaign-contributions' )
diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js
index 6ef6b2e..553b533 100644
--- a/modules/stats/ext.cx.stats.js
+++ b/modules/stats/ext.cx.stats.js
@@ -310,19 +310,15 @@
.text( '…' )
.css( 'width', tailWidth + '%' );
$translations.append( $tail );
-   /*jslint loopfunc: true */
-   $tail.callout( {
-   trigger: 'manual',
-   direction: 
$.fn.callout.autoDirection( '0' ),
-   content: $callout
-   } ).on( 'mouseenter', function () {
-   $( this ).callout( 'show' );
-   } )
-   .on( 'mouseleave', function () {
-   $( this ).callout( 'hide' );
-   } );
}
 
+   /*jslint loopfunc: true */
+   $translations.find( '.cx-stats-chart__bar' 
).last().callout( {
+   trigger: 'hover',
+   direction: $.fn.callout.autoDirection( '0' ),
+   content: $callout
+   } );
+
$row.append(
$( '' )
.addClass( 'cx-stats-chart__langcode' )
diff --git a/modules/widgets/callout/ext.cx.callout.js 
b/modules/widgets/callout/ext.cx.callout.js
index 9508dd0..1469abd 100644
--- a/modules/widgets/callout/ext.cx.callout.js
+++ b/modules/widgets/callout/ext.cx.callout.js
@@ -209,7 +209,11 @@
 
if ( this.options.trigger === 'hover' ) {
this.$element.on( 'mouseenter', function () {
+   // Hide all other cx-callouts
+   $( '.cx-callout' ).hide();
self.show();
+   // On mouse enter of siblings, hide.
+   self.$element.siblings().one( 'mouseenter', 
$.proxy( self.hide, self ) );
self.$dialog.one( 'mouseleave', $.proxy( 
self.hide, self ) );
$( document ).one( 'click', $.proxy( self.hide, 
self ) );
} );

-- 
To view, visit https://gerrit.wikimedia.org/r/216615
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadadf68023eaa7aa8506e9076d80847eef64296c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

___
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/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Updating development dependencies
..


build: Updating development dependencies

* grunt-banana-checker: 0.2.1 → 0.2.2
* grunt-karma: 0.10.1 → 0.11.0
* karma: 0.12.31 → 0.12.36
* karma-chrome-launcher: 0.1.8 → 0.1.12
* karma-firefox-launcher: 0.1.4 → 0.1.6

Change-Id: Ic8bd8563c6f3313a7c8fc936c0753b071441c2b0
---
M package.json
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/package.json b/package.json
index 42270f7..e28aef4 100644
--- a/package.json
+++ b/package.json
@@ -9,16 +9,16 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-banana-checker": "0.2.1",
+"grunt-banana-checker": "0.2.2",
 "grunt-contrib-copy": "0.8.0",
 "grunt-contrib-jshint": "0.11.2",
 "grunt-contrib-watch": "0.6.1",
 "grunt-jscs": "1.8.0",
 "grunt-jsonlint": "1.0.4",
-"grunt-karma": "0.10.1",
-"karma": "0.12.31",
-"karma-chrome-launcher": "0.1.8",
-"karma-firefox-launcher": "0.1.4",
+"grunt-karma": "0.11.0",
+"karma": "0.12.36",
+"karma-chrome-launcher": "0.1.12",
+"karma-firefox-launcher": "0.1.6",
 "karma-qunit": "0.1.4",
 "qunitjs": "1.18.0"
   }

-- 
To view, visit https://gerrit.wikimedia.org/r/216613
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8bd8563c6f3313a7c8fc936c0753b071441c2b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use the plain-text GPL - change (mediawiki...TemplateData)

2015-06-07 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216614

Change subject: Use the plain-text GPL
..

Use the plain-text GPL

Per Iaa30b8994b8e4034ace61df8202a8b5002093ff2
(commit a512ff8ab49b140e19306ff813caf2186a25f4b5 in MediaWiki core)

Change-Id: Ib2ee46e474a7415b4b36acedfa0e0f48d57ff478
---
M COPYING
1 file changed, 88 insertions(+), 91 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/14/216614/1

diff --git a/COPYING b/COPYING
index 019694a..d159169 100644
--- a/COPYING
+++ b/COPYING
@@ -1,65 +1,65 @@
-== GNU GENERAL PUBLIC LICENSE ==
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
 
-Version 2, June 1991
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
 
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
+Preamble
 
-=== Preamble ===
-
-The licenses for most software are designed to take away your
+  The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
 License is intended to guarantee your freedom to share and change free
 software--to make sure the software is free for all its users.  This
 General Public License applies to most of the Free Software
 Foundation's software and to any other program whose authors commit to
 using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
-When we speak of free software, we are referring to freedom, not
+  When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
 this service if you wish), that you receive source code or can get it
 if you want it, that you can change the software or use pieces of it
 in new free programs; and that you know you can do these things.
 
-To protect your rights, we need to make restrictions that forbid
+  To protect your rights, we need to make restrictions that forbid
 anyone to deny you these rights or to ask you to surrender the rights.
 These restrictions translate to certain responsibilities for you if you
 distribute copies of the software, or if you modify it.
 
-For example, if you distribute copies of such a program, whether
+  For example, if you distribute copies of such a program, whether
 gratis or for a fee, you must give the recipients all the rights that
 you have.  You must make sure that they, too, receive or can get the
 source code.  And you must show them these terms so they know their
 rights.
 
-We protect your rights with two steps: (1) copyright the software, and
+  We protect your rights with two steps: (1) copyright the software, and
 (2) offer you this license which gives you legal permission to copy,
 distribute and/or modify the software.
 
-Also, for each author's protection and ours, we want to make certain
+  Also, for each author's protection and ours, we want to make certain
 that everyone understands that there is no warranty for this free
 software.  If the software is modified by someone else and passed on, we
 want its recipients to know that what they have is not the original, so
 that any problems introduced by others will not reflect on the original
 authors' reputations.
 
-Finally, any free program is threatened constantly by software
+  Finally, any free program is threatened constantly by software
 patents.  We wish to avoid the danger that redistributors of a free
 program will individually obtain patent licenses, in effect making the
 program proprietary.  To prevent this, we have made it clear that any
 patent must be licensed for everyone's free use or not licensed at all.
 
-The precise terms and conditions for copying, distribution and
+  The precise terms and conditions for copying, distribution and
 modification follow.
 
-== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ==
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
-'''0.''' This License applies to any program or other work which contains
+  0. This License applies to any program or other work which contains
 a notice placed by the copyright holder saying it may be distributed
 under the terms of this General Public License.  Th

[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki/core)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216613

Change subject: build: Updating development dependencies
..

build: Updating development dependencies

* grunt-banana-checker: 0.2.1 → 0.2.2
* grunt-karma: 0.10.1 → 0.11.0
* karma: 0.12.31 → 0.12.36
* karma-chrome-launcher: 0.1.8 → 0.1.12
* karma-firefox-launcher: 0.1.4 → 0.1.6

Change-Id: Ic8bd8563c6f3313a7c8fc936c0753b071441c2b0
---
M package.json
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/216613/1

diff --git a/package.json b/package.json
index 42270f7..e28aef4 100644
--- a/package.json
+++ b/package.json
@@ -9,16 +9,16 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-banana-checker": "0.2.1",
+"grunt-banana-checker": "0.2.2",
 "grunt-contrib-copy": "0.8.0",
 "grunt-contrib-jshint": "0.11.2",
 "grunt-contrib-watch": "0.6.1",
 "grunt-jscs": "1.8.0",
 "grunt-jsonlint": "1.0.4",
-"grunt-karma": "0.10.1",
-"karma": "0.12.31",
-"karma-chrome-launcher": "0.1.8",
-"karma-firefox-launcher": "0.1.4",
+"grunt-karma": "0.11.0",
+"karma": "0.12.36",
+"karma-chrome-launcher": "0.1.12",
+"karma-firefox-launcher": "0.1.6",
 "karma-qunit": "0.1.4",
 "qunitjs": "1.18.0"
   }

-- 
To view, visit https://gerrit.wikimedia.org/r/216613
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8bd8563c6f3313a7c8fc936c0753b071441c2b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Run generateLocalAutoload.php to sort entries in autoload.php - change (mediawiki/core)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216612

Change subject: Run generateLocalAutoload.php to sort entries in autoload.php
..

Run generateLocalAutoload.php to sort entries in autoload.php

Will reduce dirty diffs in future changes.

Change-Id: I4f97c1e4f9eaf0dc807435209b6a0e8494b60db1
---
M autoload.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/216612/1

diff --git a/autoload.php b/autoload.php
index 3a79cb7..74c7efd 100644
--- a/autoload.php
+++ b/autoload.php
@@ -811,6 +811,7 @@
'NullJob' => __DIR__ . '/includes/jobqueue/jobs/NullJob.php',
'NullLockManager' => __DIR__ . 
'/includes/filebackend/lockmanager/LockManager.php',
'NullRepo' => __DIR__ . '/includes/filerepo/NullRepo.php',
+   'OOUIHTMLForm' => __DIR__ . '/includes/htmlform/OOUIHTMLForm.php',
'ORAField' => __DIR__ . '/includes/db/DatabaseOracle.php',
'ORAResult' => __DIR__ . '/includes/db/DatabaseOracle.php',
'ORMIterator' => __DIR__ . '/includes/db/ORMIterator.php',
@@ -823,7 +824,6 @@
'ObjectFileCache' => __DIR__ . '/includes/cache/ObjectFileCache.php',
'OldChangesList' => __DIR__ . '/includes/changes/OldChangesList.php',
'OldLocalFile' => __DIR__ . '/includes/filerepo/file/OldLocalFile.php',
-   'OOUIHTMLForm' => __DIR__ . '/includes/htmlform/OOUIHTMLForm.php',
'OracleInstaller' => __DIR__ . 
'/includes/installer/OracleInstaller.php',
'OracleUpdater' => __DIR__ . '/includes/installer/OracleUpdater.php',
'OrphanStats' => __DIR__ . '/maintenance/storage/orphanStats.php',
@@ -994,10 +994,10 @@
'ResourceLoaderImage' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderImage.php',
'ResourceLoaderImageModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderImageModule.php',
'ResourceLoaderJqueryMsgDataModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderJqueryMsgDataModule.php',
-   'ResourceLoaderOOUIImageModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderOOUIImageModule.php',
'ResourceLoaderLanguageDataModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderLanguageDataModule.php',
'ResourceLoaderLanguageNamesModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderLanguageNamesModule.php',
'ResourceLoaderModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderModule.php',
+   'ResourceLoaderOOUIImageModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderOOUIImageModule.php',
'ResourceLoaderRawFileModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderRawFileModule.php',
'ResourceLoaderSiteModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderSiteModule.php',
'ResourceLoaderSkinModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderSkinModule.php',

-- 
To view, visit https://gerrit.wikimedia.org/r/216612
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f97c1e4f9eaf0dc807435209b6a0e8494b60db1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove duplicate console messages - change (mediawiki...cxserver)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove duplicate console messages
..


Remove duplicate console messages

Bug: T101503
Change-Id: I836364cc17d0735fd956c2f66850354d67a591eb
---
M ContentTranslationService.js
M Server.js
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Santhosh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ContentTranslationService.js b/ContentTranslationService.js
index 835825e..469c53a 100644
--- a/ContentTranslationService.js
+++ b/ContentTranslationService.js
@@ -55,7 +55,6 @@
 // Everything else goes through this.
 app.use( express.static( __dirname + '/public' ) );
 
-console.log( instanceName + ' ready. Listening on port: ' + conf( 'port' ) );
 server.listen( conf( 'port' ) );
 
 module.exports = app;
diff --git a/Server.js b/Server.js
index 3f40b82..3289c3e 100755
--- a/Server.js
+++ b/Server.js
@@ -8,6 +8,7 @@
 
 var cluster = require( 'cluster' ),
logger = require( __dirname + '/utils/Logger.js' ),
+   conf = require( __dirname + '/utils/Conf.js' ),
i, opts, argv;
 
 opts = require( 'yargs' )
@@ -33,7 +34,7 @@
 
 if ( cluster.isMaster && argv.n > 0 ) {
// Fork workers.
-   logger.info( 'initializing %s workers', argv.n );
+   logger.info( 'Initializing ' + argv.n + ' workers on ' + conf( 'port' ) 
+ ' port' );
for ( i = 0; i < argv.n; i++ ) {
cluster.fork();
}

-- 
To view, visit https://gerrit.wikimedia.org/r/216065
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I836364cc17d0735fd956c2f66850354d67a591eb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix JSCS errors - change (mediawiki...ContentTranslation)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix JSCS errors
..


Fix JSCS errors

Change-Id: I90a0447331df082b4aaff05540ae2ead6678ecad
---
M modules/stats/ext.cx.stats.js
M modules/tools/ext.cx.tools.reference.js
M modules/widgets/callout/ext.cx.callout.js
3 files changed, 31 insertions(+), 31 deletions(-)

Approvals:
  KartikMistry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js
index 8a8ddcd..6ef6b2e 100644
--- a/modules/stats/ext.cx.stats.js
+++ b/modules/stats/ext.cx.stats.js
@@ -166,7 +166,7 @@
{
title: mw.msg( 
'cx-stats-draft-target-source' ),
content: this.drawTranslationsChart( 
'to', 'draft', 'count' )
-   },
+   },
{
title: mw.msg( 
'cx-stats-draft-source-target' ),
content: this.drawTranslationsChart( 
'from', 'draft', 'count' )
@@ -386,7 +386,7 @@
data: $.map( 
this.totalTranslationTrend, function ( data ) {
return data.count;
} )
-   },
+   },
{
label: mw.message(
'cx-trend-translations-to',
@@ -397,8 +397,8 @@
data: $.map( 
this.languageTranslatonTrend, function ( data ) {
return data.count;
} )
-   }
-   ]
+   }
+   ]
};
 
/*global Chart:false */
@@ -430,7 +430,6 @@
this.sourceTargetModel[ status ][ sourceLanguage 
].push( record );
this.targetSourceModel[ status ][ targetLanguage 
].push( record );
}
-
 
for ( status in this.sourceTargetModel ) {
tempModel = this.sourceTargetModel[ status ];
diff --git a/modules/tools/ext.cx.tools.reference.js 
b/modules/tools/ext.cx.tools.reference.js
index f31b21f..6411f99 100644
--- a/modules/tools/ext.cx.tools.reference.js
+++ b/modules/tools/ext.cx.tools.reference.js
@@ -93,7 +93,7 @@
referenceId = $reference.prop( 'id' );
targetReferenceId = 'cx' + referenceId;
$reference.attr( {
-   'id': targetReferenceId,
+   id: targetReferenceId,
'data-sourceid': referenceId
} );
mw.cx.selection.pasteHTML( $reference[ 0 ].outerHTML );
diff --git a/modules/widgets/callout/ext.cx.callout.js 
b/modules/widgets/callout/ext.cx.callout.js
index 757747c..9508dd0 100644
--- a/modules/widgets/callout/ext.cx.callout.js
+++ b/modules/widgets/callout/ext.cx.callout.js
@@ -293,38 +293,39 @@
$this = $( this );
 
leftFlips = {
-   '1': '11',
-   '2': '10',
-   '3': '9',
-   '4': '8',
-   '5': '7'
+   1: '11',
+   2: '10',
+   3: '9',
+   4: '8',
+   5: '7'
};
rightFlips = {
-   '11': '1',
-   '10': '2',
-   '9': '3',
-   '8': '4',
-   '7': '5'
+   11: '1',
+   10: '2',
+   9: '3',
+   8: '4',
+   7: '5'
};
topFlips = {
-   '3': '2',
-   '4': '2',
-   '5': '1',
-   '6': '0',
-   '7': '11',
-   '8': '10',
-   '9': '10'
+   3: '2',
+   4: '2',
+   5: '1',
+   6: '0',
+   7: '11',
+   8: '10',
+   9: '10'
  

[MediaWiki-commits] [Gerrit] Fix JSCS errors - change (mediawiki...ContentTranslation)

2015-06-07 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216611

Change subject: Fix JSCS errors
..

Fix JSCS errors

Change-Id: I90a0447331df082b4aaff05540ae2ead6678ecad
---
M modules/stats/ext.cx.stats.js
M modules/tools/ext.cx.tools.reference.js
M modules/widgets/callout/ext.cx.callout.js
3 files changed, 31 insertions(+), 31 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/11/216611/1

diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js
index 8a8ddcd..6ef6b2e 100644
--- a/modules/stats/ext.cx.stats.js
+++ b/modules/stats/ext.cx.stats.js
@@ -166,7 +166,7 @@
{
title: mw.msg( 
'cx-stats-draft-target-source' ),
content: this.drawTranslationsChart( 
'to', 'draft', 'count' )
-   },
+   },
{
title: mw.msg( 
'cx-stats-draft-source-target' ),
content: this.drawTranslationsChart( 
'from', 'draft', 'count' )
@@ -386,7 +386,7 @@
data: $.map( 
this.totalTranslationTrend, function ( data ) {
return data.count;
} )
-   },
+   },
{
label: mw.message(
'cx-trend-translations-to',
@@ -397,8 +397,8 @@
data: $.map( 
this.languageTranslatonTrend, function ( data ) {
return data.count;
} )
-   }
-   ]
+   }
+   ]
};
 
/*global Chart:false */
@@ -430,7 +430,6 @@
this.sourceTargetModel[ status ][ sourceLanguage 
].push( record );
this.targetSourceModel[ status ][ targetLanguage 
].push( record );
}
-
 
for ( status in this.sourceTargetModel ) {
tempModel = this.sourceTargetModel[ status ];
diff --git a/modules/tools/ext.cx.tools.reference.js 
b/modules/tools/ext.cx.tools.reference.js
index f31b21f..6411f99 100644
--- a/modules/tools/ext.cx.tools.reference.js
+++ b/modules/tools/ext.cx.tools.reference.js
@@ -93,7 +93,7 @@
referenceId = $reference.prop( 'id' );
targetReferenceId = 'cx' + referenceId;
$reference.attr( {
-   'id': targetReferenceId,
+   id: targetReferenceId,
'data-sourceid': referenceId
} );
mw.cx.selection.pasteHTML( $reference[ 0 ].outerHTML );
diff --git a/modules/widgets/callout/ext.cx.callout.js 
b/modules/widgets/callout/ext.cx.callout.js
index 757747c..9508dd0 100644
--- a/modules/widgets/callout/ext.cx.callout.js
+++ b/modules/widgets/callout/ext.cx.callout.js
@@ -293,38 +293,39 @@
$this = $( this );
 
leftFlips = {
-   '1': '11',
-   '2': '10',
-   '3': '9',
-   '4': '8',
-   '5': '7'
+   1: '11',
+   2: '10',
+   3: '9',
+   4: '8',
+   5: '7'
};
rightFlips = {
-   '11': '1',
-   '10': '2',
-   '9': '3',
-   '8': '4',
-   '7': '5'
+   11: '1',
+   10: '2',
+   9: '3',
+   8: '4',
+   7: '5'
};
topFlips = {
-   '3': '2',
-   '4': '2',
-   '5': '1',
-   '6': '0',
-   '7': '11',
-   '8': '10',
-   '9': '10'
+   3: '2',
+   4: '2',
+   5: '1',
+   6: '0',
+   7: '11',
+

[MediaWiki-commits] [Gerrit] Add job to run MW-CS against mediawiki/core on patchset prop... - change (integration/config)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add job to run MW-CS against mediawiki/core on patchset 
proposals
..


Add job to run MW-CS against mediawiki/core on patchset proposals

Adds the 'mw-tools-codesniffer-mwcore-testrun' job which runs proposed
MW-CS patches against MediaWiki core's includes directory to test it
against a large sample of real code.

Bug: T100966
Change-Id: Iaf895422f1a5a1c676dfa7a6393f8a780c5d9d65
---
M jjb/mediawiki-tools.yaml
M zuul/layout.yaml
2 files changed, 27 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml
index 05bd0d3..0ddebb6 100644
--- a/jjb/mediawiki-tools.yaml
+++ b/jjb/mediawiki-tools.yaml
@@ -24,3 +24,22 @@
 docsrc: 'docs/_build/html'
 docdest: 'mw-tools-scap'
  - python-jobs
+
+# Job to run MW-CS patchsets against
+# mediwiki/core's includes/ directory for easier
+# testing against a large sample of code.
+- job:
+name: 'mw-tools-codesniffer-mwcore-testrun'
+node: contintLabsSlave && UbuntuTrusty
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - zuul-cloner:
+ projects: >
+ mediawiki/core
+ mediawiki/tools/codesniffer
+ - shell: |
+cd $WORKSPACE/src/mediawiki/tools/codesniffer
+/srv/deployment/integration/composer/vendor/bin/composer update 
--no-progress --prefer-dist --profile
+vendor/bin/phpcs --standard=./MediaWiki --extensions=php,php5,inc -p 
../../../includes
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 81cf105..994ffd4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1753,6 +1753,12 @@
   - name: mwext-WikidataQuality-repo-tests-mysql-hhvm
 voting: false
 
+  # Job to ease reviews of MW-CS changes
+  - name: mw-tools-codesniffer-mwcore-testrun
+voting: false
+success-message: 'Example result against MediaWiki core'
+failure-message: 'Example result against MediaWiki core'
+
   - name: operations-puppet-doc
 success-message: 'Documentation published on 
https://doc.wikimedia.org/puppet/. Build'
 
@@ -2503,6 +2509,8 @@
   - name: mediawiki/tools/codesniffer
 template:
  - name: composer-test-package
+test:
+ - mw-tools-codesniffer-mwcore-testrun
 
   - name: mediawiki/tools/dippybird
 check-voter:

-- 
To view, visit https://gerrit.wikimedia.org/r/216520
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf895422f1a5a1c676dfa7a6393f8a780c5d9d65
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Polybuildr 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Simplify PHPUnit boostrap, require usage of composer for run... - change (mediawiki...codesniffer)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216610

Change subject: Simplify PHPUnit boostrap, require usage of composer for 
running tests
..

Simplify PHPUnit boostrap, require usage of composer for running tests

Change-Id: I49a76a179ed04098ab58beab90da8f39b8b47107
---
M phpunit.bootstrap.php
1 file changed, 2 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/10/216610/1

diff --git a/phpunit.bootstrap.php b/phpunit.bootstrap.php
index 863acde..63d2aa3 100644
--- a/phpunit.bootstrap.php
+++ b/phpunit.bootstrap.php
@@ -1,22 +1,6 @@
 https://gerrit.wikimedia.org/r/216610
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49a76a179ed04098ab58beab90da8f39b8b47107
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] build: Update MediaWiki codesniffer to 0.2.0 - change (oojs/ui)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216609

Change subject: build: Update MediaWiki codesniffer to 0.2.0
..

build: Update MediaWiki codesniffer to 0.2.0

Had to add ignore tags for global functions that aren't prefixed by
"wf". And fixed one spacing issue.

Change-Id: I75cf4a5ecedbb0465c3bc8f9a91ea0cfddc72ae9
---
M bin/generate-JSPHP-for-karma.php
M composer.json
M tests/index.php
M tests/phpunit/TagTest.php
4 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/09/216609/1

diff --git a/bin/generate-JSPHP-for-karma.php b/bin/generate-JSPHP-for-karma.php
index 0d06552..1cf55de 100644
--- a/bin/generate-JSPHP-for-karma.php
+++ b/bin/generate-JSPHP-for-karma.php
@@ -16,11 +16,15 @@
 $testSuite = json_decode( $testSuiteJSON, true );
 $testSuiteOutput = array();
 
+// @codingStandardsIgnoreStart
 function new_OOUI( $class, $config = array() ) {
+   // @codingStandardsIgnoreEnd
$class = "OOUI\\" . $class;
return new $class( $config );
 }
+// @codingStandardsIgnoreStart
 function unstub( &$value ) {
+   // @codingStandardsIgnoreEnd
if ( is_string( $value ) && substr( $value, 0, 13 ) === '_placeholder_' 
) {
$value = json_decode( substr( $value, 13 ), true );
array_walk_recursive( $value['config'], 'unstub' );
diff --git a/composer.json b/composer.json
index 9655cac..840d9eb 100644
--- a/composer.json
+++ b/composer.json
@@ -8,8 +8,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.8.*",
-   "mediawiki/mediawiki-codesniffer": "0.1.0",
-   "squizlabs/php_codesniffer": "2.1.*",
+   "mediawiki/mediawiki-codesniffer": "0.2.0",
"phpunit/phpunit": "~4.5"
},
"autoload": {
diff --git a/tests/index.php b/tests/index.php
index 2ddf28c..98bb464 100644
--- a/tests/index.php
+++ b/tests/index.php
@@ -43,11 +43,15 @@
 

setExpectedException( $exception );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/216609
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75cf4a5ecedbb0465c3bc8f9a91ea0cfddc72ae9
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improve doc comment on OOUI\Element::mixins - change (oojs/ui)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216608

Change subject: Improve doc comment on OOUI\Element::mixins
..

Improve doc comment on OOUI\Element::mixins

Change-Id: I37170b9daf07d0ccf38764f944f30a901a3a4e03
---
M php/Element.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/08/216608/1

diff --git a/php/Element.php b/php/Element.php
index eaa8c82..7c87cdd 100644
--- a/php/Element.php
+++ b/php/Element.php
@@ -41,7 +41,7 @@
/**
 * Mixins.
 *
-* @var array List mixed in objects.
+* @var ElementMixin[] List mixed in objects.
 */
protected $mixins = array();
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37170b9daf07d0ccf38764f944f30a901a3a4e03
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use site.logevents() instead of site.logpages() in blockrevi... - change (pywikibot/core)

2015-06-07 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216607

Change subject: Use site.logevents() instead of site.logpages() in 
blockreview.py
..

Use site.logevents() instead of site.logpages() in blockreview.py

Bug: T78107
Change-Id: I501edfed38e8d5adc14ea6bac0c222018d75abff
---
M scripts/blockreview.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/07/216607/1

diff --git a/scripts/blockreview.py b/scripts/blockreview.py
index 47b40bf..69d083c 100755
--- a/scripts/blockreview.py
+++ b/scripts/blockreview.py
@@ -228,8 +228,8 @@
 
 def getInfo(self, user):
 if not self.info:
-self.info = next(self.site.logpages(
-1, mode='block', title=user.getUserPage().title(), dump=True))
+self.info = next(iter(self.site.logevents(
+logtype='block', page=user.getUserPage(), total=1))).data
 self.parts = {
 'admin':self.info['user'],
 'user': self.info['title'],

-- 
To view, visit https://gerrit.wikimedia.org/r/216607
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I501edfed38e8d5adc14ea6bac0c222018d75abff
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix search bar text color after appcompat update. - change (apps...wikipedia)

2015-06-07 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216606

Change subject: Fix search bar text color after appcompat update.
..

Fix search bar text color after appcompat update.

Bug: T101638
Change-Id: I98dada3d973c6d51a118a8964355545808919b86
---
M wikipedia/res/values/styles_wikidark.xml
M wikipedia/res/values/styles_wikilight.xml
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/06/216606/1

diff --git a/wikipedia/res/values/styles_wikidark.xml 
b/wikipedia/res/values/styles_wikidark.xml
index 7b33256..52d2d7f 100644
--- a/wikipedia/res/values/styles_wikidark.xml
+++ b/wikipedia/res/values/styles_wikidark.xml
@@ -10,6 +10,7 @@
 @style/AppTheme.ActionModeStyle
 @style/AppTheme.ActionModeStyle
 @style/AppTheme.SearchViewEditTextStyle
+@style/AppTheme.SearchViewEditTextStyle
 @style/DropDownListView.WikiDark
 @color/window_background_dark
 @color/window_background_dark
diff --git a/wikipedia/res/values/styles_wikilight.xml 
b/wikipedia/res/values/styles_wikilight.xml
index d594275..614b84d 100644
--- a/wikipedia/res/values/styles_wikilight.xml
+++ b/wikipedia/res/values/styles_wikilight.xml
@@ -10,6 +10,7 @@
 @style/AppTheme.ActionModeStyle
 @style/AppTheme.ActionModeStyle
 @style/AppTheme.SearchViewEditTextStyle
+@style/AppTheme.SearchViewEditTextStyle
 @style/DropDownListView.WikiLight
 @color/window_background_light
 @color/window_background_light

-- 
To view, visit https://gerrit.wikimedia.org/r/216606
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98dada3d973c6d51a118a8964355545808919b86
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove bracket from assert statements - change (pywikibot/core)

2015-06-07 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216605

Change subject: Remove bracket from assert statements
..

Remove bracket from assert statements

It's against pylint rules and reduces readability

Change-Id: I08df3b4075ebb2adc048d4258161da69da7514fe
---
M pywikibot/__init__.py
M pywikibot/bot.py
M pywikibot/date.py
M pywikibot/diff.py
M pywikibot/family.py
M pywikibot/page.py
M pywikibot/pagegenerators.py
M pywikibot/site.py
M pywikibot/version.py
M scripts/isbn.py
M tests/aspects.py
M tests/i18n_tests.py
M tests/proofreadpage_tests.py
M tests/ui_tests.py
M tests/utils.py
15 files changed, 36 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/216605/1

diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index ea8304a..fa11073 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -552,7 +552,7 @@
 @type url: string
 """
 # Either code and fam or only url
-assert(not url or (not code and not fam))
+assert not url or (not code and not fam)
 _logger = "wiki"
 
 if url:
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 4d8e5c9..dba4f2b 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -117,7 +117,7 @@
 # The same context details are provided by Python 3.X, but need to
 # be extracted from the warning message for Python <= 2.7.
 if record.name == 'py.warnings' and 'caller_file' not in 
record.__dict__:
-assert(len(record.args) == 1)
+assert len(record.args) == 1
 msg = record.args[0]
 
 if sys.version_info[0] < 3:
@@ -125,7 +125,7 @@
 record.lineno = msg.partition(':')[2].partition(':')[0]
 record.module = msg.rpartition('/')[2].rpartition('.')[0]
 else:
-assert(msg.startswith(record.pathname + ':'))
+assert msg.startswith(record.pathname + ':')
 
 record.__dict__['caller_file'] = record.pathname
 record.__dict__['caller_name'] = record.module
@@ -1587,4 +1587,4 @@
 pywikibot.output('\nKeyboardInterrupt during %s bot run...' %
  self.__class__.__name__)
 except Exception as e:
-pywikibot.exception(msg=e, tb=True)
+pywikibot.exception(msg=e, tb=True)
diff --git a/pywikibot/date.py b/pywikibot/date.py
index 262e786..d1f25b1 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -2400,7 +2400,7 @@
 day = min(date.day, calendar.monthrange(year, month)[1])
 new_date = date.replace(year, month, day)
 if add_overlap and day != date.day:
-assert(date.day > day)
+assert date.day > day
 new_date += datetime.timedelta(days=date.day - day)
 return new_date
 
diff --git a/pywikibot/diff.py b/pywikibot/diff.py
index 08f939e..d2ae7f6 100644
--- a/pywikibot/diff.py
+++ b/pywikibot/diff.py
@@ -206,7 +206,7 @@
 
 @property
 def reviewed(self):
-assert(len(set(hunk.reviewed for hunk in self._hunks)) == 1)
+assert len(set(hunk.reviewed for hunk in self._hunks)) == 1
 return self._hunks[0].reviewed
 
 @reviewed.setter
@@ -446,7 +446,7 @@
 elif super_hunk.reviewed == Hunk.NOT_APPR:
 status = '-'
 else:
-assert(False)
+assert False
 if super_hunk[0].a_rng[1] - super_hunk[0].a_rng[0] > 0:
 mode = '-'
 first = self.a[super_hunk[0].a_rng[0]]
@@ -500,7 +500,7 @@
 '{0} -> {1}'.format(answer, help_msg[answer])
 for answer in answers))
 else:
-assert(False)
+assert False
 
 def apply(self):
 """Apply changes. If there are undecided changes, ask to review."""
diff --git a/pywikibot/family.py b/pywikibot/family.py
index 1df55fe..298b235 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -898,7 +898,7 @@
 if fam is None:
 fam = config.family
 
-assert(all(x in NAME_CHARACTERS for x in fam))
+assert all(x in NAME_CHARACTERS for x in fam)
 
 if fam in Family._families:
 return Family._families[fam]
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 73cbd90..ae7d687 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2561,7 +2561,7 @@
 total - len(cached)]
 if total and len(cached) >= total:
 break  # already got enough
-assert(total is None or len(cached) <= total)
+assert total is None or len(cached) <= total
 return cached
 
 # all pages which have been checked but where created before the
@@ -2579,7 +2579,7 @@
 

[MediaWiki-commits] [Gerrit] Parse restrictions e.g. trademark, insignia, etc. - change (mediawiki...CommonsMetadata)

2015-06-07 Thread Sn1per (Code Review)
Sn1per has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216604

Change subject: Parse restrictions e.g. trademark, insignia, etc.
..

Parse restrictions e.g. trademark, insignia, etc.

Find out what restrictions are imposed on a file that could have
legal ramifications, such as trademarks, insignia, nazi or
communist symbols, etc.  Takes  or  elements with classes
prefixed with "restriction-" and outputs in extmetadata to "Restrictions".

Bug: T77717
Change-Id: Ic7a4ec3a63a175dfc4f1d7907d0e81b7f831eb65
---
M DataCollector.php
M TemplateParser.php
A tests/html/File_Logo_NIKE.svg.html
M tests/phpunit/DataCollectorTest.php
M tests/phpunit/ParserTestHelper.php
M tests/phpunit/TemplateParserTest.php
6 files changed, 125 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CommonsMetadata 
refs/changes/04/216604/1

diff --git a/DataCollector.php b/DataCollector.php
index b81c111..4b0d714 100644
--- a/DataCollector.php
+++ b/DataCollector.php
@@ -187,6 +187,10 @@
$templateFields = array_merge( $templateFields, 
$this->selectDeletionReason( $templateData[TemplateParser::DELETION_KEY] ) );
}
 
+   if ( isset( $templateData[TemplateParser::RESTRICTIONS_KEY] ) ) 
{
+   $templateFields = array_merge( $templateFields, 
$this->selectCoordinate( $templateData[TemplateParser::RESTRICTIONS_KEY] ) );
+   }
+
$metadata = array();
foreach( $templateFields as $name => $value ) {
$metadata[ $name ] = array(
diff --git a/TemplateParser.php b/TemplateParser.php
index dca7ee7..408752a 100644
--- a/TemplateParser.php
+++ b/TemplateParser.php
@@ -16,6 +16,7 @@
const LICENSES_KEY = 'licenses';
const INFORMATION_FIELDS_KEY = 'informationFields';
const DELETION_KEY = 'deletion';
+   const RESTRICTIONS_KEY = 'restrictions';
 
/**
 * HTML element class name => metadata field name mapping for license 
data.
@@ -135,6 +136,7 @@
self::INFORMATION_FIELDS_KEY => 
$this->parseInformationFields( $domNavigator ),
self::LICENSES_KEY => $this->parseLicenses( 
$domNavigator ),
self::DELETION_KEY => $this->parseNuke( $domNavigator ),
+   self::RESTRICTIONS_KEY => $this->parseRestrictions( 
$domNavigator ),
) );
}
 
@@ -369,6 +371,28 @@
}
 
/**
+* Parses file restrictions i.e. trademark, insignia, etc.
+* @param DomNavigator $domNavigator
+* @return array
+*/
+   protected function parseRestrictions( DomNavigator $domNavigator ) {
+   $restrictionPrefix = 'restriction-';
+   $restrictions = array();
+   foreach ( $domNavigator->findElementsWithClassPrefix( array( 
'table', 'span' ), $restrictionPrefix ) as $element ) {
+   $classes = explode( ' ', $element->getAttribute( 
'class' ) );
+   foreach ( $classes as $class ) {
+   if ( strpos( $class, $restrictionPrefix ) !== 
false ) {
+   $restrictionType = str_replace( 
$restrictionPrefix, '', $class );
+   if ( !in_array( $restrictionType, 
$restrictions ) ) {
+   $restrictions[] = 
$restrictionType;
+   }
+   }
+   }
+   }
+   return array( array( 'Restrictions' => implode( '|', 
$restrictions ) ) );
+   }
+
+   /**
 * Get the text of a node. The result might be a string, or an array of 
strings if the node has multiple
 * languages (resulting from {{en}} and similar templates).
 * @param DomNavigator $domNavigator
diff --git a/tests/html/File_Logo_NIKE.svg.html 
b/tests/html/File_Logo_NIKE.svg.html
new file mode 100644
index 000..b5877e3
--- /dev/null
+++ b/tests/html/File_Logo_NIKE.svg.html
@@ -0,0 +1,86 @@
+
+Summary[edit | edit source]
+
+  
+   
+ DescriptionLogo 
NIKE.svg
+ 
+   English: Logo for 
American sportswear company Nike Inc.
+ 
+   
+   
+ Date
+ 1971
+   
+   
+ Source
+ SVG based on the "swoosh" logo http://www.estudiologos.com/blog/nike-diseno-tecnologia-y-moda/";>[1]
+   
+   
+ Author
+ Carolyn Davidson
+   (Uploaded to Commons by HernandoJoseAJ)
+   
+   
+ Permission
+   (Reusing this 
file)
+ 
+   PD-textlogo
+ 
+   
+  
+
+Licensing[edit | edit source]
+
+  
+   Public domainPublic domainfalsefalse
+  
+
+
+  
+   
+   This image only consists 
of s

[MediaWiki-commits] [Gerrit] Move all PHP code into includes/ - change (mediawiki...Echo)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216603

Change subject: Move all PHP code into includes/
..

Move all PHP code into includes/

Mainly because I was annoyed at modu to reach
modules/.

Change-Id: Ib149cb2e2612ccddd0503f9d0c5d05b554860a00
---
M autoload.php
R includes/api/ApiEchoMarkRead.php
R includes/api/ApiEchoMarkSeen.php
R includes/api/ApiEchoNotifications.php
R includes/controller/NotificationController.php
R includes/formatters/BasicFormatter.php
R includes/formatters/CommentFormatter.php
R includes/formatters/EditFormatter.php
R includes/formatters/EditUserTalkFormatter.php
R includes/formatters/MentionFormatter.php
R includes/formatters/NotificationFormatter.php
R includes/formatters/PageLinkFormatter.php
R includes/formatters/UserRightsFormatter.php
R includes/jobs/NotificationDeleteJob.php
R includes/jobs/NotificationEmailBundleJob.php
R includes/jobs/NotificationJob.php
R includes/model/AbstractEntity.php
R includes/model/Event.php
R includes/model/Notification.php
R includes/model/TargetPage.php
R includes/special/SpecialNotifications.php
M scripts/gen-autoload.php
22 files changed, 23 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/03/216603/1

diff --git a/autoload.php b/autoload.php
index 5409aa7..f957c57 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1,32 +1,32 @@
  __DIR__ . '/api/ApiEchoMarkRead.php',
+   'ApiEchoMarkRead' => __DIR__ . '/includes/api/ApiEchoMarkRead.php',
'ApiEchoMarkReadTest' => __DIR__ . 
'/tests/phpunit/api/ApiEchoMarkReadTest.php',
-   'ApiEchoMarkSeen' => __DIR__ . '/api/ApiEchoMarkSeen.php',
-   'ApiEchoNotifications' => __DIR__ . '/api/ApiEchoNotifications.php',
+   'ApiEchoMarkSeen' => __DIR__ . '/includes/api/ApiEchoMarkSeen.php',
+   'ApiEchoNotifications' => __DIR__ . 
'/includes/api/ApiEchoNotifications.php',
'ApiEchoNotificationsTest' => __DIR__ . 
'/tests/phpunit/api/ApiEchoNotificationsTest.php',
'BatchRowUpdateTest' => __DIR__ . 
'/tests/phpunit/includes/BatchRowUpdateTest.php',
'CallbackFilterIterator' => __DIR__ . 
'/includes/iterator/CallbackFilterIterator.php',
'ContainmentSetTest' => __DIR__ . 
'/tests/phpunit/includes/ContainmentSetTest.php',
-   'EchoAbstractEntity' => __DIR__ . '/model/AbstractEntity.php',
+   'EchoAbstractEntity' => __DIR__ . '/includes/model/AbstractEntity.php',
'EchoAbstractMapper' => __DIR__ . '/includes/mapper/AbstractMapper.php',
'EchoAbstractMapperStub' => __DIR__ . 
'/tests/phpunit/includes/mapper/AbstractMapperTest.php',
'EchoAbstractMapperTest' => __DIR__ . 
'/tests/phpunit/includes/mapper/AbstractMapperTest.php',
'EchoArrayList' => __DIR__ . '/includes/ContainmentSet.php',
'EchoAttributeManager' => __DIR__ . '/includes/AttributeManager.php',
'EchoAttributeManagerTest' => __DIR__ . 
'/tests/phpunit/includes/AttributeManagerTest.php',
-   'EchoBasicFormatter' => __DIR__ . '/formatters/BasicFormatter.php',
+   'EchoBasicFormatter' => __DIR__ . 
'/includes/formatters/BasicFormatter.php',
'EchoBatchRowIterator' => __DIR__ . '/includes/BatchRowUpdate.php',
'EchoBatchRowUpdate' => __DIR__ . '/includes/BatchRowUpdate.php',
'EchoBatchRowWriter' => __DIR__ . '/includes/BatchRowUpdate.php',
'EchoCachedList' => __DIR__ . '/includes/ContainmentSet.php',
'EchoCallbackIterator' => __DIR__ . 
'/includes/iterator/CallbackIterator.php',
'EchoCatchableFatalErrorException' => __DIR__ . 
'/includes/exception/CatchableFatalErrorException.php',
-   'EchoCommentFormatter' => __DIR__ . '/formatters/CommentFormatter.php',
+   'EchoCommentFormatter' => __DIR__ . 
'/includes/formatters/CommentFormatter.php',
'EchoContainmentList' => __DIR__ . '/includes/ContainmentSet.php',
'EchoContainmentSet' => __DIR__ . '/includes/ContainmentSet.php',
'EchoDataOutputFormatter' => __DIR__ . 
'/includes/DataOutputFormatter.php',
@@ -36,15 +36,15 @@
'EchoDiffParserTest' => __DIR__ . 
'/tests/phpunit/includes/DiffParserTest.php',
'EchoDiscussionParser' => __DIR__ . '/includes/DiscussionParser.php',
'EchoDiscussionParserTest' => __DIR__ . 
'/tests/phpunit/includes/DiscussionParserTest.php',
-   'EchoEditFormatter' => __DIR__ . '/formatters/EditFormatter.php',
-   'EchoEditUserTalkFormatter' => __DIR__ . 
'/formatters/EditUserTalkFormatter.php',
+   'EchoEditFormatter' => __DIR__ . 
'/includes/formatters/EditFormatter.php',
+   'EchoEditUserTalkFormatter' => __DIR__ . 
'/includes/formatters/EditUserTalkFormatter.php',
'EchoEmailDecorator' => __DIR__ . '/includes/EmailFormatter.php',
'EchoEmailDigest' => __DIR__ . '/includes/EmailFormatter.php',
'EchoEmailFormatter' => __DIR__ . '/includes/EmailFormatter.php',
'Ech

[MediaWiki-commits] [Gerrit] Fix Appveyor builds - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix Appveyor builds
..


Fix Appveyor builds

An extra line from .appveyor.yml needs to be removed
after the switch to python requests (952665a).

Change-Id: I583443f779118683a87b6e3d9216c64da92eab93
---
M .appveyor.yml
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.appveyor.yml b/.appveyor.yml
index bd16e2e..9286aec 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -28,7 +28,6 @@
   - ps: (new-object 
net.webclient).DownloadFile('https://raw.githubusercontent.com/pypa/python-packaging-user-guide/master/source/code/install.ps1',
 'install.ps1')
   - "powershell install.ps1"
   - ps: (new-object 
net.webclient).DownloadFile('https://raw.githubusercontent.com/pypa/python-packaging-user-guide/master/source/code/run_with_compiler.cmd',
 'run_with_compiler.cmd')
-  - cd ..\\..
 
 build: off
 

-- 
To view, visit https://gerrit.wikimedia.org/r/215861
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I583443f779118683a87b6e3d9216c64da92eab93
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [FIX] APISite.upload: Support exists-normalized - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] APISite.upload: Support exists-normalized
..


[FIX] APISite.upload: Support exists-normalized

The upload warning type 'exists-normalized' has been added in MW 1.22 but
wasn't supported in pywikibot yet.

Change-Id: Ic3d4517e1e864e4f7a420d826618fc479ed3361c
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 463552c..d1d730f 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4980,6 +4980,8 @@
 'duplicate': "Uploaded file is a duplicate of %(msg)s.",
 'badfilename': "Target filename is invalid.",
 'filetype-unwanted-type': "File %(msg)s type is unwanted type.",
+'exists-normalized': 'File exists with different extension as '
+ '"%(msg)s".',
 }
 
 # check for required user right

-- 
To view, visit https://gerrit.wikimedia.org/r/216545
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3d4517e1e864e4f7a420d826618fc479ed3361c
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [FIX] open_compressed: Wrap BZ2File in Py 2.7 - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] open_compressed: Wrap BZ2File in Py 2.7
..


[FIX] open_compressed: Wrap BZ2File in Py 2.7

Although the documentation specifies that BZ2File is compatible with the
with-statement since Python 2.7 and the code for both gzip and BZ2File were
changed in the same commit in cpython, only since Python 2.7.1 this is
supported.

It also separates the tests so it's easier to see if only one specific
compressor has a problem. It also tests that the wrapper does not block any
exception.

The docstring is also improved to reflect the use_extension parameter.

Bug: T101649
Change-Id: I3f7024746164cc1bb1d89f2ac52dfa41ca08a3a6
---
M pywikibot/tools/__init__.py
M tests/tools_tests.py
2 files changed, 48 insertions(+), 28 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 9636c46..8d9c4ff 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -750,22 +750,25 @@
 they are always available. 7zip is only available when a 7za program is
 available.
 
-The compression is selected via the file ending.
+The compression is either selected via the magic number or file ending.
 
 @param filename: The filename.
 @type filename: str
+@param use_extension: Use the file extension instead of the magic number
+to determine the type of compression (default False).
+@type use_extension: bool
 @raises ValueError: When 7za is not available.
 @raises OSError: When it's not a 7z archive but the file extension is 7z.
 It is also raised by bz2 when its content is invalid. gzip does not
 immediately raise that error but only on reading it.
-@return: A file like object returning the uncompressed data in binary mode.
-Before Python 2.7 it's wrapping the object returned by BZ2File and gzip
-in a ContextManagerWrapper so it's advantages/disadvantages apply 
there.
-@rtype: file like object
+@return: A file-like object returning the uncompressed data in binary mode.
+Before Python 2.7 the GzipFile object and before 2.7.1 the BZ2File are
+wrapped in a ContextManagerWrapper with its advantages/disadvantages.
+@rtype: file-like object
 """
-def wrap(wrapped):
+def wrap(wrapped, sub_ver):
 """Wrap in a wrapper when this is below Python version 2.7."""
-if sys.version_info < (2, 7):
+if sys.version_info < (2, 7, sub_ver):
 return ContextManagerWrapper(wrapped)
 else:
 return wrapped
@@ -787,9 +790,9 @@
 extension = ''
 
 if extension == 'bz2':
-return wrap(bz2.BZ2File(filename))
+return wrap(bz2.BZ2File(filename), 1)
 elif extension == 'gz':
-return wrap(gzip.open(filename))
+return wrap(gzip.open(filename), 0)
 elif extension == '7z':
 try:
 process = subprocess.Popen(['7za', 'e', '-bd', '-so', filename],
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index ceb42cb..718f589 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -24,26 +24,26 @@
 
 """Test that ContextManagerWrapper is working correctly."""
 
+class DummyClass(object):
+
+"""A dummy class which has some values and a close method."""
+
+class_var = 42
+
+def __init__(self):
+"""Create instance with dummy values."""
+self.instance_var = 1337
+self.closed = False
+
+def close(self):
+"""Just store that it has been closed."""
+self.closed = True
+
 net = False
 
 def test_wrapper(self):
 """Create a test instance and verify the wrapper redirects."""
-class DummyClass(object):
-
-"""A dummy class which has some values and a close method."""
-
-class_var = 42
-
-def __init__(self):
-"""Create instance with dummy values."""
-self.instance_var = 1337
-self.closed = False
-
-def close(self):
-"""Just store that it has been closed."""
-self.closed = True
-
-obj = DummyClass()
+obj = self.DummyClass()
 wrapped = tools.ContextManagerWrapper(obj)
 self.assertIs(wrapped.class_var, obj.class_var)
 self.assertIs(wrapped.instance_var, obj.instance_var)
@@ -52,7 +52,18 @@
 with wrapped as unwrapped:
 self.assertFalse(obj.closed)
 self.assertIs(unwrapped, obj)
+unwrapped.class_var = 47
 self.assertTrue(obj.closed)
+self.assertEqual(wrapped.class_var, 47)
+
+def test_exec_wrapper(self):
+"""Check that the wrapper permits exceptions."""
+wrapper = tools.ContextManagerWrapper(self.DummyC

[MediaWiki-commits] [Gerrit] Remove dead dismiss code - change (mediawiki...Echo)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove dead dismiss code
..


Remove dead dismiss code

mw.echo.setUpDismissability was removed in 08fc83b6de1feb5823, and will
never be called since the class is never set.

Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
2 files changed, 0 insertions(+), 13 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index 76de9a5..0dadd58 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -191,12 +191,6 @@
$li.wrapInner( $wrapper );
 
mw.echo.setupNotificationLogging( $li, 'flyout' 
);
-
-   // Set up each individual notification with a 
close box and dismiss
-   // interface if it is dismissable.
-   if ( $li.find( '.mw-echo-dismiss' ).length ) {
-   mw.echo.setUpDismissability( $li );
-   }
} );
 
if ( !this.markOnView && this.unread.length ) {
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index 74c4502..dba9203 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -32,9 +32,6 @@
// box and dismiss interface if it is dismissable.
$( '.mw-echo-notification' ).each( function () {
mw.echo.setupNotificationLogging( $( this ), 
'archive' );
-   if ( $( this ).find( '.mw-echo-dismiss' 
).length ) {
-   mw.echo.setUpDismissability( this );
-   }
} );
 
$( '#mw-echo-moreinfo-link' ).click( function () {
@@ -108,10 +105,6 @@
}
 
mw.echo.setupNotificationLogging( $li, 
'archive' );
-
-   if ( $li.find( '.mw-echo-dismiss' 
).length ) {
-   mw.echo.setUpDismissability( 
$li );
-   }
} );
 
that.notcontinue = notifications['continue'];

-- 
To view, visit https://gerrit.wikimedia.org/r/216602
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
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 dead dismiss code - change (mediawiki...Echo)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216602

Change subject: Remove dead dismiss code
..

Remove dead dismiss code

mw.echo.setUpDismissability was removed in 08fc83b6de1feb5823, and will
never be called since the class is never set.

Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
2 files changed, 0 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/02/216602/1

diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index 76de9a5..0dadd58 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -191,12 +191,6 @@
$li.wrapInner( $wrapper );
 
mw.echo.setupNotificationLogging( $li, 'flyout' 
);
-
-   // Set up each individual notification with a 
close box and dismiss
-   // interface if it is dismissable.
-   if ( $li.find( '.mw-echo-dismiss' ).length ) {
-   mw.echo.setUpDismissability( $li );
-   }
} );
 
if ( !this.markOnView && this.unread.length ) {
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index 74c4502..dba9203 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -32,9 +32,6 @@
// box and dismiss interface if it is dismissable.
$( '.mw-echo-notification' ).each( function () {
mw.echo.setupNotificationLogging( $( this ), 
'archive' );
-   if ( $( this ).find( '.mw-echo-dismiss' 
).length ) {
-   mw.echo.setUpDismissability( this );
-   }
} );
 
$( '#mw-echo-moreinfo-link' ).click( function () {
@@ -108,10 +105,6 @@
}
 
mw.echo.setupNotificationLogging( $li, 
'archive' );
-
-   if ( $li.find( '.mw-echo-dismiss' 
).length ) {
-   mw.echo.setUpDismissability( 
$li );
-   }
} );
 
that.notcontinue = notifications['continue'];

-- 
To view, visit https://gerrit.wikimedia.org/r/216602
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Flow: Fix to use up to date keys and point to right messages - change (mediawiki...WikimediaMessages)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Flow: Fix to use up to date keys and point to right messages
..


Flow: Fix to use up to date keys and point to right messages

Change-Id: Ib34912e19f4d5ea00ce274940ce5dffe605441d1
---
M i18n/wikimedia/en.json
M i18n/wikimedia/qqq.json
2 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/wikimedia/en.json b/i18n/wikimedia/en.json
index 9bd85cf..5f5fab8 100644
--- a/i18n/wikimedia/en.json
+++ b/i18n/wikimedia/en.json
@@ -214,11 +214,11 @@
"wikimedia-oauth-privacy-link": 
"[https://wikimediafoundation.org/wiki/Privacy_policy Privacy Policy]",
"mwoauth-grant-checkuser": "Access checkuser data",
"wikimedia-flow-terms-of-use-new-topic": "By clicking 
\"{{int:flow-newtopic-save}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-reply": "By clicking 
\"{{int:flow-reply-submit}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
+   "wikimedia-flow-terms-of-use-reply": "By clicking 
\"{{int:flow-reply-link}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
"wikimedia-flow-terms-of-use-edit": "By saving changes, you agree to 
our [//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-summarize": "By clicking 
\"{{int:flow-summarize-topic-submit}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-close-topic": "By clicking 
\"{{int:flow-close-topic-submit}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-reopen-topic": "By clicking 
\"{{int:flow-reopen-topic-submit}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
+   "wikimedia-flow-terms-of-use-summarize": "By clicking 
\"{{int:flow-topic-action-summarize-topic}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
+   "wikimedia-flow-terms-of-use-lock-topic": "By clicking 
\"{{int:flow-topic-action-lock-topic}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
+   "wikimedia-flow-terms-of-use-unlock-topic": "By clicking 
\"{{int:flow-topic-action-unlock-topic}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
"wikimedia-upload-nolicenses": "Uploading files to this wiki is not 
enabled. Please [[commons:Special:UploadWizard|upload to Wikimedia 
Commons]].\n\nTo be able to use this special page to upload to this wiki, an 
administrator needs to add one or more license options to the page 
[[Media

[MediaWiki-commits] [Gerrit] Empty PHP entry point in favor of extension.json - change (mediawiki...Calendar)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Empty PHP entry point in favor of extension.json
..


Empty PHP entry point in favor of extension.json

Change-Id: I87b54c86ada15bda6f4a65c3e09e7676b1962063
---
M Calendar.php
1 file changed, 12 insertions(+), 36 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Calendar.php b/Calendar.php
index 3ec20b1..82ec26a 100644
--- a/Calendar.php
+++ b/Calendar.php
@@ -1,39 +1,15 @@
 http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( 'This file is a MediaWiki extension, it is not a valid entry 
point' );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'Calendar' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['Calendar'] = __DIR__ . '/i18n';
+   $wgExtensionMessagesFiles['CalendarMagic'] = __DIR__ . 
'/Calendar.i18n.magic.php';
+   /* wfWarn(
+   'Deprecated PHP entry point used for Calendar extension. Please 
use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   ); */
+   return true;
+} else {
+   die( 'This version of the Calendar extension requires MediaWiki 1.25+' 
);
 }
-
-$wgExtensionCredits['parserhook'][] = array(
-   'path' => __FILE__,
-   'name' => 'Calendar',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:Calendar-Wikivoyage',
-   'descriptionmsg' => 'calendar-desc',
-   'author' => 'Roland Unger',
-   'version' => '1.1'
-);
-
-$dir = __DIR__ . '/';
-$wgAutoloadClasses['CalendarTable'] = $dir . 'CalendarTable.class.php';
-$wgAutoloadClasses['CalendarHooks'] = $dir . 'Calendar.hooks.php';
-$wgMessagesDirs['Calendar'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['CalendarMagic'] = $dir . 'Calendar.i18n.magic.php';
-
-$wgHooks['ParserFirstCallInit'][] = 'CalendarHooks::setupParserHooks';
-
-$wgResourceModules['ext.calendar'] = array(
-   'position' => 'top',
-   'styles' => 'ext.calendar.css',
-   'localBasePath' => __DIR__ . '/modules',
-   'remoteExtPath' => 'Calendar/modules',
-);

-- 
To view, visit https://gerrit.wikimedia.org/r/216401
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I87b54c86ada15bda6f4a65c3e09e7676b1962063
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Calendar
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
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 i18n shim - change (mediawiki...Calendar)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove i18n shim
..


Remove i18n shim

Change-Id: I93504bddc1e580e069458a2bb3fe0742861e34da
---
D Calendar.i18n.php
M Calendar.php
M extension.json
3 files changed, 0 insertions(+), 37 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Calendar.i18n.php b/Calendar.i18n.php
deleted file mode 100644
index ce95c80..000
--- a/Calendar.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-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( 'wfJsonI18nShimd26a5923fea4b836' ) ) {
-   function wfJsonI18nShimd26a5923fea4b836( $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'][] = 
'wfJsonI18nShimd26a5923fea4b836';
-}
diff --git a/Calendar.php b/Calendar.php
index 1fb9d93..3ec20b1 100644
--- a/Calendar.php
+++ b/Calendar.php
@@ -27,7 +27,6 @@
 $wgAutoloadClasses['CalendarTable'] = $dir . 'CalendarTable.class.php';
 $wgAutoloadClasses['CalendarHooks'] = $dir . 'Calendar.hooks.php';
 $wgMessagesDirs['Calendar'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['Calendar'] = $dir . 'Calendar.i18n.php';
 $wgExtensionMessagesFiles['CalendarMagic'] = $dir . 'Calendar.i18n.magic.php';
 
 $wgHooks['ParserFirstCallInit'][] = 'CalendarHooks::setupParserHooks';
diff --git a/extension.json b/extension.json
index 2e19458..4977dec 100644
--- a/extension.json
+++ b/extension.json
@@ -6,7 +6,6 @@
"descriptionmsg": "calendar-desc",
"type": "parserhook",
"ExtensionMessagesFiles": {
-   "Calendar": "Calendar.i18n.php",
"CalendarMagic": "Calendar.i18n.magic.php"
},
"Hooks": {

-- 
To view, visit https://gerrit.wikimedia.org/r/216400
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I93504bddc1e580e069458a2bb3fe0742861e34da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Calendar
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use __DIR__ directly - change (mediawiki...Thanks)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use __DIR__ directly
..


Use __DIR__ directly

Change-Id: I26ede931a50cd7549a51e8df3cc4598c72eec52b
---
M Thanks.php
1 file changed, 14 insertions(+), 16 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Thanks.php b/Thanks.php
index cdd2382..9cea515 100644
--- a/Thanks.php
+++ b/Thanks.php
@@ -41,20 +41,18 @@
 
 /* Setup */
 
-$dir = __DIR__;
-
 // Register files
-$wgAutoloadClasses['ThanksHooks'] = $dir . '/Thanks.hooks.php';
-$wgAutoloadClasses['EchoThanksFormatter'] = $dir . '/ThanksFormatter.php';
-$wgAutoloadClasses['EchoFlowThanksFormatter'] = $dir . 
'/FlowThanksFormatter.php';
-$wgAutoloadClasses['ApiThank'] = $dir . '/ApiThank.php';
-$wgAutoloadClasses['ApiRevThank'] = $dir . '/ApiRevThank.php';
-$wgAutoloadClasses['ApiFlowThank'] = $dir . '/ApiFlowThank.php';
-$wgAutoloadClasses['ThanksLogFormatter'] = $dir . '/ThanksLogFormatter.php';
-$wgAutoloadClasses['SpecialThanks'] = $dir . '/SpecialThanks.php';
+$wgAutoloadClasses['ThanksHooks'] = __DIR__ . '/Thanks.hooks.php';
+$wgAutoloadClasses['EchoThanksFormatter'] = __DIR__ . '/ThanksFormatter.php';
+$wgAutoloadClasses['EchoFlowThanksFormatter'] = __DIR__ . 
'/FlowThanksFormatter.php';
+$wgAutoloadClasses['ApiThank'] = __DIR__ . '/ApiThank.php';
+$wgAutoloadClasses['ApiRevThank'] = __DIR__ . '/ApiRevThank.php';
+$wgAutoloadClasses['ApiFlowThank'] = __DIR__ . '/ApiFlowThank.php';
+$wgAutoloadClasses['ThanksLogFormatter'] = __DIR__ . '/ThanksLogFormatter.php';
+$wgAutoloadClasses['SpecialThanks'] = __DIR__ . '/SpecialThanks.php';
 $wgMessagesDirs['Thanks'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['Thanks'] = $dir . '/Thanks.i18n.php';
-$wgExtensionMessagesFiles['ThanksAlias'] = $dir . '/Thanks.alias.php';
+$wgExtensionMessagesFiles['Thanks'] = __DIR__ . '/Thanks.i18n.php';
+$wgExtensionMessagesFiles['ThanksAlias'] = __DIR__ . '/Thanks.alias.php';
 
 // Register APIs
 $wgAPIModules['thank'] = 'ApiRevThank';
@@ -83,7 +81,7 @@
'scripts' => array(
'ext.thanks.thank.js',
),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 $wgResourceModules['ext.thanks.revthank'] = array(
@@ -108,7 +106,7 @@
'jquery.confirmable',
'ext.thanks',
),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 $wgResourceModules['ext.thanks.mobilediff'] = array(
@@ -129,7 +127,7 @@
'mobile.toast',
),
'targets' => array( 'desktop', 'mobile' ),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 $wgResourceModules['ext.thanks.flowthank'] = array(
@@ -147,7 +145,7 @@
'user.tokens',
'ext.thanks',
),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216601
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I26ede931a50cd7549a51e8df3cc4598c72eec52b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use mw.Api.postWithToken to automatically re-try badtoken er... - change (mediawiki...Echo)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use mw.Api.postWithToken to automatically re-try badtoken errors
..


Use mw.Api.postWithToken to automatically re-try badtoken errors

Bug: T101664
Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
M tests/qunit/overlay/test_ext.echo.overlay.js
3 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index 61c3e59..76de9a5 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -82,7 +82,6 @@
if ( this.unread.length ) {
data = {
action: 'echomarkread',
-   token: mw.user.tokens.get( 'editToken' 
),
uselang: 'user'
};
if ( id ) {
@@ -92,7 +91,7 @@
data.sections = this.name;
}
 
-   return this.api.post( data ).then( function ( 
result ) {
+   return this.api.postWithToken( 'edit', data 
).then( function ( result ) {
return result.query.echomarkread;
} ).done( function ( result ) {
// reset internal state of unread 
messages
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index 1d5726e..74c4502 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -133,10 +133,9 @@
api = new mw.Api(),
that = this;
 
-   api.post( {
+   api.postWithToken( 'edit', {
action: 'echomarkread',
list: unread.join( '|' ),
-   token: mw.user.tokens.get( 'editToken' ),
uselang: 'user'
} ).done( function ( result ) {
// update the badge if the link is enabled
diff --git a/tests/qunit/overlay/test_ext.echo.overlay.js 
b/tests/qunit/overlay/test_ext.echo.overlay.js
index 3d9acd1..52b9241 100644
--- a/tests/qunit/overlay/test_ext.echo.overlay.js
+++ b/tests/qunit/overlay/test_ext.echo.overlay.js
@@ -27,6 +27,9 @@
 
return $.Deferred().resolve( data );
},
+   postWithToken: function ( type, data ) {
+   return this.post( data );
+   },
get: function () {
var i, id,
index = [],

-- 
To view, visit https://gerrit.wikimedia.org/r/216596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use __DIR__ directly - change (mediawiki...Thanks)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216601

Change subject: Use __DIR__ directly
..

Use __DIR__ directly

Change-Id: I26ede931a50cd7549a51e8df3cc4598c72eec52b
---
M Thanks.php
1 file changed, 14 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Thanks 
refs/changes/01/216601/1

diff --git a/Thanks.php b/Thanks.php
index cdd2382..9cea515 100644
--- a/Thanks.php
+++ b/Thanks.php
@@ -41,20 +41,18 @@
 
 /* Setup */
 
-$dir = __DIR__;
-
 // Register files
-$wgAutoloadClasses['ThanksHooks'] = $dir . '/Thanks.hooks.php';
-$wgAutoloadClasses['EchoThanksFormatter'] = $dir . '/ThanksFormatter.php';
-$wgAutoloadClasses['EchoFlowThanksFormatter'] = $dir . 
'/FlowThanksFormatter.php';
-$wgAutoloadClasses['ApiThank'] = $dir . '/ApiThank.php';
-$wgAutoloadClasses['ApiRevThank'] = $dir . '/ApiRevThank.php';
-$wgAutoloadClasses['ApiFlowThank'] = $dir . '/ApiFlowThank.php';
-$wgAutoloadClasses['ThanksLogFormatter'] = $dir . '/ThanksLogFormatter.php';
-$wgAutoloadClasses['SpecialThanks'] = $dir . '/SpecialThanks.php';
+$wgAutoloadClasses['ThanksHooks'] = __DIR__ . '/Thanks.hooks.php';
+$wgAutoloadClasses['EchoThanksFormatter'] = __DIR__ . '/ThanksFormatter.php';
+$wgAutoloadClasses['EchoFlowThanksFormatter'] = __DIR__ . 
'/FlowThanksFormatter.php';
+$wgAutoloadClasses['ApiThank'] = __DIR__ . '/ApiThank.php';
+$wgAutoloadClasses['ApiRevThank'] = __DIR__ . '/ApiRevThank.php';
+$wgAutoloadClasses['ApiFlowThank'] = __DIR__ . '/ApiFlowThank.php';
+$wgAutoloadClasses['ThanksLogFormatter'] = __DIR__ . '/ThanksLogFormatter.php';
+$wgAutoloadClasses['SpecialThanks'] = __DIR__ . '/SpecialThanks.php';
 $wgMessagesDirs['Thanks'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['Thanks'] = $dir . '/Thanks.i18n.php';
-$wgExtensionMessagesFiles['ThanksAlias'] = $dir . '/Thanks.alias.php';
+$wgExtensionMessagesFiles['Thanks'] = __DIR__ . '/Thanks.i18n.php';
+$wgExtensionMessagesFiles['ThanksAlias'] = __DIR__ . '/Thanks.alias.php';
 
 // Register APIs
 $wgAPIModules['thank'] = 'ApiRevThank';
@@ -83,7 +81,7 @@
'scripts' => array(
'ext.thanks.thank.js',
),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 $wgResourceModules['ext.thanks.revthank'] = array(
@@ -108,7 +106,7 @@
'jquery.confirmable',
'ext.thanks',
),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 $wgResourceModules['ext.thanks.mobilediff'] = array(
@@ -129,7 +127,7 @@
'mobile.toast',
),
'targets' => array( 'desktop', 'mobile' ),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 $wgResourceModules['ext.thanks.flowthank'] = array(
@@ -147,7 +145,7 @@
'user.tokens',
'ext.thanks',
),
-   'localBasePath' => $dir . '/modules',
+   'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Thanks/modules',
 );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216601
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26ede931a50cd7549a51e8df3cc4598c72eec52b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove pre-MW 1.22 compatability code - change (mediawiki...Echo)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove pre-MW 1.22 compatability code
..


Remove pre-MW 1.22 compatability code

Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index ccdac82..61c3e59 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -2,9 +2,6 @@
 ( function ( $, mw ) {
'use strict';
 
-   // backwards compatibility <= MW 1.21
-   var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
-
function EchoOverlay( apiResultNotifications ) {
this.api = mw.echo.overlay.api;
// set internal properties
@@ -277,7 +274,7 @@
_getFooterElement: function () {
var $prefLink = $( '#pt-preferences a' ),
links = [
-   { url: getUrl( 'Special:Notifications' 
), text: mw.msg( 'echo-overlay-link' ),
+   { url: mw.util.getUrl( 
'Special:Notifications' ), text: mw.msg( 'echo-overlay-link' ),
className: 'mw-echo-icon-all' },
{ url: $prefLink.attr( 'href' ) + 
'#mw-prefsection-echo', text: $prefLink.text(),
className: 'mw-echo-icon-cog' }

-- 
To view, visit https://gerrit.wikimedia.org/r/216599
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Pass uselang=user to the API instead of figuring it out clie... - change (mediawiki...Echo)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Pass uselang=user to the API instead of figuring it out client 
side
..


Pass uselang=user to the API instead of figuring it out client side

Change-Id: I09add693567af577c14c646d2b6b943716e0522e
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
2 files changed, 5 insertions(+), 7 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index ecb0a5e..ccdac82 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -3,8 +3,7 @@
'use strict';
 
// backwards compatibility <= MW 1.21
-   var getUrl = mw.util.getUrl || mw.util.wikiGetlink,
-   useLang = mw.config.get( 'wgUserLanguage' );
+   var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
 
function EchoOverlay( apiResultNotifications ) {
this.api = mw.echo.overlay.api;
@@ -87,7 +86,7 @@
data = {
action: 'echomarkread',
token: mw.user.tokens.get( 'editToken' 
),
-   uselang: useLang
+   uselang: 'user'
};
if ( id ) {
// If id is given mark that as read 
otherwise use all unread messages
@@ -469,7 +468,7 @@
notformat: 'flyout',
notlimit: this.notificationLimit,
notprop: 'index|list|count',
-   uselang: useLang
+   uselang: 'user'
};
 
return this.api.get( apiData ).then( function ( result 
) {
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index 89b8527..1d5726e 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -1,6 +1,5 @@
 ( function ( $, mw ) {
'use strict';
-   var useLang = mw.config.get( 'wgUserLanguage' );
 
mw.echo.special = {
 
@@ -71,7 +70,7 @@
notprop: 'index|list',
notcontinue: this.notcontinue,
notlimit: mw.config.get( 
'wgEchoDisplayNum' ),
-   uselang: useLang
+   uselang: 'user'
};
 
api.get( apiData ).done( function ( result ) {
@@ -138,7 +137,7 @@
action: 'echomarkread',
list: unread.join( '|' ),
token: mw.user.tokens.get( 'editToken' ),
-   uselang: useLang
+   uselang: 'user'
} ).done( function ( result ) {
// update the badge if the link is enabled
if ( result.query.echomarkread.count !== 
undefined &&

-- 
To view, visit https://gerrit.wikimedia.org/r/216598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I09add693567af577c14c646d2b6b943716e0522e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] ext.echo.special depends upon mediawiki.api - change (mediawiki...Echo)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: ext.echo.special depends upon mediawiki.api
..


ext.echo.special depends upon mediawiki.api

Change-Id: Iabcfd263ae8cb857d767ea9b6af0480d67bf3d2d
---
M Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Resources.php b/Resources.php
index a3dc042..f41c645 100644
--- a/Resources.php
+++ b/Resources.php
@@ -78,6 +78,7 @@
'styles' => 'special/ext.echo.special.less',
'dependencies' => array(
'mediawiki.ui.button',
+   'mediawiki.api',
'ext.echo.base',
),
'messages' => array(

-- 
To view, visit https://gerrit.wikimedia.org/r/216597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iabcfd263ae8cb857d767ea9b6af0480d67bf3d2d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
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 up composer test jobs for AhoCorasick repo - change (integration/config)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Set up composer test jobs for AhoCorasick repo
..


Set up composer test jobs for AhoCorasick repo

Change-Id: I43febc7d9725f0d5fff980b085366b13d6f7475d
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 0f91d54..81cf105 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7113,6 +7113,10 @@
 template:
  - name: composer-test-package
 
+  - name: AhoCorasick
+template:
+ - name: composer-test-package
+
   - name: sartoris
 template:
   - name: 'python'

-- 
To view, visit https://gerrit.wikimedia.org/r/216600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I43febc7d9725f0d5fff980b085366b13d6f7475d
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
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 up composer test jobs for AhoCorasick repo - change (integration/config)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216600

Change subject: Set up composer test jobs for AhoCorasick repo
..

Set up composer test jobs for AhoCorasick repo

Change-Id: I43febc7d9725f0d5fff980b085366b13d6f7475d
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/00/216600/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 5f8d804..994ffd4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7121,6 +7121,10 @@
 template:
  - name: composer-test-package
 
+  - name: AhoCorasick
+template:
+ - name: composer-test-package
+
   - name: sartoris
 template:
   - name: 'python'

-- 
To view, visit https://gerrit.wikimedia.org/r/216600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43febc7d9725f0d5fff980b085366b13d6f7475d
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove pre-MW 1.22 compatability code - change (mediawiki...Echo)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216599

Change subject: Remove pre-MW 1.22 compatability code
..

Remove pre-MW 1.22 compatability code

Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/99/216599/1

diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index ccdac82..61c3e59 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -2,9 +2,6 @@
 ( function ( $, mw ) {
'use strict';
 
-   // backwards compatibility <= MW 1.21
-   var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
-
function EchoOverlay( apiResultNotifications ) {
this.api = mw.echo.overlay.api;
// set internal properties
@@ -277,7 +274,7 @@
_getFooterElement: function () {
var $prefLink = $( '#pt-preferences a' ),
links = [
-   { url: getUrl( 'Special:Notifications' 
), text: mw.msg( 'echo-overlay-link' ),
+   { url: mw.util.getUrl( 
'Special:Notifications' ), text: mw.msg( 'echo-overlay-link' ),
className: 'mw-echo-icon-all' },
{ url: $prefLink.attr( 'href' ) + 
'#mw-prefsection-echo', text: $prefLink.text(),
className: 'mw-echo-icon-cog' }

-- 
To view, visit https://gerrit.wikimedia.org/r/216599
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Pass uselang=user to the API instead of figuring it out clie... - change (mediawiki...Echo)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216598

Change subject: Pass uselang=user to the API instead of figuring it out client 
side
..

Pass uselang=user to the API instead of figuring it out client side

Change-Id: I09add693567af577c14c646d2b6b943716e0522e
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
2 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/98/216598/1

diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index ecb0a5e..ccdac82 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -3,8 +3,7 @@
'use strict';
 
// backwards compatibility <= MW 1.21
-   var getUrl = mw.util.getUrl || mw.util.wikiGetlink,
-   useLang = mw.config.get( 'wgUserLanguage' );
+   var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
 
function EchoOverlay( apiResultNotifications ) {
this.api = mw.echo.overlay.api;
@@ -87,7 +86,7 @@
data = {
action: 'echomarkread',
token: mw.user.tokens.get( 'editToken' 
),
-   uselang: useLang
+   uselang: 'user'
};
if ( id ) {
// If id is given mark that as read 
otherwise use all unread messages
@@ -469,7 +468,7 @@
notformat: 'flyout',
notlimit: this.notificationLimit,
notprop: 'index|list|count',
-   uselang: useLang
+   uselang: 'user'
};
 
return this.api.get( apiData ).then( function ( result 
) {
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index 89b8527..1d5726e 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -1,6 +1,5 @@
 ( function ( $, mw ) {
'use strict';
-   var useLang = mw.config.get( 'wgUserLanguage' );
 
mw.echo.special = {
 
@@ -71,7 +70,7 @@
notprop: 'index|list',
notcontinue: this.notcontinue,
notlimit: mw.config.get( 
'wgEchoDisplayNum' ),
-   uselang: useLang
+   uselang: 'user'
};
 
api.get( apiData ).done( function ( result ) {
@@ -138,7 +137,7 @@
action: 'echomarkread',
list: unread.join( '|' ),
token: mw.user.tokens.get( 'editToken' ),
-   uselang: useLang
+   uselang: 'user'
} ).done( function ( result ) {
// update the badge if the link is enabled
if ( result.query.echomarkread.count !== 
undefined &&

-- 
To view, visit https://gerrit.wikimedia.org/r/216598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09add693567af577c14c646d2b6b943716e0522e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] ext.echo.special depends upon mediawiki.api - change (mediawiki...Echo)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216597

Change subject: ext.echo.special depends upon mediawiki.api
..

ext.echo.special depends upon mediawiki.api

Change-Id: Iabcfd263ae8cb857d767ea9b6af0480d67bf3d2d
---
M Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/97/216597/1

diff --git a/Resources.php b/Resources.php
index a3dc042..f41c645 100644
--- a/Resources.php
+++ b/Resources.php
@@ -78,6 +78,7 @@
'styles' => 'special/ext.echo.special.less',
'dependencies' => array(
'mediawiki.ui.button',
+   'mediawiki.api',
'ext.echo.base',
),
'messages' => array(

-- 
To view, visit https://gerrit.wikimedia.org/r/216597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iabcfd263ae8cb857d767ea9b6af0480d67bf3d2d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use mw.Api.postWithToken to automatically re-try badtoken er... - change (mediawiki...Echo)

2015-06-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216596

Change subject: Use mw.Api.postWithToken to automatically re-try badtoken errors
..

Use mw.Api.postWithToken to automatically re-try badtoken errors

Bug: T101664
Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
2 files changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/96/216596/1

diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index ecb0a5e..348a68f 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -86,7 +86,6 @@
if ( this.unread.length ) {
data = {
action: 'echomarkread',
-   token: mw.user.tokens.get( 'editToken' 
),
uselang: useLang
};
if ( id ) {
@@ -96,7 +95,7 @@
data.sections = this.name;
}
 
-   return this.api.post( data ).then( function ( 
result ) {
+   return this.api.postWithToken( 'edit', data 
).then( function ( result ) {
return result.query.echomarkread;
} ).done( function ( result ) {
// reset internal state of unread 
messages
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index 89b8527..a575ceb 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -134,10 +134,9 @@
api = new mw.Api(),
that = this;
 
-   api.post( {
+   api.postWithToken( 'edit', {
action: 'echomarkread',
list: unread.join( '|' ),
-   token: mw.user.tokens.get( 'editToken' ),
uselang: useLang
} ).done( function ( result ) {
// update the badge if the link is enabled

-- 
To view, visit https://gerrit.wikimedia.org/r/216596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix pflwiki logo transparency - change (operations/mediawiki-config)

2015-06-07 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216595

Change subject: Fix pflwiki logo transparency
..

Fix pflwiki logo transparency

Seems that this logo hasn't had transparency since this version was originally
uploaded to Commons in November 2010:
https://commons.wikimedia.org/wiki/File:Wikipedia-logo-v2-pfl.png
Indeed https://pfl.wikipedia.org/ does look a bit silly with it. So I've
re-exported the PNG based on the SVG:
https://commons.wikimedia.org/wiki/File:Wikipedia-logo-v2-pfl.svg
And then ran it through optipng -o7 pflwiki.png

Change-Id: I1fa82e91bdc14a5023c73b03cb65a860a5b9713f
---
M w/static/images/project-logos/pflwiki.png
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/95/216595/1

diff --git a/w/static/images/project-logos/pflwiki.png 
b/w/static/images/project-logos/pflwiki.png
index 5ab8c6b..3168193 100644
--- a/w/static/images/project-logos/pflwiki.png
+++ b/w/static/images/project-logos/pflwiki.png
Binary files differ

-- 
To view, visit https://gerrit.wikimedia.org/r/216595
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fa82e91bdc14a5023c73b03cb65a860a5b9713f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Initial commit. - change (AhoCorasick)

2015-06-07 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216594

Change subject: Initial commit.
..

Initial commit.

Initial commit of a PHP implementation of the Aho-Corasick string matching
algorithm, packaged for distribution as a standalone library. The motivation
behind this work is the desire to replace FastStringSearch with a pure-PHP
implementation with comparable performance and without the licensing issues
which encumber FastStringSearch.

The Aho-Corasick string matching algorithm is an efficient algorithm for
locating occurrences of multiple search keywords in a body of text. The time
it takes to construct the finite state machine is proportional to the sum of
the lengths of the search keywords. Once constructed, the machine can locate
all occurences of all search keywords in a body of text in a single pass,
making exactly one state transition per input character.

FastStringSearch implements a slightly different multiple-pattern search
algorithm by the name of Commentz-Walter. I went with Aho-Corasick mostly
because I found the paper[1] which introduced it clear and easy to follow.

The variant implemented here is the refinement described in section 6 of the
paper ("Eliminating failure transitions") which generates a deterministic
finite-state automaton from the search keywords. This improves the efficiency
of the string-matching phase at the cost of having to do more work up-front
to compute all possible state transitions. Because the search keywords are
fairly stable and because the resultant automaton can be cached and reused,
this seemed like the right trade-off.

 [1]: http://cr.yp.to/bib/1975/aho.pdf

Change-Id: I583e1c2f619fa2b3992ac0909164d8a1fe8dc4d2
---
A .gitattributes
A .gitignore
A .travis.yml
A LICENSE
A NOTICE
A composer.json
A phpcs.xml
A phpunit.xml.dist
A src/MultiStringMatcher.php
A tests/AhoCorasickTest.php
10 files changed, 628 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/AhoCorasick refs/changes/94/216594/1

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..6223ec7
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,8 @@
+.gitattributes export-ignore
+.gitignore export-ignore
+.gitreview export-ignore
+Doxyfile export-ignore
+composer.json export-ignore
+doc export-ignore
+phpunit.xml.dist export-ignore
+test export-ignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..f6f384e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/coverage
+/doc/html
+vendor/
+composer.lock
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..3d4019f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: php
+php:
+  - "5.3.3"
+  - "5.3"
+  - "5.4"
+  - "5.5"
+  - "5.6"
+  - "hhvm"
+sudo: false
+install:
+  - composer install
+script:
+  - composer test
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+

[MediaWiki-commits] [Gerrit] Add .gitreview - change (AhoCorasick)

2015-06-07 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Add .gitreview
..


Add .gitreview

Change-Id: I803629299d3491f0cbdd5a8f1b113b4531086ba7
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..9a88e53
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=AhoCorasick.git
+defaultbranch=master
+defaultrebase=0

-- 
To view, visit https://gerrit.wikimedia.org/r/216593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I803629299d3491f0cbdd5a8f1b113b4531086ba7
Gerrit-PatchSet: 1
Gerrit-Project: AhoCorasick
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add .gitreview - change (AhoCorasick)

2015-06-07 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216593

Change subject: Add .gitreview
..

Add .gitreview

Change-Id: I803629299d3491f0cbdd5a8f1b113b4531086ba7
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/AhoCorasick refs/changes/93/216593/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..9a88e53
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=AhoCorasick.git
+defaultbranch=master
+defaultrebase=0

-- 
To view, visit https://gerrit.wikimedia.org/r/216593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I803629299d3491f0cbdd5a8f1b113b4531086ba7
Gerrit-PatchSet: 1
Gerrit-Project: AhoCorasick
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove i18n shim - change (mediawiki...CleanChanges)

2015-06-07 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216592

Change subject: Remove i18n shim
..

Remove i18n shim

Change-Id: I2076adc2560f2e17d0cb49c8763cdd5b238ecd21
---
D CleanChanges.i18n.php
M CleanChanges.php
M i18n/ksh.json
3 files changed, 3 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CleanChanges 
refs/changes/92/216592/1

diff --git a/CleanChanges.i18n.php b/CleanChanges.i18n.php
deleted file mode 100644
index 17bcda6..000
--- a/CleanChanges.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-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( 'wfJsonI18nShimd87671d4445e53f6' ) ) {
-   function wfJsonI18nShimd87671d4445e53f6( $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'][] = 
'wfJsonI18nShimd87671d4445e53f6';
-}
diff --git a/CleanChanges.php b/CleanChanges.php
index e4c1c3c..72bdef7 100644
--- a/CleanChanges.php
+++ b/CleanChanges.php
@@ -13,10 +13,9 @@
  */
 
 /* Set up messages and includes */
-$dir = __DIR__;
 $wgMessagesDirs['CleanChanges'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['CleanChanges'] = "$dir/CleanChanges.i18n.php";
-$wgAutoloadClasses['NCL'] =  "$dir/CleanChanges_body.php";
+$wgAutoloadClasses['NCL'] =  __DIR__ . "/CleanChanges_body.php";
+$wgAutoloadClasses['CCFilters'] = __DIR__ . "/Filters.php";
 
 require_once __DIR__ . '/Resources.php';
 
@@ -42,5 +41,3 @@
 
 $wgCCUserFilter = true;
 $wgCCTrailerFilter = false;
-
-$wgAutoloadClasses['CCFilters'] = "$dir/Filters.php";
diff --git a/i18n/ksh.json b/i18n/ksh.json
index e04a7b6..934008e 100644
--- a/i18n/ksh.json
+++ b/i18n/ksh.json
@@ -4,7 +4,7 @@
"Purodha"
]
},
-   "cleanchanges-changerightslink": "Jruppe aanpasse",
+   "cleanchanges-changerightslink": "Jroppe aanpasse",
"cleanchanges-desc": "Määt en köötere [[Special:RecentChanges|Leß met 
de {{lcfirst:{{int:Recentchanges]].",
"cleanchanges-language": "Schprohch:",
"cleanchanges-language-na": "all",

-- 
To view, visit https://gerrit.wikimedia.org/r/216592
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2076adc2560f2e17d0cb49c8763cdd5b238ecd21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: f1a9d02..9c57bdb - change (mediawiki/extensions)

2015-06-07 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216591

Change subject: Syncronize VisualEditor: f1a9d02..9c57bdb
..

Syncronize VisualEditor: f1a9d02..9c57bdb

Change-Id: Ia2681295a34a748339fc32de22e828598699c6f3
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/91/216591/1

diff --git a/VisualEditor b/VisualEditor
index f1a9d02..9c57bdb 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit f1a9d021017a0141c87e7280a827813519cee94f
+Subproject commit 9c57bdbf30097b0ecc4ecde6cc545207cab0c9ff

-- 
To view, visit https://gerrit.wikimedia.org/r/216591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2681295a34a748339fc32de22e828598699c6f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: f1a9d02..9c57bdb - change (mediawiki/extensions)

2015-06-07 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: f1a9d02..9c57bdb
..


Syncronize VisualEditor: f1a9d02..9c57bdb

Change-Id: Ia2681295a34a748339fc32de22e828598699c6f3
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index f1a9d02..9c57bdb 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit f1a9d021017a0141c87e7280a827813519cee94f
+Subproject commit 9c57bdbf30097b0ecc4ecde6cc545207cab0c9ff

-- 
To view, visit https://gerrit.wikimedia.org/r/216591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2681295a34a748339fc32de22e828598699c6f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make README reflect reality of LICENSEs - change (mediawiki...ShortUrl)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make README reflect reality of LICENSEs
..


Make README reflect reality of LICENSEs

In file license specs win over one line in README

Bug: T88106
Change-Id: I48f8d4d9a6da04c39475693a597fae486aaef4a1
---
M README
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/README b/README
index b04442d..14e460a 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 --
 README for the ShortUrl extension
 Copyright © 2011 Yuvi Panda
-Licenses: GNU General Public Licence (GPL)
+Licenses: Modified BSD License
 --
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I48f8d4d9a6da04c39475693a597fae486aaef4a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ShortUrl
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [FIX] APISite.upload: Support exists-normalized - change (pywikibot/core)

2015-06-07 Thread XZise (Code Review)
XZise has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216545

Change subject: [FIX] APISite.upload: Support exists-normalized
..

[FIX] APISite.upload: Support exists-normalized

The upload warning type 'exists-normalized' has been added in MW 1.22 but
wasn't supported in pywikibot yet.

Change-Id: Ic3d4517e1e864e4f7a420d826618fc479ed3361c
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/45/216545/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 463552c..3a49db4 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4980,6 +4980,7 @@
 'duplicate': "Uploaded file is a duplicate of %(msg)s.",
 'badfilename': "Target filename is invalid.",
 'filetype-unwanted-type': "File %(msg)s type is unwanted type.",
+'exists-normalized': 'File exists with different extension 
%(msg)s.',
 }
 
 # check for required user right

-- 
To view, visit https://gerrit.wikimedia.org/r/216545
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3d4517e1e864e4f7a420d826618fc479ed3361c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [FIX] open_compressed: Wrap BZ2File in Py 2.7 - change (pywikibot/core)

2015-06-07 Thread XZise (Code Review)
XZise has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216544

Change subject: [FIX] open_compressed: Wrap BZ2File in Py 2.7
..

[FIX] open_compressed: Wrap BZ2File in Py 2.7

Although the documentation specifies that BZ2File is compatible with the
with-statement since Python 2.7 and the code for both gzip and BZ2File were
changed in the same commit in cpython, only since Python 2.7.1 this is
supported.

It also separates the tests so it's easier to see if only one specific
compressor has a problem. It also tests that the wrapper does not block any
exception.

Bug: T101649
Change-Id: I3f7024746164cc1bb1d89f2ac52dfa41ca08a3a6
---
M pywikibot/tools/__init__.py
M tests/tools_tests.py
2 files changed, 44 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/44/216544/1

diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 9636c46..ca69a54 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -759,13 +759,15 @@
 It is also raised by bz2 when its content is invalid. gzip does not
 immediately raise that error but only on reading it.
 @return: A file like object returning the uncompressed data in binary mode.
-Before Python 2.7 it's wrapping the object returned by BZ2File and gzip
-in a ContextManagerWrapper so it's advantages/disadvantages apply 
there.
+The object returned by BZ2File and gzip are wrapped in a
+ContextManagerWrapper so its advantages/disadvantages apply there. The
+gzip object are just wrapped in versions before Python 2.7 and BZ2File
+is just wrapped in versions before 2.7.1.
 @rtype: file like object
 """
-def wrap(wrapped):
+def wrap(wrapped, sub_ver):
 """Wrap in a wrapper when this is below Python version 2.7."""
-if sys.version_info < (2, 7):
+if sys.version_info < (2, 7, sub_ver):
 return ContextManagerWrapper(wrapped)
 else:
 return wrapped
@@ -787,9 +789,9 @@
 extension = ''
 
 if extension == 'bz2':
-return wrap(bz2.BZ2File(filename))
+return wrap(bz2.BZ2File(filename), 1)
 elif extension == 'gz':
-return wrap(gzip.open(filename))
+return wrap(gzip.open(filename), 0)
 elif extension == '7z':
 try:
 process = subprocess.Popen(['7za', 'e', '-bd', '-so', filename],
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index ceb42cb..718f589 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -24,26 +24,26 @@
 
 """Test that ContextManagerWrapper is working correctly."""
 
+class DummyClass(object):
+
+"""A dummy class which has some values and a close method."""
+
+class_var = 42
+
+def __init__(self):
+"""Create instance with dummy values."""
+self.instance_var = 1337
+self.closed = False
+
+def close(self):
+"""Just store that it has been closed."""
+self.closed = True
+
 net = False
 
 def test_wrapper(self):
 """Create a test instance and verify the wrapper redirects."""
-class DummyClass(object):
-
-"""A dummy class which has some values and a close method."""
-
-class_var = 42
-
-def __init__(self):
-"""Create instance with dummy values."""
-self.instance_var = 1337
-self.closed = False
-
-def close(self):
-"""Just store that it has been closed."""
-self.closed = True
-
-obj = DummyClass()
+obj = self.DummyClass()
 wrapped = tools.ContextManagerWrapper(obj)
 self.assertIs(wrapped.class_var, obj.class_var)
 self.assertIs(wrapped.instance_var, obj.instance_var)
@@ -52,7 +52,18 @@
 with wrapped as unwrapped:
 self.assertFalse(obj.closed)
 self.assertIs(unwrapped, obj)
+unwrapped.class_var = 47
 self.assertTrue(obj.closed)
+self.assertEqual(wrapped.class_var, 47)
+
+def test_exec_wrapper(self):
+"""Check that the wrapper permits exceptions."""
+wrapper = tools.ContextManagerWrapper(self.DummyClass())
+self.assertFalse(wrapper.closed)
+with self.assertRaises(ZeroDivisionError):
+with wrapper:
+1 / 0
+self.assertTrue(wrapper.closed)
 
 
 class OpenCompressedTestCase(TestCase):
@@ -82,13 +93,19 @@
 with tools.open_compressed(*args) as f:
 return f.read()
 
-def test_open_compressed(self):
-"""Test open_compressed with all compressors in the standard 
library."""
+def test_open_compressed_normal(self):
+"""Test open_compressed with no compression in the standard library."""
 self.assertEqual(self._get_content(

[MediaWiki-commits] [Gerrit] Make README reflect reality of LICENSEs - change (mediawiki...ShortUrl)

2015-06-07 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216543

Change subject: Make README reflect reality of LICENSEs
..

Make README reflect reality of LICENSEs

In file license specs win over one line in README

Bug: T88106
Change-Id: I48f8d4d9a6da04c39475693a597fae486aaef4a1
---
M README
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ShortUrl 
refs/changes/43/216543/1

diff --git a/README b/README
index b04442d..14e460a 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 --
 README for the ShortUrl extension
 Copyright © 2011 Yuvi Panda
-Licenses: GNU General Public Licence (GPL)
+Licenses: Modified BSD License
 --
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48f8d4d9a6da04c39475693a597fae486aaef4a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ShortUrl
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't crash hard if unknown webservice type is encountered - change (operations...tools-manifest)

2015-06-07 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Don't crash hard if unknown webservice type is encountered
..


Don't crash hard if unknown webservice type is encountered

Change-Id: I2c7345f6b17fd5220e94cd09f5186e18e9786b04
---
M debian/changelog
M tools/manifest/manifest.py
2 files changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 9292f59..edb5215 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tools-manifest (0.4) trusty; urgency=low
+
+  * Fix hard crash if unknown webservice type is encountered
+
+ -- Yuvi Panda   Tue, 7 June 2015 17:00:00 +0100
+
 tools-manifest (0.3) trusty; urgency=low
 
   * Fix seteuid / setegid behavior for handling exceptions properly
diff --git a/tools/manifest/manifest.py b/tools/manifest/manifest.py
index 83a834a..051be49 100644
--- a/tools/manifest/manifest.py
+++ b/tools/manifest/manifest.py
@@ -3,8 +3,6 @@
 
 class Manifest(object):
 """A service manifest!"""
-WEBSERVICE_TYPES = ('lighttpd', 'lighttpd-precise', 'nodejs', 
'uwsgi-python', 'tomcat')
-
 class InvalidManifestException(Exception):
 pass
 
@@ -23,9 +21,6 @@
 data = {}  # Handle empty service manifests
 self.data = data
 self.tool = tool
-
-if 'web' in data and data['web'] not in Manifest.WEBSERVICE_TYPES:
-raise Manifest.InvalidManifestException('webservice type should be 
one of %s', Manifest.WEBSERVICE_TYPES)
 
 @property
 def webservice_server(self):

-- 
To view, visit https://gerrit.wikimedia.org/r/216542
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c7345f6b17fd5220e94cd09f5186e18e9786b04
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Support Debian python-ipaddr package - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Support Debian python-ipaddr package
..


Support Debian python-ipaddr package

Prefer ipaddr as the default IP support on Python 2.
Retain support for ipaddress, but recommend installing ipaddr.

Bug: T100603
Change-Id: I531f739ab94a7ba424142041a5e74bf066e6e07d
---
M pywikibot/tools/ip.py
M setup.py
M tests/ipregex_tests.py
3 files changed, 49 insertions(+), 23 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/tools/ip.py b/pywikibot/tools/ip.py
index 808c0cc..93983e7 100644
--- a/pywikibot/tools/ip.py
+++ b/pywikibot/tools/ip.py
@@ -18,8 +18,22 @@
 
 from pywikibot.tools import LazyRegex
 
+ipaddress_e = ipaddr_e = None
+
 try:
 from ipaddress import ip_address
+except ImportError as ipaddress_e:
+ip_address = None
+pass
+
+if not ip_address or sys.version_info[0] < 3:
+try:
+from ipaddr import IPAddress as ip_address
+ip_address.__T76286__ = False
+except ImportError as ipaddr_e:
+pass
+
+if ip_address and ip_address.__module__ == 'ipaddress':
 if sys.version_info[0] < 3:
 # This backport fails many tests
 # https://pypi.python.org/pypi/py2-ipaddress
@@ -27,7 +41,7 @@
 try:
 ip_address(u'')
 ip_address = None
-raise ImportError('ipaddress backport is broken')
+raise ImportError('ipaddress backport is broken; install ipaddr')
 except ValueError:
 pass
 
@@ -36,28 +50,32 @@
 # However while it rejects u'', it will consider '' valid
 try:
 ip_address(b'')
-warn('ipaddress backport is defective; patching.', ImportWarning)
+warn('ipaddress backport is defective; patching; install ipaddr',
+ ImportWarning)
 orig_ip_address = ip_address
 # force all input to be a unicode object so it validates correctly
 
-def ip_address(IP):
+def ip_address_patched(IP):
 """Safe ip_address."""
 return orig_ip_address(unicode(IP))  # noqa
+
+ip_address = ip_address_patched
 except ValueError:
 # This means ipaddress has correctly determined '' is invalid
 pass
-except ImportError as e:
-warn('Importing ipaddress.ip_address failed: %s' % e,
- ImportWarning)
+elif not ip_address:
+warn('Importing ipaddr.IPAddress failed: %s\n'
+ 'Importing ipaddress.ip_address failed: %s\n'
+ 'Please install ipaddr.'
+ % (ipaddr_e, ipaddress_e), ImportWarning)
 
-def ip_address(IP):
+def ip_address_fake(IP):
 """Fake ip_address method."""
 warn('ipaddress backport not available.', DeprecationWarning)
 if ip_regexp.match(IP) is None:
 raise ValueError('Invalid IP address')
 
-# The following flag is used by the unit tests
-ip_address.__fake__ = True
+ip_address = ip_address_fake
 
 # deprecated IP detector
 ip_regexp = LazyRegex()
diff --git a/setup.py b/setup.py
index db13b1e..c74ba98 100644
--- a/setup.py
+++ b/setup.py
@@ -78,12 +78,14 @@
 script_deps['replicate_wiki.py'] = ['argparse']
 dependencies.append('future')  # provides collections backports
 
-# tools.ip does not depend on an ipaddress module, as it falls back to
-# using regexes if not available, however the pywikibot package should use
-# the functional backport of py3 ipaddress, which is:
+# tools.ip does not have a hard dependency on an IP address module,
+# as it falls back to using regexes if one is not available.
+# The functional backport of py3 ipaddress is acceptable:
 # https://pypi.python.org/pypi/ipaddress
+# However the Debian package python-ipaddr is also supported:
+# https://pypi.python.org/pypi/ipaddr
 # Other backports are likely broken.
-dependencies.append('ipaddress')
+dependencies.append('ipaddr')
 
 # mwlib is not available for py3
 script_deps['patrol'] = ['mwlib']
diff --git a/tests/ipregex_tests.py b/tests/ipregex_tests.py
index 7553684..6e4459e 100644
--- a/tests/ipregex_tests.py
+++ b/tests/ipregex_tests.py
@@ -2,7 +2,7 @@
 """Test IP regex."""
 # -*- coding: utf-8  -*-
 #
-# (C) Pywikibot team, 2014
+# (C) Pywikibot team, 2015
 #
 # Distributed under the terms of the MIT license.
 from __future__ import unicode_literals
@@ -12,6 +12,7 @@
 from pywikibot.tools import ip
 
 from tests.aspects import unittest, TestCase
+from tests.utils import expected_failure_if
 
 
 class TestIPBase(TestCase):
@@ -620,6 +621,12 @@
 self.ipv6test(True, "a:b:c:d:e:f:0::")
 self.ipv6test(False, "':10.0.0.1")
 
+def _test_T76286_failures(self):
+"""Test known bug

[MediaWiki-commits] [Gerrit] Don't crash hard if unknown webservice type is encountered - change (operations...tools-manifest)

2015-06-07 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216542

Change subject: Don't crash hard if unknown webservice type is encountered
..

Don't crash hard if unknown webservice type is encountered

Change-Id: I2c7345f6b17fd5220e94cd09f5186e18e9786b04
---
M debian/changelog
M tools/manifest/manifest.py
2 files changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/42/216542/1

diff --git a/debian/changelog b/debian/changelog
index 9292f59..edb5215 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tools-manifest (0.4) trusty; urgency=low
+
+  * Fix hard crash if unknown webservice type is encountered
+
+ -- Yuvi Panda   Tue, 7 June 2015 17:00:00 +0100
+
 tools-manifest (0.3) trusty; urgency=low
 
   * Fix seteuid / setegid behavior for handling exceptions properly
diff --git a/tools/manifest/manifest.py b/tools/manifest/manifest.py
index 83a834a..051be49 100644
--- a/tools/manifest/manifest.py
+++ b/tools/manifest/manifest.py
@@ -3,8 +3,6 @@
 
 class Manifest(object):
 """A service manifest!"""
-WEBSERVICE_TYPES = ('lighttpd', 'lighttpd-precise', 'nodejs', 
'uwsgi-python', 'tomcat')
-
 class InvalidManifestException(Exception):
 pass
 
@@ -23,9 +21,6 @@
 data = {}  # Handle empty service manifests
 self.data = data
 self.tool = tool
-
-if 'web' in data and data['web'] not in Manifest.WEBSERVICE_TYPES:
-raise Manifest.InvalidManifestException('webservice type should be 
one of %s', Manifest.WEBSERVICE_TYPES)
 
 @property
 def webservice_server(self):

-- 
To view, visit https://gerrit.wikimedia.org/r/216542
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c7345f6b17fd5220e94cd09f5186e18e9786b04
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update jqModal.js to r15 - change (mediawiki...AjaxLogin)

2015-06-07 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216541

Change subject: Update jqModal.js to r15
..

Update jqModal.js to r15

Project link

* https://github.com/briceburg/jqModal

File link

* https://github.com/briceburg/jqModal/blob/master/releases/jqModal-r15.js

* https://github.com/briceburg/jqModal/blob/master/releases/jqModal-r24.js

Change-Id: I6154be14f6875d1b1953b68896f451b2ac02c082
---
M AjaxLogin.js
M jqModal.js
D jqModal.r16.js
A jqModal.r24.js
4 files changed, 454 insertions(+), 475 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AjaxLogin 
refs/changes/41/216541/1

diff --git a/AjaxLogin.js b/AjaxLogin.js
index 0ee1e13..cf0b0f4 100644
--- a/AjaxLogin.js
+++ b/AjaxLogin.js
@@ -5,7 +5,8 @@
  * @author Chamindu Munasinghe 
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
-/* global mw */
+/* global mw, $, console, confirm */
+
 var AjaxLogin = function() {
this._loginPanel = null;
this._loginForm = null;
@@ -76,9 +77,9 @@
success: function( data ) {
that.requestSuccess( data, dataString, actionURL );
},
-   error: function( XMLHttpRequest, textStatus, errorThrown ) {
+   error: function() {
// TODO: add error handling here
-   if ( typeof console != 'undefined' ) {
+   if ( typeof console !== 'undefined' ) {
console.log( 'Error in AjaxLogin.js!' );
}
}
@@ -135,10 +136,8 @@
 
 /**
  * Close the AjaxLogin panel.
- *
- * @param {Event}
  */
-AjaxLogin.prototype.doClose = function( event ) {
+AjaxLogin.prototype.doClose = function() {
this._loginPanel.jqmHide();
 };
 
@@ -180,7 +179,7 @@
$( '#wpPreview' ).click();
}
} else {
-   if ( mw.config.get( 
'wgCanonicalSpecialPageName' ) == 'Userlogout' ) {
+   if ( mw.config.get( 
'wgCanonicalSpecialPageName' ) === 'Userlogout' ) {
window.location.href = mw.config.get( 
'wgServer' ) + mw.config.get( 'wgScriptPath' );
} else {
window.location.reload( true );
@@ -199,9 +198,9 @@
success: function( data ) {
that.requestSuccess( data, dataString, 
actionURL );
},
-   error: function( XMLHttpRequest, textStatus, 
errorThrown ) {
+   error: function() {
// TODO: add error handling here
-   if ( typeof console != 'undefined' ) {
+   if ( typeof console !== 'undefined' ) {
console.log( 'Error in 
AjaxLogin.js!' );
}
}
@@ -212,10 +211,12 @@
$( '#wpName1' ).value = '';
$( '#wpPassword1' ).value = '';
$( '#wpName1' ).focus();
+   break;
case 'WrongPass':
this.enableForm();
$( '#wpPassword1' ).val( '' );
$( '#wpPassword1' ).focus();
+   break;
default:
this.enableForm();
this.displayReason( data.ajaxlogin.text );
@@ -225,7 +226,7 @@
 
 $( document ).ready( function() {
if (
-   typeof mw.config.get( 'wgEnableAjaxLogin' ) != 'undefined' &&
+   typeof mw.config.get( 'wgEnableAjaxLogin' ) !== 'undefined' &&
mw.config.get( 'wgEnableAjaxLogin' )
)
{
diff --git a/jqModal.js b/jqModal.js
index 76896fa..8f4852c 100644
--- a/jqModal.js
+++ b/jqModal.js
@@ -3,14 +3,15 @@
  *   (http://dev.iceburg.net/jquery/jqModal/)
  *
  * Copyright (c) 2007,2008 Brice Burgess 
+ * Code updated by Yoosuf Muhammad 
  * Dual licensed under the MIT and GPL licenses:
  *   http://www.opensource.org/licenses/mit-license.php
  *   http://www.gnu.org/licenses/gpl.html
  *
- * $Version: 03/01/2009 +r14
+ * $Version: 08/04/2013 +r15
  */
-(function( $ ) {
-   $.fn.jqm = function( o ) {
+(function($) {
+   $.fn.jqm = function(o) {
var p = {
overlay: 50,
overlayClass: 'jqmOverlay',
@@ -25,52 +26,48 @@
onHide: F,
onLoad: F
};
-   return this.each( function() {
-

[MediaWiki-commits] [Gerrit] Cannonicalize user input before storing - change (mediawiki...UrlShortener)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Cannonicalize user input before storing
..


Cannonicalize user input before storing

Convert all inputted urls to PROTO_HTTP before storing them,
to avoid duplicating entries with differring protocols.

We convert the urls to PROTO_CURRENT before redirecting users.

Change-Id: Icc78dded082c95310046235bfa4831b77dcc200d
---
M SpecialUrlRedirector.php
M UrlShortener.utils.php
2 files changed, 27 insertions(+), 5 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpecialUrlRedirector.php b/SpecialUrlRedirector.php
index 07fa128..7715255 100644
--- a/SpecialUrlRedirector.php
+++ b/SpecialUrlRedirector.php
@@ -12,7 +12,7 @@
$this->getOutput()->redirect( SpecialPage::getTitleFor( 
'UrlShortener' )->getFullURL() );
return;
}
-   $url = UrlShortenerUtils::getURL( $par );
+   $url = UrlShortenerUtils::getURL( $par, PROTO_CURRENT );
if ( $url !== false ) {
$this->getOutput()->redirect( $url, '301' );
} else {
diff --git a/UrlShortener.utils.php b/UrlShortener.utils.php
index 23ee494..14678e8 100755
--- a/UrlShortener.utils.php
+++ b/UrlShortener.utils.php
@@ -22,11 +22,16 @@
 * If it already exists in cache or the database, just returns that.
 * Otherwise, a new shortcode entry is created and returned.
 *
-* @param $url URL to encode
+* @param string $url URL to encode
 * @return string base36 encoded shortcode that refers to the $url
 */
public static function getShortCode( $url ) {
global $wgMemc;
+
+   // First, cannonicalize the URL
+   // store everything in the db as HTTP, we'll convert it before
+   // redirecting users
+   $url = self::convertToProtocol( $url, PROTO_HTTP );
 
$memcKey = wfMemcKey( 'urlshortcode', 'title', md5( $url ) );
$id = $wgMemc->get( $memcKey );
@@ -60,12 +65,28 @@
}
 
/**
+* Converts a possibly protocol'd url to the one specified
+*
+* @param string $url
+* @param string|int $proto PROTO_* constant
+* @return string
+*/
+   public static function convertToProtocol( $url, $proto = PROTO_RELATIVE 
) {
+   $parsed = wfParseUrl( $url );
+   unset( $parsed['scheme'] );
+   $parsed['delimiter'] = '//';
+
+   return wfExpandUrl( wfAssembleUrl( $parsed ), $proto );
+   }
+
+   /**
 * Retreives a URL for the given shortcode, or false if there's none.
 *
-* @param $shortCode String
+* @param string $shortCode
+* @param string|int $proto PROTO_* constant
 * @return String
 */
-   public static function getURL( $shortCode ) {
+   public static function getURL( $shortCode, $proto = PROTO_RELATIVE ) {
global $wgMemc;
 
$id = self::decodeId( $shortCode );
@@ -98,7 +119,8 @@
$url = $entry->usc_url;
$wgMemc->set( $memcKey, $url );
}
-   return $url;
+
+   return self::convertToProtocol( $url, $proto );
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/144345
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc78dded082c95310046235bfa4831b77dcc200d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add a label for current campaign user is browsing - change (wikimedia/iegreview)

2015-06-07 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216540

Change subject: Add a label for current campaign user is browsing
..

Add a label for current campaign user is browsing

Change-Id: Ie519c5288fcb142090e3a4add5bb2e206e3a8f2b
---
M data/templates/nav_user.html
M src/App.php
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/iegreview 
refs/changes/40/216540/1

diff --git a/data/templates/nav_user.html b/data/templates/nav_user.html
index 0096223..087a29d 100644
--- a/data/templates/nav_user.html
+++ b/data/templates/nav_user.html
@@ -47,4 +47,4 @@
 
 
 
-
+{{ campaignname }}
diff --git a/src/App.php b/src/App.php
index 1bb50c8..8eff667 100644
--- a/src/App.php
+++ b/src/App.php
@@ -392,6 +392,8 @@
'require-viewcampaign' => function ( $route ) use ( 
$slim ) {
$user = $slim->authManager->getUserId();
$campaign = $route->getParam('campaign');
+   $name = $slim->campaignsDao->getCampaign( 
$campaign )['name'];
+   $slim->view->set( 'campaignname', $name );
if ( $slim->campaignsDao->isReviewer( 
$campaign, $user ) === false ) {
// Redirect to home page
$slim->flash( 'error', 'You cannot 
access this campaign' );

-- 
To view, visit https://gerrit.wikimedia.org/r/216540
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie519c5288fcb142090e3a4add5bb2e206e3a8f2b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/iegreview
Gerrit-Branch: master
Gerrit-Owner: Niharika29 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] dumps: on dry run for streaming dumps, no compressors write ... - change (operations/dumps)

2015-06-07 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: dumps: on dry run for streaming dumps, no compressors write to 
files
..


dumps: on dry run for streaming dumps, no compressors write to files

Change-Id: I985169e2a774cca9687d30cfe2fafeda8ee576be
---
M xmldumps-backup/xmllogs.py
M xmldumps-backup/xmlstreams.py
M xmldumps-backup/xmlstubs.py
3 files changed, 9 insertions(+), 0 deletions(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/xmldumps-backup/xmllogs.py b/xmldumps-backup/xmllogs.py
index 32c8538..f9c3bc5 100644
--- a/xmldumps-backup/xmllogs.py
+++ b/xmldumps-backup/xmllogs.py
@@ -26,6 +26,9 @@
 outfiles = {'logs': {'name': outfile}}
 for filetype in outfiles:
 outfiles[filetype]['temp'] = os.path.join(wikiconf.tempDir, 
os.path.basename(outfiles[filetype]['name']) + "_tmp")
+if dryrun:
+outfiles[filetype]['compr'] = None
+else:
 outfiles[filetype]['compr'] = gzippit(outfiles[filetype]['name'])
 
 script_command = worker.MultiVersion.MWScriptAsArray(wikiconf, 
"dumpBackup.php")
diff --git a/xmldumps-backup/xmlstreams.py b/xmldumps-backup/xmlstreams.py
index 2d302ee..10420a0 100644
--- a/xmldumps-backup/xmlstreams.py
+++ b/xmldumps-backup/xmlstreams.py
@@ -74,6 +74,9 @@
 
 do_xml_piece(piece_command, outfiles, dryrun=dryrun)
 
+if dryrun:
+return
+
 for filetype in outfiles:
 outfiles[filetype]['compr'].stdin.close()
 
diff --git a/xmldumps-backup/xmlstubs.py b/xmldumps-backup/xmlstubs.py
index 768ff9a..5771c11 100644
--- a/xmldumps-backup/xmlstubs.py
+++ b/xmldumps-backup/xmlstubs.py
@@ -28,6 +28,9 @@
 'articles': {'name': articles_file}}
 for filetype in outfiles:
 outfiles[filetype]['temp'] = os.path.join(wikiconf.tempDir, 
os.path.basename(outfiles[filetype]['name']) + "_tmp")
+if dryrun:
+outfiles[filetype]['compr'] = None
+else:
 outfiles[filetype]['compr'] = gzippit(outfiles[filetype]['name'])
 
 script_command = worker.MultiVersion.MWScriptAsArray(wikiconf, 
"dumpBackup.php")

-- 
To view, visit https://gerrit.wikimedia.org/r/216539
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I985169e2a774cca9687d30cfe2fafeda8ee576be
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] dumps: on dry run for streaming dumps, no compressors write ... - change (operations/dumps)

2015-06-07 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216539

Change subject: dumps: on dry run for streaming dumps, no compressors write to 
files
..

dumps: on dry run for streaming dumps, no compressors write to files

Change-Id: I985169e2a774cca9687d30cfe2fafeda8ee576be
---
M xmldumps-backup/xmllogs.py
M xmldumps-backup/xmlstreams.py
M xmldumps-backup/xmlstubs.py
3 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/39/216539/1

diff --git a/xmldumps-backup/xmllogs.py b/xmldumps-backup/xmllogs.py
index 32c8538..f9c3bc5 100644
--- a/xmldumps-backup/xmllogs.py
+++ b/xmldumps-backup/xmllogs.py
@@ -26,6 +26,9 @@
 outfiles = {'logs': {'name': outfile}}
 for filetype in outfiles:
 outfiles[filetype]['temp'] = os.path.join(wikiconf.tempDir, 
os.path.basename(outfiles[filetype]['name']) + "_tmp")
+if dryrun:
+outfiles[filetype]['compr'] = None
+else:
 outfiles[filetype]['compr'] = gzippit(outfiles[filetype]['name'])
 
 script_command = worker.MultiVersion.MWScriptAsArray(wikiconf, 
"dumpBackup.php")
diff --git a/xmldumps-backup/xmlstreams.py b/xmldumps-backup/xmlstreams.py
index 2d302ee..10420a0 100644
--- a/xmldumps-backup/xmlstreams.py
+++ b/xmldumps-backup/xmlstreams.py
@@ -74,6 +74,9 @@
 
 do_xml_piece(piece_command, outfiles, dryrun=dryrun)
 
+if dryrun:
+return
+
 for filetype in outfiles:
 outfiles[filetype]['compr'].stdin.close()
 
diff --git a/xmldumps-backup/xmlstubs.py b/xmldumps-backup/xmlstubs.py
index 768ff9a..5771c11 100644
--- a/xmldumps-backup/xmlstubs.py
+++ b/xmldumps-backup/xmlstubs.py
@@ -28,6 +28,9 @@
 'articles': {'name': articles_file}}
 for filetype in outfiles:
 outfiles[filetype]['temp'] = os.path.join(wikiconf.tempDir, 
os.path.basename(outfiles[filetype]['name']) + "_tmp")
+if dryrun:
+outfiles[filetype]['compr'] = None
+else:
 outfiles[filetype]['compr'] = gzippit(outfiles[filetype]['name'])
 
 script_command = worker.MultiVersion.MWScriptAsArray(wikiconf, 
"dumpBackup.php")

-- 
To view, visit https://gerrit.wikimedia.org/r/216539
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I985169e2a774cca9687d30cfe2fafeda8ee576be
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: ArielGlenn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] On demand playback of animated images - change (mediawiki/core)

2015-06-07 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216538

Change subject: On demand playback of animated images
..

On demand playback of animated images

I've added a few classes to animated resources. Based on the presence
of these classes I load a very minimal player.

Right now this is only to load images that trigger:
"Due to technical limitations, thumbnails of high resolution GIF images
such as this one will not be animated."
The reason is because we already generate single frame thumbnails for
those.

Bug: T101644
Change-Id: I0e4d0f9b427bfca8e8a06eff4c3a553b73c23956
---
M includes/media/MediaTransformOutput.php
M resources/Resources.php
A resources/src/jquery/images/player_big_play_button.png
A resources/src/jquery/jquery.animationPlayer.css
A resources/src/jquery/jquery.animationPlayer.js
M resources/src/mediawiki.page/mediawiki.page.ready.js
6 files changed, 82 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/216538/1

diff --git a/includes/media/MediaTransformOutput.php 
b/includes/media/MediaTransformOutput.php
index 1dd8519..7e80f9e 100644
--- a/includes/media/MediaTransformOutput.php
+++ b/includes/media/MediaTransformOutput.php
@@ -407,6 +407,18 @@
if ( isset( $options['override-width'] ) ) {
$attribs['width'] = $options['override-width'];
}
+   if ( $this->file &&
+   !$this->fileIsSource() &&
+   $this->file->getHandler() &&
+   $this->file->getHandler()->isAnimatedImage( $this->file 
) )
+   {
+   $attribs['class'] = isset( $attribs['class'] ) ? 
$attribs['class'] . " " : "";
+   $attribs['class'] .= "animated";
+   if ( !$this->file->canAnimateThumbIfAppropriate() ) {
+   $attribs['class'] .= " paused";
+   $attribs['data-file-original'] = 
$this->file->getUrl();
+   }
+   }
 
// Additional densities for responsive images, if specified.
if ( !empty( $this->responsiveUrls ) ) {
diff --git a/resources/Resources.php b/resources/Resources.php
index 644ff9c..8d638dc 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -156,6 +156,11 @@
'messages' => array( 'brackets', 'word-separator' ),
'targets' => array( 'mobile', 'desktop' ),
),
+   'jquery.animationPlayer' => array(
+   'scripts' => 'resources/src/jquery/jquery.animationPlayer.js',
+   'styles' => 'resources/src/jquery/jquery.animationPlayer.css',
+   'targets' => array( 'desktop', 'mobile' ),
+   ),
'jquery.appear' => array(
'scripts' => 'resources/lib/jquery/jquery.appear.js',
),
diff --git a/resources/src/jquery/images/player_big_play_button.png 
b/resources/src/jquery/images/player_big_play_button.png
new file mode 100644
index 000..041fea9
--- /dev/null
+++ b/resources/src/jquery/images/player_big_play_button.png
Binary files differ
diff --git a/resources/src/jquery/jquery.animationPlayer.css 
b/resources/src/jquery/jquery.animationPlayer.css
new file mode 100644
index 000..a14dbbf
--- /dev/null
+++ b/resources/src/jquery/jquery.animationPlayer.css
@@ -0,0 +1,16 @@
+.animatedWrapper {
+   position:relative;
+}
+.animatedWrapper > .playButton {
+   position: absolute;
+   top: 0;
+   left: 0;
+   opacity: .9;
+   cursor:pointer;
+   background-image: url( images/player_big_play_button.png );
+   background-repeat: no-repeat;
+   background-position: center center;
+}
+.animatedWrapper > .playButton:hover {
+   opacity:.5;
+}
diff --git a/resources/src/jquery/jquery.animationPlayer.js 
b/resources/src/jquery/jquery.animationPlayer.js
new file mode 100644
index 000..0a7c6de
--- /dev/null
+++ b/resources/src/jquery/jquery.animationPlayer.js
@@ -0,0 +1,41 @@
+/**
+ * Simple playback system for animated GIF/PNG etc
+ *
+ * @author Derk-Jan Hartman , 2015
+ * @version 1.0.0
+ * @license MIT
+ */
+( function ( $ ) {
+
+   $.fn.extend( {
+   animationPlayer: function () {
+   var $img;
+
+   function play( $elem ) {
+   $elem.attr( 'src', $elem.data( 'file-original' 
) );
+   $elem.removeClass( 'paused' );
+   }
+
+   this.each( function () {
+   $img = $( this );
+
+   $img
+   .wrap(  $( '' ).addClass( 
'animatedWrapper' ) )
+   .after(
+   $( '' )
+  

[MediaWiki-commits] [Gerrit] Fixed wrong libmagic path - change (openzim)

2015-06-07 Thread Kelson (Code Review)
Kelson has submitted this change and it was merged.

Change subject: Fixed wrong libmagic path
..


Fixed wrong libmagic path

Change-Id: Ic7674a62530abde447252fd6c0b693a8d741443e
---
M zimwriterfs/macosx-build.sh
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Kelson: Verified; Looks good to me, approved



diff --git a/zimwriterfs/macosx-build.sh b/zimwriterfs/macosx-build.sh
index 6f2e3bc..ae38a39 100755
--- a/zimwriterfs/macosx-build.sh
+++ b/zimwriterfs/macosx-build.sh
@@ -10,10 +10,9 @@
 LIBZIM_DIR="${ZIM_DIR}/build/lib"
 LZMA_DIR="${KIWIX_ROOT}/src/dependencies/xz/build"
 LIBLZMA_DIR="${LZMA_DIR}/lib"
-MAGIC_DIR="/usr/local"
+MAGIC_DIR="/usr/local/Cellar/libmagic/5.22_1"
 LIBMAGIC_DIR="${MAGIC_DIR}/lib"
 STATIC_LDFLAGS="${LIBZIM_DIR}/libzim.a ${LIBLZMA_DIR}/liblzma.a 
${LIBMAGIC_DIR}/libmagic.a -lz"
-#LDFLAGS="-L${KIWIX_ROOT}/src/dependencies/zimlib-1.2/build/lib/ -lzim 
-L${KIWIX_ROOT}/src/dependencies/xz/build/lib/ -llzma 
-L/usr/local/Cellar/libmagic/5.22_1/lib/ -lmagic -lz"
 
 CC="clang -O3"
 CXX="clang++ -O3"

-- 
To view, visit https://gerrit.wikimedia.org/r/216530
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7674a62530abde447252fd6c0b693a8d741443e
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: Rgaudin 
Gerrit-Reviewer: Kelson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Allow multiple campaigns to run in parallel - change (wikimedia/iegreview)

2015-06-07 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216537

Change subject: Allow multiple campaigns to run in parallel
..

Allow multiple campaigns to run in parallel

Change-Id: Idd9265fa0bb4ebf8db453c852dd7e4812108c7c1
---
M src/Controllers/Admin/Campaign.php
M src/Controllers/Proposals/Edit.php
2 files changed, 2 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/iegreview 
refs/changes/37/216537/1

diff --git a/src/Controllers/Admin/Campaign.php 
b/src/Controllers/Admin/Campaign.php
index 6e6169e..539b47e 100644
--- a/src/Controllers/Admin/Campaign.php
+++ b/src/Controllers/Admin/Campaign.php
@@ -92,11 +92,6 @@
);
}
 
-   if ( is_numeric( $this->activeCampaign ) ) {
-   $this->flashNow( 'error',
-   $this->i18nContext->message( 
'admin-new-campaign-in-progress' )
-   );
-   }
} else {
$campaign = $this->dao->getCampaign( $id );
$currentReviewers = $this->dao->getReviewers( $id );
@@ -162,11 +157,7 @@
$questionFooters = $this->form->get( 'qfooters' );
$questionReportHeads = $this->form->get( 'qreporthead' 
);
 
-   if ( $id == 'new' && $this->dao->activeCampaign() ) {
-   $this->flash( 'error',
-   $this->i18nContext->message( 
'admin-new-campaign-in-progress' )
-   );
-   } elseif ( $id == 'new' ) {
+   if ( $id == 'new' ) {
// This is a temporary fix to make the *just 
started* campaign
// active and bypass the actual start and end 
date to be fixed
// in a subsequent patch when actual logic for 
using start and
diff --git a/src/Controllers/Proposals/Edit.php 
b/src/Controllers/Proposals/Edit.php
index 3d0dfc5..f8e7eed 100644
--- a/src/Controllers/Proposals/Edit.php
+++ b/src/Controllers/Proposals/Edit.php
@@ -69,7 +69,7 @@
'default' => $defaults['notes'],
) );
 
-   $this->form->requireInArray( 'status',
+   $this->form->expectInArray( 'status',
array( 'open', 'abandoned', 'accepted', 'rejected' ),
array(
'default' => $defaults['status'],

-- 
To view, visit https://gerrit.wikimedia.org/r/216537
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd9265fa0bb4ebf8db453c852dd7e4812108c7c1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/iegreview
Gerrit-Branch: master
Gerrit-Owner: Niharika29 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] "Amir Sarabadani" is already there, removing "Ladsgroup" - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: "Amir Sarabadani" is already there, removing "Ladsgroup"
..


"Amir Sarabadani" is already there, removing "Ladsgroup"

Change-Id: I6f190bc7ca591b6384b666f1d4fea51bf093ca41
---
M CREDITS
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CREDITS b/CREDITS
index 714ca0f..86ca30b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -41,7 +41,6 @@
 Karl Eichwalder
 Kim Bruning
 Kunal Mehta
-Ladsgroup
 Leonardo Gregianin
 Lewis Cawte
 Linedwell

-- 
To view, visit https://gerrit.wikimedia.org/r/216536
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f190bc7ca591b6384b666f1d4fea51bf093ca41
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] "Amir Sarabadani" is already there, removing "Ladsgroup" - change (pywikibot/core)

2015-06-07 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216536

Change subject: "Amir Sarabadani" is already there, removing "Ladsgroup"
..

"Amir Sarabadani" is already there, removing "Ladsgroup"

Change-Id: I6f190bc7ca591b6384b666f1d4fea51bf093ca41
---
M CREDITS
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/36/216536/1

diff --git a/CREDITS b/CREDITS
index 714ca0f..86ca30b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -41,7 +41,6 @@
 Karl Eichwalder
 Kim Bruning
 Kunal Mehta
-Ladsgroup
 Leonardo Gregianin
 Lewis Cawte
 Linedwell

-- 
To view, visit https://gerrit.wikimedia.org/r/216536
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f190bc7ca591b6384b666f1d4fea51bf093ca41
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WikibasePage.get: Do not pass *args into *props - change (pywikibot/core)

2015-06-07 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216535

Change subject: WikibasePage.get: Do not pass *args into *props
..

WikibasePage.get: Do not pass *args into *props

Continues 5cee93bb

Bug: T68120
Change-Id: I95c86b5b67bede3ca9d19beb479a9649e5ea699e
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/35/216535/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 16a69d0..d6e5ba7 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3176,7 +3176,7 @@
 if not identification:
 raise pywikibot.NoPage(self)
 
-data = self.repo.loadcontent(identification, *args)
+data = self.repo.loadcontent(identification)
 item_index = list(data.keys())[0]
 if lazy_loading_id or item_index != '-1':
 self.id = item_index

-- 
To view, visit https://gerrit.wikimedia.org/r/216535
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95c86b5b67bede3ca9d19beb479a9649e5ea699e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [doc] Add FileInfo to the list of included objects. - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [doc] Add FileInfo to the list of included objects.
..


[doc] Add FileInfo to the list of included objects.

Also sort list by class occurence.

Change-Id: I96ea48976c8c02d08b67f9d3383b5f811986dbb6
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 16a69d0..f89a1d9 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3,10 +3,11 @@
 Objects representing various types of MediaWiki, including Wikibase, pages.
 
 This module also includes objects:
-* Link: an internal or interwiki link in wikitext.
-* Revision: a single change to a wiki page.
 * Property: a type of semantic data.
 * Claim: an instance of a semantic assertion.
+* Revision: a single change to a wiki page.
+* FileInfo: a structure holding imageinfo of latest rev. of FilePage
+* Link: an internal or interwiki link in wikitext.
 
 """
 #

-- 
To view, visit https://gerrit.wikimedia.org/r/216522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I96ea48976c8c02d08b67f9d3383b5f811986dbb6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: XZise 
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 namespaces and special pages for Northern Luri (lrc) ... - change (mediawiki/core)

2015-06-07 Thread Mjbmr (Code Review)
Mjbmr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216534

Change subject: Update namespaces and special pages for Northern Luri (lrc) 
from translatewiki
..

Update namespaces and special pages for Northern Luri (lrc) from translatewiki

See:
* https://translatewiki.net/wiki/MediaWiki:Sp-translate-data-Namespaces/lrc
* 
https://translatewiki.net/wiki/MediaWiki:Sp-translate-data-SpecialPageAliases/lrc

Change-Id: Ic4cca51a5a59dfe3580b66aa9cfcee3d8e3fea4b
---
M languages/messages/MessagesLrc.php
1 file changed, 131 insertions(+), 119 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/216534/1

diff --git a/languages/messages/MessagesLrc.php 
b/languages/messages/MessagesLrc.php
index 559cfff..54c5217 100644
--- a/languages/messages/MessagesLrc.php
+++ b/languages/messages/MessagesLrc.php
@@ -1,5 +1,5 @@
 https://translatewiki.net
  *
@@ -15,13 +15,14 @@
 $rtl = true;
 
 $namespaceNames = array(
-   NS_MEDIA=> 'رسانه',
-   NS_SPECIAL  => 'ویجه',
-   NS_TALK => 'چک_چنه',
-   NS_USER => 'کارور',
-   NS_USER_TALK=> 'چک_چنه_کارور',
-   NS_PROJECT_TALK => 'چک_چنه_$1',
+   NS_MEDIA=> 'ڤارئسگأر',
+   NS_SPECIAL  => 'ڤیجە',
+   NS_TALK => 'چأک_چئنە',
+   NS_USER => 'کاریار',
+   NS_USER_TALK=> 'چأک_چئنە_کاریار',
+   NS_PROJECT_TALK => 'چأک_چئنە_$1',
NS_FILE => 'جانیا',
+<<< HEAD
NS_FILE_TALK=> 'چک_چنه_جانیا',
NS_MEDIAWIKI=> 'ویکی_رسانه',
NS_MEDIAWIKI_TALK   => 'چک_چنه_ویکی_رسانه',
@@ -31,123 +32,134 @@
NS_HELP_TALK=> 'چک_چنه_هومیاری',
NS_CATEGORY => 'دسه',
NS_CATEGORY_TALK=> 'چک_چنه_دسه',
+===
+   NS_FILE_TALK=> 'چأک_چئنە_جانیا',
+   NS_MEDIAWIKI=> 'مئدیاڤیکی',
+   NS_MEDIAWIKI_TALK   => 'چأک_چئنە_مئدیاڤیکی',
+   NS_TEMPLATE => 'چوٙأ',
+   NS_TEMPLATE_TALK=> 'چأک_چئنە_چوأ',
+   NS_HELP => 'ھومیاری',
+   NS_HELP_TALK=> 'چأک_چئنە_ھومیاری',
+   NS_CATEGORY => 'دأسە',
+   NS_CATEGORY_TALK=> 'چأک_چئنە_دأسە',
+>>> c40b10b... Update namespaces and special pages for Northern Luri (lrc) 
from translatewiki
 );
 
 $namespaceAliases = array(
-   'عسگ' => NS_FILE,
-   'چک_چنه_عسگ' => NS_FILE_TALK,
+   'أسگ' => NS_FILE,
+   'چأک_چئنە_أسگ' => NS_FILE_TALK,
 );
 
 $specialPageAliases = array(
-   'Activeusers'   => array( 'کاریاریا_کنشتکار' ),
-   'Allmessages'   => array( 'همه_پیغومیا' ),
-   'AllMyUploads'  => array( 'همه_سوارکردیا_مه', 
'همه_جانیایا_مه' ),
-   'Allpages'  => array( 'همه_بلگه_یا' ),
-   'ApiHelp'   => array( 'هومیاری_آ_پی_آی' ),
-   'Ancientpages'  => array( 'بلگه_یا_دماتری' ),
-   'Badtitle'  => array( 'داسون_گن' ),
-   'Blankpage' => array( 'بلگه_حالی' ),
-   'Block' => array( 'نهاگری', 'نهاگری_آی_پی', 
'نهاگری_کاریار' ),
-   'Booksources'   => array( 'نهاگری_سرچشمه_یا' ),
-   'BrokenRedirects'   => array( 'واگردونیا_بی_سرانجوم' ),
-   'Categories'=> array( 'دسه_یا' ),
-   'ChangeEmail'   => array( 'آلشت_دئن_ایمیل' ),
-   'ChangePassword'=> array( 'آلشت_دئن_رازینه_گواردن' ),
-   'ComparePages'  => array( 'تی_یک_نیائن_بلگه_یا' ),
-   'Confirmemail'  => array( 'پشت_راس_کاری_ایمیل' ),
-   'Contributions' => array( 'هومیاری_کردنیا' ),
-   'CreateAccount' => array( 'راس_کردن_حساو' ),
-   'Deadendpages'  => array( 'بلگه_یا_بی_ویرگار' ),
-   'DeletedContributions'  => array( 'هومیاریا_پاکسا_بیه' ),
-   'Diff'  => array( 'فرخ' ),
-   'DoubleRedirects'   => array( 'واگردونیا_دو_کونه' ),
-   'EditWatchlist' => array( 'ویرایشت_سیل_برگ' ),
-   'Emailuser' => array( 'ایمیل_کاریار', 'ایمیل' ),
-   'ExpandTemplates'   => array( 'گپ_کلونکاری_چوئه_یا' ),
-   'Export'=> array( 'وه_در_دئن' ),
-   'Fewestrevisions'   => array( 'کمتری_وانئریا' ),
-   'FileDuplicateSearch'   => array( 'پی_جوری_دو_کونه_جانیا' ),
-   'Filepath'  => array( 'مسیر_جانیا' ),
-   'Import'=> array( 'وا_مین_اوردن' ),
-   'Invalidateemail'   => array( 'بی_اعتوار_کردن_ایمیل' ),
-   'JavaScriptTest'=> array( 'ازماشت_نیسسه_یا_جاوا' ),
-   'BlockList' => array( 'نهاگری_نومگه', 'نومگه_نهاگری', 
'نومگه_نهاگری_آی_پی' ),
-   'LinkSearch'=> array( 'پی_جوری_هوم_پیوند' ),
-   'Listadmins

[MediaWiki-commits] [Gerrit] Fix jshint errors - change (mediawiki...AjaxLogin)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix jshint errors
..


Fix jshint errors

Change-Id: Ib3fbe5117fcabda3885ab5d220183949a76d8966
---
M AjaxLogin.js
1 file changed, 11 insertions(+), 10 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/AjaxLogin.js b/AjaxLogin.js
index 0ee1e13..cf0b0f4 100644
--- a/AjaxLogin.js
+++ b/AjaxLogin.js
@@ -5,7 +5,8 @@
  * @author Chamindu Munasinghe 
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
-/* global mw */
+/* global mw, $, console, confirm */
+
 var AjaxLogin = function() {
this._loginPanel = null;
this._loginForm = null;
@@ -76,9 +77,9 @@
success: function( data ) {
that.requestSuccess( data, dataString, actionURL );
},
-   error: function( XMLHttpRequest, textStatus, errorThrown ) {
+   error: function() {
// TODO: add error handling here
-   if ( typeof console != 'undefined' ) {
+   if ( typeof console !== 'undefined' ) {
console.log( 'Error in AjaxLogin.js!' );
}
}
@@ -135,10 +136,8 @@
 
 /**
  * Close the AjaxLogin panel.
- *
- * @param {Event}
  */
-AjaxLogin.prototype.doClose = function( event ) {
+AjaxLogin.prototype.doClose = function() {
this._loginPanel.jqmHide();
 };
 
@@ -180,7 +179,7 @@
$( '#wpPreview' ).click();
}
} else {
-   if ( mw.config.get( 
'wgCanonicalSpecialPageName' ) == 'Userlogout' ) {
+   if ( mw.config.get( 
'wgCanonicalSpecialPageName' ) === 'Userlogout' ) {
window.location.href = mw.config.get( 
'wgServer' ) + mw.config.get( 'wgScriptPath' );
} else {
window.location.reload( true );
@@ -199,9 +198,9 @@
success: function( data ) {
that.requestSuccess( data, dataString, 
actionURL );
},
-   error: function( XMLHttpRequest, textStatus, 
errorThrown ) {
+   error: function() {
// TODO: add error handling here
-   if ( typeof console != 'undefined' ) {
+   if ( typeof console !== 'undefined' ) {
console.log( 'Error in 
AjaxLogin.js!' );
}
}
@@ -212,10 +211,12 @@
$( '#wpName1' ).value = '';
$( '#wpPassword1' ).value = '';
$( '#wpName1' ).focus();
+   break;
case 'WrongPass':
this.enableForm();
$( '#wpPassword1' ).val( '' );
$( '#wpPassword1' ).focus();
+   break;
default:
this.enableForm();
this.displayReason( data.ajaxlogin.text );
@@ -225,7 +226,7 @@
 
 $( document ).ready( function() {
if (
-   typeof mw.config.get( 'wgEnableAjaxLogin' ) != 'undefined' &&
+   typeof mw.config.get( 'wgEnableAjaxLogin' ) !== 'undefined' &&
mw.config.get( 'wgEnableAjaxLogin' )
)
{

-- 
To view, visit https://gerrit.wikimedia.org/r/216506
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3fbe5117fcabda3885ab5d220183949a76d8966
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/AjaxLogin
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
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] Update namespaces and special pages for Northern Luri (lrc) ... - change (mediawiki/core)

2015-06-07 Thread Mjbmr (Code Review)
Mjbmr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216533

Change subject: Update namespaces and special pages for Northern Luri (lrc) 
from translatewiki
..

Update namespaces and special pages for Northern Luri (lrc) from translatewiki

See:
* https://translatewiki.net/wiki/MediaWiki:Sp-translate-data-Namespaces/lrc
* 
https://translatewiki.net/wiki/MediaWiki:Sp-translate-data-SpecialPageAliases/lrc

Change-Id: Ic4cca51a5a59dfe3580b66aa9cfcee3d8e3fea4b
---
M languages/messages/MessagesLrc.php
1 file changed, 128 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/216533/1

diff --git a/languages/messages/MessagesLrc.php 
b/languages/messages/MessagesLrc.php
index afb3772..94a7a39 100644
--- a/languages/messages/MessagesLrc.php
+++ b/languages/messages/MessagesLrc.php
@@ -1,5 +1,5 @@
 https://translatewiki.net
  *
@@ -15,139 +15,139 @@
 $rtl = true;
 
 $namespaceNames = array(
-   NS_MEDIA=> 'رسانه',
-   NS_SPECIAL  => 'ویجه',
-   NS_TALK => 'چک_چنه',
-   NS_USER => 'کارور',
-   NS_USER_TALK=> 'چک_چنه_کارور',
-   NS_PROJECT_TALK => 'چک_چنه_$1',
+   NS_MEDIA=> 'ڤارئسگأر',
+   NS_SPECIAL  => 'ڤیجە',
+   NS_TALK => 'چأک_چئنە',
+   NS_USER => 'کاریار',
+   NS_USER_TALK=> 'چأک_چئنە_کاریار',
+   NS_PROJECT_TALK => 'چأک_چئنە_$1',
NS_FILE => 'جانیا',
-   NS_FILE_TALK=> 'چک_چنه_جانیا',
-   NS_MEDIAWIKI=> 'مدیاویکی',
-   NS_MEDIAWIKI_TALK   => 'چک_چنه_مدیاویکی',
-   NS_TEMPLATE => 'چوئه',
-   NS_TEMPLATE_TALK=> 'چک_چنه_چوئه',
-   NS_HELP => 'هومیاری',
-   NS_HELP_TALK=> 'چک_چنه_هومیاری',
-   NS_CATEGORY => 'دسه',
-   NS_CATEGORY_TALK=> 'چک_چنه_دسه',
+   NS_FILE_TALK=> 'چأک_چئنە_جانیا',
+   NS_MEDIAWIKI=> 'مئدیاڤیکی',
+   NS_MEDIAWIKI_TALK   => 'چأک_چئنە_مئدیاڤیکی',
+   NS_TEMPLATE => 'چوٙأ',
+   NS_TEMPLATE_TALK=> 'چأک_چئنە_چوأ',
+   NS_HELP => 'ھومیاری',
+   NS_HELP_TALK=> 'چأک_چئنە_ھومیاری',
+   NS_CATEGORY => 'دأسە',
+   NS_CATEGORY_TALK=> 'چأک_چئنە_دأسە',
 );
 
 $namespaceAliases = array(
-   'عسگ' => NS_FILE,
-   'چک_چنه_عسگ' => NS_FILE_TALK,
+   'أسگ' => NS_FILE,
+   'چأک_چئنە_أسگ' => NS_FILE_TALK,
 );
 
 $specialPageAliases = array(
-   'Activeusers'   => array( 'کاریاریا_کنشتکار' ),
-   'Allmessages'   => array( 'همه_پیغومیا' ),
-   'AllMyUploads'  => array( 'همه_سوارکردیا_مه', 
'همه_جانیایا_مه' ),
-   'Allpages'  => array( 'همه_بلگه_یا' ),
-   'ApiHelp'   => array( 'هومیاری_آ_پی_آی' ),
-   'Ancientpages'  => array( 'بلگه_یا_دماتری' ),
-   'Badtitle'  => array( 'داسون_گن' ),
-   'Blankpage' => array( 'بلگه_حالی' ),
-   'Block' => array( 'نهاگری', 'نهاگری_آی_پی', 
'نهاگری_کاریار' ),
-   'Booksources'   => array( 'نهاگری_سرچشمه_یا' ),
-   'BrokenRedirects'   => array( 'واگردونیا_بی_سرانجوم' ),
-   'Categories'=> array( 'دسه_یا' ),
-   'ChangeEmail'   => array( 'آلشت_دئن_ایمیل' ),
-   'ChangePassword'=> array( 'آلشت_دئن_رازینه_گواردن' ),
-   'ComparePages'  => array( 'تی_یک_نیائن_بلگه_یا' ),
-   'Confirmemail'  => array( 'پشت_راس_کاری_ایمیل' ),
-   'Contributions' => array( 'هومیاری_کردنیا' ),
-   'CreateAccount' => array( 'راس_کردن_حساو' ),
-   'Deadendpages'  => array( 'بلگه_یا_بی_ویرگار' ),
-   'DeletedContributions'  => array( 'هومیاریا_پاکسا_بیه' ),
-   'Diff'  => array( 'فرخ' ),
-   'DoubleRedirects'   => array( 'واگردونیا_دو_کونه' ),
-   'EditWatchlist' => array( 'ویرایشت_سیل_برگ' ),
-   'Emailuser' => array( 'ایمیل_کاریار', 'ایمیل' ),
-   'ExpandTemplates'   => array( 'گپ_کلونکاری_چوئه_یا' ),
-   'Export'=> array( 'وه_در_دئن' ),
-   'Fewestrevisions'   => array( 'کمتری_وانئریا' ),
-   'FileDuplicateSearch'   => array( 'پی_جوری_دو_کونه_جانیا' ),
-   'Filepath'  => array( 'مسیر_جانیا' ),
-   'Import'=> array( 'وا_مین_اوردن' ),
-   'Invalidateemail'   => array( 'بی_اعتوار_کردن_ایمیل' ),
-   'JavaScriptTest'=> array( 'ازماشت_نیسسه_یا_جاوا' ),
-   'BlockList' => array( 'نهاگری_نومگه', 'نومگه_نهاگری', 
'نومگه_نهاگری_آی_پی' ),
-   'LinkSearch'=> array( 'پی_جوری_هوم_پیوند' ),
-   'Listadmins'=> 

[MediaWiki-commits] [Gerrit] [bugfix] some kn messages does have wrong replacement identi... - change (pywikibot/i18n)

2015-06-07 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216532

Change subject: [bugfix] some kn messages does have wrong replacement 
identifiers
..

[bugfix] some kn messages does have wrong replacement identifiers

This caused either TypeError or KeyError if kn-wiki was used

- remove wrong messages and delete the file if there are no remaining messages
- fix some messages it it's quite easy
- also repair .py files for compat

All wrong translations where fixed or deleted at twn

Change-Id: I6a68f886543e80b9c961185a98edeefbe8176256
---
M capitalize_redirects.py
D capitalize_redirects/kn.json
M category.py
M category/kn.json
M delete.py
M delete/kn.json
M editarticle.py
D editarticle/kn.json
M featured.py
D featured/kn.json
M interwiki.py
D interwiki/kn.json
M thirdparty.py
M thirdparty/kn.json
14 files changed, 27 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/i18n 
refs/changes/32/216532/1

diff --git a/capitalize_redirects.py b/capitalize_redirects.py
index c6087bf..3291ac4 100644
--- a/capitalize_redirects.py
+++ b/capitalize_redirects.py
@@ -236,8 +236,9 @@
 'capitalize_redirects-create-redirect': u'Бот: [[%(to)s]] дегенге 
бағыттағыш бетін бастау',
 },
 # Author: Akoppad
+# Authot: Xqt
 'kn': {
-'capitalize_redirects-create-redirect': u'ರೋಬೋಟ್: [[%(ಗೆ)ರು ]] 
ಮರುನಿರ್ದೇಶನರಚಿಸಿ',
+'capitalize_redirects-create-redirect': u'ರೋಬೋಟ್: [[%(to)s]] 
ಮರುನಿರ್ದೇಶನರಚಿಸಿ',
 },
 # Author: 아라
 'ko': {
diff --git a/capitalize_redirects/kn.json b/capitalize_redirects/kn.json
deleted file mode 100644
index 7ccef54..000
--- a/capitalize_redirects/kn.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "Akoppad"
-   ]
-   },
-   "capitalize_redirects-create-redirect": "ರೋಬೋಟ್: [[%(ಗೆ)ರು ]] 
ಮರುನಿರ್ದೇಶನರಚಿಸಿ"
-}
diff --git a/category.py b/category.py
index 0a6702b..2c2d31c 100644
--- a/category.py
+++ b/category.py
@@ -1027,15 +1027,16 @@
 'category-was-moved': u'រូបូ៖ ចំណាត់ថ្នាក់ក្រុមត្រូវបានលុបចេញពី 
[[:Category:%(newcat)s|%(title)s]]',
 },
 # Author: Akoppad
+# Author: Xqt
 'kn': {
 'category-adding': u'ರೋಬೋಟ್: [[:ವರ್ಗ:%(newcat)s|%(newcat)s]] 
ವರ್ಗಗಳನ್ನು ಸೇರಿಸುವುದು',
 'category-also-in': u'(ಇದರಲ್ಲಿಯು  %(alsocat)s)',
-'category-changing': u'ರೋಬೋಟ್:%(oldcat)ಯನ್ನು % (newcat)ಗೆ 
ಬದಲಾಯಿಸುವುದು',
-'category-removing': u'ರೋಬೋಟ್:  %(oldcat) ಇಂದ ತೆಗೆದುಹಾಕಲಾಗುತ್ತಿದೆ',
+'category-changing': u'ರೋಬೋಟ್:%(oldcat)s ಯನ್ನು %(newcat)s ಗೆ 
ಬದಲಾಯಿಸುವುದು',
+'category-removing': u'ರೋಬೋಟ್:  %(oldcat)s ಇಂದ ತೆಗೆದುಹಾಕಲಾಗುತ್ತಿದೆ',
 'category-renamed': u'ರೋಬೋಟ್: %s. Authors: %s ಇಂದ ಸರಿಸಲಾಗಿದೆ',
-'category-replacing': u'ರೋಬೋಟ್: %(oldcat)ಯನ್ನು % (newcat)ಗೆ 
ಬದಲಾಯಿಸುವುದು',
-'category-section-title': u'ಮಾಜಿ %(oldcat)ನ ಪುಟದ ಇತಿಹಾಸ',
-'category-version-history': u'ರೋಬೋಟ್:   %(oldcat)ನ   ಮಾಜಿ  ಇತಿಹಾಸದ  
ಆವೃತ್ತಿಯನ್ನು ಉಳಿಸಲಾಗುತ್ತಿದೆ',
+'category-replacing': u'ರೋಬೋಟ್: %(oldcat)s ಯನ್ನು %(newcat)s ಗೆ 
ಬದಲಾಯಿಸುವುದು',
+'category-section-title': u'ಮಾಜಿ %(oldcat)s ನ ಪುಟದ ಇತಿಹಾಸ',
+'category-version-history': u'ರೋಬೋಟ್:   %(oldcat)s ನ   ಮಾಜಿ  ಇತಿಹಾಸದ  
ಆವೃತ್ತಿಯನ್ನು ಉಳಿಸಲಾಗುತ್ತಿದೆ',
 'category-was-disbanded': u'ರೋಬೋಟ್: ವರ್ಗ ವಿಸರ್ಜಿಸಲಾಯಿತು',
 'category-was-moved': u'ರೋಬೋಟ್: ವರ್ಗವನ್ನು 
[[:Category:%(newcat)s|%(title)s]]ಗೆ  ಸರಿಸಲಾಗುತ್ತಿದೆ',
 },
diff --git a/category/kn.json b/category/kn.json
index c5bc7fd..1caa998 100644
--- a/category/kn.json
+++ b/category/kn.json
@@ -6,12 +6,7 @@
},
"category-adding": "ರೋಬೋಟ್: [[:ವರ್ಗ:%(newcat)s|%(newcat)s]] ವರ್ಗಗಳನ್ನು 
ಸೇರಿಸುವುದು",
"category-also-in": "(ಇದರಲ್ಲಿಯು  %(alsocat)s)",
-   "category-changing": "ರೋಬೋಟ್:%(oldcat)ಯನ್ನು % (newcat)ಗೆ ಬದಲಾಯಿಸುವುದು",
-   "category-removing": "ರೋಬೋಟ್:  %(oldcat) ಇಂದ ತೆಗೆದುಹಾಕಲಾಗುತ್ತಿದೆ",
"category-renamed": "ರೋಬೋಟ್: %s. Authors: %s ಇಂದ ಸರಿಸಲಾಗಿದೆ",
-   "category-replacing": "ರೋಬೋಟ್: %(oldcat)ಯನ್ನು % (newcat)ಗೆ 
ಬದಲಾಯಿಸುವುದು",
-   "category-section-title": "ಮಾಜಿ %(oldcat)ನ ಪುಟದ ಇತಿಹಾಸ",
-   "category-version-history": "ರೋಬೋಟ್:   %(oldcat)ನ   ಮಾಜಿ  ಇತಿಹಾಸದ  
ಆವೃತ್ತಿಯನ್ನು ಉಳಿಸಲಾಗುತ್ತಿದೆ",
"category-was-disbanded": "ರೋಬೋಟ್: ವರ್ಗ ವಿಸರ್ಜಿಸಲಾಯಿತು",
"category-was-moved": "ರೋಬೋಟ್: ವರ್ಗವನ್ನು 
[[:Category:%(newcat)s|%(title)s]]ಗೆ  ಸರಿಸಲಾಗುತ್ತಿದೆ"
 }
diff --git a/delete.py b/delete.py
index 840f411..93d178b 100644
--- a/delete.py
+++ b/delete.py
@@ -449,12 +449,13 @@
 'delete-referring-pages': u'Бот: %(page)s бетінен сілтенетін барлық 
беттерді жоюда',
 },
 # Author: Akoppad
+# Author: Xqt
 'kn': {
-'delete-from-category': u'ರೋಬೋಟ್: % (ಪುಟ) ಗಳ ವರ್ಗದಲ್ಲಿರು ಎಲ್ಲಾ 
ಚಿತ್ರಗಳನ್ನು ಅಳಿಸಲಾಗುತ್ತಿದೆ',
+'delete-from-category': u'ರೋಬೋಟ್: %(page)s ಗಳ ವರ್ಗದಲ್ಲಿರು ಎಲ್ಲಾ 
ಚಿತ್ರಗಳನ್ನು ಅಳಿಸಲಾಗುತ್ತಿದೆ',

[MediaWiki-commits] [Gerrit] Update jquery.client.js to 2.0.0 - change (VisualEditor/VisualEditor)

2015-06-07 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216531

Change subject: Update jquery.client.js to 2.0.0
..

Update jquery.client.js to 2.0.0

* Includes detection for Microsoft edge no IE12 Browser.

Project link

* https://github.com/wikimedia/jquery-client

File link

* https://github.com/wikimedia/jquery-client/blob/v2.0.0/jquery.client.js

Change-Id: I3d6aab9687feb45e813167f6c9c08575d3710148
---
M i18n/nap.json
A lib/jquery.client/.jshintrc
M lib/jquery.client/jquery.client.js
3 files changed, 27 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/31/216531/1

diff --git a/i18n/nap.json b/i18n/nap.json
index 611c385..974c90b 100644
--- a/i18n/nap.json
+++ b/i18n/nap.json
@@ -8,6 +8,7 @@
]
},
"visualeditor": "VisualEditor",
+   "visualeditor-aliennode-tooltip": "Scusate, st'elemento pò essere 
cagnato surtanto int' 'o modo sorgente pe' mò.",
"visualeditor-align-widget-center": "Centro",
"visualeditor-align-widget-left": "Smerza",
"visualeditor-align-widget-right": "Dritta",
diff --git a/lib/jquery.client/.jshintrc b/lib/jquery.client/.jshintrc
new file mode 100644
index 000..ec5f6af
--- /dev/null
+++ b/lib/jquery.client/.jshintrc
@@ -0,0 +1,20 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "es3": true,
+   "freeze": true,
+   "latedef": true,
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+
+   // Environment
+   "browser": true,
+
+   "globals": {
+   "jQuery": false,
+   "QUnit": false
+   }
+}
diff --git a/lib/jquery.client/jquery.client.js 
b/lib/jquery.client/jquery.client.js
index 1560c7d..8257d85 100644
--- a/lib/jquery.client/jquery.client.js
+++ b/lib/jquery.client/jquery.client.js
@@ -1,5 +1,5 @@
 /*!
- * jQuery Client v1.0.0
+ * jQuery Client v2.0.0
  * https://www.mediawiki.org/wiki/JQuery_Client
  *
  * Copyright 2010-2015 jquery-client maintainers and other contributors.
@@ -182,9 +182,12 @@
version = match[1];
}
}
-   // And IE 12's different lies about not being IE
+   // And MS Edge's lies about being Chrome
+   //
+   // It's different enough from classic IE Trident engine 
that they do this
+   // to avoid getting caught by MSIE-specific browser 
sniffing.
if ( name === 'chrome' && ( match = ua.match( 
/\bedge\/([0-9\.]*)/ ) ) ) {
-   name = 'msie';
+   name = 'edge';
version = match[1];
layout = 'edge';
layoutversion = parseInt( match[1], 10 );

-- 
To view, visit https://gerrit.wikimedia.org/r/216531
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d6aab9687feb45e813167f6c9c08575d3710148
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Test save flags nocreate, recreate and onlycreate - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Test save flags nocreate, recreate and onlycreate
..


Test save flags nocreate, recreate and onlycreate

Change-Id: I1d1a65cceca31e8d97081839e2ec8cc8e49b3844
---
M tests/edit_failure_tests.py
M tests/edit_tests.py
2 files changed, 24 insertions(+), 0 deletions(-)

Approvals:
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py
index ba85bc5..112d98c 100644
--- a/tests/edit_failure_tests.py
+++ b/tests/edit_failure_tests.py
@@ -23,6 +23,8 @@
 LockedPage,
 SpamfilterError,
 OtherPageSaveError,
+NoCreateError,
+PageCreatedConflict,
 )
 from tests.aspects import unittest, TestCase, WikibaseTestCase
 
@@ -64,6 +66,22 @@
 new_text = page.get(force=True)
 self.assertEqual(old_text, new_text)
 
+def test_createonly(self):
+"""Test that Page.save with createonly fails if page exists."""
+page = pywikibot.Page(self.site, 'User:Xqt/sandbox')
+self.assertRaises(PageCreatedConflict, page.save, createonly=True)
+
+def test_nocreate(self):
+"""Test that Page.save with nocreate fails if page does not exist."""
+page = pywikibot.Page(self.site, 'User:John_Vandenberg/no_recreate')
+self.assertRaises(NoCreateError, page.save, nocreate=True)
+
+def test_no_recreate(self):
+"""Test that Page.save with recreate disabled fails if page existed."""
+page = pywikibot.Page(self.site, 'User:John_Vandenberg/no_recreate')
+self.assertRaisesRegex(OtherPageSaveError, 'Page .* doesn\'t exist',
+   page.save, recreate=False)
+
 
 class TestActionFailure(TestCase):
 
diff --git a/tests/edit_tests.py b/tests/edit_tests.py
index 7a99297..7a4cf5d 100644
--- a/tests/edit_tests.py
+++ b/tests/edit_tests.py
@@ -31,6 +31,12 @@
 user = True
 write = True
 
+def test_createonly(self):
+"""Test save with createonly enforced."""
+ts = str(time.time())
+p = pywikibot.Page(self.site, 'User:John Vandenberg/createonly/' + ts)
+p.save(createonly=True)
+
 def test_async(self):
 """Test writing to a page."""
 global called_back

-- 
To view, visit https://gerrit.wikimedia.org/r/216525
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d1a65cceca31e8d97081839e2ec8cc8e49b3844
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed wrong libmagic path - change (openzim)

2015-06-07 Thread Rgaudin (Code Review)
Rgaudin has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216530

Change subject: Fixed wrong libmagic path
..

Fixed wrong libmagic path

Change-Id: Ic7674a62530abde447252fd6c0b693a8d741443e
---
M zimwriterfs/macosx-build.sh
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/openzim refs/changes/30/216530/1

diff --git a/zimwriterfs/macosx-build.sh b/zimwriterfs/macosx-build.sh
index 6f2e3bc..ae38a39 100755
--- a/zimwriterfs/macosx-build.sh
+++ b/zimwriterfs/macosx-build.sh
@@ -10,10 +10,9 @@
 LIBZIM_DIR="${ZIM_DIR}/build/lib"
 LZMA_DIR="${KIWIX_ROOT}/src/dependencies/xz/build"
 LIBLZMA_DIR="${LZMA_DIR}/lib"
-MAGIC_DIR="/usr/local"
+MAGIC_DIR="/usr/local/Cellar/libmagic/5.22_1"
 LIBMAGIC_DIR="${MAGIC_DIR}/lib"
 STATIC_LDFLAGS="${LIBZIM_DIR}/libzim.a ${LIBLZMA_DIR}/liblzma.a 
${LIBMAGIC_DIR}/libmagic.a -lz"
-#LDFLAGS="-L${KIWIX_ROOT}/src/dependencies/zimlib-1.2/build/lib/ -lzim 
-L${KIWIX_ROOT}/src/dependencies/xz/build/lib/ -llzma 
-L/usr/local/Cellar/libmagic/5.22_1/lib/ -lmagic -lz"
 
 CC="clang -O3"
 CXX="clang++ -O3"

-- 
To view, visit https://gerrit.wikimedia.org/r/216530
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7674a62530abde447252fd6c0b693a8d741443e
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: Rgaudin 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [flake8] Remove obsolete site.pageinterwiki() method, add so... - change (pywikibot/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [flake8] Remove obsolete site.pageinterwiki() method, add some 
docstrings
..


[flake8] Remove obsolete site.pageinterwiki() method, add some docstrings

- Remove explicit unicode literals in editarticle which are no longer needed
  due to "from __future__ import unicode_literals"
- Add two files to the flake8-docstrings-mandatory section

Change-Id: I51ce5eb9827af03e491a364f87de5a6744ce1c38
---
M pywikibot/cosmetic_changes.py
M pywikibot/family.py
M pywikibot/page.py
M pywikibot/site.py
M scripts/editarticle.py
M scripts/noreferences.py
M tox.ini
7 files changed, 20 insertions(+), 12 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index bced95d..ac6c7cf 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -213,6 +213,7 @@
 @deprecate_arg('debug', 'diff')
 def __init__(self, site, diff=False, redirect=False, namespace=None,
  pageTitle=None, ignore=CANCEL_ALL):
+"""Constructor."""
 self.site = site
 self.diff = diff
 self.redirect = redirect
@@ -624,6 +625,7 @@
 return text
 
 def removeUselessSpaces(self, text):
+"""Cleanup multiple or trailing spaces."""
 multipleSpacesR = re.compile('  +')
 spaceAtLineEndR = re.compile(' $')
 exceptions = ['comment', 'math', 'nowiki', 'pre', 'startspace', 
'table',
diff --git a/pywikibot/family.py b/pywikibot/family.py
index c6566c9..1df55fe 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -46,6 +46,7 @@
 """Parent class for all wiki families."""
 
 def __init__(self):
+"""Constructor."""
 if not hasattr(self, 'name'):
 self.name = None
 
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 86290c7..ba3a58d 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1858,6 +1858,7 @@
 
 @deprecated('Page.is_flow_page()')
 def isFlowPage(self):
+"""DEPRECATED: use self.is_flow_page instead."""
 return self.is_flow_page()
 
 def is_flow_page(self):
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 2bd2c6b..f8e9c6d 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3359,10 +3359,6 @@
 raise NoPage(page)
 api.update_page(page, pagedata, rvgen.props)
 
-def pageinterwiki(self, page):
-# No such function in the API (this method isn't called anywhere)
-raise NotImplementedError
-
 def pagelanglinks(self, page, step=None, total=None,
   include_obsolete=False):
 """Iterate all interlanguage links on page, yielding Link objects.
diff --git a/scripts/editarticle.py b/scripts/editarticle.py
index db48b77..ad0b422 100755
--- a/scripts/editarticle.py
+++ b/scripts/editarticle.py
@@ -23,7 +23,7 @@
 """
 #
 # (C) Gerrit Holl, 2004
-# (C) Pywikibot team, 2004-2014
+# (C) Pywikibot team, 2004-2015
 #
 # Distributed under the terms of the MIT license.
 #
@@ -51,6 +51,7 @@
 # joinchars = string.letters + '[]' + string.digits
 
 def __init__(self, *args):
+"""Constructor."""
 self.set_options(*args)
 self.setpage()
 self.site = pywikibot.Site()
@@ -70,28 +71,31 @@
 self.options = parser.parse_args(my_args)
 
 if self.options.page and self.options.wikipage:
-pywikibot.error(u"Multiple pages passed. Please specify a single 
page to edit.")
+pywikibot.error("Multiple pages passed. Please specify a single "
+"page to edit.")
 sys.exit(1)
 self.options.page = self.options.page or self.options.wikipage
 
 def setpage(self):
 """Set page and page title."""
 site = pywikibot.Site()
-pageTitle = self.options.page or pywikibot.input(u"Page to edit:")
+pageTitle = self.options.page or pywikibot.input("Page to edit:")
 self.page = pywikibot.Page(pywikibot.Link(pageTitle, site))
 if not self.options.edit_redirect and self.page.isRedirectPage():
 self.page = self.page.getRedirectTarget()
 
 def handle_edit_conflict(self, new):
+"""When an edit conflict occures save the new text to a file."""
 fn = os.path.join(tempfile.gettempdir(), self.page.title())
 fp = open(fn, 'w')
 fp.write(new)
 fp.close()
 pywikibot.output(
-u"An edit conflict has arisen. Your edit has been saved to %s. 
Please try again."
-% fn)
+"An edit conflict has arisen. Your edit has been saved to %s. "
+"Please try again." % fn)
 
 def run(self):
+"""Run the bot."""
 self.site.login()
 try:
 old = self.page.get(get_redirect=self.options.edit_redirect

[MediaWiki-commits] [Gerrit] Update json2 to revision 2015-05-03 - change (mediawiki/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update json2 to revision 2015-05-03
..


Update json2 to revision 2015-05-03

Project link

* https://github.com/douglascrockford/JSON-js

File link

* https://github.com/douglascrockford/JSON-js/blob/c98948ae19/json2.js

Change-Id: Ifeb41140c13718162d1c0bd7a5a815acaf7bfd56
---
M RELEASE-NOTES-1.26
M resources/lib/json2/json2.js
2 files changed, 79 insertions(+), 48 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26
index 86bb696..5312723 100644
--- a/RELEASE-NOTES-1.26
+++ b/RELEASE-NOTES-1.26
@@ -21,6 +21,7 @@
 
  External libraries 
 * Update es5-shim from v4.0.0 to v4.1.5.
+* Update json2 from revision 2014-02-04 to 2015-05-03.
 
 === Bug fixes in 1.26 ===
 * (bug 51283) load.php sometimes sends 304 response without full headers
diff --git a/resources/lib/json2/json2.js b/resources/lib/json2/json2.js
index deb88ec..5838457 100644
--- a/resources/lib/json2/json2.js
+++ b/resources/lib/json2/json2.js
@@ -1,6 +1,6 @@
 /*
 json2.js
-2014-02-04
+2015-05-03
 
 Public Domain.
 
@@ -17,7 +17,9 @@
 
 
 This file creates a global JSON object containing two methods: stringify
-and parse.
+and parse. This file is provides the ES5 JSON capability to ES3 systems.
+If a project might run on IE8 or earlier, then this file should be 
included.
+This file does nothing on ES5 systems.
 
 JSON.stringify(value, replacer, space)
 value   any JavaScript value, usually an object or array.
@@ -48,7 +50,9 @@
 Date.prototype.toJSON = function (key) {
 function f(n) {
 // Format integers to have at least two digits.
-return n < 10 ? '0' + n : n;
+return n < 10 
+? '0' + n 
+: n;
 }
 
 return this.getUTCFullYear()   + '-' +
@@ -94,8 +98,9 @@
 // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
 
 text = JSON.stringify([new Date()], function (key, value) {
-return this[key] instanceof Date ?
-'Date(' + this[key] + ')' : value;
+return this[key] instanceof Date 
+? 'Date(' + this[key] + ')' 
+: value;
 });
 // text is '["Date(---current time---)"]'
 
@@ -146,10 +151,12 @@
 redistribute.
 */
 
-/*jslint evil: true, regexp: true */
+/*jslint 
+eval, for, this 
+*/
 
-/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
-call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+/*property
+JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
 getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
 lastIndex, length, parse, prototype, push, replace, slice, stringify,
 test, toJSON, toString, valueOf
@@ -165,10 +172,23 @@
 
 (function () {
 'use strict';
+
+var rx_one = /^[\],:{}\s]*$/,
+rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+rx_three = 
/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+rx_four = /(?:^|:|,)(?:\s*\[)+/g,
+rx_escapable = 
/[\\\"\u-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\u]/g,
+rx_dangerous = 
/[\u\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\u]/g;
 
 function f(n) {
 // Format integers to have at least two digits.
-return n < 10 ? '0' + n : n;
+return n < 10 
+? '0' + n 
+: n;
+}
+
+function this_value() {
+return this.valueOf();
 }
 
 if (typeof Date.prototype.toJSON !== 'function') {
@@ -176,25 +196,21 @@
 Date.prototype.toJSON = function () {
 
 return isFinite(this.valueOf())
-? this.getUTCFullYear() + '-' +
-f(this.getUTCMonth() + 1) + '-' +
-f(this.getUTCDate())  + 'T' +
-f(this.getUTCHours()) + ':' +
-f(this.getUTCMinutes())   + ':' +
-f(this.getUTCSeconds())   + 'Z'
+? this.getUTCFullYear() + '-' +
+f(this.getUTCMonth() + 1) + '-' +
+f(this.getUTCDate()) + 'T' +
+f(this.getUTCHours()) + ':' +
+f(this.getUTCMinutes()) + ':' +
+f(this.getUTCSeconds()) + 'Z'
 : null;
 };
 
-String.prototype.toJSON  =
-Number.prototype.toJSON  =
-Boolean.prototype.toJSON = function () {
-   

[MediaWiki-commits] [Gerrit] Update es5-shim to v4.1.5 - change (mediawiki/core)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update es5-shim to v4.1.5
..


Update es5-shim to v4.1.5

Project site

* https://github.com/es-shims/es5-shim

File source

* https://github.com/es-shims/es5-shim/tree/v4.1.5

Changelog

* https://github.com/es-shims/es5-shim/blob/v4.1.5/CHANGES

Change-Id: I21ecf04e7ba82d4bd726ce9b5e84eac1046914c0
---
M RELEASE-NOTES-1.26
M resources/lib/es5-shim/es5-shim.js
2 files changed, 407 insertions(+), 376 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26
index 2b54e0a..86bb696 100644
--- a/RELEASE-NOTES-1.26
+++ b/RELEASE-NOTES-1.26
@@ -20,6 +20,7 @@
 * Added a new hook, 'LogException', to log exceptions in nonstandard ways.
 
  External libraries 
+* Update es5-shim from v4.0.0 to v4.1.5.
 
 === Bug fixes in 1.26 ===
 * (bug 51283) load.php sometimes sends 304 response without full headers
diff --git a/resources/lib/es5-shim/es5-shim.js 
b/resources/lib/es5-shim/es5-shim.js
index 4595994..85f51e2 100644
--- a/resources/lib/es5-shim/es5-shim.js
+++ b/resources/lib/es5-shim/es5-shim.js
@@ -1,17 +1,20 @@
 /*!
  * https://github.com/es-shims/es5-shim
- * @license es5-shim Copyright 2009-2014 by contributors, MIT License
+ * @license es5-shim Copyright 2009-2015 by contributors, MIT License
  * see https://github.com/es-shims/es5-shim/blob/master/LICENSE
  */
 
 // vim: ts=4 sts=4 sw=4 expandtab
 
-//Add semicolon to prevent IIFE from being passed as argument to concated code.
+// Add semicolon to prevent IIFE from being passed as argument to concatenated 
code.
 ;
 
 // UMD (Universal Module Definition)
 // see https://github.com/umdjs/umd/blob/master/returnExports.js
 (function (root, factory) {
+'use strict';
+
+/*global define, exports, module */
 if (typeof define === 'function' && define.amd) {
 // AMD. Register as an anonymous module.
 define(factory);
@@ -42,140 +45,144 @@
 var FunctionPrototype = Function.prototype;
 var StringPrototype = String.prototype;
 var NumberPrototype = Number.prototype;
-var _Array_slice_ = ArrayPrototype.slice;
+var array_slice = ArrayPrototype.slice;
 var array_splice = ArrayPrototype.splice;
 var array_push = ArrayPrototype.push;
 var array_unshift = ArrayPrototype.unshift;
+var array_concat = ArrayPrototype.concat;
 var call = FunctionPrototype.call;
 
-// Having a toString local variable name breaks in Opera so use _toString.
-var _toString = ObjectPrototype.toString;
+// Having a toString local variable name breaks in Opera so use to_string.
+var to_string = ObjectPrototype.toString;
 
-var isFunction = function (val) {
-return ObjectPrototype.toString.call(val) === '[object Function]';
+var isArray = Array.isArray || function isArray(obj) {
+return to_string.call(obj) === '[object Array]';
 };
-var isRegex = function (val) {
-return ObjectPrototype.toString.call(val) === '[object RegExp]';
-};
-var isArray = function isArray(obj) {
-return _toString.call(obj) === "[object Array]";
-};
-var isString = function isString(obj) {
-return _toString.call(obj) === "[object String]";
-};
+
+var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag 
=== 'symbol';
+var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = 
Function.prototype.toString, tryFunctionObject = function 
tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) 
{ return false; } }, fnClass = '[object Function]', genClass = '[object 
GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value 
!== 'function') { return false; } if (hasToStringTag) { return 
tryFunctionObject(value); } var strClass = to_string.call(value); return 
strClass === fnClass || strClass === genClass; };
+var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = 
RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { 
regexExec.call(value); return true; } catch (e) { return false; } }, regexClass 
= '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 
'object') { return false; } return hasToStringTag ? tryRegexExec(value) : 
to_string.call(value) === regexClass; };
+var isString; /* inlined from https://npmjs.com/is-string */ var strValue = 
String.prototype.valueOf, tryStringObject = function tryStringObject(value) { 
try { strValue.call(value); return true; } catch (e) { return false; } }, 
stringClass = '[object String]'; isString = function isString(value) { if 
(typeof value === 'string') { return true; } if (typeof value !== 'object') { 
return false; } return hasToStringTag ? tryStringObject(value) : 
to_string.call(value) === stringClass; };
+
 var isArguments = function isArguments(value) {
-var str = _toString.call(value);
+var str = to_string.call(value);
 var isArgs = str === '[object

[MediaWiki-commits] [Gerrit] Allow all action=edit optional arguments - change (pywikibot/core)

2015-06-07 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216529

Change subject: Allow all action=edit optional arguments
..

Allow all action=edit optional arguments

Bug: T57054
Change-Id: I460b2c0aa45b2d65effcb2420986ef4118973197
---
M pywikibot/site.py
M tests/edit_tests.py
2 files changed, 58 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/29/216529/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 95960b6..688df52 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4192,16 +4192,18 @@
 "protectedtitle": LockedNoPage,
 "cascadeprotected": CascadeLockedPage,
 }
+_ep_text_overrides = set(['appendtext', 'prependtext', 'undo'])
 
 @must_be(group='user')
-def editpage(self, page, summary, minor=True, notminor=False,
+def editpage(self, page, summary=None, minor=True, notminor=False,
  bot=True, recreate=True, createonly=False, nocreate=False,
- watch=None):
-"""Submit an edited Page object to be saved to the wiki.
+ watch=None, **kwargs):
+"""Submit an edit to be saved to the wiki.
 
-@param page: The Page to be saved; its .text property will be used
+@param page: The Page to be saved.
+By default its .text property will be used
 as the new text to be saved to the wiki
-@param summary: the edit summary (required!)
+@param summary: the edit summary
 @param minor: if True (default), mark edit as minor
 @param notminor: if True, override account preferences to mark edit
 as non-minor
@@ -4218,31 +4220,59 @@
 * preferences: use the preference settings (default)
 * nochange: don't change the watchlist
 @param bot: if True, mark edit with bot flag
+@kwarg text: Overrides Page.text
+@type text: unicode
+@kwarg section: Edit an existing or new section
+@type section: int or str('new')
+@kwarg prependtext: Prepend text. Overrides Page.text
+@type text: unicode
+@kwarg appendtext: Append text. Overrides Page.text.
+@type text: unicode
+@kwarg undo: Revision id to undo. Overrides Page.text
+@type undo: int
 @return: True if edit succeeded, False if it failed
-
+@raises Error: No text to be saved
+@raises NoPage: recreate is disabled and page does not exist
 """
-text = page.text
-if text is None:
-raise Error("editpage: no text to be saved")
-try:
-lastrev = page.latest_revision
-except NoPage:
-lastrev = None
-if not recreate:
-raise
+basetimestamp = True
+if 'text' in kwargs:
+text = kwargs.pop('text')
+if 'section' in kwargs and kwargs['section'] == 'new':
+basetimestamp = False
+elif 'section' in kwargs:
+raise AssertionError('parameter text must be used with section')
+elif self._ep_text_overrides.intersection(
+kwargs.keys()):
+text = None
+basetimestamp = False
+else:
+text = page.text
+if text is None:
+raise Error("editpage: no text to be saved")
+
+if basetimestamp or not recreate:
+try:
+lastrev = page.latest_revision
+basetimestamp = lastrev.timestamp
+except NoPage:
+basetimestamp = False
+if not recreate:
+raise
+
 token = self.tokens['edit']
 if bot is None:
 bot = ("bot" in self.userinfo["rights"])
 self.lock_page(page)
 params = dict(action="edit",
-  title=page.title(withSection=False),
-  text=text, token=token, summary=summary, bot=bot,
+  text=text, title=page.title(withSection=False),
+  token=token, summary=summary, bot=bot,
   recreate=recreate, createonly=createonly,
   nocreate=nocreate, minor=minor,
-  notminor=not minor and notminor)
+  notminor=not minor and notminor,
+  **kwargs)
 
-if lastrev is not None:
-params['basetimestamp'] = lastrev.timestamp
+if basetimestamp and 'basetimestamp' not in kwargs:
+params['basetimestamp'] = basetimestamp
 
 watch_items = set(["watch", "unwatch", "preferences", "nochange"])
 if watch in watch_items:
diff --git a/tests/edit_tests.py b/tests/edit_tests.py
index 7a99297..893e824 100644
--- a/tests/edit_tests.py
+++ b/tests/edit_tests.py
@@ -54,6 +54,14 @@
 self.assertEqual(p.text, ts)
 self.ass

[MediaWiki-commits] [Gerrit] Rename to toollabs.webservice from tools.webservice - change (operations...tools-webservice)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rename to toollabs.webservice from tools.webservice
..


Rename to toollabs.webservice from tools.webservice

tools was way too generic

Change-Id: I15138c8a378574248075e9d5e9b01ec8fdcdb55a
---
M debian/changelog
M debian/control
M scripts/webservice-new
M scripts/webservice-runner
M setup.py
R toollabs/__init__.py
A toollabs/common/__init__.py
R toollabs/common/tool.py
R toollabs/common/utils.py
R toollabs/webservice/__init__.py
R toollabs/webservice/proxy.py
A toollabs/webservice/services/__init__.py
R toollabs/webservice/services/genericwebservice.py
R toollabs/webservice/services/jswebservice.py
R toollabs/webservice/services/lighttpdwebservice.py
R toollabs/webservice/services/pythonwebservice.py
R toollabs/webservice/webservice.py
R toollabs/webservice/webservicejob.py
D tools/common/__init__.py
D tools/webservice/services/__init__.py
20 files changed, 28 insertions(+), 28 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/debian/changelog b/debian/changelog
index be8a97b..40c2a35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-tools-webservice (0.1) trusty; urgency=low
+toollabs-webservice (0.1) trusty; urgency=low
 
   * Initial version
 
diff --git a/debian/control b/debian/control
index b41b4f3..9ac23cf 100644
--- a/debian/control
+++ b/debian/control
@@ -1,11 +1,11 @@
-Source: tools-webservice
+Source: toollabs-webservice
 Maintainer: Yuvi Panda 
 Section: python
 Priority: optional
 Build-Depends: python-setuptools, python-all, debhelper (>= 9)
 Standards-Version: 3.9.5
 
-Package: tools-webservice
+Package: toollabs-webservice
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}
 Description: Infrastructure for running webservices on tools.wmflabs.org
diff --git a/scripts/webservice-new b/scripts/webservice-new
index 98337d3..95a2f35 100755
--- a/scripts/webservice-new
+++ b/scripts/webservice-new
@@ -3,10 +3,10 @@
 import argparse
 import sys
 
-from tools.webservice import WebServiceJob, WebService
-from tools.webservice.services import webservice_classes
-from tools.common.utils import wait_for
-from tools.common import Tool
+from toollabs.webservice import WebServiceJob, WebService
+from toollabs.webservice.services import webservice_classes
+from toollabs.common.utils import wait_for
+from toollabs.common import Tool
 
 
 argparser = argparse.ArgumentParser()
diff --git a/scripts/webservice-runner b/scripts/webservice-runner
index f8d288d..1fd6415 100755
--- a/scripts/webservice-runner
+++ b/scripts/webservice-runner
@@ -1,9 +1,9 @@
 #!/usr/bin/python
 import argparse
 
-from tools.common import Tool
-from tools.webservice import proxy
-from tools.webservice.services import webservice_classes
+from toollabs.common import Tool
+from toollabs.webservice import proxy
+from toollabs.webservice.services import webservice_classes
 
 argparser = argparse.ArgumentParser()
 argparser.add_argument('--type', help='Type of webservice to start',
diff --git a/setup.py b/setup.py
index 444af75..d91c81e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 setup(
-name='tools-webservice',
+name='toollabs-webservice',
 version='0.1',
 author='Yuvi Panda',
 author_email='yuvipa...@gmail.com',
diff --git a/tools/__init__.py b/toollabs/__init__.py
similarity index 100%
rename from tools/__init__.py
rename to toollabs/__init__.py
diff --git a/toollabs/common/__init__.py b/toollabs/common/__init__.py
new file mode 100644
index 000..da20ee5
--- /dev/null
+++ b/toollabs/common/__init__.py
@@ -0,0 +1,3 @@
+from toollabs.common.tool import Tool
+
+__all__ = [Tool]
diff --git a/tools/common/tool.py b/toollabs/common/tool.py
similarity index 100%
rename from tools/common/tool.py
rename to toollabs/common/tool.py
diff --git a/tools/common/utils.py b/toollabs/common/utils.py
similarity index 100%
rename from tools/common/utils.py
rename to toollabs/common/utils.py
diff --git a/tools/webservice/__init__.py b/toollabs/webservice/__init__.py
similarity index 100%
rename from tools/webservice/__init__.py
rename to toollabs/webservice/__init__.py
diff --git a/tools/webservice/proxy.py b/toollabs/webservice/proxy.py
similarity index 100%
rename from tools/webservice/proxy.py
rename to toollabs/webservice/proxy.py
diff --git a/toollabs/webservice/services/__init__.py 
b/toollabs/webservice/services/__init__.py
new file mode 100644
index 000..7389b2c
--- /dev/null
+++ b/toollabs/webservice/services/__init__.py
@@ -0,0 +1,10 @@
+from toollabs.webservice.services.jswebservice import JSWebService
+from toollabs.webservice.services.genericwebservice import GenericWebService
+from toollabs.webservice.services.pythonwebservice import PythonWebService
+from toollabs.webservice.services.lighttpdwebservice import 
LighttpdPlainWe

[MediaWiki-commits] [Gerrit] Explicitly handle 'stop' in update_manifest for generic webs... - change (operations...tools-webservice)

2015-06-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Explicitly handle 'stop' in update_manifest for generic 
webservice
..


Explicitly handle 'stop' in update_manifest for generic webservice

Change-Id: I70d4ee085fe2fd19d2afac18fd275008e2bdb65a
---
M toollabs/webservice/services/genericwebservice.py
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/toollabs/webservice/services/genericwebservice.py 
b/toollabs/webservice/services/genericwebservice.py
index a556135..a794ab4 100644
--- a/toollabs/webservice/services/genericwebservice.py
+++ b/toollabs/webservice/services/genericwebservice.py
@@ -26,7 +26,9 @@
 self.tool.manifest['webservice-command'] != 
self.extra_args:
 self.tool.manifest['webservice-command'] = self.extra_args
 self.tool.save_manifest()
-else:
+elif type == 'stop':
 if 'webservice-command' in self.tool.manifest:
 del self.tool.manifest['webservice-command']
 self.tool.save_manifest()
+else:
+raise Exception("type has to be 'start' or 'stop', got %s" % type)

-- 
To view, visit https://gerrit.wikimedia.org/r/216528
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I70d4ee085fe2fd19d2afac18fd275008e2bdb65a
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-webservice
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Explicitly handle 'stop' in update_manifest for generic webs... - change (operations...tools-webservice)

2015-06-07 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216528

Change subject: Explicitly handle 'stop' in update_manifest for generic 
webservice
..

Explicitly handle 'stop' in update_manifest for generic webservice

Change-Id: I70d4ee085fe2fd19d2afac18fd275008e2bdb65a
---
M toollabs/webservice/services/genericwebservice.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/tools-webservice 
refs/changes/28/216528/1

diff --git a/toollabs/webservice/services/genericwebservice.py 
b/toollabs/webservice/services/genericwebservice.py
index a556135..a794ab4 100644
--- a/toollabs/webservice/services/genericwebservice.py
+++ b/toollabs/webservice/services/genericwebservice.py
@@ -26,7 +26,9 @@
 self.tool.manifest['webservice-command'] != 
self.extra_args:
 self.tool.manifest['webservice-command'] = self.extra_args
 self.tool.save_manifest()
-else:
+elif type == 'stop':
 if 'webservice-command' in self.tool.manifest:
 del self.tool.manifest['webservice-command']
 self.tool.save_manifest()
+else:
+raise Exception("type has to be 'start' or 'stop', got %s" % type)

-- 
To view, visit https://gerrit.wikimedia.org/r/216528
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70d4ee085fe2fd19d2afac18fd275008e2bdb65a
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-webservice
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Rename to toollabs.webservice from tools.webservice - change (operations...tools-webservice)

2015-06-07 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216527

Change subject: Rename to toollabs.webservice from tools.webservice
..

Rename to toollabs.webservice from tools.webservice

tools was way too generic

Change-Id: I15138c8a378574248075e9d5e9b01ec8fdcdb55a
---
M debian/changelog
M debian/control
M scripts/webservice-new
M scripts/webservice-runner
M setup.py
R toollabs/__init__.py
A toollabs/common/__init__.py
R toollabs/common/tool.py
R toollabs/common/utils.py
R toollabs/webservice/__init__.py
R toollabs/webservice/proxy.py
A toollabs/webservice/services/__init__.py
R toollabs/webservice/services/genericwebservice.py
R toollabs/webservice/services/jswebservice.py
R toollabs/webservice/services/lighttpdwebservice.py
R toollabs/webservice/services/pythonwebservice.py
R toollabs/webservice/webservice.py
R toollabs/webservice/webservicejob.py
D tools/common/__init__.py
D tools/webservice/services/__init__.py
20 files changed, 28 insertions(+), 28 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/tools-webservice 
refs/changes/27/216527/1

diff --git a/debian/changelog b/debian/changelog
index be8a97b..40c2a35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-tools-webservice (0.1) trusty; urgency=low
+toollabs-webservice (0.1) trusty; urgency=low
 
   * Initial version
 
diff --git a/debian/control b/debian/control
index b41b4f3..9ac23cf 100644
--- a/debian/control
+++ b/debian/control
@@ -1,11 +1,11 @@
-Source: tools-webservice
+Source: toollabs-webservice
 Maintainer: Yuvi Panda 
 Section: python
 Priority: optional
 Build-Depends: python-setuptools, python-all, debhelper (>= 9)
 Standards-Version: 3.9.5
 
-Package: tools-webservice
+Package: toollabs-webservice
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}
 Description: Infrastructure for running webservices on tools.wmflabs.org
diff --git a/scripts/webservice-new b/scripts/webservice-new
index 98337d3..95a2f35 100755
--- a/scripts/webservice-new
+++ b/scripts/webservice-new
@@ -3,10 +3,10 @@
 import argparse
 import sys
 
-from tools.webservice import WebServiceJob, WebService
-from tools.webservice.services import webservice_classes
-from tools.common.utils import wait_for
-from tools.common import Tool
+from toollabs.webservice import WebServiceJob, WebService
+from toollabs.webservice.services import webservice_classes
+from toollabs.common.utils import wait_for
+from toollabs.common import Tool
 
 
 argparser = argparse.ArgumentParser()
diff --git a/scripts/webservice-runner b/scripts/webservice-runner
index f8d288d..1fd6415 100755
--- a/scripts/webservice-runner
+++ b/scripts/webservice-runner
@@ -1,9 +1,9 @@
 #!/usr/bin/python
 import argparse
 
-from tools.common import Tool
-from tools.webservice import proxy
-from tools.webservice.services import webservice_classes
+from toollabs.common import Tool
+from toollabs.webservice import proxy
+from toollabs.webservice.services import webservice_classes
 
 argparser = argparse.ArgumentParser()
 argparser.add_argument('--type', help='Type of webservice to start',
diff --git a/setup.py b/setup.py
index 444af75..d91c81e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 setup(
-name='tools-webservice',
+name='toollabs-webservice',
 version='0.1',
 author='Yuvi Panda',
 author_email='yuvipa...@gmail.com',
diff --git a/tools/__init__.py b/toollabs/__init__.py
similarity index 100%
rename from tools/__init__.py
rename to toollabs/__init__.py
diff --git a/toollabs/common/__init__.py b/toollabs/common/__init__.py
new file mode 100644
index 000..da20ee5
--- /dev/null
+++ b/toollabs/common/__init__.py
@@ -0,0 +1,3 @@
+from toollabs.common.tool import Tool
+
+__all__ = [Tool]
diff --git a/tools/common/tool.py b/toollabs/common/tool.py
similarity index 100%
rename from tools/common/tool.py
rename to toollabs/common/tool.py
diff --git a/tools/common/utils.py b/toollabs/common/utils.py
similarity index 100%
rename from tools/common/utils.py
rename to toollabs/common/utils.py
diff --git a/tools/webservice/__init__.py b/toollabs/webservice/__init__.py
similarity index 100%
rename from tools/webservice/__init__.py
rename to toollabs/webservice/__init__.py
diff --git a/tools/webservice/proxy.py b/toollabs/webservice/proxy.py
similarity index 100%
rename from tools/webservice/proxy.py
rename to toollabs/webservice/proxy.py
diff --git a/toollabs/webservice/services/__init__.py 
b/toollabs/webservice/services/__init__.py
new file mode 100644
index 000..7389b2c
--- /dev/null
+++ b/toollabs/webservice/services/__init__.py
@@ -0,0 +1,10 @@
+from toollabs.webservice.services.jswebservice import JSWebService
+from toollabs.webservice.services.genericwebservice import GenericWebService
+from toollabs.webservice.services.pythonwebservice import PythonWebService
+from toollabs.webser

[MediaWiki-commits] [Gerrit] Modify oozie lancher default parameters - change (analytics/refinery)

2015-06-07 Thread Joal (Code Review)
Joal has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216526

Change subject: Modify oozie lancher default parameters
..

Modify oozie lancher default parameters

Default parameters for oozie launcher were defined in xml files, now defined in 
properties files.
Oozie_launcher_queue_name and queue_name now default to production, and 
oozie_launcher_memory to 256.

Change-Id: I95db8c0a0a0085920c0af13f7889ed8f3fe11d2a
---
M oozie/mediacounts/archive/coordinator.properties
M oozie/mediacounts/archive/coordinator.xml
M oozie/mediacounts/archive/workflow.xml
M oozie/mediacounts/load/coordinator.properties
M oozie/mediacounts/load/coordinator.xml
M oozie/mediacounts/load/workflow.xml
M oozie/mobile_apps/uniques/daily/coordinator.properties
M oozie/mobile_apps/uniques/daily/coordinator.xml
M oozie/mobile_apps/uniques/daily/workflow.xml
M oozie/mobile_apps/uniques/monthly/coordinator.properties
M oozie/mobile_apps/uniques/monthly/coordinator.xml
M oozie/mobile_apps/uniques/monthly/workflow.xml
M oozie/pagecounts-all-sites/archive/bundle.properties
M oozie/pagecounts-all-sites/archive/bundle.xml
M oozie/pagecounts-all-sites/archive/coordinator.xml
M oozie/pagecounts-all-sites/archive/workflow.xml
M oozie/pagecounts-all-sites/load/coordinator.properties
M oozie/pagecounts-all-sites/load/coordinator.xml
M oozie/pagecounts-all-sites/load/workflow.xml
M oozie/util/archive_job_output/workflow.properties
M oozie/util/archive_job_output/workflow.xml
M oozie/util/hive/partition/add/workflow.properties
M oozie/util/hive/partition/add/workflow.xml
M oozie/util/mark_directory_done/workflow.xml
M oozie/webrequest/legacy_tsvs/bundle.properties
M oozie/webrequest/legacy_tsvs/bundle.xml
M oozie/webrequest/legacy_tsvs/coordinator_bits.xml
M oozie/webrequest/legacy_tsvs/coordinator_bits_misc_mobile_text.xml
M oozie/webrequest/legacy_tsvs/coordinator_misc.xml
M oozie/webrequest/legacy_tsvs/coordinator_mobile.xml
M oozie/webrequest/legacy_tsvs/coordinator_mobile_text.xml
M oozie/webrequest/legacy_tsvs/coordinator_mobile_text_upload.xml
M oozie/webrequest/legacy_tsvs/coordinator_text.xml
M oozie/webrequest/legacy_tsvs/coordinator_upload.xml
M oozie/webrequest/legacy_tsvs/workflow.xml
M oozie/webrequest/load/bundle.properties
M oozie/webrequest/load/bundle.xml
M oozie/webrequest/load/check_sequence_statistics_workflow.xml
M oozie/webrequest/load/coordinator.xml
M oozie/webrequest/load/workflow.xml
M oozie/webrequest/refine/bundle.properties
M oozie/webrequest/refine/bundle.xml
M oozie/webrequest/refine/coordinator.xml
M oozie/webrequest/refine/workflow.xml
44 files changed, 155 insertions(+), 434 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/26/216526/1

diff --git a/oozie/mediacounts/archive/coordinator.properties 
b/oozie/mediacounts/archive/coordinator.properties
index f49b376..bd5b232 100644
--- a/oozie/mediacounts/archive/coordinator.properties
+++ b/oozie/mediacounts/archive/coordinator.properties
@@ -10,7 +10,9 @@
 
 name_node   = hdfs://analytics-hadoop
 job_tracker = 
resourcemanager.analytics.eqiad.wmnet:8032
-queue_name  = default
+queue_name  = production
+oozie_launcher_queue_name   = production
+oozie_launcher_memory   = 256
 
 # Base path in HDFS to oozie files.
 # Other files will be used relative to this path.
diff --git a/oozie/mediacounts/archive/coordinator.xml 
b/oozie/mediacounts/archive/coordinator.xml
index 1bbd67c..a383f09 100644
--- a/oozie/mediacounts/archive/coordinator.xml
+++ b/oozie/mediacounts/archive/coordinator.xml
@@ -7,20 +7,11 @@
 timezone="Universal">
 
 
-
-queue_name
-default
-
-
-oozie_launcher_queue_name
-oozie
-
-
-oozie_launcher_memory
-256
-
 
 
+queue_name
+oozie_launcher_queue_name
+oozie_launcher_memory
 name_node
 job_tracker
 start_time
diff --git a/oozie/mediacounts/archive/workflow.xml 
b/oozie/mediacounts/archive/workflow.xml
index cd9791f..94c9a6a 100644
--- a/oozie/mediacounts/archive/workflow.xml
+++ b/oozie/mediacounts/archive/workflow.xml
@@ -3,23 +3,6 @@
 name="mediacounts_archive-${year}-${month}-${day}-wf">
 
 
-
-queue_name
-default
-
-
-oozie_launcher_queue_name
-oozie
-
-
-oozie_launcher_memory
-256
-
-
-
-oozie_launcher_memory
-256
-
 
 
 extra_filter
@@ -44,7 +27,10 @@
 
 
 
-
+
+queue_name
+oozie_launcher_queue_name
+oozie_launcher_memory
 name_node
 job_tracker
 
diff --git a/oozie/

[MediaWiki-commits] [Gerrit] Test save flags nocreate, recreate and onlycreate - change (pywikibot/core)

2015-06-07 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216525

Change subject: Test save flags nocreate, recreate and onlycreate
..

Test save flags nocreate, recreate and onlycreate

Change-Id: I1d1a65cceca31e8d97081839e2ec8cc8e49b3844
---
M tests/edit_failure_tests.py
M tests/edit_tests.py
2 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/25/216525/1

diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py
index ba85bc5..112d98c 100644
--- a/tests/edit_failure_tests.py
+++ b/tests/edit_failure_tests.py
@@ -23,6 +23,8 @@
 LockedPage,
 SpamfilterError,
 OtherPageSaveError,
+NoCreateError,
+PageCreatedConflict,
 )
 from tests.aspects import unittest, TestCase, WikibaseTestCase
 
@@ -64,6 +66,22 @@
 new_text = page.get(force=True)
 self.assertEqual(old_text, new_text)
 
+def test_createonly(self):
+"""Test that Page.save with createonly fails if page exists."""
+page = pywikibot.Page(self.site, 'User:Xqt/sandbox')
+self.assertRaises(PageCreatedConflict, page.save, createonly=True)
+
+def test_nocreate(self):
+"""Test that Page.save with nocreate fails if page does not exist."""
+page = pywikibot.Page(self.site, 'User:John_Vandenberg/no_recreate')
+self.assertRaises(NoCreateError, page.save, nocreate=True)
+
+def test_no_recreate(self):
+"""Test that Page.save with recreate disabled fails if page existed."""
+page = pywikibot.Page(self.site, 'User:John_Vandenberg/no_recreate')
+self.assertRaisesRegex(OtherPageSaveError, 'Page .* doesn\'t exist',
+   page.save, recreate=False)
+
 
 class TestActionFailure(TestCase):
 
diff --git a/tests/edit_tests.py b/tests/edit_tests.py
index 7a99297..7a4cf5d 100644
--- a/tests/edit_tests.py
+++ b/tests/edit_tests.py
@@ -31,6 +31,12 @@
 user = True
 write = True
 
+def test_createonly(self):
+"""Test save with createonly enforced."""
+ts = str(time.time())
+p = pywikibot.Page(self.site, 'User:John Vandenberg/createonly/' + ts)
+p.save(createonly=True)
+
 def test_async(self):
 """Test writing to a page."""
 global called_back

-- 
To view, visit https://gerrit.wikimedia.org/r/216525
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d1a65cceca31e8d97081839e2ec8cc8e49b3844
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Do not require package python-sh - change (operations/puppet)

2015-06-07 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Tools: Do not require package python-sh
..


Tools: Do not require package python-sh

python-sh was required for Yuvi's Such-A-Bot but that now uses a
virtualenv, so this change removes the project-wide requirement.

Bug: T91874
Change-Id: I849a9431482321b7c11cbf232f852d984c2a1855
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved
  Merlijn van Deen: Looks good to me, but someone else must approve



diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 0859ebf..07e8765 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -172,7 +172,6 @@
 'python-requests',
 'python-rsvg', # T58996
 'python-scipy',
-'python-sh',
 'python-socketio-client',  # T86015
 'python-sqlalchemy',
 'python-svn',  # T58996

-- 
To view, visit https://gerrit.wikimedia.org/r/213849
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I849a9431482321b7c11cbf232f852d984c2a1855
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] APISite.editpage should not reload the Page - change (pywikibot/core)

2015-06-07 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216523

Change subject: APISite.editpage should not reload the Page
..

APISite.editpage should not reload the Page

APISite.editpage reloads the revisions after success in order
to ensure that the Page is up to date, as the actual text of the
page may be different from the submitted text due to merges
performed by the server to resolve edit conflicts.

APISite and api achieved this by modifying private variables
of BasePage.

By exposing a public setter and deleter for latest_revision_id,
APISite and api can use this property to inform BasePage of
when its caches are invalid, so it can clear the caches so
subsequent fetches retrieve the actual text of the saved revision
when it is needed.

Normalise WikibasePage to using attribute _revid instead of lastrevid,
deprecating the latter.

Also add missing text deleter to ProofreadPage.

Change-Id: I55a49d115a8f207216f24f9acbfa64d87da88578
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/proofreadpage.py
M pywikibot/site.py
M tests/aspects.py
M tests/pagegenerators_tests.py
M tests/site_tests.py
7 files changed, 130 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/23/216523/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 3e82636..88237fd 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -2617,9 +2617,8 @@
 page._revisions[revision.revid] = revision
 
 if 'lastrevid' in pagedict:
-page._revid = pagedict['lastrevid']
-if page._revid in page._revisions:
-page._text = page._revisions[page._revid].text
+page.latest_revision_id = pagedict['lastrevid']
+del page.text
 
 if 'imageinfo' in pagedict:
 assert(isinstance(page, pywikibot.FilePage))
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 16a69d0..ae41402 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -346,13 +346,7 @@
 
 """
 if force:
-# When forcing, we retry the page no matter what:
-# * Old exceptions do not apply any more
-# * Deleting _revid to force reload
-# * Deleting _redirtarget, that info is now obsolete.
-for attr in ['_redirtarget', '_getexception', '_revid']:
-if hasattr(self, attr):
-delattr(self, attr)
+del self.latest_revision_id
 try:
 self._getInternals(sysop)
 except pywikibot.IsRedirectPage:
@@ -430,6 +424,34 @@
 self.revisions(self)
 return self._revid
 
+@latest_revision_id.deleter
+def latest_revision_id(self):
+"""Remove the latest revision id set for this Page.
+
+All internal cached values specifically for the latest revision
+of this page are cleared.
+
+The following cached values are not cleared:
+- text property
+- page properties, and page coordinates
+- lastNonBotUser
+- isDisambig and isCategoryRedirect status
+- langlinks, templates and deleted revisions
+"""
+# When forcing, we retry the page no matter what:
+# * Old exceptions do not apply any more
+# * Deleting _revid to force reload
+# * Deleting _redirtarget, that info is now obsolete.
+for attr in ['_redirtarget', '_getexception', '_revid']:
+if hasattr(self, attr):
+delattr(self, attr)
+
+@latest_revision_id.setter
+def latest_revision_id(self, value):
+"""Set the latest revision for this Page."""
+del self.latest_revision_id
+self._revid = value
+
 @deprecated('latest_revision_id')
 def latestRevision(self):
 """Return the current revision id for this page."""
@@ -479,6 +501,8 @@
 """Delete the current (edited) wikitext."""
 if hasattr(self, "_text"):
 del self._text
+if hasattr(self, '_expanded_text'):
+del self._expanded_text
 
 def preloadText(self):
 """The text returned by EditFormPreloadText.
@@ -3183,7 +3207,7 @@
 
 self._content = data[item_index]
 if 'lastrevid' in self._content:
-self.lastrevid = self._content['lastrevid']
+self.latest_revision_id = self._content['lastrevid']
 else:
 if lazy_loading_id:
 p = Page(self._site, self._title)
@@ -3287,15 +3311,38 @@
 return self.id
 
 @property
+@deprecated('latest_revision_id')
+def lastrevid(self):
+return self.latest_revision_id
+
+@lastrevid.setter
+@deprecated('latest_revision_id')
+def lastrevid(self, value):
+self.latest_revision_id = value
+
+@lastrevid.deleter
+@deprecated('latest_revision_id')
+def lastrevid(self):
+del self.latest_revision

[MediaWiki-commits] [Gerrit] [doc] Add FileInfo to the list of included objects. - change (pywikibot/core)

2015-06-07 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216522

Change subject: [doc] Add FileInfo to the list of included objects.
..

[doc] Add FileInfo to the list of included objects.

Also sort list by class occurence.

Change-Id: I96ea48976c8c02d08b67f9d3383b5f811986dbb6
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/22/216522/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 16a69d0..f89a1d9 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3,10 +3,11 @@
 Objects representing various types of MediaWiki, including Wikibase, pages.
 
 This module also includes objects:
-* Link: an internal or interwiki link in wikitext.
-* Revision: a single change to a wiki page.
 * Property: a type of semantic data.
 * Claim: an instance of a semantic assertion.
+* Revision: a single change to a wiki page.
+* FileInfo: a structure holding imageinfo of latest rev. of FilePage
+* Link: an internal or interwiki link in wikitext.
 
 """
 #

-- 
To view, visit https://gerrit.wikimedia.org/r/216522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96ea48976c8c02d08b67f9d3383b5f811986dbb6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] repool db1073 - change (operations/mediawiki-config)

2015-06-07 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: repool db1073
..


repool db1073

Change-Id: Ia050f587ddfdad85ef90ff249a0271dd0cf2a13e
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Springle: Verified; Looks good to me, approved



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 91376d2..b1b4665 100755
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -96,7 +96,7 @@
'db1065' => 100, # 2.8TB 160GB, api
'db1066' => 100, # 2.8TB 160GB, api
'db1072' => 500, # 2.8TB 160GB
-   # maintenance 'db1073' => 500, # 2.8TB 160GB
+   'db1073' => 500, # 2.8TB 160GB
),
's2' => array(
'db1024' => 0,   # 1.4TB  64GB

-- 
To view, visit https://gerrit.wikimedia.org/r/216521
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia050f587ddfdad85ef90ff249a0271dd0cf2a13e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits