[MediaWiki-commits] [Gerrit] Add interwikidata translation files - change (pywikibot/i18n)

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

Change subject: Add interwikidata translation files
..


Add interwikidata translation files

Change-Id: I06eef067275cc1c9f413104f1f0029ed37db8941
---
M Gruntfile.js
A interwikidata/en.json
A interwikidata/fa.json
A interwikidata/qqq.json
4 files changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index aceef5b..1849c7b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -30,6 +30,7 @@
fixing_redirects: 'fixing_redirects/',
followlive: 'followlive/',
interwiki: 'interwiki/',
+   interwikidata: 'interwikidata/',
isbn: 'isbn/',
lonelypages: 'lonelypages/',
makecat: 'makecat/',
diff --git a/interwikidata/en.json b/interwikidata/en.json
new file mode 100644
index 000..ec33efb
--- /dev/null
+++ b/interwikidata/en.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "Ladsgroup"
+   ]
+   },
+   "interwikidata-clean-summary": "Bot: Cleaning up old interwiki links"
+}
diff --git a/interwikidata/fa.json b/interwikidata/fa.json
new file mode 100644
index 000..30e04d8
--- /dev/null
+++ b/interwikidata/fa.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "Ladsgroup"
+   ]
+   },
+   "interwikidata-clean-summary": "ربات: حذف پیوندهای میان‌ویکی که در 
ویکی‌داده موجود است"
+}
diff --git a/interwikidata/qqq.json b/interwikidata/qqq.json
new file mode 100644
index 000..27029e6
--- /dev/null
+++ b/interwikidata/qqq.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "Ladsgroup"
+   ]
+   },
+   "interwikidata-clean-summary": "Edit summary when bot cleans pages from 
old interwiki links."
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06eef067275cc1c9f413104f1f0029ed37db8941
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Really actually fix the typo in Parser.php - change (mediawiki/core)

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

Change subject: Really actually fix the typo in Parser.php
..


Really actually fix the typo in Parser.php

Change-Id: I9d9c6f13095087ac2c2c6693c6bd1613219bf658
---
M includes/parser/Parser.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ricordisamoa: Looks good to me, but someone else must approve
  Aaron Schulz: Looks good to me, approved
  Brian Wolff: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 977aebe..664f0a4 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -511,7 +511,7 @@
}
$limitReport .= 'Cached time: ' . 
$this->mOutput->getCacheTime() . "\n";
$limitReport .= 'Cache expiry: ' . 
$this->mOutput->getCacheExpiry() . "\n";
-   $limitReport .= 'Dynanmic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
+   $limitReport .= 'Dynamic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
foreach ( $this->mOutput->getLimitReportData() as $key 
=> $value ) {
if ( Hooks::run( 'ParserLimitReportFormat',
array( $key, &$value, &$limitReport, 
false, false )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d9c6f13095087ac2c2c6693c6bd1613219bf658
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Really actually fix the typo in Parser.php - change (mediawiki/core)

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

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

Change subject: Really actually fix the typo in Parser.php
..

Really actually fix the typo in Parser.php

Change-Id: I9d9c6f13095087ac2c2c6693c6bd1613219bf658
---
M includes/parser/Parser.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/234716/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 977aebe..664f0a4 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -511,7 +511,7 @@
}
$limitReport .= 'Cached time: ' . 
$this->mOutput->getCacheTime() . "\n";
$limitReport .= 'Cache expiry: ' . 
$this->mOutput->getCacheExpiry() . "\n";
-   $limitReport .= 'Dynanmic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
+   $limitReport .= 'Dynamic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
foreach ( $this->mOutput->getLimitReportData() as $key 
=> $value ) {
if ( Hooks::run( 'ParserLimitReportFormat',
array( $key, &$value, &$limitReport, 
false, false )

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

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

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


[MediaWiki-commits] [Gerrit] elasticsearch: allow port forwarding - change (mediawiki/vagrant)

2015-08-28 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: elasticsearch: allow port forwarding
..

elasticsearch: allow port forwarding

Binding to 127.0.0.1 disables Vagrant from allowing access to
Elasticsearch because forwarded ports hit the "public" address of the
VM. Now that dynamic scripting is disabled by default we can disable the
protection added in Ifb4253d and again allow easy developer access to
the Elasticsearch service.

Change-Id: If5385eeb4cf56eb4a25f478875e1ccd3230cc9b5
---
M puppet/modules/elasticsearch/files/elasticsearch.yml
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/15/234715/1

diff --git a/puppet/modules/elasticsearch/files/elasticsearch.yml 
b/puppet/modules/elasticsearch/files/elasticsearch.yml
index 23665bb..ffc92c4 100644
--- a/puppet/modules/elasticsearch/files/elasticsearch.yml
+++ b/puppet/modules/elasticsearch/files/elasticsearch.yml
@@ -1,2 +1 @@
-## Turn off global accessibility.
-network.host: "127.0.0.1"
+# This file managed by puppet

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5385eeb4cf56eb4a25f478875e1ccd3230cc9b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] T110692: Massage batching API imageinfo width/height to numbers - change (mediawiki...parsoid)

2015-08-28 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: T110692: Massage batching API imageinfo width/height to numbers
..

T110692: Massage batching API imageinfo width/height to numbers

Change-Id: I6a0b9d2a0c5bd52ac74b64370dad8f85c4fcd76b
---
M lib/ext.core.LinkHandler.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js
index 61e1e84..cbbded5 100644
--- a/lib/ext.core.LinkHandler.js
+++ b/lib/ext.core.LinkHandler.js
@@ -1011,6 +1011,11 @@
}
}
 
+   // T110692: The batching API seems to return these as strings.
+   // Till that is fixed, let us make sure these are numbers.
+   info.height = Number(info.height);
+   info.width = Number(info.width);
+
var imageSrc = dataAttribs.src;
if (!dataAttribs.uneditable) {
dataAttribs.src = undefined;
@@ -1068,6 +1073,7 @@
size.width = Math.round(info.width * ratio);
}
}
+
if (size.height) {
img.addNormalizedAttribute('height', size.height.toString());
}
@@ -1075,7 +1081,6 @@
if (size.width) {
img.addNormalizedAttribute('width', size.width.toString());
}
-
// If the format is something we *recognize*, add the subtype
switch (format) {
case 'thumbnail':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a0b9d2a0c5bd52ac74b64370dad8f85c4fcd76b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] Remove redundant field from LinkPreviewFunnel - change (apps...wikipedia)

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

Change subject: Remove redundant field from LinkPreviewFunnel
..


Remove redundant field from LinkPreviewFunnel

A page title was being passed to the constructor for LinkPreviewFunnel,
which was then never actually used for anything. I assume this was used
for something in the past. Either way, it's not being used at all now.
This patch removes the field and alters all the calls to the constructor
so that it's not passed any more, to optimise performance and improve
code tidiness.

Change-Id: Ie99666ec6a9f4f0f34a1dc56f7a2e9387b72df4f
---
M app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
3 files changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
index e3c2b82..ee650d9 100644
--- a/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
@@ -3,7 +3,6 @@
 import android.support.annotation.NonNull;
 
 import org.json.JSONObject;
-import org.wikipedia.page.PageTitle;
 import org.wikipedia.WikipediaApp;
 
 public class LinkPreviewFunnel extends TimedFunnel {
@@ -12,11 +11,8 @@
 private static final int PROD_LINK_PREVIEW_VERSION = 3;
 private final int version;
 
-private final PageTitle title;
-
-public LinkPreviewFunnel(WikipediaApp app, PageTitle title) {
+public LinkPreviewFunnel(WikipediaApp app) {
 super(app, SCHEMA_NAME, REV_ID, app.isProdRelease() ? 
Funnel.SAMPLE_LOG_100 : Funnel.SAMPLE_LOG_ALL);
-this.title = title;
 version = app.isProdRelease() ? PROD_LINK_PREVIEW_VERSION : 
app.getLinkPreviewVersion();
 }
 
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index ff1779f..dcdaf62 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -403,7 +403,7 @@
 if (!app.isProdRelease() && app.getLinkPreviewVersion() == 0) {
 HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
 getPageActivity().displayNewPage(title, historyEntry);
-new LinkPreviewFunnel(app, title).logNavigate();
+new LinkPreviewFunnel(app).logNavigate();
 } else {
 getPageActivity().showLinkPreview(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
 }
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
index 9fab470..ae4c7f9 100755
--- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
+++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
@@ -136,7 +136,7 @@
 // and kick off the task to load all the things...
 new LinkPreviewFetchTask(app.getAPIForSite(pageTitle.getSite()), 
pageTitle).execute();
 
-funnel = new LinkPreviewFunnel(app, pageTitle);
+funnel = new LinkPreviewFunnel(app);
 funnel.logLinkClick();
 
 return rootView;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie99666ec6a9f4f0f34a1dc56f7a2e9387b72df4f
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Convert some fields to local variables. - change (apps...wikipedia)

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

Change subject: Convert some fields to local variables.
..


Convert some fields to local variables.

This patch converts some fields that are only used in a single method to
local variables, to optimise performance and maintain code tidiness.

Change-Id: Ia38f84ecdc87c66a3924b06b43d19e31f7131691
---
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
3 files changed, 3 insertions(+), 6 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
index a4e71aa..2cc2af6 100644
--- 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
+++ 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
@@ -61,7 +61,6 @@
 private View bottomContentContainer;
 private TextView pageLastUpdatedText;
 private TextView pageLicenseText;
-private TextView pageExternalLink;
 private View readMoreContainer;
 private ListView readMoreList;
 
@@ -88,7 +87,7 @@
 readMoreContainer = 
bottomContentContainer.findViewById(R.id.read_more_container);
 readMoreList = 
(ListView)bottomContentContainer.findViewById(R.id.read_more_list);
 
-pageExternalLink = (TextView) 
bottomContentContainer.findViewById(R.id.page_external_link);
+TextView pageExternalLink = (TextView) 
bottomContentContainer.findViewById(R.id.page_external_link);
 pageExternalLink.setPaintFlags(pageExternalLink.getPaintFlags() | 
Paint.UNDERLINE_TEXT_FLAG);
 pageExternalLink.setOnClickListener(new View.OnClickListener() {
 @Override
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
index babd012..8d5bbc8 100644
--- 
a/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
+++ 
b/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
@@ -50,7 +50,6 @@
  */
 public abstract class SwipeableBottomDialog extends DialogFragment {
 private final List dialogViews = new ArrayList<>();
-private ViewGroup rootView;
 private ListView dialogListView;
 private int dialogPeekHeight;
 
@@ -76,7 +75,7 @@
 int displayWidth = getDialogWidth();
 int displayHeight = 
inflater.getContext().getResources().getDisplayMetrics().heightPixels;
 
-rootView = (ViewGroup) inflater.inflate(R.layout.dialog_bottom_swipe, 
container);
+ViewGroup rootView = (ViewGroup) 
inflater.inflate(R.layout.dialog_bottom_swipe, container);
 
 dialogViews.add(makeSpaceView(displayWidth, 1));
 dialogViews.add(makeSpaceView(displayWidth, dialogPeekHeight));
diff --git a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
index e19cf49..4d4d897 100644
--- a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
+++ b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
@@ -44,7 +44,6 @@
 private EditText searchEditText;
 private SearchFunnel funnel;
 private TextView langButton;
-private FrameLayout langButtonContainer;
 
 public SearchFunnel getFunnel() {
 return funnel;
@@ -287,7 +286,7 @@
 LinearLayout enabledSearchBar = (LinearLayout) 
getActivity().findViewById(R.id.search_bar_enabled);
 TextView searchButton = (TextView) 
getActivity().findViewById(R.id.main_search_bar_text);
 langButton = (TextView) 
getActivity().findViewById(R.id.search_lang_button);
-langButtonContainer = (FrameLayout) 
getActivity().findViewById(R.id.search_lang_button_container);
+FrameLayout langButtonContainer = (FrameLayout) 
getActivity().findViewById(R.id.search_lang_button_container);
 
 if (enabled) {
 // set up the language picker

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia38f84ecdc87c66a3924b06b43d19e31f7131691
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: rename util.js to service-util.js - change (mediawiki...mobileapps)

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

Change subject: Hygiene: rename util.js to service-util.js
..


Hygiene: rename util.js to service-util.js

lib/util.js is meant to be for utilities powering the service, not
utilities for the service itself. Rename this file to avoid confusion
when adding other utilities.

Change-Id: I9b6bcb806d50d43ff8b8a270b7f2c5c9ea935189
---
M app.js
M doc/template.md
M lib/mwapi.js
R lib/service-util.js
M routes/info.js
M routes/mobile-html-sections.js
M routes/mobile-html.js
M routes/mobile-text.js
M routes/root.js
9 files changed, 9 insertions(+), 8 deletions(-)

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



diff --git a/app.js b/app.js
index 434e77b..d36a7aa 100644
--- a/app.js
+++ b/app.js
@@ -7,7 +7,7 @@
 var compression = require('compression');
 var bodyParser = require('body-parser');
 var fs = BBPromise.promisifyAll(require('fs'));
-var sUtil = require('./lib/util');
+var sUtil = require('./lib/service-util');
 var packageInfo = require('./package.json');
 var yaml = require('js-yaml');
 
diff --git a/doc/template.md b/doc/template.md
index f9d28ad..d2a3ae5 100644
--- a/doc/template.md
+++ b/doc/template.md
@@ -57,7 +57,8 @@
 - [`app.js`](../app.js) - contains the application declaration and loading 
logic
 - [`routes`](../routes/) - contains the definitions of the loaded routes; this
   is where most of your coding is to take place
-- [`lib/util.js`](../lib/util.js) - contains some utility functions and classes
+- [`lib/service-util.js`](../lib/service-util.js) - contains some service
+  utility functions and classes
 - [`static`](../static/) - this is where served static files go (HTML, CSS,
   client-side JS, etc.)
 - [`test`](../test/) - contains the test files for the example routes in the
diff --git a/lib/mwapi.js b/lib/mwapi.js
index c7c6a73..c9c5495 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -5,7 +5,7 @@
 'use strict';
 
 var preq = require('preq');
-var sUtil = require('../lib/util');
+var sUtil = require('../lib/service-util');
 
 // shortcut
 var HTTPError = sUtil.HTTPError;
diff --git a/lib/util.js b/lib/service-util.js
similarity index 100%
rename from lib/util.js
rename to lib/service-util.js
diff --git a/routes/info.js b/routes/info.js
index 5dd2590..ce20744 100644
--- a/routes/info.js
+++ b/routes/info.js
@@ -1,7 +1,7 @@
 'use strict';
 
 
-var sUtil = require('../lib/util');
+var sUtil = require('../lib/service-util');
 
 
 /**
diff --git a/routes/mobile-html-sections.js b/routes/mobile-html-sections.js
index 8cab463..f17a733 100644
--- a/routes/mobile-html-sections.js
+++ b/routes/mobile-html-sections.js
@@ -13,7 +13,7 @@
 
 var BBPromise = require('bluebird');
 var preq = require('preq');
-var sUtil = require('../lib/util');
+var sUtil = require('../lib/service-util');
 var transforms = require('../lib/transforms');
 var mwapi = require('../lib/mwapi');
 var gallery = require('../lib/gallery');
diff --git a/routes/mobile-html.js b/routes/mobile-html.js
index 038cf39..6b2b726 100644
--- a/routes/mobile-html.js
+++ b/routes/mobile-html.js
@@ -18,7 +18,7 @@
 var BBPromise = require('bluebird');
 var preq = require('preq');
 var domino = require('domino');
-var sUtil = require('../lib/util');
+var sUtil = require('../lib/service-util');
 var util = require('util');
 var transforms = require('../lib/transforms');
 var mwapi = require('../lib/mwapi');
diff --git a/routes/mobile-text.js b/routes/mobile-text.js
index 0a947f7..3127cb4 100644
--- a/routes/mobile-text.js
+++ b/routes/mobile-text.js
@@ -15,7 +15,7 @@
 //var BBPromise = require('bluebird');
 var preq = require('preq');
 var domino = require('domino');
-var sUtil = require('../lib/util');
+var sUtil = require('../lib/service-util');
 var mwapi = require('../lib/mwapi');
 
 // shortcut
diff --git a/routes/root.js b/routes/root.js
index 3b34d8e..a6f6acc 100644
--- a/routes/root.js
+++ b/routes/root.js
@@ -1,7 +1,7 @@
 'use strict';
 
 
-var sUtil = require('../lib/util');
+var sUtil = require('../lib/service-util');
 
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b6bcb806d50d43ff8b8a270b7f2c5c9ea935189
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Bgerstle 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove redundant field from LinkPreviewFunnel - change (apps...wikipedia)

2015-08-28 Thread Deskana (Code Review)
Deskana has uploaded a new change for review.

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

Change subject: Remove redundant field from LinkPreviewFunnel
..

Remove redundant field from LinkPreviewFunnel

A page title was being passed to the constructor for LinkPreviewFunnel,
which was then never actually used for anything. I assume this was used
for something in the past. Either way, it's not being used at all now.
This patch removes the field and alters all the calls to the constructor
so that it's not passed any more, to optimise performance and improve
code tidiness.

Change-Id: Ie99666ec6a9f4f0f34a1dc56f7a2e9387b72df4f
---
M app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
3 files changed, 3 insertions(+), 6 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
index e3c2b82..67a29c3 100644
--- a/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
@@ -12,11 +12,8 @@
 private static final int PROD_LINK_PREVIEW_VERSION = 3;
 private final int version;
 
-private final PageTitle title;
-
-public LinkPreviewFunnel(WikipediaApp app, PageTitle title) {
+public LinkPreviewFunnel(WikipediaApp app) {
 super(app, SCHEMA_NAME, REV_ID, app.isProdRelease() ? 
Funnel.SAMPLE_LOG_100 : Funnel.SAMPLE_LOG_ALL);
-this.title = title;
 version = app.isProdRelease() ? PROD_LINK_PREVIEW_VERSION : 
app.getLinkPreviewVersion();
 }
 
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index ff1779f..dcdaf62 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -403,7 +403,7 @@
 if (!app.isProdRelease() && app.getLinkPreviewVersion() == 0) {
 HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
 getPageActivity().displayNewPage(title, historyEntry);
-new LinkPreviewFunnel(app, title).logNavigate();
+new LinkPreviewFunnel(app).logNavigate();
 } else {
 getPageActivity().showLinkPreview(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
 }
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
index 9fab470..ae4c7f9 100755
--- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
+++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
@@ -136,7 +136,7 @@
 // and kick off the task to load all the things...
 new LinkPreviewFetchTask(app.getAPIForSite(pageTitle.getSite()), 
pageTitle).execute();
 
-funnel = new LinkPreviewFunnel(app, pageTitle);
+funnel = new LinkPreviewFunnel(app);
 funnel.logLinkClick();
 
 return rootView;

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

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

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


[MediaWiki-commits] [Gerrit] Convert some fields to local variables. - change (apps...wikipedia)

2015-08-28 Thread Deskana (Code Review)
Deskana has uploaded a new change for review.

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

Change subject: Convert some fields to local variables.
..

Convert some fields to local variables.

This patch converts some fields that are only used in a single method to
local variables, to optimise performance and maintain code tidiness.

Change-Id: Ia38f84ecdc87c66a3924b06b43d19e31f7131691
---
M app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
4 files changed, 3 insertions(+), 8 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
index e3c2b82..c181788 100644
--- a/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
@@ -12,8 +12,6 @@
 private static final int PROD_LINK_PREVIEW_VERSION = 3;
 private final int version;
 
-private final PageTitle title;
-
 public LinkPreviewFunnel(WikipediaApp app, PageTitle title) {
 super(app, SCHEMA_NAME, REV_ID, app.isProdRelease() ? 
Funnel.SAMPLE_LOG_100 : Funnel.SAMPLE_LOG_ALL);
 this.title = title;
diff --git 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
index a4e71aa..2cc2af6 100644
--- 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
+++ 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
@@ -61,7 +61,6 @@
 private View bottomContentContainer;
 private TextView pageLastUpdatedText;
 private TextView pageLicenseText;
-private TextView pageExternalLink;
 private View readMoreContainer;
 private ListView readMoreList;
 
@@ -88,7 +87,7 @@
 readMoreContainer = 
bottomContentContainer.findViewById(R.id.read_more_container);
 readMoreList = 
(ListView)bottomContentContainer.findViewById(R.id.read_more_list);
 
-pageExternalLink = (TextView) 
bottomContentContainer.findViewById(R.id.page_external_link);
+TextView pageExternalLink = (TextView) 
bottomContentContainer.findViewById(R.id.page_external_link);
 pageExternalLink.setPaintFlags(pageExternalLink.getPaintFlags() | 
Paint.UNDERLINE_TEXT_FLAG);
 pageExternalLink.setOnClickListener(new View.OnClickListener() {
 @Override
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
index babd012..8d5bbc8 100644
--- 
a/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
+++ 
b/app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
@@ -50,7 +50,6 @@
  */
 public abstract class SwipeableBottomDialog extends DialogFragment {
 private final List dialogViews = new ArrayList<>();
-private ViewGroup rootView;
 private ListView dialogListView;
 private int dialogPeekHeight;
 
@@ -76,7 +75,7 @@
 int displayWidth = getDialogWidth();
 int displayHeight = 
inflater.getContext().getResources().getDisplayMetrics().heightPixels;
 
-rootView = (ViewGroup) inflater.inflate(R.layout.dialog_bottom_swipe, 
container);
+ViewGroup rootView = (ViewGroup) 
inflater.inflate(R.layout.dialog_bottom_swipe, container);
 
 dialogViews.add(makeSpaceView(displayWidth, 1));
 dialogViews.add(makeSpaceView(displayWidth, dialogPeekHeight));
diff --git a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
index e19cf49..4d4d897 100644
--- a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
+++ b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
@@ -44,7 +44,6 @@
 private EditText searchEditText;
 private SearchFunnel funnel;
 private TextView langButton;
-private FrameLayout langButtonContainer;
 
 public SearchFunnel getFunnel() {
 return funnel;
@@ -287,7 +286,7 @@
 LinearLayout enabledSearchBar = (LinearLayout) 
getActivity().findViewById(R.id.search_bar_enabled);
 TextView searchButton = (TextView) 
getActivity().findViewById(R.id.main_search_bar_text);
 langButton = (TextView) 
getActivity().findViewById(R.id.search_lang_button);
-langButtonContainer = (FrameLayout) 
getActivity().findViewById(R.id.search_lang_button_container);
+FrameLayout langButtonContainer = (FrameLayout) 
getActivity().findV

[MediaWiki-commits] [Gerrit] bug fix for mapping explicit value list - change (mediawiki...SemanticForms)

2015-08-28 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review.

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

Change subject: bug fix for mapping explicit value list
..

bug fix for mapping explicit value list

Change-Id: Iffcb3e7cb69e6c308547dc2cf47ff342ad26b2fa
---
M includes/SF_FormPrinter.php
1 file changed, 15 insertions(+), 14 deletions(-)


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

diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php
index 149635e..5f582d4 100644
--- a/includes/SF_FormPrinter.php
+++ b/includes/SF_FormPrinter.php
@@ -1072,6 +1072,21 @@
}
} // end for
 
+
+   if ( array_key_exists( 'delimiter', 
$field_args ) ) {
+   $delimiter = 
$field_args['delimiter'];
+   } else {
+   $delimiter = ",";
+   }
+
+   // If the 'values' parameter was set, 
separate it based on the
+   // 'delimiter' parameter, if any.
+   if ( ! empty( $values ) ) {
+   // Remove whitespaces, and 
un-escape characters
+   $possible_values = array_map( 
'trim', explode( $delimiter, $values ) );
+   $possible_values = array_map( 
'htmlspecialchars_decode', $possible_values );
+   }
+
// If we're using Cargo, there's no
// equivalent for "values from property"
// - instead, we just always get the
@@ -1107,11 +1122,6 @@
}
if ( count( $show_on_select ) > 0 ) {
$field_args['show on select'] = 
$show_on_select;
-   }
-   if ( array_key_exists( 'delimiter', 
$field_args ) ) {
-   $delimiter = 
$field_args['delimiter'];
-   } else {
-   $delimiter = ",";
}
 
// Get the value from the request, if
@@ -1294,15 +1304,6 @@
$field_args['origName'] 
= $template_name . '[' . $field_name . ']';
} else {
$input_name = 
$template_name . '[' . $field_name . ']';
-   }
-
-
-   // If the 'values' parameter 
was set, separate it based on the
-   // 'delimiter' parameter, if 
any.
-   if ( ! empty( $values ) ) {
-   // Remove whitespaces, 
and un-escape characters
-   $possible_values = 
array_map( 'trim', explode( $delimiter, $values ) );
-   $possible_values = 
array_map( 'htmlspecialchars_decode', $possible_values );
}
 
// if we're creating the page 
name from a formula based on

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffcb3e7cb69e6c308547dc2cf47ff342ad26b2fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] Load mwimage support in VE - change (mediawiki...Flow)

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

Change subject: Load mwimage support in VE
..


Load mwimage support in VE

VE-core's image support breaks when consuming MW images,
so load VE-MW's image support to deal with this.

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

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



diff --git a/Resources.php b/Resources.php
index fdbaa46..d68a676 100644
--- a/Resources.php
+++ b/Resources.php
@@ -536,6 +536,7 @@
'ext.visualEditor.icons',
// See comment at bottom of mw.flow.ve.Target.js.
'ext.visualEditor.mediawiki',
+   'ext.visualEditor.mwimage',
'ext.visualEditor.mwlink',
'ext.visualEditor.mwtransclusion',
'ext.visualEditor.standalone',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba59d2a5d2b74fc082d6b4f9606464717b63f2d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Check surface is visible before trying to render fragments - change (VisualEditor/VisualEditor)

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

Change subject: Check surface is visible before trying to render fragments
..


Check surface is visible before trying to render fragments

Bug: T110538
Change-Id: I292bff99cd9af20f8fae5078d7c6d576a14a9063
---
M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js 
b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
index 6705b0d..268c13f 100644
--- a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
+++ b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
@@ -56,7 +56,7 @@
this.results = 0;
// Range over the list of fragments indicating which ones where 
rendered,
// e.g. [1,3] means fragments 1 & 2 were rendered
-   this.renderedFragments = null;
+   this.renderedFragments = new ve.Range();
this.replacing = false;
this.focusedIndex = 0;
this.query = null;
@@ -321,7 +321,11 @@
 ve.ui.FindAndReplaceDialog.prototype.renderFragments = function () {
var i, selection, viewportRange, start, end;
 
-   if ( this.replacing ) {
+   if (
+   this.replacing ||
+   // Check the surface isn't hidden, such as during deactivation
+   !this.surface.getView().$element.is( ':visible' )
+   ) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I292bff99cd9af20f8fae5078d7c6d576a14a9063
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix focusable mouseout - change (VisualEditor/VisualEditor)

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

Change subject: Fix focusable mouseout
..


Fix focusable mouseout

We should detect mouseout of this.$focusable, not this.$element.

Bug: T110195
Change-Id: Ifd071eaccdf543a707ef839d5ea0f715e9d2be8c
---
M src/ce/ve.ce.FocusableNode.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js
index b4ceaa7..2693d57 100644
--- a/src/ce/ve.ce.FocusableNode.js
+++ b/src/ce/ve.ce.FocusableNode.js
@@ -285,7 +285,7 @@
var $target = $( e.target );
if (
!$target.hasClass( 've-ce-focusableNode-highlight' ) &&
-   $target.closest( '.ve-ce-focusableNode' ).length === 0
+   !OO.ui.contains( this.$focusable.toArray(), $target[ 0 ], true )
) {
this.clearHighlights();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd071eaccdf543a707ef839d5ea0f715e9d2be8c
Gerrit-PatchSet: 3
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] AnnotationInspector: Only show 'insert' when content is to b... - change (VisualEditor/VisualEditor)

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

Change subject: AnnotationInspector: Only show 'insert' when content is to be 
inserted
..


AnnotationInspector: Only show 'insert' when content is to be inserted

Currently 'insert' means that a new annotation will be applied, which
is a little confusing. Everywhere else, 'insert' means insert new
contents. Just use 'done' unless new text is actually going to be
inserted (i.e., the inspector was opened on a collapsed selection).

Change-Id: I0ad81f565b585def4687437b317a15a75371b257
---
M src/ui/inspectors/ve.ui.AnnotationInspector.js
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Alex Monk: Looks good to me, but someone else must approve
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/inspectors/ve.ui.AnnotationInspector.js 
b/src/ui/inspectors/ve.ui.AnnotationInspector.js
index 9104254..5a7ba20 100644
--- a/src/ui/inspectors/ve.ui.AnnotationInspector.js
+++ b/src/ui/inspectors/ve.ui.AnnotationInspector.js
@@ -145,10 +145,8 @@
  * @inheritdoc
  */
 ve.ui.AnnotationInspector.prototype.getMode = function () {
-   if ( this.fragment ) {
-   // Trim the fragment before getting selected models to match 
the behavior of
-   // #getSetupProcess
-   return 
this.fragment.trimLinearSelection().getSelectedModels().length ? 'edit' : 
'insert';
+   if ( this.initialSelection ) {
+   return this.initialSelection.isCollapsed() ? 'insert' : 'edit';
}
return '';
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ad81f565b585def4687437b317a15a75371b257
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mailman: fix Apache 2.4 require syntax pt.2 - change (operations/puppet)

2015-08-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mailman: fix Apache 2.4 require syntax pt.2
..


mailman: fix Apache 2.4 require syntax pt.2

one more follow-up to I2c70d87922bcc65

Syntax error on line 27 ..
negative Require directive has no effect in  directive


When multiple Require directives are used in a single configuration
section and are not contained in another authorization directive like
, they are implicitly contained within a  directive.

Thus the first one to authorize a user authorizes the entire request,
and subsequent Require directives are ignored.


http://httpd.apache.org/docs/current/mod/mod_authz_core.html

Change-Id: I25ff59808fcb077b3611637bf19cb7699163d755
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 795c6b1..e3d98e5 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -20,8 +20,10 @@
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser
 
 = 2.4>
-Require all granted
-Require not env bad_browser
+
+Require all granted
+Require not env bad_browser
+
 
 
 Order allow,deny

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25ff59808fcb077b3611637bf19cb7699163d755
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: John F. Lewis 
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 browser tests for external surveys - change (mediawiki...QuickSurveys)

2015-08-28 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Add browser tests for external surveys
..

Add browser tests for external surveys

Bug: T110225
Change-Id: I70a93e28d3ad9b40bd2ee5063c0e9d8ee1e3f96b
---
M tests/browser/LocalSettings.php
A tests/browser/features/external_survey.feature
M tests/browser/features/internal_survey.feature
M tests/browser/features/support/pages/article_page.rb
M tests/browser/features/support/step_definitions/common_steps.rb
A tests/browser/features/support/step_definitions/external_survey_steps.rb
M tests/browser/features/support/step_definitions/internal_survey_steps.rb
7 files changed, 82 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/10/234710/1

diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
index 4ffc204..7ac103d 100644
--- a/tests/browser/LocalSettings.php
+++ b/tests/browser/LocalSettings.php
@@ -18,4 +18,18 @@
"mobile" => array( "stable", "beta", "alpha" ),
),
),
+   array(
+   'name' => 'external example survey',
+   'type' => 'external',
+   "question" => 
"ext-quicksurveys-example-external-survey-question",
+   "description" => 
"ext-quicksurveys-example-external-survey-description",
+   "link" => "ext-quicksurveys-example-external-survey-link",
+   "privacyPolicy" => 
"ext-quicksurveys-example-external-survey-privacy-policy",
+   'coverage' => .5,
+   'enabled' => true,
+   'platform' => array(
+   'desktop' => array( 'stable' ),
+   'mobile' => array( 'stable', 'beta', 'alpha' ),
+   ),
+   )
 );
diff --git a/tests/browser/features/external_survey.feature 
b/tests/browser/features/external_survey.feature
new file mode 100644
index 000..7dabdd2
--- /dev/null
+++ b/tests/browser/features/external_survey.feature
@@ -0,0 +1,32 @@
+@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org 
@vagrant @integration
+Feature: External surveys
+  Background:
+   Given the quick survey test pages are installed
+
+  Scenario: External survey is visible with flag
+   And I am on the "Quick survey test page stub" page with the external 
quick survey flag enabled
+   Then I should see the survey
+
+  Scenario: External survey is not present without flag
+   And I'm not bucketed with storage key 
"ext-quicksurvey-external-example-survey"
+   And I am on the "Quick survey test page stub" page
+   And the page has fully loaded
+   Then I should not see the survey
+
+  Scenario: External survey is visible when bucketed
+   And I'm bucketed with storage key 
"ext-quicksurvey-external-example-survey"
+   And I am on the "Quick survey test page stub" page
+   Then I should see the survey
+
+  Scenario: External survey is not present when dismissed
+   And I've dismissed the storage key 
"ext-quicksurvey-external-example-survey"
+   And I am on the "Quick survey test page stub" page
+   And the page has fully loaded
+   Then I should not see the survey
+
+  Scenario: User can participate in external survey
+   And I am on the "Quick survey test page stub" page with the external 
quick survey flag enabled
+   And I see the external survey
+   When I answer the external survey in the positive
+   Then I get thanks for my external survey feedback
+
diff --git a/tests/browser/features/internal_survey.feature 
b/tests/browser/features/internal_survey.feature
index 99bde0a..bff406d 100644
--- a/tests/browser/features/internal_survey.feature
+++ b/tests/browser/features/internal_survey.feature
@@ -4,7 +4,7 @@
 Given the quick survey test pages are installed
 
   Scenario: Internal survey is visible with flag
-And I am on the "Quick survey test page stub" page with the quick survey 
flag enabled
+And I am on the "Quick survey test page stub" page with the internal quick 
survey flag enabled
 Then I should see the survey
 
   Scenario: Internal survey is not present without flag
@@ -25,7 +25,7 @@
 Then I should not see the survey
 
   Scenario: User can participate in internal survey
-And I am on the "Quick survey test page stub" page with the quick survey 
flag enabled
-And I see the survey
-When I answer the survey in the positive
-Then I get thanks for my feedback
+And I am on the "Quick survey test page stub" page with the internal quick 
survey flag enabled
+And I see the internal survey
+When I answer the internal survey in the positive
+Then I get thanks for my internal survey feedback
diff --git a/tests/browser/features/support/pages/article_page.rb 
b/tests/browser/features/support/pages/article_page.rb
index

[MediaWiki-commits] [Gerrit] Load mwimage support in VE - change (mediawiki...Flow)

2015-08-28 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Load mwimage support in VE
..

Load mwimage support in VE

VE-core's image support breaks when consuming MW images,
so load VE-MW's image support to deal with this.

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


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

diff --git a/Resources.php b/Resources.php
index fdbaa46..d68a676 100644
--- a/Resources.php
+++ b/Resources.php
@@ -536,6 +536,7 @@
'ext.visualEditor.icons',
// See comment at bottom of mw.flow.ve.Target.js.
'ext.visualEditor.mediawiki',
+   'ext.visualEditor.mwimage',
'ext.visualEditor.mwlink',
'ext.visualEditor.mwtransclusion',
'ext.visualEditor.standalone',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba59d2a5d2b74fc082d6b4f9606464717b63f2d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mailman: fix Apache 2.4 require syntax pt.2 - change (operations/puppet)

2015-08-28 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mailman: fix Apache 2.4 require syntax pt.2
..

mailman: fix Apache 2.4 require syntax pt.2

one more follow-up to I2c70d87922bcc65


When multiple Require directives are used in a single configuration
section and are not contained in another authorization directive like
, they are implicitly contained within a  directive.

Thus the first one to authorize a user authorizes the entire request,
and subsequent Require directives are ignored.


Syntax error on line 27 .. negative Require directive has no effect in 
 directive

Change-Id: I25ff59808fcb077b3611637bf19cb7699163d755
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/234708/1

diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 795c6b1..e3d98e5 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -20,8 +20,10 @@
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser
 
 = 2.4>
-Require all granted
-Require not env bad_browser
+
+Require all granted
+Require not env bad_browser
+
 
 
 Order allow,deny

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25ff59808fcb077b3611637bf19cb7699163d755
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] mailman: correct apache 2.4 usage of require not - change (operations/puppet)

2015-08-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mailman: correct apache 2.4 usage of require not
..


mailman: correct apache 2.4 usage of require not

Apache 2.4 requires all granted followed by the require not statement.

Fixes I58fe910e204d6d0d51b85ef1f589f0936a65b0ca

Change-Id: I2c70d87922bcc65f3a7ca0aff53a15a09924eb8a
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 58a74b4..795c6b1 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -20,6 +20,7 @@
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser
 
 = 2.4>
+Require all granted
 Require not env bad_browser
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c70d87922bcc65f3a7ca0aff53a15a09924eb8a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: John F. Lewis 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't fail if pattern character is nil - change (mediawiki...Scribunto)

2015-08-28 Thread Jberkel (Code Review)
Jberkel has uploaded a new change for review.

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

Change subject: Don't fail if pattern character is nil
..

Don't fail if pattern character is nil

Avoids potential "attempt to concatenate a nil value".

Change-Id: Icfc548614b6769a8c42284d19e428596deb32ea9
---
M engines/LuaCommon/lualib/ustring/ustring.lua
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/engines/LuaCommon/lualib/ustring/ustring.lua 
b/engines/LuaCommon/lualib/ustring/ustring.lua
index 57456ac..fc6df11 100644
--- a/engines/LuaCommon/lualib/ustring/ustring.lua
+++ b/engines/LuaCommon/lualib/ustring/ustring.lua
@@ -725,7 +725,7 @@
local ep = match( sp, pp )
if ep then
for i = 1, ncapt do
-   captures[i] = getcapt( i, 'Unclosed capture 
beginning at pattern character ' .. captparen[pp], 2 )
+   captures[i] = getcapt( i, 'Unclosed capture 
beginning at pattern character ' .. (captparen[pp] or "nil"), 2 )
end
return sp, ep - 1, unpack( captures )
end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfc548614b6769a8c42284d19e428596deb32ea9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Jberkel 

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


[MediaWiki-commits] [Gerrit] Work around link trail with nowiki - change (mediawiki...Flow)

2015-08-28 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Work around link trail with nowiki
..

Work around link trail with nowiki

Bug: T110757
Change-Id: Ifdc34b686a94864082407dab3a2c7e8b5db5f368
---
M maintenance/FlowCreateTemplates.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/06/234706/1

diff --git a/maintenance/FlowCreateTemplates.php 
b/maintenance/FlowCreateTemplates.php
index 817cd7b..68747f6 100644
--- a/maintenance/FlowCreateTemplates.php
+++ b/maintenance/FlowCreateTemplates.php
@@ -29,7 +29,7 @@
global $wgContLang;
$namespaces = 
$wgContLang->getFormattedNamespaces();
 
-   return '@[[' . $namespaces[NS_USER] . 
':{{{1|Example}}}|{{{2|{{{1|Example}}]]';
+   return '@[[' . $namespaces[NS_USER] . 
':{{{1|Example}}}|{{{2|{{{1|Example}}]]';
},
// LiquidThread import templates
'flow-importer-lqt-moved-thread-template' => function( 
Title $title ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdc34b686a94864082407dab3a2c7e8b5db5f368
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Hygiene: Provide utility function for generating a last modi... - change (mediawiki...MobileFrontend)

2015-08-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Hygiene: Provide utility function for generating a last 
modified message
..

Hygiene: Provide utility function for generating a last modified message

This allows things other than the last modified bar to generate the relative
time string. This will be used in future by the watchlist feature.

Other changes:
* Clear out cached pages fixes that are no longer relevant

Change-Id: Icc1c20c5bd4f20d1278ec6a2e921728dbeb83b75
---
M resources/mobile.head/init.js
M resources/mobile.modifiedBar/time.js
2 files changed, 46 insertions(+), 60 deletions(-)


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

diff --git a/resources/mobile.head/init.js b/resources/mobile.head/init.js
index a4fb107..415682e 100644
--- a/resources/mobile.head/init.js
+++ b/resources/mobile.head/init.js
@@ -15,71 +15,21 @@
 * @ignore
 */
function initHistoryLink() {
-   var $lastModified = $( '#mw-mf-last-modified' ),
-   // FIXME remove when the cache clears.
-   isPageCached = $lastModified.length && 
$lastModified.prop( 'tagName' ).toLowerCase() === 'a',
-   // FIXME remove the cache related part.
-   $lastModifiedLink = isPageCached ? $lastModified : 
$lastModified.find( 'a' ),
-   // FIXME remove when the cache clears.
-   $lastModifiedBar = $( '.last-modified-bar' ),
+   var delta,
+   $lastModified = $( '#mw-mf-last-modified' ),
+   $lastModifiedLink = $lastModified.find( 'a' ),
historyUrl = $lastModifiedLink.attr( 'href' ),
ts = $lastModifiedLink.data( 'timestamp' ),
username = $lastModifiedLink.data( 'user-name' ) || 
false,
-   gender = $lastModifiedLink.data( 'user-gender' ),
-   keys = {
-   seconds: 
'mobile-frontend-last-modified-with-user-seconds',
-   minutes: 
'mobile-frontend-last-modified-with-user-minutes',
-   hours: 
'mobile-frontend-last-modified-with-user-hours',
-   days: 
'mobile-frontend-last-modified-with-user-days',
-   months: 
'mobile-frontend-last-modified-with-user-months',
-   years: 
'mobile-frontend-last-modified-with-user-years'
-   },
-   delta, args = [];
+   gender = $lastModifiedLink.data( 'user-gender' );
 
if ( ts ) {
delta = time.getTimeAgoDelta( parseInt( ts, 10 ) );
-   if ( time.isNow( delta ) ) {
-   args = args.concat( [ 
'mobile-frontend-last-modified-with-user-just-now', gender, username ] );
-   } else {
-   args = args.concat( [ keys[ delta.unit ], 
gender, username,
-   mw.language.convertNumber( delta.value )
-   ] );
-   }
if ( time.isRecent( delta ) ) {
$lastModified.parent( '.last-modified-bar' 
).addClass( 'active' );
}
 
-   args = args.concat( [ historyUrl,
-   // Abuse PLURAL support to determine if the 
user is anonymous or not
-   mw.language.convertNumber( username ? 1 : 0 ),
-   // I'll abuse of PLURAL support means we have 
to pass the relative URL rather than construct it from a wikilink
-   username ? mw.util.getUrl( 
'Special:UserProfile/' + username ) : ''
-   ] );
-
-   // FIXME: remove the if part when the cache clears.
-   if (
-   isPageCached ||
-   $lastModifiedLink.hasClass( 'truncated-text' ) 
||
-   $lastModified.hasClass( 'pre-content' )
-   ) {
-   $lastModifiedBar.replaceWith(
-   $( '' )
-   .html(
-   $( '' )
-   .html( 
mw.message.apply( this, args ).parse() )
-   )
-   );
-   } else {
-   $lastModifiedLink.replaceWith( 
mw.message.apply( this, args ).parse() );
-   

[MediaWiki-commits] [Gerrit] Be consistent in generation of last edited times - change (mediawiki...MobileFrontend)

2015-08-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Be consistent in generation of last edited times
..

Be consistent in generation of last edited times

Supporting changes:
* Add method getLatestTimestamp to MobilePage
* Add method getLatestEdit to MobilePage
* SpecialMobileEditWatchlist->getLineHtml now takes MobilePage parameter
* Any page with last modified links will naturally be enhanced

Bug: T100366
Change-Id: Ia168644ba13e25d6f538cb9f105a72f039814845
---
M i18n/en.json
M i18n/qqq.json
M includes/Resources.php
M includes/models/MobilePage.php
M includes/skins/SkinMinerva.php
M includes/specials/SpecialMobileEditWatchlist.php
M resources/mobile.head/init.js
M resources/mobile.modifiedBar/time.js
M resources/mobile.watchlist/WatchListApi.js
9 files changed, 122 insertions(+), 88 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 9a0c928..d8e0055 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -374,7 +374,6 @@
"mobile-frontend-watchlist-filter-other": "Other",
"mobile-frontend-watchlist-filter-talk": "Talk",
"mobile-frontend-watchlist-login-action": "Log in to see it.",
-   "mobile-frontend-watchlist-modified": "Modified $1",
"mobile-frontend-watchlist-more": "more",
"mobile-frontend-watchlist-please-wait": "Please wait, watch action is 
taking longer than expected.",
"mobile-frontend-watchlist-error": "There was a problem watching this 
page. Please try again.",
@@ -423,9 +422,6 @@
"mobile-frontend-donate-button-label": "Donate",
"mobile-frontend-meta-data-issues-categories": "About this category",
"mobile-frontend-loading-message": "Loading…",
-   "mobile-frontend-days-ago": "$1 {{PLURAL:$1|day|days}} ago",
-   "mobile-frontend-months-ago": "$1 {{PLURAL:$1|month|months}} ago",
-   "mobile-frontend-years-ago": "$1 {{PLURAL:$1|year|years}} ago",
"mobile-frontend-console-recruit": "\\o/ Hey! This is open source 
software and we need volunteers to help us build this thing, make it better and 
fix any bugs that you might be seeing in this JavaScript console!\n\nYou can 
find our backlog @ https://phabricator.wikimedia.org/project/view/67/";,
"mobile-frontend-browse-tags-header": "Tags",
"mobile-frontend-panel-ok": "Okay",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ad1ad95..3ef1ecf 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -370,7 +370,6 @@
"mobile-frontend-watchlist-filter-other": "Label on filter selector for 
mobile watchlist: other pages (not talk or content page).\n{{Identical|Other}}. 
This must be a single word for layout reasons.",
"mobile-frontend-watchlist-filter-talk": "Label on filter selector for 
mobile watchlist: talk pages.\n{{Identical|Talk}}. This must be a single word 
for layout reasons.",
"mobile-frontend-watchlist-login-action": "Call to action that follows 
{{msg-mw|mobile-frontend-watchlist-purpose}} asking them to login.",
-   "mobile-frontend-watchlist-modified": "Text saying how long ago a page 
in watchlist was updated.\n* $1 - output of {{msg-mw|ago}} (e.g. \"15 days 
ago\", \"7 hours ago\").",
"mobile-frontend-watchlist-more": "Label for link that shows more pages 
of the watchlist a-z view.\n{{Identical|More}}",
"mobile-frontend-watchlist-please-wait": "Shows if watch action is 
taking longer than 500ms.",
"mobile-frontend-watchlist-error": "Shows if an error occurred whilst 
trying to watch the page.",
@@ -419,9 +418,6 @@
"mobile-frontend-donate-button-label": "Message for donation button in 
mobile interface at bottom of page.\n{{Identical|Donate}}",
"mobile-frontend-meta-data-issues-categories": "Label to appear in 
button that opens issue overlay on categories.",
"mobile-frontend-loading-message": "Hidden text existing for 
accessibility reasons for intermediate loaders.\n{{Identical|Loading}}",
-   "mobile-frontend-days-ago": "Expression of duration of time passed in 
days.\nParameter:\n* $1 - number of days that have passed.",
-   "mobile-frontend-months-ago": "Expression of duration of time passed in 
months. \nParameter:\n* $1 - number of months that have passed.",
-   "mobile-frontend-years-ago": "Expression of duration of time passed in 
years.\nParameter:\n * $1 - number of years that have passed.",
"mobile-frontend-console-recruit": "Message that is displayed in the 
JavaScript console aimed at developers in an attempt to recruit volunteers. The 
\\o/ emoticon is a man with his arms in the air with the purpose of drawing 
attention to the message. If this doesn't translate into the destination 
language feel free to omit it or use something more applicable.",
"mobile-frontend-browse-tags-header": "The 

[MediaWiki-commits] [Gerrit] Fixed parser report typo - change (mediawiki/core)

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

Change subject: Fixed parser report typo
..


Fixed parser report typo

Change-Id: Ia549f4e1932bc1196e840e154b8d6fb0b608d10d
---
M includes/parser/Parser.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index f538153..977aebe 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -511,7 +511,7 @@
}
$limitReport .= 'Cached time: ' . 
$this->mOutput->getCacheTime() . "\n";
$limitReport .= 'Cache expiry: ' . 
$this->mOutput->getCacheExpiry() . "\n";
-   $limitReport .= 'Dyanmic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
+   $limitReport .= 'Dynanmic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
foreach ( $this->mOutput->getLimitReportData() as $key 
=> $value ) {
if ( Hooks::run( 'ParserLimitReportFormat',
array( $key, &$value, &$limitReport, 
false, false )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia549f4e1932bc1196e840e154b8d6fb0b608d10d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix wikitech beacon 204 - change (operations/puppet)

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

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

Change subject: Fix wikitech beacon 204
..

Fix wikitech beacon 204

This was applied to the port 80 VirtualHost, which is not particularly useful.

Bug: T104359
Change-Id: I9b1ec64162f9916bcbe1458cd320ea90e1e89deb
---
M templates/apache/sites/wikitech.wikimedia.org.erb
1 file changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/templates/apache/sites/wikitech.wikimedia.org.erb 
b/templates/apache/sites/wikitech.wikimedia.org.erb
index 9de806c..c7f1543 100644
--- a/templates/apache/sites/wikitech.wikimedia.org.erb
+++ b/templates/apache/sites/wikitech.wikimedia.org.erb
@@ -30,11 +30,6 @@
 RewriteCond %{SERVER_PORT} !^443$
 RewriteRule ^/(.*)$ https://<%= @webserver_hostname %>/$1 [L,R]
 
-# Beacon requests that are normally handled by Varnish. We don't need these
-# requests to do anything, but they shouldn't show up in the JavaScript
-# error console as errors.
-RedirectMatch 204 beacon/(.*)$
-
 ErrorLog /var/log/apache2/error.log
 
 # Possible values include: debug, info, notice, warn, error, crit,
@@ -127,4 +122,8 @@
 CustomLog /var/log/apache2/access.log combined
 ServerSignature Off
 
+# Beacon requests that are normally handled by Varnish. We don't need these
+# requests to do anything, but they shouldn't show up in the JavaScript
+# error console as errors.
+RedirectMatch 204 beacon/(.*)$
 

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

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

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


[MediaWiki-commits] [Gerrit] mailman: correct apache 2.4 usage of require not - change (operations/puppet)

2015-08-28 Thread John F. Lewis (Code Review)
John F. Lewis has uploaded a new change for review.

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

Change subject: mailman: correct apache 2.4 usage of require not
..

mailman: correct apache 2.4 usage of require not

Apache 2.4 requires all granted followed by the require not statement.

Fixes I58fe910e204d6d0d51b85ef1f589f0936a65b0ca

Change-Id: I2c70d87922bcc65f3a7ca0aff53a15a09924eb8a
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 58a74b4..795c6b1 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -20,6 +20,7 @@
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser
 
 = 2.4>
+Require all granted
 Require not env bad_browser
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c70d87922bcc65f3a7ca0aff53a15a09924eb8a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: John F. Lewis 

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


[MediaWiki-commits] [Gerrit] Fixed parser report typo - change (mediawiki/core)

2015-08-28 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Fixed parser report typo
..

Fixed parser report typo

Change-Id: Ia549f4e1932bc1196e840e154b8d6fb0b608d10d
---
M includes/parser/Parser.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/234701/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index f538153..977aebe 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -511,7 +511,7 @@
}
$limitReport .= 'Cached time: ' . 
$this->mOutput->getCacheTime() . "\n";
$limitReport .= 'Cache expiry: ' . 
$this->mOutput->getCacheExpiry() . "\n";
-   $limitReport .= 'Dyanmic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
+   $limitReport .= 'Dynanmic content: ' . ( 
$this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
foreach ( $this->mOutput->getLimitReportData() as $key 
=> $value ) {
if ( Hooks::run( 'ParserLimitReportFormat',
array( $key, &$value, &$limitReport, 
false, false )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia549f4e1932bc1196e840e154b8d6fb0b608d10d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Improved getMainStashInstance() docs - change (mediawiki/core)

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

Change subject: Improved getMainStashInstance() docs
..


Improved getMainStashInstance() docs

Change-Id: I49e5c112478927387244214917fb06907c22186f
---
M includes/objectcache/ObjectCache.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 069cd95..6019105 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -59,10 +59,11 @@
  *   Delete events are broadcasted to other DCs. See WANObjectCache for 
details.
  *
  * - ObjectCache::getMainStashInstance()
- *   Purpose: Storage.
+ *   Purpose: Ephemeral storage.
  *   Stored centrally within the local data-center.
  *   Changes are replicated to other DCs (eventually consistent).
  *   To retrieve the latest value (e.g. not from a slave), use 
BagOStuff:READ_LATEST.
+ *   This store may be subject to LRU style evictions.
  *
  * - wfGetCache( $cacheType )
  *   Get a specific cache type by key in $wgObjectCaches.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49e5c112478927387244214917fb06907c22186f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mailman: make Apache config 2.4 compatible - change (operations/puppet)

2015-08-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mailman: make Apache config 2.4 compatible
..


mailman: make Apache config 2.4 compatible

Apache config needs to be adjusted for 2.4 here as well.

still "client denied by server configuration" for monitoring and all

Bug:T109925
Change-Id: I58fe910e204d6d0d51b85ef1f589f0936a65b0ca
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 21 insertions(+), 6 deletions(-)

Approvals:
  John F. Lewis: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 916ac77..58a74b4 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -19,24 +19,39 @@
 # Does not obey robots.txt; causing operational issues, 2014-06-23
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser
 
-Order allow,deny
-Allow from env=!bad_browser
+= 2.4>
+Require not env bad_browser
+
+
+Order allow,deny
+Allow from env=!bad_browser
+
 
 
 DocumentRoot /var/www
 
 Options FollowSymLinks
 AllowOverride None
-Order Allow,Deny
-Allow from All
+= 2.4>
+Require all granted
+
+
+Order Allow,Deny
+Allow from All
+
 
 
 ScriptAlias /mailman/ "/usr/lib/cgi-bin/mailman/"
 
 AllowOverride None
 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
-Order allow,deny
-Allow from all
+= 2.4>
+Require all granted
+
+
+Order allow,deny
+Allow from all
+
 
 
 Alias /pipermail/ "/var/lib/mailman/archives/public/"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58fe910e204d6d0d51b85ef1f589f0936a65b0ca
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: John F. Lewis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] harden ssh-agent-proxy - change (operations/puppet)

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

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

Change subject: harden ssh-agent-proxy
..

harden ssh-agent-proxy

Prior to this patch, ssh-agent-proxy only read the parts of each incoming
message that it thought it cared about: the request code, and (in the case of
signing requests) the public key blob. This is potentially insecure because a
malicious client could potentially trick the proxy into forwarding a request
that would otherwise get filtered by appending it to a legitimate request and
deliberately under-reporting the message length. (Similar to the Heartbleed
bug.) To protect against this, we make ssh-agent-proxy read and validate the
entire message and its length against the agent protocol spec before forwarding
it to the proxy.

Change-Id: Ia00ccafcd0ab8a6856be56e276616bceb0ae9d74
---
M modules/keyholder/files/ssh-agent-proxy
1 file changed, 41 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/234700/1

diff --git a/modules/keyholder/files/ssh-agent-proxy 
b/modules/keyholder/files/ssh-agent-proxy
index df7b447..757a012 100644
--- a/modules/keyholder/files/ssh-agent-proxy
+++ b/modules/keyholder/files/ssh-agent-proxy
@@ -72,39 +72,47 @@
 SSH2_AGENTC_SIGN_REQUEST = 13
 SSH_AGENTC_REQUEST_RSA_IDENTITIES = 1
 SSH_AGENT_FAILURE = 5
+SSH_AGENT_OLD_SIGNATURE = 1
 
 s_message_header = struct.Struct('!LB')
+s_flags = struct.Struct('!L')
 s_ucred = struct.Struct('2Ii')
+err = type('SshAgentProtocolError', (IOError,), {})
 
 
 def unpack_variable_length_string(buffer, offset=0):
 """Read a variable-length string from a buffer. The first 4 bytes are the
 big-endian unsigned long representing the length of the string."""
-size = struct.unpack_from('!L', buffer, offset)
-string, = struct.unpack_from('%ds' % size, buffer, offset)
-return string
+fmt = '%ds' % struct.unpack_from('!L', buffer, offset)
+string, = struct.unpack_from(fmt, buffer, offset)
+return string, offset + struct.calcsize(fmt)
 
 
-def get_key_permissions(path):
+def get_key_perms(path):
 """Recursively walk `path`, loading YAML configuration files."""
-key_permissions = {}
+key_perms = {}
 for fname in glob.glob(os.path.join(path, '*.y*ml')):
 with open(fname) as yml:
 for group, keys in yaml.safe_load(yml).items():
 for key in keys:
 key = key.replace(':', '')
-key_permissions.setdefault(key, set()).add(group)
-return key_permissions
+key_perms.setdefault(key, set()).add(group)
+return key_perms
 
 
 class SshAgentProxyServer(socketserver.ThreadingUnixStreamServer):
 """A threaded server that listens on a UNIX domain socket and handles
 requests by filtering them and proxying them to a backend SSH agent."""
 
-def __init__(self, server_address, agent_address, key_permissions):
+def __init__(self, server_address, agent_address, key_perms):
 super().__init__(server_address, SshAgentProxyHandler)
 self.agent_address = agent_address
-self.key_permissions = key_permissions
+self.key_perms = key_perms
+
+def handle_error(self, request, client_address):
+super().handle_error(request, client_address)
+exc_type, exc_value, exc_traceback = sys.exc_info()
+syslog.syslog(syslog.LOG_NOTICE, '[%s] %s' % (exc_type, exc_value))
 
 
 class SshAgentProxyHandler(socketserver.BaseRequestHandler):
@@ -150,35 +158,45 @@
 """Read data from client and send to backend SSH agent."""
 code, message = self.recv_message(self.request)
 
-if code == SSH2_AGENTC_REQUEST_IDENTITIES:
-return self.send_message(self.backend, code, message)
+if not code:
+return
 
-if code == SSH_AGENTC_REQUEST_RSA_IDENTITIES:
-return self.send_message(self.backend, code, message)
+if code in (SSH2_AGENTC_REQUEST_IDENTITIES,
+SSH_AGENTC_REQUEST_RSA_IDENTITIES):
+if message:
+raise err('Trailing bytes')
+return self.send_message(self.backend, code)
 
 if code == SSH2_AGENTC_SIGN_REQUEST:
-key = unpack_variable_length_string(message)
-digest = hashlib.md5(key).hexdigest()
+key_blob, *_ = self.parse_sign_request(message)
+key_digest = hashlib.md5(key_blob).hexdigest()
 user, groups = self.get_peer_credentials(self.request)
-if groups & self.server.key_permissions.get(digest, set()):
-syslog.syslog(syslog.LOG_INFO, 'Allowing signing request '
-  'from user %s using key %s.' % (user, digest))
+if groups & self.server.key_perms.get(key_digest, set()):
 return self.send_message(self.backend, code, message)

[MediaWiki-commits] [Gerrit] Use backported ffmpeg for multimedia transcoding on Trusty - change (operations/puppet)

2015-08-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

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

Change subject: Use backported ffmpeg for multimedia transcoding on Trusty
..

Use backported ffmpeg for multimedia transcoding on Trusty

Reverts Ibddeeb9, since we're switching from the Ubuntu-provided
libav-tools (avconv) to a backported ffmpeg with newer codec support.

Bug: T110707
Bug: T104747
Change-Id: I7356e59fa9563665632677ccb4d753b11154c229
---
M modules/mediawiki/manifests/packages/multimedia.pp
1 file changed, 1 insertion(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/234699/1

diff --git a/modules/mediawiki/manifests/packages/multimedia.pp 
b/modules/mediawiki/manifests/packages/multimedia.pp
index 973e6c9..e89ced2 100644
--- a/modules/mediawiki/manifests/packages/multimedia.pp
+++ b/modules/mediawiki/manifests/packages/multimedia.pp
@@ -3,14 +3,8 @@
 # Provisions packages used by MediaWiki for image and video processing.
 #
 class mediawiki::packages::multimedia {
-if os_version('ubuntu >= trusty') {
-$libav_package   = 'libav-tools'
-} else {
-$libav_package   = 'ffmpeg'
-}
-
 package { [
-$libav_package,
+'ffmpeg',
 'ffmpeg2theora',
 'fontconfig-config',
 'ghostscript',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7356e59fa9563665632677ccb4d753b11154c229
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Update project namespace name and favicon on affcom.wikimedi... - change (operations/mediawiki-config)

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

Change subject: Update project namespace name and favicon on 
affcom.wikimedia.org
..


Update project namespace name and favicon on affcom.wikimedia.org

Bug: T41482
Change-Id: Idb9a17237c103013ef76a0aac8db58722cf40cae
---
D w/static/favicon/chapcom.ico
M wmf-config/InitialiseSettings.php
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/w/static/favicon/chapcom.ico b/w/static/favicon/chapcom.ico
deleted file mode 100644
index 57f4d45..000
--- a/w/static/favicon/chapcom.ico
+++ /dev/null
Binary files differ
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ddc58ba..b436ba4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2022,7 +2022,7 @@
'cawiktionary' => 'Viccionari',
'cewiki' => 'Википеди', // T49574
'chairwiki' => 'Project',
-   'chapcomwiki' => 'Chapcom',
+   'chapcomwiki' => 'Affcom', // T41482
'checkuserwiki' => 'Project', // T30781
'ckbwiki' => 'ویکیپیدیا',
'collabwiki' => 'Project',
@@ -2772,6 +2772,9 @@
'Wiktionary_diskuse' => NS_PROJECT_TALK,
'Wiktionary_talk' => NS_PROJECT_TALK,
'Příloha_diskuse' => 101,
+   ),
+   '+chapcomwiki' => array(
+   'Chapcom' => NS_PROJECT // T41482
),
'+cuwiki' => array(
'Шаблон' => NS_TEMPLATE,
@@ -10729,7 +10732,7 @@
 
# Special wikis
'advisorywiki' => '/static/favicon/wmf.ico',
-   'chapcomwiki' => '/static/favicon/chapcom.ico',
+   'chapcomwiki' => '/static/favicon/wmf.ico', // T41482
'checkuserwiki' => '/static/favicon/community.ico',
'commonswiki' => '/static/favicon/commons.ico',
'donatewiki' => '/static/favicon/wmf.ico',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb9a17237c103013ef76a0aac8db58722cf40cae
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add a bunch of apps and expensive URLs to robots.txt exclusion - change (phabricator/phabricator)

2015-08-28 Thread 20after4 (Code Review)
20after4 has submitted this change and it was merged.

Change subject: Add a bunch of apps and expensive URLs to robots.txt exclusion
..


Add a bunch of apps and expensive URLs to robots.txt exclusion

Bug: T110710
Change-Id: I67623e657feb18c895bdbd1e17e49d84c8255138
---
M src/applications/system/controller/PhabricatorRobotsController.php
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Rush: Looks good to me, but someone else must approve
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/applications/system/controller/PhabricatorRobotsController.php 
b/src/applications/system/controller/PhabricatorRobotsController.php
index 11177f4..5ac822e 100644
--- a/src/applications/system/controller/PhabricatorRobotsController.php
+++ b/src/applications/system/controller/PhabricatorRobotsController.php
@@ -22,6 +22,22 @@
 $out[] = 'Disallow: /diffusion/';
 $out[] = 'Disallow: /multimeter/';
 $out[] = 'Disallow: /file/';
+$out[] = 'Disallow: /project/sprint';
+$out[] = 'Disallow: /policy/explain';
+$out[] = 'Disallow: /auth';
+$out[] = 'Disallow: /login';
+$out[] = 'Disallow: /maniphest/transaction';
+$out[] = 'Disallow: /tag';
+$out[] = 'Disallow: /search/query/all';
+$out[] = 'Disallow: /conduit';
+$out[] = 'Disallow: /api';
+$out[] = 'Disallow: /project';
+$out[] = 'Disallow: /applications';
+$out[] = 'Disallow: /token';
+$out[] = 'Disallow: /pholio';
+$out[] = 'Disallow: /dashboard';
+$out[] = 'Disallow: /calendar';
+$out[] = 'Disallow: /herald';
 
 // Add a small crawl delay (number of seconds between requests) for spiders
 // which respect it. The intent here is to prevent spiders from affecting

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67623e657feb18c895bdbd1e17e49d84c8255138
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/phabricator
Gerrit-Branch: production
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

Change subject: Fix ComparableMixin
..


Fix ComparableMixin

The implementation in 6c6b185e failed for inequality,
resulting in 'Namespace 0 < int 0' returning True.

Change-Id: Ia00ab2dd68938b0520253f7017d685aa03c36592
---
M pywikibot/tools/__init__.py
M tests/namespace_tests.py
2 files changed, 25 insertions(+), 13 deletions(-)

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



diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index aced6c0..03fe23d 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -137,27 +137,27 @@
 """Mixin class to allow comparing to other objects which are comparable."""
 
 def __lt__(self, other):
-"""Compare if other is less than self."""
-return other >= self._cmpkey()
-
-def __le__(self, other):
-"""Compare if other is less equals self."""
+"""Compare if self is less than other."""
 return other > self._cmpkey()
 
+def __le__(self, other):
+"""Compare if self is less equals other."""
+return other >= self._cmpkey()
+
 def __eq__(self, other):
-"""Compare if other is equal to self."""
+"""Compare if self is equal to other."""
 return other == self._cmpkey()
 
 def __ge__(self, other):
-"""Compare if other is greater equals self."""
-return other < self._cmpkey()
-
-def __gt__(self, other):
-"""Compare if other is greater than self."""
+"""Compare if self is greater equals other."""
 return other <= self._cmpkey()
 
+def __gt__(self, other):
+"""Compare if self is greater than other."""
+return other < self._cmpkey()
+
 def __ne__(self, other):
-"""Compare if other is not equal to self."""
+"""Compare if self is not equal to other."""
 return other != self._cmpkey()
 
 
diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py
index f2e2373..024ba7f 100644
--- a/tests/namespace_tests.py
+++ b/tests/namespace_tests.py
@@ -132,13 +132,17 @@
 
 self.assertEqual(a, 0)
 self.assertEqual(a, '')
+self.assertFalse(a < 0)
+self.assertFalse(a > 0)
 self.assertNotEqual(a, None)
+
+self.assertGreater(a, -1)
 
 x = Namespace(id=6, custom_name=u'dummy', canonical_name=u'File',
   aliases=[u'Image', u'Immagine'])
 y = Namespace(id=6, custom_name=u'ملف', canonical_name=u'File',
   aliases=[u'Image', u'Immagine'])
-z = Namespace(id=7, custom_name=u'dummy', canonical_name=u'File',
+z = Namespace(id=7, custom_name=u'dummy 7', canonical_name=u'File',
   aliases=[u'Image', u'Immagine'])
 
 self.assertEqual(x, x)
@@ -157,11 +161,19 @@
 self.assertEqual(x, u'image')
 self.assertEqual(x, u'Image')
 
+self.assertFalse(x < 6)
+self.assertFalse(x > 6)
+
 self.assertEqual(y, u'ملف')
 
 self.assertLess(a, x)
+self.assertLess(x, z)
+self.assertLessEqual(a, x)
 self.assertGreater(x, a)
+self.assertGreater(x, 0)
 self.assertGreater(z, x)
+self.assertGreaterEqual(x, a)
+self.assertGreaterEqual(y, x)
 
 self.assertIn(6, [x, y, z])
 self.assertNotIn(8, [x, y, z])

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

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

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


[MediaWiki-commits] [Gerrit] Made MessageCache use the WAN cache for individual cache keys - change (mediawiki/core)

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

Change subject: Made MessageCache use the WAN cache for individual cache keys
..


Made MessageCache use the WAN cache for individual cache keys

* These keys are used for larger messages not in the main blob,
  and they still use explicit purges as the pages change

Change-Id: I254ddcc9ffe7c49654788d6aabcca2ab7ed4f03f
---
M includes/cache/MessageCache.php
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Nikerabbit: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index fef544a..142dacf 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -559,14 +559,14 @@
if ( $text === false ) {
# Article was deleted
$this->mCache[$code][$title] = '!NONEXISTENT';
-   $this->mMemc->delete( $titleKey );
+   $this->wanCache->delete( $titleKey );
} elseif ( strlen( $text ) > $wgMaxMsgCacheEntrySize ) {
# Check for size
$this->mCache[$code][$title] = '!TOO BIG';
-   $this->mMemc->set( $titleKey, ' ' . $text, 
$this->mExpiry );
+   $this->wanCache->set( $titleKey, ' ' . $text, 
$this->mExpiry );
} else {
$this->mCache[$code][$title] = ' ' . $text;
-   $this->mMemc->delete( $titleKey );
+   $this->wanCache->delete( $titleKey );
}
 
# Update caches
@@ -920,7 +920,7 @@
 
# Try the individual message cache
$titleKey = wfMemcKey( 'messages', 'individual', $title );
-   $entry = $this->mMemc->get( $titleKey );
+   $entry = $this->wanCache->get( $titleKey );
if ( $entry ) {
if ( substr( $entry, 0, 1 ) === ' ' ) {
$this->mCache[$code][$title] = $entry;
@@ -934,7 +934,7 @@
return false;
} else {
# Corrupt/obsolete entry, delete it
-   $this->mMemc->delete( $titleKey );
+   $this->wanCache->delete( $titleKey );
}
}
 
@@ -968,7 +968,7 @@
$message = false; // negative caching
} else {
$this->mCache[$code][$title] = ' ' . 
$message;
-   $this->mMemc->set( $titleKey, ' ' . 
$message, $this->mExpiry );
+   $this->wanCache->set( $titleKey, ' ' . 
$message, $this->mExpiry );
}
}
} else {
@@ -977,7 +977,7 @@
 
if ( $message === false ) { // negative caching
$this->mCache[$code][$title] = '!NONEXISTENT';
-   $this->mMemc->set( $titleKey, '!NONEXISTENT', 
$this->mExpiry );
+   $this->wanCache->set( $titleKey, '!NONEXISTENT', 
$this->mExpiry );
}
 
return $message;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I254ddcc9ffe7c49654788d6aabcca2ab7ed4f03f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improved getMainStashInstance() docs - change (mediawiki/core)

2015-08-28 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Improved getMainStashInstance() docs
..

Improved getMainStashInstance() docs

Change-Id: I49e5c112478927387244214917fb06907c22186f
---
M includes/objectcache/ObjectCache.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/234698/1

diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 069cd95..6019105 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -59,10 +59,11 @@
  *   Delete events are broadcasted to other DCs. See WANObjectCache for 
details.
  *
  * - ObjectCache::getMainStashInstance()
- *   Purpose: Storage.
+ *   Purpose: Ephemeral storage.
  *   Stored centrally within the local data-center.
  *   Changes are replicated to other DCs (eventually consistent).
  *   To retrieve the latest value (e.g. not from a slave), use 
BagOStuff:READ_LATEST.
+ *   This store may be subject to LRU style evictions.
  *
  * - wfGetCache( $cacheType )
  *   Get a specific cache type by key in $wgObjectCaches.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49e5c112478927387244214917fb06907c22186f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Tools: Replace reference to tools. in tool-uwsgi-python - change (operations/puppet)

2015-08-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Tools: Replace reference to tools. in tool-uwsgi-python
..

Tools: Replace reference to tools. in tool-uwsgi-python

Bug: T87387
Change-Id: I1c014526114046668abc4d74481a3b010f79eb90
---
M modules/toollabs/files/tool-uwsgi-python
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/234697/1

diff --git a/modules/toollabs/files/tool-uwsgi-python 
b/modules/toollabs/files/tool-uwsgi-python
index e1024ba..04005f7 100755
--- a/modules/toollabs/files/tool-uwsgi-python
+++ b/modules/toollabs/files/tool-uwsgi-python
@@ -5,8 +5,14 @@
 
 import portgrabber
 
+with open('/etc/wmflabs-project', 'r') as f:
+PREFIX = f.read().rstrip('\n')
+
 pwd_entry = pwd.getpwuid(os.getuid())  # Use uid as reserved port for eacht ool
-TOOL = re.sub(r'^tools.', '', pwd_entry.pw_name) # Tool users are of form 
tools.TOOLNAME
+TOOL = pwd_entry.pw_name
+# Tool users are of form tools.TOOLNAME.
+if TOOL.startswith(PREFIX + '.'):
+TOOL = TOOL[len(PREFIX) + 1:]
 
 # Attempt to get an open port
 port = portgrabber.get_open_port()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c014526114046668abc4d74481a3b010f79eb90
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] resourceloader: Consistently set state=ready after script ex... - change (mediawiki/core)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Consistently set state=ready after script 
execution (not before)
..

resourceloader: Consistently set state=ready after script execution (not before)

For the case of 'module.script' being an array, mw.loader already sets 
state=ready
after execution. For the cases of it being a function or string, we were setting
state=ready before execution.

This looks like it may have intended to prevent double execution where e.g.
some other module may need this module and see it has state 'loading' and start
executing it. However ResourceLoader doesn't expose execute(). The only code
calling execute() is code that also sets 'state=loading', or handlePending.

In fact, this early setting of "ready" could actually cause double execution.
Not of the current module, but of dependent modules. If a module's script loads
other modules that are cache hits, that could may trigger handlePending() which
will assume the current module to be ready, when it isn't.

Now that these code paths match, re-use the markModuleReady callback instead of
repeating this code.

Change-Id: I6b0542edb113d58b8f24cc8587e98ee88b514c55
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/234694/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index be7aefe..52c0379 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1210,9 +1210,8 @@
} else if ( 
$.isFunction( script ) ) {
// Pass jQuery 
twice so that the signature of the closure which wraps
// the script 
can bind both '$' and 'jQuery'.
-   
registry[module].state = 'ready';
script( $, $ );
-   handlePending( 
module );
+   
markModuleReady();
} else if ( typeof 
script === 'string' ) {
// Site and 
user modules are a legacy scripts that run in the global scope.
// This is 
transported as a string instead of a function to avoid needing
@@ -1221,14 +1220,12 @@
// 
Implicit dependency on the site module. Not real dependency because
// it 
should run after 'site' regardless of whether it succeeds or fails.

mw.loader.using( 'site' ).always( function () {
-   
registry[module].state = 'ready';

$.globalEval( script );
-   
handlePending( module );
+   
markModuleReady();
} );
} else {
-   
registry[module].state = 'ready';

$.globalEval( script );
-   
handlePending( module );
+   
markModuleReady();
}
}
} );

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

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

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


[MediaWiki-commits] [Gerrit] resourceloader: Remove redundant type-checks in internal code - change (mediawiki/core)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Remove redundant type-checks in internal code
..

resourceloader: Remove redundant type-checks in internal code

The private 'execute()' method only runs for modules that have been
implemented by mw.loader.implement, which already throws if 'messages'
or 'style' is set to a non-object value.

The execute() code for 'templates' already has this check removed.

Change-Id: I65b8a87500388d3d2ca6e495e1e50179639ba27a
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/234695/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 52c0379..d48621d 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1245,7 +1245,7 @@
registry[module].state = 'loading';
 
// Add localizations to message system
-   if ( $.isPlainObject( registry[module].messages 
) ) {
+   if ( registry[module].messages ) {
mw.messages.set( 
registry[module].messages );
}
 
@@ -1283,7 +1283,7 @@
// * back-compat: { : [url, ..] }
// * { "css": [css, ..] }
// * { "url": { : [url, ..] } }
-   if ( $.isPlainObject( registry[module].style ) 
) {
+   if ( registry[module].style ) {
for ( key in registry[module].style ) {
value = 
registry[module].style[key];
media = undefined;

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

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

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


[MediaWiki-commits] [Gerrit] resourceloader: Don't create empty objects for every module - change (mediawiki/core)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Don't create empty objects for every module
..

resourceloader: Don't create empty objects for every module

For modules without one or more of 'scripts', 'styles', 'messages'
and 'templates'; don't needlessly create empty placeholder objects.

Except for 'scripts', these were already handled conditionally.

Bug: T105162
Change-Id: Ic1b3b09474e0b50b438b111a4f62368ceab4e732
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/234696/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index d48621d..57420f2 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1227,6 +1227,9 @@

$.globalEval( script );

markModuleReady();
}
+   } else {
+   // Module 
without script
+   
markModuleReady();
}
} );
} catch ( e ) {
@@ -1783,10 +1786,10 @@
throw new Error( 'module 
already implemented: ' + module );
}
// Attach components
-   registry[module].script = script || [];
-   registry[module].style = style || {};
-   registry[module].messages = messages || 
{};
-   registry[module].templates = templates 
|| {};
+   registry[module].script = script || 
null;
+   registry[module].style = style || null;
+   registry[module].messages = messages || 
null;
+   registry[module].templates = templates 
|| null;
// The module may already have been 
marked as erroneous
if ( $.inArray( registry[module].state, 
['error', 'missing'] ) === -1 ) {
registry[module].state = 
'loaded';

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

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

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


[MediaWiki-commits] [Gerrit] resourceloader: Improve moduleRegistry documentation - change (mediawiki/core)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Improve moduleRegistry documentation
..

resourceloader: Improve moduleRegistry documentation

Rename local 'msgs' variable to 'messages' for consistency.

Change-Id: I5d035204ac5d22673a9b9a68ce9ea6cf23aaeba8
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 14 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/234693/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 6548896..be7aefe 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -711,25 +711,27 @@
/**
 * Mapping of registered modules.
 *
-* See #implement for exact details on support for 
script, style and messages.
+* See #implement and #execute for exact details on 
support for script, style and messages.
 *
 * Format:
 *
 * {
 * 'moduleName': {
-* // From startup mdoule
-* 'version': '' (Hash)
+* // From mw.loader.register() in startup 
module
+* 'version': '' (Hash)
 * 'dependencies': ['required.foo', 
'bar.also', ...], (or) function () {}
 * 'group': 'somegroup', (or) null
 * 'source': 'local', (or) 'anotherwiki'
 * 'skip': 'return !!window.Example', (or) 
null
+*
+* // Set from execute() or 
mw.loader.state()
 * 'state': 'registered', 'loaded', 
'loading', 'ready', 'error', or 'missing'
 *
-* // Added during implementation
+* // Optionally added at run-time by 
mw.loader.implement()
 * 'skipped': true
-* 'script': ...
-* 'style': ...
-* 'messages': { 'key': 'value' }
+* 'script': closure, array of urls, or 
string
+* 'style': { ... } (see #execute)
+* 'messages': { 'key': 'value', ... }
 * }
 * }
 *
@@ -1755,10 +1757,10 @@
 * The reason css strings are not concatenated 
anymore is bug 31676. We now check
 * whether it's safe to extend the stylesheet.
 *
-* @param {Object} [msgs] List of key/value 
pairs to be added to mw#messages.
+* @param {Object} [messages] List of key/value 
pairs to be added to mw#messages.
 * @param {Object} [templates] List of 
key/value pairs to be added to mw#templates.
 */
-   implement: function ( module, script, style, 
msgs, templates ) {
+   implement: function ( module, script, style, 
messages, templates ) {
// Validate input
if ( typeof module !== 'string' ) {
throw new Error( 'module must 
be of type string, not ' + typeof module );
@@ -1769,8 +1771,8 @@
if ( style && !$.isPlainObject( style ) 
) {
throw new Error( 'style must be 
of type object, not ' + typeof style );
}
-   if ( msgs && !$.isPlainObject( msgs ) ) 
{
-   throw new Error( 'msgs must be 
of type object, not a ' + typeof msgs );
+   if ( messages && !$.isPlainObject( 
messages ) ) {
+   throw new Error( 'messages must 
be of type object, not a ' + typeof messages );
}
if ( templates && !$.isPlainObject( 
templates ) ) {
throw new Error( 'templates 
must be of type object, not a ' + typeof templates );
@@ -1786,7 +1788,7 @

[MediaWiki-commits] [Gerrit] Tools: Replace reference to tools. in motd-tips.sh - change (operations/puppet)

2015-08-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Tools: Replace reference to tools. in motd-tips.sh
..

Tools: Replace reference to tools. in motd-tips.sh

Bug: T87387
Change-Id: I6a2544228eb7451058eb7cf1f59142d3d27f6310
---
M modules/toollabs/files/motd-tips.sh
1 file changed, 13 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/234692/1

diff --git a/modules/toollabs/files/motd-tips.sh 
b/modules/toollabs/files/motd-tips.sh
index 2f19d56..707e191 100644
--- a/modules/toollabs/files/motd-tips.sh
+++ b/modules/toollabs/files/motd-tips.sh
@@ -15,18 +15,22 @@
 return
 fi
 
-# Don't display tips for root and tool accounts.
-if [ $UID -eq 0 ] || [ "${USER:0:6}" = "tools." ]; then
-return
-fi
-
 # Check shell level.
 if [ "$SHLVL" -gt 1 ]; then
 return
 fi
 
+# Read project name.
+labsproject="$(cat /etc/wmflabs-project)"
+
+# Don't display tips for root and tool accounts.
+if [ $UID -eq 0 ] || [ "${USER:0:$((${#labsproject} + 1))}" = "$labsproject." 
]; then
+unset labsproject
+return
+fi
+
 # If user is sysadmin print the sysadmin motd instead.
-if groups | fgrep -qw tools.admin; then
+if groups | fgrep -qw -- "$labsproject.admin"; then
 if [ -f /etc/motd.sysadmin ]; then
 echo
 echo
@@ -34,7 +38,10 @@
 fi
 
 # We don't want to show tips to sysadmins.
+unset labsproject
 return
 fi
 
+unset labsproject
+
 echo -e "\n\033[0;1;4mDid you know\033[0m that `shuf -n 1 
/data/project/.system/tips`\n"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a2544228eb7451058eb7cf1f59142d3d27f6310
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] parse.js: Fix broken useBatchAPI flag - change (mediawiki...parsoid)

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

Change subject: parse.js: Fix broken useBatchAPI flag
..


parse.js: Fix broken useBatchAPI flag

Change-Id: I7f394a9e59ec71abb2cd17d7e0ce793476905c95
---
M lib/mediawiki.Util.js
M tests/parse.js
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/lib/mediawiki.Util.js b/lib/mediawiki.Util.js
index 8946ab9..2193b2d 100644
--- a/lib/mediawiki.Util.js
+++ b/lib/mediawiki.Util.js
@@ -223,7 +223,7 @@
parsoidConfig.linterAPI = null;
}
if (opts.useBatchAPI !== null) {
-   parsoidConfig.useBatchAPI = opts.useBatchAPI;
+   parsoidConfig.useBatchAPI = 
Util.booleanOption(opts.useBatchAPI);
}
return parsoidConfig;
},
diff --git a/tests/parse.js b/tests/parse.js
index 69438df..f014900 100755
--- a/tests/parse.js
+++ b/tests/parse.js
@@ -127,7 +127,9 @@
},
'useBatchAPI': {
description: 'Turn on/off the API batching system',
-   'boolean': true,
+   // Since I picked a null default (to let the default config 
setting be the default),
+   // I cannot make this a boolean option.
+   'boolean': false,
'default': null,
},
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f394a9e59ec71abb2cd17d7e0ce793476905c95
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WIP worldpay ESOP - change (mediawiki...DonationInterface)

2015-08-28 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: WIP worldpay ESOP
..

WIP worldpay ESOP

This is currently a mess.

Change-Id: Ie2f5e8fb0a38081872ca8bd934b10f55ad34176b
---
M DonationInterface.php
M DonationInterfaceFormSettings.php
A worldpay_gateway/forms/js/iframe.js
M worldpay_gateway/worldpay.adapter.php
M worldpay_gateway/worldpay_gateway.body.php
5 files changed, 92 insertions(+), 4 deletions(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index fc2ffde..ffb229b 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -857,6 +857,13 @@
'remoteExtPath' => 'DonationInterface/astropay_gateway'
 );
 
+$wgResourceModules['ext.donationinterface.worldpay.iframejs'] = array (
+   'scripts' => 'iframe.js',
+   'dependencies' => 'di.form.core.validate',
+   'localBasePath' => __DIR__ . '/worldpay_gateway/forms/js',
+   'remoteExtPath' => 'DonationInterface/worldpay_gateway/forms/js'
+);
+
 // load any rapidhtml related resources
 require_once( __DIR__ . '/gateway_forms/rapidhtml/RapidHtmlResources.php' );
 
diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index 61894b8..d0da8ad 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -533,6 +533,16 @@
'selection_weight' => 10
 );
 
+// Worldpay ESOP feat iframe
+$forms_whitelist['wp-if'] = array(
+   'file' => __DIR__ . '/gateway_forms/mustache/index.html.mustache',
+   'gateway' => 'worldpay',
+   'countries' => array( '+' => array( 'AU', 'BE', 'CA', 'FR', 'GB', 'IL', 
'NZ', 'US' ) ),
+   'currencies' => array( '+' => 'ALL' ),
+   'payment_methods' => array( 'cc' => 'ALL' ),
+   'selection_weight' => 10
+);
+
 /*
  * Worldpay Form Tests *
  */
diff --git a/worldpay_gateway/forms/js/iframe.js 
b/worldpay_gateway/forms/js/iframe.js
new file mode 100644
index 000..b00d5c7
--- /dev/null
+++ b/worldpay_gateway/forms/js/iframe.js
@@ -0,0 +1,67 @@
+$( document ).ready( function() {
+   var form = $( '#payment-form' )[0];
+   // If a submethod is already selected on page load, show the continue 
button
+   if ( $( 'input[name="payment_submethod"]:checked' ).length > 0 ) {
+   $( '#paymentContinue' ).show();
+   }
+
+   // Submit on submethod selection if valid, otherwise show continute 
button.
+   $( 'input[name="payment_submethod"]' ).on( 'change', function() {
+   if ( window.validate_form( form ) ) {
+   submitForm();
+   } else {
+   $( '#paymentContinue' ).show();
+   }
+   } );
+
+   $( '#paymentContinueBtn' ).click( function() {
+   if ( window.validate_form( form ) ) {
+   submitForm();
+   }
+   });
+
+   function submitForm() {
+   $( '#overlay' ).show();
+
+   var postdata = {
+   action: 'di_wp_validate',
+   format: 'json',
+   amount: $( '#amount' ).val(),
+   fname: $( '#fname' ).val(),
+   lname: $( '#lname' ).val(),
+   emailAdd: $( '#email' ).val(),
+   street: $( '#street' ).val(),
+   city: $( '#city' ).val(),
+   state: $( '#state' ).val(),
+   };
+
+   $.ajax({
+   url: mw.util.wikiScript( 'api' ),
+   data: postdata,
+   dataType: 'json',
+   type: 'POST',
+   success: function ( data ) {
+   if ( data.errors ) {
+   // TODO: This sucks; improve it
+   // Form fields have errors; each subkey 
in this array
+   // corresponds to a form field with an 
error
+   var errors = [];
+   $.each( data.errors, function ( idx, 
str ) {
+   errors.push( str );
+   });
+   window.alert( errors.join( '\n' ) );
+   $( '#paymentSubmitBtn' 
).removeClass('disabled');
+   } else if ( data.ottResult ) {
+   console.log( data.ottResult );
+   } else {
+   window.alert( mw.msg( 
'donate_interface-error-msg-general' ) );
+   $( '

[MediaWiki-commits] [Gerrit] Tools: Replace reference to tools. in project-make-access - change (operations/puppet)

2015-08-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Tools: Replace reference to tools. in project-make-access
..

Tools: Replace reference to tools. in project-make-access

Bug: T87387
Change-Id: Ie1af9bc9d135310a405c6b41e62794771a5215c6
---
M modules/toollabs/files/project-make-access
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/234690/1

diff --git a/modules/toollabs/files/project-make-access 
b/modules/toollabs/files/project-make-access
index bee0189..df1951a 100644
--- a/modules/toollabs/files/project-make-access
+++ b/modules/toollabs/files/project-make-access
@@ -10,4 +10,4 @@
 cat $host
   fi
 done)
-echo '-:ALL EXCEPT (tools.admin) root:ALL'
+echo "-:ALL EXCEPT ($(cat /etc/wmflabs-project).admin) root:ALL"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1af9bc9d135310a405c6b41e62794771a5215c6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] Tools: Replace reference to tools. in class toollabs::checker - change (operations/puppet)

2015-08-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Tools: Replace reference to tools. in class toollabs::checker
..

Tools: Replace reference to tools. in class toollabs::checker

Bug: T87387
Change-Id: I6bc7c52e502440d03176b069c53a6b3161446adb
---
M modules/toollabs/manifests/checker.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/toollabs/manifests/checker.pp 
b/modules/toollabs/manifests/checker.pp
index 8886000..711669d 100644
--- a/modules/toollabs/manifests/checker.pp
+++ b/modules/toollabs/manifests/checker.pp
@@ -23,7 +23,7 @@
 
 file { '/run/toolschecker':
 ensure => directory,
-owner  => 'tools.toolschecker',
+owner  => "${::labsproject}.toolschecker",
 group  => 'www-data',
 mode   => '0755',
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bc7c52e502440d03176b069c53a6b3161446adb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] Tools: Replace reference to tools. in class toollabs - change (operations/puppet)

2015-08-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Tools: Replace reference to tools. in class toollabs
..

Tools: Replace reference to tools. in class toollabs

Bug: T87387
Change-Id: I8e173a7bf6886a0b33eccd53439e1e4b28d2b957
---
M modules/toollabs/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index d67ef99..3fa278c 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -42,7 +42,7 @@
 file { $sysdir:
 ensure  => directory,
 owner   => 'root',
-group   => 'tools.admin',
+group   => "${::labsproject}.admin",
 mode=> '2775',
 require => Mount['/data/project'],
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e173a7bf6886a0b33eccd53439e1e4b28d2b957
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] Removed pointless Title::GAID_FOR_UPDATE for altBaseRevId field - change (mediawiki...FlaggedRevs)

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

Change subject: Removed pointless Title::GAID_FOR_UPDATE for altBaseRevId field
..


Removed pointless Title::GAID_FOR_UPDATE for altBaseRevId field

* This is shown on the edit form on GETs and is already under
  a branch of code where the current revision is in the slave
  DB, so obviously previous ones will be visible too.

Bug: T92357
Change-Id: I1b18dc54b5d6029cd104a760369c267abb71f170
---
M frontend/FlaggablePageView.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php
index fba479c..5c5d54e 100755
--- a/frontend/FlaggablePageView.php
+++ b/frontend/FlaggablePageView.php
@@ -1989,7 +1989,7 @@
# We are undoing all edits *after* some rev ID 
(undoafter).
# If undoafter is not given, then it is the 
previous rev ID.
$revId = $request->getInt( 'undoafter',
-   
$article->getTitle()->getPreviousRevisionID( $latestId, Title::GAID_FOR_UPDATE 
) );
+   
$article->getTitle()->getPreviousRevisionID( $latestId ) );
} else {
$revId = $request->getInt( 'altBaseRevId' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b18dc54b5d6029cd104a760369c267abb71f170
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Force use of IPv4 addresses with ssh and rsync - change (mediawiki...scap)

2015-08-28 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Force use of IPv4 addresses with ssh and rsync
..

Force use of IPv4 addresses with ssh and rsync

Waiting for an '' lookup to timeout before falling back to an 'A'
request slows down creating initial connections.

Change-Id: I6a7a3b8368736d4620311a9419402f02e770073d
---
M scap/ssh.py
M scap/tasks.py
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap 
refs/changes/87/234687/1

diff --git a/scap/ssh.py b/scap/ssh.py
index e9f4656..6dd0648 100644
--- a/scap/ssh.py
+++ b/scap/ssh.py
@@ -18,7 +18,13 @@
 from . import utils
 
 
-SSH = ('/usr/bin/ssh', '-oBatchMode=yes', '-oSetupTimeout=10', '-F/dev/null')
+SSH = (
+'/usr/bin/ssh',
+'-4',
+'-oBatchMode=yes',
+'-oSetupTimeout=10',
+'-F/dev/null'
+)
 
 
 class Job(object):
diff --git a/scap/tasks.py b/scap/tasks.py
index bbe89ec..62cf5e4 100644
--- a/scap/tasks.py
+++ b/scap/tasks.py
@@ -24,6 +24,7 @@
 
 DEFAULT_RSYNC_ARGS = [
 '/usr/bin/rsync',
+'--ipv4',
 '--archive',
 '--delete-delay',
 '--delay-updates',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a7a3b8368736d4620311a9419402f02e770073d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] parse.js: Fix broken useBatchAPI flag - change (mediawiki...parsoid)

2015-08-28 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: parse.js: Fix broken useBatchAPI flag
..

parse.js: Fix broken useBatchAPI flag

Change-Id: I7f394a9e59ec71abb2cd17d7e0ce793476905c95
---
M lib/mediawiki.Util.js
M tests/parse.js
2 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/lib/mediawiki.Util.js b/lib/mediawiki.Util.js
index 8946ab9..2193b2d 100644
--- a/lib/mediawiki.Util.js
+++ b/lib/mediawiki.Util.js
@@ -223,7 +223,7 @@
parsoidConfig.linterAPI = null;
}
if (opts.useBatchAPI !== null) {
-   parsoidConfig.useBatchAPI = opts.useBatchAPI;
+   parsoidConfig.useBatchAPI = 
Util.booleanOption(opts.useBatchAPI);
}
return parsoidConfig;
},
diff --git a/tests/parse.js b/tests/parse.js
index 69438df..f014900 100755
--- a/tests/parse.js
+++ b/tests/parse.js
@@ -127,7 +127,9 @@
},
'useBatchAPI': {
description: 'Turn on/off the API batching system',
-   'boolean': true,
+   // Since I picked a null default (to let the default config 
setting be the default),
+   // I cannot make this a boolean option.
+   'boolean': false,
'default': null,
},
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f394a9e59ec71abb2cd17d7e0ce793476905c95
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] Add link to developer app guidelines from dumps pages footer - change (operations/puppet)

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

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

Change subject: Add link to developer app guidelines from dumps pages footer
..

Add link to developer app guidelines from dumps pages footer

Bug: T110742
Change-Id: I76090696063b837aeff66b5124289336c5859641
---
M modules/dataset/files/html/public_index.html
M modules/snapshot/files/dumps/templates/download-index.html
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/234685/1

diff --git a/modules/dataset/files/html/public_index.html 
b/modules/dataset/files/html/public_index.html
index 83dd5a9..e27de73 100644
--- a/modules/dataset/files/html/public_index.html
+++ b/modules/dataset/files/html/public_index.html
@@ -151,6 +151,8 @@

Legal

+   App Guidelines
+   https://wikimediafoundation.org/wiki/Developer_app_guidelines";>Guidelines 
for developers on how to properly reuse Wikimedia data, trademarks, and 
content.
Copyright licensing
Copyright
licensing information for these dumps.
diff --git a/modules/snapshot/files/dumps/templates/download-index.html 
b/modules/snapshot/files/dumps/templates/download-index.html
index dfe8c65..65570a5 100644
--- a/modules/snapshot/files/dumps/templates/download-index.html
+++ b/modules/snapshot/files/dumps/templates/download-index.html
@@ -132,6 +132,8 @@
 
 Legal
 
+App Guidelines
+https://wikimediafoundation.org/wiki/Developer_app_guidelines";>Guidelines 
for developers on how to properly reuse Wikimedia data, trademarks, and 
content.
 Copyright licensing
 Copyright
 licensing information for these dumps.

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

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

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


[MediaWiki-commits] [Gerrit] Use ffmpeg instead of avconv on labs beta - change (operations/mediawiki-config)

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

Change subject: Use ffmpeg instead of avconv on labs beta
..


Use ffmpeg instead of avconv on labs beta

The ffmpeg package is updated with VP9 and Opus support
in our Trusty config, whereas avconv is an older version
provided by Ubuntu.

Bug: T110707
Change-Id: I250fe3374468a781ea269fbe49047164f1f19f7a
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 16021eb..263b184 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -156,6 +156,7 @@
'url' => '//commons.wikimedia.beta.wmflabs.org/w/api.php'
));
$wgEnableTranscode = true; //enable transcoding on labs
+   $wgFFmpegLocation = '/usr/bin/ffmpeg'; // use new ffmpeg build w/ VP9 & 
Opus support
 }
 
 if ( $wgDBname == "testwiki" ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I250fe3374468a781ea269fbe49047164f1f19f7a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove some dead code from the Sanitizer - change (mediawiki...parsoid)

2015-08-28 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Remove some dead code from the Sanitizer
..

Remove some dead code from the Sanitizer

 * Superseded by the WikiConfig's hasValidProtocol.

Change-Id: I7eac48216edfc10d79d1c23236d297d22241ba42
---
M lib/ext.core.Sanitizer.js
1 file changed, 0 insertions(+), 20 deletions(-)


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

diff --git a/lib/ext.core.Sanitizer.js b/lib/ext.core.Sanitizer.js
index 06cc10c..cc4b84c 100644
--- a/lib/ext.core.Sanitizer.js
+++ b/lib/ext.core.Sanitizer.js
@@ -36,25 +36,6 @@
html5Mode: true,
},
 
-   // Accepted external URL protocols
-   validUrlProtocols: [
-   'http://',
-   'https://',
-   'ftp://',
-   'irc://',
-   'ircs://',  // T30503
-   'gopher://',
-   'telnet://', // Well if we're going to support the above.. -ævar
-   'nntp://', // T5808 RFC 1738
-   'worldwind://',
-   'mailto:',
-   'news:',
-   'svn://',
-   'git://',
-   'mms://',
-   '//',  // for protocol-relative URLs
-   ],
-
// Character entity aliases accepted by MediaWiki
htmlEntityAliases: {
'רלמ': 'rlm',
@@ -569,7 +550,6 @@
// self-closing version might be legal.
this.noEndTagSet = new Set(['br']);
 
-   this.validProtocolsRE = new RegExp("^(" + 
this.validUrlProtocols.join('|') + ")$", "i");
// |/?[^/])[^\\s]+$");
this.cssDecodeRE = computeCSSDecodeRegexp();
this.attrWhiteList = computeAttrWhiteList(this.globalConfig);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7eac48216edfc10d79d1c23236d297d22241ba42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] Fix an edge case in roundtripping unedited interwiki links - change (mediawiki...parsoid)

2015-08-28 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Fix an edge case in roundtripping unedited interwiki links
..

Fix an edge case in roundtripping unedited interwiki links

Change-Id: Icb0810028a202d664332e95c716d008aad547dde
---
M lib/wts.LinkHandler.js
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/lib/wts.LinkHandler.js b/lib/wts.LinkHandler.js
index 92e1afd..df068f9 100644
--- a/lib/wts.LinkHandler.js
+++ b/lib/wts.LinkHandler.js
@@ -201,9 +201,11 @@
localPrefix += oldPrefix[1] + ':';
}
 
-   // should we preserve the old prefix?
-   if (oldPrefix && (
-   oldPrefix[1].toLowerCase() === 
interWikiMatch[0].toLowerCase() ||
+   if (target.fromsrc && !target.notmodified) {
+   /* jshint noempty: false */
+   // Leave the target alone!
+   } else if (oldPrefix &&  // should we preserve the old 
prefix?
+   (oldPrefix[1].toLowerCase() === 
interWikiMatch[0].toLowerCase() ||
// Check if the old prefix mapped to 
the same URL as
// the new one. Use the old one if 
that's the case.
// Example: [[w:Foo]] vs. [[:en:Foo]]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb0810028a202d664332e95c716d008aad547dde
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] Add pronunciation to lead response - change (mediawiki...mobileapps)

2015-08-28 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Add pronunciation to lead response
..

Add pronunciation to lead response

Provide a link to the audio file for the pronunciation of the article
title when available.

Bug: T108371
Change-Id: Ib7bdd26e71b58737982f7458b54f2506297eae27
---
M lib/transforms.js
M routes/mobile-html-sections.js
M spec.yaml
M test/features/mobile-html-sections-lead/pagecontent.js
4 files changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/82/234682/1

diff --git a/lib/transforms.js b/lib/transforms.js
index 8aee968..3311096 100644
--- a/lib/transforms.js
+++ b/lib/transforms.js
@@ -54,6 +54,11 @@
 return mUtil.defaultVal(mUtil.filterEmpty(table));
 }
 
+function parsePronunciation(doc) {
+var anchor = doc.querySelector('span.IPA a[href]');
+return anchor && { 'url': anchor.href };
+}
+
 function moveFirstParagraphUpInLeadSection(text) {
 var doc = domino.createDocument(text);
 // TODO: mhurd: feel free to add your lead section magic here
@@ -95,6 +100,7 @@
 runDomTransforms: runDomTransforms,
 moveFirstParagraphUpInLeadSection: moveFirstParagraphUpInLeadSection,
 parseInfobox: parseInfobox,
+parsePronunciation: parsePronunciation,
 
 // visible for testing only:
 _rmBracketSpans: rmBracketSpans
diff --git a/routes/mobile-html-sections.js b/routes/mobile-html-sections.js
index 00f501e..e0f8ebe 100644
--- a/routes/mobile-html-sections.js
+++ b/routes/mobile-html-sections.js
@@ -98,6 +98,7 @@
 })),
 media: input.media,
 infobox: transforms.parseInfobox(lead),
+pronunciation: transforms.parsePronunciation(lead),
 sections: buildLeadSections(input.page.sections)
 };
 }
diff --git a/spec.yaml b/spec.yaml
index 8d56234..d2f88c6 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -132,6 +132,28 @@
 items: [ /.+/ ]
   infobox: [ [ /.+/ ] ]
   sections: [ /.+/ ]
+- title: retrieve lead section of en.wp Barack Obama page via 
mobile-html-sections-lead
+  request:
+params:
+  title: Barack_Obama
+  response:
+status: 200
+headers:
+  content-type: application/json
+body:
+  id: /.+/
+  revision: /.+/
+  lastmodified: /.+/
+  displaytitle: /.+/
+  protection: /.+/
+  editable: /.+/
+  languagecount: /.+/
+  media:
+items: [ /.+/ ]
+  infobox: [ [ /.+/ ] ]
+  pronunciation:
+url: /.+/
+  sections: [ /.+/ ]
   /{domain}/v1/page/mobile-html-sections-remaining/{title}:
 get:
   tags:
diff --git a/test/features/mobile-html-sections-lead/pagecontent.js 
b/test/features/mobile-html-sections-lead/pagecontent.js
index b66548f..876ef73 100644
--- a/test/features/mobile-html-sections-lead/pagecontent.js
+++ b/test/features/mobile-html-sections-lead/pagecontent.js
@@ -78,6 +78,14 @@
 assert.ok(lead.media.items.length > 3, 'Expected many media 
items');
 });
 });
+it('Barack Obama should have a pronunciation', function() {
+return preq.get({ uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-html-sections-lead/Barack_Obama' })
+.then(function(res) {
+var lead = res.body;
+assert.deepEqual(res.status, 200);
+assert.deepEqual(lead.pronunciation.url, 
'/wiki/File:En-us-Barack-Hussein-Obama.ogg');
+});
+});
 it('en Main page should have at least one image', function() {
 return preq.get({ uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-html-sections-lead/Main_Page' })
 .then(function(res) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7bdd26e71b58737982f7458b54f2506297eae27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

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


[MediaWiki-commits] [Gerrit] Use ffmpeg instead of avconv on labs beta - change (operations/mediawiki-config)

2015-08-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

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

Change subject: Use ffmpeg instead of avconv on labs beta
..

Use ffmpeg instead of avconv on labs beta

The ffmpeg package is updated with VP9 and Opus support
in our Trusty config, whereas avconv is an older version
provided by Ubuntu.

Bug: T110707
Change-Id: I250fe3374468a781ea269fbe49047164f1f19f7a
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 16021eb..263b184 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -156,6 +156,7 @@
'url' => '//commons.wikimedia.beta.wmflabs.org/w/api.php'
));
$wgEnableTranscode = true; //enable transcoding on labs
+   $wgFFmpegLocation = '/usr/bin/ffmpeg'; // use new ffmpeg build w/ VP9 & 
Opus support
 }
 
 if ( $wgDBname == "testwiki" ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I250fe3374468a781ea269fbe49047164f1f19f7a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Send metrics to statsv on demand - change (performance/WebPageTest)

2015-08-28 Thread Phedenskog (Code Review)
Phedenskog has uploaded a new change for review.

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

Change subject: Send metrics to statsv on demand
..

Send metrics to statsv on demand

Old default setting automatically sent data to statsv,
it's better to actually configure when you want to do it.
This make sure you don't accidently send test data to statsv.

Change-Id: I219e64f898b924681440c4edadaa9a5ced90f167
---
M lib/cli.js
M lib/index.js
M lib/util.js
M test/utilTest.js
4 files changed, 11 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/performance/WebPageTest 
refs/changes/80/234680/1

diff --git a/lib/cli.js b/lib/cli.js
index 7eabd16..c3f0d76 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -31,6 +31,7 @@
 console.log(' Thin wrapper for the WebPageTest API that sends metrics to 
statsv.\n');
 console.log(' Usage: ' + process.argv[1] + ' [options] [URL/file]');
 console.log(' Supply a file when you want to script WebPageTest 
https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting.\n')
+console.log(' To send the metrics to statsv, make sure to add 
--sendMetrics true to your run.');
 console.log(' Options:');
 console.log('   --webPageTestKey The secret key for the WebPageTest 
instance [required]');
 console.log('   --location   The location and browser to use, 
check http://wpt.wmftest.org/getLocations.php [us-west-2:Chrome]');
@@ -40,7 +41,7 @@
 console.log('   --timeoutThe timeout in seconds until we end 
the test [1200]');
 console.log('   --userStatus Is the user logged in or not? Used in 
the namespace (anonymous|authenticated) [anonymous]');
 console.log('   --endpoint   Where to send the statsv metrics 
[https://www.wikimedia.org/beacon/statsv]');
-console.log('   --dryRun Send metrics to statsv or not. Set to 
anything if you don\'t wanna send metrics.');
+console.log('   --sendMetricsSend metrics to statsv or not. Set to 
anything if you want to send the metrics.');
 console.log('   --customMetrics  A file with custom WPT metrics. 
https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/custom-metrics
 ')
 console.log('   --verboseLog the full JSON from WebPageTest to 
the console\n');
 console.log(' For a full list of options, check 
https://github.com/marcelduran/webpagetest-api#test-works-for-runtest-method-only\n');
@@ -56,6 +57,11 @@
   console.error('Not a valid user status:' + argv.userStatus + ' Needs to 
be one of [' + AVAILIBLE_USER_STATUS + ']');
   return false;
 }
+
+if (!argv.sendMetrics) {
+  console.log('Missing parameter --sendMetrics true - will not send any 
metrics to statsv');
+}
+
 return true;
   },
   getInputURLorFile: function(arg) {
diff --git a/lib/index.js b/lib/index.js
index dcf938a..0bcbde7 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -64,7 +64,7 @@
 }
 
 var collectedMetrics = util.collectMetrics(data);
-if (!argv.dryRun) {
+if (argv.sendMetrics) {
   util.sendMetrics(collectedMetrics, endpoint);
 } else {
   console.log('Dry run:' + collectedMetrics);
diff --git a/lib/util.js b/lib/util.js
index bd8b950..36c7fd2 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -69,7 +69,7 @@
 };
 
 Object.keys(argv).forEach(function(param) {
-  if (['webPageTestKey', 'webPageTestHost', '_', 'verbose', 'userStatus', 
'dryRun', 'customMetrics'].indexOf(param) === -1) {
+  if (['webPageTestKey', 'webPageTestHost', '_', 'verbose', 'userStatus', 
'sendMetrics', 'customMetrics'].indexOf(param) === -1) {
 wptOptions[param] = argv[param];
   }
 });
diff --git a/test/utilTest.js b/test/utilTest.js
index bfd54c4..6aa1311 100644
--- a/test/utilTest.js
+++ b/test/utilTest.js
@@ -39,14 +39,14 @@
 
   it('Parameters specific for wptstatsv should be cleaned out from WebPageTest 
options', function() {
 
-var keysToBeRemoved = ['webPageTestKey', 'webPageTestHost', '_', 
'verbose', 'userStatus', 'dryRun', 'customMetrics'];
+var keysToBeRemoved = ['webPageTestKey', 'webPageTestHost', '_', 
'verbose', 'userStatus', 'sendMetrics', 'customMetrics'];
 var args = {
   webPageTestKey: 'aSupERSecrEtKey',
   webPageTestHost: 'http://our.wpt.org',
   _: ['all', 'extra', 'args'],
   verbose: true,
   userStatus: 'anonymous',
-  dryRun: true,
+  sendMetrics: true,
   customMetrics: 'javascript that collects custom metrics'
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I219e64f898b924681440c4edadaa9a5ced90f167
Gerrit-PatchSet: 1
Gerrit-Project: performance/WebPageTest
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 

___
MediaWiki-commits mailing list
Med

[MediaWiki-commits] [Gerrit] VisualEditorWidget: Guard against setting selection to -1 - change (mediawiki...Flow)

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

Change subject: VisualEditorWidget: Guard against setting selection to -1
..


VisualEditorWidget: Guard against setting selection to -1

Bug: T110393
Change-Id: I5d65c2eba3f819bb9aa32cf62a678c0756b2591a
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
index fe25ed6..0e28cfa 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
@@ -146,7 +146,9 @@
var data = this.target.surface.getModel().getDocument().data,
cursorPos = data.getNearestContentOffset( 
data.getLength(), -1 );
 
-   this.target.surface.getModel().setLinearSelection( new 
ve.Range( cursorPos ) );
+   if ( cursorPos !== -1 ) {
+   this.target.surface.getModel().setLinearSelection( new 
ve.Range( cursorPos ) );
+   }
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d65c2eba3f819bb9aa32cf62a678c0756b2591a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mattflaschen 
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 project namespace name and favicon on affcom.wikimedi... - change (operations/mediawiki-config)

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

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

Change subject: Update project namespace name and favicon on 
affcom.wikimedia.org
..

Update project namespace name and favicon on affcom.wikimedia.org

Bug: T41482
Change-Id: Idb9a17237c103013ef76a0aac8db58722cf40cae
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ddc58ba..f359de2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2022,7 +2022,7 @@
'cawiktionary' => 'Viccionari',
'cewiki' => 'Википеди', // T49574
'chairwiki' => 'Project',
-   'chapcomwiki' => 'Chapcom',
+   'chapcomwiki' => 'Affcom',
'checkuserwiki' => 'Project', // T30781
'ckbwiki' => 'ویکیپیدیا',
'collabwiki' => 'Project',
@@ -2773,6 +2773,9 @@
'Wiktionary_talk' => NS_PROJECT_TALK,
'Příloha_diskuse' => 101,
),
+   '+chapcomwiki' => array(
+   'Chapcom' => NS_PROJECT
+   ),
'+cuwiki' => array(
'Шаблон' => NS_TEMPLATE,
'Категория' => NS_CATEGORY,

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

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

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


[MediaWiki-commits] [Gerrit] WTS support for localized ISBN magic links - change (mediawiki...parsoid)

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

Change subject: WTS support for localized ISBN magic links
..


WTS support for localized ISBN magic links

"Be generous in what you accept."

Visual Editor also likes to encode title characters with
`encodeURIComponent`, which encodes : and /, so handle that as well.
(We use `decodeURI` to handle other weird URI encoded characters we
might get given, but `decodeURI` doesn't decode : and / so we still
need to handle those explicitly.)

Bug: T110037
Change-Id: I5d000d8b63dafdfe0a2753069d3f0ac5b03b8829
---
M lib/mediawiki.ApiRequest.js
M lib/mediawiki.WikiConfig.js
M lib/wts.LinkHandler.js
3 files changed, 51 insertions(+), 14 deletions(-)

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



diff --git a/lib/mediawiki.ApiRequest.js b/lib/mediawiki.ApiRequest.js
index aefb44f..ddeb0d7 100644
--- a/lib/mediawiki.ApiRequest.js
+++ b/lib/mediawiki.ApiRequest.js
@@ -865,6 +865,7 @@
'interwikimap',
'languages',
'protocols',
+   'specialpagealiases',
];
var apiargs = {
format: 'json',
diff --git a/lib/mediawiki.WikiConfig.js b/lib/mediawiki.WikiConfig.js
index 983f3ab..23bdbc5 100644
--- a/lib/mediawiki.WikiConfig.js
+++ b/lib/mediawiki.WikiConfig.js
@@ -101,6 +101,7 @@
};
 
this._categoryRegexpSource = "Category";
+   this._specialAliases = ['Special'];
 
// Namespace IDs that have subpages enabled.
this.namespacesWithSubpages = {};
@@ -108,6 +109,9 @@
nsid = nkeys[nx];
name = names[nsid];
this.namespaceNames[nsid] = name['*'];
+   if (nsid === '-1' && name['*'] !== 'Special') {
+   this._specialAliases.push(name['*']);
+   }
if (nsid === "14" && name['*'] !== "Category") {
this._categoryRegexpSource += "|" + name['*'];
}
@@ -131,6 +135,9 @@
var aliases = resultConf.namespacealiases;
for (var ax = 0; ax < aliases.length; ax++) {

this.namespaceIds[Util.normalizeNamespaceName(aliases[ax]['*'])] = 
aliases[ax].id;
+   if (aliases[ax].id === -1) {
+   this._specialAliases.push(aliases[ax]['*']);
+   }
}
 
// The interwikiMap maps prefixes to the corresponding information
@@ -280,17 +287,46 @@
);
 
// Special page names on this wiki, indexed by aliases.
-   this.specialPages = {};
-   // This path isn't necessary because we don't need special page aliases.
-   // Before you uncomment this, make sure you actually need it, and be 
sure to
-   // also add 'specialpagealiases' back into the API request for the 
config.
-   //  var specials = resultConf.specialpagealiases;
-   //  for ( var sx = 0; sx < specials.length; sx++ ) {
-   //  aliases = specials[sx].aliases;
-   //  for ( var sax = 0; sax < aliases.length; sax++ ) {
-   //  this.specialPages[aliases[sax]] = specials[sx].realname;
-   //  }
-   //  }
+   // We need these to recognize localized ISBN magic links.
+   var specialPages = this.specialPages = new Map();
+   (resultConf.specialpagealiases || []).forEach(function(special) {
+   specialPages.set(
+   special.realname,
+   new RegExp(
+   special.aliases.map(function(a) {
+   // Treat space and underscore 
interchangeably, and use
+   // escapeRegExp to protect special 
characters in the title
+   return a.split(/[ 
_]/g).map(Util.escapeRegExp).join('[ _]');
+   }).join('|')
+   )
+   );
+   });
+
+   // Special case for localized ISBN ExtResourceMatcher
+   var isbnRegExp = new RegExp(
+   '^(?:(?:[.][.]?/)*)' +
+   '(?:' + this._specialAliases.map(function(a) {
+   return a.split(/[ _]/g).map(Util.escapeRegExp).join('[ 
_]');
+   }).join('|') + ')(?:%3[Aa]|:)(?:' +
+   (this.specialPages.get('Booksources') || /Booksources/).source +
+   ')(?:%2[Ff]|/)(\\d+[Xx]?)$',
+   // Strictly speaking, only the namespace is case insensitive.
+   // But we're feeling generous.
+   'i'
+   );
+   var superMatch = 
WikiConfig.prototype.ExtResourceURLPatternMatcher.match;
+   this.ExtResourceURLPatternMatcher = {
+   match: function(s) {
+   var r = superMatch(s);
+   if (!r) {
+   var m = s.match(isbnRegExp);
+   if (m) {

[MediaWiki-commits] [Gerrit] resourceloader: Remove global startUp() callback - change (mediawiki/core)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Remove global startUp() callback
..

resourceloader: Remove global startUp() callback

Instead of a hardcoded JSONP-style global callback, use script
load handlers. This uses the same logic as jQuery uses internally
(ajax/script.js), which we call inside mediawiki.js. Inline those
two lines here since this the code is what loads jQuery itself.

Bug: T39894
Change-Id: I02b0d16a6ec3081dc551bfd9c3ae652707b7edcf
---
M resources/Resources.php
D resources/src/mediawiki/mediawiki.startUp.js
M resources/src/startup.js
3 files changed, 42 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/234678/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 7794911..e21deb9 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -827,7 +827,6 @@
'resources/lib/phpjs-sha1/sha1.js',
'resources/src/mediawiki/mediawiki.js',
'resources/src/mediawiki/mediawiki.errorLogger.js',
-   'resources/src/mediawiki/mediawiki.startUp.js',
),
'debugScripts' => 'resources/src/mediawiki/mediawiki.log.js',
'targets' => array( 'desktop', 'mobile' ),
diff --git a/resources/src/mediawiki/mediawiki.startUp.js 
b/resources/src/mediawiki/mediawiki.startUp.js
deleted file mode 100644
index 028784c..000
--- a/resources/src/mediawiki/mediawiki.startUp.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * Auto-register from pre-loaded startup scripts
- */
-( function ( $ ) {
-   'use strict';
-
-   if ( $.isFunction( window.startUp ) ) {
-   window.startUp();
-   window.startUp = undefined;
-   }
-}( jQuery ) );
diff --git a/resources/src/startup.js b/resources/src/startup.js
index 3b79bd3..c4148fe 100644
--- a/resources/src/startup.js
+++ b/resources/src/startup.js
@@ -68,39 +68,48 @@
);
 }
 
-/**
- * The $CODE and $VARS placeholders are substituted in 
ResourceLoaderStartUpModule.php.
- */
-function startUp() {
-   mw.config = new mw.Map( $VARS.wgLegacyJavaScriptGlobals );
-
-   $CODE.registrations();
-
-   mw.config.set( $VARS.configuration );
-
-   // Must be after mw.config.set because these callbacks may use 
mw.loader which
-   // needs to have values 'skin', 'debug' etc. from mw.config.
-   window.RLQ = window.RLQ || [];
-   while ( RLQ.length ) {
-   RLQ.shift()();
+// Conditional script injection
+( function () {
+   if ( !isCompatible() ) {
+   // Undo class swapping in case of an unsupported browser.
+   // See OutputPage::getHeadScripts().
+   document.documentElement.className = 
document.documentElement.className
+   .replace( /(^|\s)client-js(\s|$)/, '$1client-nojs$2' );
}
-   window.RLQ = {
-   push: function ( fn ) {
-   fn();
+
+   /**
+* The $CODE and $VARS placeholders are substituted in 
ResourceLoaderStartUpModule.php.
+*/
+   function startUp() {
+   mw.config = new mw.Map( $VARS.wgLegacyJavaScriptGlobals );
+
+   $CODE.registrations();
+
+   mw.config.set( $VARS.configuration );
+
+   // Must be after mw.config.set because these callbacks may use 
mw.loader which
+   // needs to have values 'skin', 'debug' etc. from mw.config.
+   window.RLQ = window.RLQ || [];
+   while ( RLQ.length ) {
+   RLQ.shift()();
+   }
+   window.RLQ = {
+   push: function ( fn ) {
+   fn();
+   }
+   };
+   }
+
+   var script = document.createElement( 'script' );
+   script.src = $VARS.baseModulesUri;
+   script.onload = script.onreadystatechange = function() {
+   if ( !script.readyState || /loaded|complete/.test( 
script.readyState ) ) {
+   // Clean up
+   script.onload = script.onreadystatechange = null;
+   script = null;
+   // Callback
+   startUp();
}
};
-}
-
-// Conditional script injection
-if ( isCompatible() ) {
-   ( function () {
-   var script = document.createElement( 'script' );
-   script.src = $VARS.baseModulesUri;
-   document.getElementsByTagName( 'head' )[0].appendChild( script 
);
-   }() );
-} else {
-   // Undo class swapping in case of an unsupported browser.
-   // See OutputPage::getHeadScripts().
-   document.documentElement.className = document.documentElement.className
-   .replace( /(^|\s)c

[MediaWiki-commits] [Gerrit] Add --useBatchAPI CLI arg to parse.js - change (mediawiki...parsoid)

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

Change subject: Add --useBatchAPI CLI arg to parse.js
..


Add --useBatchAPI CLI arg to parse.js

Change-Id: I33eb2d0f7e092152774b2d350f9cef04633e54d0
---
M lib/mediawiki.Util.js
M tests/parse.js
2 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/lib/mediawiki.Util.js b/lib/mediawiki.Util.js
index 07ea4f7..8946ab9 100644
--- a/lib/mediawiki.Util.js
+++ b/lib/mediawiki.Util.js
@@ -222,6 +222,9 @@
parsoidConfig.linting = true;
parsoidConfig.linterAPI = null;
}
+   if (opts.useBatchAPI !== null) {
+   parsoidConfig.useBatchAPI = opts.useBatchAPI;
+   }
return parsoidConfig;
},
 
diff --git a/tests/parse.js b/tests/parse.js
index a0a22f6..69438df 100755
--- a/tests/parse.js
+++ b/tests/parse.js
@@ -125,6 +125,11 @@
'boolean': true,
'default': false,
},
+   'useBatchAPI': {
+   description: 'Turn on/off the API batching system',
+   'boolean': true,
+   'default': null,
+   },
 });
 exports.defaultOptions = yargs.options(standardOpts).parse([]);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33eb2d0f7e092152774b2d350f9cef04633e54d0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove extra space from {{#time:}} calls - change (mediawiki...Flow)

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

Change subject: Remove extra space from {{#time:}} calls
..


Remove extra space from {{#time:}} calls

Change-Id: Iee60375a246732ac1a137fee20074012af3c7bad
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 112b7e0..dc0b30d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -411,11 +411,11 @@
"flow-importer-lqt-moved-thread-template": "LQT Moved thread stub 
converted to Flow",
"flow-importer-lqt-moved-thread-template-content": "This post by 
{{{author}}} was moved on {{{date}}}.  You can find it at [[{{{title}}}]].",
"flow-importer-lqt-converted-template": "LQT page converted to Flow",
-   "flow-importer-lqt-converted-template-content": "Previous page history 
was archived for backup purposes at [[{{{archive}}}]] on {{#time: 
Y-m-d|{{{date}}} }}.",
+   "flow-importer-lqt-converted-template-content": "Previous page history 
was archived for backup purposes at [[{{{archive}}}]] on {{#time: 
Y-m-d|{{{date}.",
"flow-importer-lqt-converted-archive-template": "Archive for converted 
LQT page",
"flow-importer-lqt-converted-archive-template-content": "This page is 
an archived LiquidThreads page. '''Do not edit the contents of this page'''. 
Please direct any additional comments to the [[{{{from}}}|current talk page]].",
"flow-importer-wt-converted-template": "Wikitext talk page converted to 
Flow",
-   "flow-importer-wt-converted-template-content": "Previous discussion was 
archived at [[{{{archive}}}]] on 
{{#time: Y-m-d|{{{date}}} }}.",
+   "flow-importer-wt-converted-template-content": "Previous discussion was 
archived at [[{{{archive}}}]] on 
{{#time: Y-m-d|{{{date}.",
"flow-importer-wt-converted-archive-template": "Archive for converted 
wikitext talk page",
"flow-importer-wt-converted-archive-template-content": "This page is an 
archive. '''Do not edit the contents of this page'''. Please direct any 
additional comments to the [[{{{from|{{TALKSPACE}}:{{BASEPAGENAME}|current 
talk page]].",
"flow-importer-lqt-suppressed-user-template": "LQT post imported with 
supressed user",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee60375a246732ac1a137fee20074012af3c7bad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Be careful about using tsr in tokens/x-mediawiki phase - change (mediawiki...parsoid)

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

Change subject: Be careful about using tsr in tokens/x-mediawiki phase
..


Be careful about using tsr in tokens/x-mediawiki phase

 * The tsr info is only stripped from tokens once emitted from the
   pipeline.  Make explicit checks that we aren't inTemplate.

 * This problem can be seen in the origTxt of the link in the test
   called "Parsoid: pipe in transclusion parameter".

 * Assert that if we're asking for src, we have tsr info.

Change-Id: I0bf5c259c926bbb60ac2524d510f086a92ce7311
---
M lib/dom.t.TableFixups.js
M lib/ext.core.LinkHandler.js
M lib/ext.core.NoIncludeOnly.js
M lib/ext.core.Sanitizer.js
M lib/mediawiki.parser.defines.js
5 files changed, 16 insertions(+), 16 deletions(-)

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



diff --git a/lib/dom.t.TableFixups.js b/lib/dom.t.TableFixups.js
index 55dc996..e83769a 100644
--- a/lib/dom.t.TableFixups.js
+++ b/lib/dom.t.TableFixups.js
@@ -33,7 +33,7 @@
env: env,
addTransform: function() {},
};
-   this.sanitizer = new Sanitizer(fakeManager);
+   this.sanitizer = new Sanitizer(fakeManager, {});
 }
 
 /**
diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js
index deadadd..61e1e84 100644
--- a/lib/ext.core.LinkHandler.js
+++ b/lib/ext.core.LinkHandler.js
@@ -1445,6 +1445,7 @@
 };
 
 function ExternalLinkHandler(manager, options) {
+   this.options = options;
this.manager = manager;
this.manager.addTransform(this.onUrlLink.bind(this), 
"ExternalLinkHandler:onUrlLink", this.rank, 'tag', 'urllink');
this.manager.addTransform(this.onExtLink.bind(this), 
"ExternalLinkHandler:onExtLink",
@@ -1498,7 +1499,6 @@
var tagAttrs, builtTag;
var env = this.manager.env;
var href = Util.tokensToString(Util.lookup(token.attribs, 'href'));
-   var origTxt = token.getWTSource(env);
var txt = href;
 
if (SanitizerConstants.IDN_RE.test(txt)) {
@@ -1529,14 +1529,12 @@
builtTag = new TagTk('a', tagAttrs, dataAttribs);
dataAttribs.stx = 'url';
 
-   if (origTxt) {
-   // origTxt will be null for content from templates
-   //
+   if (!this.options.inTemplate) {
// Since we messed with the text of the link, we need
// to preserve the original in the RT data. Or else.
-   builtTag.addNormalizedAttribute('href', txt, origTxt);
+   builtTag.addNormalizedAttribute('href', txt, 
token.getWTSource(env));
} else {
-   builtTag.addAttribute('href', 
token.getAttribute('href'));
+   builtTag.addAttribute('href', txt);
}
 
cb({
@@ -1616,7 +1614,7 @@
href = Sanitizer._stripIDNs(href);
}
 
-   if (dataAttribs.tsr) {
+   if (!this.options.inTemplate) {
// If we are from a top-level page, add normalized attr 
info for
// accurate roundtripping of original content.
//
diff --git a/lib/ext.core.NoIncludeOnly.js b/lib/ext.core.NoIncludeOnly.js
index 2afe089..46c8294 100644
--- a/lib/ext.core.NoIncludeOnly.js
+++ b/lib/ext.core.NoIncludeOnly.js
@@ -54,6 +54,7 @@
  * onlyinclude processing (which is a good idea anyway).
  */
 function OnlyInclude(manager, options) {
+   this.options = options;
this.manager = manager;
if (options.isInclude) {
this.accum = [];
@@ -71,8 +72,8 @@
 OnlyInclude.prototype.rank = 0.01; // Before any further processing
 
 OnlyInclude.prototype.onOnlyInclude = function(token, manager) {
-   var tsr = (token.dataAttribs || {}).tsr;
-   var src = tsr[1] ? token.getWTSource(manager.env) : undefined;
+   var tsr = token.dataAttribs.tsr;
+   var src = !this.options.inTemplate ? token.getWTSource(manager.env) : 
undefined;
var attribs = [
new KV('typeof', 'mw:Includes/OnlyInclude' + (token instanceof 
EndTagTk ? '/End' : '')),
];
diff --git a/lib/ext.core.Sanitizer.js b/lib/ext.core.Sanitizer.js
index 82ed097..08e952b 100644
--- a/lib/ext.core.Sanitizer.js
+++ b/lib/ext.core.Sanitizer.js
@@ -588,7 +588,8 @@
  * @constructor
  * @param {TokenTransformManager} manager The manager for this part of the 
pipeline.
  */
-function Sanitizer(manager) {
+function Sanitizer(manager, options) {
+   this.options = options;
// FIXME: would be good to make the sanitizer independent of the manager
// so that it can be used separately. See
// https://phabricator.wikimedia.org/T54941
@@ -710,10 +711,9 @@
) { // unknown tag -- convert to plain text
var origToken = t

[MediaWiki-commits] [Gerrit] Hygiene: Make survey selection easier to read - change (mediawiki...QuickSurveys)

2015-08-28 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Hygiene: Make survey selection easier to read
..

Hygiene: Make survey selection easier to read

Change-Id: I20e0b5f9e0ce9177e4c0c4aa89d5dc67ae7ee92d
---
M resources/ext.quicksurveys.init/init.js
1 file changed, 43 insertions(+), 47 deletions(-)


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

diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index d180eda..4bec70b 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -1,10 +1,11 @@
 ( function ( $ ) {
var survey, $bodyContent, $place, randomSurvey, surveyIndex,
$panel = $( '' ),
-   availableSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
+   enabledSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
isMainPage = mw.config.get( 'wgIsMainPage' ),
isArticle = mw.config.get( 'wgIsArticle' ),
-   sessionId = mw.user.generateRandomSessionId();
+   sessionId = mw.user.generateRandomSessionId(),
+   availableSurveys = [];
 
mw.extQuickSurveys = mw.extQuickSurveys || {};
 
@@ -13,57 +14,52 @@
return;
}
 
+   // Find which surveys are available to the user
+   $( enabledSurveys ).each( function ( i, enabledSurvey ) {
+   // Setting the quicksurvey param makes every enabled survey 
available
+   if ( mw.util.getParamValue( 'quicksurvey' ) ) {
+   availableSurveys.push( enabledSurvey );
+   return;
+   } else if (
+   getSurveyToken( enabledSurvey ) !== '~' &&
+   getBucketForSurvey( enabledSurvey ) === 'A'
+   ) {
+   availableSurveys.push( enabledSurvey );
+   }
+   } );
+
if ( availableSurveys.length ) {
-   // Get a random survey that hasn't been dismissed and in 
correct bucket
-   while ( !survey && availableSurveys.length !== 0 ) {
-   surveyIndex = Math.floor( Math.random() * 
availableSurveys.length );
-   randomSurvey = availableSurveys[surveyIndex];
-   // Setting the param quicksurvey bypasses the bucketing
-   if ( mw.util.getParamValue( 'quicksurvey' ) ) {
-   survey = randomSurvey;
-   break;
-   }
-   if (
-   getSurveyToken( randomSurvey ) === '~' ||
-   getBucketForSurvey( randomSurvey ) !== 'A'
-   ) {
-   availableSurveys.splice( surveyIndex, 1 );
-   continue;
-   }
-   survey = randomSurvey;
+   // Get a random available survey
+   survey = availableSurveys[Math.floor( Math.random() * 
availableSurveys.length )];
+   $bodyContent = $( '.mw-content-ltr, .mw-content-rtl' );
+   $place = $bodyContent.find( '> h1, > h2, > h3, > h4, > h5, > 
h6' ).eq( 0 );
+
+   if ( $place.length ) {
+   $panel.insertBefore( $place );
+   } else {
+   $panel.appendTo( $bodyContent );
}
+   // survey.module contains i18n messages
+   mw.loader.using( [ 'ext.quicksurveys.views', survey.module ] 
).done( function () {
+   var panel,
+   options = {
+   survey: survey,
+   templateData: {
+   question: mw.msg( 
survey.question ),
+   description: mw.msg( 
survey.description )
+   }
+   };
 
-   if ( survey ) {
-   $bodyContent = $( '.mw-content-ltr, .mw-content-rtl' );
-   $place = $bodyContent.find( '> h1, > h2, > h3, > h4, > 
h5, > h6' ).eq( 0 );
-
-   if ( $place.length ) {
-   $panel.insertBefore( $place );
+   if ( survey.type === 'internal' ) {
+   panel = new 
mw.extQuickSurveys.views.QuickSurvey( options );
} else {
-   $panel.appendTo( $bodyContent );
+   panel = new 
mw.extQuickSurveys.views.ExternalSurvey( options );
}
-   // survey.module contains i18n messages
-

[MediaWiki-commits] [Gerrit] mailman: make Apache config 2.4 compatible - change (operations/puppet)

2015-08-28 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mailman: make Apache config 2.4 compatible
..

mailman: make Apache config 2.4 compatible

Apache config needs to be adjusted for 2.4 here as well.

still "client denied by server configuration" for monitoring and all

Bug:109925
Change-Id: I58fe910e204d6d0d51b85ef1f589f0936a65b0ca
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 21 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/234676/1

diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 916ac77..58a74b4 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -19,24 +19,39 @@
 # Does not obey robots.txt; causing operational issues, 2014-06-23
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser
 
-Order allow,deny
-Allow from env=!bad_browser
+= 2.4>
+Require not env bad_browser
+
+
+Order allow,deny
+Allow from env=!bad_browser
+
 
 
 DocumentRoot /var/www
 
 Options FollowSymLinks
 AllowOverride None
-Order Allow,Deny
-Allow from All
+= 2.4>
+Require all granted
+
+
+Order Allow,Deny
+Allow from All
+
 
 
 ScriptAlias /mailman/ "/usr/lib/cgi-bin/mailman/"
 
 AllowOverride None
 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
-Order allow,deny
-Allow from all
+= 2.4>
+Require all granted
+
+
+Order allow,deny
+Allow from all
+
 
 
 Alias /pipermail/ "/var/lib/mailman/archives/public/"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58fe910e204d6d0d51b85ef1f589f0936a65b0ca
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Allow to use custom displayTitle in search - change (mediawiki...MobileFrontend)

2015-08-28 Thread Bene (Code Review)
Bene has uploaded a new change for review.

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

Change subject: Allow to use custom displayTitle in search
..

Allow to use custom displayTitle in search

Bug: T85368
Change-Id: I35cd90d776534fddca4a7cd45cf0f641a11925dd
---
M resources/mobile.search/SearchApi.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/mobile.search/SearchApi.js 
b/resources/mobile.search/SearchApi.js
index f3fa82b..813787a 100644
--- a/resources/mobile.search/SearchApi.js
+++ b/resources/mobile.search/SearchApi.js
@@ -86,7 +86,7 @@
_getPageData: function ( query, info ) {
return {
id: info.pageid,
-   displayTitle: this._highlightSearchTerm( 
info.title, query ),
+   displayTitle: this._highlightSearchTerm( 
info.displayTitle || info.title, query ),
title: info.title,
url: mw.util.getUrl( info.title ),
thumbnail: info.thumbnail

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35cd90d776534fddca4a7cd45cf0f641a11925dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bene 

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


[MediaWiki-commits] [Gerrit] Batch SPARQL queries - change (wikidata...rdf)

2015-08-28 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Batch SPARQL queries
..

Batch SPARQL queries

Bug: T110708
Change-Id: I9c0727b8275e58db7559c51332af07b3a1b1adc5
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDateBOp.java
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.CleanUnused.sparql
M 
tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.GetRefs.sparql
A 
tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.GetRevisions.sparql
M 
tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.GetValues.sparql
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/UpdateBuilder.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java
10 files changed, 232 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/74/234674/1

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
index d212716..c070075 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
@@ -31,7 +31,7 @@
  */
 public class WikibaseContextListener extends BigdataRDFServletContextListener {
 
-private static final transient Logger log = 
LoggerFactory.getLogger(WikibaseContextListener.class);
+private static final Logger log = 
LoggerFactory.getLogger(WikibaseContextListener.class);
 
 /**
  * Replaces the default Blazegraph services with ones that do not allow
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDateBOp.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDateBOp.java
index 7ac76d7..8a5c0b2 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDateBOp.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDateBOp.java
@@ -31,8 +31,8 @@
 public class WikibaseDateBOp extends IVValueExpression implements 
INeedsMaterialization{
 
 /**
-*
-*/
+ *
+ */
 private static final long serialVersionUID = 9136864442064392445L;
 
 /**
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
index 9e72129..83b60d7 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
@@ -11,9 +11,13 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
@@ -42,6 +46,7 @@
 import com.codahale.metrics.JmxReporter;
 import com.codahale.metrics.Meter;
 import com.codahale.metrics.MetricRegistry;
+import com.google.common.collect.Multimap;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.lexicalscope.jewel.cli.Option;
 
@@ -79,7 +84,7 @@
 @Option(shortName = "t", defaultValue = "10", description = "Thread 
count")
 int threadCount();
 
-@Option(shortName = "b", defaultValue = "10", description = "Number of 
recent changes fetched at a time.")
+@Option(shortName = "b", defaultValue = "100", description = "Number 
of recent changes fetched at a time.")
 int batchSize();
 }
 
@@ -109,7 +114,7 @@
 new LinkedBlockingQueue(), threadFactory.build());
 
 Munger munger = mungerFromOptions(options);
-new Update<>(changeSource, wikibaseRepository, rdfRepository, munger, 
executor, options.pollDelay()).run();
+new Update<>(changeSource, wikibaseRepository, rdfRepository, munger, 
executor, options.pollDelay(), uris).run();
 }
 
 /**
@@ -228,15 +233,28 @@
  * particular this will happen if the RecentChangesPoller finds no changes.
  */
 private final int pollDelay;
+/**
+ * Uris for wikibase.
+ */
+private final WikibaseUris uris;
+/**
+ * Map entity->values list from repository.
+ */
+private Multimap repoValues;
+/**
+ * Map entity->references list from repository.
+ */
+private Multimap repoRefs;

[MediaWiki-commits] [Gerrit] Set batch size to default for WDQS - change (operations/puppet)

2015-08-28 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Set batch size to default for WDQS
..

Set batch size to default for WDQS

Change-Id: Ic550168d09c88d73f3be57f154106adfc21cb00a
---
M hieradata/labs/wikidata-query/common.yaml
M hieradata/role/common/wdqs.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/234673/1

diff --git a/hieradata/labs/wikidata-query/common.yaml 
b/hieradata/labs/wikidata-query/common.yaml
index f7aee73..afd4996 100644
--- a/hieradata/labs/wikidata-query/common.yaml
+++ b/hieradata/labs/wikidata-query/common.yaml
@@ -1,5 +1,5 @@
 "wdqs::gui::log_aggregator":  
'deployment-logstash2.deployment-prep.eqiad.wmflabs'
-"wdqs::updater::options": '-n wdq -s -- -b 500 -t 5'
+"wdqs::updater::options": '-n wdq -s'
 "wdqs::service::use_git_deploy": false
 "wdqs::package_dir": '/srv/wdqs/blazegraph'
 "wdqs::data_dir": '/srv/wdqs/blazegraph'
diff --git a/hieradata/role/common/wdqs.yaml b/hieradata/role/common/wdqs.yaml
index 396117b..6c70f5c 100644
--- a/hieradata/role/common/wdqs.yaml
+++ b/hieradata/role/common/wdqs.yaml
@@ -1,5 +1,5 @@
 wdqs::gui::log_aggregator:  'logstash1001.eqiad.wmnet'
-wdqs::updater::options: '-n wdq -- -b 500'
+wdqs::updater::options: '-n wdq'
 admin::groups:
   - wdqs-admins
 cluster: wdqs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic550168d09c88d73f3be57f154106adfc21cb00a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] Setup survey bucketing and add browser tests - change (mediawiki...QuickSurveys)

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

Change subject: Setup survey bucketing and add browser tests
..


Setup survey bucketing and add browser tests

Sifts through available surveys at random looking for one
that hasn't already been dismissed and in the correct bucket.
Displays first random survey that qualifies.

Add missing i18n message for internal survey description as
it is expected that the key exists.

Bug: T109518
Dependency: Icf7f6fedf0c2deb5d5548c9e24456cc7a7c6a743
Change-Id: Ib09477d30480116cdb6f3744cb6e77dc2b57817c
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M resources/ext.quicksurveys.init/init.js
M tests/browser/LocalSettings.php
M tests/browser/features/internal_survey.feature
M tests/browser/features/support/step_definitions/common_steps.rb
7 files changed, 144 insertions(+), 58 deletions(-)

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



diff --git a/extension.json b/extension.json
index 306de24..79edd2e 100644
--- a/extension.json
+++ b/extension.json
@@ -59,7 +59,8 @@
"position": "top",
"dependencies": [
"mediawiki.user",
-   "mediawiki.storage"
+   "mediawiki.storage",
+   "mediawiki.experiments"
],
"targets": [
"mobile",
diff --git a/i18n/en.json b/i18n/en.json
index 8361053..785b89e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,6 +9,7 @@
},
"quicksurveys-desc": "Displays configured surveys on Mobile and 
Desktop.",
"ext-quicksurveys-example-internal-survey-question": "Should the text 
be bigger?",
+   "ext-quicksurveys-example-internal-survey-description": "This is the 
description of the example internal survey",
"ext-quicksurveys-example-internal-survey-answer-positive": "Yes",
"ext-quicksurveys-example-internal-survey-answer-neutral": "Not sure",
"ext-quicksurveys-example-internal-survey-answer-negative": "No",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ec40900..5b78c3d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,6 +10,7 @@
},
"quicksurveys-desc": 
"{{desc|name=QuickSurveys|url=https://www.mediawiki.org/wiki/Extension:QuickSurveys}}";,
"ext-quicksurveys-example-internal-survey-question": "The question for 
the example internal survey",
+   "ext-quicksurveys-example-internal-survey-description": "Description of 
the example internal survey",
"ext-quicksurveys-example-internal-survey-answer-positive": "The 
positive answer for the example internal survey\n{{Identical|Yes}}",
"ext-quicksurveys-example-internal-survey-answer-neutral": "The neutral 
answer for the example internal survey\n{{Identical|Not sure}}",
"ext-quicksurveys-example-internal-survey-answer-negative": "The 
negative answer for the example internal survey\n{{Identical|No}}",
diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index 313ce45..d180eda 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -1,59 +1,113 @@
 ( function ( $ ) {
-   var survey, token, storageId, $bodyContent, $place,
+   var survey, $bodyContent, $place, randomSurvey, surveyIndex,
$panel = $( '' ),
availableSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
-   // https://phabricator.wikimedia.org/T109010
-   inSample = false,
isMainPage = mw.config.get( 'wgIsMainPage' ),
-   isArticle = mw.config.get( 'wgIsArticle' );
+   isArticle = mw.config.get( 'wgIsArticle' ),
+   sessionId = mw.user.generateRandomSessionId();
 
mw.extQuickSurveys = mw.extQuickSurveys || {};
 
+   // Do nothing when not on an article
+   if ( isMainPage || !isArticle ) {
+   return;
+   }
+
if ( availableSurveys.length ) {
-   survey = availableSurveys[ Math.floor( Math.random() * 
availableSurveys.length ) ];
-   storageId = 'ext-quicksurvey-' + survey.name;
-   token = mw.storage.get( storageId );
-
-   // local storage is supported in this case as value is not 
false and when ~ it means it was dismissed
-   if ( token !== false && token !== '~' && !isMainPage && 
isArticle ) {
-
-   if ( !token ) {
-   token = mw.user.generateRandomSessionId();
-   // given token !== false we can safely run this 
without exception:
-   mw.storage.set( storageId, token );
+   // Get a random survey that hasn't been dismissed and in 
correct bucket
+   while ( !survey &

[MediaWiki-commits] [Gerrit] More refund logic tweaks - change (mediawiki...DonationInterface)

2015-08-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: More refund logic tweaks
..

More refund logic tweaks

Reset effort_id after setGatewayDefaults clobbers it,
inspect status ID from DO_REFUND call distinct from that of
GET_ORDERSTATUS call.

Can probably simplify this crap and add more informative comments
about the extra payment created with the negated effort_id

Bug: T110367
Change-Id: Idc99826ae78ff96b6fcb0cf490aaa43568e6422e
---
M globalcollect_gateway/globalcollect.adapter.php
M globalcollect_gateway/scripts/refund.php
2 files changed, 63 insertions(+), 11 deletions(-)


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

diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index dba8af5..9e2d186 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -1625,32 +1625,78 @@
return PaymentResult::fromResults( 
$cancel_payment_response, FinalStatus::COMPLETE );
}
 
-   $this->do_transaction( 'DO_REFUND' );
-
-   // So get the status and see what we've accomplished so far.
+   // Get the status and see what we've accomplished so far.
$get_orderstatus_response = $this->do_transaction( 
'GET_ORDERSTATUS' );
-   $data = $this->getTransactionData();
+   $get_orderstatus_data = $get_orderstatus_response->getData();
 
// If we can't even get the status, fail.
if ( !$get_orderstatus_response->getCommunicationStatus()
-   || !isset( $data['STATUSID'] )
+   || !isset( $get_orderstatus_data['STATUSID'] )
) {
return PaymentResult::fromResults( 
$get_orderstatus_response, FinalStatus::FAILED );
}
 
-   $final_status = $this->findCodeAction( 'GET_ORDERSTATUS', 
'STATUSID', $data['STATUSID'] );
+   $final_status = $this->findCodeAction( 'GET_ORDERSTATUS', 
'STATUSID', $get_orderstatus_data['STATUSID'] );
 
// If it's already cancelled or refunded, pat own back.
+   // FIXME: I don't think the original txn goes into refunded 
status, just
+   // the refund txn with the same order id but negated efort ID
if ( $final_status === FinalStatus::CANCELLED
|| $final_status === FinalStatus::REFUNDED
) {
return PaymentResult::fromResults( 
$get_orderstatus_response, FinalStatus::COMPLETE );
}
 
-   // If DO_REFUND moved the order back into status 600, settle 
the refund.
-   if ( $final_status === FinalStatus::PENDING_POKE ) {
+   $refund_status = null;
+   // To get the refund status, negate the effort id.  Get it?
+   $this->transactions['GET_ORDERSTATUS']['values']['EFFORTID'] = 
-1 * intval( $this->getData_Unstaged_Escaped( 'effort_id' ) );
+   $get_refundstatus_response = $this->do_transaction( 
'GET_ORDERSTATUS' );
+   $get_refundstatus_data = $get_refundstatus_response->getData();
+
+   if ( isset( $get_refundstatus_data['STATUSID'] ) ) {
+   $refund_status = $this->findCodeAction( 
'GET_ORDERSTATUS', 'STATUSID', $get_refundstatus_data['STATUSID'] );
+   if ( $refund_status === FinalStatus::COMPLETE
+   || $refund_status === FinalStatus::REFUNDED ) {
+   return PaymentResult::fromResults( 
$get_refundstatus_response, FinalStatus::COMPLETE );
+   }
+   }
+
+   // Try DO_REFUND unless the refund is already in PENDING_POKE
+   if ( $refund_status !== FinalStatus::PENDING_POKE ) {
+   // DO_REFUND will give us back the status of the 
refund, which may be
+   // different from the order status we'd get from 
GET_ORDERSTATUS.
+   // For example, if the order status is 975 (Settlement 
in progress),
+   // DO_REFUND will return a status 600 or 800 but 
subsequent GET_ORDERSTATUS
+   // calls will return status 975
+   $do_refund_response = $this->do_transaction( 
'DO_REFUND' );
+   $do_refund_data = $do_refund_response->getData();
+
+   if ( !$do_refund_response->getCommunicationStatus()
+   || !isset( $do_refund_data['STATUSID'] )
+   ) {
+   // Janky check for already-refunded donations: 
error 300430 is
+   // 'refund amount too large

[MediaWiki-commits] [Gerrit] readme: Fix broken link syntax - change (CLDRPluralRuleParser)

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

Change subject: readme: Fix broken link syntax
..


readme: Fix broken link syntax

Follows-up 2b623a411b.

Change-Id: I0649276d31cff835a72717e4550a9495ee2b5494
---
M README.md
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/README.md b/README.md
index 06ef24a..6f37ca9 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
 =
 
 CLDRPluralRuleParser is a PHP library for parsing
-[http://cldr.unicode.org/index/cldr-spec/plural-rules](plural rules) specified 
in the
-[http://cldr.unicode.org/index](CLDR project).
+[plural rules](http://cldr.unicode.org/index/cldr-spec/plural-rules) specified 
in the
+[CLDR project](http://cldr.unicode.org/index).
 
 This library does not contain the rules from the CLDR project, you have to get 
them yourself.
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0649276d31cff835a72717e4550a9495ee2b5494
Gerrit-PatchSet: 1
Gerrit-Project: CLDRPluralRuleParser
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ldap-eqiad.wikimedia.org cert renewal - change (operations/puppet)

2015-08-28 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: ldap-eqiad.wikimedia.org cert renewal
..


ldap-eqiad.wikimedia.org cert renewal

renewed cert, new cert content (no change in key)

T106604

Change-Id: I3aa37df2157cf364d5cff38c6fbd51c97b9434bb
---
M files/ssl/ldap-eqiad.wikimedia.org.crt
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/files/ssl/ldap-eqiad.wikimedia.org.crt 
b/files/ssl/ldap-eqiad.wikimedia.org.crt
index 296ed2d..4b72cfa 100644
--- a/files/ssl/ldap-eqiad.wikimedia.org.crt
+++ b/files/ssl/ldap-eqiad.wikimedia.org.crt
@@ -1,8 +1,8 @@
 -BEGIN CERTIFICATE-
-MIIFUzCCBDugAwIBAgISESEXi5XWw+B/F4gCa3mIry5EMA0GCSqGSIb3DQEBCwUA
+MIIFUzCCBDugAwIBAgISESFWGhm6pMU/gXs7M6chHUQlMA0GCSqGSIb3DQEBCwUA
 MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD
 VQQDEzNHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hB
-MjU2IC0gRzIwHhcNMTQwOTE5MTk0MTAyWhcNMTUwOTIwMTk0MTAyWjCBgjELMAkG
+MjU2IC0gRzIwHhcNMTUwODI3MTc0MTAyWhcNMTYxMDIwMTk0MTAyWjCBgjELMAkG
 A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu
 Y2lzY28xIzAhBgNVBAoTGldpa2ltZWRpYSBGb3VuZGF0aW9uLCBJbmMuMSEwHwYD
 VQQDExhsZGFwLWVxaWFkLndpa2ltZWRpYS5vcmcwggEiMA0GCSqGSIb3DQEBAQUA
@@ -22,10 +22,10 @@
 cnQwPwYIKwYBBQUHMAGGM2h0dHA6Ly9vY3NwMi5nbG9iYWxzaWduLmNvbS9nc29y
 Z2FuaXphdGlvbnZhbHNoYTJnMjAdBgNVHQ4EFgQUfqA+pdTzJtgk+wVksvv+9/Xu
 63UwHwYDVR0jBBgwFoAUlt5h8b0cFilTHMDMfTuDAEDmGnwwDQYJKoZIhvcNAQEL
-BQADggEBAMTRYA3Ya/mULppp01vHMfaW3q7U2eN3Z46500z0tnagytfc29VC+Dfi
-V1z9bWXlhXwbM7+h0Zg55qelnH4cKi121BTocj9ITKwQlXs/QneiJQF1Geo6W3Ne
-YoFo6wQXUUJLiZev/N9msHoWW3fGM+DyPUhkHVV+Iuq2GtKv6auaanQYvpDB6zrS
-uQjHog1QKqcfA0gCdz8G26Xw2C6umBlieCx+2wWCeSEnHCV88kTBkbWeeaMSRhmJ
-yuXTZrU4i6bvyQ6Qkpo0A+coZUd9NMAhS75PkWqARh1/RBjqRvvX2986abk4Ph6a
-K6IE3mEybT+GeF9ZICuBTJjgzVMbANY=
+BQADggEBAHdOc4VIcjaf0Lank98a40/Pk/+BoBmWZ+mIyU8O3jh6eRn2C9UEFuqf
+va1DS/800G9bCYWPy94qEfPSm6UOytBtvfpkJCyam80pdntJxmXmvrOw1Qgel+ch
+ugVjRwTqyPuIRLuDiHJo9F5ammGzQUYZKpCUzDqn9to0suh4ed4oBXeT/OiV4qnI
+keevOo3J19TYnrHvkkYzyLUrGNskKMLEqcx9SHCj8/uHoxWnmRY7BgVvJVyduTop
+YJhqDg1mRB/FHQNnbmMbvfOIyC+I2vG1MBWSpvSsenJ00FNt/j5qVii9AWxaDsd1
+LbAgozdMA1AKavbg+ukVPzEfNbFivtk=
 -END CERTIFICATE-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aa37df2157cf364d5cff38c6fbd51c97b9434bb
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: BBlack 
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 GuidedTourLauncher::launchTourByCookie for server-side l... - change (mediawiki...GuidedTour)

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

Change subject: Add GuidedTourLauncher::launchTourByCookie for server-side 
launch
..


Add GuidedTourLauncher::launchTourByCookie for server-side launch

Also, a couple comment fixes, and separate PHP and JS tests.

Usage:

GuidedTourLauncher::launchTourByCookie( $tourName, $stepName );

Bug: T108266
Change-Id: I5b8437ce53ec752cc368abff02a40913dd4ac44e
---
M GuidedTourHooks.php
A GuidedTourLauncher.php
M extension.json
M modules/ext.guidedTour.lib.internal.js
M modules/ext.guidedTour.lib/ext.guidedTour.lib.main.js
R tests/phpunit/GuidedTourHooksTest.php
A tests/phpunit/GuidedTourLauncherTest.php
R tests/qunit/ext.guidedTour.lib.tests.js
8 files changed, 158 insertions(+), 8 deletions(-)

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



diff --git a/GuidedTourHooks.php b/GuidedTourHooks.php
index 66c528d..437237c 100644
--- a/GuidedTourHooks.php
+++ b/GuidedTourHooks.php
@@ -123,7 +123,7 @@
 *
 * @return bool true if a module was added, false otherwise
 */
-   private static function addTour( $out, $tourName ) {
+   public static function addTour( $out, $tourName ) {
global $wgResourceModules;
 
$isUserJsAllowed = $out->getAllowedModules( 
ResourceLoaderModule::TYPE_SCRIPTS ) >= 
ResourceLoaderModule::ORIGIN_USER_INDIVIDUAL;
@@ -191,7 +191,7 @@
 */
public static function onResourceLoaderTestModules( &$testModules, 
&$resourceLoader ) {
$testModules[ 'qunit' ][ 'ext.guidedTour.lib.tests' ] = array(
-   'scripts' => array( 'tests/ext.guidedTour.lib.tests.js' 
),
+   'scripts' => array( 
'tests/qunit/ext.guidedTour.lib.tests.js' ),
'dependencies' => array( 'ext.guidedTour.lib' ),
'localBasePath' => __DIR__,
'remoteExtPath' => 'GuidedTour',
@@ -206,7 +206,7 @@
 * @return bool always true
 */
public static function onUnitTestsList( &$files ) {
-   $testDir = __DIR__ . '/tests';
+   $testDir = __DIR__ . '/tests/phpunit';
$files = array_merge( $files, glob( "$testDir/*Test.php" ) );
return true;
}
diff --git a/GuidedTourLauncher.php b/GuidedTourLauncher.php
new file mode 100644
index 000..9920b79
--- /dev/null
+++ b/GuidedTourLauncher.php
@@ -0,0 +1,51 @@
+ 1,
+   'tours' => array(
+   $tourName => array(
+   'step' => $step,
+   ),
+   )
+   ) );
+
+   return FormatJson::encode( $newCookie );
+   }
+
+   /**
+* Sets a tour to auto-launch on this view using a cookie.
+*/
+   public static function launchTourByCookie( $tourName, $step ) {
+   global $wgOut, $wgRequest;
+
+   $oldCookie = $wgRequest->getCookie( 
GuidedTourHooks::COOKIE_NAME );
+   $newCookie = self::getNewCookie( $oldCookie, $tourName, $step );
+   $wgRequest->response()->setcookie( 
GuidedTourHooks::COOKIE_NAME, $newCookie, 0, array(
+   'httpOnly' => false,
+   ) );
+
+   GuidedTourHooks::addTour( $wgOut, $tourName );
+   }
+}
diff --git a/extension.json b/extension.json
index 3d894b3..88dd1ae 100644
--- a/extension.json
+++ b/extension.json
@@ -26,7 +26,8 @@
]
},
"AutoloadClasses": {
-   "GuidedTourHooks": "GuidedTourHooks.php"
+   "GuidedTourHooks": "GuidedTourHooks.php",
+   "GuidedTourLauncher": "GuidedTourLauncher.php"
},
"ResourceModules": {
"mediawiki.libs.guiders": {
diff --git a/modules/ext.guidedTour.lib.internal.js 
b/modules/ext.guidedTour.lib.internal.js
index acb9a58..8d2f86d 100644
--- a/modules/ext.guidedTour.lib.internal.js
+++ b/modules/ext.guidedTour.lib.internal.js
@@ -1,8 +1,7 @@
 /**
  * GuidedTour internal API
  *
- * For use only in mw.guidedTour.lib.js, ext.guidedTour.js, and unit tests of 
the internal
- * API.
+ * For use only in GuidedTour.
  *
  * Will change without notice.
  *
diff --git a/modules/ext.guidedTour.lib/ext.guidedTour.lib.main.js 
b/modules/ext.guidedTour.lib/ext.guidedTour.lib.main.js
index df0adde..5ef5080 100644
--- a/modules/ext.guidedTour.lib/ext.guidedTour.lib.main.js
+++ b/modules/ext.guidedTour.lib/ext.guidedTour.lib.main.js
@@ -363,7 +363,9 @@
},
 
/**
-* Launch a tour.  Tours start themselves (through 
ext.guidedTour.js).
+* Launch a tour.  Tours start automatically if the environment 
is present
+* (user string or cookie).
+*
 * However, this method allows one tour

[MediaWiki-commits] [Gerrit] Delete cookie for current tour if isSinglePage, on onShow - change (mediawiki...GuidedTour)

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

Change subject: Delete cookie for current tour if isSinglePage, on onShow
..


Delete cookie for current tour if isSinglePage, on onShow

This allows server-side launch (by cookie) of single-page tours.

Bug: T108266
Change-Id: I4beb3abe49b7c5b1047d0200036d11c0c8541937
---
M modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Mooeypoo: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js 
b/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js
index 66970ff..27a539a 100644
--- a/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js
+++ b/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js
@@ -624,8 +624,11 @@
var tourInfo = gt.parseTourId( guider.id ), priorCurrentStep,
handleLinkClickProxy = $.proxy( this.handleLinkClick, 
this );
 
-   //If this is not part of a single-page tour, save the guider id 
to a cookie
-   if ( !this.tour.isSinglePage ) {
+   // We delete the cookie to allow the server to launch 
single-page
+   // tours by cookie.
+   if ( this.tour.isSinglePage ) {
+   gt.removeTourFromUserStateByGuider( guider );
+   } else {
gt.updateUserStateForTour( {
tourInfo: tourInfo,
wasShown: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4beb3abe49b7c5b1047d0200036d11c0c8541937
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Swalling 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] elasticsearch: ferm for 4-7 - change (operations/puppet)

2015-08-28 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: elasticsearch: ferm for 4-7
..

elasticsearch: ferm for 4-7

Change-Id: I60014738a9c37cfcded99988df5825b7700cdb07
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/234671/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 208d02a..e50dd4e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -855,7 +855,7 @@
 
 role elasticsearch::server
 
-if $::hostname =~ /^elastic10(0[8-9]|1[0-9]|2[0-9]|3[0-1])$/ {
+if $::hostname =~ /^elastic10(0[5-9]|1[0-9]|2[0-9]|3[0-1])$/ {
 include base::firewall
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60014738a9c37cfcded99988df5825b7700cdb07
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 

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


[MediaWiki-commits] [Gerrit] Add missing dependency to 'mediawiki.notify' - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Add missing dependency to 'mediawiki.notify'
..


Add missing dependency to 'mediawiki.notify'

ext.uls.ime.js uses mw.notify().

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

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



diff --git a/Resources.php b/Resources.php
index 9f092af..86563c4 100644
--- a/Resources.php
+++ b/Resources.php
@@ -49,6 +49,7 @@
'ext.uls.mediawiki',
'ext.uls.messages',
'jquery.ime',
+   'mediawiki.notify',
),
'messages' => array(
'uls-ime-helppage',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If435d6934df6edf8aff5431cb7a303cc6361a472
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: Krinkle 
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 .gitattributes and minor clean up - change (generator-wikimedia-php-library)

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

Change subject: Add .gitattributes and minor clean up
..


Add .gitattributes and minor clean up

template:
* Get rid of spurious line break in the generated phpcs.xml.
* Add .gitattributes to the boilerplate.

generator:
* Merge generator loops for templated/underscore-prefixed files
  (rename dotfiles to be _. for consistency).
* Remove unused 'self' variable'.

readme:
* Fix Travis CI badge.
* Fix "npm install" paragraph to match the actual command.
* Fix "yo" command (parameter is without 'generator-' prefix).

Change-Id: I59aeaffb6feffdbbbdb42d66800fbaaed9c2758c
---
M README.md
M generators/app/index.js
R generators/app/templates/_.editorconfig
R generators/app/templates/_.gitreview
M generators/app/templates/_phpcs.xml
A generators/app/templates/gitattributes
6 files changed, 24 insertions(+), 22 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/README.md b/README.md
index 12b80a2..348b47d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-[![Build 
Status](https://travis-ci.org/wikimedia/generator-wikimedia-php.svg?branch=master)](https://travis-ci.org/wikimedia/generator-wikimedia-php)
+[![Build 
Status](https://travis-ci.org/wikimedia/generator-wikimedia-php-library.svg?branch=master)](https://travis-ci.org/wikimedia/generator-wikimedia-php-library)
 
-# generator-wikimedia-php
+# generator-wikimedia-php-library
 
 This tool will help you start a PHP library that conforms to Wikimedia
 specifications.
@@ -9,7 +9,7 @@
 
 First, you'll need to make sure you have [Composer](https://getcomposer.org/)
 and [Yeoman](http://yeoman.io/). Yeoman is distributed as an
-[npm](https://npmjs.org) package. To install it, run:
+[npm](https://npmjs.org/) package. To install it, run:
 
 
 ```
@@ -20,7 +20,7 @@
 Composer](https://getcomposer.org/download/) in the Composer documentation.
 
 Once you have installed Yeoman and Composer, you are ready to install
-generator-wikimedia-php. To do that, run:
+generator-wikimedia-php-library. To do that, run:
 
 ```
 npm install -g generator-wikimedia-php-library
@@ -29,7 +29,7 @@
 ## Getting Started
 
 * Create a new directory or a bare git repository and `cd` into it.
-* Run `yo generator-wikimedia-library`.
+* Run `yo wikimedia-php-library`.
 
 Interactive prompts will guide you the rest of the way.
 
diff --git a/generators/app/index.js b/generators/app/index.js
index 7d370c7..6a4a387 100644
--- a/generators/app/index.js
+++ b/generators/app/index.js
@@ -8,7 +8,7 @@
 
 module.exports = yeoman.generators.Base.extend( {
prompting: function () {
-   var self = this, done = self.async(), prompts = [ {
+   var done = this.async(), prompts = [ {
name: 'author_name',
message : 'What is your name?'
}, {
@@ -62,6 +62,7 @@
 
[
'gitignore',
+   'gitattributes',
'travis.yml'
].forEach( function ( fileName ) {
this.fs.copy(
@@ -71,6 +72,8 @@
}.bind( this ) );
 
[
+   '_.gitreview',
+   '_.editorconfig',
'_Doxyfile',
'_composer.json',
'_phpcs.xml',
@@ -85,13 +88,6 @@
}.bind( this ) );
 
this.fs.copyTpl(
-   this.templatePath( '_gitreview' ),
-   this.destinationPath( '.gitreview' ),
-   this.props,
-   this.tplSettings
-   );
-
-   this.fs.copyTpl(
this.templatePath( '_Library.php' ),
this.destinationPath( 'src/' + this.props.name + '.php' 
),
this.props,
@@ -101,13 +97,6 @@
this.fs.copyTpl(
this.templatePath( '_LibraryTest.php' ),
this.destinationPath( 'tests/' + this.props.name + 
'Test.php' ),
-   this.props,
-   this.tplSettings
-   );
-
-   this.fs.copyTpl(
-   this.templatePath( '_editorconfig' ),
-   this.destinationPath( '.editorconfig' ),
this.props,
this.tplSettings
);
diff --git a/generators/app/templates/_editorconfig 
b/generators/app/templates/_.editorconfig
similarity index 100%
rename from generators/app/templates/_editorconfig
rename to generators/app/templates/_.editorconfig
diff --git a/generators/app/templates/_gitreview 
b/generators/app/templates/_.gitreview
similarity index 100%
rename from generators/app/templates/_gitreview
rename to generators/app/templates/_.gitreview
diff --git a/g

[MediaWiki-commits] [Gerrit] Use Firefox for browser @integration tests - change (mediawiki...MobileFrontend)

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

Change subject: Use Firefox for browser @integration tests
..


Use Firefox for browser @integration tests

Chrome has problems with window resizing which can lead to false
positives (see T109593). Given we have some important tests such as not showing
table of contents on mobile, toggling let's switch

Change-Id: Ic844661ebd2df333c5e6ac2de21857d08f02798a
---
M tests/browser/environments.yml
M tests/browser/features/toggling.feature
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
index b6e4d95..d36f01a 100644
--- a/tests/browser/environments.yml
+++ b/tests/browser/environments.yml
@@ -38,7 +38,7 @@
   # mediawiki_password: SET THIS IN THE ENVIRONMENT!
 
 integration:
-  browser: chrome
+  browser: firefox
   user_factory: true
   # mediawiki_url: JENKINS WILL SET THIS
 
diff --git a/tests/browser/features/toggling.feature 
b/tests/browser/features/toggling.feature
index 0495392..0ffc2a3 100644
--- a/tests/browser/features/toggling.feature
+++ b/tests/browser/features/toggling.feature
@@ -9,7 +9,7 @@
 When I visit the page "Selenium section test page" with hash "#Section_2A"
 Then the heading element with id "Section_2A" should be visible
 
-  @smoke @FIXME:T109593
+  @smoke @integration
   Scenario: Opening a section on mobile
 Given I go to a page that has sections
 When I click on the first collapsible section heading

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic844661ebd2df333c5e6ac2de21857d08f02798a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mailman: fix I/O monitoring on virtual machine - change (operations/puppet)

2015-08-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mailman: fix I/O monitoring on virtual machine
..


mailman: fix I/O monitoring on virtual machine

On sodium we did not have to specify a device name,
on fermium we have to, because it's /dev/vda, or:

ERROR: Device incorrectly specified

Let's try and use "is_virtual" here to know if we
are on a VM or not and then set the device to be checked
based on that.

https://docs.puppetlabs.com/facter/1.6/core_facts.html#isvirtual

---

notify{"am i virtual? $is_virtual - device: $iostat_device": }

fermium:/Main/Notify[am i virtual? true - device: vda]
sodium: /Stage[main]//Notify[am i virtual? false - device: sda]

Bug:T109925
Change-Id: I6c453046b00ca1b12db354f1bcd938d01029948c
---
M manifests/role/lists.pp
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index b229fcf..e2b69e4 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -125,10 +125,16 @@
 source => 'puppet:///files/icinga/check_iostat',
 }
 
+$iostat_device = $is_virtual ? {
+'true'=> 'vda',
+'false'   => 'sda',
+default   => 'sda',
+}
+
 # values chosen based on i/o averages for sodium
 nrpe::monitor_service { 'mailman_iostat':
 description   => 'mailman I/O stats',
-nrpe_command  => '/usr/local/lib/nagios/plugins/check_iostat -i -w 
250,350,300,14000,7500 -c 500,400,600,28000,11000',
+nrpe_command  => "/usr/local/lib/nagios/plugins/check_iostat -i -w 
250,350,300,14000,7500 -c 500,400,600,28000,11000 -d ${iostat_device}",
 timeout   => '30',
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c453046b00ca1b12db354f1bcd938d01029948c
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: John F. Lewis 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] admin: add 'demon' to gerrit-admins group - change (operations/puppet)

2015-08-28 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: admin: add 'demon' to gerrit-admins group
..

admin: add 'demon' to gerrit-admins group

The gerrit-admins group contains all of the release engineering beside
demon because he is already a member of the gerrit-root group.

I am working on a patch to define team members as YAML aliases we can
easily reuse in the different group.  Thus I need some consistency in
the different group, hence adding demon to gerrit-admins.

Change-Id: Ice150c3cc77b7f0e9c6b325055be0adb8674b3b0
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/234670/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f13a8c8..3d8cf6c 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -37,7 +37,7 @@
 description: assist in managing gerrit server
 # qchris is RT 6720
 # Rest is the Release Engineering team
-members: [qchris, dduvall, hashar, thcipriani, twentyafterfour, zfilipin]
+members: [qchris, demon, dduvall, hashar, thcipriani, twentyafterfour, 
zfilipin]
   deployment:
 gid: 705
 description: replaces 'mortals' for software deployment

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice150c3cc77b7f0e9c6b325055be0adb8674b3b0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] admin: remove dupe 'haithams' from statistics-users - change (operations/puppet)

2015-08-28 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: admin: remove dupe 'haithams' from statistics-users
..

admin: remove dupe 'haithams' from statistics-users

I noticed the statistics-users group has a duplicate entry for user
'haithams'.  Remove the dupe entry.

Change-Id: I95c02b08920a82b45e14fd86a574cbb762bf0bfa
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/234669/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f13a8c8..9fc6779 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -177,7 +177,7 @@
 members: [dartar, halfak, ironholds, jdlrobson, jmorgan, bearloga,
   mattflaschen, mhurd, yurik, awight, jforrester,
   tnegrin, marktraceur, msyed, nuria, leila, gilles, haithams,
-  dbrant, tgr, haithams, handrade, dr0ptp4kt, brion, bsitzmann,
+  dbrant, tgr, handrade, dr0ptp4kt, brion, bsitzmann,
   deskana, jzerebecki, dduvall, nettrom, mforns, jkatz, 
ebernhardson,
   mlitn, tbayer, ananthrk, joal, tomasz, kartik, nikerabbit, 
pcoombe, madhuvishy,
   neilpquinn-wmf, maxsem]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95c02b08920a82b45e14fd86a574cbb762bf0bfa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] doc: Add link to CLDRPluralRuleParser - change (integration/docroot)

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

Change subject: doc: Add link to CLDRPluralRuleParser
..


doc: Add link to CLDRPluralRuleParser

Change-Id: I72d8634009ac2465b751709ccedfe2fa1b9b52bc
---
M org/wikimedia/doc/default.html
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/org/wikimedia/doc/default.html b/org/wikimedia/doc/default.html
index c262715..c0d8327 100644
--- a/org/wikimedia/doc/default.html
+++ b/org/wikimedia/doc/default.html
@@ -7,6 +7,7 @@
 
at-ease
CDB
+   CLDRPluralRuleParser
IPSet
OOjs core
OOjs UI

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72d8634009ac2465b751709ccedfe2fa1b9b52bc
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] doc: Add link to CLDRPluralRuleParser - change (integration/docroot)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: doc: Add link to CLDRPluralRuleParser
..

doc: Add link to CLDRPluralRuleParser

Change-Id: I72d8634009ac2465b751709ccedfe2fa1b9b52bc
---
M org/wikimedia/doc/default.html
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/docroot 
refs/changes/68/234668/1

diff --git a/org/wikimedia/doc/default.html b/org/wikimedia/doc/default.html
index c262715..c0d8327 100644
--- a/org/wikimedia/doc/default.html
+++ b/org/wikimedia/doc/default.html
@@ -7,6 +7,7 @@
 
at-ease
CDB
+   CLDRPluralRuleParser
IPSet
OOjs core
OOjs UI

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72d8634009ac2465b751709ccedfe2fa1b9b52bc
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Revert "Prevent the jumbling up of autocomments in RTL" - change (mediawiki/core)

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

Change subject: Revert "Prevent the jumbling up of autocomments in RTL"
..


Revert "Prevent the jumbling up of autocomments in RTL"

This reverts commit 6f8c3359ed6e531edd9eed81dd033514feb6a802.
which was causing page load issues due to a bug in Chrome and Safari.

Bug: T110716
Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0
(cherry picked from commit 8edf418974fca1f9f27f92ea36e8895be3ee3474)
---
M resources/src/mediawiki.legacy/shared.css
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 7e171cf..14fd286 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -417,11 +417,6 @@
 /* The auto-generated edit comments */
 .autocomment {
color: gray;
-   /* In RTL wikis, Latin heading sections can get jumbled with comments 
that
-  begin with Latin letters or numbers */
-   unicode-bidi: -moz-isolate;
-   unicode-bidi: -webkit-isolate;
-   unicode-bidi: isolate;
 }
 
 #pagehistory .history-user {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf20
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use the VirtualRESTService to configure Flow - change (mediawiki...Flow)

2015-08-28 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Use the VirtualRESTService to configure Flow
..

Use the VirtualRESTService to configure Flow

This allows Flow to use either Parsoid or RESTBase via the VRS, and
to share its configuration with Visual Editor.

Bug: T94574
Change-Id: I83ddb11a846d7caa426dd223179dbd81f3924719
---
M Flow.php
M includes/Parsoid/Utils.php
2 files changed, 101 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/67/234667/1

diff --git a/Flow.php b/Flow.php
index 2b12073..c54180c 100644
--- a/Flow.php
+++ b/Flow.php
@@ -236,11 +236,15 @@
 $wgFlowContentFormat = 'html'; // possible values: html|wikitext XXX bug 70148 
with wikitext
 
 // Flow Parsoid config
+// THESE VARIABLES ARE DEPRECATED.
+// Use the VirtualRESTService ($wgVirtualRestConfig) to configure
+// Parsoid and/or RESTBase.
 // Please note that this configuration is separate from VE's Parsoid config:
 // you'll have to fill out these variables too if you want to use Parsoid.
 $wgFlowParsoidURL = null; // also see $wgVisualEditorParsoidURL
 $wgFlowParsoidPrefix = null; // also see $wgVisualEditorParsoidPrefix
 $wgFlowParsoidTimeout = null; // In seconds; also see 
$wgVisualEditorParsoidTimeout
+$wgFlowParsoidHTTPProxy = null; // see also $wgVisualEditorParsoidHTTPProxy
 // Forward users' Cookie: headers to Parsoid. Required for private wikis 
(login required to read).
 // If the wiki is not private (i.e. $wgGroupPermissions['*']['read'] is true) 
this configuration
 // variable will be ignored.
diff --git a/includes/Parsoid/Utils.php b/includes/Parsoid/Utils.php
index b4299c6..125a387 100644
--- a/includes/Parsoid/Utils.php
+++ b/includes/Parsoid/Utils.php
@@ -11,10 +11,12 @@
 use Flow\Exception\NoParsoidException;
 use Flow\Exception\WikitextException;
 use Language;
+use MultiHttpClient;
 use OutputPage;
 use RequestContext;
 use Title;
 use User;
+use VirtualRESTServiceClient;
 
 abstract class Utils {
/**
@@ -33,13 +35,12 @@
}
 
try {
-   self::parsoidConfig();
+   return self::parsoid( $from, $to, $content, $title );
} catch ( NoParsoidException $e ) {
// If we have no parsoid config, fallback to the parser.
return self::parser( $from, $to, $content, $title );
}
 
-   return self::parsoid( $from, $to, $content, $title );
}
 
/**
@@ -79,52 +80,44 @@
 * @throws WikitextException When conversion is unsupported
 */
protected static function parsoid( $from, $to, $content, Title $title ) 
{
-   list( $parsoidURL, $parsoidPrefix, $parsoidTimeout, 
$parsoidForwardCookies ) = self::parsoidConfig();
+   $serviceClient = self::getServiceClient();
 
if ( $from == 'html' ) {
$from = 'html';
} elseif ( in_array( $from, array( 'wt', 'wikitext' ) ) ) {
-   $from = 'wt';
+   $from = 'wikitext';
} else {
throw new WikitextException( 'Unknown source format: ' 
. $from, 'process-wikitext' );
}
 
+   $prefixedDbTitle = $title->getPrefixedDBkey();
$params = array(
$from => $content,
-   'body' => true,
+   'bodyOnly' => 'true',
);
if ( $from === 'html' ) {
$params['scrubWikitext'] = 'true';
}
-
-   $prefixedDbTitle = $title->getPrefixedDBkey();
-   $request = \MWHttpRequest::factory(
-   $parsoidURL . '/' . $parsoidPrefix . '/' . urlencode( 
$prefixedDbTitle ),
-   array(
-   'method' => 'POST',
-   'postData' => wfArrayToCgi( $params ),
-   'timeout' => $parsoidTimeout,
-   'connectTimeout' => 'default',
-   )
+   $url = '/restbase/local/v1/transform/' . $from . '/to/' . $to . 
'/' .
+   urlencode( $prefixedDbTitle );
+   $request = array(
+   'method' => 'POST',
+   'url' => $url,
+   'body' => $params,
);
-   if ( $parsoidForwardCookies && !User::isEveryoneAllowed( 'read' 
) ) {
-   if ( PHP_SAPI === 'cli' ) {
-   // From the command line we need to generate a 
cookie
-   $cookies = 
self::generateForwardedCookieForCli();
+   $response = $serviceClient->run( $request );
+   if ( $response[

[MediaWiki-commits] [Gerrit] readme: Fix broken link syntax - change (CLDRPluralRuleParser)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: readme: Fix broken link syntax
..

readme: Fix broken link syntax

Follows-up 2b623a411b.

Change-Id: I0649276d31cff835a72717e4550a9495ee2b5494
---
M README.md
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/CLDRPluralRuleParser 
refs/changes/66/234666/1

diff --git a/README.md b/README.md
index 06ef24a..6f37ca9 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
 =
 
 CLDRPluralRuleParser is a PHP library for parsing
-[http://cldr.unicode.org/index/cldr-spec/plural-rules](plural rules) specified 
in the
-[http://cldr.unicode.org/index](CLDR project).
+[plural rules](http://cldr.unicode.org/index/cldr-spec/plural-rules) specified 
in the
+[CLDR project](http://cldr.unicode.org/index).
 
 This library does not contain the rules from the CLDR project, you have to get 
them yourself.
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0649276d31cff835a72717e4550a9495ee2b5494
Gerrit-PatchSet: 1
Gerrit-Project: CLDRPluralRuleParser
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 397c5ce..e0cd477 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 397c5ce..e0cd477
..


Syncronize VisualEditor: 397c5ce..e0cd477

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

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



diff --git a/VisualEditor b/VisualEditor
index 397c5ce..e0cd477 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 397c5ce65ed6675015e073a9d02a798395e7b8a2
+Subproject commit e0cd477c0927aa14a376fe0209c8510b5a1e3826

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

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

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


[MediaWiki-commits] [Gerrit] Add .gitattributes and minor clean up - change (generator-wikimedia-php-library)

2015-08-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Add .gitattributes and minor clean up
..

Add .gitattributes and minor clean up

template:
* Get rid of spurious line break in the generated phpcs.xml.
* Add .gitattributes to the boilerplate.

generator:
* Merge generator loops for templated/underscore-prefixed files
  (rename dotfiles to be _. for consistency).
* Remove unused 'self' variable'.

readme:
* Fix Travis CI badge.
* Fix "npm install" paragraph to match the actual command.
* Fix "yo" command (parameter is without 'generator-' prefix).

Change-Id: I59aeaffb6feffdbbbdb42d66800fbaaed9c2758c
---
M README.md
M generators/app/index.js
R generators/app/templates/_.editorconfig
R generators/app/templates/_.gitreview
M generators/app/templates/_phpcs.xml
A generators/app/templates/gitattributes
6 files changed, 24 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/generator-wikimedia-php-library 
refs/changes/65/234665/1

diff --git a/README.md b/README.md
index 12b80a2..348b47d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-[![Build 
Status](https://travis-ci.org/wikimedia/generator-wikimedia-php.svg?branch=master)](https://travis-ci.org/wikimedia/generator-wikimedia-php)
+[![Build 
Status](https://travis-ci.org/wikimedia/generator-wikimedia-php-library.svg?branch=master)](https://travis-ci.org/wikimedia/generator-wikimedia-php-library)
 
-# generator-wikimedia-php
+# generator-wikimedia-php-library
 
 This tool will help you start a PHP library that conforms to Wikimedia
 specifications.
@@ -9,7 +9,7 @@
 
 First, you'll need to make sure you have [Composer](https://getcomposer.org/)
 and [Yeoman](http://yeoman.io/). Yeoman is distributed as an
-[npm](https://npmjs.org) package. To install it, run:
+[npm](https://npmjs.org/) package. To install it, run:
 
 
 ```
@@ -20,7 +20,7 @@
 Composer](https://getcomposer.org/download/) in the Composer documentation.
 
 Once you have installed Yeoman and Composer, you are ready to install
-generator-wikimedia-php. To do that, run:
+generator-wikimedia-php-library. To do that, run:
 
 ```
 npm install -g generator-wikimedia-php-library
@@ -29,7 +29,7 @@
 ## Getting Started
 
 * Create a new directory or a bare git repository and `cd` into it.
-* Run `yo generator-wikimedia-library`.
+* Run `yo wikimedia-php-library`.
 
 Interactive prompts will guide you the rest of the way.
 
diff --git a/generators/app/index.js b/generators/app/index.js
index 7d370c7..6a4a387 100644
--- a/generators/app/index.js
+++ b/generators/app/index.js
@@ -8,7 +8,7 @@
 
 module.exports = yeoman.generators.Base.extend( {
prompting: function () {
-   var self = this, done = self.async(), prompts = [ {
+   var done = this.async(), prompts = [ {
name: 'author_name',
message : 'What is your name?'
}, {
@@ -62,6 +62,7 @@
 
[
'gitignore',
+   'gitattributes',
'travis.yml'
].forEach( function ( fileName ) {
this.fs.copy(
@@ -71,6 +72,8 @@
}.bind( this ) );
 
[
+   '_.gitreview',
+   '_.editorconfig',
'_Doxyfile',
'_composer.json',
'_phpcs.xml',
@@ -85,13 +88,6 @@
}.bind( this ) );
 
this.fs.copyTpl(
-   this.templatePath( '_gitreview' ),
-   this.destinationPath( '.gitreview' ),
-   this.props,
-   this.tplSettings
-   );
-
-   this.fs.copyTpl(
this.templatePath( '_Library.php' ),
this.destinationPath( 'src/' + this.props.name + '.php' 
),
this.props,
@@ -101,13 +97,6 @@
this.fs.copyTpl(
this.templatePath( '_LibraryTest.php' ),
this.destinationPath( 'tests/' + this.props.name + 
'Test.php' ),
-   this.props,
-   this.tplSettings
-   );
-
-   this.fs.copyTpl(
-   this.templatePath( '_editorconfig' ),
-   this.destinationPath( '.editorconfig' ),
this.props,
this.tplSettings
);
diff --git a/generators/app/templates/_editorconfig 
b/generators/app/templates/_.editorconfig
similarity index 100%
rename from generators/app/templates/_editorconfig
rename to generators/app/templates/_.editorconfig
diff --git a/generators/app/templates/_gitreview 
b/generators/app/templates/_.gitreview
similarity index 100%
rename from generators/app/templates/_gitreview
rename 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 397c5ce..e0cd477 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 397c5ce..e0cd477
..

Syncronize VisualEditor: 397c5ce..e0cd477

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


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

diff --git a/VisualEditor b/VisualEditor
index 397c5ce..e0cd477 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 397c5ce65ed6675015e073a9d02a798395e7b8a2
+Subproject commit e0cd477c0927aa14a376fe0209c8510b5a1e3826

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

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

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


[MediaWiki-commits] [Gerrit] Initial import - change (CLDRPluralRuleParser)

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

Change subject: Initial import
..


Initial import

Extracted from MediaWiki

Change-Id: Iefcb14e6a0d07fe18e1b621cbd767d986db0dcc1
---
A .gitattributes
A .gitignore
A COPYING
A Doxyfile
A README.md
A composer.json
A phpcs.xml
A phpunit.xml.dist
A src/Converter.php
A src/Converter/Expression.php
A src/Converter/Fragment.php
A src/Converter/Operator.php
A src/Error.php
A src/Evaluator.php
A src/Range.php
A tests/EvaluatorTest.php
16 files changed, 1,441 insertions(+), 0 deletions(-)

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



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

[MediaWiki-commits] [Gerrit] Revert "Prevent the jumbling up of autocomments in RTL" - change (mediawiki/core)

2015-08-28 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Revert "Prevent the jumbling up of autocomments in RTL"
..

Revert "Prevent the jumbling up of autocomments in RTL"

This reverts commit 6f8c3359ed6e531edd9eed81dd033514feb6a802.
which was causing page load issues due to a bug in Chrome and Safari.

Bug: T110716
Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0
(cherry picked from commit 8edf418974fca1f9f27f92ea36e8895be3ee3474)
---
M resources/src/mediawiki.legacy/shared.css
1 file changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 7e171cf..14fd286 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -417,11 +417,6 @@
 /* The auto-generated edit comments */
 .autocomment {
color: gray;
-   /* In RTL wikis, Latin heading sections can get jumbled with comments 
that
-  begin with Latin letters or numbers */
-   unicode-bidi: -moz-isolate;
-   unicode-bidi: -webkit-isolate;
-   unicode-bidi: isolate;
 }
 
 #pagehistory .history-user {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf20
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (apps...wikipedia)

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

Change subject: Localisation updates from https://translatewiki.net.
..


Localisation updates from https://translatewiki.net.

A bug in HHVM, T109402, causes most of the line endings to disappear in
translations. After exporting from TWN, the following commands were
executed to printy print the XML:

  find -name strings.xml|
  grep -Ev values/strings.xml|
  xargs -rd\\n -I{} sh -c 'xmllint --format "$1" -o "$1"' -- '{}'

TranslationTests.testAllTranslations() failed because a format specifier
was added to one string (T110243). This failure is a false positive as
it is always safe to add a format specifier, but not usually safe to
remove one without updating all translations since the argument would
not be supplied in the Java code. As a workaround, the tests pass after
running:

  find -name strings.xml|
  grep -Ev "values/|-qq/"|
  xargs -rd\\n sed -ri '/]*>[^<]*<\/string>/d'

Change-Id: I0da2b7f9aaf580d2983315361cfac3e132b73425
---
M app/src/main/res/values-af/strings.xml
M app/src/main/res/values-hu/strings.xml
M app/src/main/res/values-it/strings.xml
M app/src/main/res/values-ja/strings.xml
M app/src/main/res/values-pl/strings.xml
M app/src/main/res/values-pt-rBR/strings.xml
M app/src/main/res/values-pt/strings.xml
M app/src/main/res/values-ro/strings.xml
M app/src/main/res/values-sv/strings.xml
9 files changed, 59 insertions(+), 29 deletions(-)

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



diff --git a/app/src/main/res/values-af/strings.xml 
b/app/src/main/res/values-af/strings.xml
index 83e0dab..b85edfb 100644
--- a/app/src/main/res/values-af/strings.xml
+++ b/app/src/main/res/values-af/strings.xml
@@ -27,7 +27,7 @@
   Deel deur
   Verwyder alle gestoorde 
bladsye?
   Besig om blad te stoor...
-  Blad suksesvol gestoor
+  \"%s\" suksesvol gestoor vir aflyn 
lees
   Kon nie alle beelde stoor 
nie
   Herlaai gestoorde blad...
   Skrap
@@ -37,11 +37,12 @@
   Vertoon oortjies
   Lees in ander tale
   Stoor bladsy
-  Deel
+  Deel skakel
   Soek in blad
   Lettertipe en tema
-  Maak skakel oop
+  Maak oop
   Open in nuwe oortjie
+  Kopieer skakelligging
   Naby
   Opdateer naby
   Geen nabye bladsye hier!
@@ -96,7 +97,7 @@
   Verkeerde wagwoord
   Verkeerde gebruikersnaam
   Ongeldige gebruikersnaam
-  Suksesvolle 
Aanmelding!
+  Suksesvolle Aanmelding!
   Hierdie gebruiker is geblok
   Te veel aanmeldpogings. Wag \'n paar 
minute en probeer weer.
   Aanmelding het misluk :(
@@ -272,6 +273,15 @@
   Kon nie u wysiging stoor nie: 
%s
   Nuwe oortjie
   Maak oortjie toe
-  Boodskap: 
\"%s\"
-  Kode:\"%s\"
+  Druk en hou enige plek in die teks om 
dit te kopiëer en te deel.
+  Na u \'n interessante feit uitgelig het, 
probeer dit deel op u gunstelling netwerke!
+  Bekyk blad in blaaier
+  Sien die inhoudsopgawe enige tyd deur 
hierdie knop te druk, of om dit van die regter rand van die skerm te 
sleep.
+  Die bediener kon nie die versoek 
voltooi nie.
+  Antwoord van die bediener was nie 
reg geformateer nie.
+  \'n Onbekende fout het voorgekom.
+  Boodskap: \"%s\"
+  Kode: \"%s\"
+  Adres gekopiëer na knipbord.
+  Gaan voort na artikel
 
diff --git a/app/src/main/res/values-hu/strings.xml 
b/app/src/main/res/values-hu/strings.xml
index c489347..9c53a03 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -27,17 +27,22 @@
   Megosztás ezzel:
   Törlöd az összes mentett 
lapot?
   Oldal mentése…
-  A lap mentése sikeres
+  „%s” elmentve offline olvasásra
   Nem sikerült az összes kép 
mentése
   Mentett lapok frissítése…
   Törlés
   Mentett oldal(ak) törölve
-  Keresés
+  Mentett lapok keresése
   Nem található a kérésnek 
megfelelő lap.
+  Fülek megjelenítése
   Olvasás más nyelven
   Lap mentése
-  Megosztás
+  Link megosztása
+  Keresés a lapon
   Betűtípus és téma
+  Megnyitás
+  Megnyitás új fülön
+  Hivatkozás címének másolása
   Közeli
   Közeliek frissítése
   Nincsenek közeli lapok!
@@ -53,6 +58,7 @@
   Helyek megtekintése térképen
   Utoljára frissítve: %s
   A tartalom a CC BY-SA 3.0 
licenc alatt elérhető, ha nincs másképp feltüntetve
+  A mentéssel elfogadod a 
felhasználási 
feltételeket és visszavonhatatlan engedélyt adsz annak 
felhasználására a CC BY-SA 
3.0 licenc alatt.
   Wikipédia-nyelv
   Keresés
   Rendszer nyelv 
használata
@@ -74,7 +80,9 @@
   Tartalomjegyzék
   Nincs találat
   Automatikus spam kivédése 
érdekében írd be az alább megjelenő szót
+  Ismételd meg a fenti 
szavakat
   Add meg a CAPTCHA-t
+  Érintsd meg a CAPTCHA-t az 
újratöltéshez
   Bejelentkezés
   Felhasználónév
   Jelszó
@@ -85,7 +93,7 @@
   Hibás jelszó
   Helytelen felhasználónév
   Érvénytelen felhasználónév
-  Sikeres 

[MediaWiki-commits] [Gerrit] Add more config methods and implement in standalone using lo... - change (VisualEditor/VisualEditor)

2015-08-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Add more config methods and implement in standalone using 
localStorage
..

Add more config methods and implement in standalone using localStorage

Add setConfig, and make ve.config switch between getting and setting
based on arguments.

Change-Id: I5704a0e3e08291903e960235f57243b2da147901
---
M src/init/sa/ve.init.sa.Platform.js
M src/init/ve.init.Platform.js
M src/ve.utils.js
3 files changed, 54 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/09/234609/1

diff --git a/src/init/sa/ve.init.sa.Platform.js 
b/src/init/sa/ve.init.sa.Platform.js
index f4c82a4..0e435d5 100644
--- a/src/init/sa/ve.init.sa.Platform.js
+++ b/src/init/sa/ve.init.sa.Platform.js
@@ -69,6 +69,39 @@
  */
 ve.init.sa.Platform.prototype.getMessage = $.i18n;
 
+/**
+ * @inheritdoc
+ */
+ve.init.sa.Platform.prototype.getConfig = function ( keys ) {
+   var i, l, values;
+   if ( Array.isArray( keys ) ) {
+   values = {};
+   for ( i = 0, l = keys.length; i < l; i++ ) {
+   values[keys[i]] = this.getConfig( keys[i] );
+   }
+   } else {
+   return JSON.parse( localStorage.getItem( 've-' + keys ) );
+   }
+   return values;
+};
+
+/**
+ * @inheritdoc
+ */
+ve.init.sa.Platform.prototype.setConfig = function ( keyOrValueMap, value ) {
+   var i;
+   if ( typeof keyOrValueMap === 'object' ) {
+   for ( i in keyOrValueMap ) {
+   if ( keyOrValueMap.hasOwnProperty( i ) ) {
+   this.setConfig( i, keyOrValueMap[i] );
+   }
+   }
+   } else {
+   localStorage.setItem( 've-' + keyOrValueMap, JSON.stringify( 
value ) );
+   }
+   return true;
+};
+
 /** @inheritdoc */
 ve.init.sa.Platform.prototype.addParsedMessages = function ( messages ) {
var key;
diff --git a/src/init/ve.init.Platform.js b/src/init/ve.init.Platform.js
index 9622457..23231ea 100644
--- a/src/init/ve.init.Platform.js
+++ b/src/init/ve.init.Platform.js
@@ -129,6 +129,16 @@
 ve.init.Platform.prototype.getConfig = null;
 
 /**
+ * Get a config value from the platform.
+ *
+ * @method
+ * @abstract
+ * @param {string|Object} keyOrValueMap Key to set value for, or object 
mapping keys to values
+ * @param {Mixed} [value] Value to set (optional, only in use when key is a 
string)
+ */
+ve.init.Platform.prototype.setConfig = null;
+
+/**
  * Add multiple messages to the localization system.
  *
  * @method
diff --git a/src/ve.utils.js b/src/ve.utils.js
index 1c9748e..be56686 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -412,15 +412,21 @@
 };
 
 /**
- * Get a config value.
+ * Get or set a config value.
  *
- * @param {string|string[]} key Config key, or list of keys
- * @return {Mixed|Object} Config value, or keyed object of config values if 
list of keys provided
+ * @param {string|string[]|Object} key Config key, list of keys or object 
mapping keys to values
+ * @param {Mixed} [value] Value to set, if setting and key is a string
+ * @return {Mixed|Object|boolean} Config value, keyed object of config values 
if list of keys provided,
+ *  or success boolean if setting.
  */
-ve.config = function () {
+ve.config = function ( key, value ) {
// Avoid using bind because ve.init.platform doesn't exist yet.
// TODO: Fix dependency issues between ve.js and ve.init.platform
-   return ve.init.platform.getConfig.apply( ve.init.platform, arguments );
+   if ( value === undefined && ( typeof key === 'string' || Array.isArray( 
key ) ) ) {
+   return ve.init.platform.getConfig.apply( ve.init.platform, 
arguments );
+   } else {
+   return ve.init.platform.setConfig.apply( ve.init.platform, 
arguments );
+   }
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5704a0e3e08291903e960235f57243b2da147901
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] Implement getConfig and setConfig in MW - change (mediawiki...VisualEditor)

2015-08-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Implement getConfig and setConfig in MW
..

Implement getConfig and setConfig in MW

This can be merged before the core commit I5704a0e3e0.

Change-Id: I0d6c9317a91dc02566d8877bd1aefae581213cbb
---
M modules/ve-mw/init/ve.init.mw.Platform.js
1 file changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.Platform.js 
b/modules/ve-mw/init/ve.init.mw.Platform.js
index 237801f..690e0f2 100644
--- a/modules/ve-mw/init/ve.init.mw.Platform.js
+++ b/modules/ve-mw/init/ve.init.mw.Platform.js
@@ -58,6 +58,26 @@
  */
 ve.init.mw.Platform.prototype.getMessage = mw.msg.bind( mw );
 
+/**
+ * @method
+ * @inheritdoc
+ */
+ve.init.mw.Platform.prototype.getConfig = mw.user.options.get.bind( 
mw.user.options );
+
+/**
+ * @method
+ * @inheritdoc
+ */
+ve.init.mw.Platform.prototype.setConfig = function ( key, value ) {
+   var result = mw.user.options.set( key, value );
+   if ( typeof key === 'object' ) {
+   new mw.Api().saveOptions( key );
+   } else {
+   new mw.Api().saveOption( key, value );
+   }
+   return result;
+};
+
 /** @inheritdoc */
 ve.init.mw.Platform.prototype.addParsedMessages = function ( messages ) {
var key;

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

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

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


[MediaWiki-commits] [Gerrit] Store find and replace toggle states in user config - change (VisualEditor/VisualEditor)

2015-08-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Store find and replace toggle states in user config
..

Store find and replace toggle states in user config

Bug: T110541
Change-Id: Ia680b853363797d236ed68ba74e6a14940c849d3
---
M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/10/234610/1

diff --git a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js 
b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
index 6705b0d..fe4fa69 100644
--- a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
+++ b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
@@ -70,11 +70,13 @@
} );
this.matchCaseToggle = new OO.ui.ToggleButtonWidget( {
icon: 'searchCaseSensitive',
-   iconTitle: ve.msg( 'visualeditor-find-and-replace-match-case' )
+   iconTitle: ve.msg( 'visualeditor-find-and-replace-match-case' ),
+   value: ve.config( 'findAndReplace-matchCase' )
} );
this.regexToggle = new OO.ui.ToggleButtonWidget( {
icon: 'searchRegularExpression',
-   iconTitle: ve.msg( 
'visualeditor-find-and-replace-regular-expression' )
+   iconTitle: ve.msg( 
'visualeditor-find-and-replace-regular-expression' ),
+   value: ve.config( 'findAndReplace-regex' )
} );
 
this.previousButton = new OO.ui.ButtonWidget( {
@@ -256,6 +258,8 @@
this.updateFragments();
this.renderFragments();
this.highlightFocused( true );
+   ve.config( 'findAndReplace-matchCase', this.matchCaseToggle.getValue() 
);
+   ve.config( 'findAndReplace-regex', this.regexToggle.getValue() );
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia680b853363797d236ed68ba74e6a14940c849d3
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] Add missing dependency to 'mediawiki.notify' - change (mediawiki...UniversalLanguageSelector)

2015-08-28 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Add missing dependency to 'mediawiki.notify'
..

Add missing dependency to 'mediawiki.notify'

ext.uls.ime.js uses mw.notify().

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


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

diff --git a/Resources.php b/Resources.php
index 9f092af..86563c4 100644
--- a/Resources.php
+++ b/Resources.php
@@ -49,6 +49,7 @@
'ext.uls.mediawiki',
'ext.uls.messages',
'jquery.ime',
+   'mediawiki.notify',
),
'messages' => array(
'uls-ime-helppage',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If435d6934df6edf8aff5431cb7a303cc6361a472
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] build: Add csslint to npm testing - change (mediawiki...PronunciationRecording)

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

Change subject: build: Add csslint to npm testing
..


build: Add csslint to npm testing

Change-Id: I3411741785e99202617987347ff6c9273b60623d
---
A .csslintrc
M Gruntfile.js
M package.json
3 files changed, 21 insertions(+), 4 deletions(-)

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



diff --git a/.csslintrc b/.csslintrc
new file mode 100644
index 000..e777c7f
--- /dev/null
+++ b/.csslintrc
@@ -0,0 +1,11 @@
+{
+   "adjoining-classes": false,
+   "box-model": false,
+   "box-sizing": false,
+   "fallback-colors": false,
+   "important": false,
+   "outline-none": false,
+   "qualified-headings": false,
+   "universal-selector": false,
+   "unqualified-attributes": false
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 456e3ef..362c2f7 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,6 +7,7 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
@@ -19,12 +20,15 @@
},
all: [
'*.js',
-   '{.docs,build}/**/*.js',
-   'resources/*.js'
+   'resources/**/*.js',
+   '!resources/mediawiki.libs.recorderjs/*'
]
},
jscs: {
src: '<%= jshint.all %>'
+   },
+   csslint: {
+   src: 'resources/**/*.css'
},
jsonlint: {
all: 'i18n/*.json'
@@ -34,14 +38,15 @@
},
watch: {
files: [
-   '.{jscsrc,jshintignore,jshintrc}',
+   '.{jshintignore,jshintrc,jscsrc,csslintrc}',
'<%= jshint.all %>',
+   '<%= csslint.all %>',
'<%= jsonlint.all %>'
],
tasks: 'test'
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'csslint', 'jsonlint', 
'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index f43a534..eb789b4 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-banana-checker": "0.2.2",
+"grunt-contrib-csslint": "0.5.0",
 "grunt-contrib-jshint": "0.11.2",
 "grunt-contrib-watch": "0.6.1",
 "grunt-jscs": "2.1.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3411741785e99202617987347ff6c9273b60623d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PronunciationRecording
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Mattflaschen 
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 "Prevent the jumbling up of autocomments in RTL" - change (mediawiki/core)

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

Change subject: Revert "Prevent the jumbling up of autocomments in RTL"
..


Revert "Prevent the jumbling up of autocomments in RTL"

This reverts commit 6f8c3359ed6e531edd9eed81dd033514feb6a802.
which was causing page load issues due to a bug in Chrome and Safari.

Bug: T110716
Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0
---
M resources/src/mediawiki.legacy/shared.css
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 7e171cf..14fd286 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -417,11 +417,6 @@
 /* The auto-generated edit comments */
 .autocomment {
color: gray;
-   /* In RTL wikis, Latin heading sections can get jumbled with comments 
that
-  begin with Latin letters or numbers */
-   unicode-bidi: -moz-isolate;
-   unicode-bidi: -webkit-isolate;
-   unicode-bidi: isolate;
 }
 
 #pagehistory .history-user {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ab1bf1f52474d8ab43d34628df5d972e817e8f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >