[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add $magicWords translation for Bengali (bn)

2016-11-20 Thread Pmlineditor (Code Review)
Pmlineditor has uploaded a new change for review.

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

Change subject: Add $magicWords translation for Bengali (bn)
..

Add $magicWords translation for Bengali (bn)

Bug: T151134
Change-Id: I81ce473668e3712ea575dc38f5eb76abb45498ac
---
M languages/messages/MessagesBn.php
1 file changed, 136 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/322614/1

diff --git a/languages/messages/MessagesBn.php 
b/languages/messages/MessagesBn.php
index 59b4f65..511a604 100644
--- a/languages/messages/MessagesBn.php
+++ b/languages/messages/MessagesBn.php
@@ -171,3 +171,139 @@
'Whatlinkshere' => [ 'সংযোগকারী_পৃষ্ঠাসমূহ' ],
'Withoutinterwiki'  => [ 'আন্তঃউইকিহীন' ],
 ];
+
+$magicWords = [
+   'redirect'=> [ 0, '#পুনর্নির্দেশ', '#পুনঃর্নির্দেশ', 
'#পুনঃনির্দেশ', '#পুননির্দেশ', '#REDIRECT' ],
+   'notoc'   => [ 0, '__কোন_বিষয়বস্তুর_ছক_নয়__', 
'__কোনবিষয়বস্তুরছকনয়__', '__কোন_বিষয়বস্তুর_টেবিল_নয়__', 
'__কোনবিষয়বস্তুরটেবিলনয়__', '__NOTOC__' ],
+   'nogallery'   => [ 0, '__কোনগ্যালারিনয়__', 
'__কোনগ্যালারীনয়__', '__কোন_গ্যালারি_নয়__', '__কোন_গ্যালারী_নয়__', 
'__NOGALLERY__' ],
+   'toc' => [ 0, '__বিষয়বস্তুর_ছক__', 
'__বিষয়বস্তুরছক__', '__বিষয়বস্তুর_টেবিল__', '__বিষয়বস্তুরটেবিল__', '__TOC__' ],
+   'noeditsection'   => [ 0, '__কোনসম্পাদনাঅনুচ্ছেদনয়__', 
'__কোন_সম্পাদনা_অনুচ্ছেদ_নয়__', '__NOEDITSECTION__' ],
+   'currentmonth'=> [ 1, 'চলতি_মাস', 'চলতিমাস', 'বর্তমান_মাস', 
'বর্তমানমাস', 'বর্তমান_মাস_২', 'বর্তমানমাস২', 'CURRENTMONTH', 'CURRENTMONTH2' ],
+   'currentmonth1'   => [ 1, 'চলতি_মাস_১', 'চলতিমাস১', 
'বর্তমান_মাস_১', 'বর্তমানমাস১', 'CURRENTMONTH1' ],
+   'currentmonthname'=> [ 1, 'বর্তমান_মাসের_নাম', 
'বর্তমানমাসেরনাম', 'CURRENTMONTHNAME' ],
+   'currentmonthnamegen' => [ 1, 'বর্তমান_মাসের_নাম_উৎপন্ন', 
'বর্তমানমাসেরনামউৎপন্ন', 'CURRENTMONTHNAMEGEN' ],
+   'currentmonthabbrev'  => [ 1, 'বর্তমান_মাস_সংক্ষেপ', 
'বর্তমানমাসসংক্ষেপ', 'বর্তমান_মাস_সংক্ষিপ্ত', 'বর্তমানমাসসংক্ষিপ্ত', 
'CURRENTMONTHABBREV' ],
+   'currentday'  => [ 1, 'বর্তমান_দিন', 'বর্তমানদিন', 
'আজকের_দিন', 'আজকেরদিন', 'CURRENTDAY' ],
+   'currentday2' => [ 1, 'বর্তমান_দিন_২', 'বর্তমানদিন২', 
'আজকের_দিন_২', 'আজকেরদিন২', 'CURRENTDAY2' ],
+   'currentdayname'  => [ 1, 'বর্তমান_দিনের_নাম', 
'বর্তমানদিনেরনাম', 'আজকের_দিনের_নাম', 'আজকেরদিনেরনাম', 'CURRENTDAYNAME' ],
+   'currentyear' => [ 1, 'চলতি_বছর', 'চলতিবছর', 'বর্তমান_বছর', 
'বর্তমানবছর', 'CURRENTYEAR' ],
+   'currenttime' => [ 1, 'বর্তমান_সময়', 'বর্তমানসময়', 
'এখনকার_সময়', 'এখনকারসময়', 'এখন_সময়', 'CURRENTTIME' ],
+   'currenthour' => [ 1, 'বর্তমান_ঘণ্টা', 'বর্তমানঘণ্টা', 
'বর্তমান_ঘন্টা', 'বর্তমানঘন্টা', 'এখনকার_ঘণ্টা', 'এখনকারঘণ্টা', 'CURRENTHOUR' ],
+   'localmonth'  => [ 1, 'স্থানীয়_মাস', 'স্থানীয়মাস', 
'স্থানীয়_মাস_২', 'স্থানীয়মাস২', 'LOCALMONTH', 'LOCALMONTH2' ],
+   'localmonth1' => [ 1, 'স্থানীয়_মাস_১', 'স্থানীয়মাস১', 
'LOCALMONTH1' ],
+   'localmonthname'  => [ 1, 'স্থানীয়_মাসের_নাম', 
'স্থানীয়মাসেরনাম', 'LOCALMONTHNAME' ],
+   'localmonthnamegen'   => [ 1, 'স্থানীয়_মাসের_নাম_উৎপন্ন', 
'স্থানীয়মাসেরনামউৎপন্ন', 'LOCALMONTHNAMEGEN' ],
+   'localmonthabbrev'=> [ 1, 'স্থানীয়_মাস_সংক্ষেপ', 
'স্থানীয়মাসসংক্ষেপ', 'স্থানীয়_মাস_সংক্ষিপ্ত', 'স্থানীয়মাসসংক্ষিপ্ত', 
'সংক্ষেপিত_স্থানীয়_মাস', 'সংক্ষেপিতস্থানীয়মাস', 'LOCALMONTHABBREV' ],
+   'localday'=> [ 1, 'স্থানীয়_দিন', 'স্থানীয়দিন', 
'স্থানীয়_বার', 'স্থানীয়বার', 'LOCALDAY' ],
+   'localday2'   => [ 1, 'স্থানীয়_দিন_২', 'স্থানীয়দিন২', 
'LOCALDAY2' ],
+   'localdayname'=> [ 1, 'স্থানীয়_দিনের_নাম', 
'স্থানীয়দিনেরনাম', 'LOCALDAYNAME' ],
+   'localyear'   => [ 1, 'স্থানীয়_বছর', 'স্থানীয়বছর', 
'LOCALYEAR' ],
+   'localtime'   => [ 1, 'স্থানীয়_সময়', 'স্থানীয়সময়', 
'LOCALTIME' ],
+   'localhour'   => [ 1, 'স্থানীয়_ঘণ্টা', 'স্থানীয়ঘণ্টা', 
'স্থানীয়_ঘন্টা', 'স্থানীয়ঘন্টা', 'LOCALHOUR' ],
+   'numberofpages'   => [ 1, 'পাতার_সংখ্যা', 'পাতারসংখ্যা', 
'পৃষ্ঠার_সংখ্যা', 'পৃষ্ঠারসংখ্যা', 'পৃষ্ঠা_সংখ্যা', 'পৃষ্ঠাসংখ্যা', 
'NUMBEROFPAGES' ],
+   'numberofarticles'=> [ 1, 'নিবন্ধের_সংখ্যা', 'নিবন্ধেরসংখ্যা', 
'নিবন্ধ_সংখ্যা', 'নিবন্ধসংখ্যা', 'NUMBEROFARTICLES' ],
+   'numberoffiles'   => [ 1, 'ফাইলের_সংখ্যা', 'ফাইলেরসংখ্যা', 
'ফাইল_সংখ্যা', 'ফাইলসংখ্যা', 'NUMBEROFFILES' ],
+   'numberofusers'   => [ 1, 'ব্যবহারকারীর_সংখ্যা', 
'ব্যবহারকারীরসংখ্যা', 'ব্যবহারকারী_সংখ্যা', 'ব্যবহারকারীসংখ্যা', 
'NUMBEROFUSERS' ],
+   'numberofactiveusers' => [ 1, 'সক্রিয়_ব্যবহারকারীর_সংখ্যা', 
'সক্রিয়ব্যবহারকারীরসংখ্যা', 'সক্রিয়_ব্যবহারকারী_সংখ্যা', 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2070

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: db-codfw.php: Repool db2070
..


db-codfw.php: Repool db2070

db2070 was out for maintenance and it is now ready to be back

Bug: T149553
Change-Id: I5db65b9d3409d09182be2fb43d89f33f521a405e
---
M wmf-config/db-codfw.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 248e2c2..c809a30 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -100,7 +100,7 @@
'db2055' => 50,  # 3.3TB 160GB, dump (inactive), vslow
'db2062' => 100, # 3.3TB 160GB, api
'db2069' => 100, # 3.3TB 160GB, api
-#  'db2070' => 400, # 3.3TB 160GB #Maintenance T149553
+   'db2070' => 400, # 3.3TB 160GB
],
's2' => [
'db2017' => 0,   # 2.9TB  96GB, master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5db65b9d3409d09182be2fb43d89f33f521a405e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2070

2016-11-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review.

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

Change subject: db-codfw.php: Repool db2070
..

db-codfw.php: Repool db2070

db2070 was out for maintenance and it is now ready to be back

Bug: T149553
Change-Id: I5db65b9d3409d09182be2fb43d89f33f521a405e
---
M wmf-config/db-codfw.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 248e2c2..c809a30 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -100,7 +100,7 @@
'db2055' => 50,  # 3.3TB 160GB, dump (inactive), vslow
'db2062' => 100, # 3.3TB 160GB, api
'db2069' => 100, # 3.3TB 160GB, api
-#  'db2070' => 400, # 3.3TB 160GB #Maintenance T149553
+   'db2070' => 400, # 3.3TB 160GB
],
's2' => [
'db2017' => 0,   # 2.9TB  96GB, master

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5db65b9d3409d09182be2fb43d89f33f521a405e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Introduce stylelint

2016-11-20 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

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

Change subject: Introduce stylelint
..

Introduce stylelint

Introducing stylelint and making it pass.

Depends-on: I2a67e3e730e3525c8308311483d4c1a4d0b9830c
Change-Id: I917626d2703ed08a8c14c3616c9900d16b3acb73
---
A .stylelintrc
M Gruntfile.js
M modules/ext.ores.styles.css
M package.json
4 files changed, 18 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/12/322612/1

diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+   "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 408d6d9..cec27be 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -4,6 +4,7 @@
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
jshint: {
@@ -22,9 +23,14 @@
'**/*.json',
'!node_modules/**'
]
+   },
+   stylelint: {
+   dev: [
+   'modules/**/*.css'
+   ]
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 
'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ext.ores.styles.css b/modules/ext.ores.styles.css
index 9a3852b..0aa97ff 100644
--- a/modules/ext.ores.styles.css
+++ b/modules/ext.ores.styles.css
@@ -1,17 +1,18 @@
 /**
  * Marking "r" flag in ORES red in recent changes.
- * 
+ *
 **/
 .ores-damaging {
font-weight: bold;
-   color: red;
+   color: #f00;
 }
 
 /**
  * Make the whole row orange
  *
 **/
-li.damaging, tr.damaging {
-   background: rgba(255, 93, 0, 0.2);
+li.damaging,
+tr.damaging {
+   background: rgba( 255, 93, 0, 0.2 );
line-height: 1.8;
 }
diff --git a/package.json b/package.json
index 3de66ea..060b9af 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,8 @@
 "grunt-contrib-jshint": "1.0.0",
 "grunt-banana-checker": "0.5.0",
 "grunt-jscs": "3.0.1",
-"grunt-jsonlint": "1.1.0"
+"grunt-jsonlint": "1.1.0",
+"grunt-stylelint": "0.6.0",
+"stylelint-config-wikimedia": "0.3.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I917626d2703ed08a8c14c3616c9900d16b3acb73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Update dependencies and add missing license/repo information

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update dependencies and add missing license/repo information
..


Update dependencies and add missing license/repo information

Updating npm dependencies and adding license and repository information
to prevent warnings.

Change-Id: I2a67e3e730e3525c8308311483d4c1a4d0b9830c
---
M package.json
1 file changed, 11 insertions(+), 6 deletions(-)

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



diff --git a/package.json b/package.json
index 54f4076..3de66ea 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,18 @@
 {
+  "repository": {
+"type": "git",
+"url": "https://phabricator.wikimedia.org/diffusion/EORS/;
+  },
+  "license": "GPL-3.0",
   "scripts": {
 "test": "grunt test"
   },
   "devDependencies": {
-"grunt": "0.4.5",
-"grunt-cli": "0.1.13",
-"grunt-contrib-jshint": "0.11.3",
-"grunt-banana-checker": "0.4.0",
-"grunt-jscs": "2.2.0",
-"grunt-jsonlint": "1.0.7"
+"grunt": "1.0.1",
+"grunt-cli": "1.2.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-banana-checker": "0.5.0",
+"grunt-jscs": "3.0.1",
+"grunt-jsonlint": "1.1.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a67e3e730e3525c8308311483d4c1a4d0b9830c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Ladsgroup 
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] mediawiki...ORES[master]: Update dependencies and add missing license/repo information

2016-11-20 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

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

Change subject: Update dependencies and add missing license/repo information
..

Update dependencies and add missing license/repo information

Updating npm dependencies and adding license and repository information
to prevent warnings.

Change-Id: I2a67e3e730e3525c8308311483d4c1a4d0b9830c
---
M package.json
1 file changed, 11 insertions(+), 6 deletions(-)


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

diff --git a/package.json b/package.json
index 54f4076..3de66ea 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,18 @@
 {
+  "repository": {
+"type": "git",
+"url": "https://phabricator.wikimedia.org/diffusion/EORS/;
+  },
+  "license": "GPL-3.0",
   "scripts": {
 "test": "grunt test"
   },
   "devDependencies": {
-"grunt": "0.4.5",
-"grunt-cli": "0.1.13",
-"grunt-contrib-jshint": "0.11.3",
-"grunt-banana-checker": "0.4.0",
-"grunt-jscs": "2.2.0",
-"grunt-jsonlint": "1.0.7"
+"grunt": "1.0.1",
+"grunt-cli": "1.2.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-banana-checker": "0.5.0",
+"grunt-jscs": "3.0.1",
+"grunt-jsonlint": "1.1.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a67e3e730e3525c8308311483d4c1a4d0b9830c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Disable centralauth-rename right for maintenance

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Disable centralauth-rename right for maintenance
..


Disable centralauth-rename right for maintenance

Global rename is currently not welcome, as a maintenance script
to populate local_user_id and global_user_id fields in production
runs per T148242.

This change is intended to be reverted when the script is done,
expected to occur 27 November 2016.

Bug: T148242
Bug: T151155
Change-Id: Ic06a12b98af92415759eda86a9fb13b76d46f568
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  BryanDavis: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index de41400..ee77249 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1313,7 +1313,7 @@
wfLoadExtension( 'CentralAuth' );
 
$wgCentralAuthDryRun = false;
-   $wgGroupPermissions['steward']['centralauth-rename'] = true;
+   // $wgGroupPermissions['steward']['centralauth-rename'] = true;
$wgCentralAuthCookies = true;
 
$wgCentralAuthUseEventLogging = true;
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b8a90b0..7e496c7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8394,7 +8394,7 @@
],
'global-renamer' => [ // T142123, T71651
'autopatrol' => true,
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
],
'massmessage-sender' => [
'autopatrol' => true, // T142123
@@ -8426,7 +8426,7 @@
'userrights-interwiki' => true,
'centralauth-lock' => true,
'globalblock' => true,
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
'userrights' => true,
'editcontentmodel' => true, // TODO: remove when a 
change for T85847 is deployed
'massmessage' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic06a12b98af92415759eda86a9fb13b76d46f568
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Florianschmidtwelzow 
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] mediawiki/core[master]: registration: FileExtensions should be an array, not an object

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: registration: FileExtensions should be an array, not an object
..


registration: FileExtensions should be an array, not an object

Change-Id: Iff44a4c241ab953906a7b0611f09e66856b1f7dc
---
M docs/extension.schema.json
M docs/extension.schema.v1.json
2 files changed, 10 insertions(+), 4 deletions(-)

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



diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index 638ee5d..30feaef 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -651,8 +651,11 @@
"description": "Password policies"
},
"FileExtensions": {
-   "type": "object",
-   "description": "Preferred file extensions for uploading"
+   "type": "array",
+   "description": "Preferred file extensions for 
uploading",
+   "items": {
+   "type": "string"
+   }
},
"callback": {
"type": [
diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json
index 4d5c44f..421ea5c 100644
--- a/docs/extension.schema.v1.json
+++ b/docs/extension.schema.v1.json
@@ -641,8 +641,11 @@
"description": "Password policies"
},
"FileExtensions": {
-   "type": "object",
-   "description": "Preferred file extensions for uploading"
+   "type": "array",
+   "description": "Preferred file extensions for 
uploading",
+   "items": {
+   "type": "string"
+   }
},
"callback": {
"type": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff44a4c241ab953906a7b0611f09e66856b1f7dc
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Jforrester 
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] mediawiki...PerformanceInspector[master]: build: Add vendor/ and composer.lock to .gitignore

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Add vendor/ and composer.lock to .gitignore
..


build: Add vendor/ and composer.lock to .gitignore

These get auto-created when running 'composer install', which is used
to run php lint and coding style tests in this repo.

Change-Id: Icbc73d5abb7945c8cca6379da90bbff5e5e0e140
---
M .gitignore
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/.gitignore b/.gitignore
index b512c09..9759e26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
-node_modules
\ No newline at end of file
+/composer.lock
+/node_modules
+/vendor

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbc73d5abb7945c8cca6379da90bbff5e5e0e140
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Phedenskog 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Update payments_initial when donation completes

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update payments_initial when donation completes
..


Update payments_initial when donation completes

FIXME: This direct-to-db approach doesn't work for Amazon and Astropay
listeners as they exist now. But if we move the pending merge into a
SmashPig job, they can do the payments_init update then.

Bigger FIXME: payments_init row should really stay intact, and a new
table should track status changes.

Change-Id: Ibb79ba42d22d57dd849ffdd5eae3db92ad57163c
---
M Core/DataStores/PaymentsInitialDatabase.php
M PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M PaymentProviders/Adyen/Tests/config_test.yaml
M PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
4 files changed, 70 insertions(+), 1 deletion(-)

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



diff --git a/Core/DataStores/PaymentsInitialDatabase.php 
b/Core/DataStores/PaymentsInitialDatabase.php
index d40238c..857377e 100644
--- a/Core/DataStores/PaymentsInitialDatabase.php
+++ b/Core/DataStores/PaymentsInitialDatabase.php
@@ -75,6 +75,25 @@
$this->prepareAndExecute( $sql, $message );
}
 
+   public function updatePaymentStatus(
+   $gateway, $contributionTrackingId, $orderId, $status
+   ) {
+   $sql = 'UPDATE payments_initial
+   SET payments_final_status = :status
+   WHERE gateway = :gateway
+   AND contribution_tracking_id = :ct_id
+   AND order_id = :order_id';
+
+   $params = array(
+   'gateway' => $gateway,
+   'ct_id' => $contributionTrackingId,
+   'order_id' => $orderId,
+   'status' => $status
+   );
+
+   $this->prepareAndExecute( $sql, $params );
+   }
+
protected function getConfigKey() {
return 'data-store/fredge-db';
}
diff --git a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php 
b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
index bdcb117..8531ed8 100644
--- a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
+++ b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
@@ -1,6 +1,7 @@
 object( 'data-store/verified' )->push( 
$queueMessage );
 
+   PaymentsInitialDatabase::get()
+   ->updatePaymentStatus(
+   'adyen',
+   $dbMessage['contribution_tracking_id'],
+   $dbMessage['order_id'],
+   'complete'
+   );
+
// Remove it from the pending database
$logger->debug( 'Removing donor details message from 
pending database' );
$db->deleteMessage( $dbMessage );
diff --git a/PaymentProviders/Adyen/Tests/config_test.yaml 
b/PaymentProviders/Adyen/Tests/config_test.yaml
index 33e8128..6f249d0 100644
--- a/PaymentProviders/Adyen/Tests/config_test.yaml
+++ b/PaymentProviders/Adyen/Tests/config_test.yaml
@@ -24,6 +24,11 @@
 constructor-parameters:
 - 'sqlite::memory:'
 
+fredge-db:
+class: PDO
+constructor-parameters:
+- 'sqlite::memory:'
+
 payment-provider:
 adyen:
 api:
diff --git a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
index ce3edf9..f59e1b2 100644
--- a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
+++ b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
@@ -3,11 +3,14 @@
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Context;
 use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
+use SmashPig\Core\DataStores\PaymentsInitialDatabase;
 use SmashPig\Core\DataStores\PendingDatabase;
 use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 use SmashPig\PaymentProviders\Adyen\Jobs\RecordCaptureJob;
 use SmashPig\PaymentProviders\Adyen\Tests\AdyenTestConfiguration;
 use SmashPig\Tests\BaseSmashPigUnitTestCase;
+use SmashPig\Tests\PaymentsInitialDatabaseTest;
+use SmashPig\Tests\TestingDatabase;
 
 /**
  * Verify Adyen RecordCapture job functions
@@ -23,21 +26,43 @@
 */
protected $pendingDatabase;
protected $pendingMessage;
+   /**
+* @var PaymentsInitialDatabase
+*/
+   protected $paymentsInitDatabase;
+   protected $paymentsInitMessage;
 
public function setUp() {
parent::setUp();
$this->config = 
AdyenTestConfiguration::createWithSuccessfulApi();
Context::initWithLogger( $this->config );
+
+   $this->paymentsInitDatabase = PaymentsInitialDatabase::get();
+ 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Add a dismiss button to mailcheck suggestion

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add a dismiss button to mailcheck suggestion
..


Add a dismiss button to mailcheck suggestion

And don't suggest anything after they dismiss it once.

Bug: T148970
Change-Id: I50d4ef0adbfeac192346969eb56a06dfcdb56c61
---
M gateway_forms/mustache/forms.css
M gateway_forms/mustache/personal_info.html.mustache
M modules/js/ext.donationInterface.validation.js
3 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 7828eab..27e3b1e 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -408,3 +408,11 @@
 div.error-box h2 {
 color: red;
 }
+.close-button {
+background: rgba(0, 0, 0, 0);
+display: inline-block;
+height: 19px;
+width: 19px;
+text-align: center;
+cursor: pointer;
+}
diff --git a/gateway_forms/mustache/personal_info.html.mustache 
b/gateway_forms/mustache/personal_info.html.mustache
index 12da095..1cb532d 100644
--- a/gateway_forms/mustache/personal_info.html.mustache
+++ b/gateway_forms/mustache/personal_info.html.mustache
@@ -54,7 +54,7 @@

 
 
-
+×
 
 
 {{{ fieldError "email" }}}
diff --git a/modules/js/ext.donationInterface.validation.js 
b/modules/js/ext.donationInterface.validation.js
index 13edae9..75cd076 100644
--- a/modules/js/ext.donationInterface.validation.js
+++ b/modules/js/ext.donationInterface.validation.js
@@ -5,7 +5,8 @@
  * They should be rewritten here when we modernize the remaining forms.
  */
 ( function ( $, mw ) {
-   var di = mw.donationInterface = {};
+   var di = mw.donationInterface = {},
+   checkMail = true;
 
function showErrors( errors ) {
var generalErrors = [];
@@ -52,6 +53,9 @@
 
// Set up email error detection and correction
$( document ).on( 'blur', '#email', function () {
+   if ( !checkMail ) {
+   return;
+   }
// Be really conservative - only catch two letter errors
Mailcheck.domainThreshold = 2; // No way to set from opts!
$( this ).mailcheck( {
@@ -97,4 +101,8 @@
$( '#email' ).val( $( this ).text() );
$( '#emailSuggestion' ).hide();
} );
+   $( document ).on( 'click', '#emailSuggestion .close-button', function 
() {
+   checkMail = false; // Don't bother them again
+   $( '#emailSuggestion' ).hide();
+   } );
 } )( jQuery, mediaWiki );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50d4ef0adbfeac192346969eb56a06dfcdb56c61
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Default errors links to donate@

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Default errors links to donate@
..


Default errors links to donate@

FIXME: WMF-specific cause we can't use message parameters in mapped
error messages.

Bug: T117872
Change-Id: Ie9b3177d24f1949f66a4c75c149a0577207b7e28
---
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/gateway_common/i18n/interface/en.json 
b/gateway_common/i18n/interface/en.json
index 95478eb..b437471 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -26,7 +26,7 @@
"donate_interface-amount-error": "Please select an amount to donate",
"donate_interface-smallamount-error": "Please select an amount (minimum 
$1)",
"donate_interface-bigamount-error": "We cannot accept donations greater 
than USD 1 ($1 $2) through our website. Please contact our major gifts 
staff at $3.",
-   "donate_interface-processing-error": "There has been an error 
processing your request.\nNo processors are available.",
+   "donate_interface-processing-error": "There has been an error 
processing your request.\nPlease contact Donor Services at mailto:don...@wikimedia.org\;>don...@wikimedia.org.",
"donate_interface-fallback-currency-notice": "Your currency was 
unsupported. Processing will take place using $1, if you decide to continue.",
"donate_interface-maintenance-notice": "We apologize, but this type of 
payment has been temporarily disabled.",
"donate_interface-AED": "UAE dirham",
diff --git a/gateway_common/i18n/interface/qqq.json 
b/gateway_common/i18n/interface/qqq.json
index f297e16..e2573e8 100644
--- a/gateway_common/i18n/interface/qqq.json
+++ b/gateway_common/i18n/interface/qqq.json
@@ -51,7 +51,7 @@
"donate_interface-amount-error": "Error prompt if an invalid amount is 
entered (e.g. if the amount has letters in it).",
"donate_interface-smallamount-error": "Error message if the amount 
chosen is too low. Parameters:\n* $1 - a variable (it does '''not''' mean \"one 
dollar\"), and will be replaced with an amount in the user's currency",
"donate_interface-bigamount-error": "Error message if the amount chosen 
is too high. Parameters:\n* $1 - the amount in the user's chosen currency\n* $2 
- the currency code for the user's chosen currency (e.g. USD, EUR, NOK, TZS)\n* 
$3 - the e-mail address that the user should e-mail to give big gifts",
-   "donate_interface-processing-error": "Error message.",
+   "donate_interface-processing-error": "Error message instructing the 
donor to contact our Donor Services department.",
"donate_interface-fallback-currency-notice": "Notification that the 
donor's currency has been changed. Parameters:\n* $1 - the currency code in 
which to continue the transaction",
"donate_interface-maintenance-notice": "Notification that this service 
is temporarily disabled for maintenance.",
"donate_interface-AED": "Used in drop-down field for currency.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9b3177d24f1949f66a4c75c149a0577207b7e28
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make FileExtensions into an array, not an object

2016-11-20 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Make FileExtensions into an array, not an object
..

Make FileExtensions into an array, not an object

Change-Id: Iff44a4c241ab953906a7b0611f09e66856b1f7dc
---
M docs/extension.schema.json
M docs/extension.schema.v1.json
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/322610/1

diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index 638ee5d..d22eb5e 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -651,8 +651,11 @@
"description": "Password policies"
},
"FileExtensions": {
-   "type": "object",
+   "type": "array",
"description": "Preferred file extensions for uploading"
+   "items": {
+   "type": "string"
+   }
},
"callback": {
"type": [
diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json
index 4d5c44f..d83ea08 100644
--- a/docs/extension.schema.v1.json
+++ b/docs/extension.schema.v1.json
@@ -641,8 +641,11 @@
"description": "Password policies"
},
"FileExtensions": {
-   "type": "object",
+   "type": "array",
"description": "Preferred file extensions for uploading"
+   "items": {
+   "type": "string"
+   }
},
"callback": {
"type": [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Remove minified videojs-responsive-layout.js

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove minified videojs-responsive-layout.js
..


Remove minified videojs-responsive-layout.js

RL will minify where necessary

Change-Id: Ifdbec9bdea0bf85f2e8f338f40b1dd44f5e0156f
---
D resources/videojs-responsive-layout/videojs-responsive-layout.min.js
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git 
a/resources/videojs-responsive-layout/videojs-responsive-layout.min.js 
b/resources/videojs-responsive-layout/videojs-responsive-layout.min.js
deleted file mode 100644
index 5715da4..000
--- a/resources/videojs-responsive-layout/videojs-responsive-layout.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * videojs-responsive-layout
- * @version 1.1.1
- * @copyright 2016 Derk-Jan Hartman
- * @license (MIT OR Apache-2.0)
- */
-!function(e){if("object"==typeof exports&&"undefined"!=typeof 
module)module.exports=e();else if("function"==typeof 
define&)define([],e);else{var t;t="undefined"!=typeof 
window?window:"undefined"!=typeof global?global:"undefined"!=typeof 
self?self:this,t.videojsResponsiveLayout=e()}}(function(){return function 
e(t,n,o){function i(u,a){if(!n[u]){if(!t[u]){var l="function"==typeof 
require&if(!a&)return l(u,!0);if(r)return r(u,!0);var s=new 
Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var 
f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return 
i(n?n:e)},f,f.exports,e,t,n,o)}return n[u].exports}for(var r="function"==typeof 
require&,u=0;ue?o():t!==!0&&(u=setTimeout(i?r:o,void 0===i?e-s:e))}var 
u,a=0;return"boolean"!=typeof t&&(i=n,n=t,t=void 
0),o&&&(r.guid=n.guid=n.guid||o.guid++),r}},{jquery:1}],5:[function(e,t,n){(function(o){"use
 strict";function i(e){return e&__esModule?e:{"default":e}}function 
r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a 
function")}Object.defineProperty(n,"__esModule",{value:!0});var 
u=function(){function e(e,t){for(var n=0;n0||e.offsetHeight>0},h=function w(){var e=function(e){var 
t=e.player.el(),n=e.options.layoutMap[e.currentLayout_];"defaults"!==n.layoutClassName&["default"].addClass(t,n.layoutClassName),e.options.layoutMap.forEach(function(n,o){o!==e.currentLayout_&&"defaults"!==n.layoutClassName&["default"].removeClass(t,n.layoutClassName)})},t=function(t,n,o,i){var
 
r=t.options.layoutMap;o>n&_>0?(t.currentLayout_--,e(t),window.setTimeout(w.bind(t),1)):t.currentLayout_=r[t.currentLayout_+1].width*i&&(t.currentLayout_++,e(t),window.setTimeout(w.bind(t),1))};if(this.el&&!this.player.usingNativeControls()&(this.el.querySelectorAll(".vjs-control-bar")[0])){var
 
n=this.getPlayerWidth(),o=this.getControlWidth(),i=this.getControlBarWidth();this.options.calculateLayout?this.options.calculateLayout(this,n,i,o):t(this,n,i,o)}},p=function(){function
 
e(t,n){r(this,e),this.player_=t,this.options_=n,this.currentLayout_=n.layoutMap.length-1,this.debouncedCheckSize_=s(n.debounceDelay,h)}return
 u(e,[{key:"ready",value:function(){var 
e=this;this.player.addClass("vjs-responsive-layout"),this.windowResizeListener_=window.addEventListener("resize",function(){return
 e.debouncedCheckSize_()}),this.player.on(["play","resize"],function(){return 
e.debouncedCheckSize_()}),this.player.on("dispose",function(){window.removeEventListener("resize",this.windowResizeListener_)}),this.player.trigger("resize")}},{key:"getControlWidth",value:function(){return
 
d(this.el.querySelectorAll(".vjs-play-control")[0])}},{key:"getControlBarWidth",value:function(){var
 e=0,t=this.el.querySelectorAll(".vjs-control-bar > 

[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix comment blocks

2016-11-20 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix comment blocks
..

Fix comment blocks

Change-Id: Ia08f110aa47ce5067547daef5d241f98d9e2c727
---
M TimedMediaHandler.hooks.php
1 file changed, 50 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/08/322608/1

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 199b317..712ac8f 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -9,9 +9,14 @@
 
 class TimedMediaHandlerHooks {
 
-   // Register TimedMediaHandler namespace IDs
-   // These are configurable due to Commons history: T123823
-   // These need to be before registerhooks due to: T123695
+   /**
+* Register TimedMediaHandler namespace IDs
+* These are configurable due to Commons history: T123823
+* These need to be before registerhooks due to: T123695
+*
+* @param array $list
+* @return bool
+*/
public static function addCanonicalNamespaces( array &$list ) {
global $wgEnableLocalTimedText, $wgTimedTextNS;
if ( $wgEnableLocalTimedText ) {
@@ -28,9 +33,15 @@
return true;
}
 
-   // At some point these should be registered in extension.json
-   // But for now we register them dynamically, because they are config 
dependent,
-   // while we have two players
+
+   /**
+* At some point these should be registered in extension.json
+* But for now we register them dynamically, because they are config 
dependent,
+* while we have two players
+*
+* @param ResourceLoader $resourceLoader
+* @return bool
+*/
public static function resourceLoaderRegisterModules( &$resourceLoader 
) {
$baseExtensionResource = [
'localBasePath' => __DIR__,
@@ -189,13 +200,17 @@
return true;
}
 
-   // Register TimedMediaHandler Hooks
+   /**
+* Register TimedMediaHandler Hooks
+*
+* @return bool
+*/
public static function register() {
global $wgHooks, $wgJobClasses, 
$wgJobTypesExcludedFromDefaultQueue, $wgMediaHandlers,
$wgResourceModules, $wgExcludeFromThumbnailPurge,
$wgFileExtensions, $wgTmhEnableMp4Uploads, 
$wgExtensionAssetsPath,
$wgMwEmbedModuleConfig, $wgEnableLocalTimedText, 
$wgTmhFileExtensions,
-   $wgTmhTheoraTwoPassEncoding, $wgTmhWebPlayer, 
$wgWikimediaJenkinsCI;
+   $wgTmhTheoraTwoPassEncoding, $wgWikimediaJenkinsCI;
 
// set config for parser tests
if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI  
=== true ) {
@@ -443,6 +458,10 @@
return true;
}
 
+   /**
+* @param SkinTemplate $sktemplate
+* @param array $links
+*/
public static function onSkinTemplateNavigation( SkinTemplate 
&$sktemplate, array &$links ) {
if ( self::isTimedMediaHandlerTitle( $sktemplate->getTitle() ) 
) {
$ttTitle = Title::makeTitleSafe( NS_TIMEDTEXT, 
$sktemplate->getTitle()->getDBkey() );
@@ -554,6 +573,7 @@
}
return true;
}
+
/**
 * Handle moved titles
 *
@@ -732,6 +752,10 @@
return true;
}
 
+   /**
+* @param DatabaseUpdater $updater
+* @return bool
+*/
public static function checkSchemaUpdates( DatabaseUpdater $updater ) {
$base = __DIR__;
 
@@ -750,6 +774,10 @@
return true;
}
 
+   /**
+* @param array $qp
+* @return bool
+*/
public static function onwgQueryPages( $qp ) {
$qp[] = [ 'SpecialOrphanedTimedText', 'OrphanedTimedText' ];
return true;
@@ -780,6 +808,12 @@
return true;
}
 
+   /**
+* @param $hash
+* @param User $user
+* @param $forOptions
+* @return bool
+*/
public static function changePageRenderingHash( &$hash, User $user, 
&$forOptions ) {
if ( self::activePlayerMode() === 'videojs' ) {
if ( $user->getOption( 'tmh-videojs' ) === '1' ) {
@@ -789,6 +823,11 @@
}
}
 
+   /**
+* @param $user
+* @param $prefs
+* @return bool
+*/
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
global $wgTmhUseBetaFeatures, $wgExtensionAssetsPath;
 
@@ -813,6 +852,9 @@
return true;
}
 
+   /**
+* @return string
+*/
public static function 

[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Convert to extension registration

2016-11-20 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Convert to extension registration
..

Convert to extension registration

Bug: T87981
Change-Id: If1ee867343c3c773fba5e6194a0ed3719d442dd0
---
M TimedMediaHandler.hooks.php
M TimedMediaHandler.php
A extension.json
3 files changed, 334 insertions(+), 361 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/09/322609/1

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 712ac8f..732bf39 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -9,6 +9,106 @@
 
 class TimedMediaHandlerHooks {
 
+   public static function onRegistration() {
+   global $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet;
+
+   if ( !count( $wgEnabledTranscodeSet ) ) {
+   $wgEnabledTranscodeSet = [ // WebM VP8/Vorbis
+   // primary free/open video format
+   // supported by Chrome/Firefox/Opera but not 
Safari/IE/Edge
+
+   // Very low-bitrate web streamable WebM video
+   WebVideoTranscode::ENC_WEBM_160P,
+
+   // Low-bitrate web streamable WebM video
+   WebVideoTranscode::ENC_WEBM_240P,
+
+   // Medium-bitrate web streamable WebM video
+   WebVideoTranscode::ENC_WEBM_360P,
+
+   // Moderate-bitrate web streamable WebM video
+   WebVideoTranscode::ENC_WEBM_480P,
+
+   // A high quality WebM stream
+   WebVideoTranscode::ENC_WEBM_720P,
+
+   // A full-HD high quality WebM stream
+   WebVideoTranscode::ENC_WEBM_1080P,
+
+   // A 4K full high quality WebM stream
+   // WebVideoTranscode::ENC_WEBM_2160P,
+
+   // Ogg Theora/Vorbis
+   // Fallback for Safari/IE/Edge with ogv.js
+
+   // Requires twice the bitrate for same quality 
as VP8,
+   // and JS decoder can be slow, so shift to 
smaller sizes.
+
+   // Low-bitrate Ogg stream
+   WebVideoTranscode::ENC_OGV_160P,
+
+   // Medium-bitrate Ogg stream
+   WebVideoTranscode::ENC_OGV_240P,
+
+   // Moderate-bitrate Ogg stream
+   WebVideoTranscode::ENC_OGV_360P,
+
+   // High-bitrate Ogg stream
+   WebVideoTranscode::ENC_OGV_480P,
+
+   // Variable-bitrate HD Ogg stream
+   // for ogv.js on reasonably speedy machines
+   WebVideoTranscode::ENC_OGV_720P,
+
+   // Variable-bitrate HD Ogg stream
+   // for ogv.js on reasonably speedy machines
+   WebVideoTranscode::ENC_OGV_1080P,
+
+   /*
+   // MP4 H.264/AAC
+   // Primary format for the 
Apple/Microsoft world
+   //
+   // Check patent licensing issues in 
your country before use!
+   // Similar to WebM in quality/bitrate
+
+   // Very low
+   WebVideoTranscode::ENC_H264_160P,
+
+   // Low
+   WebVideoTranscode::ENC_H264_240P,
+
+   // A least common denominator h.264 
stream; first gen iPhone, iPods, early android etc.
+   WebVideoTranscode::ENC_H264_320P,
+
+   // A mid range h.264 stream; mid range 
phones and low end tables
+   WebVideoTranscode::ENC_H264_480P,
+
+   // An high quality HD stream; higher 
end phones, tablets, smart tvs
+   WebVideoTranscode::ENC_H264_720P,
+
+   // A full-HD high quality stream; 
higher end phones, tablets, smart tvs
+   WebVideoTranscode::ENC_H264_1080P,
+
+   // A 4K high quality stream; higher end 
phones, tablets, smart tvs
+   

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Purges cache upon adding a new feature to a hub.

2016-11-20 Thread Harej (Code Review)
Harej has uploaded a new change for review.

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

Change subject: Purges cache upon adding a new feature to a hub.
..

Purges cache upon adding a new feature to a hub.

This is so that there's no "feature does not exist" text when the hub is loaded 
for the first time after the new feature is created.

For hub *creation*, it just creates the subpages first to short-circuit this 
problem altogether.

Bug: T149022
Change-Id: I12bd045104cd61e1cad4b9725d58736a80fdd3f1
---
M includes/SpecialCreateCollaborationHub.php
M includes/SpecialCreateHubFeature.php
2 files changed, 20 insertions(+), 17 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/07/322607/1

diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index d0153b0..8588078 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -160,22 +160,6 @@
return Status::newFatal( 
'collaborationkit-createhub-invalidtitle' );
}
 
-   $result = CollaborationHubContentHandler::edit(
-   $title,
-   $data['display_name'],
-   $data['icon'],
-   $data['colour'],
-   $data['introduction'],
-   '',
-   [],
-   $this->msg( 'collaborationkit-createhub-editsummary' 
)->inContentLanguage()->plain(),
-   $this->getContext()
-   );
-
-   if ( !$result->isGood() ) {
-   return $result;
-   }
-
$memberListTitle = Title::newFromText( $data['title'] . '/' . 
$this->msg( 'collaborationkit-hub-pagetitle-members' ) );
if ( !$memberListTitle ) {
return Status::newFatal( 
'collaborationkit-createhub-invalidtitle' );
@@ -217,6 +201,22 @@
$e->getCodeString() ) );
}
 
+   $result = CollaborationHubContentHandler::edit(
+   $title,
+   $data['display_name'],
+   $data['icon'],
+   $data['colour'],
+   $data['introduction'],
+   '',
+   [],
+   $this->msg( 'collaborationkit-createhub-editsummary' 
)->inContentLanguage()->plain(),
+   $this->getContext()
+   );
+
+   if ( !$result->isGood() ) {
+   return $result;
+   }
+
// Once all the pages we want to create are created, we send 
them to the first one
$this->getOutput()->redirect( $title->getFullUrl() );
return Status::newGood();
diff --git a/includes/SpecialCreateHubFeature.php 
b/includes/SpecialCreateHubFeature.php
index 070649b..9f15d56 100644
--- a/includes/SpecialCreateHubFeature.php
+++ b/includes/SpecialCreateHubFeature.php
@@ -189,7 +189,7 @@
$initialContent = ''; // Create empty page by default; 
exception is if there needs to be something such as JSON.
if ( $contentModel == 'CollaborationListContent' ) {
// FIXME why are we redefining this here? Can't we 
reuse something from collaborationlistcontenthandler, which already has default 
content?
-   $initialContent = '{ "columns": [ { "items":[], 
"options":{}, "description":"" } ] }';
+   $initialContent = '{ "displaymode": "normal", 
"columns": [ { "items":[] } ], "options":{}, "description":"" }';
}
 
$summary = $this->msg( 
'collaborationkit-createhubfeature-editsummary' )->plain();
@@ -218,6 +218,9 @@
$e->getCodeString() ) );
}
 
+   // Purge the hub's cache so that it doesn't say "feature does 
not exist"
+   $hubTitleObject->invalidateCache();
+
// Once all the pages we want to create are created, we send 
them to the first one
$this->getOutput()->redirect( $title->getFullUrl() );
return Status::newGood();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12bd045104cd61e1cad4b9725d58736a80fdd3f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Disable centralauth-rename right for maintenance

2016-11-20 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Disable centralauth-rename right for maintenance
..

Disable centralauth-rename right for maintenance

Global rename is currently not welcome, as a maintenance script
to populate local_user_id and global_user_id fields in production
runs per T148242.

This change is intended to be reverted when the script is done,
expected to occur 27 November 2016.

Bug: T148242
Bug: T151155
Change-Id: Ic06a12b98af92415759eda86a9fb13b76d46f568
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index de41400..ee77249 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1313,7 +1313,7 @@
wfLoadExtension( 'CentralAuth' );
 
$wgCentralAuthDryRun = false;
-   $wgGroupPermissions['steward']['centralauth-rename'] = true;
+   // $wgGroupPermissions['steward']['centralauth-rename'] = true;
$wgCentralAuthCookies = true;
 
$wgCentralAuthUseEventLogging = true;
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b8a90b0..7e496c7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8394,7 +8394,7 @@
],
'global-renamer' => [ // T142123, T71651
'autopatrol' => true,
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
],
'massmessage-sender' => [
'autopatrol' => true, // T142123
@@ -8426,7 +8426,7 @@
'userrights-interwiki' => true,
'centralauth-lock' => true,
'globalblock' => true,
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
'userrights' => true,
'editcontentmodel' => true, // TODO: remove when a 
change for T85847 is deployed
'massmessage' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic06a12b98af92415759eda86a9fb13b76d46f568
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: www: guard against midding $xjob->JB_hard_resource_list->qst...

2016-11-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: www: guard against midding 
$xjob->JB_hard_resource_list->qstat_l_requests
..

www: guard against midding $xjob->JB_hard_resource_list->qstat_l_requests

Seen in logs:
2016-11-21 00:06:25: (mod_fastcgi.c.2673) FastCGI-stderr: PHP Warning:
Invalid argument supplied for foreach() in
/mnt/nfs/labstore-secondary-tools-project/admin/toollabs/www/content/status.php
on line 60
2016-11-21 00:06:25: (mod_fastcgi.c.2673) FastCGI-stderr: PHP Stack
trace: 2016-11-21 00:06:25: (mod_fastcgi.c.2673) FastCGI-stderr: PHP
1. {main}()
/mnt/nfs/labstore-secondary-tools-project/admin/toollabs/www/index.php:0
2016-11-21 00:06:25: (mod_fastcgi.c.2673) FastCGI-stderr: PHP   2.
include()
/mnt/nfs/labstore-secondary-tools-project/admin/toollabs/www/index.php:135

Change-Id: I939b4baab1b68403a7ac91026036ce4a3a5adf01
---
M www/content/status.php
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/05/322605/1

diff --git a/www/content/status.php b/www/content/status.php
index b31a503..a381842 100644
--- a/www/content/status.php
+++ b/www/content/status.php
@@ -57,9 +57,13 @@
} else {
$job['queue'] = '(manual)';
}
-   foreach ( $xjob->JB_hard_resource_list->qstat_l_requests as $lreq ) {
-   if ( $lreq->CE_name === 'h_vmem' ) {
-   $job['h_vmem'] = (int) $lreq->CE_doubleval;
+   if ( $xjob->JB_hard_resource_list &&
+   $xjob->JB_hard_resource_list->qstat_l_requests
+   ) {
+   foreach ( $xjob->JB_hard_resource_list->qstat_l_requests as 
$lreq ) {
+   if ( $lreq->CE_name === 'h_vmem' ) {
+   $job['h_vmem'] = (int) $lreq->CE_doubleval;
+   }
}
}
if ( $xjob->JB_ja_tasks->jatask &&

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I939b4baab1b68403a7ac91026036ce4a3a5adf01
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki...Genealogy[master]: Refactor various things

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Refactor various things
..


Refactor various things

This redesigns much of the layout of the extension, but doesn't
change many fundamental ideas of it.

Change-Id: I8e536310a7370f96041471ed790710ca1150bd9a
---
D Core.php
M Genealogy.i18n.magic.php
M Genealogy.i18n.php
D Genealogy.php
D Person.php
M README.md
D Traverser.php
D Tree.php
M composer.json
A extension.json
A person_template.wikitext
A phpcs.xml
A src/Hooks.php
A src/Person.php
A src/Traverser.php
A src/Tree.php
M tests/phpunit/PersonTest.php
17 files changed, 1,048 insertions(+), 610 deletions(-)

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



diff --git a/Core.php b/Core.php
deleted file mode 100644
index cdb039b..000
--- a/Core.php
+++ /dev/null
@@ -1,138 +0,0 @@
-setFunctionHook('genealogy', 
'GenealogyCore::RenderParserFunction');
-   return true;
-   }
-
-   /**
-* Hooked to UnitTestsList.
-* @param array|String $files
-* @return boolean
-*/
-   static function onUnitTestsList(&$files) {
-   $files = array_merge($files, glob(__DIR__ . 
'/tests/phpunit/*Test.php'));
-   return true;
-   }
-
-   /**
-* Render the output of the parser function.
-* The input parameters are wikitext with templates expanded.
-* The output should be wikitext too.
-*
-* @param Parser $parser
-* @param string $type
-* @param string $param2
-* @param string $param3
-* @return string The wikitext with which to replace the parser 
function call.
-*/
-   static function RenderParserFunction(Parser $parser) {
-   $params = array();
-   $args = func_get_args();
-   array_shift($args); // Remove $parser
-   $type = array_shift($args); // Get param 1, the function type
-   foreach ($args as $arg) { // Everything that's left must be 
named
-   $pair = explode('=', $arg, 2);
-   if (count($pair) == 2) {
-   $name = trim($pair[0]);
-   $value = trim($pair[1]);
-   $params[$name] = $value;
-   } else {
-   $params[] = $arg;
-   }
-   }
-   $out = ''; //"".print_r($params, true)."";
-   switch ($type) {
-   case 'person':
-   if (isset($params['birth date'])) {
-   $out .= $params['birth date'];
-   self::SaveProp($parser, 'birth date', 
$params['birth date'], false);
-   }
-   if (isset($params['death date'])) {
-   $out .= $params['death date'];
-   self::SaveProp($parser, 'death date', 
$params['death date'], false);
-   }
-   break;
-   case 'parent':
-   $parentTitle = Title::newFromText($params[0]);
-   if ($parentTitle and $parentTitle->exists()) {
-   $person = new 
GenealogyPerson($parentTitle);
-   $out .= $person->getWikiLink();
-   } else {
-   $out .= "[[" . $params[0] . "]]";
-   }
-   self::SaveProp($parser, 'parent', $params[0]);
-   break;
-   case 'siblings':
-   $person = new 
GenealogyPerson($parser->getTitle());
-   $out .= 
self::PeopleList($person->getSiblings());
-   break;
-   case 'partner':
-   //$out .= "[[".$params[0]."]]";
-   self::SaveProp($parser, 'partner', $params[0]);
-   break;
-   case 'partners':
-   $person = new 
GenealogyPerson($parser->getTitle());
-   $out .= 
self::PeopleList($person->getPartners());
-   break;
-   case 'children':
-   $person = new 
GenealogyPerson($parser->getTitle());
-   $out .= 
self::PeopleList($person->getChildren());
-   break;
-   case 'tree':
-   $tree = new GenealogyTree();
-   if 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Use production apache config on beta

2016-11-20 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Use production apache config on beta
..

Use production apache config on beta

Bug: T1256
Change-Id: I5b05b096d08d8829ddc5837518b4f35719a514dd
---
M modules/mediawiki/manifests/web/beta_sites.pp
D modules/mediawiki/manifests/web/prod_sites.pp
M modules/mediawiki/manifests/web/sites.pp
M modules/mediawiki/templates/apache/sites/main.conf.erb
M modules/mediawiki/templates/apache/sites/remnant.conf.erb
M modules/mediawiki/templates/apache/sites/wikimedia.conf.erb
M modules/role/manifests/mediawiki/webserver.pp
7 files changed, 80 insertions(+), 88 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/322603/1

diff --git a/modules/mediawiki/manifests/web/beta_sites.pp 
b/modules/mediawiki/manifests/web/beta_sites.pp
index 9cbfd5e..7cebfac 100644
--- a/modules/mediawiki/manifests/web/beta_sites.pp
+++ b/modules/mediawiki/manifests/web/beta_sites.pp
@@ -1,49 +1,38 @@
 class mediawiki::web::beta_sites {
 tag 'mediawiki', 'mw-apache-config'
 
-apache::mod_conf { 'php5':
-ensure => 'absent',
-}
-
-# w-beta.wmflabs.org depends on proxy_http
-include ::apache::mod::proxy_http
-apache::site { 'beta-specific':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/beta_specific.conf',
-priority => 1,
-}
-
 apache::site { 'main':
-source   => 'puppet:///modules/mediawiki/apache/beta/sites/main.conf',
+ensure   => absent,
 priority => 1,
 }
 
 apache::site { 'wikibooks':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikibooks.conf',
+ensure   => absent,
 priority => 2,
 }
 
 apache::site { 'wikipedia':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikipedia.conf',
+ensure   => absent,
 priority => 3,
 }
 
 apache::site { 'wikidata':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikidata.conf',
+ensure   => absent,
 priority => 4,
 }
 
 apache::site { 'wikisource':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikisource.conf',
+ensure   => absent,
 priority => 5,
 }
 
 apache::site { 'wikiversity':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikiversity.conf',
+ensure   => absent,
 priority => 7,
 }
 
 apache::site { 'wikiquote':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikiquote.conf',
+ensure   => absent,
 priority => 8,
 }
 
@@ -53,32 +42,32 @@
 }
 
 apache::site { 'wiktionary':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wiktionary.conf',
+ensure   => absent,
 priority => 10,
 }
 
 apache::site { 'wikinews':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikinews.conf',
+ensure   => absent,
 priority => 11,
 }
 
 apache::site { 'loginwiki':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/loginwiki.conf',
+ensure   => absent,
 priority => 12,
 }
 
 apache::site { 'wikimedia':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikimedia.conf',
+ensure   => absent,
 priority => 16,
 }
 
 apache::site { 'wikivoyage':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/wikivoyage.conf',
+ensure   => absent,
 priority => 17,
 }
 
 apache::site { 'remnant':
-source   => 
'puppet:///modules/mediawiki/apache/beta/sites/remnant.conf',
+ensure   => absent,
 priority => 20,
 }
 
diff --git a/modules/mediawiki/manifests/web/prod_sites.pp 
b/modules/mediawiki/manifests/web/prod_sites.pp
deleted file mode 100644
index db71450..000
--- a/modules/mediawiki/manifests/web/prod_sites.pp
+++ /dev/null
@@ -1,43 +0,0 @@
-class mediawiki::web::prod_sites {
-tag 'mediawiki', 'mw-apache-config'
-
-apache::site { 'redirects':
-source   => 'puppet:///mediawiki/apache/sites/redirects.conf',
-priority => 2,
-}
-
-apache::site { 'main':
-content  => template('mediawiki/apache/sites/main.conf.erb'),
-priority => 3,
-}
-
-apache::site { 'remnant':
-content  => template('mediawiki/apache/sites/remnant.conf.erb'),
-priority => 4,
-}
-
-apache::site { 'search.wikimedia':
-source   => 'puppet:///mediawiki/apache/sites/search.wikimedia.conf',
-priority => 5,
-}
-
-apache::site { 'secure.wikimedia':
-source   => 'puppet:///mediawiki/apache/sites/secure.wikimedia.conf',
-priority => 6,
-}
-
-apache::site { 'wikimania':
-content  => 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Get rid of old beta_sites class now just containing a load o...

2016-11-20 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Get rid of old beta_sites class now just containing a load of 
ensure => absent
..

Get rid of old beta_sites class now just containing a load of ensure => absent

Bug: T1256
Change-Id: Ibdc60e5059223d694b5f9d06862f8f3c0d7cd3b4
---
D modules/mediawiki/manifests/web/beta_sites.pp
M modules/role/manifests/mediawiki/webserver.pp
2 files changed, 0 insertions(+), 77 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/322604/1

diff --git a/modules/mediawiki/manifests/web/beta_sites.pp 
b/modules/mediawiki/manifests/web/beta_sites.pp
deleted file mode 100644
index 7cebfac..000
--- a/modules/mediawiki/manifests/web/beta_sites.pp
+++ /dev/null
@@ -1,74 +0,0 @@
-class mediawiki::web::beta_sites {
-tag 'mediawiki', 'mw-apache-config'
-
-apache::site { 'main':
-ensure   => absent,
-priority => 1,
-}
-
-apache::site { 'wikibooks':
-ensure   => absent,
-priority => 2,
-}
-
-apache::site { 'wikipedia':
-ensure   => absent,
-priority => 3,
-}
-
-apache::site { 'wikidata':
-ensure   => absent,
-priority => 4,
-}
-
-apache::site { 'wikisource':
-ensure   => absent,
-priority => 5,
-}
-
-apache::site { 'wikiversity':
-ensure   => absent,
-priority => 7,
-}
-
-apache::site { 'wikiquote':
-ensure   => absent,
-priority => 8,
-}
-
-apache::site { 'testwiki':
-ensure   => absent,
-priority => 9,
-}
-
-apache::site { 'wiktionary':
-ensure   => absent,
-priority => 10,
-}
-
-apache::site { 'wikinews':
-ensure   => absent,
-priority => 11,
-}
-
-apache::site { 'loginwiki':
-ensure   => absent,
-priority => 12,
-}
-
-apache::site { 'wikimedia':
-ensure   => absent,
-priority => 16,
-}
-
-apache::site { 'wikivoyage':
-ensure   => absent,
-priority => 17,
-}
-
-apache::site { 'remnant':
-ensure   => absent,
-priority => 20,
-}
-
-}
diff --git a/modules/role/manifests/mediawiki/webserver.pp 
b/modules/role/manifests/mediawiki/webserver.pp
index 39d7e18..1a46330 100644
--- a/modules/role/manifests/mediawiki/webserver.pp
+++ b/modules/role/manifests/mediawiki/webserver.pp
@@ -4,9 +4,6 @@
 include ::mediawiki::web
 include ::mediawiki::web::sites
 include ::mediawiki::packages::fonts
-if $::realm == 'labs' {
-include ::mediawiki::web::beta_sites
-}
 
 if hiera('has_lvs', true) {
 include ::lvs::configuration

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdc60e5059223d694b5f9d06862f8f3c0d7cd3b4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Move production apache config files to templates

2016-11-20 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Move production apache config files to templates
..

Move production apache config files to templates

So we can add beta suffixes later

Bug: T1256
Change-Id: I15ff34ce1c125949b78c1953de407a6fb97c766b
---
M modules/mediawiki/manifests/web/prod_sites.pp
R modules/mediawiki/templates/apache/sites/main.conf.erb
R modules/mediawiki/templates/apache/sites/remnant.conf.erb
R modules/mediawiki/templates/apache/sites/wikimania.conf.erb
R modules/mediawiki/templates/apache/sites/wikimedia.conf.erb
5 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/322602/1

diff --git a/modules/mediawiki/manifests/web/prod_sites.pp 
b/modules/mediawiki/manifests/web/prod_sites.pp
index d5119cf..db71450 100644
--- a/modules/mediawiki/manifests/web/prod_sites.pp
+++ b/modules/mediawiki/manifests/web/prod_sites.pp
@@ -2,42 +2,42 @@
 tag 'mediawiki', 'mw-apache-config'
 
 apache::site { 'redirects':
-source   => 'puppet:///modules/mediawiki/apache/sites/redirects.conf',
+source   => 'puppet:///mediawiki/apache/sites/redirects.conf',
 priority => 2,
 }
 
 apache::site { 'main':
-source   => 'puppet:///modules/mediawiki/apache/sites/main.conf',
+content  => template('mediawiki/apache/sites/main.conf.erb'),
 priority => 3,
 }
 
 apache::site { 'remnant':
-source   => 'puppet:///modules/mediawiki/apache/sites/remnant.conf',
+content  => template('mediawiki/apache/sites/remnant.conf.erb'),
 priority => 4,
 }
 
 apache::site { 'search.wikimedia':
-source   => 
'puppet:///modules/mediawiki/apache/sites/search.wikimedia.conf',
+source   => 'puppet:///mediawiki/apache/sites/search.wikimedia.conf',
 priority => 5,
 }
 
 apache::site { 'secure.wikimedia':
-source   => 
'puppet:///modules/mediawiki/apache/sites/secure.wikimedia.conf',
+source   => 'puppet:///mediawiki/apache/sites/secure.wikimedia.conf',
 priority => 6,
 }
 
 apache::site { 'wikimania':
-source   => 'puppet:///modules/mediawiki/apache/sites/wikimania.conf',
+content  => template('mediawiki/apache/sites/wikimania.conf.erb'),
 priority => 7,
 }
 
 apache::site { 'wikimedia':
-source   => 'puppet:///modules/mediawiki/apache/sites/wikimedia.conf',
+content   => template('mediawiki/apache/sites/wikimedia.conf.erb'),
 priority => 8,
 }
 
 apache::site { 'foundation':
-source   => 'puppet:///modules/mediawiki/apache/sites/foundation.conf',
+source   => 'puppet:///mediawiki/apache/sites/foundation.conf',
 priority => 9,
 }
 }
diff --git a/modules/mediawiki/files/apache/sites/main.conf 
b/modules/mediawiki/templates/apache/sites/main.conf.erb
similarity index 100%
rename from modules/mediawiki/files/apache/sites/main.conf
rename to modules/mediawiki/templates/apache/sites/main.conf.erb
diff --git a/modules/mediawiki/files/apache/sites/remnant.conf 
b/modules/mediawiki/templates/apache/sites/remnant.conf.erb
similarity index 100%
rename from modules/mediawiki/files/apache/sites/remnant.conf
rename to modules/mediawiki/templates/apache/sites/remnant.conf.erb
diff --git a/modules/mediawiki/files/apache/sites/wikimania.conf 
b/modules/mediawiki/templates/apache/sites/wikimania.conf.erb
similarity index 100%
rename from modules/mediawiki/files/apache/sites/wikimania.conf
rename to modules/mediawiki/templates/apache/sites/wikimania.conf.erb
diff --git a/modules/mediawiki/files/apache/sites/wikimedia.conf 
b/modules/mediawiki/templates/apache/sites/wikimedia.conf.erb
similarity index 100%
rename from modules/mediawiki/files/apache/sites/wikimedia.conf
rename to modules/mediawiki/templates/apache/sites/wikimedia.conf.erb

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15ff34ce1c125949b78c1953de407a6fb97c766b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki...Genealogy[master]: Add composer test and comment out missing autoload class

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add composer test and comment out missing autoload class
..


Add composer test and comment out missing autoload class

Intermediary patch that adds PHP parallel-lint and make the MediaWiki
core test suite 'extensions' to pass.

Add parallel-lint to composer.json and invoke it via the composer 'test'
script.
Remove composer autoload for Genealogy.php, whenever MEDIAWIKI is not
defined, it die(1) which prevent parallel-lint from passing.
Comment out GenealogySpecial class from $wgAutoloadClasses, it is not in
the actual code base and cause MediaWiki test to fail.
Update .gitignore for composer and npm vendor directories.

Signed-off-by: Antoine Musso 
Change-Id: I53542574a013a9787892c5ccc8ff6cfb3c00a82e
---
A .gitignore
M Genealogy.php
M composer.json
3 files changed, 10 insertions(+), 4 deletions(-)

Approvals:
  Samwilson: Looks good to me, approved
  Hashar: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..47e36d5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/node_modules/
+/vendor/
+/composer.lock
diff --git a/Genealogy.php b/Genealogy.php
index ea3ce10..0e654ba 100644
--- a/Genealogy.php
+++ b/Genealogy.php
@@ -37,7 +37,7 @@
  * Class loading
  */
 $wgAutoloadClasses['GenealogyPerson']= __DIR__ . '/Person.php';
-$wgAutoloadClasses['GenealogySpecial']   = __DIR__ . '/Special.php';
+#$wgAutoloadClasses['GenealogySpecial']   = __DIR__ . '/Special.php';
 $wgAutoloadClasses['GenealogyCore']  = __DIR__ . '/Core.php';
 $wgAutoloadClasses['GenealogyTree']  = __DIR__ . '/Tree.php';
 $wgAutoloadClasses['GenealogyTraverser'] = __DIR__ . '/Traverser.php';
diff --git a/composer.json b/composer.json
index 8eab5b5..05d6462 100644
--- a/composer.json
+++ b/composer.json
@@ -18,9 +18,12 @@
},
"require": {
},
-   "autoload": {
-   "files" : [
-   "Genealogy.php"
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude node_modules --exclude 
vendor"
]
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53542574a013a9787892c5ccc8ff6cfb3c00a82e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Genealogy
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Samwilson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Re-use target widgets

2016-11-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Re-use target widgets
..

Re-use target widgets

Change-Id: Icba13d84e10cf18a6c68e26448b2efe93b8c42b8
Depends-On: I5ed0591048a17e84077bde5490e05c0467d0394a
---
M modules/ve-cite/ve.ui.MWReferenceDialog.js
1 file changed, 23 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/00/322600/1

diff --git a/modules/ve-cite/ve.ui.MWReferenceDialog.js 
b/modules/ve-cite/ve.ui.MWReferenceDialog.js
index 6504471..4bf6c10 100644
--- a/modules/ve-cite/ve.ui.MWReferenceDialog.js
+++ b/modules/ve-cite/ve.ui.MWReferenceDialog.js
@@ -151,14 +151,14 @@
  */
 ve.ui.MWReferenceDialog.prototype.canApply = function () {
return this.documentHasContent() &&
-   ( 
this.referenceTarget.getSurface().getModel().hasBeenModified() ||
+   ( this.referenceTarget.hasBeenModified() ||
this.referenceGroupInput.getValue() !== this.originalGroup );
 };
 
 /**
- * Handle reference surface change events
+ * Handle reference target widget change events
  */
-ve.ui.MWReferenceDialog.prototype.onSurfaceHistory = function () {
+ve.ui.MWReferenceDialog.prototype.onTargetChange = function () {
var hasContent = this.documentHasContent();
 
this.actions.setAbilities( {
@@ -229,7 +229,7 @@
  * @chainable
  */
 ve.ui.MWReferenceDialog.prototype.useReference = function ( ref ) {
-   var group, citeCommands;
+   var group;
 
// Properties
if ( ref instanceof ve.dm.MWReferenceModel ) {
@@ -240,31 +240,7 @@
this.referenceModel = new ve.dm.MWReferenceModel( 
this.getFragment().getDocument() );
}
 
-   // Cleanup
-   if ( this.referenceTarget ) {
-   this.referenceTarget.destroy();
-   }
-
-   citeCommands = Object.keys( 
ve.init.target.getSurface().commandRegistry.registry ).filter( function ( 
command ) {
-   return command.indexOf( 'cite-' ) !== -1;
-   } );
-
-   // Properties
-   this.referenceTarget = ve.init.target.createTargetWidget(
-   this.referenceModel.getDocument(),
-   {
-   tools: ve.copy( 
ve.init.target.constructor.static.toolbarGroups ),
-   includeCommands: 
this.constructor.static.includeCommands,
-   excludeCommands: 
this.constructor.static.excludeCommands.concat( citeCommands ),
-   importRules: this.constructor.static.getImportRules(),
-   inDialog: this.constructor.static.name
-   }
-   );
-
-   // Events
-   this.referenceTarget.getSurface().getModel().connect( this, {
-   history: this.onSurfaceHistory.bind( this )
-   } );
+   this.referenceTarget.setDocument( this.referenceModel.getDocument() );
 
// Initialization
this.originalGroup = this.referenceModel.getGroup();
@@ -272,7 +248,6 @@
this.referenceGroupInput.setDisabled( true );
this.referenceGroupInput.setValue( this.originalGroup );
this.referenceGroupInput.setDisabled( false );
-   this.contentFieldset.$element.append( this.referenceTarget.$element );
this.referenceTarget.initialize();
 
group = this.getFragment().getDocument().getInternalList()
@@ -294,6 +269,10 @@
  * @inheritdoc
  */
 ve.ui.MWReferenceDialog.prototype.initialize = function () {
+   var citeCommands = Object.keys( 
ve.init.target.getSurface().commandRegistry.registry ).filter( function ( 
command ) {
+   return command.indexOf( 'cite-' ) !== -1;
+   } );
+
// Parent method
ve.ui.MWReferenceDialog.super.prototype.initialize.call( this );
 
@@ -308,11 +287,23 @@
this.$reuseWarningText = $( '' );
this.$reuseWarning = $( '' ).append( 
this.reuseWarningIcon.$element, this.$reuseWarningText );
 
+   this.referenceTarget = ve.init.target.createTargetWidget(
+   {
+   tools: ve.copy( 
ve.init.target.constructor.static.toolbarGroups ),
+   includeCommands: 
this.constructor.static.includeCommands,
+   excludeCommands: 
this.constructor.static.excludeCommands.concat( citeCommands ),
+   importRules: this.constructor.static.getImportRules(),
+   inDialog: this.constructor.static.name
+   }
+   );
+
this.contentFieldset = new OO.ui.FieldsetLayout();
this.optionsFieldset = new OO.ui.FieldsetLayout( {
label: ve.msg( 'cite-ve-dialog-reference-options-section' ),
icon: 'settings'
} );
+   this.contentFieldset.$element.append( this.referenceTarget.$element );
+
this.referenceGroupInput = new ve.ui.MWReferenceGroupInputWidget( {
$overlay: 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: [BREAKING CHANGE] Allow target widgets to be re-used

2016-11-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: [BREAKING CHANGE] Allow target widgets to be re-used
..

[BREAKING CHANGE] Allow target widgets to be re-used

* Introduce #setDocument that re-creates the surface
  but keeps the toolbar.
* Make initial doc an optional config parameter.
* Re-emit history event so user doesn't have to re-bind
  when surface is changed.

This is a breaking change as it changes the constructor
signature.

Change-Id: I5ed0591048a17e84077bde5490e05c0467d0394a
---
M src/init/ve.init.Target.js
M src/ui/widgets/ve.ui.TargetWidget.js
2 files changed, 98 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/98/322598/1

diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 4db6b00..ccd20cf 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -348,12 +348,11 @@
  * Create a target widget.
  *
  * @method
- * @param {ve.dm.Document} dmDoc Document model
  * @param {Object} [config] Configuration options
  * @return {ve.ui.TargetWidget}
  */
-ve.init.Target.prototype.createTargetWidget = function ( dmDoc, config ) {
-   return new ve.ui.TargetWidget( dmDoc, config );
+ve.init.Target.prototype.createTargetWidget = function ( config ) {
+   return new ve.ui.TargetWidget( config );
 };
 
 /**
diff --git a/src/ui/widgets/ve.ui.TargetWidget.js 
b/src/ui/widgets/ve.ui.TargetWidget.js
index e2cd95d..2d846a0 100644
--- a/src/ui/widgets/ve.ui.TargetWidget.js
+++ b/src/ui/widgets/ve.ui.TargetWidget.js
@@ -7,20 +7,23 @@
 /**
  * Creates an ve.ui.TargetWidget object.
  *
+ * User must call #initialize after the widget has been attached
+ * to the DOM, and also after the document is changed with #setDocument.
+ *
  * @class
  * @abstract
  * @extends OO.ui.Widget
  *
  * @constructor
- * @param {ve.dm.Document} doc Document model
  * @param {Object} [config] Configuration options
+ * @cfg {ve.dm.Document} [doc] Initial document model
  * @cfg {Object[]} [tools] Toolbar configuration
  * @cfg {string[]|null} [includeCommands] List of commands to include, null 
for all registered commands
  * @cfg {string[]} [excludeCommands] List of commands to exclude
  * @cfg {Object} [importRules] Import rules
  * @cfg {string} [inDialog] The name of the dialog this surface widget is in
  */
-ve.ui.TargetWidget = function VeUiTargetWidget( doc, config ) {
+ve.ui.TargetWidget = function VeUiTargetWidget( config ) {
// Config initialization
config = config || {};
 
@@ -32,30 +35,25 @@
this.sequenceRegistry = config.sequenceRegistry || 
ve.init.target.getSurface().sequenceRegistry;
this.dataTransferHandlerFactory = config.dataTransferHandlerFactory || 
ve.init.target.getSurface().dataTransferHandlerFactory;
// TODO: Override document/targetTriggerListener
+   this.tools = config.tools;
+   this.includeCommands = config.includeCommands;
+   this.excludeCommands = config.excludeCommands;
+   this.importRules = config.importRules;
+   this.inDialog = config.inDialog;
 
-   this.surface = ve.init.target.createSurface( doc, {
-   inTargetWidget: true,
-   commandRegistry: this.commandRegistry,
-   sequenceRegistry: this.sequenceRegistry,
-   dataTransferHandlerFactory: this.dataTransferHandlerFactory,
-   includeCommands: config.includeCommands,
-   excludeCommands: config.excludeCommands,
-   importRules: config.importRules,
-   inDialog: config.inDialog
-   } );
+   this.surface = null;
+   this.toolbar = null;
// TODO: Use a TargetToolbar when trigger listeners are set here
-   this.toolbar = new ve.ui.Toolbar();
+   this.$surfaceContainer = $( '' ).addClass( 
've-ui-targetWidget-surface' );
+   this.$toolbarContainer = $( '' ).addClass( 
've-ui-targetWidget-toolbar' );
+
+   if ( config.doc ) {
+   this.setDocument( config.doc );
+   }
 
// Initialization
-   this.surface.$element.addClass( 've-ui-targetWidget-surface' );
-   this.toolbar.$element.addClass( 've-ui-targetWidget-toolbar' );
-   this.toolbar.$bar.append( this.surface.getToolbarDialogs().$element );
-   this.$element
-   .addClass( 've-ui-targetWidget' )
-   .append( this.toolbar.$element, this.surface.$element );
-   if ( config.tools ) {
-   this.toolbar.setup( config.tools, this.surface );
-   }
+   this.$element.addClass( 've-ui-targetWidget' )
+   .append( this.$toolbarContainer, this.$surfaceContainer );
 };
 
 /* Inheritance */
@@ -65,10 +63,75 @@
 /* Methods */
 
 /**
+ * The target's surface has been changed.
+ *
+ * @event change
+ */
+
+/**
+ * Set the document to edit
+ *
+ * @param {ve.dm.Document} doc Document
+ */

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Change of pagegenerator in test_pageid

2016-11-20 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Change of pagegenerator in test_pageid
..

Change of pagegenerator in test_pageid

On zh.wikisource (where test was failing) are no articles starting from A.
Because this test checks generator for page_id's and it doesn't matter what
generator was initially used, I'm changing it to -random.

Bug: T151168
Change-Id: I4dba6d50c74136306434d7286d492f8a9a8deb9b
---
M tests/pagegenerators_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/97/322597/1

diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 73b98a5..f0e123e 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -895,7 +895,7 @@
 """Test pageid parameter."""
 # Get reference pages and their pageids.
 gf = pagegenerators.GeneratorFactory(site=self.get_site())
-self.assertTrue(gf.handleArg('-prefixindex:a'))
+self.assertTrue(gf.handleArg('-random'))
 gf.handleArg('-limit:10')
 gen = gf.getCombinedGenerator()
 pages = list(gen)

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

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

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Lightweight RDFa] Disable extension, archived

2016-11-20 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Lightweight RDFa] Disable extension, archived
..


[Lightweight RDFa] Disable extension, archived

Change-Id: I4f8b967fe38269f745dd42d4f52d9f9c9bde63ee
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 8c8e6d7..e82c749 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1403,7 +1403,7 @@
 
 Life Web
 
-Lightweight RDFa
+# Lightweight RDFa // Archived per 
https://phabricator.wikimedia.org/T93727#2806421
 
 Lingo
 magicfile = Lingo/src/Lingo.i18n.magic.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f8b967fe38269f745dd42d4f52d9f9c9bde63ee
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Lightweight RDFa] Disable extension, archived

2016-11-20 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [Lightweight RDFa] Disable extension, archived
..

[Lightweight RDFa] Disable extension, archived

Change-Id: I4f8b967fe38269f745dd42d4f52d9f9c9bde63ee
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/96/322596/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 8c8e6d7..e82c749 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1403,7 +1403,7 @@
 
 Life Web
 
-Lightweight RDFa
+# Lightweight RDFa // Archived per 
https://phabricator.wikimedia.org/T93727#2806421
 
 Lingo
 magicfile = Lingo/src/Lingo.i18n.magic.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f8b967fe38269f745dd42d4f52d9f9c9bde63ee
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: Change last few config options from 'incr' to 'misc'

2016-11-20 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: Change last few config options from 'incr' to 'misc'
..

Change last few config options from 'incr' to 'misc'

default name of index.html template, default location of various directories,
cleanup method name, default configfile names and paths

Bug: T133547
Change-Id: I6572045ff95179c41509c583b4e16c241e7fd7a6
---
M xmldumps-backup/generateincrementals.py
M xmldumps-backup/miscdumplib.py
2 files changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/15/322515/1

diff --git a/xmldumps-backup/generateincrementals.py 
b/xmldumps-backup/generateincrementals.py
index a4ceca7..7ae241e 100644
--- a/xmldumps-backup/generateincrementals.py
+++ b/xmldumps-backup/generateincrementals.py
@@ -40,7 +40,7 @@
 log(self.verbose, "result for wiki %s is %s"
 % (wiki, result))
 text = text + "" + result + "\n"
-index_text = (self._config.read_template("incrs-index.html")
+index_text = (self._config.read_template(self._config.indextmpl)
   % {"items": text})
 FileUtils.write_file_in_place(self.indexfile.get_path(),
   index_text, self._config.fileperms)
@@ -188,7 +188,7 @@
 % self.wikiname)
 return DumpResults.TODO
 
-self.dumps_dirs.cleanup_old_incrdumps(self.date)
+self.dumps_dirs.cleanup_old_dumps(self.date)
 
 log(self.verbose, "Doing run for wiki: %s" % self.wikiname)
 
diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index c398db5..64c0e67 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -168,11 +168,11 @@
 
 home = os.path.dirname(sys.argv[0])
 if config_file is None:
-config_file = "dumpincr.conf"
+config_file = "miscdumps.conf"
 self.files = [
 os.path.join(home, config_file),
-"/etc/dumpincrementals.conf",
-os.path.join(os.getenv("HOME"), ".dumpincr.conf")]
+"/etc/miscdumps.conf",
+os.path.join(os.getenv("HOME"), ".miscdumps.conf")]
 
 self.conf = ConfigParser.SafeConfigParser(defaults)
 self.conf.read(self.files)
@@ -202,6 +202,7 @@
 self.conf.add_section('output')
 self.dump_dir = self.conf.get("output", "dumpdir")
 self.temp_dir = self.conf.get("output", "temp")
+self.indextmpl = self.conf.get("output", "indextmpl")
 self.template_dir = self.conf.get("output", "templatedir")
 self.webroot = self.conf.get("output", "webroot")
 fileperms = self.conf.get("output", "fileperms")
@@ -277,7 +278,7 @@
 dates = sorted(dates)
 return dates
 
-def cleanup_old_incrdumps(self, date):
+def cleanup_old_dumps(self, date):
 old = self.get_misc_dumpdirs()
 if old:
 if old[-1] == date:
@@ -289,7 +290,7 @@
 shutil.rmtree("%s" % to_remove)
 
 def get_latest_dump_date(self, dumpok=False):
-# find the most recent incr dump
+# find the most recent dump
 dirs = self.get_misc_dumpdirs()
 if dirs:
 if dumpok:
@@ -311,10 +312,11 @@
 "closedwikislist": "",
 "skipwikislist": "",
 # "output": {
-"dumpsdir": "/dumps/public/incr",
+"dumpsdir": "/dumps/public/misc",
 "templatedir": "/dumps/templates",
+"indextmpl": "miscdumps-index.tmpl",
 "temp": "/dumps/temp",
-"webroot": "http://localhost/dumps/incr;,
+"webroot": "http://localhost/dumps/misc;,
 "fileperms": "0640",
 "maxrevidstaleinterval": "3600",
 # "database": {

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: a bit of pylint: order of imports, var initialization type w...

2016-11-20 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: a bit of pylint: order of imports, var initialization type 
whines
..

a bit of pylint: order of imports, var initialization type whines

Change-Id: I9ca1067e32772dd427102c3ae8593b03b9478816
---
M xmldumps-backup/miscdumplib.py
1 file changed, 9 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/13/322513/1

diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index deeac80..ba754bf 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -1,14 +1,14 @@
 # shared classes for misc dumps (incrementals, html, etc)
 import os
+from os.path import exists
 import sys
 import re
-import ConfigParser
-import dumps.WikiDump
-from dumps.WikiDump import FileUtils, MiscUtils
-from os.path import exists
 import socket
 import shutil
 import time
+import ConfigParser
+import dumps.WikiDump
+from dumps.WikiDump import FileUtils, MiscUtils
 
 
 def log(verbose, message):
@@ -133,10 +133,7 @@
 timestamp = os.stat(self.lockfile.get_path()).st_mtime
 except Exception as ex:
 return False
-if (time.time() - timestamp) > self._config.stale_interval:
-return True
-else:
-return False
+return (time.time() - timestamp) > self._config.stale_interval
 
 def unlock(self):
 os.remove(self.lockfile.get_path())
@@ -207,10 +204,10 @@
 self.temp_dir = self.conf.get("output", "temp")
 self.template_dir = self.conf.get("output", "templatedir")
 self.webroot = self.conf.get("output", "webroot")
-self.fileperms = self.conf.get("output", "fileperms")
-self.fileperms = int(self.fileperms, 0)
-self.stale_interval = self.conf.get("output", "maxrevidstaleinterval")
-self.stale_interval = int(self.stale_interval, 0)
+fileperms = self.conf.get("output", "fileperms")
+self.fileperms = int(fileperms, 0)
+stale_interval = self.conf.get("output", "maxrevidstaleinterval")
+self.stale_interval = int(stale_interval, 0)
 
 if not self.conf.has_section('tools'):
 self.conf.add_section('tools')

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: move methods that dump things into the IncrDump class in inc...

2016-11-20 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: move methods that dump things into the IncrDump class in 
incr_dump
..

move methods that dump things into the IncrDump class in incr_dump

this means revid, stubs, content are now handled out of the incr dump
module, getting closer to leaving the caller as a generic misc dump
wrapper

Bug: T133547
Change-Id: I22b9a92647704132f33589fa010bb150a19c60b1
---
M xmldumps-backup/generateincrementals.py
M xmldumps-backup/incr_dumps.py
2 files changed, 93 insertions(+), 67 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/11/322511/1

diff --git a/xmldumps-backup/generateincrementals.py 
b/xmldumps-backup/generateincrementals.py
index eba039a..da3293b 100644
--- a/xmldumps-backup/generateincrementals.py
+++ b/xmldumps-backup/generateincrementals.py
@@ -20,10 +20,10 @@
 from incr_dumps import StubFile
 from incr_dumps import RevsFile
 from incr_dumps import DumpConfig
+from incr_dumps import cutoff_from_date
 from dumps.WikiDump import Wiki
 from dumps.exceptions import BackupError
 from dumps.WikiDump import FileUtils, TimeUtils
-from dumps.utils import RunSimpleCommand, MultiVersion
 
 
 class Index(object):
@@ -191,7 +191,7 @@
 log(self.verbose, "Doing run for wiki: %s" % self.wikiname)
 
 try:
-max_revid = self.dump_max_revid()
+max_revid = self.incr.dump_max_revid()
 if not max_revid:
 return DumpResults.FAILED
 
@@ -200,11 +200,11 @@
 return DumpResults.FAILED
 
 if self.do_stubs:
-if not self.dump_stub(prev_revid, max_revid):
+if not self.incr.dump_stub(prev_revid, max_revid):
 return DumpResults.FAILED
 
 if self.do_revs:
-if not self.dump_revs():
+if not self.incr.dump_revs():
 return DumpResults.FAILED
 
 if not self.dryrun:
@@ -225,62 +225,6 @@
 log(self.verbose, "Success!  Wiki %s incremental dump complete."
 % self.wikiname)
 return DumpResults.GOOD
-
-def dump_max_revid(self):
-if not self.max_revid_obj.exists(self.date):
-log(self.verbose, "Wiki %s retrieving max revid from db."
-% self.wikiname)
-self.max_revid_obj.record_max_revid()
-max_revid = self.max_revid_obj.max_id
-else:
-max_revid = self.max_revid_obj.read_max_revid_from_file()
-
-# end rev id is not included in dump
-if max_revid is not None:
-max_revid = str(int(max_revid) + 1)
-
-log(self.verbose, "max_revid is %s" % safe(max_revid))
-return max_revid
-
-def dump_stub(self, start_revid, end_revid):
-script_command = MultiVersion.mw_script_as_array(self._config,
- "dumpBackup.php")
-command = [self._config.php]
-command.extend(script_command)
-command.extend(["--wiki=%s" % self.wikiname, "--stub", "--quiet",
-"--output=gzip:%s" % self.stubfile.get_path(),
-"--revrange", "--revstart=%s" % start_revid,
-"--revend=%s" % end_revid])
-if self.dryrun:
-print "would run command for stubs dump:", command
-else:
-success = RunSimpleCommand.run_with_no_output(
-command, shell=False, verbose=self.verbose)
-if not success:
-log(self.verbose, "error producing stub files for wiki %s"
-% self.wikiname)
-return False
-return True
-
-def dump_revs(self):
-script_command = MultiVersion.mw_script_as_array(self._config,
- "dumpTextPass.php")
-command = [self._config.php]
-command.extend(script_command)
-command.extend(["--wiki=%s" % self.wikiname,
-"--stub=gzip:%s" % self.stubfile.get_path(),
-"--quiet",
-"--spawn=%s" % self._config.php,
-"--output=bzip2:%s" % self.revsfile.get_path()])
-if self.dryrun:
-print "would run command for revs dump:", command
-else:
-success = RunSimpleCommand.run_with_no_output(command, shell=False)
-if not success:
-log(self.verbose, "error producing revision text files"
-" for wiki" % self.wikiname)
-return False
-return True
 
 def md5sum_one_file(self, filename):
 summer = hashlib.md5()
@@ -349,12 +293,6 @@
 raise BackupError("Too many consecutive failures,"
  

[MediaWiki-commits] [Gerrit] operations/dumps[master]: move more incremental-related methods out to incr_dumps module

2016-11-20 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: move more incremental-related methods out to incr_dumps module
..

move more incremental-related methods out to incr_dumps module

the baby IncrDump class there will eventually also include a
run method which will be called by DumpOne and DumpLoop
methods in a generic misc dump wrapper.

Bug: T133547
Change-Id: I543c87d4123417a3c33f984f38800f83b967967d
---
M xmldumps-backup/generateincrementals.py
M xmldumps-backup/incr_dumps.py
M xmldumps-backup/miscdumplib.py
3 files changed, 112 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/10/322510/1

diff --git a/xmldumps-backup/generateincrementals.py 
b/xmldumps-backup/generateincrementals.py
index 8ced865..d02121e 100644
--- a/xmldumps-backup/generateincrementals.py
+++ b/xmldumps-backup/generateincrementals.py
@@ -11,15 +11,16 @@
 import hashlib
 import traceback
 import calendar
-from miscdumplib import Config
+from miscdumplib import MiscDumpDir
 from miscdumplib import StatusFile, IndexFile
 from miscdumplib import MD5File, MiscDumpDirs, MiscDumpDir
 from miscdumplib import IncrDumpLock, StatusInfo
 from miscdumplib import log, safe, make_link
+from incr_dumps import IncrDump
 from incr_dumps import MaxRevID
-from incr_dumps import MaxRevIDFile
 from incr_dumps import StubFile
 from incr_dumps import RevsFile
+from incr_dumps import DumpConfig
 from dumps.WikiDump import Wiki
 from dumps.exceptions import BackupError
 from dumps.WikiDump import FileUtils, TimeUtils
@@ -142,7 +143,7 @@
 GOOD = 0
 
 
-class IncrDump(object):
+class IncrDumpOne(object):
 def __init__(self, config, date, cutoff, wikiname, do_stubs,
  do_revs, do_index_update, dryrun, verbose, forcerun):
 self._config = config
@@ -163,6 +164,7 @@
 self.revsfile = RevsFile(self._config, self.date, self.wikiname)
 self.incr_dumps_dirs = MiscDumpDirs(self._config, self.wikiname)
 self.verbose = verbose
+self.incr = IncrDump(self.wiki, self.dryrun, self.verbose)
 
 def do_one_wiki(self):
 if (self.wikiname not in self._config.private_wikis_list and
@@ -194,7 +196,7 @@
 if not max_revid:
 return DumpResults.FAILED
 
-prev_revid = self.get_prev_revid(max_revid)
+prev_revid = self.incr.get_prev_revid(max_revid)
 if not prev_revid:
 return DumpResults.FAILED
 
@@ -240,66 +242,6 @@
 
 log(self.verbose, "max_revid is %s" % safe(max_revid))
 return max_revid
-
-def get_prev_incrdate(self, date, dumpok=False, revidok=False):
-# find the most recent incr dump before the
-# specified date
-# if "dumpok" is True, find most recent dump that completed 
successfully
-# if "revidok" is True, find most recent dump that has a populated 
maxrevid.txt file
-
-previous = None
-old = self.incr_dumps_dirs.get_misc_dumpdirs()
-if old:
-for dump in old:
-if dump == date:
-return previous
-else:
-if dumpok:
-status_info = StatusInfo(self._config, dump, 
self.wikiname)
-if status_info.get_status(dump) == "done":
-previous = dump
-elif revidok:
-max_revid_file = MaxRevIDFile(self._config, dump, 
self.wikiname)
-if exists(max_revid_file.get_path()):
-revid = 
FileUtils.read_file(max_revid_file.get_path().rstrip())
-if int(revid) > 0:
-previous = dump
-else:
-previous = dump
-return previous
-
-def get_prev_revid(self, max_revid):
-# get the previous rundate, with or without maxrevid file
-# we can populate that file if need be
-prev_date = self.get_prev_incrdate(self.date)
-log(self.verbose, "prev_date is %s" % safe(prev_date))
-
-prev_revid = None
-
-if prev_date:
-prev_revid = self.max_revid_obj.read_max_revid_from_file(prev_date)
-
-if prev_revid is None:
-log(self.verbose, "Wiki %s retrieving prevRevId from db."
-% self.wikiname)
-prev_revid_obj = MaxRevID(self.wiki,
-  cutoff_from_date(prev_date, 
self._config),
-  self.dryrun)
-prev_revid_obj.record_max_revid()
-prev_revid = prev_revid_obj.max_id
-else:
-log(self.verbose, "Wiki %s no previous runs, using %s - 10 "
-% (self.wikiname, max_revid))
-

[MediaWiki-commits] [Gerrit] operations/dumps[master]: MiscDir becomes MiscDumpDir. naming is hard, etc.

2016-11-20 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: MiscDir becomes MiscDumpDir.  naming is hard, etc.
..

MiscDir becomes MiscDumpDir.  naming is hard, etc.

Change-Id: I29e591f8659d057a97430d973ff4d132cd328bfb
---
M xmldumps-backup/generateincrementals.py
M xmldumps-backup/miscdumplib.py
2 files changed, 6 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/09/322509/1

diff --git a/xmldumps-backup/generateincrementals.py 
b/xmldumps-backup/generateincrementals.py
index 6dc3e39..0e6735c 100644
--- a/xmldumps-backup/generateincrementals.py
+++ b/xmldumps-backup/generateincrementals.py
@@ -12,7 +12,6 @@
 import traceback
 import calendar
 from miscdumplib import Config
-from miscdumplib import MiscDir
 from miscdumplib import StatusFile, IndexFile
 from miscdumplib import MD5File, MiscDumpDirs
 from miscdumplib import IncrDumpLock, StatusInfo
@@ -32,7 +31,7 @@
 self._config = config
 self.date = date
 self.indexfile = IndexFile(self._config)
-self.incrdir = MiscDir(self._config)
+self.incrdir = MiscDumpDir(self._config)
 self.verbose = verbose
 
 def do_all_wikis(self):
@@ -152,7 +151,7 @@
 self.wiki.set_date(self.date)
 self.cutoff = cutoff
 self.wikiname = wikiname
-self.incrdir = MiscDir(self._config, self.date)
+self.incrdir = MiscDumpDir(self._config, self.date)
 self.do_stubs = do_stubs
 self.do_revs = do_revs
 self.do_index_update = do_index_update
diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index 4028e59..bb54f43 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -31,7 +31,7 @@
 def __init__(self, config, date, wikiname):
 self._config = config
 self.date = date
-self.dump_dir = MiscDir(self._config, date)
+self.dump_dir = MiscDumpDir(self._config, date)
 self.wikiname = wikiname
 
 # override this.
@@ -79,7 +79,7 @@
 class IndexFile(ContentFile):
 def __init__(self, config):
 self._config = config
-self.dump_dir = MiscDir(self._config)
+self.dump_dir = MiscDumpDir(self._config)
 
 def get_filename(self):
 return "index.html"
@@ -246,7 +246,7 @@
 return FileUtils.read_file(template)
 
 
-class MiscDir(object):
+class MiscDumpDir(object):
 def __init__(self, config, date=None):
 self._config = config
 self.date = date
@@ -268,7 +268,7 @@
 def __init__(self, config, wikiname):
 self._config = config
 self.wikiname = wikiname
-self.dump_dir = MiscDir(self._config)
+self.dump_dir = MiscDumpDir(self._config)
 
 def get_misc_dumpdirs(self):
 base = self.dump_dir.get_dumpdir_no_date(self.wikiname)

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Make parsing site's parameters resistant to broken namespace...

2016-11-20 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Make parsing site's parameters resistant to broken namespace 
alias
..

Make parsing site's parameters resistant to broken namespace alias

Bug: T151146
Change-Id: I917caec8f5e78a80c221c941e71feb86861b401c
---
M pywikibot/site.py
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/08/322508/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index f4267ca..693644a 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2635,8 +2635,13 @@
 
 for item in self.siteinfo.get('namespacealiases'):
 ns = int(item['id'])
-if item['*'] not in _namespaces[ns]:
-_namespaces[ns].aliases.append(item['*'])
+try:
+if item['*'] not in _namespaces[ns]:
+_namespaces[ns].aliases.append(item['*'])
+except KeyError:
+pywikibot.warning(
+'Broken namespace alias "{}" (id: {}) on {}'.format(
+item['*'], item['id'], self))
 
 return _namespaces
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix test for Wikipedia entities that have ORES installed

2016-11-20 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Fix test for Wikipedia entities that have ORES installed
..

Fix test for Wikipedia entities that have ORES installed

Bug: T151156
Change-Id: Iee0d85d3de2e836b3d7bdbec3f3fc83e02e6e4c5
---
M tests/paraminfo_tests.py
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py
index 871b863..03d0a5b 100644
--- a/tests/paraminfo_tests.py
+++ b/tests/paraminfo_tests.py
@@ -81,6 +81,10 @@
 if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'):
 types.append('unread')
 
+wikipedia_ORES_installed = ('en', 'fa', 'nl', 'pl', 'pt', 'ru', 'tr')
+if self.site.family == 'wikipedia' and self.site.lang in 
wikipedia_ORES_installed:
+types.append('oresreview')
+
 known = types + ['!%s' % item for item in types]
 
 self._check_param_values(self.site, 'query+watchlist', 'show', known)

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Rollback to old limit in deprecated generator

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rollback to old limit in deprecated generator
..


Rollback to old limit in deprecated generator

We decided to leave intrinsic limit in deprecated page generator.
It will in fact made test_logevents_default passed.

Bug: T151150
Change-Id: I70613731b697ad156ddad0ea9c5ef347df8454c0
---
M pywikibot/pagegenerators.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index a664119..f2f68de 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -906,7 +906,7 @@
 # exclude -log, -nolog
 if log == 'log' and mode not in ['-', '-no'] and not tail:
 mode = mode[1:]
-total = None
+total = 500
 if value:
 try:
 total = int(value)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70613731b697ad156ddad0ea9c5ef347df8454c0
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Ignore non-items inside query results

2016-11-20 Thread Code Review
Matěj Suchánek has uploaded a new change for review.

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

Change subject: Ignore non-items inside query results
..

Ignore non-items inside query results

Make use of new classmethod WikibasePage.isValidID().

Bug: T138364
Change-Id: I08ecc9cf24a26b17dd5f69abd0d75466f78715e8
---
M pywikibot/pagegenerators.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/322506/2

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index d4677e7..6b53b8b 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -2701,7 +2701,8 @@
 data = query_object.get_items(query,
   item_name=item_name,
   result_type=result_type)
-items_pages = (pywikibot.ItemPage(repo, item) for item in data)
+items_pages = (pywikibot.ItemPage(repo, item) for item in data
+   if pywikibot.ItemPage.isValidID(item))
 if isinstance(site, pywikibot.site.DataSite):
 return items_pages
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08ecc9cf24a26b17dd5f69abd0d75466f78715e8
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Replace jshint/jscs with eslint/stylelint

2016-11-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Replace jshint/jscs with eslint/stylelint
..

Replace jshint/jscs with eslint/stylelint

Change-Id: Ife5e782bd5513e0496e384655b9b203de5c841a5
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
A .stylelintrc
M Gruntfile.js
M modules/ext.wikiEditor.toolbar.styles.less
M modules/jquery.wikiEditor.dialogs.config.js
M modules/jquery.wikiEditor.dialogs.config.less
M modules/jquery.wikiEditor.dialogs.js
M modules/jquery.wikiEditor.dialogs.less
M modules/jquery.wikiEditor.js
M modules/jquery.wikiEditor.less
M modules/jquery.wikiEditor.preview.js
M modules/jquery.wikiEditor.preview.less
M modules/jquery.wikiEditor.publish.js
M modules/jquery.wikiEditor.toolbar.config.js
M modules/jquery.wikiEditor.toolbar.js
M modules/jquery.wikiEditor.toolbar.less
M package.json
M tests/qunit/ext.wikiEditor.toolbar.test.js
21 files changed, 3,839 insertions(+), 3,790 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/05/322505/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife5e782bd5513e0496e384655b9b203de5c841a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix of content model test for en.wiki

2016-11-20 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Fix of content model test for en.wiki
..

Fix of content model test for en.wiki

It occurs that en.wiki community resign from testing Flow extension,
see: 
https://en.wikipedia.org/w/index.php?title=Wikipedia_talk%3AFlow=revision=747714460=740611006

Bug: T151151
Change-Id: Ib0d57028a410062e792bfdba2ccf0568c254ec12
---
M tests/paraminfo_tests.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/04/322504/1

diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py
index 871b863..80b1233 100644
--- a/tests/paraminfo_tests.py
+++ b/tests/paraminfo_tests.py
@@ -149,6 +149,9 @@
 self._check_param_subset(self.site, 'parse', 'contentmodel', base)
 
 if isinstance(self.site.family, WikimediaFamily):
+# T151151 - en.wiki uninstalled Flow extension:
+if self.site.family == 'wikipedia' and self.site.lang == 'en':
+wmf.remove('flow-board')
 self._check_param_subset(self.site, 'parse', 'contentmodel', wmf)
 
 def test_revision_deletion_type(self):

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Fix bug introduced in the previous commit, optimisations

2016-11-20 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review.

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

Change subject: Fix bug introduced in the previous commit, optimisations
..

Fix bug introduced in the previous commit, optimisations

Bugs:
* when the server name is cached in a file versions.php, only the filenames
  used for the configuration were written in this file, but this is not
  sufficient to re-create LS.php if origin config files were changed, so
  re-introduced the complete information in the cache file

Code:
* micro-optimisation: when checking presence of LS.php, directly answer no
  if there is no LS.php instead of answering no after checking origin config
  files
* do not invalidate LS.php when an executable PHP file is changed: given this
  one is always executed, there is no need of invalidating the cached LS.php

Change-Id: I54f17a0b94bb39fd9054475258a96e1cdfe402fb
---
M src/MediaWikiFarm.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 52de18a..be28e78 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -317,12 +317,7 @@
if( $this->cacheDir ) {
$variables = $this->variables;
$variables['$CORECONFIG'] = 
$this->farmConfig['coreconfig'];
-   $variables['$CONFIG'] = array();
-   foreach( $this->farmConfig['config'] as $file ) {
-   if( is_array( $file ) && ! ( array_key_exists( 
'executable', $file ) && $file['executable'] ) ) {
-   $variables['$CONFIG'][] = $file['file'];
-   }
-   }
+   $variables['$CONFIG'] = $this->farmConfig['config'];
$versions = $this->readFile( 'versions.php', dirname( 
$this->cacheDir ), false );
if( !is_array( $versions ) ) {
$versions = array();
@@ -905,10 +900,15 @@
$localSettingsFile = $this->cacheDir . '/' . 
$this->replaceVariables( 'LocalSettings-$SUFFIX-$WIKIID.php' );
}
 
+   # Check there is a LocalSettings.php file
+   if( !is_file( $localSettingsFile ) ) {
+   return false;
+   }
+
# Check modification time of original config files
$oldness = 0;
foreach( $this->farmConfig['config'] as $configFile ) {
-   if( !is_array( $configFile ) || !is_string( 
$configFile['file'] ) ) {
+   if( !is_array( $configFile ) || !is_string( 
$configFile['file'] ) || ( array_key_exists( 'executable', $configFile ) && 
$configFile['executable'] ) ) {
continue;
}
$file = $this->configDir . '/' . 
$this->replaceVariables( $configFile['file'] );
@@ -918,7 +918,7 @@
$oldness = max( $oldness, filemtime( $file ) );
}
 
-   return is_file( $localSettingsFile ) && ( filemtime( 
$localSettingsFile ) >= $oldness );
+   return filemtime( $localSettingsFile ) >= $oldness;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54f17a0b94bb39fd9054475258a96e1cdfe402fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 

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


[MediaWiki-commits] [Gerrit] pywikibot/compat[master]: Decommission compat

2016-11-20 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: Decommission compat
..

Decommission compat

- update CONTENTS file and add a deprecation warning
- update copyright not in LICENSE file
- provide a user warning for decommission compat but only show it once.
  The throttle.ctl is used by all scripts. Use it to remember whether
  a deprecation warning is already shown to the operator.

Change-Id: I395c3560e954ccef183636b5c0b0d4e8288bc6ab
---
M CONTENTS
M LICENSE
M pywikibot/throttle.py
3 files changed, 60 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/02/322502/1

diff --git a/CONTENTS b/CONTENTS
index ff60416..5a15700 100644
--- a/CONTENTS
+++ b/CONTENTS
@@ -2,14 +2,29 @@
 example robots are included.
 
 ===
+PLEASE NOTE: This pywikibot branch is deprecated. You may use it but no
+bug fixes, features or support is provided by the pywikibot developer
+team anymore. This package only runs for MediaWiki versions not higher
+than 1.27. Python version 2.7.2 or higher is needed but Python 3.X is
+not supported.
+
+Please use the new core branch of the pywikibot framework which supports
+MediaWiki version 1.14 upto the current version and Python release 2.7.2
+and higher as well as 3.3 and higher. Compat scripts are already migrated
+to core branch and there is a migrating tool which helps converting of
+your private scripts. 
+
+To get started on proper usage of the new bot framework, please refer to:
+
+http://www.mediawiki.org/wiki/Manual:Pywikibot
+
+===
+
+---
 PLEASE DO NOT PLAY WITH THIS PACKAGE. These programs can actually
 modify the live wiki on the net, and proper wiki-etiquette should
 be followed before running it on any wiki.
-===
-
-To get started on proper usage of the bot framework, please refer to:
-
-http://www.mediawiki.org/wiki/Manual:Pywikibot
+---
 
 The contents of the package are:
 
@@ -311,10 +326,7 @@
 
 You need to have at least python version 2.7.2 
(http://www.python.org/download/)
 or newer installed on your computer to be able to run any of the code in this
-package, but not 3.x, because pywikibot is still not updated to it! Support
-for older versions of python is not planned. Some scripts could run with older
-python releases. Please refer the manual at mediawiki for further details and
-restrictions.
+package, but not 3.x. Support for other versions of python is not planned.
 
 You do not need to "install" this package to be able to make use of
 it. You can actually just run it from the directory where you unpacked
diff --git a/LICENSE b/LICENSE
index 724e5a4..3ca9422 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2015 Pywikibot team
+Copyright (c) 2004-2016 Pywikibot team
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py
index 08b1383..c9e1bab 100644
--- a/pywikibot/throttle.py
+++ b/pywikibot/throttle.py
@@ -33,6 +33,9 @@
 access.
 
 """
+
+message = 'Compat deprecation warning shown\n'
+
 def __init__(self, mindelay=None, maxdelay=None, writedelay=None,
  multiplydelay=True, verbosedelay=False, write=False):
 self.lock = threading.RLock()
@@ -64,9 +67,31 @@
 self.setDelay()
 self.write = write
 
+def _show_warning(self):
+"""Show compat deprecation waring once."""
+pywikibot.input("""\03{lightyellow}
+PLEASE NOTE: compat pywikibot branch is deprecated. You may use it but no
+bug fixes, features or support is provided by the pywikibot developer
+team anymore.
+
+This package only runs for MediaWiki versions not higher than 1.27.
+
+Please use the new core branch of the pywikibot framework which supports
+the current version of MediaWiki. Compat scripts are already migrated
+to core branch and there is a migrating tool which helps converting of
+your private scripts. 
+
+Please refer to:
+http://www.mediawiki.org/wiki/Manual:Pywikibot
+https://phabricator.wikimedia.org/T99365
+
+Press  to continue.
+\03{default}""")
+
 def checkMultiplicity(self):
 """Count running processes for site and set process_multiplicity."""
 global pid
+warning = True
 self.lock.acquire()
 mysite = self.mysite = str(pywikibot.getSite())
 if pywikibot.verbose:
@@ -86,6 +111,9 @@
 else:
 now = time.time()
 for line in f.readlines():
+

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix deprecation message for pagegenerator

2016-11-20 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Fix deprecation message for pagegenerator
..

Fix deprecation message for pagegenerator

After removal of intrinsic limits in page generators old style of log generator
doesn't have default limit set to 500. We also should not render there None,
so default total value was changes from None to ''.

Bug: T151150
Change-Id: I70613731b697ad156ddad0ea9c5ef347df8454c0
---
M pywikibot/pagegenerators.py
M tests/pagegenerators_tests.py
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/01/322501/1

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index a664119..8275b5a 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -906,7 +906,7 @@
 # exclude -log, -nolog
 if log == 'log' and mode not in ['-', '-no'] and not tail:
 mode = mode[1:]
-total = None
+total = ''
 if value:
 try:
 total = int(value)
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 73b98a5..09e8808 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1094,7 +1094,7 @@
 gf = pagegenerators.GeneratorFactory(site=self.site)
 self.assertTrue(gf.handleArg('-newuserslog'))
 self.assertOneDeprecationParts('The usage of "-newuserslog"',
-   '-logevents:"newusers,,500"')
+   '-logevents:"newusers,,"')
 gen = gf.getCombinedGenerator()
 self.assertIsNotNone(gen)
 pages = set(gen)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Check if a property exist, before accessing it

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Check if a property exist, before accessing it
..


Check if a property exist, before accessing it

Bug: T151125
Change-Id: I9e9802880d529029974c8627b732b818f4f89ac1
---
M handlers/TextHandler/TextHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/handlers/TextHandler/TextHandler.php 
b/handlers/TextHandler/TextHandler.php
index 8ea8ebb..8e245c3 100644
--- a/handlers/TextHandler/TextHandler.php
+++ b/handlers/TextHandler/TextHandler.php
@@ -268,7 +268,7 @@
$textTracks = [];
if ( $data !== null && $data['query'] && 
$data['query']['pages'] ) {
foreach ( $data['query']['pages'] as $page ) {
-   if ( $page['videoinfo'] ) {
+   if ( isset( $page['videoinfo'] ) && 
$page['videoinfo'] ) {
foreach ( $page['videoinfo'] as $info ) 
{
if ( $info['timedtext'] ) {
foreach ( 
$info['timedtext'] as $track ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e9802880d529029974c8627b732b818f4f89ac1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MtDu 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update claim about India location after Wikidata

2016-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update claim about India location after Wikidata
..


Update claim about India location after Wikidata

Change on Wikidata: 
https://www.wikidata.org/w/index.php?title=Q668=revision=351680571=349146546

Bug: T151147
Change-Id: Ie2e542ec0341a0087590cd37be2af69b86a6dbd3
---
M tests/pagegenerators_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index c2d963e..73b98a5 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -705,7 +705,7 @@
 """Test ItemClaimFilterPageGenerator on sample page without 
qualifiers."""
 self._simple_claim_test('P474', '+91', None, True)
 self._simple_claim_test('P463', 'Q37470', None, True)
-self._simple_claim_test('P625', '21,78', None, True)
+self._simple_claim_test('P625', '21,77', None, True)
 self._simple_claim_test('P625', '21,78.05,0.01', None, False)
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2e542ec0341a0087590cd37be2af69b86a6dbd3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix typehints & docs in ConsistentReadConnectionManager

2016-11-20 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Fix typehints & docs in ConsistentReadConnectionManager
..

Fix typehints & docs in ConsistentReadConnectionManager

Change-Id: I05796726055f6c1be1ae8281d43791314e7b82c4
---
M client/includes/Store/Sql/ConsistentReadConnectionManager.php
1 file changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/client/includes/Store/Sql/ConsistentReadConnectionManager.php 
b/client/includes/Store/Sql/ConsistentReadConnectionManager.php
index 2a951a1..024cf59 100644
--- a/client/includes/Store/Sql/ConsistentReadConnectionManager.php
+++ b/client/includes/Store/Sql/ConsistentReadConnectionManager.php
@@ -2,7 +2,7 @@
 
 namespace Wikibase\Client\Store\Sql;
 
-use DatabaseBase;
+use Database;
 use IDatabase;
 use InvalidArgumentException;
 use LoadBalancer;
@@ -77,7 +77,7 @@
 * ConsistentReadConnectionManager instance, this method will return a 
connection to the master database,
 * to avoid inconsistencies.
 *
-* @return DatabaseBase
+* @return Database
 */
public function getReadConnection() {
$dbIndex = $this->forceMaster ? DB_MASTER : DB_SLAVE;
@@ -88,14 +88,14 @@
 * Returns a connection to the master DB, for updating. The connection 
should later be released
 * by calling releaseConnection().
 *
-* @return DatabaseBase
+* @return Database
 */
public function getWriteConnection() {
return $this->loadBalancer->getConnection( DB_MASTER, array(), 
$this->dbName );
}
 
/**
-* @param DatabaseBase $db
+* @param IDatabase $db
 */
public function releaseConnection( IDatabase $db ) {
$this->loadBalancer->reuseConnection( $db );
@@ -110,7 +110,7 @@
 *
 * @param string $fname
 *
-* @return DatabaseBase
+* @return Database
 */
public function beginAtomicSection( $fname ) {
// Once we have written to master, do not read from slave.
@@ -122,19 +122,19 @@
}
 
/**
-* @param DatabaseBase $db
+* @param Database $db
 * @param string $fname
 */
-   public function commitAtomicSection( IDatabase $db, $fname ) {
+   public function commitAtomicSection( Database $db, $fname ) {
$db->endAtomic( $fname );
$this->releaseConnection( $db );
}
 
/**
-* @param DatabaseBase $db
+* @param Database $db
 * @param string $fname
 */
-   public function rollbackAtomicSection( IDatabase $db, $fname ) {
+   public function rollbackAtomicSection( Database $db, $fname ) {
//FIXME: there does not seem to be a clean way to roll back an 
atomic section?!
$db->rollback( $fname, 'flush' );
$this->releaseConnection( $db );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05796726055f6c1be1ae8281d43791314e7b82c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update claim about India location after Wikidata

2016-11-20 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Update claim about India location after Wikidata
..

Update claim about India location after Wikidata

Change on Wikidata: 
https://www.wikidata.org/w/index.php?title=Q668=revision=351680571=349146546

Bug: T151147
Change-Id: Ie2e542ec0341a0087590cd37be2af69b86a6dbd3
---
M tests/pagegenerators_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/97/322497/1

diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index c2d963e..73b98a5 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -705,7 +705,7 @@
 """Test ItemClaimFilterPageGenerator on sample page without 
qualifiers."""
 self._simple_claim_test('P474', '+91', None, True)
 self._simple_claim_test('P463', 'Q37470', None, True)
-self._simple_claim_test('P625', '21,78', None, True)
+self._simple_claim_test('P625', '21,77', None, True)
 self._simple_claim_test('P625', '21,78.05,0.01', None, False)
 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: A little bit more compliance with Wikimedia's color palette

2016-11-20 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: A little bit more compliance with Wikimedia's color palette
..

A little bit more compliance with Wikimedia's color palette

Change-Id: I1f89e6210df513f35afc797a2af78eb98b9c23bb
---
M view/resources/wikibase/wikibase.css
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/94/322494/1

diff --git a/view/resources/wikibase/wikibase.css 
b/view/resources/wikibase/wikibase.css
index f1498a6..54add0a 100644
--- a/view/resources/wikibase/wikibase.css
+++ b/view/resources/wikibase/wikibase.css
@@ -69,11 +69,11 @@
 }
 
 .ui-closeable.wb-edit {
-   background-color: #D6F3FF;
+   background-color: #eaf3ff;
 }
 
 .ui-closeable.wb-error {
-   background-color: #FFDFC9;
+   background-color: #fee7e6;
 }
 
 .wikibase-copyrightnotification-container a {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f89e6210df513f35afc797a2af78eb98b9c23bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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