[MediaWiki-commits] [Gerrit] Make sure that the Footer appears after all other content. - change (mediawiki...MobileApp)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make sure that the Footer appears after all other content.
..


Make sure that the Footer appears after all other content.

Bug: 66322
Change-Id: I0d255c5fc8f518d45461b94d26dbc40f3797514e
---
M less/android.less
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/less/android.less b/less/android.less
index 823bc91..431f6e6 100644
--- a/less/android.less
+++ b/less/android.less
@@ -33,4 +33,5 @@
   text-align: center;
   color: #888;
   font-size: 80%;
+  clear: both;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d255c5fc8f518d45461b94d26dbc40f3797514e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Dbrant dbr...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Mhurd mh...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add basic setup.py file - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Add basic setup.py file
..

Add basic setup.py file

Change-Id: I19efff67dfa8142b18a707cbbbcf548eaf763985
---
A setup.py
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/shinkengen 
refs/changes/46/168046/1

diff --git a/setup.py b/setup.py
new file mode 100644
index 000..417e293
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,16 @@
+from setuptools import setup
+
+setup(
+name=shinkengen,
+version='0.1',
+author=Yuvi Panda,
+author_email=yuvipa...@gmail.com,
+description=(A shinken config generator for Wikimedia Labs),
+license=Apache2,
+url=https://github.com/halfak/MediaWiki-OAuth;,
+packages=['shingen'],
+install_requires=[
+'jinja2',
+'pyyaml',
+],
+)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19efff67dfa8142b18a707cbbbcf548eaf763985
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add basic setup.py file - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Add basic setup.py file
..


Add basic setup.py file

Change-Id: I19efff67dfa8142b18a707cbbbcf548eaf763985
---
A setup.py
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/setup.py b/setup.py
new file mode 100644
index 000..417e293
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,16 @@
+from setuptools import setup
+
+setup(
+name=shinkengen,
+version='0.1',
+author=Yuvi Panda,
+author_email=yuvipa...@gmail.com,
+description=(A shinken config generator for Wikimedia Labs),
+license=Apache2,
+url=https://github.com/halfak/MediaWiki-OAuth;,
+packages=['shingen'],
+install_requires=[
+'jinja2',
+'pyyaml',
+],
+)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19efff67dfa8142b18a707cbbbcf548eaf763985
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix URL to point to the proper git repository - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Fix URL to point to the proper git repository
..

Fix URL to point to the proper git repository

Change-Id: I436ebe7ad047db84bf4224bb7fdf1c4ad0414115
---
M setup.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/shinkengen 
refs/changes/47/168047/1

diff --git a/setup.py b/setup.py
index 417e293..f05e3a8 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@
 author_email=yuvipa...@gmail.com,
 description=(A shinken config generator for Wikimedia Labs),
 license=Apache2,
-url=https://github.com/halfak/MediaWiki-OAuth;,
+
url=https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen;,
 packages=['shingen'],
 install_requires=[
 'jinja2',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I436ebe7ad047db84bf4224bb7fdf1c4ad0414115
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add Apache2 License - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Add Apache2 License
..

Add Apache2 License

Change-Id: Ifc35e3c6a479d49579affd1173f2a346c2ff0f49
---
A COPYING
1 file changed, 202 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/shinkengen 
refs/changes/48/168048/1

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..d645695
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  Contribution shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, submitted
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as Not a Contribution.
+
+  Contributor shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  copyright license to reproduce, prepare Derivative Works of,
+  publicly display, publicly perform, sublicense, and distribute the
+  Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  (except as stated in this section) patent license to make, have made,
+  use, offer to sell, sell, import, and otherwise transfer the Work,
+  where such license applies only to those patent claims licensable
+  by such Contributor that are 

[MediaWiki-commits] [Gerrit] [WikimediaIncubator] Add new optional message key - change (translatewiki)

2014-10-22 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [WikimediaIncubator] Add new optional message key
..

[WikimediaIncubator] Add new optional message key

https://gerrit.wikimedia.org/r/#/c/157702/1

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/49/168049/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 2e3c640..0a93199 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -2287,7 +2287,7 @@
 descmsg = wminc-desc
 ignored = wminc-error-help, wminc-fs-langselect-langs, wminc-fs-settings-image
 ignored = wminc-infopage-prefill, wminc-manual-url, wminc-infopage-links
-optional = wminc-searchwiki-goto
+optional = wminc-searchwiki-goto, wminc-languagecode
 optional = group-test-sysop.css, group-test-sysop.js
 
 Wikimedia Messages

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6be96ca655f71612487fb03368f895db71eceeab
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] [WikimediaIncubator] Add new optional message key - change (translatewiki)

2014-10-22 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [WikimediaIncubator] Add new optional message key
..


[WikimediaIncubator] Add new optional message key

https://gerrit.wikimedia.org/r/#/c/157702/1

Change-Id: I6be96ca655f71612487fb03368f895db71eceeab
---
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 2e3c640..0a93199 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -2287,7 +2287,7 @@
 descmsg = wminc-desc
 ignored = wminc-error-help, wminc-fs-langselect-langs, wminc-fs-settings-image
 ignored = wminc-infopage-prefill, wminc-manual-url, wminc-infopage-links
-optional = wminc-searchwiki-goto
+optional = wminc-searchwiki-goto, wminc-languagecode
 optional = group-test-sysop.css, group-test-sysop.js
 
 Wikimedia Messages

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6be96ca655f71612487fb03368f895db71eceeab
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Setup generator as a script by itself - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Setup generator as a script by itself
..

Setup generator as a script by itself

Change-Id: I8d204d96bcb4d1ff63fa9e1c3d7c502b2716b7ac
---
R scripts/shingen
M setup.py
2 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/shinkengen 
refs/changes/50/168050/1

diff --git a/shingen/generate.py b/scripts/shingen
similarity index 64%
rename from shingen/generate.py
rename to scripts/shingen
old mode 100644
new mode 100755
index d6c6aa0..c44667e
--- a/shingen/generate.py
+++ b/scripts/shingen
@@ -1,8 +1,9 @@
+#!/usr/bin/python3
 import os
 import yaml
-from .generators.generator import GeneratorRunner
-from .generators.hostgroups import generate_hostgroups_config
-from .generators.hosts import generate_host_config
+from shingen.generators.generator import GeneratorRunner
+from shingen.generators.hostgroups import generate_hostgroups_config
+from shingen.generators.hosts import generate_host_config
 
 default_config = {
 'projects': ['tools'],
diff --git a/setup.py b/setup.py
index f05e3a8..8b52349 100644
--- a/setup.py
+++ b/setup.py
@@ -9,6 +9,7 @@
 license=Apache2,
 
url=https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen;,
 packages=['shingen'],
+scripts=['scripts/shingen'],
 install_requires=[
 'jinja2',
 'pyyaml',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d204d96bcb4d1ff63fa9e1c3d7c502b2716b7ac
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Show blog as only active item in TopMenu - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: Show blog as only active item in TopMenu
..

Show blog as only active item in TopMenu

This disables the wiki item in topmenu when blog is active. Due to blog
binding to unknown action, topmenu obviously confuses this and thinks
it's on main page. So all active items are reset before blog is set to
active.

Change-Id: I334666b2da654e47d37dd958be03ea997271d776
---
M Blog/Blog.class.php
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/51/168051/1

diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 176ecd9..9a2a2ce 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -117,6 +117,13 @@
public function onBSTopMenuBarCustomizerRegisterNavigationSites( 
$aNavigationSites ) {
global $wgScriptPath;
 
+   // Reset all other active markers if Blog is active
+   if ( BsExtensionManager::isContextActive( 'MW::Blog::ShowBlog' 
) ) {
+   for ($i = 0; $i  sizeof($aNavigationSites); $i++ ) {
+   $aNavigationSites[$i][active] = false;
+   }
+   }
+
$aNavigationSites[] = array(
'id' = 'nt-blog',
'href' = wfAppendQuery( $wgScriptPath.'/index.php', 
array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I334666b2da654e47d37dd958be03ea997271d776
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser gla...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Make sure setup.py picks up all packages - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Make sure setup.py picks up all packages
..

Make sure setup.py picks up all packages

Change-Id: I01ead7bf5afe91754a7a21bd3000132e15ed5411
---
M setup.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/shinkengen 
refs/changes/52/168052/1

diff --git a/setup.py b/setup.py
index 8b52349..21a630c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from setuptools import setup
+from setuptools import setup, find_packages
 
 setup(
 name=shinkengen,
@@ -8,7 +8,7 @@
 description=(A shinken config generator for Wikimedia Labs),
 license=Apache2,
 
url=https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen;,
-packages=['shingen'],
+packages=find_packages(),
 scripts=['scripts/shingen'],
 install_requires=[
 'jinja2',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01ead7bf5afe91754a7a21bd3000132e15ed5411
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix URL to point to the proper git repository - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Fix URL to point to the proper git repository
..


Fix URL to point to the proper git repository

Change-Id: I436ebe7ad047db84bf4224bb7fdf1c4ad0414115
---
M setup.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/setup.py b/setup.py
index 417e293..f05e3a8 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@
 author_email=yuvipa...@gmail.com,
 description=(A shinken config generator for Wikimedia Labs),
 license=Apache2,
-url=https://github.com/halfak/MediaWiki-OAuth;,
+
url=https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen;,
 packages=['shingen'],
 install_requires=[
 'jinja2',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I436ebe7ad047db84bf4224bb7fdf1c4ad0414115
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Added missing message centralauth-rename-table-failed. - change (mediawiki...CentralAuth)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Added missing message centralauth-rename-table-failed.
..


Added missing message centralauth-rename-table-failed.

Bug: 72337
Change-Id: I5f7ccec216e4c3bf8ae0514bf2ddd1d8459cc80e
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index d84cadc..fe52581 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -381,6 +381,7 @@
centralauth-rename-table-status-inprogress : In progress,
centralauth-rename-table-status-queued : Queued,
centralauth-rename-table-status-done : Done,
+   centralauth-rename-table-status-failed : Failed,
centralauth-rename-viewprogress : View progress,
centralauth-rename-progress-fieldset : List of local accounts,
centralauth-rename-progress-logs-fieldset: Log entries,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index caa361d..d2c08e7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -391,6 +391,7 @@
centralauth-rename-table-status-inprogress: Status displayed if the 
job is still in progress,
centralauth-rename-table-status-queued: Status displayed if the job 
is still queued,
centralauth-rename-table-status-done: {{Identical|Done}}\nStatus 
displayed if the job has completed successfully,
+   centralauth-rename-table-status-failed: Status displayed if the job 
failed,
centralauth-rename-viewprogress: Text for submit button 
Special:RenameProgress,
centralauth-rename-progress-fieldset: Text on fieldset around rename 
progress table,
centralauth-rename-progress-logs-fieldset: Text on fieldset around 
log entries,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f7ccec216e4c3bf8ae0514bf2ddd1d8459cc80e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] torrus - remove subtree for eqiad-pmtpa link - change (operations/puppet)

2014-10-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: torrus - remove subtree for eqiad-pmtpa link
..


torrus - remove subtree for eqiad-pmtpa link

since we don't have that link anymore

we might want to add a new one for eqiad-codfw though?

Change-Id: Ifbcad5e4c3928ed324c7a3a621bc80f5ae8c333f
---
M files/torrus/xmlconfig/aggregates.xml
1 file changed, 0 insertions(+), 39 deletions(-)

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



diff --git a/files/torrus/xmlconfig/aggregates.xml 
b/files/torrus/xmlconfig/aggregates.xml
index fb312d0..5a00583 100644
--- a/files/torrus/xmlconfig/aggregates.xml
+++ b/files/torrus/xmlconfig/aggregates.xml
@@ -5,45 +5,6 @@
datasources
subtree name=Internal_links
apply-template name=snmp-defaults/
-   subtree name=Transport_pmtpa_eqiad
-   param name=expr-Transport-Bytes_In 
value={/Core_routers/cr1-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_In},{/Core_routers/cr2-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_In},+/
-   param name=expr-Transport-Bytes_Out 
value={/Core_routers/cr1-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_In},{/Core_routers/cr2-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_Out},0,+/
-
-   leaf name=InOut_bps
-   param name=comment value=Input and 
Output bits per second graphs /
-   param name=vertical-label   
value=bps /
-   param name=graph-lower-limit 
value=0 /
-   param name=rrd-hwpredict
value=disabled /
-   param name=precedence   
value=1000 /
-   param name=ds-type  
value=rrd-multigraph /
-   param name=ds-names 
value=gblx-in,l3-in,gblx-out,l3-out /
-
-   param name=ds-expr-gblx-in   
value={/Core_routers/cr1-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_In},8,*
 /
-   param name=graph-legend-gblx-in  
value=GBLX Bits per second pmtpa - eqiad /
-   param name=line-style-gblx-in
value=AREA /
-   param name=line-color-gblx-in
value=#004aa0 /
-   param name=line-order-gblx-in
value=1 /
-   
-   param name=ds-expr-l3-in   
value={/Core_routers/cr2-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_In},8,*
 /
-   param name=graph-legend-l3-in  
value=L(3) Bits per second pmtpa - eqiad /
-   param name=line-style-l3-in
value=STACK /
-   param name=line-color-l3-in
value=#f70013 /
-   param name=line-order-l3-in
value=2 /
-
-   param name=ds-expr-gblx-out  
value={/Core_routers/cr1-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_Out},-8,*
 /
-   param name=graph-legend-gblx-out 
value=GBLX Bits per second eqiad - pmtpa /
-   param name=line-style-gblx-out   
value=AREA /
-   param name=line-color-gblx-out   
value=#004aa0 /
-   param name=line-order-gblx-out   
value=3 /
-
-   param name=ds-expr-l3-out  
value={/Core_routers/cr2-eqiad.wikimedia.org/Interface_Counters/xe_5_2_1/Bytes_Out},-8,*
 /
-   param name=graph-legend-l3-out 
value=L(3) Bits per second eqiad - pmtpa /
-   param name=line-style-l3-out   
value=STACK /
-   param name=line-color-l3-out   
value=#f70013 /
-   param name=line-order-l3-out   
value=4 /
-   /leaf
-   
-   /subtree
/subtree

subtree name=External_links

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbcad5e4c3928ed324c7a3a621bc80f5ae8c333f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Matanya 

[MediaWiki-commits] [Gerrit] Backup /var/lib/carbon/whisper on graphite - change (operations/puppet)

2014-10-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Backup /var/lib/carbon/whisper on graphite
..


Backup /var/lib/carbon/whisper on graphite

Production graphite hosts (role::graphite::production boxes, namely
tungsten) should have whisper databases backed up.

Change-Id: Ic05f64e54abd72ec2a0bab98f89d9b60ad1e378e
RT: 8457
---
M manifests/role/backup.pp
M manifests/role/graphite.pp
2 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index fba7aa7..c308541 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -170,6 +170,9 @@
 bacula::director::fileset { 'mysql-srv-backups':
 includes = [ '/srv/backups' ]
 }
+bacula::director::fileset { 'var-lib-carbon-whisper':
+includes = [ '/var/lib/carbon/whisper' ]
+}
 # As all /a this will hopefully no longer be needed at some point and will
 # be killed with fire
 bacula::director::fileset { 'mysql-a-backups':
diff --git a/manifests/role/graphite.pp b/manifests/role/graphite.pp
index 6b272bc..2882e47 100644
--- a/manifests/role/graphite.pp
+++ b/manifests/role/graphite.pp
@@ -209,6 +209,9 @@
 auth = true,
 }
 
+include role::backup::host
+backup::set {'var-lib-carbon-whisper': }
+
 include ::mediawiki::monitoring::graphite
 include ::eventlogging::monitoring::graphite
 include ::swift::monitoring::graphite

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic05f64e54abd72ec2a0bab98f89d9b60ad1e378e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] PermissionManager-Bugfixes - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Lilu (Code Review)
Lilu has uploaded a new change for review.

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

Change subject: PermissionManager-Bugfixes
..

PermissionManager-Bugfixes

* Simplifying of TemplateEditor.saveTemplate
* Fixed: Grid gets not updated after template edit
* Fixed: Grid gets not updated after template removal
* Fixed: Tree in template editor gets not updated after template removal
* Fixed performance lag on saving settings with many namespaces shown in the 
grid
* Added backup creation of the settings file before saving the new settings

Change-Id: Ib225511e28ace1bd70e6a27b33ff73f8c1aa7ed7
---
M PermissionManager/PermissionManager.class.php
M PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
M PermissionManager/resources/BS.PermissionManager/data/Manager.js
3 files changed, 91 insertions(+), 16 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/53/168053/1

diff --git a/PermissionManager/PermissionManager.class.php 
b/PermissionManager/PermissionManager.class.php
index d2c9beb..78d13ac 100644
--- a/PermissionManager/PermissionManager.class.php
+++ b/PermissionManager/PermissionManager.class.php
@@ -499,6 +499,8 @@
wfRunHooks('BsNamespacemanageOnSavePermission', 
array($aNamespacePermissionLockdown, $aGroupPermissions));
wfRunHooks('BsPermissionManager::writeGroupSettings', 
array($aNamespacePermissionLockdown, $aGroupPermissions));
 
+   self::backupExistingSettings();
+
$sSaveContent = ?php\n;
foreach ($aGroupPermissions as $sGroup = $aPermissions) {
foreach ($aPermissions as $sPermission = $bValue) {
@@ -541,4 +543,21 @@
);
}
}
+
+   /**
+* creates a backup of the current pm-settings.php if it exists.
+* 
+* @global string $bsgPermissionManagerGroupSettingsFile
+*/
+   protected static function backupExistingSettings() {
+   global $bsgPermissionManagerGroupSettingsFile;
+
+   if(file_exists($bsgPermissionManagerGroupSettingsFile)) {
+   $timestamp = date('YmdHis');
+   $backupFilename = pm-settings-backup-{$timestamp}.php;
+   $backupFile = 
dirname($bsgPermissionManagerGroupSettingsFile)./{$backupFilename};
+
+   file_put_contents($backupFile, 
file_get_contents($bsgPermissionManagerGroupSettingsFile));
+   }
+   }
 }
diff --git a/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js 
b/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
index 26b1694..99e9803 100644
--- a/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
+++ b/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
@@ -36,7 +36,8 @@
},
saveTemplate: function() {
var me = this;
-   var record = 
Ext.getCmp('bs-template-editor-treepanel').getSelectionModel().getLastSelected();
+   var record = Ext.getCmp('bs-template-editor-treepanel')
+   
.getSelectionModel().getLastSelected();
var newRecord = {
id: record.get('id'),
text: record.get('text'),
@@ -71,10 +72,11 @@
me._hasChanged = true;
 
var dataManager = 
Ext.create('BS.PermissionManager.data.Manager');
-   var gridRow = 
dataManager.buildTemplateForGrid(newRecord);
-   
dataManager.addTemplate(newRecord);
+   
dataManager.setTemplate(newRecord);
 
-   
Ext.data.StoreManager.lookup('bs-permissionmanager-permission-store').add(gridRow);
+   Ext.data.StoreManager
+   
.lookup('bs-permissionmanager-permission-store')
+   
.loadRawData(dataManager.buildPermissionData().permissions);
 

Ext.getCmp('bs-template-editor-treepanel').getSelectionModel().select(

me._treeStore.getNodeById(newRecord.text)
@@ -243,21 +245,43 @@
disabled: true,
id: 'pmTemplateEditorRemoveButton',
handler: function() {
+   var record = 
Ext.getCmp('bs-template-editor-treepanel')
+   
.getSelectionModel().getLastSelected(),
+   

[MediaWiki-commits] [Gerrit] gerrit: move to module - change (operations/puppet)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: gerrit: move to module
..


gerrit: move to module

Change-Id: I7976a20686b1fc5244cbefb8bb04a2ad96e44fca
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
D files/misc/robots-txt-disallow
D manifests/gerrit.pp
M manifests/site.pp
R modules/gerrit/files/gerrit
R modules/gerrit/files/its/action.config
R modules/gerrit/files/its/templates/DraftPublished.vm
R modules/gerrit/files/mail/ChangeSubject.vm
A modules/gerrit/files/robots-txt-disallow
R modules/gerrit/files/skin/GerritSite.css
R modules/gerrit/files/skin/GerritSiteHeader.html
R modules/gerrit/files/skin/page-bkg.jpg
R modules/gerrit/files/skin/wikimedia-codereview-logo.png
A modules/gerrit/manifests/crons.pp
A modules/gerrit/manifests/instance.pp
A modules/gerrit/manifests/jetty.pp
A modules/gerrit/manifests/proxy.pp
A modules/gerrit/manifests/replicationdest.pp
R modules/gerrit/templates/gerrit.config.erb
R modules/gerrit/templates/gerrit.wikimedia.org.erb
R modules/gerrit/templates/replication.config.erb
R modules/gerrit/templates/secure.config.erb
21 files changed, 397 insertions(+), 400 deletions(-)

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



diff --git a/files/misc/robots-txt-disallow b/files/misc/robots-txt-disallow
deleted file mode 100644
index 6ba092a..000
--- a/files/misc/robots-txt-disallow
+++ /dev/null
@@ -1,6 +0,0 @@
-# THIS FILE IS MANAGED BY PUPPET
-#
-# puppet:///files/misc/robots-txt-disallow
-#
-User-agent: *
-Disallow: /
diff --git a/manifests/gerrit.pp b/manifests/gerrit.pp
deleted file mode 100644
index 6e114a5..000
--- a/manifests/gerrit.pp
+++ /dev/null
@@ -1,393 +0,0 @@
-# manifests/gerrit.pp
-# Manifest to setup a Gerrit instance
-
-class gerrit::instance($apache_ssl  = false,
-$slave   = false,
-$ssh_port= '29418',
-$db_host = '',
-$db_name = 'reviewdb',
-$host= '',
-$db_user = 'gerrit',
-$ssh_key = '',
-$ssl_cert= 'ssl-cert-snakeoil',
-$ssl_cert_key= 'ssl-cert-snakeoil',
-$replication = '',
-$smtp_host   = '') {
-
-include standard,
-ldap::role::config::labs
-
-# Main config
-include passwords::gerrit
-$email_key = $passwords::gerrit::gerrit_email_key
-$sshport = $ssh_port
-$dbhost = $db_host
-$dbname = $db_name
-$dbuser = $db_user
-$dbpass = $passwords::gerrit::gerrit_db_pass
-$bzpass = $passwords::gerrit::gerrit_bz_pass
-$phabcert = $passwords::gerrit::gerrit_phab_cert
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
-
-# Setup LDAP
-include ldap::role::config::labs
-$ldapconfig = $ldap::role::config::labs::ldapconfig
-
-$ldap_hosts = $ldapconfig['servernames']
-$ldap_base_dn = $ldapconfig['basedn']
-$ldap_proxyagent = $ldapconfig['proxyagent']
-$ldap_proxyagent_pass = $ldapconfig['proxypass']
-
-# Configure the base URL
-$url = https://${host}/r;
-
-class { 'gerrit::proxy':
-ssl_cert = $ssl_cert,
-ssl_cert_key = $ssl_cert_key,
-host = $host
-}
-
-class { 'gerrit::jetty':
-ldap_hosts   = $ldap_hosts,
-ldap_base_dn = $ldap_base_dn,
-url  = $url,
-dbhost   = $dbhost,
-dbname   = $dbname,
-dbuser   = $dbuser,
-hostname = $host,
-ldap_proxyagent  = $ldap_proxyagent,
-ldap_proxyagent_pass = $ldap_proxyagent_pass,
-sshport  = $sshport,
-replication  = $replication,
-smtp_host= $smtp_host,
-ssh_key  = $ssh_key,
-}
-}
-
-class gerrit::jetty ($ldap_hosts,
-$ldap_base_dn,
-$url,
-$dbhost,
-$dbname,
-$dbuser,
-$hostname,
-$sshport,
-$ldap_proxyagent,
-$ldap_proxyagent_pass,
-$replication,
-$smtp_host,
-$ssh_key) {
-
-include gerrit::crons
-include nrpe
-
-package { 'openjdk-7-jre':
-ensure = latest,
-}
-
-package { 'python-paramiko':
-ensure = latest,
-}
-
-package { 'gerrit':
-ensure = present,
-}
-
-# TODO: Make this go away -- need to stop using gerrit2 for hook actions
-ssh_authorized_key { $name:
-ensure  = present,
-key = $ssh_key,
-type= 'ssh-rsa',
-user= 'gerrit2',
-require = Package['gerrit'],
-}
-
-file { '/etc/default/gerritcodereview':
-source = 'puppet:///files/gerrit/gerrit',
-owner  = 'root',
-group  = 'root',
-mode   = '0444',
-}
-
-file { '/var/lib/gerrit2/':
-ensure  = directory,
-mode= '0755',
-owner   = 'gerrit2',
-require = Package['gerrit'],
-}
-
-file { '/var/lib/gerrit2/.ssh':
-

[MediaWiki-commits] [Gerrit] Remove invalid CacheHelper entry from wgAutoloadLocalClasses - change (mediawiki/core)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove invalid CacheHelper entry from wgAutoloadLocalClasses
..


Remove invalid CacheHelper entry from wgAutoloadLocalClasses

There were 2 CacheHelper keys in the array. Remove the one that pointed
to a non-existent file.

Change-Id: Ifb418fe8742b5515b500a6662b10efccd8273195
---
M includes/AutoLoader.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 6936570..99b2d84 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -39,7 +39,6 @@
'BloomCache' = 'includes/cache/bloom/BloomCache.php',
'BloomCacheRedis' = 'includes/cache/bloom/BloomCacheRedis.php',
'BloomFilterTitleHasLogs' = 'includes/cache/bloom/BloomFilters.php',
-   'CacheHelper' = 'includes/CacheHelper.php',
'Category' = 'includes/Category.php',
'CategoryFinder' = 'includes/CategoryFinder.php',
'CategoryViewer' = 'includes/CategoryViewer.php',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb418fe8742b5515b500a6662b10efccd8273195
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: PleaseStand pleasest...@live.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Introduce LLDP facts - change (operations/puppet)

2014-10-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Introduce LLDP facts
..


Introduce LLDP facts

Use lldpctl's xml format to introduce a number of facts
 * lldppeer_ethX = the switch connected on that interface
 * lldpswport_ethX = the switchport description
 * lldpswport_id = The switchport id as reported by the switch
 * lldppeers = Comma separated list of all LLDP peers

where ethX is a given interface that both it and it's connected
counterpart speak LLDP

Change-Id: Icc744872f8dfed24eea149bc05766053cc2656a5
---
A modules/base/lib/facter/lldp.rb
1 file changed, 61 insertions(+), 0 deletions(-)

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



diff --git a/modules/base/lib/facter/lldp.rb b/modules/base/lib/facter/lldp.rb
new file mode 100644
index 000..a1a540a
--- /dev/null
+++ b/modules/base/lib/facter/lldp.rb
@@ -0,0 +1,61 @@
+require 'facter'
+require 'rexml/document'
+
+if Facter.value('virtual') == 'physical' and File.exists?('/usr/sbin/lldpctl')
+
+lldppeers = nil
+
+data = Facter::Util::Resolution.exec('/usr/sbin/lldpctl -f xml')
+document = REXML::Document.new(data)
+document.elements.each('lldp/interface') do |iface|
+eth = iface.attributes['name']
+iface.elements.each('chassis/name') do |switch|
+Facter.add('lldppeer_%s' % eth) do
+confine :kernel = %w{Linux FreeBSD OpenBSD}
+setcode do
+switch.text
+end
+end
+if lldppeers
+lldppeers = lldppeers + ',' + switch.text
+else
+lldppeers = switch.text
+end
+end
+iface.elements.each('port/descr') do |port|
+Facter.add('lldpswport_%s' % eth) do
+confine :kernel = %w{Linux FreeBSD OpenBSD}
+setcode do
+port.text
+end
+end
+end
+iface.elements.each('port/id') do |port|
+Facter.add('lldpswportid_%s' % eth) do
+confine :kernel = %w{Linux FreeBSD OpenBSD}
+setcode do
+port.text
+end
+end
+end
+# VLAN info is also reported by LLDP but for now not parsing it due to 
some
+# inconsistencies in reporting depending on vendor and lack of a use 
case
+# sample code is provided however
+#iface.elements.each('vlan') do |vlan|
+#Facter.add('lldpswport_vlan_%s' % eth) do
+#confine :kernel = %w{Linux FreeBSD OpenBSD}
+#setcode do
+#vlan.text
+#end
+#end
+#end
+end
+
+# Aggregate all the lldp peers on one single variable
+Facter.add('lldppeers') do
+confine :kernel = %w{Linux FreeBSD OpenBSD}
+setcode do
+lldppeers
+end
+end
+end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc744872f8dfed24eea149bc05766053cc2656a5
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Jkrauska jkrau...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prerender thumbnails at upload time on Commons - change (operations/mediawiki-config)

2014-10-22 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Prerender thumbnails at upload time on Commons
..

Prerender thumbnails at upload time on Commons

Change-Id: I2ac3fc0ac2443fa90cbb2ac90a5b162c0ad06212
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/301
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d5da20f..4aa0144 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14163,7 +14163,6 @@
 // Thumbnail prerendering at upload time
 'wgUploadThumbnailRenderMap' = array(
'default' = array( 320, 640, 800, 1024, 1280, 1920, 2560, 2880 ),
-   'commonswiki' = array(),
 ),
 
 'wgUploadThumbnailRenderMethod' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ac3fc0ac2443fa90cbb2ac90a5b162c0ad06212
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] backup ganglia data on the collector - change (operations/puppet)

2014-10-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: backup ganglia data on the collector
..


backup ganglia data on the collector

RT #8252

Change-Id: Ia178cf9e30720b0f46ad5ffe7f5ee010ca8b
---
M manifests/ganglia.pp
M manifests/role/backup.pp
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index 058686c..52f80d4 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -480,6 +480,8 @@
 $ganglia_ssl_key = '/etc/ssl/private/ganglia.wikimedia.org.key'
 
 $ssl_settings = ssl_ciphersuite('apache-2.2', 'compat')
+include role::backup::host
+backup::set { 'var-lib-ganglia': }
 }
 
 apache::site { $ganglia_servername:
diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index c308541..f1e59ba 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -173,6 +173,9 @@
 bacula::director::fileset { 'var-lib-carbon-whisper':
 includes = [ '/var/lib/carbon/whisper' ]
 }
+bacula::director::fileset { 'var-lib-ganglia':
+includes = [ '/var/lib/ganglia' ]
+}
 # As all /a this will hopefully no longer be needed at some point and will
 # be killed with fire
 bacula::director::fileset { 'mysql-a-backups':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia178cf9e30720b0f46ad5ffe7f5ee010ca8b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] hiera: use the same lookup rules for private and public hier... - change (operations/puppet)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: hiera: use the same lookup rules for private and public hiera 
dirs
..

hiera: use the same lookup rules for private and public hiera dirs

Change-Id: Ieb958008c1a67f48d24be5967b08f6f0ddcb86ea
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/168055/1

diff --git a/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb 
b/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
index e75149a..74be0ae 100644
--- a/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
+++ b/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
@@ -81,10 +81,14 @@
   end
 
   def get_path(key, scope, source)
+config_section = :nuyaml
 # Special case: 'private' repository.
 # We use a different datadir in this case.
+# Example: private/common will search in the common source
+# within the private datadir
 if m = /private\/(.*)/.match(source)
-  return key, Backend.datafile(:private, scope, m[1], yaml)
+  config_section = :private
+  source = m[1]
 end
 
 # If the source is in the expand_path list, perform path
@@ -101,7 +105,7 @@
   end
 end
 
-return key, Backend.datafile(:nuyaml, scope, source, yaml)
+return key, Backend.datafile(config_section, scope, source, yaml)
   end
 
   def lookup(key, scope, order_override, resolution_type)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb958008c1a67f48d24be5967b08f6f0ddcb86ea
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] DHCP - delete unused linux-host-entry files - change (operations/puppet)

2014-10-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: DHCP - delete unused linux-host-entry files
..


DHCP - delete unused linux-host-entry files

Change-Id: Icfc61c9c879209953c9d7d5062028544f5e3c655
---
M modules/install-server/files/dhcpd/dhcpd.conf
D modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
D modules/install-server/files/dhcpd/linux-host-entries.ttyS1-9600
3 files changed, 0 insertions(+), 22 deletions(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified
  Dzahn: Looks good to me, but someone else must approve



diff --git a/modules/install-server/files/dhcpd/dhcpd.conf 
b/modules/install-server/files/dhcpd/dhcpd.conf
index fd4436b..5b38445 100644
--- a/modules/install-server/files/dhcpd/dhcpd.conf
+++ b/modules/install-server/files/dhcpd/dhcpd.conf
@@ -453,18 +453,6 @@
include /etc/dhcp3/linux-host-entries.ttyS0-9600;
}
 
-   # Dell PowerEdge 1950/2950 (DRAC5) use ttyS1/com2 for LOM console
-   group {
-   option pxelinux.configfile pxelinux.cfg/ttyS1-57600;
-   include /etc/dhcp3/linux-host-entries.ttyS1-57600;
-   }
-
-   # For future use, if we will have a ttyS1/com2 at 9600bps for eLOM 
console
-   group {
-   option pxelinux.configfile pxelinux.cfg/ttyS1-9600;
-   include /etc/dhcp3/linux-host-entries.ttyS1-9600;
-   }
-
# Dell PowerEdge RXXX Line  C2100s
group {
option pxelinux.configfile pxelinux.cfg/ttyS1-115200;
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
deleted file mode 100644
index b3f5b9a..000
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
+++ /dev/null
@@ -1,10 +0,0 @@
-#
- THIS FILE IS MANAGED BY PUPPET
- puppet:///modules/install-server/dhcpd/linux-host-entries.ttyS1-57600
-##
-
-host sanger {
-   hardware ethernet 00:19:B9:DD:86:EB;
-   fixed-address sanger.wikimedia.org;
-}
-
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-9600 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-9600
deleted file mode 100644
index e69de29..000
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-9600
+++ /dev/null

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfc61c9c879209953c9d7d5062028544f5e3c655
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Matanya mata...@foss.co.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] DHCP - remove Tampa Squid/LVS subnet - change (operations/puppet)

2014-10-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: DHCP - remove Tampa Squid/LVS subnet
..


DHCP - remove Tampa Squid/LVS subnet

Change-Id: I9a5b95edfa03900d10391d63af23ef66b207b90f
---
M modules/install-server/files/dhcpd/dhcpd.conf
1 file changed, 0 insertions(+), 16 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/install-server/files/dhcpd/dhcpd.conf 
b/modules/install-server/files/dhcpd/dhcpd.conf
index 5b38445..305baa7 100644
--- a/modules/install-server/files/dhcpd/dhcpd.conf
+++ b/modules/install-server/files/dhcpd/dhcpd.conf
@@ -21,22 +21,6 @@
 # for safety, leave this referring to a non-existent file
 filename nonexistent-file;
 
-#
-# PMTPA / SDTPA
-#
-
-# Squid  LVS subnet
-subnet 208.80.152.0 netmask 255.255.255.128 {
-   authoritative;
-
-   option subnet-mask 255.255.255.128;
-   option broadcast-address 208.80.152.127;
-   option routers 208.80.152.1;
-   option domain-name wikimedia.org;
-
-   next-server 208.80.154.10; # carbon (tftp server)
-}
-
 # Public services subnet
 subnet 208.80.153.128 netmask 255.255.255.192 {
 authoritative;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a5b95edfa03900d10391d63af23ef66b207b90f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Matanya mata...@foss.co.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Run RuboCop and Ruby jobs for CentralAuth - change (integration/config)

2014-10-22 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: Run RuboCop and Ruby jobs for CentralAuth
..

Run RuboCop and Ruby jobs for CentralAuth

Bug: 69245
Change-Id: I359f2a275fd272d27a3d2600fa080dc27e5ca130
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/56/168056/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 29c1b54..61f0d35 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -1155,6 +1155,14 @@
  - '{name}-phpcs-strict-HEAD'
 
 - project:
+name: 'mwext-CentralAuth'
+jobs:
+ - '{name}-bundle-{bundlecommand}':
+ bundlecommand:
+  - rubocop
+ - '{name}-ruby1.9.3lint'
+
+- project:
 name: 'mwext-CirrusSearch'
 jobs:
  - '{name}-bundle-{bundlecommand}':
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index dce57fa..50f427a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1452,6 +1452,8 @@
 voting: false
   - name: mwext-ArticleFeedbackv5-bundle-rubocop
 voting: false
+  - name: mwext-CentralAuth-bundle-rubocop
+voting: false
   - name: mwext-CirrusSearch-bundle-rubocop
 voting: false
   - name: mwext-ContentTranslation-bundle-rubocop
@@ -2786,7 +2788,8 @@
 
   - name: mediawiki/extensions/CentralAuth
 template:
-  - name: extension-unittests
+ - name: extension-unittests
+ - name: extension-rubylint
 
   - name: mediawiki/extensions/CentralNotice
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I359f2a275fd272d27a3d2600fa080dc27e5ca130
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adapted analytics pageview counter - change (analytics/zero-sms)

2014-10-22 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Adapted analytics pageview counter
..

Adapted analytics pageview counter

Change-Id: I342b1360034c4f11c0c0f9ad2d964b43f890c0c4
---
A scripts/zero-counts.hql
1 file changed, 65 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms 
refs/changes/57/168057/1

diff --git a/scripts/zero-counts.hql b/scripts/zero-counts.hql
new file mode 100644
index 000..170cca5
--- /dev/null
+++ b/scripts/zero-counts.hql
@@ -0,0 +1,65 @@
+set hive.exec.dynamic.partition.mode=nonstrict;
+SET hive.exec.compress.output=true;
+--^ To work around HIVE-3296, we have SETs before any comments
+
+-- Extracts zero stats from webrequests into a separate table
+--
+-- Usage:
+-- hive -f zero-counts.hql \
+-- -d year=2014 \
+-- -d month=9 \
+-- -d day=15 \
+-- -d hour=20
+--
+
+-- set hivevar:year=2014;
+-- set hivevar:month=10;
+-- set hivevar:day=21;
+-- set hivevar:hour=1;
+-- printf('%d-%02d-%02d', ${year}, ${month}, ${day}) date,
+;
+
+INSERT OVERWRITE TABLE yurik.zero_webstats
+PARTITION(date)
+SELECT
+xcs, via, ipset, https, lang, subdomain, site, COUNT(*) count, date
+FROM (
+SELECT
+printf('%d-%02d-%02d', ${year}, ${month}, ${day}) date,
+regexp_extract(x_analytics, 'zero=([^\;]+)') xcs,
+regexp_extract(x_analytics, 'proxy=([^\;]+)') via,
+regexp_extract(x_analytics, 'zeronet=([^\;]+)') ipset,
+if (x_analytics LIKE '%https=1%', 'https', '') https,
+regexp_extract(uri_host, 
'^([A-Za-z0-9-]+)(\\.(zero|m))?\\.([a-z]*)\\.org$', 1) lang,
+regexp_extract(uri_host, 
'^([A-Za-z0-9-]+)(\\.(zero|m))?\\.([a-z]*)\\.org$', 3) subdomain,
+regexp_extract(uri_host, 
'^([A-Za-z0-9-]+)(\\.(zero|m))?\\.([a-z]*)\\.org$', 4) site
+
+FROM wmf_raw.webrequest
+WHERE
+webrequest_source IN ('text', 'mobile')
+AND year=${year}
+AND month=${month}
+AND day=${day}
+AND hour=2
+AND x_analytics LIKE '%zero=%'
+AND SUBSTR(uri_path, 1, 6) = '/wiki/'
+AND (
+(
+SUBSTR(ip, 1, 9) != '10.128.0.'
+AND SUBSTR(ip, 1, 11) NOT IN (
+'208.80.152.',
+'208.80.153.',
+'208.80.154.',
+'208.80.155.',
+'91.198.174.'
+)
+) OR x_forwarded_for != '-'
+)
+AND SUBSTR(uri_path, 1, 31) != '/wiki/Special:CentralAutoLogin/'
+AND http_status NOT IN ( '301', '302', '303' )
+AND uri_host RLIKE '^[A-Za-z0-9-]+(\\.(zero|m))?\\.[a-z]*\\.org$'
+AND NOT (SPLIT(TRANSLATE(SUBSTR(uri_path, 7), ' ', '_'), '#')[0] 
RLIKE '^[Uu]ndefined$')
+
+) prepared
+GROUP BY date, xcs, via, ipset, https, lang, subdomain, site
+DISTRIBUTE BY date;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I342b1360034c4f11c0c0f9ad2d964b43f890c0c4
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed namespace filter in SmartList (toplist) - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review.

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

Change subject: Fixed namespace filter in SmartList (toplist)
..

Fixed namespace filter in SmartList (toplist)

* fixed query (in instead of =)
* fixed empty clause (string 0 is empty)
* added TODO

Change-Id: I80f663993760d5ac6dc9b645a18233a334473d4c
---
M SmartList/SmartList.class.php
1 file changed, 9 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/58/168058/1

diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php
index 1529c2b..1457199 100644
--- a/SmartList/SmartList.class.php
+++ b/SmartList/SmartList.class.php
@@ -993,7 +993,7 @@
$iCount = BsCore::sanitizeArrayEntry( $aArgs, 'count', 
10, BsPARAMTYPE::INT );
$sPeriod = BsCore::sanitizeArrayEntry( $aArgs, 'period', 
'alltime', BsPARAMTYPE::STRING );
$iPortletPeriod = BsCore::sanitizeArrayEntry( $aArgs, 
'portletperiod', 0, BsPARAMTYPE::INT );
-   $bAlltime = true;
+   $bAlltime = true; //TODO: Find out what this is for
 
$oDbr = wfGetDB( DB_SLAVE );
if ( in_array( $sPeriod, array( 'week', 'month' ) ) || 
in_array( $iPortletPeriod, array( 7, 30 ) ) ) {
@@ -1044,18 +1044,16 @@
}
}
 
-   if ( !empty( $sNs ) ) {
-   $iNamespaces = 
BsNamespaceHelper::getNamespaceIdsFromAmbiguousCSVString( $sNs );
-   if ( is_array( $iNamespaces ) ) {
-   foreach ( $iNamespaces as $iNamespace ) {
-   if ( $bAlltime === false ) {
-   
$aConditions['wo_page_namespace'] = $iNamespace;
-   } else {
-   $aConditions['page_namespace'] 
= $iNamespace;
-   }
-   }
+   if ( !empty( $sNs ) || $sNs === '0') { // string 0 is empty
+   $aNamespaces = 
BsNamespaceHelper::getNamespaceIdsFromAmbiguousCSVString( $sNs );
+   if ( !empty( $aNamespaces ) ) {
+   $bAlltime === false
+   ? $aConditions['wo_page_namespace'] = 
$aNamespaces
+   : $aConditions['page_namespace'] = 
$aNamespaces
+   ;
}
}
+
$res = $oDbr-select(
$aTables,
$aColumns,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80f663993760d5ac6dc9b645a18233a334473d4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth wi...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Run RuboCop and Ruby jobs for CentralAuth - change (integration/config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Run RuboCop and Ruby jobs for CentralAuth
..


Run RuboCop and Ruby jobs for CentralAuth

Created jobs:

mwext-CentralAuth-bundle-rubocop
mwext-CentralAuth-ruby1.9.3lint

Bug: 69245
Change-Id: I359f2a275fd272d27a3d2600fa080dc27e5ca130
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 29c1b54..61f0d35 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -1155,6 +1155,14 @@
  - '{name}-phpcs-strict-HEAD'
 
 - project:
+name: 'mwext-CentralAuth'
+jobs:
+ - '{name}-bundle-{bundlecommand}':
+ bundlecommand:
+  - rubocop
+ - '{name}-ruby1.9.3lint'
+
+- project:
 name: 'mwext-CirrusSearch'
 jobs:
  - '{name}-bundle-{bundlecommand}':
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index dce57fa..50f427a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1452,6 +1452,8 @@
 voting: false
   - name: mwext-ArticleFeedbackv5-bundle-rubocop
 voting: false
+  - name: mwext-CentralAuth-bundle-rubocop
+voting: false
   - name: mwext-CirrusSearch-bundle-rubocop
 voting: false
   - name: mwext-ContentTranslation-bundle-rubocop
@@ -2786,7 +2788,8 @@
 
   - name: mediawiki/extensions/CentralAuth
 template:
-  - name: extension-unittests
+ - name: extension-unittests
+ - name: extension-rubylint
 
   - name: mediawiki/extensions/CentralNotice
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I359f2a275fd272d27a3d2600fa080dc27e5ca130
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Inject configured mwApi into RepoApi - change (mediawiki...Wikibase)

2014-10-22 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Inject configured mwApi into RepoApi
..


Inject configured mwApi into RepoApi

Change-Id: Ibae5bfca6f5d3b72257a5a97ecaf19b01ed42a15
---
M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
M lib/resources/wikibase.RepoApi/resources.php
M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
M lib/tests/qunit/resources.php
M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
9 files changed, 29 insertions(+), 20 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved



diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 
b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
index 746edef..39b5aeb 100644
--- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
+++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
@@ -347,7 +347,7 @@
this.targetArticle = $( '#wbclient-linkItem-page' ).val();
 
this._pageConnector = new wb.PageConnector(
-   new wb.RepoApi(),
+   new wb.RepoApi( this._mwApiForRepo ),
this.options.globalSiteId,
this.options.pageTitle,
this.targetSite,
diff --git a/lib/resources/wikibase.RepoApi/resources.php 
b/lib/resources/wikibase.RepoApi/resources.php
index adc3e24..4831406 100644
--- a/lib/resources/wikibase.RepoApi/resources.php
+++ b/lib/resources/wikibase.RepoApi/resources.php
@@ -33,9 +33,7 @@
),
'dependencies' = array(
'json',
-   'mw.config.values.wbRepo',
'wikibase',
-   'wikibase.api.getLocationAgnosticMwApi',
),
),
 
diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js 
b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
index f501b31..ca9248b 100644
--- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
+++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
@@ -8,25 +8,29 @@
 ( function( mw, wb, $ ) {
 'use strict';
 
-var repoConfig = mw.config.get( 'wbRepo' );
-var repoApiEndpoint = repoConfig.url + repoConfig.scriptPath + '/api.php';
-var mwApi = wb.api.getLocationAgnosticMwApi( repoApiEndpoint );
-
 /**
  * Constructor to create an API object for interaction with the repo Wikibase 
API.
  * @constructor
- * @since 0.4 (since 0.3 as wb.Api without support for client usage)
+ * @since 0.5 (in 0.4 without constructor parameters, in 0.3 as wb.Api without 
support for client
+ *usage)
+ *
+ * @param {mw.Api} api
+ *
+ * @throws {Error} if parameters are not specified properly.
  */
-wb.RepoApi = function wbRepoApi() {
+wb.RepoApi = function wbRepoApi( api ) {
+   if( api === undefined ) {
+   throw new Error( 'Required parameters not specified properly' );
+   }
+
+   this._api = api;
 };
 
 $.extend( wb.RepoApi.prototype, {
/**
-* mediaWiki.Api object for internal usage. By having this initialized 
in the prototype, we can
-* share one instance for all instances of the wikibase API.
 * @type mw.Api
 */
-   _api: mwApi,
+   _api: null,
 
/**
 * Creates a new entity with the given type and data.
diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
index e64246e..79954b9 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
@@ -30,7 +30,7 @@
value: value || null,
entityStore: entityStore,
valueViewBuilder: valueViewBuilder,
-   api: new wb.AbstractedRepoApi( new wb.RepoApi() )
+   api: new wb.AbstractedRepoApi( new mw.Api() )
};
 
return $( 'div/' )
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
index 6c8ed81..13f3017 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
@@ -38,7 +38,7 @@
statementGuid: statementGuid,
entityStore: entityStore,
valueViewBuilder: valueViewBuilder,
-   api: new wb.AbstractedRepoApi( new wb.RepoApi() )
+   

[MediaWiki-commits] [Gerrit] Add referenceview.isInitialValue test - change (mediawiki...Wikibase)

2014-10-22 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Add referenceview.isInitialValue test
..

Add referenceview.isInitialValue test

Change-Id: I918fa19197b69b218939bc1c427010fb30484c8b
---
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
1 file changed, 15 insertions(+), 0 deletions(-)


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

diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
index 13f3017..5125c03 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
@@ -173,4 +173,19 @@
);
} );
 
+   QUnit.test( 'recognizes initial value', function( assert ) {
+   var $node = createReferenceview( 'testGuid', {
+   value: new wb.datamodel.Reference( new 
wb.datamodel.SnakList( [
+   new wb.datamodel.PropertyNoValueSnak( 
'P1' )
+   ] ) )
+   } ),
+   referenceview = $node.data( 'referenceview' );
+
+   assert.strictEqual(
+   referenceview.isInitialValue(),
+   true,
+   'Referenceview has initial value.'
+   );
+   } );
+
 } )( jQuery, mediaWiki, wikibase, jQuery.valueview, valueFormatters, QUnit );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I918fa19197b69b218939bc1c427010fb30484c8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Actually put wb.client.getMwApiForRepo in wb.client - change (mediawiki...Wikibase)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Actually put wb.client.getMwApiForRepo in wb.client
..


Actually put wb.client.getMwApiForRepo in wb.client

Change-Id: Iada8cd41bdf531223ea29dee71904c477aaf945c
---
M client/resources/wikibase.client.getMwApiForRepo.js
M client/resources/wikibase.client.linkitem.init.js
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/resources/wikibase.client.getMwApiForRepo.js 
b/client/resources/wikibase.client.getMwApiForRepo.js
index e8238c4..e455165 100644
--- a/client/resources/wikibase.client.getMwApiForRepo.js
+++ b/client/resources/wikibase.client.getMwApiForRepo.js
@@ -5,7 +5,7 @@
 ( function( mw, wb ) {
'use strict';
 
-   var MODULE = wb;
+   var MODULE = wb.client;
 
/**
 * @return {mediaWiki.Api}
diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index a99922f..a01ae7f 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -31,7 +31,7 @@
$linkItemLink
.show()
.linkitem( {
-   mwApiForRepo: 
wikibase.getMwApiForRepo(),
+   mwApiForRepo: 
wikibase.client.getMwApiForRepo(),
pageTitle: ( new mw.Title(
mw.config.get( 'wgTitle' ),
mw.config.get( 
'wgNamespaceNumber' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iada8cd41bdf531223ea29dee71904c477aaf945c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Table header/data format tools - change (VisualEditor/VisualEditor)

2014-10-22 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Table header/data format tools
..

Table header/data format tools

Change-Id: Id9879aaeda6e5f5487b668d7bd1f445e4e8aa425
---
M i18n/en.json
M i18n/qqq.json
M src/dm/ve.dm.Node.js
M src/dm/ve.dm.Surface.js
M src/ui/actions/ve.ui.TableAction.js
M src/ui/tools/ve.ui.FormatTool.js
M src/ui/ve.ui.CommandRegistry.js
7 files changed, 131 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/60/168060/1

diff --git a/i18n/en.json b/i18n/en.json
index fc1f5fd..02dbcf8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -97,6 +97,8 @@
 visualeditor-table-delete-col: Delete column,
 visualeditor-table-delete-row: Delete row,
 visualeditor-table-delete-table: Delete table,
+visualeditor-table-format-data: Data cell,
+visualeditor-table-format-header: Header cell,
 visualeditor-table-insert-col-after: Insert after,
 visualeditor-table-insert-col-before: Insert before,
 visualeditor-table-insert-row-after: Insert below,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1036816..4281b1c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -102,6 +102,8 @@
visualeditor-table-delete-col: Label for delete column tool,
visualeditor-table-delete-row: Label for delete row tool,
visualeditor-table-delete-table: Label for delete table tool,
+   visualeditor-table-format-data: Label for table cell data tool,
+   visualeditor-table-format-header: Label for table cell header tool,
visualeditor-table-insert-col-after: Label for insert column after 
tool,
visualeditor-table-insert-col-before: Label for insert column before 
tool,
visualeditor-table-insert-row-after: Label for insert row below 
tool,
diff --git a/src/dm/ve.dm.Node.js b/src/dm/ve.dm.Node.js
index 5ccda6a..ed13bfb 100644
--- a/src/dm/ve.dm.Node.js
+++ b/src/dm/ve.dm.Node.js
@@ -429,23 +429,38 @@
  * Check if the node has an ancestor with matching type and attribute values.
  *
  * @method
- * @returns {boolean} Node is content
+ * @returns {boolean} Node has an ancestor with matching type and attribute 
values
  */
 ve.dm.Node.prototype.hasMatchingAncestor = function ( type, attributes ) {
-   var key,
-   node = this;
+   var node = this;
// Traverse up to matching node
-   while ( node  node.getType() !== type ) {
+   while ( node  !node.matches( type, attributes ) ) {
node = node.getParent();
-   // Stop at root
+   // Return false if we reach the root without finding anything
if ( node === null ) {
return false;
}
}
+   return true;
+};
+
+/**
+ * Check if the node matches type and attribute values.
+ *
+ * @method
+ * @returns {boolean} Node matches type and attribute values
+ */
+ve.dm.Node.prototype.matches = function ( type, attributes ) {
+   var key;
+
+   if ( this.getType() !== type ) {
+   return false;
+   }
+
// Check attributes
if ( attributes ) {
for ( key in attributes ) {
-   if ( node.getAttribute( key ) !== attributes[key] ) {
+   if ( this.getAttribute( key ) !== attributes[key] ) {
return false;
}
}
diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js
index 7f2eb03..7e8948b 100644
--- a/src/dm/ve.dm.Surface.js
+++ b/src/dm/ve.dm.Surface.js
@@ -657,7 +657,7 @@
}
 
if ( selection instanceof ve.dm.TableSelection ) {
-   coveredAnnotations = this.getFragment().getAnnotations();
+   contextChange = true;
}
 
if ( coveredAnnotations  !coveredAnnotations.compareTo( 
this.coveredAnnotations ) ) {
diff --git a/src/ui/actions/ve.ui.TableAction.js 
b/src/ui/actions/ve.ui.TableAction.js
index 23fabba..a3a0d01 100644
--- a/src/ui/actions/ve.ui.TableAction.js
+++ b/src/ui/actions/ve.ui.TableAction.js
@@ -32,7 +32,7 @@
  * @static
  * @property
  */
-ve.ui.TableAction.static.methods = [ 'create', 'insert', 'delete' ];
+ve.ui.TableAction.static.methods = [ 'create', 'insert', 'delete', 
'changeCellStyle' ];
 
 /* Methods */
 
@@ -144,6 +144,32 @@
}
 };
 
+/**
+ * Change cell style
+ *
+ * @param {string} style Cell style; 'header' or 'data'
+ */
+ve.ui.TableAction.prototype.changeCellStyle = function ( style ) {
+   var i, ranges,
+   txs = [],
+   surfaceModel = this.surface.getModel(),
+   selection = surfaceModel.getSelection();
+
+   if ( !( selection instanceof ve.dm.TableSelection ) ) {
+   return;
+   }
+
+   ranges = selection.getOuterRanges();
+   for ( i = ranges.length - 1; i = 0; i-- ) {
+

[MediaWiki-commits] [Gerrit] Enable RuboCop jobs for all repositories where it was experi... - change (integration/config)

2014-10-22 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: Enable RuboCop jobs for all repositories where it was 
experimental
..

Enable RuboCop jobs for all repositories where it was experimental

Except for mediawiki/core.

Bug: 69245
Change-Id: I49602856ca8ad1938eb89f9e9f5fe4a5347d88eb
---
M zuul/layout.yaml
1 file changed, 8 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/61/168061/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 50f427a..4503b0f 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1801,16 +1801,14 @@
   # Run Ruby linter.
   - name: extension-rubylint
 check:
- #- 'mwext-{name}-bundle-rubocop'
+ - 'mwext-{name}-bundle-rubocop'
  - 'mwext-{name}-ruby1.9.3lint'
 test:
- #- 'mwext-{name}-bundle-rubocop'
+ - 'mwext-{name}-bundle-rubocop'
  - 'mwext-{name}-ruby1.9.3lint'
 gate-and-submit:
- #- 'mwext-{name}-bundle-rubocop'
- - 'mwext-{name}-ruby1.9.3lint'
-experimental:
  - 'mwext-{name}-bundle-rubocop'
+ - 'mwext-{name}-ruby1.9.3lint'
 
 # Register the Gerrit project name, apply them pipelines that in turn trigger
 # a set of jobs.
@@ -2906,7 +2904,7 @@
   - mwext-ContentTranslation-phpcs-strict-HEAD # Experiment, bug 48420
   - mwext-ContentTranslation-jslint
   - mwext-ContentTranslation-lint
-  #- mwext-ContentTranslation-bundle-rubocop
+  - mwext-ContentTranslation-bundle-rubocop
   - mwext-ContentTranslation-ruby1.9.3lint
   - mwext-ContentTranslation-yamllint
   - mwext-ContentTranslation-qunit
@@ -2915,12 +2913,10 @@
   - mwext-ContentTranslation-phpcs-strict-HEAD # Experiment, bug 48420
   - mwext-ContentTranslation-jslint
   - mwext-ContentTranslation-lint
-  #- mwext-ContentTranslation-bundle-rubocop
+  - mwext-ContentTranslation-bundle-rubocop
   - mwext-ContentTranslation-ruby1.9.3lint
   - mwext-ContentTranslation-yamllint
   - mwext-ContentTranslation-qunit
-experimental:
-  - mwext-ContentTranslation-bundle-rubocop
 
   - name: mediawiki/extensions/ContributionScores
 template:
@@ -5883,20 +5879,18 @@
   - name: VisualEditor/VisualEditor
 check:
   - VisualEditor-jslint
-  #- VisualEditor-bundle-rubocop
+  - VisualEditor-bundle-rubocop
   - VisualEditor-ruby1.9.3lint
 test:
   - VisualEditor-npm
-  #- VisualEditor-bundle-rubocop
+  - VisualEditor-bundle-rubocop
   - VisualEditor-ruby1.9.3lint
   - VisualEditor-jsduck
 gate-and-submit:
   - VisualEditor-npm
-  #- VisualEditor-bundle-rubocop
+  - VisualEditor-bundle-rubocop
   - VisualEditor-ruby1.9.3lint
   - VisualEditor-jsduck
-experimental:
-  - VisualEditor-bundle-rubocop
 
   - name: wikimedia/bots/jouncebot
 check-voter:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49602856ca8ad1938eb89f9e9f5fe4a5347d88eb
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] role::labs::instance: include sudo::labs_project - change (operations/puppet)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: role::labs::instance: include sudo::labs_project
..

role::labs::instance: include sudo::labs_project

At the moment, we provision 3 default classes to the labs nodes, one of
which is sudo::labs_project; it doesn't make sense (and it makes it
harder to find) not to include this rather tiny class explicitly in 
role::labs::instance.
After this is merged, I'll remove the class from the wikitech config
where it's actually included.

Change-Id: I22571a240d5e754bb24e8809db569dd7aa6b68af
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/labs.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/168062/1

diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 5c4308f..1ff90ee 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -2,6 +2,7 @@
 
 include standard
 include base::instance-upstarts
+include sudo::labs_project
 
 class { 'ldap::role::client::labs':
 # Puppet requires ldap, so we need to update ldap before anything

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22571a240d5e754bb24e8809db569dd7aa6b68af
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] jsminplus: Fix string concatenation in error message - change (mediawiki/core)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: jsminplus: Fix string concatenation in error message
..


jsminplus: Fix string concatenation in error message

PHP concatenates strings with the `.` operator, not with `+`.

Change-Id: I628a55d714129a1345c37bfd31d8985bce177701
---
M includes/libs/jsminplus.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/libs/jsminplus.php b/includes/libs/jsminplus.php
index ed0382c..99cf399 100644
--- a/includes/libs/jsminplus.php
+++ b/includes/libs/jsminplus.php
@@ -1017,7 +1017,7 @@
 
case KEYWORD_CATCH:
case KEYWORD_FINALLY:
-   throw $this-t-newSyntaxError($tt + ' without 
preceding try');
+   throw $this-t-newSyntaxError($tt . ' without 
preceding try');
 
case KEYWORD_THROW:
$n = new JSNode($this-t);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I628a55d714129a1345c37bfd31d8985bce177701
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add Marielle Volz to trusted users for tests - change (integration/config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add Marielle Volz to trusted users for tests
..


Add Marielle Volz to trusted users for tests

Change-Id: I2676a5ea504cb5efc59cee23f8e7ecf35a9fc4a4
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 50f427a..d3ef48a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -37,7 +37,7 @@
   # TODO: Figure out a way to not have to repeat this from pipeline 
'test'.
   # This email_filter and the one for 'test' can be removed once we 
have fixed bug 45499.
   email_filter:
-- 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|sucheta\.ghoshal@gmail\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|git@samsmith\.io|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@gmail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|twkozlowski@gmail\.com|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com|pastakhov@yandex\.ru|hardikjuneja\.hj@gmail\.com|siebrand@kitano\.nl|wctaiwan@gmail\.com|ladsgroup@gmail\.com|info@gno\.de|valhallasw@arctus\.nl|zhorishna@gmail\.com|jayvdb@gmail\.com|skizzerz@gmail\.com|jan\.wikimedia@zerebecki\.de|rillke@wikipedia\.de|mwalker@khaosdev\.com|se4598@gmx\.de|oliver\.buchtala@gmail\.com|florian\.schmidt\.welzow@t-online\.de|johnflewis93@gmail\.com)).*$
+- 

[MediaWiki-commits] [Gerrit] zuul: replaces 'email_filter' by 'email' - change (integration/config)

2014-10-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: zuul: replaces 'email_filter' by 'email'
..

zuul: replaces 'email_filter' by 'email'

email_filter has been deprecated in Zuul layout configuration by
https://review.openstack.org/#/c/102030/

Change-Id: I66208b904a3f012cc8540f53b8f388aa60569a7c
---
M zuul/layout.yaml
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/63/168063/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index dce57fa..7f586d6 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -35,8 +35,8 @@
   # Don't run the check pipeline if the user is allowed to run the 
test pipeline (bug 43391).
   # TODO: Figure out a way to turn this into a list instead of a 
single-line regex.
   # TODO: Figure out a way to not have to repeat this from pipeline 
'test'.
-  # This email_filter and the one for 'test' can be removed once we 
have fixed bug 45499.
-  email_filter:
+  # This email filter and the one for 'test' can be removed once we 
have fixed bug 45499.
+  email:
 - 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|sucheta\.ghoshal@gmail\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|git@samsmith\.io|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@gmail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|twkozlowski@gmail\.com|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com|pastakhov@yandex\.ru|hardikjuneja\.hj@gmail\.com|siebrand@kitano\.nl|wctaiwan@gmail\.com|ladsgroup@gmail\.com|info@gno\.de|valhallasw@arctus\.nl|zhorishna@gmail\.com|jayvdb@gmail\.com|skizzerz@gmail\.com|jan\.wikimedia@zerebecki\.de|rillke@wikipedia\.de|mwalker@khaosdev\.com|se4598@gmx\.de|oliver\.buchtala@gmail\.com|florian\.schmidt\.welzow@t-online\.de|johnflewis93@gmail\.com)).*$
 
 success-message: 'Basic test build succeeded.'
@@ -59,7 +59,7 @@
 trigger:
   gerrit:
 - event: patchset-created
-  email_filter:
+  email:
- ^(?!l10n-bot@translatewiki\.net).*$
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
@@ -101,9 +101,9 @@
 
   # BEWARE:
   # - Make sure to use non greedy selectors (.*?) and to escape dots: 
\.
-  # - Also update the email_filter of the 'check' pipeline.
+  # - Also update the email filter of the 'check' pipeline.
 
-  email_filter: email_whitelist
+  email: email_whitelist
- .*?@wikimedia\.org$
- .*?@wikimedia\.de$
 
@@ -220,7 +220,7 @@
 # pipeline by simply commenting 'recheck' on a change.
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
-  email_filter: *email_whitelist
+  email: *email_whitelist
 
 success-message: 'Main test build succeeded.'
 success:
@@ -240,7 +240,7 @@
   gerrit:
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*check experimental\.?\s*$
-  email_filter: *email_whitelist
+  email: *email_whitelist
 success-message: 'Experimental build succeeded.'
 success:
   gerrit: {}
@@ -261,7 +261,7 @@
 trigger:
   gerrit:
 - event: comment-added
-  email_filter:
+  

[MediaWiki-commits] [Gerrit] Small code update - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Small code update
..


Small code update

Improved code a little

 * Updated jquery events listeners
 * Some CCs
 * use the framewor * use the framework

Change-Id: I4779fe72c6fc93e5ad8cef07da46abac13f7d814
---
M SaferEdit/SaferEdit.class.php
M SaferEdit/resources/bluespice.SaferEdit.editmode.js
2 files changed, 33 insertions(+), 27 deletions(-)

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



diff --git a/SaferEdit/SaferEdit.class.php b/SaferEdit/SaferEdit.class.php
index 62a96fa..7b2fba3 100644
--- a/SaferEdit/SaferEdit.class.php
+++ b/SaferEdit/SaferEdit.class.php
@@ -209,7 +209,7 @@
$aTopViews['statebartopsaferedit'] = 
$this-makeStateBarTopSaferEdit( Article::newFromID($oTitle-getArticleID()), 
$oEdit-se_edit_section );
}
 
-   $iTime = date( YmdHis, time() - BsConfig::get( 
'MW::SaferEdit::Interval' ) * 10 );
+   $iTime = wfTimestamp( TS_MW, time() - BsConfig::get( 
'MW::SaferEdit::Interval' ) * 10 );
if ( $oEdit-se_user_name != $oUser-getName()  
$oEdit-se_timestamp  $iTime ) {
$aTopViews['statebartopsafereditediting'] = 
$this-makeStateBarTopSomeoneEditing( $oEdit-se_user_name );
}
@@ -307,18 +307,18 @@
se_text = $sText,
);
$aConditions = array(
-   se_user_name  = $sUsername,
-   se_page_title = $oTitle-getDBkey(),
+   se_user_name = $sUsername,
+   se_page_title = $oTitle-getDBkey(),
se_page_namespace = $oTitle-getNamespace(),
-   se_edit_section   = $iSection,
+   se_edit_section = $iSection,
);
$aOptions = array( //needed for update reason
'ORDER BY' = 'se_id DESC',
'LIMIT' = 1,
);
 
-   if( $oRow = $db-selectRow($sTable, array( 'se_id' ), 
$aConditions, __METHOD__, $aOptions) ) {
-   if( empty($sText) ) unset($aFields['se_text']);
+   if ( $oRow = $db-selectRow( $sTable, array( 'se_id' ), 
$aConditions, __METHOD__, $aOptions ) ) {
+   if ( empty( $sText ) ) unset( $aFields['se_text'] );
 
$oTitle-invalidateCache();
return $db-update(
@@ -329,7 +329,7 @@
}
 
$oTitle-invalidateCache();
-   return $db-insert($sTable, $aConditions + $aFields);
+   return $db-insert( $sTable, $aConditions + $aFields );
}
 
/**
@@ -393,6 +393,7 @@
'',
array( ORDER BY = se_id DESC )
);
+
if ( $oDbw-numRows( $res )  0 ) {
$row = $oDbw-fetchRow( $res );
 
@@ -419,11 +420,13 @@
} elseif ( strcmp( $sOrigText, 
urldecode($row['se_text'] ) ) == 0 ) {
$aData = array( notexts = 1 );
} else {
+   global $wgParser;
+   $oParserOptions = new ParserOptions();
$str = urldecode( $row['se_text'] );
$aData = array(
time = $oLang-time( 
$row['se_timestamp'] ),
date = $oLang-date( 
$row['se_timestamp'] ),
-   html = 
BsCore::getInstance()-parseWikiText( $str, 
RequestContext::getMain()-getTitle() ), //breaks on Mainpage
+   html = $wgParser-parse( $str, 
RequestContext::getMain()-getTitle(), $oParserOptions )-getText(), //breaks 
on Mainpage
wiki = $str,
section = $row['se_edit_section'],
notexts = 0
@@ -530,7 +533,7 @@
if( !in_array($sRef, array('SaferEditIsSomeoneEditing', 
'SaferEditSave')) ) return true;
 
$oTitle = Title::newFromText( $sTitle, $iNamespace );
-   if( is_null($oTitle) || !$oTitle-userCan('read') ) return true;
+   if ( is_null($oTitle) || !$oTitle-userCan('read') ) return 
true;
 
global $wgUser;
 
@@ -543,21 +546,24 @@
$aSingleResult['someoneEditingView'] = 
$aSingleResult['safereditView'] = '';
$oArticle = Article::newFromID( $iArticleId );
 
+   $bUseSE = BsConfig::get( 'MW::SaferEdit::UseSE' 
);
+   $sText = 

[MediaWiki-commits] [Gerrit] Fix inverted logic introduced in 835b57feb8470ff1d - change (mediawiki...Wikibase)

2014-10-22 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Fix inverted logic introduced in 835b57feb8470ff1d
..

Fix inverted logic introduced in 835b57feb8470ff1d

Change-Id: I1fcc6bdad834e7217c65f299c1e2a149d8895d49
---
M repo/Wikibase.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 17941cc..e02daaa 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -1130,7 +1130,7 @@
public static function onOutputPageBeforeHtmlRegisterConfig( OutputPage 
$out, $html ) {
$entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
 
-   if ( $entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
+   if ( !$entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
return true;
}
 
@@ -1159,7 +1159,7 @@
public static function onMakeGlobalVariablesScript( $vars, $out ) {
$entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
 
-   if ( $entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
+   if ( !$entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
return true;
}
 
@@ -1326,7 +1326,7 @@
$title = $skinTemplate-getTitle();
$entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
 
-   if ( $entityNamespaceLookup-isEntityNamespace( 
$title-getNamespace() ) ) {
+   if ( !$entityNamespaceLookup-isEntityNamespace( 
$title-getNamespace() ) ) {
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fcc6bdad834e7217c65f299c1e2a149d8895d49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Reapplied sitelinkgroupview/sitelinklistview focusing - change (mediawiki...Wikibase)

2014-10-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Reapplied sitelinkgroupview/sitelinklistview focusing
..

Reapplied sitelinkgroupview/sitelinklistview focusing

Fixed focusing mechanism when starting sitelinkgroupview edit mode. If 
possible, the first element
in the viewport will be focused in order to prevent unintended automatic 
scrolling.

Change-Id: Ie7b9350fec733d080cc9056a8e6ce56e6e78a755
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
2 files changed, 35 insertions(+), 12 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index 40c85dd..267515f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -267,8 +267,8 @@
this.stopEditing( true );
},
 
-   focus: function() {
-   this.$sitelinklistview.data( 'sitelinklistview' ).focus();
+   focus: function( considerViewPort ) {
+   this.$sitelinklistview.data( 'sitelinklistview' ).focus( 
considerViewport );
},
 
/**
@@ -408,7 +408,7 @@
 
btnSave[enable ? 'enable' : 'disable']();
},
-   toolbareditgroupedit: function( event, toolbarcontroller ) {
+   edittoolbaredit: function( event, toolbarcontroller ) {
var $sitelinkgroupview = $( event.target ),
sitelinkgroupview = $sitelinkgroupview.data( 
'sitelinkgroupview' );
 
@@ -416,7 +416,7 @@
return;
}
 
-   sitelinkgroupview.focus();
+   sitelinkgroupview.focus( true );
}
}
 } );
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
index 0e7933d..aad37d3 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
@@ -497,23 +497,46 @@
this.stopEditing( true );
},
 
-   focus: function() {
+   /**
+* @param {boolean} considerViewPort
+*/
+   focus: function( considerViewPort ) {
// Focus first invalid/incomplete item or - if there is none - 
the first item.
var listview = this.$listview.data( 'listview' ),
lia = listview.listItemAdapter(),
-   $items = listview.items();
+   $items = listview.items(),
+   $toFocus;
+
+   /**
+* @param {jQuery} $nodes
+* @return {jQuery}
+*/
+   function filterInViewPort( $nodes ) {
+   var $window = $( window );
+
+   var $filtered = $nodes.filter( function() {
+   var $node = $( this );
+   return $node.is( ':visible' )  
$node.offset().top  $window.scrollTop();
+   } );
+
+   return $filtered.length ? $filtered : $nodes;
+   }
 
if( this.isValid()  $items.length ) {
-   lia.liInstance( $items.first() ).focus();
+   lia.liInstance(
+   ( considerViewPort ? filterInViewPort( $items ) 
: $items ).first()
+   ).focus();
return;
}
 
-   $items.each( function( $item ) {
-   var sitelinkview = lia.liInstance( $item );
-   if( !sitelinkview.isValid() ) {
-   sitelinkview.focus();
-   }
+   var $invalid = $items.filter( function() {
+   var sitelinkview = lia.liInstance( $( this ) );
+   return !sitelinkview.isValid();
} );
+
+   lia.liInstance(
+   ( considerViewPort ? filterInViewPort( $invalid ) : 
$invalid ).first()
+   ).focus();
},
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7b9350fec733d080cc9056a8e6ce56e6e78a755
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de


[MediaWiki-commits] [Gerrit] hiera: use the same lookup rules for private and public hier... - change (operations/puppet)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: hiera: use the same lookup rules for private and public hiera 
dirs
..


hiera: use the same lookup rules for private and public hiera dirs

At the moment, private/common and common/ directives acted differently:

$apache::mpm::worker would be searched in

$base/hieradata/common/apache/mpm.yaml

for common (searching for the variable worker) and

$private_base/hieradata/common.yaml

for private/common.

This patch makes both hiera directives work as common did before.
Also, a bug that caused the search key to get modified was fixed as well.

Change-Id: Ieb958008c1a67f48d24be5967b08f6f0ddcb86ea
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
1 file changed, 15 insertions(+), 8 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, but someone else must approve
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb 
b/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
index e75149a..2f4e376 100644
--- a/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
+++ b/modules/wmflib/lib/hiera/backend/nuyaml_backend.rb
@@ -81,12 +81,17 @@
   end
 
   def get_path(key, scope, source)
+config_section = :nuyaml
 # Special case: 'private' repository.
 # We use a different datadir in this case.
+# Example: private/common will search in the common source
+# within the private datadir
 if m = /private\/(.*)/.match(source)
-  return key, Backend.datafile(:private, scope, m[1], yaml)
+  config_section = :private
+  source = m[1]
 end
 
+Hiera.debug(The source is: #{source})
 # If the source is in the expand_path list, perform path
 # expansion. This is thought to allow large codebases to live
 # with fairly small yaml files as opposed to a very large one.
@@ -95,13 +100,14 @@
 if @expand_path.include? source
   namespaces = key.gsub(/^::/,'').split('::')
   newkey = namespaces.pop
+
   unless namespaces.empty?
 source += /.concat(namespaces.join('/'))
 key = newkey
   end
 end
 
-return key, Backend.datafile(:nuyaml, scope, source, yaml)
+return key, Backend.datafile(config_section, scope, source, yaml)
   end
 
   def lookup(key, scope, order_override, resolution_type)
@@ -115,7 +121,6 @@
   if @dynlookup.include? source
 Hiera.debug(Dynamic lookup for source #{source})
 if key == source
-  Hiera.debug(#{source}: Not searching recursively myself)
   next
 end
 dynsource = lookup(source, scope, order_override, :priority)
@@ -123,9 +128,11 @@
 source += /#{dynsource}
   end
 
-  Hiera.debug(Loading info from #{source})
+  Hiera.debug(Loading info from #{source} for #{key})
 
-  key, yamlfile = get_path(key, scope, source)
+  lookup_key, yamlfile = get_path(key, scope, source)
+
+  Hiera.debug(Searching for #{lookup_key} in #{yamlfile})
 
   next if yamlfile.nil?
 
@@ -138,13 +145,13 @@
   end
 
   next if data.empty?
-  next unless data.include?(key)
+  next unless data.include?(lookup_key)
 
   # Extra logging that we found the key. This can be outputted
   # multiple times if the resolution type is array or hash but that
   # should be expected as the logging will then tell the user ALL the
   # places where the key is found.
-  Hiera.debug(Found #{key} in #{source})
+  Hiera.debug(Found #{lookup_key} in #{source})
 
   # for array resolution we just append to the array whatever
   # we find, we then goes onto the next file and keep adding to
@@ -153,7 +160,7 @@
   # for priority searches we break after the first found data
   # item
 
-  new_answer = Backend.parse_answer(data[key], scope)
+  new_answer = Backend.parse_answer(data[lookup_key], scope)
   case resolution_type
   when :array
 raise Exception, Hiera type mismatch: expected Array and got 
#{new_answer.class} unless new_answer.kind_of? Array or new_answer.kind_of? 
String

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb958008c1a67f48d24be5967b08f6f0ddcb86ea
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] granting jkatz bastion and statistics-user access - change (operations/puppet)

2014-10-22 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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

Change subject: granting jkatz bastion and statistics-user access
..

granting jkatz bastion and statistics-user access

updating admins module to allow jkatz to login to bastions + statistics
machines

Change-Id: Iafdbb142479f12a4c2094c7e4046727aeb418bab
RT: 8647
---
M modules/admin/data/data.yaml
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/168066/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 7b5df09..8069f38 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -55,7 +55,7 @@
 description: these folks are allowed bastion _only_ access
 members: [howief, jforrester, jmorgan, maryana, msyed, yuvipanda,
   haithams, mhurd, dbrant, mglaser, mah, kleduc, bsitzmann, deskana,
-  jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, edenhill]
+  jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, edenhill, 
jkatz]
   cassandra-roots:
 gid: 708
 description: users with root on cassandra hosts
@@ -162,7 +162,7 @@
   maryana, mattflaschen, mhurd, yurik, awight, jforrester,
   qchris, tnegrin, marktraceur, msyed, nuria, leila, gilles, 
haithams,
   yuvipanda, dbrant, tgr, haithams, handrade, dr0ptp4kt, brion, 
bsitzmann,
-  deskana, jzerebecki, dduvall, nettrom, mforns]
+  deskana, jzerebecki, dduvall, nettrom, mforns, jkatz]
   statistics-admins:
 posix_name: stats
 description: access files created by stats user cron jobs
@@ -1173,3 +1173,10 @@
 realname: Joel Sahleen
 ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC2T57VzSaiXa3wgaoeMHSTFa9PTpSQeKKVn9ww4CaY/qW3e6+X8Mqql4YanBYNXlg4r3LJTKUFvnf99uuInvXVYfll7Nt8g9Hos+nXJCZuJHq5eLTAijpm8zannofWDE55Twfwzg1aNAgXjILvyHghGWsCM1QpVcCsQtMgijaNRhDT5xV290s3uVXAjIWaHz1VtyJuQELrWafowY+2g6Z9lqhIhU6qt4HdBE7Rp0JRfPXgONM+5s7ltZHoRlLd2axOwFLsECTjeMD/RYDc5pqlI7Cvn9btU35/mDDYbbPvxBJF7Xw658tSC2V9v8Vu6VS0HVpyfuZRpyjF4G/j6A3r
 jsahl...@wikimedia.org]
 uid: 10257
+  jkatz:
+ensure: present
+gid: 500
+name: jkatz
+realname: Jon Katz
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC+A9f2ZCC4XyAsXS8t6xlZGOxL480Qi8i3vs4bjvGFX42GTgUpil6AcfuD9n+VzSKb+bjR21jrXPFuss9xapZdsRieIR5C3NC+g1Sh0zVuzNRvC9kUv1DAxG9ADDTW228SmyJ2zfZFdqu1p0++AlAU+agGcvp1Ih97VU8ZpkEKcYRSXbAKnKkV+sdx3BtEOC0m7O/+wPGDfwOYQfgqDkj2t4alEi7gV60b98f/9kOM6JQH5NC5UhKIx5yc4tVrTvTEyJj96qhitzjB9vDXDc14pg2nMNT4d5J+YMAEgmgA5J0W5EteI8lP2RqmLjwgVsoVQI4rNVmnKyO6pPCaSkPj
 jk...@jon-katzs-air.corp.wikimedia.org]
+uid: 10747

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafdbb142479f12a4c2094c7e4046727aeb418bab
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] granting jkatz bastion and statistics-user access - change (operations/puppet)

2014-10-22 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: granting jkatz bastion and statistics-user access
..


granting jkatz bastion and statistics-user access

updating admins module to allow jkatz to login to bastions + statistics
machines

Change-Id: Iafdbb142479f12a4c2094c7e4046727aeb418bab
RT: 8647
---
M modules/admin/data/data.yaml
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 7b5df09..8069f38 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -55,7 +55,7 @@
 description: these folks are allowed bastion _only_ access
 members: [howief, jforrester, jmorgan, maryana, msyed, yuvipanda,
   haithams, mhurd, dbrant, mglaser, mah, kleduc, bsitzmann, deskana,
-  jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, edenhill]
+  jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, edenhill, 
jkatz]
   cassandra-roots:
 gid: 708
 description: users with root on cassandra hosts
@@ -162,7 +162,7 @@
   maryana, mattflaschen, mhurd, yurik, awight, jforrester,
   qchris, tnegrin, marktraceur, msyed, nuria, leila, gilles, 
haithams,
   yuvipanda, dbrant, tgr, haithams, handrade, dr0ptp4kt, brion, 
bsitzmann,
-  deskana, jzerebecki, dduvall, nettrom, mforns]
+  deskana, jzerebecki, dduvall, nettrom, mforns, jkatz]
   statistics-admins:
 posix_name: stats
 description: access files created by stats user cron jobs
@@ -1173,3 +1173,10 @@
 realname: Joel Sahleen
 ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC2T57VzSaiXa3wgaoeMHSTFa9PTpSQeKKVn9ww4CaY/qW3e6+X8Mqql4YanBYNXlg4r3LJTKUFvnf99uuInvXVYfll7Nt8g9Hos+nXJCZuJHq5eLTAijpm8zannofWDE55Twfwzg1aNAgXjILvyHghGWsCM1QpVcCsQtMgijaNRhDT5xV290s3uVXAjIWaHz1VtyJuQELrWafowY+2g6Z9lqhIhU6qt4HdBE7Rp0JRfPXgONM+5s7ltZHoRlLd2axOwFLsECTjeMD/RYDc5pqlI7Cvn9btU35/mDDYbbPvxBJF7Xw658tSC2V9v8Vu6VS0HVpyfuZRpyjF4G/j6A3r
 jsahl...@wikimedia.org]
 uid: 10257
+  jkatz:
+ensure: present
+gid: 500
+name: jkatz
+realname: Jon Katz
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC+A9f2ZCC4XyAsXS8t6xlZGOxL480Qi8i3vs4bjvGFX42GTgUpil6AcfuD9n+VzSKb+bjR21jrXPFuss9xapZdsRieIR5C3NC+g1Sh0zVuzNRvC9kUv1DAxG9ADDTW228SmyJ2zfZFdqu1p0++AlAU+agGcvp1Ih97VU8ZpkEKcYRSXbAKnKkV+sdx3BtEOC0m7O/+wPGDfwOYQfgqDkj2t4alEi7gV60b98f/9kOM6JQH5NC5UhKIx5yc4tVrTvTEyJj96qhitzjB9vDXDc14pg2nMNT4d5J+YMAEgmgA5J0W5EteI8lP2RqmLjwgVsoVQI4rNVmnKyO6pPCaSkPj
 jk...@jon-katzs-air.corp.wikimedia.org]
+uid: 10747

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafdbb142479f12a4c2094c7e4046727aeb418bab
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] zuul: replaces 'email_filter' by 'email' - change (integration/config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: zuul: replaces 'email_filter' by 'email'
..


zuul: replaces 'email_filter' by 'email'

email_filter has been deprecated in Zuul layout configuration by
https://review.openstack.org/#/c/102030/

Change-Id: I66208b904a3f012cc8540f53b8f388aa60569a7c
---
M zuul/layout.yaml
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d3ef48a..e4e22f0 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -35,8 +35,8 @@
   # Don't run the check pipeline if the user is allowed to run the 
test pipeline (bug 43391).
   # TODO: Figure out a way to turn this into a list instead of a 
single-line regex.
   # TODO: Figure out a way to not have to repeat this from pipeline 
'test'.
-  # This email_filter and the one for 'test' can be removed once we 
have fixed bug 45499.
-  email_filter:
+  # This email filter and the one for 'test' can be removed once we 
have fixed bug 45499.
+  email:
 - 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|sucheta\.ghoshal@gmail\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|git@samsmith\.io|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@gmail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|marielle\.volz@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|twkozlowski@gmail\.com|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com|pastakhov@yandex\.ru|hardikjuneja\.hj@gmail\.com|siebrand@kitano\.nl|wctaiwan@gmail\.com|ladsgroup@gmail\.com|info@gno\.de|valhallasw@arctus\.nl|zhorishna@gmail\.com|jayvdb@gmail\.com|skizzerz@gmail\.com|jan\.wikimedia@zerebecki\.de|rillke@wikipedia\.de|mwalker@khaosdev\.com|se4598@gmx\.de|oliver\.buchtala@gmail\.com|florian\.schmidt\.welzow@t-online\.de|johnflewis93@gmail\.com)).*$
 
 success-message: 'Basic test build succeeded.'
@@ -59,7 +59,7 @@
 trigger:
   gerrit:
 - event: patchset-created
-  email_filter:
+  email:
- ^(?!l10n-bot@translatewiki\.net).*$
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
@@ -101,9 +101,9 @@
 
   # BEWARE:
   # - Make sure to use non greedy selectors (.*?) and to escape dots: 
\.
-  # - Also update the email_filter of the 'check' pipeline.
+  # - Also update the email filter of the 'check' pipeline.
 
-  email_filter: email_whitelist
+  email: email_whitelist
- .*?@wikimedia\.org$
- .*?@wikimedia\.de$
 
@@ -221,7 +221,7 @@
 # pipeline by simply commenting 'recheck' on a change.
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
-  email_filter: *email_whitelist
+  email: *email_whitelist
 
 success-message: 'Main test build succeeded.'
 success:
@@ -241,7 +241,7 @@
   gerrit:
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*check experimental\.?\s*$
-  email_filter: *email_whitelist
+  email: *email_whitelist
 success-message: 'Experimental build succeeded.'
 success:
   gerrit: {}
@@ -262,7 +262,7 @@
 trigger:
   gerrit:
 - event: comment-added
-  email_filter:
+  email:

[MediaWiki-commits] [Gerrit] Introduce usage tracking service. - change (mediawiki...Wikibase)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Introduce usage tracking service.
..


Introduce usage tracking service.

This introduces the UsageTracker and UsageLookup service interfaces
along with a suitable implementation, database setup/update code,
and bidings for the top level storage factory.

The usage tracking service is however not used anywhere yet.

Bug: 64586
Bug: 64587
Change-Id: Ib3a970179eb47d19e449baba5ed89e46723b5559
---
M client/WikibaseClient.php
A client/includes/Usage/EntityUsage.php
A client/includes/Usage/Sql/SqlUsageTracker.php
A client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
A client/includes/Usage/Sql/UsageTableUpdater.php
A client/includes/Usage/Sql/entity_usage.sql
A client/includes/Usage/SubscriptionManager.php
A client/includes/Usage/UsageLookup.php
A client/includes/Usage/UsageTracker.php
A client/includes/Usage/UsageTrackerException.php
M client/includes/WikibaseClient.php
M client/includes/store/ClientStore.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
A client/tests/phpunit/includes/Usage/EntityUsageTest.php
A client/tests/phpunit/includes/Usage/Sql/SqlUsageTrackerTest.php
A client/tests/phpunit/includes/Usage/Sql/UsageTableUpdaterTest.php
A client/tests/phpunit/includes/Usage/UsageLookupContractTester.php
A client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php
M client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
M composer.json
A docs/usagetracking.wiki
22 files changed, 1,770 insertions(+), 29 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index c4e159d..02a6362 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -112,6 +112,9 @@
$wgHooks['BaseTemplateAfterPortlet'][] = 
'\Wikibase\ClientHooks::onBaseTemplateAfterPortlet';
$wgHooks['GetBetaFeaturePreferences'][] = 
'\Wikibase\ClientHooks::onGetBetaFeaturePreferences';
 
+   // update hooks
+   $wgHooks['LoadExtensionSchemaUpdates'][] = 
'\Wikibase\Client\Usage\Sql\SqlUsageTrackerSchemaUpdater::onSchemaUpdate';
+
// extension hooks
$wgHooks['WikibaseDeleteData'][]= 
'\Wikibase\ClientHooks::onWikibaseDeleteData';
$wgHooks['WikibaseRebuildData'][]   = 
'\Wikibase\ClientHooks::onWikibaseRebuildData';
diff --git a/client/includes/Usage/EntityUsage.php 
b/client/includes/Usage/EntityUsage.php
new file mode 100644
index 000..40725df
--- /dev/null
+++ b/client/includes/Usage/EntityUsage.php
@@ -0,0 +1,110 @@
+?php
+
+namespace Wikibase\Client\Usage;
+
+use InvalidArgumentException;
+use Wikibase\DataModel\Entity\EntityId;
+
+/**
+ * Value object representing the usage of an entity. This includes information 
about
+ * how the entity is used, but not where.
+ *
+ * @see docs/usagetracking.wiki
+ *
+ * @license GPL 2+
+ * @author Daniel Kinzler
+ */
+class EntityUsage {
+
+   /**
+* Usage flag indicating that the entity's sitelinks were used.
+* This would be the case when generating language links or sister 
links from
+* an entity's sitelinks.
+*/
+   const SITELINK_USAGE = 'S';
+
+   /**
+* Usage flag indicating that the entity's label in the local content 
language was used.
+* This would be the case when showing the label of a referenced entity.
+*/
+   const LABEL_USAGE = 'L';
+
+   /**
+* Usage flag indicating that the entity's local page name was used.
+* This would be the case when linking a referenced entity to the
+* corresponding local wiki page.
+*/
+   const TITLE_USAGE = 'T';
+
+   /**
+* Usage flag indicating that any and all aspects of the entity
+* were (or may have been) used.
+*/
+   const ALL_USAGE = 'X';
+
+   /**
+* A list of all valid aspects
+*
+* @var array
+*/
+   private static $aspects = array(
+   self::SITELINK_USAGE,
+   self::LABEL_USAGE,
+   self::TITLE_USAGE,
+   self::ALL_USAGE
+   );
+
+   /**
+* @var EntityId
+*/
+   private $entityId;
+
+   /**
+* @var string
+*/
+   private $aspect;
+
+   /**
+* @param EntityId $entityId
+* @param string $aspect use the XXX_USAGE constants
+*
+* @throws InvalidArgumentException
+*/
+   public function __construct( EntityId $entityId, $aspect ) {
+   if ( !in_array( $aspect, self::$aspects ) ) {
+   throw new InvalidArgumentException( '$aspect must use 
one of the XXX_USAGE constants!' );
+   }
+
+   $this-entityId = $entityId;
+   $this-aspect = 

[MediaWiki-commits] [Gerrit] Factor connection management into separate class. - change (mediawiki...Wikibase)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Factor connection management into separate class.
..


Factor connection management into separate class.

Change-Id: Ia2209dc8833a7ab660f72392760a248427dae8cb
---
M client/includes/Usage/Sql/SqlUsageTracker.php
A client/includes/store/sql/ConnectionManager.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/includes/Usage/Sql/SqlUsageTrackerTest.php
A client/tests/phpunit/includes/store/sql/ConnectionManagerTest.php
5 files changed, 221 insertions(+), 74 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/Usage/Sql/SqlUsageTracker.php 
b/client/includes/Usage/Sql/SqlUsageTracker.php
index d75d6ee..40caaa3 100644
--- a/client/includes/Usage/Sql/SqlUsageTracker.php
+++ b/client/includes/Usage/Sql/SqlUsageTracker.php
@@ -9,6 +9,7 @@
 use InvalidArgumentException;
 use Iterator;
 use LoadBalancer;
+use Wikibase\Client\Store\Sql\ConnectionManager;
 use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\Usage\UsageLookup;
 use Wikibase\Client\Usage\UsageTracker;
@@ -35,9 +36,9 @@
private $idParser;
 
/**
-* @var LoadBalancer
+* @var ConnectionManager
 */
-   private $loadBalancer;
+   private $connectionManager;
 
/**
 * @var int
@@ -48,10 +49,10 @@
 * @param EntityIdParser $idParser
 * @param LoadBalancer $loadBalancer
 */
-   public function __construct( EntityIdParser $idParser, LoadBalancer 
$loadBalancer ) {
+   public function __construct( EntityIdParser $idParser, 
ConnectionManager $connectionManager ) {
$this-tableName = 'wbc_entity_usage';
$this-idParser = $idParser;
-   $this-loadBalancer = $loadBalancer;
+   $this-connectionManager = $connectionManager;
}
 
/**
@@ -79,61 +80,6 @@
 */
public function getBatchSize() {
return $this-batchSize;
-   }
-
-   /**
-* @return DatabaseBase
-*/
-   private function getReadConnection() {
-   return $this-loadBalancer-getConnection( DB_READ );
-   }
-
-   /**
-* @return DatabaseBase
-*/
-   private function getWriteConnection() {
-   return $this-loadBalancer-getConnection( DB_WRITE );
-   }
-
-   /**
-* @param DatabaseBase $db
-*/
-   private function releaseConnection( DatabaseBase $db ) {
-   $this-loadBalancer-reuseConnection( $db );
-   }
-
-   /**
-* @param string $fname
-*
-* @return DatabaseBase
-*/
-   private function beginAtomicSection( $fname = __METHOD__ ) {
-   $db = $this-getWriteConnection();
-   $db-startAtomic( $fname );
-   return $db;
-   }
-
-   /**
-* @param DatabaseBase $db
-* @param string $fname
-*
-* @return DatabaseBase
-*/
-   private function commitAtomicSection( DatabaseBase $db, $fname = 
__METHOD__ ) {
-   $db-endAtomic( $fname );
-   $this-releaseConnection( $db );
-   }
-
-   /**
-* @param DatabaseBase $db
-* @param string $fname
-*
-* @return DatabaseBase
-*/
-   private function rollbackAtomicSection( DatabaseBase $db, $fname = 
__METHOD__ ) {
-   //FIXME: there does not seem to be a clean way to roll back an 
atomic section?!
-   $db-rollback( $fname, 'flush' );
-   $this-releaseConnection( $db );
}
 
/**
@@ -175,7 +121,7 @@
throw new InvalidArgumentException( '$pageId must be an 
int.' );
}
 
-   $db = $this-beginAtomicSection( __METHOD__ );
+   $db = $this-connectionManager-beginAtomicSection( __METHOD__ 
);
 
try {
$oldUsage = $this-queryUsageForPage( $db, $pageId );
@@ -183,10 +129,10 @@
$tableUpdater = $this-newTableUpdater( $db );
$tableUpdater-updateUsage( $pageId, $oldUsage, $usages 
);
 
-   $this-commitAtomicSection( $db, __METHOD__ );
+   $this-connectionManager-commitAtomicSection( $db, 
__METHOD__ );
return $oldUsage;
} catch ( Exception $ex ) {
-   $this-rollbackAtomicSection( $db, __METHOD__ );
+   $this-connectionManager-rollbackAtomicSection( $db, 
__METHOD__ );
 
if ( $ex instanceof DBError ) {
throw new UsageTrackerException( 
$ex-getMessage(), $ex-getCode(), $ex );
@@ -208,15 +154,15 @@
return;
}
 
-   $db = 

[MediaWiki-commits] [Gerrit] Fix inverted logic introduced in 835b57feb8470ff1d - change (mediawiki...Wikibase)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix inverted logic introduced in 835b57feb8470ff1d
..


Fix inverted logic introduced in 835b57feb8470ff1d

Change-Id: I1fcc6bdad834e7217c65f299c1e2a149d8895d49
---
M repo/Wikibase.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 17941cc..e02daaa 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -1130,7 +1130,7 @@
public static function onOutputPageBeforeHtmlRegisterConfig( OutputPage 
$out, $html ) {
$entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
 
-   if ( $entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
+   if ( !$entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
return true;
}
 
@@ -1159,7 +1159,7 @@
public static function onMakeGlobalVariablesScript( $vars, $out ) {
$entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
 
-   if ( $entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
+   if ( !$entityNamespaceLookup-isEntityNamespace( 
$out-getTitle()-getNamespace() ) ) {
return true;
}
 
@@ -1326,7 +1326,7 @@
$title = $skinTemplate-getTitle();
$entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
 
-   if ( $entityNamespaceLookup-isEntityNamespace( 
$title-getNamespace() ) ) {
+   if ( !$entityNamespaceLookup-isEntityNamespace( 
$title-getNamespace() ) ) {
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1fcc6bdad834e7217c65f299c1e2a149d8895d49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] wikitech: do not include sudoers::labs_project via ldap - change (operations/mediawiki-config)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: wikitech: do not include sudoers::labs_project via ldap
..

wikitech: do not include sudoers::labs_project via ldap

This change can be merged after
I22571a240d5e754bb24e8809db569dd7aa6b68af has been merged - that will
make the role::instance::labs class include sudoers::labs_project directly

Change-Id: I7e2a7785b5a3081e201b3cb9c1164a42cb964a5f
---
M wmf-config/wikitech.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/wikitech.php b/wmf-config/wikitech.php
index 549a887..5b04dce 100644
--- a/wmf-config/wikitech.php
+++ b/wmf-config/wikitech.php
@@ -63,7 +63,7 @@
 );
 $wgOpenStackManagerPuppetOptions = array(
'enabled' = true,
-   'defaultclasses' = array( 'base', 'role::labs::instance', 
'sudo::labs_project' ),
+   'defaultclasses' = array( 'base', 'role::labs::instance' ),
'defaultvariables' = array( 'realm' = 'labs' ),
 );
 $wgOpenStackManagerInstanceUserData = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e2a7785b5a3081e201b3cb9c1164a42cb964a5f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] sitelinkview: Do not invoke cancelEditing() in destroy - change (mediawiki...Wikibase)

2014-10-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: sitelinkview: Do not invoke cancelEditing() in destroy
..

sitelinkview: Do not invoke cancelEditing() in destroy

cancelEditing() involves emitting events that may lead to unintended actions in 
parent components
trying to interact with the now destroyed sitelinkview.

Change-Id: I7f110e483b7e5a446180f5ca2612f47b50d674a3
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index f3016f7..723ef79 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -114,6 +114,10 @@
 * @see jQuery.ui.TemplatedWidget.destroy
 */
destroy: function() {
+   if( this._badgeselector ) {
+   this._badgeselector.destroy();
+   }
+
if( this._isInEditMode ) {
var self = this;
 
@@ -121,7 +125,7 @@
PARENT.prototype.destroy.call( self );
} );
 
-   this.cancelEditing();
+   this.element.removeClass( 'wb-edit' );
} else {
PARENT.prototype.destroy.call( this );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f110e483b7e5a446180f5ca2612f47b50d674a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Setup generator as a script by itself - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Setup generator as a script by itself
..


Setup generator as a script by itself

Change-Id: I8d204d96bcb4d1ff63fa9e1c3d7c502b2716b7ac
---
R scripts/shingen
M setup.py
2 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/shingen/generate.py b/scripts/shingen
similarity index 64%
rename from shingen/generate.py
rename to scripts/shingen
old mode 100644
new mode 100755
index d6c6aa0..c44667e
--- a/shingen/generate.py
+++ b/scripts/shingen
@@ -1,8 +1,9 @@
+#!/usr/bin/python3
 import os
 import yaml
-from .generators.generator import GeneratorRunner
-from .generators.hostgroups import generate_hostgroups_config
-from .generators.hosts import generate_host_config
+from shingen.generators.generator import GeneratorRunner
+from shingen.generators.hostgroups import generate_hostgroups_config
+from shingen.generators.hosts import generate_host_config
 
 default_config = {
 'projects': ['tools'],
diff --git a/setup.py b/setup.py
index f05e3a8..8b52349 100644
--- a/setup.py
+++ b/setup.py
@@ -9,6 +9,7 @@
 license=Apache2,
 
url=https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen;,
 packages=['shingen'],
+scripts=['scripts/shingen'],
 install_requires=[
 'jinja2',
 'pyyaml',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d204d96bcb4d1ff63fa9e1c3d7c502b2716b7ac
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add Apache2 License - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Add Apache2 License
..


Add Apache2 License

Change-Id: Ifc35e3c6a479d49579affd1173f2a346c2ff0f49
---
A COPYING
1 file changed, 202 insertions(+), 0 deletions(-)

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



diff --git a/COPYING b/COPYING
new file mode 100644
index 000..d645695
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  Contribution shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, submitted
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as Not a Contribution.
+
+  Contributor shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  copyright license to reproduce, prepare Derivative Works of,
+  publicly display, publicly perform, sublicense, and distribute the
+  Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  (except as stated in this section) patent license to make, have made,
+  use, offer to sell, sell, import, and otherwise transfer the Work,
+  where such license applies only to those patent claims licensable
+  by such Contributor that are necessarily infringed by their
+  Contribution(s) alone or by 

[MediaWiki-commits] [Gerrit] Make sure setup.py picks up all packages - change (operations...shinkengen)

2014-10-22 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Make sure setup.py picks up all packages
..


Make sure setup.py picks up all packages

Change-Id: I01ead7bf5afe91754a7a21bd3000132e15ed5411
---
M setup.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/setup.py b/setup.py
index 8b52349..21a630c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from setuptools import setup
+from setuptools import setup, find_packages
 
 setup(
 name=shinkengen,
@@ -8,7 +8,7 @@
 description=(A shinken config generator for Wikimedia Labs),
 license=Apache2,
 
url=https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen;,
-packages=['shingen'],
+packages=find_packages(),
 scripts=['scripts/shingen'],
 install_requires=[
 'jinja2',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01ead7bf5afe91754a7a21bd3000132e15ed5411
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/shinkengen
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] bundle jobs no more process submodules - change (integration/config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: bundle jobs no more process submodules
..


bundle jobs no more process submodules

Assuming that git submodule are never being of any help, stop processing
them.  That is at least needed for rubocop jobs.

Change-Id: I4bfda33f7471d18b44feb4ec948013ddda4c1014
---
M jjb/ruby-jobs.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml
index a3bc9c1..f301fce 100644
--- a/jjb/ruby-jobs.yaml
+++ b/jjb/ruby-jobs.yaml
@@ -19,7 +19,7 @@
 - job-template:
 name: '{name}-bundle-{bundlecommand}'
 node: contintLabsSlave  UbuntuTrusty
-defaults: use-remote-zuul
+defaults: use-remote-zuul-no-submodules
 concurrent: true
 triggers:
  - zuul

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bfda33f7471d18b44feb4ec948013ddda4c1014
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update token hmac algorithm to sha256 - change (mediawiki/core)

2014-10-22 Thread CSteipp (Code Review)
CSteipp has uploaded a new change for review.

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

Change subject: Update token hmac algorithm to sha256
..

Update token hmac algorithm to sha256

Although known preimage attacks on md5 aren't practical yet, if an
attacker is able to find the value of wsEditToken from the edit token,
they would be able to get around the time limit on tokens.

Using sha256 should make this impossible.

Change-Id: I005e55bc6e5622a1e2cae6624e6ec6c988bde951
---
M includes/User.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/168069/1

diff --git a/includes/User.php b/includes/User.php
index 3661b4f..a01ce62 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -3897,7 +3897,7 @@
if ( is_array( $salt ) ) {
$salt = implode( '|', $salt );
}
-   return hash_hmac( 'md5', $timestamp . $salt, $token, 
false ) .
+   return hash_hmac( 'sha256', $timestamp . $salt, $token, 
false ) .
dechex( $timestamp ) .
self::EDIT_TOKEN_SUFFIX;
}
@@ -3950,11 +3950,11 @@
}
 
$suffixLen = strlen( self::EDIT_TOKEN_SUFFIX );
-   if ( strlen( $val ) = 32 + $suffixLen ) {
+   if ( strlen( $val ) = 64 + $suffixLen ) {
return false;
}
 
-   $timestamp = hexdec( substr( $val, 32, -$suffixLen ) );
+   $timestamp = hexdec( substr( $val, 64, -$suffixLen ) );
if ( $maxage !== null  $timestamp  wfTimestamp() - $maxage ) 
{
// Expired token
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I005e55bc6e5622a1e2cae6624e6ec6c988bde951
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: CSteipp cste...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow for time-limited tokens - change (mediawiki/core)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow for time-limited tokens
..


Allow for time-limited tokens

Tokens returned from User::getEditToken will now include an encoded
timestamp (and therefore will be up to 16 bytes longer).

User::matchEditToken and User::matchEditTokenNoSuffix are gaining a
maxage parameter: when specified, only tokens with an encoded timestamp
within $maxage seconds will be accepted.

Change-Id: Ic4cf148cc1fa9d0561aac0bd2d68a09c7851896d
---
M RELEASE-NOTES-1.25
M includes/User.php
M tests/phpunit/includes/api/ApiTestCase.php
3 files changed, 67 insertions(+), 24 deletions(-)

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



diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 2180022..ce2cbd7 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -12,6 +12,10 @@
 * $wgPageShowWatchingUsers was removed.
 * $wgLocalVirtualHosts has been added to replace $wgConf-localVHosts.
 * $wgAntiLockFlags was removed.
+* Edit tokens returned from User::getEditToken may change on every call. Token
+  validity must be checked by passing the user-supplied token to
+  User::matchEditToken rather than by testing for equality with a
+  newly-generated token.
 
 === New features in 1.25 ===
 * (bug 58139) ResourceLoaderFileModule now supports language fallback
@@ -33,6 +37,8 @@
   - Usage instructions: 
https://www.mediawiki.org/wiki/Help:Page_status_indicators
   - Adjusting custom skins to support indicators:
 https://www.mediawiki.org/wiki/Manual:Skinning#Page_status_indicators
+* Edit tokens may now be time-limited: passing a maximum age to
+  User::matchEditToken will reject any older tokens.
 
 === Bug fixes in 1.25 ===
 * (bug 71003) No additional code will be generated to try to load CSS-embedded
diff --git a/includes/User.php b/includes/User.php
index e6425f8..3661b4f 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -3877,6 +3877,33 @@
}
 
/**
+* Internal implementation for self::getEditToken() and
+* self::matchEditToken().
+*
+* @param string|array $salt
+* @param WebRequest $request
+* @param string|int $timestamp
+* @return string
+*/
+   private function getEditTokenAtTimestamp( $salt, $request, $timestamp ) 
{
+   if ( $this-isAnon() ) {
+   return self::EDIT_TOKEN_SUFFIX;
+   } else {
+   $token = $request-getSessionData( 'wsEditToken' );
+   if ( $token === null ) {
+   $token = MWCryptRand::generateHex( 32 );
+   $request-setSessionData( 'wsEditToken', $token 
);
+   }
+   if ( is_array( $salt ) ) {
+   $salt = implode( '|', $salt );
+   }
+   return hash_hmac( 'md5', $timestamp . $salt, $token, 
false ) .
+   dechex( $timestamp ) .
+   self::EDIT_TOKEN_SUFFIX;
+   }
+   }
+
+   /**
 * Initialize (if necessary) and return a session token value
 * which can be used in edit forms to show that the user's
 * login credentials aren't being hijacked with a foreign form
@@ -3889,23 +3916,9 @@
 * @return string The new edit token
 */
public function getEditToken( $salt = '', $request = null ) {
-   if ( $request == null ) {
-   $request = $this-getRequest();
-   }
-
-   if ( $this-isAnon() ) {
-   return self::EDIT_TOKEN_SUFFIX;
-   } else {
-   $token = $request-getSessionData( 'wsEditToken' );
-   if ( $token === null ) {
-   $token = MWCryptRand::generateHex( 32 );
-   $request-setSessionData( 'wsEditToken', $token 
);
-   }
-   if ( is_array( $salt ) ) {
-   $salt = implode( '|', $salt );
-   }
-   return md5( $token . $salt ) . self::EDIT_TOKEN_SUFFIX;
-   }
+   return $this-getEditTokenAtTimestamp(
+   $salt, $request ?: $this-getRequest(), wfTimestamp()
+   );
}
 
/**
@@ -3928,15 +3941,34 @@
 * @param string $val Input value to compare
 * @param string $salt Optional function-specific data for hashing
 * @param WebRequest|null $request Object to use or null to use 
$wgRequest
+* @param int $maxage Fail tokens older than this, in seconds
 * @return bool Whether the token matches
 */
-   public function matchEditToken( $val, $salt = '', $request = null ) {
-   

[MediaWiki-commits] [Gerrit] Make CreateRedirectModuleTest actually assert - change (mediawiki...Wikibase)

2014-10-22 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Make CreateRedirectModuleTest actually assert
..

Make CreateRedirectModuleTest actually assert

Change-Id: I71b92cba6cfe3d367185851df00fa44c1db042e9
---
M repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php 
b/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php
index 4afe91e..d6095be 100644
--- a/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php
+++ b/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php
@@ -204,10 +204,10 @@
public function testModuleFlags() {
$module = $this-newApiModule( array() );
 
-   $this-isTrue( $module-mustBePosted(), 'mustBePosted' );
-   $this-isTrue( $module-isWriteMode(), 'isWriteMode' );
-   $this-isTrue( $module-needsToken(), 'needsToken' );
-   $this-isTrue( $module-getTokenSalt(), 'getTokenSalt' );
+   $this-assertTrue( $module-mustBePosted(), 'mustBePosted' );
+   $this-assertTrue( $module-isWriteMode(), 'isWriteMode' );
+   $this-assertEquals( $module-needsToken(), 'csrf', 
'needsToken' );
+   $this-assertEquals( $module-getTokenSalt(), '', 
'getTokenSalt' );
 
//NOTE: Would be nice to test the token check directly, but 
that is done via
//  ApiMain::execute, which is bypassed by callApiModule().

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71b92cba6cfe3d367185851df00fa44c1db042e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Prefix search always squashes accents - change (mediawiki...CirrusSearch)

2014-10-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Prefix search always squashes accents
..

Prefix search always squashes accents

Enable accent squashing for all prefix searches.  The argument is that
even if you speak a language that prefers accents not be squashed you
might be on a keyboard without accents.  We're not taking this argument
further and adding accent squashing to all searches at this point (or
maybe ever).

Bug: 67521
Change-Id: I1e9dc357b861edf1ff3c959e3ac3b287292c2bea
---
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Search/ResultsType.php
M includes/Searcher.php
M tests/browser/features/prefix_search.feature
M tests/browser/features/relevancy.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/step_definitions/simple_search_steps.rb
M tests/browser/features/support/hooks.rb
M tests/browser/features/support/pages/search_page.rb
10 files changed, 122 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/71/168071/1

diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 6474627..cdc5ed4 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -30,7 +30,7 @@
 * and change the minor version when it changes but isn't
 * incompatible
 */
-   const VERSION = '0.9';
+   const VERSION = '0.10';
 
/**
 * Language code we're building analysis for
@@ -112,10 +112,22 @@
'filter' = array( 'lowercase' ),
'char_filter' = array( 
'near_space_flattener' ),
),
+   'near_match_asciifolding' = array(
+   'type' = 'custom',
+   'tokenizer' = 'no_splitting',
+   'filter' = array( 'lowercase', 
'asciifolding' ),
+   'char_filter' = array( 
'near_space_flattener' ),
+   ),
'prefix' = array(
'type' = 'custom',
'tokenizer' = 'prefix',
'filter' = array( 'lowercase' ),
+   'char_filter' = array( 
'near_space_flattener' ),
+   ),
+   'prefix_asciifolding' = array(
+   'type' = 'custom',
+   'tokenizer' = 'prefix',
+   'filter' = array( 'lowercase', 
'asciifolding' ),
'char_filter' = array( 
'near_space_flattener' ),
),
'word_prefix' = array(
@@ -157,6 +169,10 @@
'max_gram' = 
Searcher::MAX_TITLE_SEARCH,
),
'asciifolding' = array(
+   'type' = 'asciifolding',
+   'preserve_original' = false
+   ),
+   'asciifolding_preserve' = array(
'type' = 'asciifolding',
'preserve_original' = true
),
@@ -245,15 +261,13 @@
$filters[] = 'stop';
$filters[] = 'kstem';
$filters[] = 'custom_stem';
-   $filters[] = 'asciifolding';
+   $filters[] = 'asciifolding_preserve';
$config[ 'analyzer' ][ 'text' ][ 'filter' ] = $filters;
 
-   // Add asciifolding to the the plain analyzer as well 
(but not plain_search)
-   $config[ 'analyzer' ][ 'plain' ][ 'filter' ][] = 
'asciifolding';
-   // Add asciifolding to the prefix queries and 
incategory filters
-   $config[ 'analyzer' ][ 'prefix' ][ 'filter' ][] = 
'asciifolding';
-   $config[ 'analyzer' ][ 'lowercase_keyword' ][ 'filter' 
][] = 'asciifolding';
-   $config[ 'analyzer' ][ 'near_match' ][ 'filter' ][] = 
'asciifolding';
+   // Add asciifolding_preserve to the the plain analyzer 
as well (but not plain_search)
+   $config[ 'analyzer' ][ 'plain' ][ 'filter' ][] = 
'asciifolding_preserve';
+   // Add asciifolding_preserve filters
+ 

[MediaWiki-commits] [Gerrit] Allow siteselector to dynamically retrieve site objects - change (mediawiki...Wikibase)

2014-10-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Allow siteselector to dynamically retrieve site objects
..

Allow siteselector to dynamically retrieve site objects

Prerequisite for enabling an managing a dynamically added input element in the 
sitelinklistview.

Change-Id: I17d1a7d9739d5c0e5d0590a027f57a859de941f7
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
M lib/resources/jquery.wikibase/resources.php
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
5 files changed, 65 insertions(+), 9 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
index aad37d3..62fc95b 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
@@ -135,8 +135,10 @@
newItemOptionsFn: function( value ) {
return {
value: value,
-   getAllowedSiteIds: function() {
-   return 
self._getUnusedAllowedSiteIds();
+   getAllowedSites: function() {
+   return $.map( 
self._getUnusedAllowedSiteIds(), function( siteId ) {
+   return 
wb.sites.getSite( siteId );
+   } );
},
entityStore: 
self.options.entityStore
};
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index 723ef79..d24c448 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -15,8 +15,8 @@
  * @option {wikibase.datamodel.SiteLink} [value]
  * Default: null
  *
- * @option {Function} [getAllowedSiteIds]
- * Function returning an array of wikibase.datamodel.SiteLink objects.
+ * @option {Function} [getAllowedSites]
+ * Function returning an array of wikibase.Site objects.
  * Default: function() { return []; }
  *
  * @option {wikibase.store.EntityStore} entityStore
@@ -76,7 +76,7 @@
'$link': '.wikibase-sitelinkview-link'
},
value: null,
-   getAllowedSiteIds: function() { return []; },
+   getAllowedSites: function() { return []; },
entityStore: null,
helpMessage: mw.msg( 'wikibase-sitelinks-input-help-message' )
},
@@ -228,9 +228,7 @@
var $siteIdInput = $( 'input/' )
.attr( 'placeholder', mw.msg( 
'wikibase-sitelink-site-edit-placeholder' ) )
.siteselector( {
-   source: $.map( this.option( 'getAllowedSiteIds' 
)(), function( siteId ) {
-   return wb.sites.getSite( siteId );
-   } )
+   source: self.options.getAllowedSites
} );
 
var pagesuggester = $pageNameInput.data( 'pagesuggester' );
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
index 06334be..97dca3e 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
@@ -10,7 +10,15 @@
 * Enhances an input box with auto-complete and auto-suggestion 
functionality for site ids.
 * @since 0.2
 *
-* @example $( 'input' ).siteselector( { source: {wb.Site[]} } );
+* @example $( 'input' ).siteselector( { source: {wikibase.Site[]} } 
);
+*
+* @option {wikibase.Site[]|Function} source
+* An array of Site objects that shall be used to provide 
suggestions. Alternatively, a
+* function dynamically retrieving an array of Site objects may 
be provided.
+*
+* @option {number} [delay]
+* Delay in milliseconds of the request querying for 
suggestions.
+* Default: 0
 *
 * @event selected
 *Triggered whenever a 

[MediaWiki-commits] [Gerrit] Update EditEntityActionTest, per change in core token handling - change (mediawiki...Wikibase)

2014-10-22 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Update EditEntityActionTest, per change in core token handling
..

Update EditEntityActionTest, per change in core token handling

needed for the test to work with Ic4cf148c

Change-Id: I2086a663eefac7ad8663e4c12cfdc131765d4c07
---
M repo/tests/phpunit/includes/actions/EditEntityActionTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php 
b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
index 22e3801..7d2a783 100644
--- a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
+++ b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
@@ -594,7 +594,7 @@
),
true,// post
null, // user
-   '/session_fail_preview/', // htmlPattern: 
should contain error
+   '/token_suffix_mismatch/', // htmlPattern: 
should contain error
),
 
// -- incomplete form 
---

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2086a663eefac7ad8663e4c12cfdc131765d4c07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Support protocol-relative URLs in the whitelist - change (mediawiki...ConfirmEdit)

2014-10-22 Thread Jackmcbarn (Code Review)
Jackmcbarn has uploaded a new change for review.

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

Change subject: Support protocol-relative URLs in the whitelist
..

Support protocol-relative URLs in the whitelist

Bug: 61556
Change-Id: Icac9f8357ac08db0cf2f5be562e9ed1f8f13eba3
---
M Captcha.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/74/168074/1

diff --git a/Captcha.php b/Captcha.php
index 995feb4..968a7a8 100644
--- a/Captcha.php
+++ b/Captcha.php
@@ -403,7 +403,7 @@
// return '/' . str_replace( '/', '\/', 
preg_replace('|\\\*/|', '/', $regex) ) . '/Si';
$regexes = array();
$regexStart = array(
-   'normal' = '/^https?:\/\/+[a-z0-9_\-.]*(?:',
+   'normal' = 
'/^(?:https?:)?\/\/+[a-z0-9_\-.]*(?:',
'noprotocol' = '/^(?:',
);
$regexEnd = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icac9f8357ac08db0cf2f5be562e9ed1f8f13eba3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com

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


[MediaWiki-commits] [Gerrit] Upgraded sitelinkview focus flow - change (mediawiki...Wikibase)

2014-10-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Upgraded sitelinkview focus flow
..

Upgraded sitelinkview focus flow

Change-Id: I6d44d4a3314b6a1a7e3c525dd6e329e681394e38
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
1 file changed, 17 insertions(+), 3 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index d24c448..7323c2a 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -244,6 +244,8 @@
$pageNameInput
.attr( 'lang', site.getLanguageCode() )
.attr( 'dir', site.getLanguageDirection() );
+   } else {
+   $pageNameInput.val( '' );
}
 
pagesuggester[site ? 'enable' : 'disable']();
@@ -257,6 +259,15 @@
this.$siteId
.attr( 'colspan', '2' )
.append( $siteIdInput );
+
+   $pageNameInput
+   .on( 'keydown.' + this.widgetName, function( event ) {
+   if( event.keyCode === $.ui.keyCode.BACKSPACE  
$pageNameInput.val() === '' ) {
+   event.stopPropagation();
+   $siteIdInput.val( '' ).focus();
+   $siteIdInput.data( 'siteselector' 
).setSelectedSite( null );
+   }
+   } );
},
 
/**
@@ -443,10 +454,13 @@
var $siteselector = this.element.find( ':wikibase-siteselector' 
),
$pagesuggester = this.element.find( 
':wikibase-pagesuggester' );
 
-   if( $siteselector.length ) {
-   $siteselector.focus();
-   } else if( $pagesuggester.length ) {
+   if(
+   $pagesuggester.length
+!$pagesuggester.data( 'pagesuggester' ).option( 
'disabled' )
+   ) {
$pagesuggester.focus();
+   } else if( $siteselector.length ) {
+   $siteselector.focus();
}
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d44d4a3314b6a1a7e3c525dd6e329e681394e38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Optimized sitelinkgroupview toolbar definitions - change (mediawiki...Wikibase)

2014-10-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Optimized sitelinkgroupview toolbar definitions
..

Optimized sitelinkgroupview toolbar definitions

Change-Id: Id801fd03f1fbb9b6b46cb4734e58c873f465a5a8
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
1 file changed, 2 insertions(+), 26 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index ca17f3c..381ea3c 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -370,7 +370,7 @@
interactionWidget: sitelinkgroupview
} );
 
-   $sitelinkgroupview.on( 'keyup.edittoolbar', function( 
event ) {
+   $sitelinkgroupview.on( 'keydown.edittoolbar', function( 
event ) {
if( sitelinkgroupview.option( 'disabled' ) ) {
return;
}
@@ -512,30 +512,8 @@
selector: ':' + $.wikibase.sitelinkgroupview.prototype.namespace
+ '-' + $.wikibase.sitelinkgroupview.prototype.widgetName,
events: {
-   sitelinkgroupviewafterstartediting: function( event, 
toolbarcontroller ) {
+   'sitelinkgroupviewafterstartediting sitelinkgroupviewchange': 
function( event ) {
var $sitelinkgroupview = $( event.target ),
-   sitelinkgroupview = $sitelinkgroupview.data( 
'sitelinkgroupview' ),
-   $sitelinklistview = 
sitelinkgroupview.$sitelinklistview,
-   sitelinklistview = $sitelinklistview.data( 
'sitelinklistview' ),
-   sitelinklistviewListview = 
sitelinklistview.$listview.data( 'listview' );
-
-   sitelinklistviewListview.items().each( function() {
-   var $sitelinkview = $( this );
-
-   $sitelinkview
-   .removetoolbar( {
-   $container: $( 'div/' ).appendTo( 
$sitelinkview.children( 'td' ).last() )
-   } )
-   .on( 'removetoolbarremove.removetoolbar', 
function( event ) {
-   if( event.target !== $sitelinkview.get( 
0 ) ) {
-   return;
-   }
-   sitelinklistview.$listview.data( 
'listview' ).removeItem( $sitelinkview );
-   } );
-   } );
-   },
-   sitelinkgroupviewchange: function( event, toolbarcontroller ) {
-   var $sitelinkgroupview = $( event.target ).closest( 
':wikibase-sitelinkgroupview' ),
sitelinkgroupview = $sitelinkgroupview.data( 
'sitelinkgroupview' ),
$sitelinklistview = 
sitelinkgroupview.$sitelinklistview,
sitelinklistview = $sitelinklistview.data( 
'sitelinklistview' ),
@@ -552,8 +530,6 @@
return;
}
 
-   // TODO: Resolve toolbar initialization 
appearing twice within the toolbar
-   // definition
$sitelinkview
.removetoolbar( {
$container: $( 'div/' ).appendTo( 
$sitelinkview.children( 'td' ).last() )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id801fd03f1fbb9b6b46cb4734e58c873f465a5a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Update EditEntityActionTest, per change in core token handling - change (mediawiki...Wikibase)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update EditEntityActionTest, per change in core token handling
..


Update EditEntityActionTest, per change in core token handling

needed for the test to work with Ic4cf148c

Change-Id: I2086a663eefac7ad8663e4c12cfdc131765d4c07
---
M repo/tests/phpunit/includes/actions/EditEntityActionTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php 
b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
index 22e3801..7d2a783 100644
--- a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
+++ b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
@@ -594,7 +594,7 @@
),
true,// post
null, // user
-   '/session_fail_preview/', // htmlPattern: 
should contain error
+   '/token_suffix_mismatch/', // htmlPattern: 
should contain error
),
 
// -- incomplete form 
---

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2086a663eefac7ad8663e4c12cfdc131765d4c07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Only link local titles on Special:Search - change (mediawiki/core)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Only link local titles on Special:Search
..


Only link local titles on Special:Search

Anything else is confusing, especially given the message text
we have there.

Example:
https://www.mediawiki.org/wiki/Special:Search?search=en%3Afoofulltext=1

Also fix the documentation of Title::isLocal as that was misleading
and fooled me (in PS1).

Change-Id: Iccb69de4c7243bf144a12deb8b86505e56a111dd
---
M includes/Title.php
M includes/specials/SpecialSearch.php
2 files changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index e8cda85..c570633 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -795,7 +795,8 @@
 
/**
 * Determine whether the object refers to a page within
-* this project.
+* this project (either this wiki or a wiki with a local
+* interwiki, see 
https://www.mediawiki.org/wiki/Manual:Interwiki_table#iw_local )
 *
 * @return bool True if this is an in-project interwiki link or a 
wikilink, false otherwise
 */
diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index c922fbd..a139740 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -426,15 +426,18 @@
return;
}
 
+   $messageName = 'searchmenu-new-nocreate';
$linkClass = 'mw-search-createlink';
-   if ( $title-isKnown() ) {
-   $messageName = 'searchmenu-exists';
-   $linkClass = 'mw-search-exists';
-   } elseif ( $title-quickUserCan( 'create', $this-getUser() ) ) 
{
-   $messageName = 'searchmenu-new';
-   } else {
-   $messageName = 'searchmenu-new-nocreate';
+
+   if ( !$title-isExternal() ) {
+   if ( $title-isKnown() ) {
+   $messageName = 'searchmenu-exists';
+   $linkClass = 'mw-search-exists';
+   } elseif ( $title-quickUserCan( 'create', 
$this-getUser() ) ) {
+   $messageName = 'searchmenu-new';
+   }
}
+
$params = array(
$messageName,
wfEscapeWikiText( $title-getPrefixedText() ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccb69de4c7243bf144a12deb8b86505e56a111dd
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Mute text color of accelerators in tool groups - change (oojs/ui)

2014-10-22 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Mute text color of accelerators in tool groups
..

Mute text color of accelerators in tool groups

This reduces confusion with the tool title text and is standard
practice in such UIs.

Change-Id: I647c9f7bef8454aa62fb7f69ef7b6b145f3e55ee
---
M src/themes/apex/tools.less
M src/themes/mediawiki/tools.less
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/78/168078/1

diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less
index 162641f..a0091e1 100644
--- a/src/themes/apex/tools.less
+++ b/src/themes/apex/tools.less
@@ -191,6 +191,9 @@
.oo-ui-tool-title {
line-height: 2em;
font-size: 0.8em;
+   .oo-ui-tool-accel {
+   color: #888;
+   }
}
}
 }
diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less
index 2d86d4b..0ece9f0 100644
--- a/src/themes/mediawiki/tools.less
+++ b/src/themes/mediawiki/tools.less
@@ -32,6 +32,9 @@
.oo-ui-widget-enabled {
.oo-ui-tool-link .oo-ui-tool-title {
color: #000;
+   .oo-ui-tool-accel {
+   color: #888;
+   }
}
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I647c9f7bef8454aa62fb7f69ef7b6b145f3e55ee
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add basic testing for Menu component (and a small bug fix :)) - change (mediawiki...chameleon)

2014-10-22 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Add basic testing for Menu component (and a small bug fix :))
..

Add basic testing for Menu component (and a small bug fix :))

Change-Id: I8c18246ae550d449cf0111439718677371247f8b
---
M src/Components/Menu.php
A tests/phpunit/Components/MenuTest.php
A tests/phpunit/Util/Fixture/Menu.xml
3 files changed, 54 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/79/168079/1

diff --git a/src/Components/Menu.php b/src/Components/Menu.php
index 18c8b1d..f741b61 100644
--- a/src/Components/Menu.php
+++ b/src/Components/Menu.php
@@ -45,6 +45,11 @@
public function getHtml() {
 
$element = $this-getDomElement();
+
+   if ( $element === null ){
+   return '';
+   }
+
$msgKey = $element-getAttribute( 'message' );
 
$menuFactory = new MenuFactory();
diff --git a/tests/phpunit/Components/MenuTest.php 
b/tests/phpunit/Components/MenuTest.php
new file mode 100644
index 000..2c68d56
--- /dev/null
+++ b/tests/phpunit/Components/MenuTest.php
@@ -0,0 +1,44 @@
+?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license   GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation, either version 3 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Menu
+ * @covers ::private
+ * @covers ::protected
+ *
+ * @group   skins-chameleon
+ * @group   mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class MenuTest extends ChameleonSkinComponentTestCase {
+
+   protected $classUnderTest = '\Skins\Chameleon\Components\Menu';
+
+}
diff --git a/tests/phpunit/Util/Fixture/Menu.xml 
b/tests/phpunit/Util/Fixture/Menu.xml
new file mode 100644
index 000..24b941b
--- /dev/null
+++ b/tests/phpunit/Util/Fixture/Menu.xml
@@ -0,0 +1,5 @@
+?xml version=1.0 encoding=utf-8?
+structure
+   component type=Menu/component
+/structure
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c18246ae550d449cf0111439718677371247f8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com

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


[MediaWiki-commits] [Gerrit] Some cleanup in action tests - change (mediawiki...Wikibase)

2014-10-22 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Some cleanup in action tests
..

Some cleanup in action tests

* use TestUser
* improve variable naming
* no need to add test sites, since the test items has no site links

Change-Id: I4b5dd715994d32cf8d1ffd8352883c9969473f9b
---
M repo/tests/phpunit/includes/actions/ActionTestCase.php
M repo/tests/phpunit/includes/actions/EditEntityActionTest.php
M repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
3 files changed, 5 insertions(+), 23 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/actions/ActionTestCase.php 
b/repo/tests/phpunit/includes/actions/ActionTestCase.php
index 6ebaf77..ee79fd7 100644
--- a/repo/tests/phpunit/includes/actions/ActionTestCase.php
+++ b/repo/tests/phpunit/includes/actions/ActionTestCase.php
@@ -40,27 +40,18 @@
 *
 * @var string
 */
-   protected $language = 'qqx';
+   protected $languageCode = 'qqx';
 
public function setUp() {
parent::setUp();
 
-   static $setUp = false;
-   if ( !$setUp ) {
-   $sitesTable = 
WikibaseRepo::getDefaultInstance()-getSiteStore();
-   $sitesTable-clear();
-   $sitesTable-saveSites( \TestSites::getSites() );
-   $setUp = true;
-   }
-
-   $lang = Language::factory( $this-language );
-   $user = new User();
-   $user-setName( ActionTestUser );
+   $testUser = new \TestUser( 'ActionTestUser' );
+   $user = $testUser-getUser();
$user-setId( 123456789 );
 
$this-setMwGlobals( array(
'wgUser' = $user,
-   'wgLang' = $lang,
+   'wgLang' = Language::factory( $this-languageCode ),
'wgRequest' = new FauxRequest(),
'wgGroupPermissions' = $GLOBALS['wgGroupPermissions'], 
// todo: use standard permissions
) );
diff --git a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php 
b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
index 7d2a783..9f0868e 100644
--- a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
+++ b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
@@ -3,7 +3,6 @@
 namespace Wikibase\Test;
 
 use MWException;
-use TestSites;
 use Title;
 use User;
 use Wikibase\Repo\EntityNamespaceLookup;
@@ -35,14 +34,6 @@
if ( !$user ) {
$user = User::newFromId( 0 );
$user-setName( '127.0.0.1' );
-   }
-
-   static $hasTitles = false;
-   if ( !$hasTitles ) {
-   $sitesTable = 
WikibaseRepo::getDefaultInstance()-getSiteStore();
-   $sitesTable-clear();
-   $sitesTable-saveSites( TestSites::getSites() );
-   $hasTitles = true;
}
 
$this-setMwGlobals( 'wgUser', $user );
diff --git a/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php 
b/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
index 40fdf3b..36282ab 100644
--- a/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
+++ b/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
@@ -24,7 +24,7 @@
 
public function setUp() {
// NOTE: use a language here for which we actually have labels 
etc
-   $this-language = 'de';
+   $this-languageCode = 'de';
 
// Remove handlers for the OutputPageParserOutput hook
$this-mergeMwGlobalArrayValue( 'wgHooks', array( 
'OutputPageParserOutput' = array() ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b5dd715994d32cf8d1ffd8352883c9969473f9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Improve docs - change (mediawiki...chameleon)

2014-10-22 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Improve docs
..

Improve docs

Change-Id: I3e7fbe27d95c5edf3d862a6f010c577ac93fc4a2
---
M docs/installation.md
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/80/168080/1

diff --git a/docs/installation.md b/docs/installation.md
index 54c6956..0918484 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -18,11 +18,23 @@
 4. Navigate to _Special:Version_ on your wiki to verify that the skin is
successfully installed.
 
+If you run into problems, try the
+[troubleshooting](installation-troubleshooting.md).
+
+There is also a longer, step-by-step instruction available for [installation on
+Windows](installation-windows.md).
+
 ### Update
 
 From your MediaWiki installation directory run
 `composer update mediawiki/chameleon-skin`
 
+To trigger a cache update it is necessary that the `LocalSettings.php` file has
+a modification time later than the last cache update time. This can be achieved
+by using the `touch` utility on UNIX and friends or by using
+`copy /b LocalSettings.php +,,` from the MediaWiki installation directory on
+Windows. Alternatively, just open the file and re-save it.
+
 ### De-installation
 
 Before de-installation make sure you secured (moved, backup'ed) any custom 
files

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e7fbe27d95c5edf3d862a6f010c577ac93fc4a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com

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


[MediaWiki-commits] [Gerrit] Added $.wikibase.sitelinkview.isEmpty() - change (mediawiki...Wikibase)

2014-10-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Added $.wikibase.sitelinkview.isEmpty()
..

Added $.wikibase.sitelinkview.isEmpty()

Change-Id: I5eb7e1a884bc87fa0a43fa842065700d8195a80a
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
2 files changed, 66 insertions(+), 0 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index 7323c2a..6e4807d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -273,6 +273,19 @@
/**
 * @return {boolean}
 */
+   isEmpty: function() {
+   if( !this._isInEditMode ) {
+   return !this.options.value;
+   }
+
+   return !this.options.value
+$.trim( this.$link.find( 'input' ).val() ) === ''
+$.trim( this.$siteId.find( 'input' ).val() ) === '';
+   },
+
+   /**
+* @return {boolean}
+*/
isValid: function() {
return !!this.value();
},
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
index 2dcad0a..5457608 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
@@ -214,6 +214,59 @@
);
} );
 
+   QUnit.test( 'isEmpty()', function( assert ) {
+   var siteLink = new wikibase.datamodel.SiteLink( 'enwiki', 'Main 
Page' ),
+   $sitelinkview = createSitelinkview(),
+   sitelinkview = $sitelinkview.data( 'sitelinkview' );
+
+   assert.ok(
+   sitelinkview.isEmpty(),
+   'isEmpty() returns TRUE when no site link is set and 
the widget is not in edit mode.'
+   );
+
+   sitelinkview.startEditing();
+
+   assert.ok(
+   sitelinkview.isEmpty(),
+   'Verified isEmpty() returning TRUE when no site link is 
set, the widget is in edit '
+   + 'and input elements are empty.'
+   );
+
+   $sitelinkview.find( ':wikibase-siteselector' ).val( 'site' );
+
+   assert.ok(
+   !sitelinkview.isEmpty(),
+   'Widget is not empty when the site selector is filled 
with input.'
+   );
+
+   $sitelinkview.find( ':wikibase-siteselector' ).val( '' );
+   $sitelinkview.find( ':wikibase-pagesuggester' ).val( 'page' );
+
+   assert.ok(
+   !sitelinkview.isEmpty(),
+   'Widget is not empty when the page suggester is filled 
with input.'
+   );
+
+   $sitelinkview = createSitelinkview( {
+   value: siteLink
+   } );
+   sitelinkview = $sitelinkview.data( 'sitelinkview' );
+
+   assert.ok(
+   !sitelinkview.isEmpty(),
+   'isEmpty() returns FALSE when a site link is set 
initially.'
+   );
+
+   sitelinkview.startEditing();
+   $sitelinkview.find( ':wikibase-pagesuggester' ).val( '' );
+
+   assert.ok(
+   !sitelinkview.isEmpty(),
+   'isEmpty() returns FALSE when a site link is set 
initially although the page suggester '
+   + ' input is cleared in edit mode.'
+   );
+   } );
+
QUnit.test( 'isValid()', function( assert ) {
var $sitelinkview = createSitelinkview(),
sitelinkview = $sitelinkview.data( 'sitelinkview' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5eb7e1a884bc87fa0a43fa842065700d8195a80a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Add basic testing for Menu component (and a small bug fix :)) - change (mediawiki...chameleon)

2014-10-22 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Add basic testing for Menu component (and a small bug fix :))
..


Add basic testing for Menu component (and a small bug fix :))

Change-Id: I8c18246ae550d449cf0111439718677371247f8b
---
M src/Components/Menu.php
A tests/phpunit/Components/MenuTest.php
A tests/phpunit/Util/Fixture/Menu.xml
3 files changed, 54 insertions(+), 0 deletions(-)

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



diff --git a/src/Components/Menu.php b/src/Components/Menu.php
index 18c8b1d..f741b61 100644
--- a/src/Components/Menu.php
+++ b/src/Components/Menu.php
@@ -45,6 +45,11 @@
public function getHtml() {
 
$element = $this-getDomElement();
+
+   if ( $element === null ){
+   return '';
+   }
+
$msgKey = $element-getAttribute( 'message' );
 
$menuFactory = new MenuFactory();
diff --git a/tests/phpunit/Components/MenuTest.php 
b/tests/phpunit/Components/MenuTest.php
new file mode 100644
index 000..2c68d56
--- /dev/null
+++ b/tests/phpunit/Components/MenuTest.php
@@ -0,0 +1,44 @@
+?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license   GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation, either version 3 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Menu
+ * @covers ::private
+ * @covers ::protected
+ *
+ * @group   skins-chameleon
+ * @group   mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class MenuTest extends ChameleonSkinComponentTestCase {
+
+   protected $classUnderTest = '\Skins\Chameleon\Components\Menu';
+
+}
diff --git a/tests/phpunit/Util/Fixture/Menu.xml 
b/tests/phpunit/Util/Fixture/Menu.xml
new file mode 100644
index 000..24b941b
--- /dev/null
+++ b/tests/phpunit/Util/Fixture/Menu.xml
@@ -0,0 +1,5 @@
+?xml version=1.0 encoding=utf-8?
+structure
+   component type=Menu/component
+/structure
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c18246ae550d449cf0111439718677371247f8b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Improve docs - change (mediawiki...chameleon)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve docs
..


Improve docs

Change-Id: I3e7fbe27d95c5edf3d862a6f010c577ac93fc4a2
---
M docs/installation.md
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/docs/installation.md b/docs/installation.md
index 736e167..e6d7e07 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -15,11 +15,23 @@
 3. With Composer installed, run `composer require 
mediawiki/chameleon-skin:~1.0`
 4. __Done:__ Navigate to _Special:Version_ on your wiki to verify that the 
skin is successfully installed.
 
+If you run into problems, try the
+[troubleshooting](installation-troubleshooting.md).
+
+There is also a longer, step-by-step instruction available for [installation on
+Windows](installation-windows.md).
+
 ### Update
 
 From your MediaWiki installation directory run `composer update
 mediawiki/chameleon-skin`
 
+To trigger a cache update it is necessary that the `LocalSettings.php` file has
+a modification time later than the last cache update time. This can be achieved
+by using the `touch` utility on UNIX and friends or by using
+`copy /b LocalSettings.php +,,` from the MediaWiki installation directory on
+Windows. Alternatively, just open the file and re-save it.
+
 ### De-installation
 
 Before de-installation make sure you secure (move, backup) any custom files you

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e7fbe27d95c5edf3d862a6f010c577ac93fc4a2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Re-enable PediaPress POD in production. - change (operations/mediawiki-config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Re-enable PediaPress POD in production.
..


Re-enable PediaPress POD in production.

Bug: 71675
Change-Id: Ifd9ac9e26c83c67861cc3dcc115726bc45b4710c
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
2 files changed, 9 insertions(+), 13 deletions(-)

Approvals:
  MarkTraceur: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 79ff655..615c63a 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -168,15 +168,6 @@
$wgCollectionMWServeURL = 'http://deployment-pdf01:8000';
$wgCollectionFormats[ 'rdf2text' ] = 'TXT';
$wgCollectionPortletFormats[] = 'rdf2text';
-   // enable pediapress in labs for testing (see bug 71675)
-   $wgCollectionPODPartners = array(
-   'pediapress' = array(
-   'name' = 'PediaPress',
-   'url' = 'http://pediapress.com/',
-   'posturl' = 'http://pediapress.com/api/collections/',
-   'infopagetitle' = 'coll-order_info_article',
-   ),
-   );
 }
 
 if ( $wmgUsePageImages ) {
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2e5fa7c..30cb134 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1592,13 +1592,18 @@
// PediaPress / PDF generation
include $IP/extensions/Collection/Collection.php;
$wgCollectionMWServeURL = 'http://ocg.svc.eqiad.wmnet:8000';
-   // Use pediapress server for POD function
+   // Use pediapress server for POD function (bug 71675)
$wgCollectionCommandToServeURL = array(
'zip_post' = 'https://pediapress.com/wmfup/',
);
-   // ...but disable pediapress for now (bug 71675)
-   // (until https://gerrit.wikimedia.org/r/165234 is deployed)
-   $wgCollectionPODPartners = false;
+   $wgCollectionPODPartners = array(
+   'pediapress' = array(
+   'name' = 'PediaPress',
+   'url' = 'http://pediapress.com/',
+   'posturl' = 'http://pediapress.com/api/collections/',
+   'infopagetitle' = 'coll-order_info_article',
+   ),
+   );
 
// MediaWiki namespace is not a good default
$wgCommunityCollectionNamespace = NS_PROJECT;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd9ac9e26c83c67861cc3dcc115726bc45b4710c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prerender thumbnails at upload time on Commons - change (operations/mediawiki-config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prerender thumbnails at upload time on Commons
..


Prerender thumbnails at upload time on Commons

Change-Id: I2ac3fc0ac2443fa90cbb2ac90a5b162c0ad06212
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/301
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d5da20f..4aa0144 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14163,7 +14163,6 @@
 // Thumbnail prerendering at upload time
 'wgUploadThumbnailRenderMap' = array(
'default' = array( 320, 640, 800, 1024, 1280, 1920, 2560, 2880 ),
-   'commonswiki' = array(),
 ),
 
 'wgUploadThumbnailRenderMethod' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ac3fc0ac2443fa90cbb2ac90a5b162c0ad06212
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Revert Re-enable PediaPress POD in production. - change (operations/mediawiki-config)

2014-10-22 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Revert Re-enable PediaPress POD in production.
..

Revert Re-enable PediaPress POD in production.

This reverts commit 283c81733f71908592401daf2048af701ed2f1a4.

Change-Id: I19e1ecaf18387130d43cc8bc728a4c32eef85d3a
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
2 files changed, 13 insertions(+), 9 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 615c63a..79ff655 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -168,6 +168,15 @@
$wgCollectionMWServeURL = 'http://deployment-pdf01:8000';
$wgCollectionFormats[ 'rdf2text' ] = 'TXT';
$wgCollectionPortletFormats[] = 'rdf2text';
+   // enable pediapress in labs for testing (see bug 71675)
+   $wgCollectionPODPartners = array(
+   'pediapress' = array(
+   'name' = 'PediaPress',
+   'url' = 'http://pediapress.com/',
+   'posturl' = 'http://pediapress.com/api/collections/',
+   'infopagetitle' = 'coll-order_info_article',
+   ),
+   );
 }
 
 if ( $wmgUsePageImages ) {
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 30cb134..2e5fa7c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1592,18 +1592,13 @@
// PediaPress / PDF generation
include $IP/extensions/Collection/Collection.php;
$wgCollectionMWServeURL = 'http://ocg.svc.eqiad.wmnet:8000';
-   // Use pediapress server for POD function (bug 71675)
+   // Use pediapress server for POD function
$wgCollectionCommandToServeURL = array(
'zip_post' = 'https://pediapress.com/wmfup/',
);
-   $wgCollectionPODPartners = array(
-   'pediapress' = array(
-   'name' = 'PediaPress',
-   'url' = 'http://pediapress.com/',
-   'posturl' = 'http://pediapress.com/api/collections/',
-   'infopagetitle' = 'coll-order_info_article',
-   ),
-   );
+   // ...but disable pediapress for now (bug 71675)
+   // (until https://gerrit.wikimedia.org/r/165234 is deployed)
+   $wgCollectionPODPartners = false;
 
// MediaWiki namespace is not a good default
$wgCommunityCollectionNamespace = NS_PROJECT;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19e1ecaf18387130d43cc8bc728a4c32eef85d3a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org

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


[MediaWiki-commits] [Gerrit] Improved expression - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Improved expression
..

Improved expression

There is no need to make a second check if sth should be added, do it in
the first. Nothing needs to be added if not true

Change-Id: I37453f4dc8c452055ce4b5b69b53e43787ccf685
---
M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/83/168083/1

diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js 
b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
index a1785f8..c6cc507 100644
--- a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
+++ b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
@@ -364,10 +364,10 @@
if ( inputField.val() === '' ) return false;
url = wgServer + wgScriptPath +
'?search_scope=textsearch_submit=1q=' 
+ encodeURIComponent( inputField.val() );
-
-   if ( typeof bsExtendedSearchSearchFiles !== 'undefined' 
) {
-   url += 'search_files=' + ( 
bsExtendedSearchSearchFiles ) ? 1 : 0;
+   if ( typeof bsExtendedSearchSearchFiles !== 'undefined' 
 bsExtendedSearchSearchFiles ) {
+   url += 'search_files=1';
}
+
thread = setTimeout( function() { 
ExtendedSearchAjaxManager.ajaxMeANewResultsPlz( url ) }, 300 );
} );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37453f4dc8c452055ce4b5b69b53e43787ccf685
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli mug...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] [WIP] v1.11 support - change (pywikibot/core)

2014-10-22 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: [WIP] v1.11 support
..

[WIP] v1.11 support

Will be split into separate changesets.
Some parts are obvious, or bugs/fixes in all versions;
Others are nasty workarounds that may need to be moved into a separate
class for old sites, which is considered 'use at your own risk'.

Change-Id: I46e24d50361ca7d5c88e11cb381e1f6ec2a68aaa
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/site.py
M pywikibot/tools.py
M scripts/interwiki.py
M tests/page_tests.py
M tests/site_tests.py
M tests/utils.py
8 files changed, 308 insertions(+), 80 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/84/168084/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 4f46027..c4a0268 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -25,7 +25,7 @@
 
 import pywikibot
 from pywikibot import config, login
-from pywikibot.tools import MediaWikiVersion as LV, deprecated
+from pywikibot.tools import MediaWikiVersion as LV, deprecated, need_version
 from pywikibot.exceptions import Server504Error, FatalServerError, Error
 
 import sys
@@ -622,6 +622,16 @@
% type(result),
data=result)
 if self.action == 'query':
+# 1.11 can return userinfo in the outer dict.
+# 
http://glossary.reuters.com/api.php?action=querymeta=userinfoformat=json
+# 
http://glossary.reuters.com/api.php?action=queryformat=jsonmeta=userinfo|siteinfo
+if 'userinfo' in result:
+if 'query' not in result:
+result['query'] = {}
+result['query']['userinfo'] = result['userinfo']
+del result['userinfo']
+pywikibot.debug(uFixed old userinfo; result now: %r
+ % result, _logger)
 if 'userinfo' in result.get('query', ()):
 if hasattr(self.site, '_userinfo'):
 self.site._userinfo.update(result['query']['userinfo'])
@@ -799,6 +809,8 @@
 if self._expired(self._cachetime):
 self._data = None
 return False
+pywikibot.debug(uCached API request: %r % self._params, _logger)
+pywikibot.debug(uCached API response: %r % self._data, _logger)
 return True
 except IOError as e:
 # file not found
@@ -891,6 +903,109 @@
 # self.continuekey is a list
 self.continuekey = self.module.split('|')
 
+default_module_info = {
+'siteinfo': {
+'prefix': 'si'
+},
+'userinfo': {
+'prefix': 'ui'
+},
+'allmessages': {
+'prefix': 'am'
+},
+'allusers': {
+'prefix': 'au'
+},
+'allpages': {
+'prefix': 'ap'
+},
+'allimages': {
+'prefix': 'ai'
+},
+'allcategories': {
+'prefix': 'ac'
+},
+'allusers': {
+'prefix': 'au'
+},
+'alllinks': {
+'prefix': 'al'
+},
+'backlinks': {
+'prefix': 'bl',
+'parameters': [{'name': 'namespace'}]
+},
+'embeddedin': {
+'prefix': 'ei'
+},
+'imageusage': {
+'prefix': 'iu'
+},
+'blocks': {
+'prefix': 'bk'
+},
+'exturlusage': {
+'prefix': 'eu'
+},
+'categorymembers': {
+'prefix': 'cm'
+},
+'deletedrevs': {
+'prefix': 'dr'
+},
+'langbacklinks': {
+'prefix': 'lbl'
+},
+'pageswithprop': {
+'prefix': 'pwp'
+},
+'random': {
+'prefix': 'rn'
+},
+'prefixsearch': {
+'prefix': 'ps'
+},
+'recentchanges': {
+'prefix': 'rc'
+},
+'revisions': {
+'prefix': 'rv'
+},
+'usercontribs': {
+'prefix': 'uc'
+},
+'users': {
+'prefix': 'us'
+},
+'watchlist': {
+'prefix': 'wl'
+},
+'watchlistraw': {
+'prefix': 'wr'
+},
+'info': {
+'prefix': 'in'
+},
+'templates': {
+'prefix': 'tl'
+},
+'links': {
+'prefix': 'pl'
+},
+'langlinks': {
+'prefix': 'll'
+},
+'images': {
+'prefix': 'im'
+},
+'categories': {
+'prefix': 'cl'
+},
+'extlinks': {
+'prefix': 'el'
+},
+}
+
 @property
 def 

[MediaWiki-commits] [Gerrit] Work around *another* browser bug in getBoundingClientRect - change (VisualEditor/VisualEditor)

2014-10-22 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Work around *another* browser bug in getBoundingClientRect
..

Work around *another* browser bug in getBoundingClientRect

This time, the browser gets confused by the cursor position
that is actually two cursor positions: the end of a line  the
start of the next line.

Because all great bugs are released as trilogies.

Change-Id: I638757a27eec58ba7b25c7449582f47f546a0bd7
---
M src/ce/ve.ce.Surface.js
1 file changed, 17 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/85/168085/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index e4a17ad..825967a 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2810,13 +2810,13 @@
 /**
  * Get bounding client rect of a native range
  *
- * Works around some browser bugs in Range#getBoundingClientRect
+ * Works around lots of browser bugs in Range#getBoundingClientRect
  *
  * @param {Range} nativeRange Native range to get the bounding client rect of
  * @return {ClientRect|null} Client rectangle of the native selection, or null 
if there was a problem
  */
 ve.ce.Surface.prototype.getNativeRangeBoundingClientRect = function ( 
nativeRange ) {
-   var rects;
+   var rects, boundingRect;
 
if ( !nativeRange ) {
return null;
@@ -2837,8 +2837,21 @@
// See 
https://code.google.com/p/chromium/issues/detail?id=238976
return rects[0];
} else {
-   // After two browser bugs it's finally safe to try the 
bounding rect.
-   return nativeRange.getBoundingClientRect();
+   boundingRect = nativeRange.getBoundingClientRect();
+   if ( boundingRect.width === 0  boundingRect.height 
=== 0 ) {
+   // ... and we save the best bug until last:
+   // When nativeRange is a collapsed cursor at 
the end of a line or the start
+   // of a line, the bounding rect is [0,0,0,0] in 
Chrome. getClientRects returns
+   // two rects, one correct, and one at the end 
of the next line / start of the
+   // previous line. We can't tell here which one 
to use to just pick the first.
+   // This matches Firefox's behaviour, which 
tells you the cursor is at the end
+   // of the previous line when it is at the start 
of the line.
+   // See 
https://code.google.com/p/chromium/issues/detail?id=426017
+   return rects[0];
+   } else {
+   // After three browser bugs it's finally safe 
to try the bounding rect.
+   return nativeRange.getBoundingClientRect();
+   }
}
} catch ( e ) {
return null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I638757a27eec58ba7b25c7449582f47f546a0bd7
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Require 2 ACKs from kafka brokers for text caches - change (operations/puppet)

2014-10-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Require 2 ACKs from kafka brokers for text caches
..


Require 2 ACKs from kafka brokers for text caches

Bumping to 2 ACKs for mobile caches did not cause issues, so we move
forward and also require 2 ACKs for text caches.

Bug: 69667
Change-Id: I1cbd587c89f048dbdc75c28e4a5091e12cd19d3f
---
M manifests/role/cache.pp
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 1feae92..8dbf979 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -519,10 +519,13 @@
 # ramping up the number of machines that request more
 # ACKs.
 #
-# For now, it's only mobile (smallest cluster).
-# Other clusters will follow, if this works well.
+# For now, it's only mobile (smallest cluster), and text.
+# That's roughly 30% of requests and covers the production
+# use of the Analytics cluster.
+# Other cache clusters will follow, if this works well.
 $topic_request_required_acks  = $topic ? {
 'webrequest_mobile' = '2',
+'webrequest_text'   = '2',
 default = '1',
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cbd587c89f048dbdc75c28e4a5091e12cd19d3f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Gage jger...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: QChris christ...@quelltextlich.at
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Another es-tool function: restart a node the fast easy way - change (operations/puppet)

2014-10-22 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Another es-tool function: restart a node the fast  easy way
..


Another es-tool function: restart a node the fast  easy way

Change-Id: Ic646e2a90e0f71da359fb32e0b1a094eba5340e4
---
M modules/elasticsearch/files/es-tool
1 file changed, 61 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  Manybubbles: Looks good to me, but someone else must approve



diff --git a/modules/elasticsearch/files/es-tool 
b/modules/elasticsearch/files/es-tool
index 2a3d14c..3731cb1 100755
--- a/modules/elasticsearch/files/es-tool
+++ b/modules/elasticsearch/files/es-tool
@@ -2,9 +2,12 @@
 # -*- coding: utf-8 -*-
 import argparse
 import os
+import subprocess
 import sys
+import time
 
 from elasticsearch import Elasticsearch, TransportError
+from subprocess import CalledProcessError
 
 
 # Helper functions go here
@@ -38,6 +41,63 @@
 return os.EX_OK
 
 
+def es_restart_fast():
+# Sanity checks
+if os.getuid() != 0:
+print Must be run as root
+return os.EX_UNAVAILABLE
+if args.server != localhost:
+print Must be run against localhost only
+return os.EX_UNAVAILABLE
+
+# Disable replication so we can make recovery easier
+print Disabling non-primary replication...,
+if not set_allocation_state(primaries):
+print failed!
+return os.EX_UNAVAILABLE
+print ok
+
+# Actually restart the service
+try:
+subprocess.check_call([service, elasticsearch, restart])
+except CalledProcessError:
+print failed! -- You will still need to enable replication again,
+print with `es-tool start-replication`
+return os.EX_UNAVAILABLE
+
+# Wait for it to come back alive
+print Waiting for Elasticsearch...,
+while True:
+try:
+if cluster_health():
+print ok
+break
+except:
+pass
+print .,
+time.sleep(1)
+
+# Wait a sec
+time.sleep(1)
+
+# Turn replication back on so things will recover fully
+print Enabling all replication...,
+if not set_allocation_state(all):
+print failed! -- You will still need to enable replication again,
+print with `es-tool start-replication`
+return os.EX_UNAVAILABLE
+print ok
+
+# Wait a bit
+time.sleep(5)
+print Waiting for green (you can ctrl+c here if you have to)...,
+while cluster_health() != green:
+time.sleep(1)
+print ok
+
+return os.EX_OK
+
+
 def es_start_replication():
 if set_allocation_state(all):
 print All replication enabled
@@ -58,6 +118,7 @@
 # And register them here
 commands = {
 health: es_health,
+restart-fast: es_restart_fast,
 start-replication: es_start_replication,
 stop-replication: es_stop_replication,
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic646e2a90e0f71da359fb32e0b1a094eba5340e4
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad ch...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update URLs of renamed pages - change (mediawiki...MultimediaViewer)

2014-10-22 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Update URLs of renamed pages
..

Update URLs of renamed pages

Change-Id: I6547855881a86616a9df52ad38e97136ee16eae0
---
M MultimediaViewerHooks.php
M i18n/en.json
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/87/168087/1

diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index 82efd66..53c17d1 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -23,13 +23,13 @@
 
 class MultimediaViewerHooks {
/** Link to more information about this module */
-   protected static $infoLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Multimedia/About_Media_Viewer';
+   protected static $infoLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About';
 
/** Link to a page where this module can be discussed */
-   protected static $discussionLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Talk:Multimedia/About_Media_Viewer';
+   protected static $discussionLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Extension_talk:Media_Viewer/About';
 
/** Link to help about this module */
-   protected static $helpLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Multimedia/Media_Viewer/Help';
+   protected static $helpLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Help:Extension:Media_Viewer';
 
/**
 * Checks the context for whether to load the viewer.
diff --git a/i18n/en.json b/i18n/en.json
index 830ec56..9dbccdc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,7 +8,7 @@
multimediaviewer-desc-nil: No description available.,
multimediaviewer-pref: Media Viewer,
multimediaviewer-pref-desc: Improve your multimedia viewing 
experience with this new tool. It displays images in larger size on pages that 
have thumbnails. Images are shown in a nicer fullscreen interface overlay, and 
can also be viewed in full-size.,
-   multimediaviewer-optin-pref: Enable span 
class=\plainlinks\[https://www.mediawiki.org/wiki/Special:MyLanguage/Multimedia/About_Media_Viewer
 Media Viewer]/span,
+   multimediaviewer-optin-pref: Enable span 
class=\plainlinks\[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About
 Media Viewer]/span,
multimediaviewer-file-page: Go to corresponding file page,
multimediaviewer-repository-local: More details,
multimediaviewer-datetime-created: Created: $1,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6547855881a86616a9df52ad38e97136ee16eae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ocg: stop erratic puppet failures. - change (operations/puppet)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: ocg: stop erratic puppet failures.
..

ocg: stop erratic puppet failures.

require_packages() does some funky stuff in declaring the Packages, so
making a resource depend on those package specifically can give
unexpected result at compile-time

Change-Id: I50eb46536d4984894ee65f832918ee82a8cc7d30
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/ocg/manifests/init.pp
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/168088/1

diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index d98f4be..3bd003f 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -42,11 +42,10 @@
 system = true,
 }
 
-if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '14.04') 
= 0 ) {
+if (ubuntu_version('= trusty') ) {
 # Although we need NodeJS on the server, only ubuntu 14.04 currently
 # comes with it. On labs or 12.04 boxes it has to be installed by hand 
:(
 require_package('nodejs')
-Package['nodejs'] ~ Service['ocg']
 }
 
 # NOTE: If you change $nodebin you MUST also change the AppArmor

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50eb46536d4984894ee65f832918ee82a8cc7d30
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add logs from Extension:Collection to logstash. - change (operations/puppet)

2014-10-22 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Add logs from Extension:Collection to logstash.
..

Add logs from Extension:Collection to logstash.

Change-Id: Id99c4fe91307dfed461d67ccab22f1bb4b2170a7
---
M files/logstash/filter-mw-via-udp2log.conf
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/168089/1

diff --git a/files/logstash/filter-mw-via-udp2log.conf 
b/files/logstash/filter-mw-via-udp2log.conf
index 73630fa..25ea91f 100644
--- a/files/logstash/filter-mw-via-udp2log.conf
+++ b/files/logstash/filter-mw-via-udp2log.conf
@@ -52,6 +52,7 @@
   CirrusSearch,
   CirrusSearch-failed,
   CirrusSearch-slow,
+  collection,
   dbperformance,
   dnsblacklist,
   exception,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id99c4fe91307dfed461d67ccab22f1bb4b2170a7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update URLs of renamed pages - change (mediawiki...MultimediaViewer)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update URLs of renamed pages
..


Update URLs of renamed pages

Change-Id: I6547855881a86616a9df52ad38e97136ee16eae0
---
M MultimediaViewerHooks.php
M i18n/en.json
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index 82efd66..53c17d1 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -23,13 +23,13 @@
 
 class MultimediaViewerHooks {
/** Link to more information about this module */
-   protected static $infoLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Multimedia/About_Media_Viewer';
+   protected static $infoLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About';
 
/** Link to a page where this module can be discussed */
-   protected static $discussionLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Talk:Multimedia/About_Media_Viewer';
+   protected static $discussionLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Extension_talk:Media_Viewer/About';
 
/** Link to help about this module */
-   protected static $helpLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Multimedia/Media_Viewer/Help';
+   protected static $helpLink = 
'//mediawiki.org/wiki/Special:MyLanguage/Help:Extension:Media_Viewer';
 
/**
 * Checks the context for whether to load the viewer.
diff --git a/i18n/en.json b/i18n/en.json
index 830ec56..9dbccdc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,7 +8,7 @@
multimediaviewer-desc-nil: No description available.,
multimediaviewer-pref: Media Viewer,
multimediaviewer-pref-desc: Improve your multimedia viewing 
experience with this new tool. It displays images in larger size on pages that 
have thumbnails. Images are shown in a nicer fullscreen interface overlay, and 
can also be viewed in full-size.,
-   multimediaviewer-optin-pref: Enable span 
class=\plainlinks\[https://www.mediawiki.org/wiki/Special:MyLanguage/Multimedia/About_Media_Viewer
 Media Viewer]/span,
+   multimediaviewer-optin-pref: Enable span 
class=\plainlinks\[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About
 Media Viewer]/span,
multimediaviewer-file-page: Go to corresponding file page,
multimediaviewer-repository-local: More details,
multimediaviewer-datetime-created: Created: $1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6547855881a86616a9df52ad38e97136ee16eae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ocg: stop erratic puppet failures. - change (operations/puppet)

2014-10-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: ocg: stop erratic puppet failures.
..


ocg: stop erratic puppet failures.

require_packages() does some funky stuff in declaring the Packages, so
making a resource depend on those package specifically can give
unexpected result at compile-time

Change-Id: I50eb46536d4984894ee65f832918ee82a8cc7d30
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/ocg/manifests/init.pp
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index d98f4be..3bd003f 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -42,11 +42,10 @@
 system = true,
 }
 
-if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '14.04') 
= 0 ) {
+if (ubuntu_version('= trusty') ) {
 # Although we need NodeJS on the server, only ubuntu 14.04 currently
 # comes with it. On labs or 12.04 boxes it has to be installed by hand 
:(
 require_package('nodejs')
-Package['nodejs'] ~ Service['ocg']
 }
 
 # NOTE: If you change $nodebin you MUST also change the AppArmor

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50eb46536d4984894ee65f832918ee82a8cc7d30
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Temporarily adding americium to production to test pxe - change (operations/dns)

2014-10-22 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

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

Change subject: Temporarily adding americium to production to test pxe
..

Temporarily adding americium to production to test pxe

Change-Id: I3fdabe8b298ec36313e7a044015bb072f5ee6c3f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/86/168086/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 58d3f87..3572376 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1001,7 +1001,7 @@
 110 1H IN PTR   aluminium.frack.eqiad.wmnet.
 111 1H IN PTR   lutetium.frack.eqiad.wmnet.
 112 1H IN PTR   barium-fundraising.frack.eqiad.wmnet.
-113 1H IN PTR   americium.frack.eqiad.wmnet.
+#113 1H IN PTR   americium.frack.eqiad.wmnet.
 
 ; 10.64.40.128/27 - frack-dmz1-c-eqiad
 130 1H IN PTR   samarium.frack.eqiad.wmnet.
@@ -1050,6 +1050,7 @@
 41  1H IN PTR   elastic1019.eqiad.wmnet.
 42  1H IN PTR   ocg1002.eqiad.wmnet.
 43  1H IN PTR   ocg1003.eqiad.wmnet.
+44  1H IN PTR   americium.eqiad.wmnet.
 
 $ORIGIN 49.64.{{ zonename }}.
 1   1H IN PTR   vl1020-eth3.lvs1001.wikimedia.org.
diff --git a/templates/wmnet b/templates/wmnet
index 84720c4..789d07a 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -130,6 +130,7 @@
 
 ;Servers - listed alphabetically
 
+americium   1H  IN A 10.64.48.44
 analytics1003   1H  IN A 10.64.21.103
 analytics1004   1H  IN A 10.64.21.104
 ;analytics1007  1H  IN A 10.64.21.107
@@ -1894,7 +1895,7 @@
 
 $ORIGIN frack.eqiad.{{ zonename }}.
 aluminium   1H  IN A10.64.40.110
-americium   1H  IN A10.64.40.113
+#americium   1H  IN A10.64.40.113
 barium  1H  IN A10.64.40.109
 barium-fundraising 1H  IN A10.64.40.112
 boron   1H  IN A10.64.40.66

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fdabe8b298ec36313e7a044015bb072f5ee6c3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Logging: Remove log-level info from locationMsg - change (mediawiki...parsoid)

2014-10-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: Logging: Remove log-level info from locationMsg
..

Logging: Remove log-level info from locationMsg

Change-Id: If8feb636091af076dd84e55061e5722f33299915
---
M lib/ParsoidLogger.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/90/168090/1

diff --git a/lib/ParsoidLogger.js b/lib/ParsoidLogger.js
index 8a7e758..4d11b9c 100644
--- a/lib/ParsoidLogger.js
+++ b/lib/ParsoidLogger.js
@@ -78,7 +78,7 @@
 };
 
 ParsoidLogger.prototype.locationMsg = function(logData) {
-   var location = '[' + logData.logType + '][' + this.env.conf.wiki.iwp + 
'/' + this.env.page.name;
+   var location = '[' + this.env.conf.wiki.iwp + '/' + this.env.page.name;
var meta = this.env.page.meta;
if (meta  meta.revision  meta.revision.revid) {
location += '?oldid=' + meta.revision.revid;
@@ -90,7 +90,7 @@
// The default logging backend provided by Logger.js is not useful to 
us.
// Parsoid needs to be able to emit page location to logs.
try {
-   console.warn(logData.locationMsg() + ' ' + logData.fullMsg());
+   console.warn('[' + logData.logType + ']' + 
logData.locationMsg() + ' ' + logData.fullMsg());
} catch(e){
console.error(Error in ParsoidLogger._defaultBackend:  + e);
} finally{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8feb636091af076dd84e55061e5722f33299915
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Only include top level extension repositories - change (mediawiki...ExtensionDistributor)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Only include top level extension repositories
..


Only include top level extension repositories

Some extensions have subrepositories, which we shouldn't generate
tarballs for or even display, so skip them.

Change-Id: I2f53b23631aeeff91023ae8b44e2a4753c1f0ba3
---
M GerritExtDistProvider.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/GerritExtDistProvider.php b/GerritExtDistProvider.php
index 1a0b282..cb80189 100644
--- a/GerritExtDistProvider.php
+++ b/GerritExtDistProvider.php
@@ -73,7 +73,9 @@
$out = $this-makeGerritApiRequest( $this-extensionListUrl );
foreach ( $out as $name = $info ) {
$parts = explode( '/', $name );
-   $extensions[] = array_pop( $parts );
+   if ( count( $parts ) === 3 ) {
+   $extensions[] = array_pop( $parts );
+   }
}
 
return $extensions;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f53b23631aeeff91023ae8b44e2a4753c1f0ba3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Temporarily adding americium to production to test pxe - change (operations/dns)

2014-10-22 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: Temporarily adding americium to production to test pxe
..


Temporarily adding americium to production to test pxe

Change-Id: I3fdabe8b298ec36313e7a044015bb072f5ee6c3f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 58d3f87..3572376 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1001,7 +1001,7 @@
 110 1H IN PTR   aluminium.frack.eqiad.wmnet.
 111 1H IN PTR   lutetium.frack.eqiad.wmnet.
 112 1H IN PTR   barium-fundraising.frack.eqiad.wmnet.
-113 1H IN PTR   americium.frack.eqiad.wmnet.
+#113 1H IN PTR   americium.frack.eqiad.wmnet.
 
 ; 10.64.40.128/27 - frack-dmz1-c-eqiad
 130 1H IN PTR   samarium.frack.eqiad.wmnet.
@@ -1050,6 +1050,7 @@
 41  1H IN PTR   elastic1019.eqiad.wmnet.
 42  1H IN PTR   ocg1002.eqiad.wmnet.
 43  1H IN PTR   ocg1003.eqiad.wmnet.
+44  1H IN PTR   americium.eqiad.wmnet.
 
 $ORIGIN 49.64.{{ zonename }}.
 1   1H IN PTR   vl1020-eth3.lvs1001.wikimedia.org.
diff --git a/templates/wmnet b/templates/wmnet
index 84720c4..789d07a 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -130,6 +130,7 @@
 
 ;Servers - listed alphabetically
 
+americium   1H  IN A 10.64.48.44
 analytics1003   1H  IN A 10.64.21.103
 analytics1004   1H  IN A 10.64.21.104
 ;analytics1007  1H  IN A 10.64.21.107
@@ -1894,7 +1895,7 @@
 
 $ORIGIN frack.eqiad.{{ zonename }}.
 aluminium   1H  IN A10.64.40.110
-americium   1H  IN A10.64.40.113
+#americium   1H  IN A10.64.40.113
 barium  1H  IN A10.64.40.109
 barium-fundraising 1H  IN A10.64.40.112
 boron   1H  IN A10.64.40.66

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3fdabe8b298ec36313e7a044015bb072f5ee6c3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add API list=extensions to get the list of known extensions - change (mediawiki...ExtensionDistributor)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add API list=extensions to get the list of known extensions
..


Add API list=extensions to get the list of known extensions

This will be used by extdist.wmflabs instead of the now
deprecated extension-list.txt file.

Change-Id: Idfb28115f95a3ed80e0e656c0cc68193078c63fd
---
M ExtensionDistributor.php
A api/ApiListExtDistRepos.php
2 files changed, 42 insertions(+), 0 deletions(-)

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



diff --git a/ExtensionDistributor.php b/ExtensionDistributor.php
index cc7cf1e..ea9a783 100644
--- a/ExtensionDistributor.php
+++ b/ExtensionDistributor.php
@@ -70,6 +70,8 @@
 $wgAutoloadClasses['ExtDistProvider'] = $dir . 'ExtDistProvider.php';
 $wgAutoloadClasses['GerritExtDistProvider'] = $dir . 
'GerritExtDistProvider.php';
 $wgAutoloadClasses['GithubExtDistProvider'] = $dir . 
'GithubExtDistProvider.php';
+$wgAutoloadClasses['ApiListExtDistRepos'] = $dir . 
'api/ApiListExtDistRepos.php';
+$wgAPIListModules['extdistrepos'] = 'ApiListExtDistRepos';
 $wgHooks['APIQuerySiteInfoGeneralInfo'][] = function( ApiQuerySiteInfo $api, 
array $data ) {
global $wgExtDistSnapshotRefs, $wgExtDistListFile;
$data['extensiondistributor'] = array(
diff --git a/api/ApiListExtDistRepos.php b/api/ApiListExtDistRepos.php
new file mode 100644
index 000..0555754
--- /dev/null
+++ b/api/ApiListExtDistRepos.php
@@ -0,0 +1,40 @@
+?php
+
+class ApiListExtDistRepos extends ApiQueryGeneratorBase {
+
+   public function __construct( ApiQuery $query, $moduleName ) {
+   parent::__construct( $query, $moduleName, 'edr' );
+   }
+
+   public function execute() {
+   $this-run();
+   }
+
+   public function executeGenerator( $resultPageSet ) {
+   $this-run();
+   }
+
+   public function run() {
+   global $wgExtDistAPIConfig;
+   $provider = ExtDistProvider::factory( $wgExtDistAPIConfig );
+   $info = array(
+   'extensions' = $provider-getExtensionList(),
+   );
+   $this-getResult()-setIndexedTagName( $info['extensions'], 
'extension' );
+   $this-getResult()-addValue(
+   'query',
+   $this-getModuleName(),
+   $info
+   );
+   }
+
+   public function getDescription() {
+   return array(
+   'Returns the list of repositories supported by 
ExtensionDistributor'
+   );
+   }
+
+   public function getExamples() {
+   return 'api.php?action=querylist=extdistrepos';
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfb28115f95a3ed80e0e656c0cc68193078c63fd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Send Extension:Collection logs to logstash. - change (operations/mediawiki-config)

2014-10-22 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Send Extension:Collection logs to logstash.
..

Send Extension:Collection logs to logstash.

Bug: 71675
Change-Id: I4b6fb0b2ff20f0fcb9efd4c7c246778cab9e7d44
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6a32c3f..e109e6f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4184,6 +4184,7 @@
'Wikibase\UpdateRepoOnMoveJob' = 
udp://$wmfUdp2logDest/updateRepoOnMove,
'BounceHandler' = udp://$wmfUdp2logDest/bouncehandler,
'Echo' = udp://$wmfUdp2logDest/echo,
+   'collection' = udp://$wmfUdp2logDest/collection, // -cscott 
for bug 71675
),
 
'+enwiki' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b6fb0b2ff20f0fcb9efd4c7c246778cab9e7d44
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Send Extension:Collection logs to logstash. - change (operations/mediawiki-config)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Send Extension:Collection logs to logstash.
..


Send Extension:Collection logs to logstash.

Bug: 71675
Change-Id: I4b6fb0b2ff20f0fcb9efd4c7c246778cab9e7d44
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6a32c3f..e109e6f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4184,6 +4184,7 @@
'Wikibase\UpdateRepoOnMoveJob' = 
udp://$wmfUdp2logDest/updateRepoOnMove,
'BounceHandler' = udp://$wmfUdp2logDest/bouncehandler,
'Echo' = udp://$wmfUdp2logDest/echo,
+   'collection' = udp://$wmfUdp2logDest/collection, // -cscott 
for bug 71675
),
 
'+enwiki' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b6fb0b2ff20f0fcb9efd4c7c246778cab9e7d44
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add nickel to $MONITORING_HOSTS network, rename ferm::rule i... - change (operations/puppet)

2014-10-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Add nickel to $MONITORING_HOSTS network, rename ferm::rule 
icinga-all to monitoring-all
..


Add nickel to $MONITORING_HOSTS network, rename ferm::rule icinga-all to 
monitoring-all

Change-Id: I75225d476ba1478a6f02bc41a6dc487b4c47eb3c
---
M manifests/network.pp
M modules/base/manifests/init.pp
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/manifests/network.pp b/manifests/network.pp
index e8628ca..39e9dc9 100644
--- a/manifests/network.pp
+++ b/manifests/network.pp
@@ -64,6 +64,7 @@
 '208.80.153.249',
 '10.4.1.120',
 '10.4.1.137',
+'208.80.154.150' # nickel.wikimedia.org (ganglia)
 ],
 }
 }
diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp
index 467147f..ab83082 100644
--- a/modules/base/manifests/init.pp
+++ b/modules/base/manifests/init.pp
@@ -166,7 +166,7 @@
 rule   = 'proto tcp dport ssh saddr $BASTION_HOSTS ACCEPT;',
 }
 
-ferm::rule { 'icinga-all':
+ferm::rule { 'monitoring-all':
 ensure = $ensure,
 rule   = 'saddr $MONITORING_HOSTS ACCEPT;',
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75225d476ba1478a6f02bc41a6dc487b4c47eb3c
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Temporarily adding ameriium to production to test pxe boot - change (operations/puppet)

2014-10-22 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

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

Change subject: Temporarily adding ameriium to production to test pxe boot
..

Temporarily adding ameriium to production to test pxe boot

Change-Id: Ia5a6f6ae91372f32ab689bb056aa30b4bf4f68d9
---
M modules/install-server/files/autoinstall/netboot.cfg
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/168092/1

diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index a5614cd..6c4e799 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -48,7 +48,7 @@
analytics101[1-9]|analytics102[0-2]) echo partman/raid1-30G.cfg 
;; \
analytics102[3-7]) echo partman/analytics-dell.cfg ;; \
analytics102[8-9]|analytics103[0-9]|analytics104[0-1]) echo 
partman/analytics-flex.cfg ;; \
-   
db[0-8][0-9]|db10[0-7][0-9]|db20[0-2][0-9]|db2030|db203[3-9]|db204[0-2]|dbstore100[1-9]|es[1-2]0[0-2][0-9])
 echo partman/db.cfg ;; \
+   
americium|db[0-8][0-9]|db10[0-7][0-9]|db20[0-2][0-9]|db2030|db203[3-9]|db204[0-2]|dbstore100[1-9]|es[1-2]0[0-2][0-9])
 echo partman/db.cfg ;; \
netmon1001|stat1002|tungsten) echo partman/db.cfg ;; \
bast*) echo partman/lvm.cfg ;; \
boron|chromium|hydrogen) echo partman/lvm.cfg ;; \
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
index 951d946..0242aa7 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -193,6 +193,11 @@
fixed-address amssq62.esams.wikimedia.org;
 }
 
+host americium {
+hardware ethernet c4:34:6b:b5:2d:d0;
+fixed-address americium.eqiad.wmnet;
+}
+
 host analytics1011 {
hardware ethernet 90:b1:1c:06:bf:01;
fixed-address analytics1011.eqiad.wmnet;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5a6f6ae91372f32ab689bb056aa30b4bf4f68d9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] API: Fix ApiFormatFeedWrapper - change (mediawiki/core)

2014-10-22 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: API: Fix ApiFormatFeedWrapper
..

API: Fix ApiFormatFeedWrapper

With recent changes to the API, directly outputting text from execute()
in ApiFormatBase subclasses doesn't work anymore. Adjust
ApiFormatFeedWrapper for this new situation, and also handle headers in
initPrinter() where that belongs.

Bug: 72359
Change-Id: I4e4a2386858da6d87169deabaca763eeeacefbe9
---
M includes/api/ApiFormatFeedWrapper.php
1 file changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/168093/1

diff --git a/includes/api/ApiFormatFeedWrapper.php 
b/includes/api/ApiFormatFeedWrapper.php
index 9260006..fffb14f 100644
--- a/includes/api/ApiFormatFeedWrapper.php
+++ b/includes/api/ApiFormatFeedWrapper.php
@@ -82,17 +82,41 @@
 * $result['_feed'] - an instance of one of the $wgFeedClasses classes
 * $result['_feeditems'] - an array of FeedItem instances
 */
+   public function initPrinter( $unused = false ) {
+   parent::initPrinter( $unused );
+
+   if ( $this-mDisabled ) {
+   return;
+   }
+
+   $data = $this-getResultData();
+   if ( isset( $data['_feed'] )  isset( $data['_feeditems'] ) ) {
+   $data['_feed']-httpHeaders();
+   } else {
+   // Error has occurred, print something useful
+   ApiBase::dieDebug( __METHOD__, 'Invalid feed 
class/item' );
+   }
+   }
+
+   /**
+* This class expects the result data to be in a custom format set by 
self::setResult()
+* $result['_feed'] - an instance of one of the $wgFeedClasses classes
+* $result['_feeditems'] - an array of FeedItem instances
+*/
public function execute() {
$data = $this-getResultData();
if ( isset( $data['_feed'] )  isset( $data['_feeditems'] ) ) {
$feed = $data['_feed'];
$items = $data['_feeditems'];
 
+   // execute() needs to pass strings to $this-printText, 
not produce output itself.
+   ob_start();
$feed-outHeader();
foreach ( $items as  $item ) {
$feed-outItem( $item );
}
$feed-outFooter();
+   $this-printText( ob_get_clean() );
} else {
// Error has occurred, print something useful
ApiBase::dieDebug( __METHOD__, 'Invalid feed 
class/item' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e4a2386858da6d87169deabaca763eeeacefbe9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Logging: Split location message into wiki, title, oldid for ... - change (mediawiki...parsoid)

2014-10-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: Logging: Split location message into wiki, title, oldid for 
logstash
..

Logging: Split location message into wiki, title, oldid for logstash

Change-Id: I5af0fd4b06b6fccf89324176a82e71ae4c4074fc
---
M lib/Logger.bunyan.js
M lib/ParsoidLogger.js
M lib/linter.js
3 files changed, 15 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/94/168094/1

diff --git a/lib/Logger.bunyan.js b/lib/Logger.bunyan.js
index 75ffdad..7da6bf1 100644
--- a/lib/Logger.bunyan.js
+++ b/lib/Logger.bunyan.js
@@ -64,10 +64,13 @@
 };
 
 BunyanLogger.prototype._createBunyanLog = function (logData) {
-   var flat = logData.flatLogObject();
+   var location = logData.locationData();
var log = {
-   location: logData.locationMsg()
+   wiki: location.wiki,
+   title: location.title,
+   oldid: location.oldid
};
+   var flat = logData.flatLogObject();
Object.keys(flat).forEach(function(k) {
// Be sure we don't have a `type` field here since logstash
// treats that as magical.  We created a special `location`
diff --git a/lib/ParsoidLogger.js b/lib/ParsoidLogger.js
index 4d11b9c..dda76f4 100644
--- a/lib/ParsoidLogger.js
+++ b/lib/ParsoidLogger.js
@@ -12,7 +12,7 @@
// Set up a location message function in Logdata
// so all logging backends can output location message
var logger = this;
-   LogData.prototype.locationMsg = function() { return 
logger.locationMsg(this); };
+   LogData.prototype.locationData = function() { return 
logger.locationData(this); };
 }
 
 coreutil.inherits(ParsoidLogger, Logger);
@@ -77,20 +77,23 @@
}
 };
 
-ParsoidLogger.prototype.locationMsg = function(logData) {
-   var location = '[' + this.env.conf.wiki.iwp + '/' + this.env.page.name;
+ParsoidLogger.prototype.locationData = function(logData) {
+   var data = { wiki: this.env.conf.wiki.iwp, title: this.env.page.name };
+   data.msg = '[' + this.env.conf.wiki.iwp + '/' + this.env.page.name;
var meta = this.env.page.meta;
if (meta  meta.revision  meta.revision.revid) {
-   location += '?oldid=' + meta.revision.revid;
+   data.oldId = meta.revision.revid;
+   data.msg += '?oldid=' + meta.revision.revid;
}
-   return location + ']';
+   data.msg = data.msg + ']';
+   return data;
 };
 
 ParsoidLogger.prototype._defaultBackend = function(logData, cb) {
// The default logging backend provided by Logger.js is not useful to 
us.
// Parsoid needs to be able to emit page location to logs.
try {
-   console.warn('[' + logData.logType + ']' + 
logData.locationMsg() + ' ' + logData.fullMsg());
+   console.warn('[' + logData.logType + ']' + 
logData.locationData().msg + ' ' + logData.fullMsg());
} catch(e){
console.error(Error in ParsoidLogger._defaultBackend:  + e);
} finally{
diff --git a/lib/linter.js b/lib/linter.js
index 9307660..8071fdb 100644
--- a/lib/linter.js
+++ b/lib/linter.js
@@ -57,7 +57,7 @@
wiki = this._env.conf.wiki.iwp;
 
msg.type = logType.match(re)[1];
-   msg.location = logData.locationMsg();
+   msg.location = logData.locationData().msg;
msg.wiki = wiki;
msg.page = this._env.page.name;
msg.revision = this._env.page.meta.revision.revid;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5af0fd4b06b6fccf89324176a82e71ae4c4074fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Temporarily adding ameriium to production to test pxe boot - change (operations/puppet)

2014-10-22 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: Temporarily adding ameriium to production to test pxe boot
..


Temporarily adding ameriium to production to test pxe boot

Change-Id: Ia5a6f6ae91372f32ab689bb056aa30b4bf4f68d9
---
M modules/install-server/files/autoinstall/netboot.cfg
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index a5614cd..6c4e799 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -48,7 +48,7 @@
analytics101[1-9]|analytics102[0-2]) echo partman/raid1-30G.cfg 
;; \
analytics102[3-7]) echo partman/analytics-dell.cfg ;; \
analytics102[8-9]|analytics103[0-9]|analytics104[0-1]) echo 
partman/analytics-flex.cfg ;; \
-   
db[0-8][0-9]|db10[0-7][0-9]|db20[0-2][0-9]|db2030|db203[3-9]|db204[0-2]|dbstore100[1-9]|es[1-2]0[0-2][0-9])
 echo partman/db.cfg ;; \
+   
americium|db[0-8][0-9]|db10[0-7][0-9]|db20[0-2][0-9]|db2030|db203[3-9]|db204[0-2]|dbstore100[1-9]|es[1-2]0[0-2][0-9])
 echo partman/db.cfg ;; \
netmon1001|stat1002|tungsten) echo partman/db.cfg ;; \
bast*) echo partman/lvm.cfg ;; \
boron|chromium|hydrogen) echo partman/lvm.cfg ;; \
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
index 951d946..0242aa7 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -193,6 +193,11 @@
fixed-address amssq62.esams.wikimedia.org;
 }
 
+host americium {
+hardware ethernet c4:34:6b:b5:2d:d0;
+fixed-address americium.eqiad.wmnet;
+}
+
 host analytics1011 {
hardware ethernet 90:b1:1c:06:bf:01;
fixed-address analytics1011.eqiad.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5a6f6ae91372f32ab689bb056aa30b4bf4f68d9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prefix search always squashes accents - change (mediawiki...CirrusSearch)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prefix search always squashes accents
..


Prefix search always squashes accents

Enable accent squashing for all prefix searches.  The argument is that
even if you speak a language that prefers accents not be squashed you
might be on a keyboard without accents.  We're not taking this argument
further and adding accent squashing to all searches at this point (or
maybe ever).

Bug: 67521
Change-Id: I1e9dc357b861edf1ff3c959e3ac3b287292c2bea
---
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Search/ResultsType.php
M includes/Searcher.php
M tests/browser/features/prefix_search.feature
M tests/browser/features/relevancy.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/step_definitions/simple_search_steps.rb
M tests/browser/features/support/hooks.rb
M tests/browser/features/support/pages/search_page.rb
10 files changed, 122 insertions(+), 38 deletions(-)

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



diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 6474627..cdc5ed4 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -30,7 +30,7 @@
 * and change the minor version when it changes but isn't
 * incompatible
 */
-   const VERSION = '0.9';
+   const VERSION = '0.10';
 
/**
 * Language code we're building analysis for
@@ -112,10 +112,22 @@
'filter' = array( 'lowercase' ),
'char_filter' = array( 
'near_space_flattener' ),
),
+   'near_match_asciifolding' = array(
+   'type' = 'custom',
+   'tokenizer' = 'no_splitting',
+   'filter' = array( 'lowercase', 
'asciifolding' ),
+   'char_filter' = array( 
'near_space_flattener' ),
+   ),
'prefix' = array(
'type' = 'custom',
'tokenizer' = 'prefix',
'filter' = array( 'lowercase' ),
+   'char_filter' = array( 
'near_space_flattener' ),
+   ),
+   'prefix_asciifolding' = array(
+   'type' = 'custom',
+   'tokenizer' = 'prefix',
+   'filter' = array( 'lowercase', 
'asciifolding' ),
'char_filter' = array( 
'near_space_flattener' ),
),
'word_prefix' = array(
@@ -157,6 +169,10 @@
'max_gram' = 
Searcher::MAX_TITLE_SEARCH,
),
'asciifolding' = array(
+   'type' = 'asciifolding',
+   'preserve_original' = false
+   ),
+   'asciifolding_preserve' = array(
'type' = 'asciifolding',
'preserve_original' = true
),
@@ -245,15 +261,13 @@
$filters[] = 'stop';
$filters[] = 'kstem';
$filters[] = 'custom_stem';
-   $filters[] = 'asciifolding';
+   $filters[] = 'asciifolding_preserve';
$config[ 'analyzer' ][ 'text' ][ 'filter' ] = $filters;
 
-   // Add asciifolding to the the plain analyzer as well 
(but not plain_search)
-   $config[ 'analyzer' ][ 'plain' ][ 'filter' ][] = 
'asciifolding';
-   // Add asciifolding to the prefix queries and 
incategory filters
-   $config[ 'analyzer' ][ 'prefix' ][ 'filter' ][] = 
'asciifolding';
-   $config[ 'analyzer' ][ 'lowercase_keyword' ][ 'filter' 
][] = 'asciifolding';
-   $config[ 'analyzer' ][ 'near_match' ][ 'filter' ][] = 
'asciifolding';
+   // Add asciifolding_preserve to the the plain analyzer 
as well (but not plain_search)
+   $config[ 'analyzer' ][ 'plain' ][ 'filter' ][] = 
'asciifolding_preserve';
+   // Add asciifolding_preserve filters
+   $config[ 'analyzer' ][ 'lowercase_keyword' 

[MediaWiki-commits] [Gerrit] Allow local server-status requests on http - change (operations...wikimetrics)

2014-10-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Allow local server-status requests on http
..


Allow local server-status requests on http

There is no point in forcing them to https, which turns them to
expernal requests, which we consequently have to deny.
By keeping those requests on http, those requests stay local requests,
and we can properly serve monitoring scripts.

Bug: 71606
Change-Id: If232474c5eeb49a0b27abe7c82ce9cf71d7cd23f
---
M templates/wikimetrics.vhost.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/templates/wikimetrics.vhost.erb b/templates/wikimetrics.vhost.erb
index 9c322b2..82fb317 100644
--- a/templates/wikimetrics.vhost.erb
+++ b/templates/wikimetrics.vhost.erb
@@ -22,6 +22,7 @@
   # Redirect any non HTTPS request to HTTPS
   # This HTTP Header is set by Yuvi's proxy-dammit instance
   RewriteCond %{HTTP:X-Forwarded-Proto} !https
+  RewriteCond %{REMOTE_ADDR}%{REQUEST_URI} !127\.0\.0\.1/server-status
   RewriteRule ^(.*)$ https://%= @server_name %$1 [L,R]
 % end -%
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If232474c5eeb49a0b27abe7c82ce9cf71d7cd23f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Milimetric dandree...@wikimedia.org
Gerrit-Reviewer: Nuria nu...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: QChris christ...@quelltextlich.at
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Declare namenode directory only once - change (operations/puppet)

2014-10-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Declare namenode directory only once
..


Declare namenode directory only once

The namenode's base directory was declared in both

  /etc/puppet/manifests/role/analytics/hadoop.pp:280
  /etc/puppet/modules/cdh/manifests/hadoop/namenode.pp:36

which made puppet fail with “Duplicate declaration”. We drop the
role's definition of it, as the directory is only needed on namenodes
anyways.

Change-Id: I8a5a6de00731af2dadb8ab2b3d36ad43faf2f49c
---
M manifests/role/analytics/hadoop.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/analytics/hadoop.pp 
b/manifests/role/analytics/hadoop.pp
index 896689d..87a40c9 100644
--- a/manifests/role/analytics/hadoop.pp
+++ b/manifests/role/analytics/hadoop.pp
@@ -271,7 +271,6 @@
 # below, I just create them here.
 file { [
 $hadoop_var_directory,
-$hadoop_name_directory,
 $hadoop_journal_directory,
 $hadoop_data_directory,
 $datanode_mounts,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a5a6de00731af2dadb8ab2b3d36ad43faf2f49c
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Declare datanode's mount directories only once - change (operations/puppet)

2014-10-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Declare datanode's mount directories only once
..


Declare datanode's mount directories only once

The datanode_mounts was declared in both

  /etc/puppet/manifests/role/analytics/hadoop.pp:279
  /etc/puppet/modules/cdh/manifests/hadoop/worker/paths.pp:49

which made puppet fail with “Duplicate declaration”. We drop the
role's definition of it, as the directory is only needed on workers
anyways.

Change-Id: I33cd98361c6fba5e2874031a090867a1ec3b16c4
---
M manifests/role/analytics/hadoop.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/analytics/hadoop.pp 
b/manifests/role/analytics/hadoop.pp
index 87a40c9..a771956 100644
--- a/manifests/role/analytics/hadoop.pp
+++ b/manifests/role/analytics/hadoop.pp
@@ -273,7 +273,6 @@
 $hadoop_var_directory,
 $hadoop_journal_directory,
 $hadoop_data_directory,
-$datanode_mounts,
 ]:
 ensure = 'directory',
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33cd98361c6fba5e2874031a090867a1ec3b16c4
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Gage jger...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Support colorized zero-rating croutons - change (apps...wikipedia)

2014-10-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Support colorized zero-rating croutons
..


Support colorized zero-rating croutons

Prior to this patch, zero-rating croutons always had a green
background with black text. Now, the zero-rating croutons will
have background and foreground colors established through
configuration by the partners team and, eventually, by self
service operators.

Change-Id: I3e2361210673bca757dd8de29d446bdca4529a1c
---
M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
M wikipedia/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
M wikipedia/src/main/java/org/wikipedia/zero/WikipediaZeroTask.java
A wikipedia/src/main/java/org/wikipedia/zero/ZeroMessage.java
5 files changed, 115 insertions(+), 22 deletions(-)

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



diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java 
b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
index 97857c9..873bde1 100644
--- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
@@ -106,7 +106,7 @@
 
 // Show Wikipedia Zero if ON, otherwise hide it
 if (app.getWikipediaZeroHandler().isZeroEnabled()) {
-
wikipediaZeroText.setText(app.getWikipediaZeroHandler().getCarrierMessage());
+
wikipediaZeroText.setText(app.getWikipediaZeroHandler().getCarrierMessage().getMsg());
 wikipediaZeroText.setVisibility(View.VISIBLE);
 } else {
 wikipediaZeroText.setVisibility(View.GONE);
diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
index 5f38dbc..7bbaae5 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
@@ -28,6 +28,8 @@
 import org.wikipedia.settings.PrefKeys;
 import org.wikipedia.staticdata.MainPageNameData;
 import org.wikipedia.theme.ThemeChooserDialog;
+import org.wikipedia.zero.ZeroMessage;
+
 import com.squareup.otto.Bus;
 import com.squareup.otto.Subscribe;
 import de.keyboardsurfer.android.widget.crouton.Crouton;
@@ -104,7 +106,7 @@
 }
 
 private boolean pausedStateOfZero;
-private String pausedXcsOfZero;
+private ZeroMessage pausedMessageOfZero;
 
 private AlertDialog.Builder alert;
 
@@ -133,11 +135,11 @@
 
 if (savedInstanceState != null) {
 pausedStateOfZero = 
savedInstanceState.getBoolean(pausedStateOfZero);
-pausedXcsOfZero = savedInstanceState.getString(pausedXcsOfZero);
+pausedMessageOfZero = 
savedInstanceState.getParcelable(pausedMessageOfZero);
 } else if (themeChanged) {
 // we've changed themes!
 pausedStateOfZero = 
getIntent().getExtras().getBoolean(pausedStateOfZero);
-pausedXcsOfZero = 
getIntent().getExtras().getString(pausedXcsOfZero);
+pausedMessageOfZero = 
getIntent().getExtras().getParcelable(pausedMessageOfZero);
 if (getIntent().getExtras().containsKey(themeChooserShowing)) {
 if (getIntent().getExtras().getBoolean(themeChooserShowing)) 
{
 bus.post(new ShowThemeChooserEvent());
@@ -549,35 +551,39 @@
 @Subscribe
 public void onWikipediaZeroStateChangeEvent(WikipediaZeroStateChangeEvent 
event) {
 boolean latestWikipediaZeroDisposition = 
app.getWikipediaZeroHandler().isZeroEnabled();
-String latestCarrierMessage = 
app.getWikipediaZeroHandler().getCarrierMessage();
+ZeroMessage latestCarrierMessage = 
app.getWikipediaZeroHandler().getCarrierMessage();
 
 if (pausedStateOfZero  !latestWikipediaZeroDisposition) {
 String title = getString(R.string.zero_charged_verbiage);
 String verbiage = 
getString(R.string.zero_charged_verbiage_extended);
-makeWikipediaZeroCrouton(R.color.holo_red_dark, 
android.R.color.white, title);
+
makeWikipediaZeroCrouton(getResources().getColor(R.color.holo_red_dark),
+getResources().getColor(android.R.color.white),
+title);
 fragmentNavdrawer.setupDynamicItems();
 showDialogAboutZero(null, title, verbiage);
-} else if ((!pausedStateOfZero || 
!pausedXcsOfZero.equals(latestCarrierMessage))  
latestWikipediaZeroDisposition) {
-String title = latestCarrierMessage;
+} else if ((!pausedStateOfZero || 
!pausedMessageOfZero.equals(latestCarrierMessage))  
latestWikipediaZeroDisposition) {
+String title = latestCarrierMessage.getMsg();
+int fg = latestCarrierMessage.getFg();
+int bg = latestCarrierMessage.getBg();
 String verbiage 

  1   2   3   4   >