[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Tree modifications: don't presume the tree is in sync with t...

2017-05-20 Thread Divec (Code Review)
Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354888 )

Change subject: Tree modifications: don't presume the tree is in sync with the 
linear model
..

Tree modifications: don't presume the tree is in sync with the linear model

Change-Id: Ia79e9a393309b1dec024869f15b19218f463fd7d
---
M src/ce/ve.ce.ContentBranchNode.js
M tests/ce/ve.ce.Surface.test.js
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/88/354888/1

diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index 6e73bf5..8c19362 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -335,6 +335,9 @@
unicornInfo.unicorns = null;
}
} else {
+   if ( item.length === undefined ) {
+   throw new Error( 'Unexpected item type' );
+   }
if ( buffer !== '' ) {
current.appendChild( doc.createTextNode( buffer 
) );
buffer = '';
diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js
index cb53164..fd78f8a 100644
--- a/tests/ce/ve.ce.Surface.test.js
+++ b/tests/ce/ve.ce.Surface.test.js
@@ -179,6 +179,22 @@
this.preventDefault = this.stopPropagation = function () {};
 };
 
+QUnit.test( 'Transaction with two removals in the same CBN', function ( assert 
) {
+   var tx,
+   view = ve.test.utils.createSurfaceViewFromHtml( 
'abcdefghijklmnopx' ),
+   doc = view.model.documentModel,
+   txBuilder = new ve.dm.TransactionBuilder();
+
+   txBuilder.pushRetain( 1 );
+   txBuilder.pushReplace( doc, 1, 3, [] );
+   txBuilder.pushRetain( 4 );
+   txBuilder.pushReplace( doc, 8, 11, [] );
+   txBuilder.pushRetain( 4 );
+   tx = txBuilder.getTransaction();
+   view.model.change( tx );
+   assert.ok( true, 'No crash' );
+} );
+
 QUnit.test( 'special key down: backspace/delete', function ( assert ) {
var i,
emptyList = '',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia79e9a393309b1dec024869f15b19218f463fd7d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Style tweaks

2017-05-20 Thread Harej (Code Review)
Harej has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354887 )

Change subject: Style tweaks
..

Style tweaks

- Tighter bounding / visual uniformity for list entries
- Making chrome consistent between single-column and multi-column
  lists
- Changing some usages of the magnifying glass icon to the pencil
  icon

Change-Id: I3019069213a183ff441c15482a24813431c21b44
---
M extension.json
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.hubtheme.js
M modules/ext.CollaborationKit.list.styles.less
M modules/ext.CollaborationKit.list.ui.js
6 files changed, 65 insertions(+), 109 deletions(-)


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

diff --git a/extension.json b/extension.json
index db5658e..00fc2de 100644
--- a/extension.json
+++ b/extension.json
@@ -182,6 +182,7 @@
"mediawiki.api.edit",
"oojs-ui",
"oojs-ui.styles.icons-movement",
+   "oojs-ui.styles.icons-editing-core",
"mediawiki.widgets",
"mediawiki.widgets.UserInputWidget",
"jquery.ui.sortable",
diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index f39a580..d950f10 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -372,8 +372,9 @@
} elseif ( $item->link !== false ) {
$titleForItem = 
Title::newFromText( $item->link );
}
+   $adjustedIconWidth = $iconWidth + 2;
$text .= Html::openElement( 'div', [
-   'style' => 
"min-height:{$iconWidth}px",
+   'style' => 
"height:{$adjustedIconWidth}px; min-height:{$adjustedIconWidth}px",
'class' => 'mw-ck-list-item',
'data-collabkit-item-title' => 
$item->title,
'data-collabkit-item-id' => 
$colId . '-' . $itemCounter,
diff --git a/modules/ext.CollaborationKit.hub.styles.less 
b/modules/ext.CollaborationKit.hub.styles.less
index 9ac5995..bea4cad 100644
--- a/modules/ext.CollaborationKit.hub.styles.less
+++ b/modules/ext.CollaborationKit.hub.styles.less
@@ -22,6 +22,10 @@
margin: auto;
}
 
+   div ul {
+   margin: 0;
+   }
+
.mw-ck-file-image {
height: 50px;
overflow: hidden;
@@ -32,9 +36,9 @@
}
.mw-ck-toc-label {
font-weight: bold;
-   margin: 0 0 1em;
-   border-bottom: 3px solid;
+   margin: 0 0 .5em;
width: 33%;
+
}
.mw-ck-icon {
height: 50px;
@@ -67,7 +71,7 @@
}
 
.mw-ck-hub-section-main {
-   padding-top: .25em;
+   padding-top: 1.125em;
}
}
.mw-ck-hub-section-buttons {
@@ -106,7 +110,7 @@
width: 25%;
 
h3 {
-   margin: 0 0 .5em;
+   margin: 0 0 1.125em;
padding: 0;
text-align: center;
}
diff --git a/modules/ext.CollaborationKit.hubtheme.js 
b/modules/ext.CollaborationKit.hubtheme.js
index e727919..f3fc2c2 100644
--- a/modules/ext.CollaborationKit.hubtheme.js
+++ b/modules/ext.CollaborationKit.hubtheme.js
@@ -291,14 +291,14 @@
 
// Defining buttons
colourBrowserButton = new OO.ui.ButtonWidget( {
-   icon: 'search',
+   icon: 'edit',
framed: false,
classes: [ 'mw-ck-hubtheme-widget-inlinebutton' ]
} );
colourBrowserButton.on( 'click', openColourBrowser );
 
hubimageBrowserButton = new OO.ui.ButtonWidget( {
-   icon: 'search',
+   icon: 'edit',
framed: false,
classes: [ 'mw-ck-hubtheme-widget-inlinebutton' ]
} );
diff --git a/modules/ext.CollaborationKit.list.styles.less 
b/modules/ext.CollaborationKit.list.styles.less
index 7f3265c..e509a7d 100644
--- a/modules/ext.CollaborationKit.list.styles.less
+++ b/modules/ext.CollaborationKit.list.styles.less
@@ -3,10 +3,48 @@
 /* Styles needed when transcluding list content */
 
 .mw-ck-list-item {
-   margin-bottom: 0.5em;
+  

[MediaWiki-commits] [Gerrit] mediawiki...LockDownEnglishPages[master]: Require newer extension registration

2017-05-20 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354886 )

Change subject: Require newer extension registration
..

Require newer extension registration

Change-Id: I463d470d1b2a93f2057a169ba0fa25cb96bb2516
---
A LockDownEnglishPages.class.php
D LockDownEnglishPages.php
A extension.json
3 files changed, 61 insertions(+), 53 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LockDownEnglishPages 
refs/changes/86/354886/1

diff --git a/LockDownEnglishPages.class.php b/LockDownEnglishPages.class.php
new file mode 100644
index 000..34faa16
--- /dev/null
+++ b/LockDownEnglishPages.class.php
@@ -0,0 +1,39 @@
+
+ * @license http://en.wikipedia.org/wiki/Public_domain Public domain
+ * @see http://bugzilla.shoutwiki.com/show_bug.cgi?id=54
+ */
+
+class LockDownEnglishPages {
+
+   function wfLockDownEnglishPages( &$title, &$user, $action, &$result ) {
+   // We want to prevent editing of MediaWiki pages for users who 
have the
+   // editinterface right but who are not staff when the action is 
'edit'
+   if (
+   $title->getNamespace() == NS_MEDIAWIKI &&
+   $user->isAllowed( 'editinterface' ) &&
+   !in_array( 'staff', $user->getEffectiveGroups() ) &&
+   $action == 'edit'
+   )
+   {
+   $pageTitle = $title->getDBkey();
+   if (
+   preg_match( '/\/en/', $pageTitle ) || // page 
title has /en in it
+   !preg_match( '/\//', $pageTitle ) // page title 
has no / in it
+   )
+   {
+   $result = false;
+   return false;
+   }
+   }
+   return true;
+   }
+}
diff --git a/LockDownEnglishPages.php b/LockDownEnglishPages.php
deleted file mode 100644
index a25ddaa..000
--- a/LockDownEnglishPages.php
+++ /dev/null
@@ -1,53 +0,0 @@
-
- * @license http://en.wikipedia.org/wiki/Public_domain Public domain
- * @see http://bugzilla.shoutwiki.com/show_bug.cgi?id=54
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die();
-}
-
-// Extension credits that will show up on Special:Version
-$wgExtensionCredits['other'][] = array(
-   'name' => 'Lock Down English Pages',
-   'version' => '0.1',
-   'author' => 'Jack Phoenix',
-   'descriptionmsg' => 'lockdownenglishpages-desc',
-   'url' => 
'https://www.mediawiki.org/wiki/Extension:LockDownEnglishPages',
-);
-
-$wgMessagesDirs['LockDownEnglishPages'] = __DIR__ . '/i18n';
-
-$wgHooks['userCan'][] = 'wfLockDownEnglishPages';
-
-function wfLockDownEnglishPages( &$title, &$user, $action, &$result ) {
-   // We want to prevent editing of MediaWiki pages for users who have the
-   // editinterface right but who are not staff when the action is 'edit'
-   if (
-   $title->getNamespace() == NS_MEDIAWIKI &&
-   $user->isAllowed( 'editinterface' ) &&
-   !in_array( 'staff', $user->getEffectiveGroups() ) &&
-   $action == 'edit'
-   )
-   {
-   $pageTitle = $title->getDBkey();
-   if (
-   preg_match( '/\/en/', $pageTitle ) || // page title has 
/en in it
-   !preg_match( '/\//', $pageTitle ) // page title has no 
/ in it
-   )
-   {
-   $result = false;
-   return false;
-   }
-   }
-   return true;
-}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..84e5297
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,22 @@
+{
+   "name": "LockDownEnglishPages",
+   "version": "0.2.0",
+   "authors": [
+   "Jack Phoenix"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:LockDownEnglishPages;,
+   "descriptionmsg": "lockdownenglishpages-desc",
+   "type": "other",
+   "MessagesDirs": {
+   "LockDownEnglishPages": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "LockDownEnglishPages": "LockDownEnglishPages.class.php"
+   },
+   "Hooks": {
+   "userCan": "LockDownEnglishPages::wfLockDownEnglishPages"
+   },
+   "manifest_version": 1
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I463d470d1b2a93f2057a169ba0fa25cb96bb2516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LockDownEnglishPages
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

___

[MediaWiki-commits] [Gerrit] mediawiki...SoftwareVersion[master]: [WIP] Generalize SoftwareVersion so it's easier to use by th...

2017-05-20 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354885 )

Change subject: [WIP] Generalize SoftwareVersion so it's easier to use by 
third-parties
..

[WIP] Generalize SoftwareVersion so it's easier to use by third-parties

Change-Id: Ief2c8ea7bb7ca8987c9267c274ffd0295ab5266f
---
R SoftwareVersion.class.php
M extension.json
M i18n/en.json
M i18n/qqq.json
4 files changed, 33 insertions(+), 14 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SoftwareVersion 
refs/changes/85/354885/1

diff --git a/ShoutWikiSoftwareVersion.class.php b/SoftwareVersion.class.php
similarity index 81%
rename from ShoutWikiSoftwareVersion.class.php
rename to SoftwareVersion.class.php
index 60a6c90..b16dbee 100644
--- a/ShoutWikiSoftwareVersion.class.php
+++ b/SoftwareVersion.class.php
@@ -10,7 +10,7 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-class ShoutWikiSoftwareVersion {
+class SoftwareVersion {
 
/**
 * Adds ShoutWiki component into Special:Version and sets MW's version 
to $wgVersion
@@ -18,8 +18,8 @@
 * @param array $software Array of software information
 * @return bool
 */
-   public static function addShoutWikiInfo( &$software ) {
-   global $wgVersion, $IP;
+   public static function addSVNInfo( &$software ) {
+   global $wgVersion, $wgCanonicalServer, $wgSitename, $IP;
 
// Set MW version to $wgVersion
$software['[https://www.mediawiki.org/ MediaWiki]'] = 
$wgVersion;
@@ -48,8 +48,14 @@
$json = json_encode( $svnInfo );
$exploded = explode( $newline, $svnInfo );
 
-   // Add ShoutWiki component (revision number and last changed 
date)
-   $software['[http://www.shoutwiki.com/ ShoutWiki]'] =
+   if ( $this->getMsg( 'softwareversion-wiki-link' )->isDisabled() 
) {
+   $wikiLink = "[" . $wgCanonicalServer . " " . 
$wgSitename . "]";
+   } else {
+   $wikiLink = 
wfMessage('softwareversion-wiki-link')->text();
+   }
+
+   // Add component (revision number and last changed date)
+   $software[$wikiLink] =
str_replace( 'Revision: ', 'r', $exploded[6] ) /* 
Revision */ .
' (' .
str_replace( 'Last Changed Date: ', '', preg_replace( 
'/ \(.*\)/', '', $exploded[11] ) ) ./* Last Changed Date */
@@ -58,4 +64,4 @@
return true;
}
 
-}
\ No newline at end of file
+}
diff --git a/extension.json b/extension.json
index 79bda3d..f1a81b2 100644
--- a/extension.json
+++ b/extension.json
@@ -1,15 +1,16 @@
 {
"name": "SoftwareVersion",
-   "version": "0.6.1",
+   "version": "0.6.2",
"author": [
-   "Jack Phoenix"
+   "Jack Phoenix",
+   "Samantha Nguyen"
],
"license-name": "GPL-2.0+",
"url": "https://www.mediawiki.org/wiki/Extension:SoftwareVersion;,
"descriptionmsg": "softwareversion-desc",
"type": "other",
"AutoloadClasses": {
-   "ShoutWikiSoftwareVersion": "ShoutWikiSoftwareVersion.class.php"
+   "SoftwareVersion": "SoftwareVersion.class.php"
},
"MessagesDirs": {
"SoftwareVersion": [
@@ -18,7 +19,7 @@
},
"Hooks": {
"SoftwareInfo": [
-   "ShoutWikiSoftwareVersion::addShoutWikiInfo"
+   "SoftwareVersion::addSVNInfo"
]
},
"manifest_version": 1
diff --git a/i18n/en.json b/i18n/en.json
index cc962d2..273f436 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,4 +1,10 @@
 {
-   "@metadata": {},
-   "softwareversion-desc": "Customizes [[Special:Version]] for ShoutWiki"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix",
+   "Samantha Nguyen"
+   ]
+   },
+   "softwareversion-desc": "Customizes [[Special:Version]], originally for 
ShoutWiki but can be used by other third-parties.",
+   "softwareversion-wiki-link": ""
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index e870784..9633922 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,4 +1,10 @@
 {
-   "@metadata": {},
-   "softwareversion-desc": 
"{{desc|name=SoftwareVersion|url=https://www.mediawiki.org/wiki/Extension:SoftwareVersion}};
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix",
+   "Samantha Nguyen"
+   ]
+   },
+   "softwareversion-desc": 
"{{desc|name=SoftwareVersion|url=https://www.mediawiki.org/wiki/Extension:SoftwareVersion}};,
+   "softwareversion-wiki-link": "Wiki link to be customized so it 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalContributions[master]: Update to newer extension registration

2017-05-20 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354884 )

Change subject: Update to newer extension registration
..

Update to newer extension registration

Merged list of extension authors from GlobalContribs as well a step
forward for merging GlobalContribs into GlobalContributions.

Bug: T154852
Change-Id: I8018e4bd1097867280ea656b9d37a2f3b8507264
---
D GlobalContributions.i18n.php
D GlobalContributions.php
A extension.json
3 files changed, 30 insertions(+), 76 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalContributions 
refs/changes/84/354884/1

diff --git a/GlobalContributions.i18n.php b/GlobalContributions.i18n.php
deleted file mode 100644
index c118849..000
--- a/GlobalContributions.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShimafc1b7c22bda0ff6' ) ) {
-   function wfJsonI18nShimafc1b7c22bda0ff6( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShimafc1b7c22bda0ff6';
-}
diff --git a/GlobalContributions.php b/GlobalContributions.php
deleted file mode 100644
index 91c2a10..000
--- a/GlobalContributions.php
+++ /dev/null
@@ -1,41 +0,0 @@
- __FILE__,
-   'name' => 'GlobalContributions',
-   'author' => 'Kunal Mehta',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:GlobalContributions',
-   'descriptionmsg' => 'guc-desc',
-   'version' => '0.2.0',
-);
-
-$wgAutoloadClasses['GlobalUserContribs'] = __DIR__ . 
'/GlobalContributions.body.php';
-$wgAutoloadClasses['SpecialGlobalContributions'] = __DIR__ . 
'/SpecialGlobalContributions.php';
-
-$wgSpecialPages['GlobalContributions'] = 'SpecialGlobalContributions';
-$wgMessagesDirs['GlobalContributions'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['GlobalContributions'] = __DIR__ . 
'/GlobalContributions.i18n.php';
-$wgExtensionMessagesFiles['GlobalContributionsAlias'] = __DIR__ . 
'/GlobalContributions.alias.php';
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..c442687
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,30 @@
+{
+   "name": "GlobalContributions",
+   "version": "0.2.1",
+   "author": [
+   "Kunal Mehta",
+   "Adam Carter",
+   "George Barnick",
+   "Jack Phoenix"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:GlobalContributions;,
+   "descriptionmsg": "guc-desc",
+   "license-name": "GPL-2.0",
+   "type": "specialpage",
+   "AutoloadClasses": {
+   "GlobalUserContribs": "GlobalContributions.body.php",
+   "SpecialGlobalContributions": "SpecialGlobalContributions.php"
+   },
+   "MessagesDirs": {
+   "GlobalContributions": [
+   "i18n"
+   ]
+   },
+   "ExtensionMessagesFiles": {
+   "GlobalContributionsAlias": "GlobalContribs.alias.php"
+   },
+   "SpecialPages": {
+   "GlobalContributions": "SpecialGlobalContributions"
+   },
+   "manifest_version": 1
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8018e4bd1097867280ea656b9d37a2f3b8507264
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalContributions
Gerrit-Branch: master
Gerrit-Owner: 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalContribs[master]: Remove outdated README.md in favor of documentation at media...

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354883 )

Change subject: Remove outdated README.md in favor of documentation at 
mediawiki.org
..


Remove outdated README.md in favor of documentation at mediawiki.org

See documentation available at mediawiki.org at
https://www.mediawiki.org/wiki/Extension:GlobalContribs

Bug: T150634
Change-Id: I8b9b6652d286517fbeb5aabc5f5b81b3c64dd50a
---
D README.md
M extension.json
2 files changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/README.md b/README.md
deleted file mode 100644
index ace38e0..000
--- a/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-#GlobalContribs
-GlobalContribs introduces two new special pages to MediaWiki, 
GlobalContributions and GlobalEditcount. Both behave exactly the same as their 
standard counterparts.
-
-There is just one config variable, ```$gcwikis```, a list of DB names to look 
for contribs in.
-
-# Documentation
-Read the docs at MediaWiki.org for more information. 
https://www.mediawiki.org/wiki/Extension:GlobalContribs
diff --git a/extension.json b/extension.json
index 09c49e9..bdfdcb1 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "GlobalContribs",
-   "version": "1.1.1",
+   "version": "1.1.2",
"author": [
"Adam Carter",
"George Barnick",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b9b6652d286517fbeb5aabc5f5b81b3c64dd50a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalContribs
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalContribs[master]: Remove outdated README.md in favor of documentation at media...

2017-05-20 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354883 )

Change subject: Remove outdated README.md in favor of documentation at 
mediawiki.org
..

Remove outdated README.md in favor of documentation at mediawiki.org

See documentation available at mediawiki.org at
https://www.mediawiki.org/wiki/Extension:GlobalContribs

Bug: T150634
Change-Id: I8b9b6652d286517fbeb5aabc5f5b81b3c64dd50a
---
D README.md
M extension.json
2 files changed, 1 insertion(+), 8 deletions(-)


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

diff --git a/README.md b/README.md
deleted file mode 100644
index ace38e0..000
--- a/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-#GlobalContribs
-GlobalContribs introduces two new special pages to MediaWiki, 
GlobalContributions and GlobalEditcount. Both behave exactly the same as their 
standard counterparts.
-
-There is just one config variable, ```$gcwikis```, a list of DB names to look 
for contribs in.
-
-# Documentation
-Read the docs at MediaWiki.org for more information. 
https://www.mediawiki.org/wiki/Extension:GlobalContribs
diff --git a/extension.json b/extension.json
index 09c49e9..bdfdcb1 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "GlobalContribs",
-   "version": "1.1.1",
+   "version": "1.1.2",
"author": [
"Adam Carter",
"George Barnick",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b9b6652d286517fbeb5aabc5f5b81b3c64dd50a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalContribs
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Refreshed[master]: v3.2.0 - Fix #site-notice interaction with #header-wrapper

2017-05-20 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354882 )

Change subject: v3.2.0 - Fix #site-notice interaction with #header-wrapper
..

v3.2.0 - Fix #site-notice interaction with #header-wrapper

Bug: T152939
Change-Id: I7d5640acc7a04f34222b92369000198895811303
---
M refreshed/mediawiki/skinning.interface.css
M skin.json
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Refreshed 
refs/changes/82/354882/1

diff --git a/refreshed/mediawiki/skinning.interface.css 
b/refreshed/mediawiki/skinning.interface.css
index c66e944..44179e3 100644
--- a/refreshed/mediawiki/skinning.interface.css
+++ b/refreshed/mediawiki/skinning.interface.css
@@ -5,6 +5,10 @@
font-size: 0.8em;
 }
 
+#site-notice {
+   display: inline-block;
+}
+
 #localNotice {
margin-bottom: 0em !important;
 }
diff --git a/skin.json b/skin.json
index 561cda1..87312f3 100644
--- a/skin.json
+++ b/skin.json
@@ -1,6 +1,6 @@
 {
"name": "Refreshed",
-   "version": "3.1.9",
+   "version": "3.2.0",
"author": [
"Adam Carter",
"Drew1200",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d5640acc7a04f34222b92369000198895811303
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Refreshed
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Migrate namespaces to canonical ones

2017-05-20 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354881 )

Change subject: Migrate namespaces to canonical ones
..

Migrate namespaces to canonical ones

To avoid issues to mix namespaces from ProofreadPage and from
$wgExtraNamespaces, we plan to standardize all the namespaces
to use extension ones, not personalized ones per wiki.

This maintenance script allows to perform such migration.

Bug: T74525
Change-Id: Ia4b3ca905b6bbd0f76f0e1b25d9ae4feb38dbf40
---
A maintenance/moveNamespaces.php
1 file changed, 125 insertions(+), 0 deletions(-)


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

diff --git a/maintenance/moveNamespaces.php b/maintenance/moveNamespaces.php
new file mode 100644
index 000..96b7dda
--- /dev/null
+++ b/maintenance/moveNamespaces.php
@@ -0,0 +1,125 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+use ProofreadPage\Context;
+
+/**
+ * Maintenance script that checks for articles to fix after
+ * adding/deleting namespaces.
+ *
+ * @ingroup Maintenance
+ */
+class NamespacesMigration extends LoggedUpdateMaintenance {
+   private $dbr;
+   private $dbw;
+
+   const CANONICAL_NS_PAGE = 250;
+   const CANONICAL_NS_INDEX = 252;
+
+   public function __construct() {
+   parent::__construct();
+   $this->addDescription( 'Move namespaces from custom wiki ones 
to caninical ones' );
+   $this->setBatchSize( 5000 );
+   }
+
+   ///
+   /// Main task
+   ///
+
+   public function doDBUpdates() {
+   if ( $this->areNamespacesMigrated() ) {
+   $this->output( 'Namespaces have already been migrated.' 
);
+   return false;
+   }
+
+   $this->migrateNamespaces();
+   return true;
+   }
+
+   private function migrateNamespaces() {
+   $this->migrateNamespace( $this->getPageNamespace(), 
self::CANONICAL_NS_PAGE );
+   $this->migrateNamespace( $this->getIndexNamespace(), 
self::CANONICAL_NS_INDEX );
+   }
+
+   private function migrateNamespace( $from, $to ) {
+   if ( $from === $to ) {
+   // Nothing to migrate
+   return;
+   }
+
+   do {
+   $rows = $this->dbr->select(
+   'page',
+   [ 'page_id' ],
+   [ 'page_namespace' => $from ],
+   __METHOD__,
+   [ 'LIMIT' => $this->mBatchSize ]
+   );
+   foreach ( $rows as $row ) {
+   $this->updatePageNamespace( $row->page_id, $to 
);
+   }
+   } while ( $rows->numRows() >= $this->mBatchSize );
+
+   $this->output( "Namespace migration $from to $to done.\n"  );
+   }
+
+   private function updatePageNamespace ( $pageId, $newNamespace ) {
+   $this->dbw->update(
+   'page',
+   [ 'page_namespage' => $to ],
+   [ 'page_id' => $pageId ],
+   __METHOD__
+   );
+
+   wfWaitForSlaves();
+   }
+
+   /**
+* @see LoggedUpdateMaintenance::getUpdateKey
+*/
+   public function getUpdateKey() {
+   return 'FixProofreadpageCanonicalNamespaces';
+   }
+
+   ///
+   /// Namespaces helper methods
+   ///
+
+   public function areNamespacesMigrated() {
+   return $this->getPageNamespace()  == self::CANONICAL_NS_PAGE
+   && $this->getIndexNamespace() == self::CANONICAL_NS_INDEX;
+   }
+
+   public function getPageNamespace () {
+   return Context::getDefaultContext()->getPageNamespaceId();
+   }
+
+   public function getIndexNamespace () {
+   return Context::getDefaultContext()->getIndexNamespaceId();
+   }
+}
+
+$maintClass = "ProofreadPageNamespacesMigration";
+require_once RUN_MAINTENANCE_IF_MAIN;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4b3ca905b6bbd0f76f0e1b25d9ae4feb38dbf40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove TODO remark in pwb.py

2017-05-20 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354880 )

Change subject: Remove TODO remark in pwb.py
..

Remove TODO remark in pwb.py

pwb.py is a wrapper script to enable the pywikibot framework if it is not
installed as a side package. It should not use and it should not have to use
the package itself. We have the same issue with the print function.
We don't use the pywikibot.output() inside and we never should do it.

Change-Id: I4edfef43b538c411847eafa2ee279d632b0bbd61
---
M pwb.py
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/80/354880/1

diff --git a/pwb.py b/pwb.py
index 6779dd8..97dd1d8 100755
--- a/pwb.py
+++ b/pwb.py
@@ -9,7 +9,7 @@
 and it will use the package directory to store all user files, will fix up
 search paths so the package does not need to be installed, etc.
 """
-# (C) Pywikibot team, 2015-2016
+# (C) Pywikibot team, 2015-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -136,7 +136,6 @@
 path = os.path.abspath(path)
 if path[0] != '/':
 # normalise Windows drive letter
-# TODO: use pywikibot.tools.first_upper
 path = path[0].upper() + path[1:]
 return path
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Get thumburl information in FilePage()

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/293626 )

Change subject: Get thumburl information in FilePage()
..


Get thumburl information in FilePage()

Add get_file_url() to retrieve and generate thumburl information.

Deprecate page.fileUrl(), as file url is returned by get_file_url() by default.

In case a thumburl is selected, it relies directly on the API implementation
and makes an API call per each requested thumburl.

Might not be efficient if several thumburls are needed.

Added tests.

Bug: T137011
Change-Id: I3054cd96292f8976f60f3a3f470339305f223efe
---
M pywikibot/page.py
M pywikibot/site.py
M tests/file_tests.py
3 files changed, 115 insertions(+), 4 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 8e4a40f..78c2f79 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2437,11 +2437,44 @@
 self._imagePageHtml = http.request(self.site, path)
 return self._imagePageHtml
 
+@deprecated('get_file_url')
 def fileUrl(self):
 """Return the URL for the file described on this page."""
-# TODO add scaling option?
 return self.latest_file_info.url
 
+def get_file_url(self, url_width=None, url_height=None, url_param=None):
+"""
+Return the url or the thumburl of the file described on this page.
+
+Fetch the information if not available.
+
+Once retrieved, thumburl information will also be accessible as
+latest_file_info attributes, named as in [1]:
+- url, thumburl, thumbwidth and thumbheight
+
+Parameters correspond to iiprops in:
+[1] U{https://www.mediawiki.org/wiki/API:Imageinfo}
+
+Parameters validation and error handling left to the API call.
+
+@param width: see iiurlwidth in [1]
+@param height: see iiurlheigth in [1]
+@param param: see iiurlparam in [1]
+
+@return: latest file url or thumburl
+@rtype: unicode
+
+"""
+# Plain url is requested.
+if url_width is None and url_height is None and url_param is None:
+return self.latest_file_info.url
+
+# Thumburl is requested.
+self.site.loadimageinfo(self, history=not self._file_revisions,
+url_width=url_width, url_height=url_height,
+url_param=url_param)
+return self.latest_file_info.thumburl
+
 @deprecated("fileIsShared")
 def fileIsOnCommons(self):
 """
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 34a774a..7c778c9 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2987,13 +2987,27 @@
 )
 self._update_page(page, query)
 
-def loadimageinfo(self, page, history=False):
+def loadimageinfo(self, page, history=False,
+  url_width=None, url_height=None, url_param=None):
 """Load image info from api and save in page attributes.
 
+Parameters correspond to iiprops in:
+[1] U{https://www.mediawiki.org/wiki/API:Imageinfo}
+
+Parameters validation and error handling left to the API call.
+
 @param history: if true, return the image's version history
+@param url_width: see iiurlwidth in [1]
+@param url_height: see iiurlheigth in [1]
+@param url_param: see iiurlparam in [1]
+
 """
 title = page.title(withSection=False)
-args = {"titles": title}
+args = {'titles': title,
+'iiurlwidth': url_width,
+'iiurlheight': url_height,
+'iiurlparam': url_param,
+}
 if not history:
 args["total"] = 1
 query = self._generator(api.PropertyGenerator,
diff --git a/tests/file_tests.py b/tests/file_tests.py
index 2065bbb..483b484 100644
--- a/tests/file_tests.py
+++ b/tests/file_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """FilePage tests."""
 #
-# (C) Pywikibot team, 2014
+# (C) Pywikibot team, 2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -136,6 +136,8 @@
 family = 'wikipedia'
 code = 'test'
 
+file_name = 'File:Albert Einstein Head.jpg'
+
 cached = True
 
 def test_file_info_with_no_page(self):
@@ -155,6 +157,68 @@
 image = image.latest_file_info
 
 
+class TestFilePageLatestFileInfo(TestCase):
+
+"""Test FilePage.latest_file_info.
+
+These tests cover properties and methods in FilePage that rely
+on site.loadimageinfo.
+
+"""
+
+family = 'commons'
+code = 'commons'
+
+file_name = 'File:Albert Einstein Head.jpg'
+
+cached = True
+
+def setUp(self):
+"""Create File page."""
+super(TestCase, self).setUp()
+self.image = pywikibot.FilePage(self.site, self.file_name)
+
+def 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't fill in the skin's search box on Special:Search

2017-05-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354879 )

Change subject: Don't fill in the skin's search box on Special:Search
..

Don't fill in the skin's search box on Special:Search

When viewing Special:Search, you usually see two search forms: the
small one provided by the skin (present on all pages), and the large
advanced search form generated by Special:Search.

Previously, both of these forms would be prefilled with the text that
was searched, which could lead to the user submitting the wrong form
after changing advanced search options.

After this change, the skin's search form will always start out empty.
There's no way for this to affect pages other than Special:Search,
since if the 'search' URL parameter is given, all requests are
redirected to Special:Search anyway (see MediaWiki::parseTitle()).

Bug: T106055
Change-Id: Ic6bb8af5383e7acfe4f823f563165cd60182753e
---
M includes/skins/BaseTemplate.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/354879/1

diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index 5868904..0b7fc2f 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -523,7 +523,6 @@
'type' => 'search',
'name' => 'search',
'placeholder' => wfMessage( 'searchsuggest-search' 
)->text(),
-   'value' => $this->get( 'search', '' ),
];
$realAttrs = array_merge( $realAttrs, 
Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
return Html::element( 'input', $realAttrs );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6bb8af5383e7acfe4f823f563165cd60182753e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Send long queries via POST, not GET

2017-05-20 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354878 )

Change subject: Send long queries via POST, not GET
..

Send long queries via POST, not GET

There is a limit on the length of GET request, both client-side and
server-side. At some point, the query interface should switch from
sending queries via GET to POST, which carries no such restriction (at
least not one any query should hit).

The server-side limit, imposed by an nginx server on query.wikidata.org,
appears to be at 16334 bytes of query: a query of 16333 space characters
(sent via curl, without URL-encoding the space characters) results in a
parse error from BlazeGraph, a query of 16334 space characters results
in a 414 Request-URI Too Large error from nginx. (I suspect that the
real limit is 2^14 = 16384 bytes, also counting
`GET /bigdata/namespace/wdq/sparql?query=` and `HTTP/1.1\r\n`, which
seems to add up to 16384 bytes plus or minus some off-by-one errors.)

The client-side limit is less clear, but according to some experiments
appears to be 6167 bytes on both Firefox and Chromium, which corresponds
to 2035 spaces in the query as sent by the query service UI (which
encodes each space as %20, three bytes).

Since the client-side limit is lower than the server-side limit, we
switch to POST as soon as the full GET URL exceeds the client-side
limit of 6167 bytes. (Technically, String.length counts UTF-16 code
units, not bytes, but after URL encoding the query no multi-byte
characters or code units should be left in the URL.)

To test this behavior, it is useful to know that `printf %*s 10` prints
10 space characters to standard output. This can be used to quickly
generate strings of a certain length.

Change-Id: Ic770e25bb4bd2edf0008aeaf23447d412407c0f5
---
M wikibase/queryService/api/Sparql.js
1 file changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/78/354878/1

diff --git a/wikibase/queryService/api/Sparql.js 
b/wikibase/queryService/api/Sparql.js
index 7710bc0..650389a 100644
--- a/wikibase/queryService/api/Sparql.js
+++ b/wikibase/queryService/api/Sparql.js
@@ -127,12 +127,21 @@
SELF.prototype.query = function( query ) {
var self = this,
deferred = $.Deferred(),
-   settings = { headers: { Accept: 
'application/sparql-results+json' } };
+   settings = { headers: { Accept: 
'application/sparql-results+json' } },
+   response;
 
this._queryUri = this._serviceUri + '?query=' + 
encodeURIComponent( query );
 
this._executionTime = Date.now();
-   $.ajax( this._queryUri, settings ).done( function( data, 
textStatus, request ) {
+   if ( this._queryUri.length < 6167 ) {
+   response = $.ajax( this._queryUri, settings );
+   } else {
+   settings.method = 'POST';
+   settings.data = { query: query };
+   response = $.ajax( this._serviceUri, settings );
+   }
+
+   response.done( function( data, textStatus, request ) {
self._executionTime = Date.now() - self._executionTime;
 
if ( typeof data.boolean === 'boolean' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic770e25bb4bd2edf0008aeaf23447d412407c0f5
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: DevSettings: Make MediaWiki settings dynamic

2017-05-20 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354877 )

Change subject: DevSettings: Make MediaWiki settings dynamic
..

DevSettings: Make MediaWiki settings dynamic

Make changes to MediaWiki Base URI and Supports Multiple Languages in
Developer Settings languages dynamic, so that the app does not have to
be restarted after the setting is changed.

Bug: T165923
Change-Id: I74a17cf2f0718451651acd263702ad7b5e088fab
---
M 
app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
1 file changed, 81 insertions(+), 0 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
 
b/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
index 6d5329a3..0b4ddc4 100644
--- 
a/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
+++ 
b/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
@@ -36,6 +36,42 @@
 }
 };
 
+@NonNull private final Preference.OnPreferenceChangeListener 
setMediaWikiBaseUriChangeListener
+= new Preference.OnPreferenceChangeListener() {
+/**
+ * Called when the mediaWikiBaseUri preference has been changed by the 
user. This is
+ * called before the state of the Preference is about to be updated and
+ * before the state is persisted.
+ *
+ * @param preference The changed Preference.
+ * @param newValue   The new value of the Preference.
+ * @return True to update the state of the Preference with the new 
value.
+ */
+@Override
+public boolean onPreferenceChange(Preference preference, Object 
newValue) {
+setMediaWikiBaseUriSettings((String) newValue);
+return true;
+}
+};
+
+@NonNull private final Preference.OnPreferenceChangeListener 
setMediaWikiMultiLangSupportChangeListener
+= new Preference.OnPreferenceChangeListener() {
+/**
+ * Called when the mediaWikiBaseUriSupportsLangCode preference has 
been changed by the user.
+ * This is called before the state of the Preference is about to be 
updated and
+ * before the state is persisted.
+ *
+ * @param preference The changed Preference.
+ * @param newValue   The new value of the Preference.
+ * @return True to update the state of the Preference with the new 
value.
+ */
+@Override
+public boolean onPreferenceChange(Preference preference, Object 
newValue) {
+setMediaWikiMultiLangSupportSettings((Boolean) newValue);
+return true;
+}
+};
+
 /*package*/
 DeveloperSettingsPreferenceLoader(@NonNull PreferenceFragmentCompat 
fragment) {
 super(fragment);
@@ -46,11 +82,15 @@
 public void loadPreferences() {
 loadPreferences(R.xml.developer_preferences);
 setUpRestBaseCheckboxes();
+setUpMediaWikiSettings();
 setUpCookies((PreferenceCategory) 
findPreference(R.string.preferences_developer_cookies_key));
 setUpCrashButton(findPreference(getCrashButtonKey()));
 setUpUserOptionButton(findPreference(getUserOptionButtonKey()));
 
setUpRemoteLogButton(findPreference(R.string.preference_key_remote_log));
 }
+
+
+// --- RESTBase settings start ---
 
 private void setUpRestBaseCheckboxes() {
 TwoStatePreference manualPreference = (TwoStatePreference) 
findPreference(getManualKey());
@@ -77,6 +117,47 @@
 return context.getString(R.string.preference_key_use_restbase);
 }
 
+// --- RESTBase settings end ---
+
+// --- MediaWiki settings start ---
+
+private void setUpMediaWikiSettings() {
+Preference uriPreference = findPreference(getMediaWikiBaseUriKey());
+
uriPreference.setOnPreferenceChangeListener(setMediaWikiBaseUriChangeListener);
+TwoStatePreference multiLangPreference
+= (TwoStatePreference) 
findPreference(getMediaWikiSupportsMultipleLanguages());
+
multiLangPreference.setOnPreferenceChangeListener(setMediaWikiMultiLangSupportChangeListener);
+}
+
+private String getMediaWikiBaseUriKey() {
+return context.getString(R.string.preference_key_mediawiki_base_uri);
+}
+
+private String getMediaWikiSupportsMultipleLanguages() {
+return 
context.getString(R.string.preference_key_mediawiki_base_uri_supports_lang_code);
+}
+
+private void setMediaWikiBaseUriSettings(String newBaseUri) {
+EditTextAutoSummarizePreference uriPreference
+= (EditTextAutoSummarizePreference) 
findPreference(getMediaWikiBaseUriKey());
+uriPreference.setText(newBaseUri);
+resetMediaWikiSettings();
+}
+
+private 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Use site.namespaces.FILE.custom_name instead of "File:"

2017-05-20 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354876 )

Change subject: [IMPR] Use site.namespaces.FILE.custom_name instead of "File:"
..

[IMPR] Use site.namespaces.FILE.custom_name instead of "File:"

- Use site.namespaces.FILE.custom_name for self.image_namespace and use this
  variable further in the script
- Define a list_entry point and reuse it several times
- Remove self.rep_text which is no longer used
- Remove deprecated instance variable which are no longer used.
  It is not needed to deprecate it for scripts which isn't derived anywhere.

Change-Id: I1fdf88f96901ef5185375f16fc5c68c629cdf61b
---
M scripts/checkimages.py
1 file changed, 14 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/76/354876/1

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index ecdebda..adc24f0 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -553,8 +553,8 @@
 self.logFullError = logFullError
 self.logFulNumber = logFulNumber
 self.rep_page = i18n.translate(self.site, report_page)
-self.rep_text = '\n* [[:{0}:%s]] ~'.format(
-self.site.namespaces.FILE.custom_name)
+self.image_namespace = site.namespaces.FILE.custom_name + ':'
+self.list_entry = '\n* [[:{0}%s]] '.format(self.image_namespace)
 self.com = i18n.translate(self.site, msg_comm10, fallback=True)
 hiddentemplatesRaw = i18n.translate(self.site, HiddenTemplate)
 self.hiddentemplates = set(
@@ -580,33 +580,8 @@
 else:
 self.num_notify = None
 
-self.image_namespace = u"File:"
 # Load the licenses only once, so do it once
 self.list_licenses = self.load_licenses()
-
-@property
-@deprecated
-def project(self):
-"""Return family name."""
-return self.site.family.name
-
-@property
-@deprecated
-def botolist(self):
-"""Return bots."""
-return self.bots
-
-@botolist.setter
-@deprecated
-def botolist(self, value):
-"""Set bots."""
-self.bots = value
-
-@property
-@deprecated
-def botnick(self):
-"""Return username."""
-return self.site.username()
 
 def setParameters(self, image):
 """Set parameters."""
@@ -706,7 +681,7 @@
 pywikibot.output(
 u"Seems that %s has only the description and not the file..."
 % self.image_to_report)
-repme = "\n* [[:File:%s]] problems '''with the APIs'''"
+repme = self.list_entry + "problems '''with the APIs'''"
 self.report_image(self.image_to_report, self.rep_page, self.com,
   repme)
 return
@@ -905,8 +880,8 @@
 # It's not only on commons but the image needs a check
 # the second usually is a url or something like that.
 # Compare the two in equal way, both url.
-repme = ("\n* [[:File:%s]] is also on '''Commons''': "
- "[[commons:File:%s]]"
+repme = (self.list_entry +
+ "is also on '''Commons''': [[commons:File:%s]]"
  % (self.imageName,
 commons_image_with_this_hash.title(
 withNamespace=False)))
@@ -1023,8 +998,9 @@
 if len(images_to_tag_list) != 0 and not only_report:
 fp = pywikibot.FilePage(self.site, images_to_tag_list[-1])
 already_reported_in_past = fp.revision_count(self.bots)
-from_regex = (r'\n\*\[\[:File:%s\]\]'
-  % re.escape(self.image.title(asUrl=True)))
+from_regex = (r'\n\*\[\[:%s%s\]\]'
+  % (self.image_namespace,
+ re.escape(self.image.title(asUrl=True
 # Delete the image in the list where we're write on
 text_for_the_report = re.sub(from_regex, '',
  text_for_the_report)
@@ -1044,18 +1020,19 @@
 
 if self.duplicatesReport or only_report:
 if only_report:
-repme = ('\n* [[:File:%s]] has the following duplicates '
+repme = (self.list_entry + 'has the following duplicates '
  "('''forced mode'''):"
  % self.image.title(asUrl=True))
 else:
-repme = ('\n* [[:File:%s]] has the following duplicates:'
+repme = (self.list_entry + 'has the following duplicates:'
  % self.image.title(asUrl=True))
 
 for dup_page in duplicates:
 if dup_page.title(asUrl=True) == 

[MediaWiki-commits] [Gerrit] mediawiki...VipsScaler[master]: Add phpcs and make pass

2017-05-20 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354875 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: I7fb0a09e0c23d29f89cd3c1fc6579c90ed4cec1f
---
M SpecialVipsTest.php
M VipsScaler_body.php
M composer.json
A phpcs.xml
M tests/phpunit/VipsScalerTest.php
5 files changed, 188 insertions(+), 169 deletions(-)


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

diff --git a/SpecialVipsTest.php b/SpecialVipsTest.php
index 3e3fc99..89bd03b 100644
--- a/SpecialVipsTest.php
+++ b/SpecialVipsTest.php
@@ -37,7 +37,7 @@
$request = $this->getRequest();
$this->setHeaders();
 
-   if( !$this->userCanExecute( $this->getUser() ) ) {
+   if ( !$this->userCanExecute( $this->getUser() ) ) {
$this->displayRestrictionError();
return;
}
@@ -54,12 +54,12 @@
protected function showThumbnails() {
$request = $this->getRequest();
 
-   # Check if there is any input
+   // Check if there is any input
if ( !( $request->getText( 'file' ) ) ) {
return;
}
 
-   # Check if valid file was provided
+   // Check if valid file was provided
$title = Title::newFromText( $request->getText( 'file' ), 
NS_FILE );
if ( is_null( $title ) ) {
$this->getOutput()->addWikiMsg( 
'vipsscaler-invalid-file' );
@@ -71,13 +71,13 @@
return;
}
 
-   # Create options
+   // Create options
$width = $request->getInt( 'width' );
if ( !$width ) {
$this->getOutput()->addWikiMsg( 
'vipsscaler-invalid-width' );
return;
}
-   $vipsUrlOptions = array( 'thumb' => $file->getName(), 'width' 
=> $width );
+   $vipsUrlOptions = [ 'thumb' => $file->getName(), 'width' => 
$width ];
if ( $request->getVal( 'sharpen' ) ) {
$vipsUrlOptions['sharpen'] = floatval( 
$request->getVal( 'sharpen' ) );
}
@@ -85,57 +85,57 @@
$vipsUrlOptions['bilinear'] = 1;
}
 
-   # Generate normal thumbnail
-   $params = array( 'width' => $width );
+   // Generate normal thumbnail
+   $params = [ 'width' => $width ];
$thumb = $file->transform( $params );
if ( !$thumb || $thumb->isError() ) {
$this->getOutput()->addWikiMsg( 
'vipsscaler-thumb-error' );
return;
}
 
-   # Check if we actually scaled the file
+   // Check if we actually scaled the file
$normalThumbUrl = $thumb->getUrl();
if ( wfExpandUrl( $normalThumbUrl ) == $file->getFullUrl() ) {
// TODO: message
}
 
-   # Make url to the vips thumbnail
+   // Make url to the vips thumbnail
$vipsThumbUrl = $this->getPageTitle()->getLocalUrl( 
$vipsUrlOptions );
 
-   # HTML for the thumbnails
-   $thumbs = Html::rawElement( 'div', array( 'id' => 
'mw-vipstest-thumbnails' ),
-   Html::element( 'img', array(
-   'src'   => 
$normalThumbUrl,
-   'alt' => wfMessage( 
'vipsscaler-default-thumb' ),
-   ) ) . ' ' .
-   Html::element( 'img', array(
-   'src' => $vipsThumbUrl,
-   'alt' => wfMessage( 
'vipsscaler-vips-thumb' ),
-   ) )
-   );
+   // HTML for the thumbnails
+   $thumbs = Html::rawElement( 'div', [ 'id' => 
'mw-vipstest-thumbnails' ],
+   Html::element( 'img', [
+   'src' => $normalThumbUrl,
+   'alt' => wfMessage( 'vipsscaler-default-thumb' 
),
+   ] ) . ' ' .
+   Html::element( 'img', [
+   'src' => $vipsThumbUrl,
+   'alt' => wfMessage( 'vipsscaler-vips-thumb' ),
+   ] )
+   );
 
-   # Helper messages shown above the thumbnails rendering
+   // Helper messages shown above the thumbnails rendering
$help = 

[MediaWiki-commits] [Gerrit] mediawiki...UnicodeConverter[master]: Add phpcs and make pass

2017-05-20 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354874 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: I2e7d3ef5be038488d1f4fef84050e9bb8bf6cf27
---
M UnicodeConverter.alias.php
M UnicodeConverter.php
M UnicodeConverter_body.php
M composer.json
A phpcs.xml
5 files changed, 36 insertions(+), 23 deletions(-)


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

diff --git a/UnicodeConverter.alias.php b/UnicodeConverter.alias.php
index 16ba9d6..cd890b0 100644
--- a/UnicodeConverter.alias.php
+++ b/UnicodeConverter.alias.php
@@ -4,26 +4,26 @@
  *
  */
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
-$specialPageAliases['en'] = array(
-   'UnicodeConverter' => array( 'UnicodeConverter', 'UnicodeConvertor' ),
-);
+$specialPageAliases['en'] = [
+   'UnicodeConverter' => [ 'UnicodeConverter', 'UnicodeConvertor' ],
+];
 
 /** Arabic (العربية)
  * @author Meno25
  */
-$specialPageAliases['ar'] = array(
-   'UnicodeConverter' => array( 'محول_يونيكود' ),
-);
+$specialPageAliases['ar'] = [
+   'UnicodeConverter' => [ 'محول_يونيكود' ],
+];
 
 /** Egyptian Spoken Arabic (مصرى)
  * @author Meno25
  */
-$specialPageAliases['arz'] = array(
-   'UnicodeConverter' => array( 'محول_يونيكود' ),
-);
+$specialPageAliases['arz'] = [
+   'UnicodeConverter' => [ 'محول_يونيكود' ],
+];
 
-$specialPageAliases['nl'] = array(
-   'UnicodeConverter' => array( 'UnicodeConverteren' ),
-);
+$specialPageAliases['nl'] = [
+   'UnicodeConverter' => [ 'UnicodeConverteren' ],
+];
diff --git a/UnicodeConverter.php b/UnicodeConverter.php
index e2fd35d..b719182 100644
--- a/UnicodeConverter.php
+++ b/UnicodeConverter.php
@@ -5,7 +5,8 @@
$wgMessagesDirs['UnicodeConverter'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['UnicodeConverterAlias'] = __DIR__ . 
'/UnicodeConverter.alias.php';
/* wfWarn(
-   'Deprecated PHP entry point used for UnicodeConverter 
extension. Please use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for UnicodeConverter 
extension. ' .
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
); */
return;
diff --git a/UnicodeConverter_body.php b/UnicodeConverter_body.php
index 255ca26..515e695 100644
--- a/UnicodeConverter_body.php
+++ b/UnicodeConverter_body.php
@@ -6,7 +6,7 @@
 
 class SpecialUnicodeConverter extends SpecialPage {
function __construct() {
-   parent::__construct("UnicodeConverter");
+   parent::__construct( "UnicodeConverter" );
}
 
function execute( $par ) {
@@ -28,11 +28,11 @@
if ( !is_null( $q ) ) {
$html = wfUtf8ToHTML( htmlspecialchars( $q ) );
$this->getOutput()->addHTML( "" .
-   
$this->msg('unicodeconverter-oldtext')->escaped() .
+   $this->msg( 'unicodeconverter-oldtext' 
)->escaped() .
"" .
nl2br( $html ) .
"" .
-   
$this->msg('unicodeconverter-newtext')->escaped() .
+   $this->msg( 'unicodeconverter-newtext' 
)->escaped() .
"" .
nl2br( htmlspecialchars( $html ) ) .
"" );
@@ -47,7 +47,7 @@
  */
 function wfUtf8Entity( $matches ) {
$char = $matches[0];
-   # Find the length
+   // Find the length
$z = ord( $char{0} );
if ( $z & 0x80 ) {
$length = 0;
@@ -66,17 +66,17 @@
return $char;
}
 
-   # Mask off the length-determining bits and shift back to the original 
location
+   // Mask off the length-determining bits and shift back to the original 
location
$z &= 0xff;
$z >>= $length;
 
-   # Add in the free bits from subsequent bytes
+   // Add in the free bits from subsequent bytes
for ( $i=1; $i<$length; $i++ ) {
$z <<= 6;
$z |= ord( $char{$i} ) & 0x3f;
}
 
-   # Make entity
+   // Make entity
return "

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Catch KeyboardInterrupt and finally print execution t...

2017-05-20 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354873 )

Change subject: [IMPR] Catch KeyboardInterrupt and finally print execution time 
in checkimages.py
..

[IMPR] Catch KeyboardInterrupt and finally print execution time in 
checkimages.py

Change-Id: I737a9f4a62a3253f5eb3aaff5237180b9fd90375
---
M scripts/checkimages.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/73/354873/1

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index ecdebda..06c222a 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1800,11 +1800,12 @@
 
 if __name__ == "__main__":
 start = time.time()
+ret = None
 try:
 ret = main()
-except SystemExit:
+except KeyboardInterrupt:
 pass
-else:
+finally:
 if ret is not False:
 final = time.time()
 delta = int(final - start)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...RSS[master]: Add phpcs and make pass

2017-05-20 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354872 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: I8d7db66655d983eb295f302f38ab27fd711f23e5
---
M RSSData.php
M RSSHooks.php
M RSSParser.php
M composer.json
A phpcs.xml
5 files changed, 73 insertions(+), 52 deletions(-)


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

diff --git a/RSSData.php b/RSSData.php
index 9ac81c5..4489532 100644
--- a/RSSData.php
+++ b/RSSData.php
@@ -29,7 +29,7 @@
}
 
foreach ( $items as $item ) {
-   $bit = array();
+   $bit = [];
foreach ( $item->childNodes as $n ) {
$name = $this->rssTokenToName( $n->nodeName );
if ( $name != null ) {
@@ -60,7 +60,7 @@
 */
protected function rssTokenToName( $name ) {
 
-   $tokenNames = array(
+   $tokenNames = [
'dc:date' => 'date',
'pubDate' => 'date',
'updated' => 'date',
@@ -75,7 +75,7 @@
'slash:hit_parade' => null,
'slash:section' => null,
'wfw:commentRss' => null,
-   );
+   ];
 
if ( array_key_exists( $name, $tokenNames ) ) {
return $tokenNames[ $name ];
diff --git a/RSSHooks.php b/RSSHooks.php
index 24acfd2..2af1f89 100644
--- a/RSSHooks.php
+++ b/RSSHooks.php
@@ -8,8 +8,8 @@
 * @return bool
 */
static function onParserFirstCallInit( $parser ) {
-   # Install parser hook for  tags
-   $parser->setHook( 'rss', array( __CLASS__, 'renderRss' ) );
+   // Install parser hook for  tags
+   $parser->setHook( 'rss', [ __CLASS__, 'renderRss' ] );
return true;
}
 
@@ -31,7 +31,7 @@
$ns = $parser->getTitle()->getNamespace();
$checkNS = array_flip( $wgRSSNamespaces );
 
-   if( !isset( $checkNS[$ns] ) ) {
+   if ( !isset( $checkNS[$ns] ) ) {
return RSSUtils::RSSError( 'rss-ns-permission' 
);
}
}
@@ -63,7 +63,7 @@
$numberAllowed = $parser->getFunctionLang()->formatNum( 
count( $wgRSSUrlWhitelist ) );
 
return RSSUtils::RSSError( 'rss-url-is-not-whitelisted',
-   array( $input, $listOfAllowed, $numberAllowed )
+   [ $input, $listOfAllowed, $numberAllowed ]
);
 
}
diff --git a/RSSParser.php b/RSSParser.php
index 5d5759d..a59f2f1 100644
--- a/RSSParser.php
+++ b/RSSParser.php
@@ -5,19 +5,18 @@
protected $date = "Y-m-d H:i:s";
protected $ItemMaxLength = 200;
protected $reversed = false;
-   protected $highlight = array();
-   protected $filter = array();
-   protected $filterOut = array();
+   protected $highlight = [];
+   protected $filter = [];
+   protected $filterOut = [];
protected $itemTemplate;
protected $url;
protected $etag;
protected $lastModified;
protected $xml;
protected $error;
-   protected $displayFields = array( 'author', 'title', 'encodedContent', 
'description' );
+   protected $displayFields = [ 'author', 'title', 'encodedContent', 
'description' ];
protected $stripItems;
protected $markerString;
-
 
/**
 * @var RSSData
@@ -36,7 +35,7 @@
 */
private static function explodeOnSpaces( $str ) {
$found = preg_split( '# +#', $str );
-   return is_array( $found ) ? $found : array();
+   return is_array( $found ) ? $found : [];
}
 
/**
@@ -50,7 +49,7 @@
$this->url = $url;
 
$this->markerString = wfRandomString( 32 );
-   $this->stripItems = array();
+   $this->stripItems = [];
 
# Get max number of headlines from argument-array
if ( isset( $args['max'] ) ) {
@@ -131,14 +130,14 @@
 
// if the attribute parameter templatename= is not 
present
// then it defaults to
-   // {{ Template:RSSPost | title = {{{title}}} | ... }} - 
if Template:RSSPost exists from pre-1.9 versions
-   // {{ MediaWiki:Rss-feed | title = {{{title}}} | ... }} 
- otherwise
+   // {{ Template:RSSPost | title = {{{title}}} | ... }}
+   // - if Template:RSSPost exists from pre-1.9 
versions
+   // {{ 

[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Use TabPanelLayout instead of the deprecated CardLayout

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354099 )

Change subject: Use TabPanelLayout instead of the deprecated CardLayout
..


Use TabPanelLayout instead of the deprecated CardLayout

Bug: T164902
Change-Id: I979cb14b8430bf89ae9a453786bc4337ef82211d
---
M modules/ve-math/ve.ui.MWLatexDialog.js
1 file changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/modules/ve-math/ve.ui.MWLatexDialog.js 
b/modules/ve-math/ve.ui.MWLatexDialog.js
index 2d8c8c2..38806ca 100644
--- a/modules/ve-math/ve.ui.MWLatexDialog.js
+++ b/modules/ve-math/ve.ui.MWLatexDialog.js
@@ -55,34 +55,34 @@
  */
 ve.ui.MWLatexDialog.prototype.initialize = function () {
var formulaPanel, inputField, displayField, idField, category,
-   formulaCard, optionsCard,
+   formulaTabPanel, optionsTabPanel,
dialog = this;
 
// Parent method
ve.ui.MWLatexDialog.super.prototype.initialize.call( this );
 
-   // Layout for the formula inserter (formula card) and options form 
(options card)
+   // Layout for the formula inserter (formula tab panel) and options form 
(options tab panel)
this.indexLayout = new OO.ui.IndexLayout( {
scrollable: false,
expanded: true
} );
 
-   formulaCard = new OO.ui.CardLayout( 'formula', {
+   formulaTabPanel = new OO.ui.TabPanelLayout( 'formula', {
label: ve.msg( 'math-visualeditor-mwlatexdialog-card-formula' ),
expandable: false,
scrollable: false,
padded: true
} );
-   optionsCard = new OO.ui.CardLayout( 'options', {
+   optionsTabPanel = new OO.ui.TabPanelLayout( 'options', {
label: ve.msg( 'math-visualeditor-mwlatexdialog-card-options' ),
expandable: false,
scrollable: false,
padded: true
} );
 
-   this.indexLayout.addCards( [
-   formulaCard,
-   optionsCard
+   this.indexLayout.addTabPanels( [
+   formulaTabPanel,
+   optionsTabPanel
] );
 
// Layout for symbol picker (menu) and input and preview (content)
@@ -180,10 +180,10 @@
)
);
 
-   formulaCard.$element.append(
+   formulaTabPanel.$element.append(
dialog.menuLayout.$element
);
-   optionsCard.$element.append(
+   optionsTabPanel.$element.append(
displayField.$element,
idField.$element
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I979cb14b8430bf89ae9a453786bc4337ef82211d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
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] mediawiki...VisualEditor[master]: rebaser: Move synchronizer/authorList to Target from Target....

2017-05-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354870 )

Change subject: rebaser: Move synchronizer/authorList to Target from Target.init
..

rebaser: Move synchronizer/authorList to Target from Target.init

Change-Id: I828ab12662e03cf674e20ae5676ca6eaa2592eba
---
M modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
M modules/ve-mw-collab/ve.init.mw.CollabTarget.js
2 files changed, 28 insertions(+), 14 deletions(-)


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

diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js 
b/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
index ecf090b..9457daf 100644
--- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
+++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
@@ -35,7 +35,7 @@
documentNameField.toggle( false );
 
loadingPromise.done( function () {
-   target = ve.init.mw.targetFactory.create( 'collab' );
+   target = ve.init.mw.targetFactory.create( 'collab', 
title, conf.rebaserUrl );
 
$( 'body' ).addClass( 've-activated ve-active' );
 
@@ -45,18 +45,6 @@
$( '#firstHeading' ).addClass( 
've-init-mw-desktopArticleTarget-uneditableContent' );
 
target.documentReady( ve.createDocumentFromHtml( '' ) );
-   target.once( 'surfaceReady', function () {
-   var synchronizer = new 
ve.dm.SurfaceSynchronizer(
-   target.getSurface().getModel(),
-   title.toString(),
-   { server: conf.rebaserUrl }
-   ),
-   authorList = new 
ve.ui.AuthorListWidget( synchronizer );
-
-   target.getToolbar().$actions.append( 
authorList.$element );
-   target.getSurface().getView().setSynchronizer( 
synchronizer );
-   target.getSurface().getView().focus();
-   } );
} ).always( function () {
documentNameField.toggle( false );
progressBar.toggle( false );
diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.js 
b/modules/ve-mw-collab/ve.init.mw.CollabTarget.js
index 6c579cf..841ab0f 100644
--- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.js
+++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.js
@@ -12,15 +12,20 @@
  * @extends ve.init.mw.Target
  *
  * @constructor
+ * @param {mw.Title} title Page sub-title
+ * @param {rebaserUrl} string Rebaser server URL
  * @param {Object} [config] Configuration options
  */
-ve.init.mw.CollabTarget = function VeInitMwCollabTarget( config ) {
+ve.init.mw.CollabTarget = function VeInitMwCollabTarget( title, rebaserUrl, 
config ) {
config = config || {};
config.toolbarConfig = $.extend( {
shadow: true,
actions: true,
floatable: true
}, config.toolbarConfig );
+
+   this.title = title;
+   this.rebaserUrl = rebaserUrl;
 
// Parent constructor
ve.init.mw.CollabTarget.super.call( this, config );
@@ -58,6 +63,27 @@
this.$element.parent().append( this.$originalContent.children() );
 };
 
+/**
+ * @inheritdoc
+ */
+ve.init.mw.CollabTarget.prototype.surfaceReady = function () {
+   var synchronizer, authorList,
+   surfaceView = this.getSurface().getView();
+
+   // Parent method
+   ve.init.mw.CollabTarget.super.prototype.surfaceReady.apply( this, 
arguments );
+
+   synchronizer = new ve.dm.SurfaceSynchronizer(
+   this.getSurface().getModel(),
+   this.title.toString(),
+   { server: this.rebaserUrl }
+   );
+   authorList = new ve.ui.AuthorListWidget( synchronizer );
+
+   this.getToolbar().$actions.append( authorList.$element );
+   surfaceView.setSynchronizer( synchronizer );
+   surfaceView.focus();
+};
 
 /**
  * @inheritdoc

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I828ab12662e03cf674e20ae5676ca6eaa2592eba
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] mediawiki...VisualEditor[master]: WIP Export to wikitext dialog

2017-05-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354871 )

Change subject: WIP Export to wikitext dialog
..

WIP Export to wikitext dialog

Change-Id: I49841fd17dd106154a2f53df2e051c6dc0cc3910
---
M extension.json
M lib/ve
M modules/ve-mw-collab/ve.init.mw.CollabTarget.css
M modules/ve-mw-collab/ve.init.mw.CollabTarget.js
A modules/ve-mw-collab/ve.ui.MWExportDialog.js
5 files changed, 102 insertions(+), 5 deletions(-)


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

diff --git a/extension.json b/extension.json
index f0265b6..d445e86 100644
--- a/extension.json
+++ b/extension.json
@@ -434,7 +434,8 @@
},
"ext.visualEditor.collabTarget": {
"scripts": [
-   
"modules/ve-mw-collab/ve.init.mw.CollabTarget.js"
+   
"modules/ve-mw-collab/ve.init.mw.CollabTarget.js",
+   "modules/ve-mw-collab/ve.ui.MWExportDialog.js"
],
"dependencies": [
"ext.visualEditor.base",
diff --git a/lib/ve b/lib/ve
index ee59e9d..b3ad56e 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit ee59e9d337c2fcf040e5975476ec3b93725004f8
+Subproject commit b3ad56e0ee3bf8fbece27441dec34297f87f3a06
diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.css 
b/modules/ve-mw-collab/ve.init.mw.CollabTarget.css
index 9d862e4..c3cbf0a 100644
--- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.css
+++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.css
@@ -14,7 +14,7 @@
 
 .ve-init-mw-collabTarget .ve-ui-authorListWidget {
display: inline-block;
-   margin: 0.3125em;
+   vertical-align: middle;
 }
 
 /* MW theme hack */
diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.js 
b/modules/ve-mw-collab/ve.init.mw.CollabTarget.js
index 841ab0f..668146e 100644
--- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.js
+++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.js
@@ -67,7 +67,7 @@
  * @inheritdoc
  */
 ve.init.mw.CollabTarget.prototype.surfaceReady = function () {
-   var synchronizer, authorList,
+   var synchronizer, authorList, exportButton,
surfaceView = this.getSurface().getView();
 
// Parent method
@@ -79,13 +79,28 @@
{ server: this.rebaserUrl }
);
authorList = new ve.ui.AuthorListWidget( synchronizer );
+   exportButton = new OO.ui.ButtonWidget( {
+   label: 'Export', // TODO: i18n
+   flags: [ 'progressive', 'primary' ]
+   } );
 
-   this.getToolbar().$actions.append( authorList.$element );
+   exportButton.connect( this, { click: 'onExportButtonClick' } );
+
+   this.getToolbar().$actions.append( authorList.$element, 
exportButton.$element );
surfaceView.setSynchronizer( synchronizer );
surfaceView.focus();
 };
 
 /**
+ * Handle click events from the export button
+ */
+ve.init.mw.CollabTarget.prototype.onExportButtonClick = function () {
+   var surface = this.getSurface(),
+   windowAction = ve.ui.actionFactory.create( 'window', surface );
+   windowAction.open( 'mwExport', { surface: surface } );
+};
+
+/**
  * @inheritdoc
  */
 ve.init.mw.CollabTarget.prototype.attachToolbar = function () {
diff --git a/modules/ve-mw-collab/ve.ui.MWExportDialog.js 
b/modules/ve-mw-collab/ve.ui.MWExportDialog.js
new file mode 100644
index 000..d799f2c
--- /dev/null
+++ b/modules/ve-mw-collab/ve.ui.MWExportDialog.js
@@ -0,0 +1,81 @@
+/*!
+ * VisualEditor UserInterface MWExportDialog class.
+ *
+ * @copyright 2011-2017 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+/**
+ * Dialog for exporting CollabTarget pages
+ *
+ * @class
+ * @extends OO.ui.ProcessDialog
+ *
+ * @constructor
+ * @param {Object} [config] Config options
+ */
+ve.ui.MWExportDialog = function VeUiMwExportDialog( config ) {
+   // Parent constructor
+   ve.ui.MWExportDialog.super.call( this, config );
+
+   // Initialization
+   this.$element.addClass( 've-ui-mwExportDialog' );
+};
+
+/* Inheritance */
+
+OO.inheritClass( ve.ui.MWExportDialog, OO.ui.ProcessDialog );
+
+/* Static Properties */
+
+ve.ui.MWExportDialog.static.name = 'mwExport';
+
+ve.ui.MWExportDialog.static.title = 'Export'; // TODO: i18n
+
+ve.ui.MWExportDialog.static.actions = [
+   {
+   label: OO.ui.deferMsg( 'visualeditor-dialog-action-done' ),
+   flags: 'safe'
+   }
+];
+
+ve.ui.MWExportDialog.static.size = 'larger';
+
+/**
+ * @inheritdoc
+ */
+ve.ui.MWExportDialog.prototype.initialize = function () {
+   // Parent method
+   ve.ui.MWExportDialog.super.prototype.initialize.call( this );
+
+   this.$wikitext = $( '' );
+   this.$body.append( 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Move getWikitextFragment up to Target from ArticleTarget

2017-05-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354869 )

Change subject: Move getWikitextFragment up to Target from ArticleTarget
..

Move getWikitextFragment up to Target from ArticleTarget

Any MW target may want to get a wikitext fragment, not just
ArticleTargets. Requires us to move refreshEditToken up as well.

Change-Id: I27d30e20fefd5ba266d3d8e5f99383e9b4d4993a
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/init/ve.init.mw.Target.js
2 files changed, 118 insertions(+), 117 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/69/354869/1

diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 0934b92..700954f 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -58,7 +58,6 @@
 
this.restoring = !!this.requestedRevId && this.requestedRevId !== 
this.currentRevisionId;
this.pageDeletedWarning = false;
-   this.editToken = mw.user.tokens.get( 'editToken' );
this.submitUrl = ( new mw.Uri( mw.util.getUrl( this.pageName ) ) )
.extend( {
action: 'submit',
@@ -643,68 +642,6 @@
 
// Handle (other) unknown and/or unrecoverable errors
this.saveErrorUnknown( editApi, data );
-};
-
-/**
- * Refresh our stored edit/csrf token
- *
- * This should be called in response to a badtoken error, to resolve whether 
the
- * token was expired / the user changed. If the user did change, this updates
- * the current user.
- *
- * @return {jQuery.Promise} Promise resolved with whether we switched users
- */
-ve.init.mw.ArticleTarget.prototype.refreshEditToken = function () {
-   var api = new mw.Api(),
-   deferred = $.Deferred(),
-   target = this;
-   api.get( {
-   action: 'query',
-   meta: 'tokens|userinfo',
-   type: 'csrf'
-   } )
-   .done( function ( data ) {
-   var
-   userInfo = data.query && data.query.userinfo,
-   editToken = data.query && data.query.tokens && 
data.query.tokens.csrftoken,
-   isAnon = mw.user.isAnon();
-
-   if ( userInfo && editToken ) {
-   target.editToken = editToken;
-
-   if (
-   ( isAnon && userInfo.anon !== undefined 
) ||
-   // Comparing id instead of name 
to protect against possible
-   // normalisation and against 
case where the user got renamed.
-   mw.config.get( 'wgUserId' ) === 
userInfo.id
-   ) {
-   // New session is the same user still
-   deferred.resolve( false );
-   } else {
-   // The now current session is a 
different user
-   if ( userInfo.anon !== undefined ) {
-   // New session is an anonymous 
user
-   mw.config.set( {
-   // wgUserId is unset 
for anonymous users, not set to null
-   wgUserId: undefined,
-   // wgUserName is 
explicitly set to null for anonymous users,
-   // functions like 
mw.user.isAnon rely on this.
-   wgUserName: null
-   } );
-   } else {
-   // New session is a different 
user
-   mw.config.set( { wgUserId: 
userInfo.id, wgUserName: userInfo.name } );
-   }
-   deferred.resolve( true );
-   }
-   } else {
-   deferred.reject();
-   }
-   } )
-   .fail( function () {
-   deferred.reject();
-   } );
-   return deferred.promise();
 };
 
 /**
@@ -2382,58 +2319,4 @@
true /* non-cancellable */
);
this.load( dataPromise );
-};
-
-/**
- * Get a wikitext fragment from a document
- *
- * @param {ve.dm.Document} doc Document
- * @param {boolean} [useRevision=true] Whether to use the 

[MediaWiki-commits] [Gerrit] mediawiki...Citoid[master]: Use TabPanelLayout instead of deprecated CardLayout

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354096 )

Change subject: Use TabPanelLayout instead of deprecated CardLayout
..


Use TabPanelLayout instead of deprecated CardLayout

Bug: T164904
Change-Id: I6b2309fe44dd447215cd2f621e7b8634a8545151
---
M modules/ve.ui.CiteFromIdInspector.js
1 file changed, 21 insertions(+), 21 deletions(-)

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



diff --git a/modules/ve.ui.CiteFromIdInspector.js 
b/modules/ve.ui.CiteFromIdInspector.js
index f425ab8..78c8bf1 100644
--- a/modules/ve.ui.CiteFromIdInspector.js
+++ b/modules/ve.ui.CiteFromIdInspector.js
@@ -142,21 +142,21 @@
} );
 
this.modePanels = {
-   auto: new OO.ui.CardLayout( 'auto', {
+   auto: new OO.ui.TabPanelLayout( 'auto', {
label: ve.msg( 'citoid-citefromiddialog-mode-auto' ),
classes: [ 'citoid-citeFromIDDialog-panel-auto' ],
padded: true,
expanded: false,
scrollable: false
} ),
-   manual: new OO.ui.CardLayout( 'manual', {
+   manual: new OO.ui.TabPanelLayout( 'manual', {
label: ve.msg( 'citoid-citefromiddialog-mode-manual' ),
classes: [ 'citoid-citeFromIDDialog-panel-manual' ],
padded: true,
expanded: false,
scrollable: false
} ),
-   reuse: new OO.ui.CardLayout( 'reuse', {
+   reuse: new OO.ui.TabPanelLayout( 'reuse', {
label: ve.msg( 'citoid-citefromiddialog-mode-reuse' ),
classes: [ 'citoid-citeFromIDDialog-panel-reuse' ],
expanded: false,
@@ -164,7 +164,7 @@
} )
};
 
-   this.modeIndex.addCards( [
+   this.modeIndex.addTabPanels( [
this.modePanels.auto,
this.modePanels.manual,
this.modePanels.reuse
@@ -263,34 +263,34 @@
 /**
  * Handle set events from mode index layout
  *
- * @param {OO.ui.CardLayout} card Set card
+ * @param {OO.ui.TabPanelLayout} tabPanel Set tab panel
  */
-ve.ui.CiteFromIdInspector.prototype.onModeIndexSet = function ( card ) {
-   this.setModePanel( card.getName(), null, true );
+ve.ui.CiteFromIdInspector.prototype.onModeIndexSet = function ( tabPanel ) {
+   this.setModePanel( tabPanel.getName(), null, true );
 };
 
 /**
  * Switch to a specific mode panel
  *
- * @param {string} cardName Panel name, 'auto', 'manual' or 'reuse'
+ * @param {string} tabPanelName Panel name, 'auto', 'manual' or 'reuse'
  * @param {string} [processPanelName] Process panel name, 'lookup' or 'result'
  * @param {boolean} [fromSelect] Mode was changed by the select widget
  */
-ve.ui.CiteFromIdInspector.prototype.setModePanel = function ( cardName, 
processPanelName, fromSelect ) {
+ve.ui.CiteFromIdInspector.prototype.setModePanel = function ( tabPanelName, 
processPanelName, fromSelect ) {
var inspector = this;
 
-   if ( [ 'auto', 'manual', 'reuse' ].indexOf( cardName ) === -1 ) {
-   cardName = 'auto';
-   } else if ( cardName === 'reuse' && this.modeIndex.getCard( 'reuse' 
).tabItem.isDisabled() ) {
-   cardName = 'auto';
-   } else if ( cardName !== ( ve.userConfig( 'citoid-mode' ) || 'auto' ) ) 
{
-   ve.userConfig( 'citoid-mode', cardName );
+   if ( [ 'auto', 'manual', 'reuse' ].indexOf( tabPanelName ) === -1 ) {
+   tabPanelName = 'auto';
+   } else if ( tabPanelName === 'reuse' && this.modeIndex.getTabPanel( 
'reuse' ).tabItem.isDisabled() ) {
+   tabPanelName = 'auto';
+   } else if ( tabPanelName !== ( ve.userConfig( 'citoid-mode' ) || 'auto' 
) ) {
+   ve.userConfig( 'citoid-mode', tabPanelName );
}
 
if ( !fromSelect ) {
-   this.modeIndex.setCard( cardName );
+   this.modeIndex.setTabPanel( tabPanelName );
}
-   switch ( cardName ) {
+   switch ( tabPanelName ) {
case 'auto':
processPanelName = processPanelName || 
this.currentAutoProcessPanel || 'lookup';
this.autoProcessStack.setItem( this.autoProcessPanels[ 
processPanelName ] );
@@ -309,10 +309,10 @@
this.search.getQuery().focus();
break;
}
-   // Result card goes 'fullscreen' by hiding the tab widget
+   // Result tab panel goes 'fullscreen' by hiding the tab widget
// TODO: Do this in a less hacky way
this.modeIndex.toggleMenu( !( processPanelName && processPanelName === 
'result' ) );
-   this.actions.setMode( cardName + ( processPanelName ? '-' + 
processPanelName : '' ) );

[MediaWiki-commits] [Gerrit] mediawiki...PdfHandler[master]: Add phpcs and make pass

2017-05-20 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354860 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: I2921f450aeb4e896157d81c1ac2b5b5b13c31240
---
M CreatePdfThumbnailsJob.class.php
M PdfHandler.image.php
M PdfHandler_body.php
M composer.json
A phpcs.xml
5 files changed, 91 insertions(+), 75 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PdfHandler 
refs/changes/60/354860/1

diff --git a/CreatePdfThumbnailsJob.class.php b/CreatePdfThumbnailsJob.class.php
index b8a67b2..1dfacef 100644
--- a/CreatePdfThumbnailsJob.class.php
+++ b/CreatePdfThumbnailsJob.class.php
@@ -12,23 +12,23 @@
 *
 * @param $title Title Title object
 * @param $params array Associative array of options:
-* page:   page number for which the thumbnail will be 
created
-* jobtype:CreatePDFThumbnailsJob::BIG_THUMB or 
CreatePDFThumbnailsJob::SMALL_THUMB
-* BIG_THUMB will create a thumbnail visible for 
full thumbnail view,
-* SMALL_THUMB will create a thumbnail shown in 
"previous page"/"next page" boxes
-* 
+* page:page number for which the thumbnail will be created
+* jobtype: CreatePDFThumbnailsJob::BIG_THUMB or 
CreatePDFThumbnailsJob::SMALL_THUMB
+*  BIG_THUMB will create a thumbnail visible for full 
thumbnail view,
+*  SMALL_THUMB will create a thumbnail shown in "previous 
page"/"next page" boxes
 */
public function __construct( $title, $params ) {
parent::__construct( 'createPdfThumbnailsJob', $title, $params 
);
}
-   
+
/**
 * Run a thumbnail job on a given PDF file.
 * @return bool true
 */
public function run() {
if ( !isset( $this->params['page'] ) ) {
-   wfDebugLog('thumbnails', 'A page for thumbnails job of 
' . $this->title->getText() . ' was not specified! That should never happen!');
+   wfDebugLog( 'thumbnails', 'A page for thumbnails job of 
' . $this->title->getText() .
+   ' was not specified! That should never happen!' 
);
return true; // no page set? that should never happen
}
 
@@ -37,7 +37,7 @@
return true; // Just silently fail, perhaps the file 
was already deleted, don't bother
}
 
-   switch ($this->params['jobtype']) {
+   switch ( $this->params['jobtype'] ) {
case self::BIG_THUMB:
global $wgImageLimits;
// Ignore user preferences, do default 
thumbnails
@@ -59,26 +59,27 @@
$height_orig = $file->getHeight( 
$this->params['page'] );
$height = $height_orig;
if ( $width > $maxWidth || $height > $maxHeight 
) {
-   # Calculate the thumbnail size.
-   # First case, the limiting factor is 
the width, not the height.
+   // Calculate the thumbnail size.
+   // First case, the limiting factor is 
the width, not the height.
if ( $width / $height >= $maxWidth / 
$maxHeight ) {
-   //$height = round( $height * 
$maxWidth / $width );
+   // $height = round( $height * 
$maxWidth / $width );
$width = $maxWidth;
-   # Note that $height <= 
$maxHeight now.
+   // Note that $height <= 
$maxHeight now.
} else {
$newwidth = floor( $width * 
$maxHeight / $height );
-   //$height = round( $height * 
$newwidth / $width );
+   // $height = round( $height * 
$newwidth / $width );
$width = $newwidth;
-   # Note that $height <= 
$maxHeight now, but might not be identical
-   # because of rounding.
+   // Note that $height <= 
$maxHeight now, but might not be identical
+   // because of rounding.
}
-   $transformParams = array( 'page' => 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Use wikitech db group instead of labswiki+ labtestwiki

2017-05-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354856 )

Change subject: Use wikitech db group instead of labswiki+ labtestwiki
..

Use wikitech db group instead of labswiki+ labtestwiki

Change-Id: I23be8fdf3c7744a0aff19af926957aa3bb647182
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1ccc3f4..d74df3e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12833,9 +12833,8 @@
 
 'wmgUseFooterCodeOfConductLink' => [
'default' => false,
-   'labstestwiki' => true,
-   'labswiki' => true,
'mediawikiwiki' => true,
+   'wikitech' => true,
 ],
 
 'wgMaxMsgCacheEntrySize' => [
@@ -17259,8 +17258,7 @@
'nonglobal' => false,
 
// Effectively repeat nonglobal entry above because both labswiki and 
labtestwiki are also medium
-   'labswiki' => false,
-   'labtestwiki' => false,
+   'wikitech' => false,
 
'enwikisource' => true, // T78496
'frwiki' => true, // T120568
@@ -18662,8 +18660,7 @@
 
 'wmgUseDynamicSidebar' => [
'default' => false,
-   'labswiki' => true,
-   'labstestwiki' => true,
+   'wikitech' => true,
 ],
 
 'wgNonincludableNamespaces' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23be8fdf3c7744a0aff19af926957aa3bb647182
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] oojs/ui[master]: NumberInputWidget: Use icons instead of labels

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/352470 )

Change subject: NumberInputWidget: Use icons instead of labels
..


NumberInputWidget: Use icons instead of labels

Make use of icons designed for NumberInputWidget in both themes,
Apex and MediaWiki. Also simplify specificity in MediaWiki theme.

Change-Id: I3e4854f3b212f5850c4dc3c459314d82d54761e8
---
M src/themes/apex/common.less
M src/themes/apex/widgets.less
M src/themes/wikimediaui/common.less
M src/themes/wikimediaui/elements.less
M src/themes/wikimediaui/widgets.less
M src/widgets/NumberInputWidget.js
6 files changed, 49 insertions(+), 21 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/themes/apex/common.less b/src/themes/apex/common.less
index 5526db1..ae50fef 100644
--- a/src/themes/apex/common.less
+++ b/src/themes/apex/common.less
@@ -26,12 +26,14 @@
 // Box Sizes
 // `@*size` variables are used for `*width` & `*height` properties
 @min-size-icon: 24px;
+@min-width-icon-numberinput: 20px;
 @min-size-indicator: 12px;
 @max-width-default: 50em;
 @max-width-input-default: @max-width-default;
 
 @size-anchor: 6px;
 @size-icon: unit( 24 / 16 / 0.8, em );
+@size-icon-numberinput: unit( 20 / 16 / 0.8, em );
 @size-indicator: unit( 12 / 16 / 0.8, em );
 
 @border-radius-default: 0.25em;
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index cfe3a12..4bf3ca5 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -462,20 +462,29 @@
width: 2.25em;
}
 
-   &-minusButton.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
+   &-buttoned {
+   .oo-ui-buttonElement-button {
+   .oo-ui-iconElement-icon {
+   min-width: @min-width-icon-numberinput;
+   width: @size-icon-numberinput;
+   }
+   }
+
+   .oo-ui-inputWidget-input {
+   border-radius: 0;
+   }
+   }
+
+   &-minusButton > .oo-ui-buttonElement-button {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right-width: 0;
}
 
-   &-plusButton.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
+   &-plusButton > .oo-ui-buttonElement-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-left-width: 0;
-   }
-
-   &-buttoned .oo-ui-inputWidget-input {
-   border-radius: 0;
}
 }
 
diff --git a/src/themes/wikimediaui/common.less 
b/src/themes/wikimediaui/common.less
index c92b5da..b408d15 100644
--- a/src/themes/wikimediaui/common.less
+++ b/src/themes/wikimediaui/common.less
@@ -69,6 +69,7 @@
 @min-size-indicator: 12px;
 @min-width-button-default: 40 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.125em`≈`40px` at base `font-size: 12.8px`
 @min-width-button-combo-widget: @size-default;
+@min-width-icon-numberinput: 20px;
 @min-height-widget-default: @size-default;
 @min-height-toggleswitch: 26px; // equals `16px` @size-toggleswitch-grip-min + 
4px*2 distance top/bottom + 1px*2 border top/bottom
 @max-width-default: 50em;
@@ -77,11 +78,13 @@
 @size-anchor: 9px;
 @size-button-default: @size-default;
 @size-icon: 24 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `1.875em`≈`24px`
+@size-icon-numberinput: 20 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `1.5625em`≈`20px`
 @size-indicator: 12 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `0.9375em`≈`12px`
 @size-toggleswitch-grip-min: 16px;
 @size-dialog-bar-top: 44 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.4375em`≈`44px`
 
 @start-framed-icon-only: 7 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.547em`≈`7px`; HACK: We have to break 
with `@padding-start-input-text-icon` to perfectly center in 
`@min-width-button-default`
+@start-framed-icon-only-numberinput: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.46875em`≈`6px`
 @start-framed-indicator-only: 13 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `1.09375em`≈`14px`; `@size-indicator + 2 * 
@border-width-default`
 @start-framed-square-indicator-only: 9 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.703125em`≈`9px`
 @start-tagmultiselect-input: 5 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.390625em`≈`5px`; 
`@padding-horizontal-tagitem` + `@border-width-default`
@@ -195,12 +198,12 @@
 // Binary Input Widgets (CheckboxInput, RadioInput, ToggleSwitch)
 @background-color-input-binary-active: @color-progressive-active;
 @background-color-input-binary-on: @color-progressive;

[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: have maintain-kubeusers chown $HOME/.kube

2017-05-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354839 )

Change subject: tools: have maintain-kubeusers chown $HOME/.kube
..

tools: have maintain-kubeusers chown $HOME/.kube

Chown the $HOME/.kube directory to the tool account. Also protect the
generate credentials with chattr.

Bug: T165875
Change-Id: I37bc5517ab4bd8b646e0c63d9140c1cc2633e9ea
---
M modules/toollabs/files/maintain-kubeusers
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/354839/1

diff --git a/modules/toollabs/files/maintain-kubeusers 
b/modules/toollabs/files/maintain-kubeusers
index a880237..c3d0203 100755
--- a/modules/toollabs/files/maintain-kubeusers
+++ b/modules/toollabs/files/maintain-kubeusers
@@ -254,14 +254,16 @@
 dirpath = os.path.join('/data', 'project', user.name, '.kube')
 path = os.path.join(dirpath, 'config')
 # exist_ok=True is fine here, and not a security issue (Famous last 
words?).
-# We also keep it owned by root, which is fine.
 os.makedirs(dirpath, mode=0o775, exist_ok=True)
+os.fchown(f, int(user.id), int(user.id))
 f = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_NOFOLLOW)
 try:
 os.write(f, json.dumps(config, indent=4, 
sort_keys=True).encode('utf-8'))
 # uid == gid
 os.fchown(f, int(user.id), int(user.id))
 os.fchmod(f, 0o400)
+# Prevent removal or modification of the credentials file by users
+subprocess.check_output(['/usr/bin/chattr', '+i', file_path])
 logging.info('Write config in %s', path)
 except:
 logging.exception()

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add swipe to dismiss article tab functionality

2017-05-20 Thread Jjanku (Code Review)
Jjanku has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354837 )

Change subject: Add swipe to dismiss article tab functionality
..

Add swipe to dismiss article tab functionality

Substitute ListView with RecyclerView. Use custom ItemAnimator to animate 
removal (slide
tab out to right) and move of article tabs (fill the space after removed tab).
Use ItemTouchHelper to enable swipe to dismiss on tabs, so the user doesn't 
have to click
the close button.

Bug: T103955
Change-Id: I9241fd82c7172442a5c6697cc32401df6c551869
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
A app/src/main/java/org/wikipedia/page/tabs/TabItemAnimator.java
A app/src/main/java/org/wikipedia/page/tabs/TabItemTouchHelperCallback.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/res/layout/activity_page.xml
5 files changed, 392 insertions(+), 103 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index ad0f505..91e8085 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -524,7 +524,7 @@
 }
 tabList.remove(position);
 tabFunnel.logClose(tabList.size(), position);
-tabsProvider.invalidate();
+tabsProvider.notifyTabClosed(position);
 getActivity().supportInvalidateOptionsMenu();
 if (tabList.size() == 0) {
 tabFunnel.logCancel(tabList.size());
@@ -1192,7 +1192,7 @@
 if (tabList.size() > 1) {
 // if we're at the end of the current tab's backstack, then pop 
the current tab.
 tabList.remove(tabList.size() - 1);
-tabsProvider.invalidate();
+tabsProvider.notifyTabClosed(tabList.size() - 1);
 }
 return false;
 }
diff --git a/app/src/main/java/org/wikipedia/page/tabs/TabItemAnimator.java 
b/app/src/main/java/org/wikipedia/page/tabs/TabItemAnimator.java
new file mode 100644
index 000..73fffe8
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/page/tabs/TabItemAnimator.java
@@ -0,0 +1,236 @@
+package org.wikipedia.page.tabs;
+
+import android.support.v4.view.ViewCompat;
+import android.support.v4.view.ViewPropertyAnimatorCompat;
+import android.support.v4.view.ViewPropertyAnimatorListenerAdapter;
+import android.support.v7.widget.RecyclerView.ViewHolder;
+import android.support.v7.widget.SimpleItemAnimator;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+
+import org.wikipedia.R;
+import org.wikipedia.page.PageFragment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+class TabItemAnimator extends SimpleItemAnimator {
+
+private PageFragment fragment;
+
+private ArrayList pendingRemovals = new ArrayList<>();
+private ArrayList pendingMoves = new ArrayList<>();
+private ArrayList removeAnimations = new ArrayList<>();
+private ArrayList moveAnimations = new ArrayList<>();
+
+private ArrayList movesList = new ArrayList<>();
+
+TabItemAnimator(PageFragment fragment) {
+this.fragment = fragment;
+setSupportsChangeAnimations(false);
+
setRemoveDuration(fragment.getResources().getInteger(android.R.integer.config_shortAnimTime));
+setMoveDuration(getRemoveDuration());
+}
+
+@Override
+public boolean animateRemove(ViewHolder holder) {
+//if the holder has been swiped away, don't animate
+if (holder.itemView.getTranslationX() != 0) {
+dispatchRemoveFinished(holder);
+return false;
+}
+
+pendingRemovals.add(holder);
+return true;
+}
+
+@Override
+public boolean animateMove(ViewHolder holder, int fromX, int fromY, int 
toX, int toY) {
+final View view = holder.itemView;
+fromY += ViewCompat.getTranslationY(holder.itemView);
+
+int deltaY = toY - fromY;
+if (deltaY == 0) {
+dispatchMoveFinished(holder);
+return false;
+}
+
+ViewCompat.setTranslationY(view, -deltaY);
+pendingMoves.add(holder);
+return true;
+}
+
+@Override
+public boolean animateAdd(ViewHolder holder) {
+dispatchAddFinished(holder);
+return false;
+}
+
+//won't be called because of setSupportsChangeAnimations(false)
+@Override
+public boolean animateChange(ViewHolder oldHolder, ViewHolder newHolder, 
int fromLeft, int fromTop, int toLeft, int toTop) {
+return false;
+}
+
+@Override
+public void runPendingAnimations() {
+for (final ViewHolder holder : pendingRemovals) {
+doRemoveAnimation(holder);
+}
+
+

[MediaWiki-commits] [Gerrit] mediawiki...intersection[master]: Add phpcs and make pass

2017-05-20 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354818 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: I641cadd4d75f89965e7c5925af4a046b3bfc5b53
---
M DynamicPageList.hooks.php
M DynamicPageList.php
M composer.json
A phpcs.xml
4 files changed, 58 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/intersection 
refs/changes/18/354818/1

diff --git a/DynamicPageList.hooks.php b/DynamicPageList.hooks.php
index 50e4788..ebdd687 100644
--- a/DynamicPageList.hooks.php
+++ b/DynamicPageList.hooks.php
@@ -62,9 +62,9 @@
$dateFormat = '';
$stripYear = false;
 
-   $linkOptions = array();
-   $categories = array();
-   $excludeCategories = array();
+   $linkOptions = [];
+   $categories = [];
+   $excludeCategories = [];
 
$parameters = explode( "\n", $input );
 
@@ -74,7 +74,7 @@
 
foreach ( $parameters as $parameter ) {
$paramField = explode( '=', $parameter, 2 );
-   if( count( $paramField ) < 2 ) {
+   if ( count( $paramField ) < 2 ) {
continue;
}
$type = trim( $paramField[0] );
@@ -85,7 +85,7 @@
NS_CATEGORY,
$parser->transformMsg( $arg, 
$poptions, $mwParser->getTitle() )
);
-   if( is_null( $title ) ) {
+   if ( is_null( $title ) ) {
continue;
}
$categories[] = $title;
@@ -95,7 +95,7 @@
NS_CATEGORY,
$parser->transformMsg( $arg, 
$poptions, $mwParser->getTitle() )
);
-   if( is_null( $title ) ) {
+   if ( is_null( $title ) ) {
continue;
}
$excludeCategories[] = $title;
@@ -347,7 +347,8 @@
 
if ( $catCount < 1 && false == $namespaceFiltering ) {
if ( $suppressErrors == false ) {
-   return wfMessage( 'intersection_noincludecats' 
)->inContentLanguage()->escaped(); // "!!no included categories!!";
+// "!!no included categories!!"
+   return wfMessage( 'intersection_noincludecats' 
)->inContentLanguage()->escaped();
} else {
return '';
}
@@ -355,7 +356,8 @@
 
if ( $totalCatCount > $wgDLPmaxCategories && 
!$wgDLPAllowUnlimitedCategories ) {
if ( $suppressErrors == false ) {
-   return wfMessage( 'intersection_toomanycats' 
)->inContentLanguage()->escaped(); // "!!too many categories!!";
+// "!!too many categories!!"
+   return wfMessage( 'intersection_toomanycats' 
)->inContentLanguage()->escaped();
} else {
return '';
}
@@ -384,11 +386,11 @@
 
// build the SQL query
$dbr = wfGetDB( DB_SLAVE );
-   $tables = array( 'page' );
-   $fields = array( 'page_namespace', 'page_title' );
-   $where = array();
-   $join = array();
-   $options = array();
+   $tables = [ 'page' ];
+   $fields = [ 'page_namespace', 'page_title' ];
+   $where = [];
+   $join = [];
+   $options = [];
 
if ( $googleHack ) {
$fields[] = 'page_id';
@@ -406,9 +408,9 @@
// Check if the extension actually exists before changing the 
query...
if ( $flaggedRevs && defined( 'FLAGGED_REVISIONS' ) ) {
$tables[] = 'flaggedpages';
-   $join['flaggedpages'] = array( 'LEFT JOIN', 'page_id = 
fp_page_id' );
+   $join['flaggedpages'] = [ 'LEFT JOIN', 'page_id = 
fp_page_id' ];
 
-   switch( $stable ) {
+   switch ( $stable ) {
case 'only':
$where[] = 'fp_stable IS NOT NULL';
break;
@@ -417,7 +419,7 @@

[MediaWiki-commits] [Gerrit] mediawiki...DoubleWiki[master]: Add phpcs and make pass

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354541 )

Change subject: Add phpcs and make pass
..


Add phpcs and make pass

Change-Id: I1732cfae26081cd2c2b44195d077869413072b47
---
M DoubleWiki.i18n.php
M DoubleWiki.php
M DoubleWiki_body.php
M composer.json
A phpcs.xml
5 files changed, 95 insertions(+), 76 deletions(-)

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



diff --git a/DoubleWiki.i18n.php b/DoubleWiki.i18n.php
index d8d9d0a..eb2545b 100644
--- a/DoubleWiki.i18n.php
+++ b/DoubleWiki.i18n.php
@@ -10,12 +10,12 @@
  *
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
-$messages = array();
+$messages = [];
 if ( !function_exists( 'wfJsonI18nShim32da5ba0f4e8d543' ) ) {
function wfJsonI18nShim32da5ba0f4e8d543( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
+   $fileName = __DIR__ . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
$data = FormatJson::decode( file_get_contents( 
$fileName ), true );
foreach ( array_keys( $data ) as $key ) {
diff --git a/DoubleWiki.php b/DoubleWiki.php
index 02719b4..333c438 100644
--- a/DoubleWiki.php
+++ b/DoubleWiki.php
@@ -1,27 +1,29 @@
 http://www.gnu.org/copyleft/gpl.html
-#
-#
-# This extension displays an article and its
-# translation on two columns of the same page.
-# The translation comes from another wiki
-# that can be accessed through interlanguage links
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * This extension displays an article and its
+ * translation on two columns of the same page.
+ * The translation comes from another wiki
+ * that can be accessed through interlanguage links
+ */
 
 /**
- * This PHP entry point is deprecated. Please use wfLoadExtension() and the 
extension.json file instead.
+ * This PHP entry point is deprecated.
+ * Please use wfLoadExtension() and the extension.json file instead.
  * See https://www.mediawiki.org/wiki/Manual:Extension_registration for more 
details.
  */
 
@@ -33,10 +35,10 @@
 // How long cached page output is stored in memcached
 $wgDoubleWikiCacheTime = 3600 * 12;
 
-$wgExtensionCredits['other'][] = array(
+$wgExtensionCredits['other'][] = [
'path' => __FILE__,
'name' => 'DoubleWiki',
'author' => 'ThomasV',
'url' => 'https://www.mediawiki.org/wiki/Extension:DoubleWiki',
'descriptionmsg' => 'doublewiki-desc',
-);
+];
diff --git a/DoubleWiki_body.php b/DoubleWiki_body.php
index 77ab2fc..45f6088 100644
--- a/DoubleWiki_body.php
+++ b/DoubleWiki_body.php
@@ -1,41 +1,47 @@
 http://www.gnu.org/copyleft/gpl.html
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
 
 class DoubleWiki {
/**
 * Tags that must be closed. (list copied from Sanitizer.php)
 */
+   // @codingStandardsIgnoreStart
public $tags = 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: NumberInputWidget: Use icons instead of labels

2017-05-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354782 )

Change subject: NumberInputWidget: Use icons instead of labels
..

NumberInputWidget: Use icons instead of labels

Change-Id: I0beb82867f5ad31d189a022f841dba7a1e3a3ad7
---
M src/themes/apex/widgets.less
M src/themes/wikimediaui/widgets.less
M src/widgets/NumberInputWidget.js
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/82/354782/1

diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index cfe3a12..7979f38 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -459,7 +459,7 @@
max-width: @max-width-input-default;
 
&-field > .oo-ui-buttonWidget {
-   width: 2.25em;
+   width: 2.5em;
}
 
&-minusButton.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index 50a159c..2e451b5 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -814,7 +814,7 @@
 
&-buttoned {
.oo-ui-buttonWidget {
-   width: @width-button-combo-widget;
+   width: 3em;
}
 
.oo-ui-buttonElement-button {
diff --git a/src/widgets/NumberInputWidget.js b/src/widgets/NumberInputWidget.js
index 043aa2a..33b2012 100644
--- a/src/widgets/NumberInputWidget.js
+++ b/src/widgets/NumberInputWidget.js
@@ -56,7 +56,7 @@
disabled: this.isDisabled(),
tabIndex: -1,
classes: [ 
'oo-ui-numberInputWidget-minusButton' ],
-   label: '−'
+   icon: 'subtract'
},
config.minusButton
) );
@@ -65,7 +65,7 @@
disabled: this.isDisabled(),
tabIndex: -1,
classes: [ 'oo-ui-numberInputWidget-plusButton' 
],
-   label: '+'
+   icon: 'add'
},
config.plusButton
) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0beb82867f5ad31d189a022f841dba7a1e3a3ad7
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...DynamicSidebar[master]: Add phpcs and make pass

2017-05-20 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354781 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: I3c8b92452c5e38cf944ea363cfc0a5ba6f199d9a
---
M DynamicSidebar.body.php
M DynamicSidebar.i18n.php
M DynamicSidebar.php
M composer.json
A phpcs.xml
5 files changed, 45 insertions(+), 30 deletions(-)


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

diff --git a/DynamicSidebar.body.php b/DynamicSidebar.body.php
index a1bdb41..6a03481 100644
--- a/DynamicSidebar.body.php
+++ b/DynamicSidebar.body.php
@@ -13,9 +13,9 @@
global $wgDynamicSidebarUseCategories, 
$wgDynamicSidebarUsePageCategories;
 
self::printDebug( "Entering modifySidebar" );
-   $groupSB = array();
-   $userSB = array();
-   $catSB = array();
+   $groupSB = [];
+   $userSB = [];
+   $catSB = [];
$user = $skin->getUser();
if ( $wgDynamicSidebarUseGroups && isset( 
$sidebar['GROUP-SIDEBAR'] ) ) {
self::printDebug( "Using group sidebar" );
@@ -34,7 +34,7 @@
$skin->addToSidebarPlain( $catSB, 
self::doPageCategorySidebar( $user, $skin->getTitle() ) );
}
 
-   $sidebar_copy = array();
+   $sidebar_copy = [];
 
foreach ( $sidebar as $sidebar_key => $sidebar_item ) {
if ( $sidebar_key == 'GROUP-SIDEBAR' ) {
@@ -93,7 +93,7 @@
private static function doGroupSidebar( User $user ) {
// Get group membership array.
$groups = $user->getEffectiveGroups();
-   Hooks::run( 'DynamicSidebarGetGroups', array( &$groups ) );
+   Hooks::run( 'DynamicSidebarGetGroups', [ &$groups ] );
// Did we find any groups?
if ( count( $groups ) == 0 ) {
// Remove this sidebar if not
@@ -134,7 +134,7 @@
 */
private static function doCategorySidebar( User $user, $categories = 
null ) {
self::printDebug( "User name: {$user->getName()}" );
-   if( $categories === null ) {
+   if ( $categories === null ) {
$categories = 
$user->getUserPage()->getParentCategories();
}
 
diff --git a/DynamicSidebar.i18n.php b/DynamicSidebar.i18n.php
index 080f255..639aa0a 100644
--- a/DynamicSidebar.i18n.php
+++ b/DynamicSidebar.i18n.php
@@ -10,12 +10,12 @@
  *
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
-$messages = array();
+$messages = [];
 if ( !function_exists( 'wfJsonI18nShim979fa1c4c18be0c8' ) ) {
function wfJsonI18nShim979fa1c4c18be0c8( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
+   $fileName = __DIR__ . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
$data = FormatJson::decode( file_get_contents( 
$fileName ), true );
foreach ( array_keys( $data ) as $key ) {
diff --git a/DynamicSidebar.php b/DynamicSidebar.php
index c39dd0e..2afe0c1 100644
--- a/DynamicSidebar.php
+++ b/DynamicSidebar.php
@@ -1,30 +1,33 @@
 http://www.mediawiki.org/wiki/User:Ryan_lane>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# http://www.gnu.org/copyleft/gpl.html
+/*
+ * Copyright (C) 2010 Ryan Lane 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI, Apex theme: Increase FieldsetLayout header's `f...

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354369 )

Change subject: WikimediaUI, Apex theme: Increase FieldsetLayout header's 
`font-size`
..


WikimediaUI, Apex theme: Increase FieldsetLayout header's `font-size`

This has been decreased in I7d69f43b5e6c33de82c10237d7d6db3c597b6bf6,
but we need to set it more carefully apart from the labels and widgets.
Increasing just to be rendered by 1px higher, as every vertical pixel
counts in prominent use case Special Pages.
Also aligning FieldsetLayout with icon's padding to icon padding
elsewhere.

Bug: T155575
Change-Id: I947c6cd4d15f62e04c14ef09838e787d3f6cde5a
---
M src/themes/apex/layouts.less
M src/themes/wikimediaui/common.less
M src/themes/wikimediaui/layouts.less
3 files changed, 10 insertions(+), 5 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/themes/apex/layouts.less b/src/themes/apex/layouts.less
index 88bfa96..80d6963 100644
--- a/src/themes/apex/layouts.less
+++ b/src/themes/apex/layouts.less
@@ -133,7 +133,7 @@
 
&.oo-ui-labelElement > .oo-ui-fieldsetLayout-header > 
.oo-ui-labelElement-label {
display: inline-block;
-   font-size: 1.1em;
+   font-size: 1.15em;
margin-bottom: 0.5em;
padding: 0.25em 0;
font-weight: bold;
diff --git a/src/themes/wikimediaui/common.less 
b/src/themes/wikimediaui/common.less
index c92b5da..5c8f7f1 100644
--- a/src/themes/wikimediaui/common.less
+++ b/src/themes/wikimediaui/common.less
@@ -99,6 +99,7 @@
 @margin-button-close: 4 / @oo-ui-font-size-browser / @oo-ui-font-size-default;
 @margin-top-tagitem: 4 / @oo-ui-font-size-browser / @oo-ui-font-size-default;
 @margin-top-tagmultiselect-input: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
+@margin-bottom-fieldset-header: 8 / @oo-ui-font-size-browser / ( 
@oo-ui-font-size-default * @font-size-fieldset-header );
 
 @border-default: @border-width-default solid @border-color-default;
 @border-disabled: @border-width-default solid @border-color-disabled;
@@ -152,6 +153,7 @@
 @padding-start-input-text-icon: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // As long as we have whitespace in icon canvas, we 
need reduced `padding-left`.
 @padding-start-icon: @size-icon;
 @padding-start-icon-only: 26 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `2.03125em`≈`26px`; 
@min-width-button-default - @padding-horizontal-default - 2 * 
@border-width-default;
+@padding-start-fieldset-header-iconized: 26 / @oo-ui-font-size-browser / ( 
@oo-ui-font-size-default * @font-size-fieldset-header );
 @padding-start-indicator-only: @padding-start-icon-only;
 @padding-start-indicator-plus: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
 @padding-start-input-text-icon-label: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
@@ -169,9 +171,12 @@
 @box-shadow-erroneous-focus: inset 0 0 0 1px @color-erroneous;
 @box-shadow-disabled-filled: inset 0 0 0 1px @color-disabled-filled;
 
+@font-size-fieldset-header: 1.15em; // equals `16.1px` at base `font-size: 
12.8px`. Todo: Not able to get unified `16px` due to T
+
 @line-height-default: 1.6; // same as Vector
 @line-height-reset: 1; // Support: Safari, reset `line-height` in order to 
normalize it in a follow-up rule across browsers.
 @line-height-message: 1.4;
+@line-height-fieldset-header-iconized: 24 / @oo-ui-font-size-browser / ( 
@oo-ui-font-size-default * @font-size-fieldset-header );
 @line-height-form-element: 1.4;
 @line-height-input-binary-label: 1.5; // Checkboxes, Radios and 
ToggleSwitchWidget labels need a tad more for increased vertical click area
 @line-height-widget-multiline: 1.275;
diff --git a/src/themes/wikimediaui/layouts.less 
b/src/themes/wikimediaui/layouts.less
index a6185d7..86eb027 100644
--- a/src/themes/wikimediaui/layouts.less
+++ b/src/themes/wikimediaui/layouts.less
@@ -148,15 +148,15 @@
 
&.oo-ui-labelElement > .oo-ui-fieldsetLayout-header > 
.oo-ui-labelElement-label {
display: inline-block;
-   margin-bottom: 0.56818em; // equals `8px` due to `font-size: 
1.1em` below
-   font-size: 1.1em;
+   margin-bottom: @margin-bottom-fieldset-header;
+   font-size: @font-size-fieldset-header;
font-weight: bold;
line-height: @line-height-form-element;
}
 
&.oo-ui-iconElement > .oo-ui-fieldsetLayout-header > 
.oo-ui-labelElement-label {
-   padding-left: 2em;
-   line-height: 1.8;
+   padding-left: @padding-start-fieldset-header-iconized;
+   line-height: @line-height-fieldset-header-iconized;
}
 
&.oo-ui-iconElement > .oo-ui-fieldsetLayout-header > 
.oo-ui-iconElement-icon {

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Provide VE-rebaser in MediaWiki as Special:CollabPad

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/337376 )

Change subject: Provide VE-rebaser in MediaWiki as Special:CollabPad
..


Provide VE-rebaser in MediaWiki as Special:CollabPad

Change-Id: I3ffe0e2b6af43d4018dcd79877f4f27ed7d6a7e7
---
M ApiVisualEditor.php
M VisualEditor.hooks.php
A VisualEditor.i18n.alias.php
M extension.json
A modules/ve-mw-collab/SpecialCollabPad.php
A modules/ve-mw-collab/ve.init.mw.CollabTarget.css
A modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
A modules/ve-mw-collab/ve.init.mw.CollabTarget.js
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
10 files changed, 373 insertions(+), 1 deletion(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index de54719..ea12235 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -188,6 +188,10 @@
$params = $this->extractRequestParams();
 
$title = Title::newFromText( $params['page'] );
+   if ( $title && $title->isSpecial( 'CollabPad' ) ) {
+   // Convert Special:CollabPad/MyPage to MyPage so we can 
parsefragment properly
+   $title = Title::newFromText( preg_replace( 
'`^([^/]+/)`', '', $params['page'] ) );
+   }
if ( !$title ) {
$this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['page'] ) ] );
}
diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 36efc6b..68b7622 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -792,6 +792,7 @@
'svgMaxSize' => $coreConfig->get( 'SVGMaxSize' ),
'namespacesWithSubpages' => $coreConfig->get( 
'NamespacesWithSubpages' ),
'specialBooksources' => urldecode( 
SpecialPage::getTitleFor( 'Booksources' )->getPrefixedURL() ),
+   'rebaserUrl' => $coreConfig->get( 
'VisualEditorRebaserURL' ),
'restbaseUrl' => $coreConfig->get( 
'VisualEditorRestbaseURL' ),
'fullRestbaseUrl' => $coreConfig->get( 
'VisualEditorFullRestbaseURL' ),
'feedbackApiUrl' =>  $veConfig->get( 
'VisualEditorFeedbackAPIURL' ),
diff --git a/VisualEditor.i18n.alias.php b/VisualEditor.i18n.alias.php
new file mode 100644
index 000..a6f280a
--- /dev/null
+++ b/VisualEditor.i18n.alias.php
@@ -0,0 +1,23 @@
+ [ 'CollabPad', 'Collab Pad' ],
+];
+
+/** Cyrmu
+ * @author "James D. Forrester"
+ */
+$specialPageAliases['cy'] = [
+   'CollabPad' => [ 'PadCydweithredu', 'Pad Cydweithredu' ],
+];
diff --git a/extension.json b/extension.json
index 1f3c132..d292b9c 100644
--- a/extension.json
+++ b/extension.json
@@ -31,6 +31,7 @@
"site",
"user"
],
+   "VisualEditorRebaserURL": false,
"VisualEditorRestbaseURL": false,
"VisualEditorFullRestbaseURL": false,
"VisualEditorFeedbackAPIURL": false,
@@ -127,6 +128,9 @@
"modules/ve-wmf/i18n"
]
},
+   "ExtensionMessagesFiles": {
+   "VisualEditorAlias": "VisualEditor.i18n.alias.php"
+   },
"Hooks": {
"BeforePageDisplay": [
"VisualEditorHooks::onBeforePageDisplay"
@@ -222,6 +226,16 @@
"targets": [
"desktop",
"mobile"
+   ]
+   },
+   "socket.io": {
+   "scripts": [
+   "lib/ve/lib/socket.io-client/socket.io.min.js"
+   ]
+   },
+   "dompurify": {
+   "scripts": [
+   "lib/ve/lib/dompurify/purify.js"
]
},
"unicodejs": {
@@ -419,6 +433,32 @@
],
"targets": [
"mobile"
+   ]
+   },
+   "ext.visualEditor.collabTarget": {
+   "scripts": [
+   
"modules/ve-mw-collab/ve.init.mw.CollabTarget.js"
+   ],
+   "dependencies": [
+   "ext.visualEditor.base",
+   "ext.visualEditor.mediawiki",
+   "ext.visualEditor.core.desktop",
+   "ext.visualEditor.mwextensions.desktop",
+   "ext.visualEditor.desktopArticleTarget"
+   ],
+   "messages" : []
+   },
+   

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add in 'nl_subscribers_count' column to 'nl_newsletters' table

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354756 )

Change subject: Add in 'nl_subscribers_count' column to 'nl_newsletters' table
..


Add in 'nl_subscribers_count' column to 'nl_newsletters' table

* Would save costly queries on Special:Newsletters
* Can help later in sorting via subscribers count too

Bug: T131607
Change-Id: I3842e5a83c8cd09459d5a4156758bf6292c097e9
---
M Newsletter.hooks.php
M includes/NewsletterDb.php
A maintenance/updateSubscribersCount.php
A sql/nl_newsletters-add-subscriber_count.sql
4 files changed, 81 insertions(+), 0 deletions(-)

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



diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 48cb1c0..32dd5e5 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -115,6 +115,8 @@
__DIR__ . '/sql/nl_main_page_id-drop-index.sql' );
$updater->addExtensionIndex( 'nl_newsletters', 
'nl_main_page_active',
__DIR__ . '/sql/nl_newsletters-add-unique.sql' );
+   $updater->addExtensionField( 'nl_newsletters', 
'nl_subscriber_count',
+   __DIR__ . 
'/sql/nl_newsletters-add-subscriber_count.sql' );
 
return true;
}
diff --git a/includes/NewsletterDb.php b/includes/NewsletterDb.php
index bc523bd..eea58d0 100644
--- a/includes/NewsletterDb.php
+++ b/includes/NewsletterDb.php
@@ -32,8 +32,20 @@
];
}
$dbw = $this->lb->getConnection( DB_MASTER );
+   $dbw->begin( __METHOD__ );
$dbw->insert( 'nl_subscriptions', $rowData, __METHOD__, [ 
'IGNORE' ] );
$success = (bool)$dbw->affectedRows();
+
+   if ( $success ) {
+   $dbw->update(
+   'nl_newsletters',
+   [ 'nl_subscriber_count=nl_subscriber_count+1' ],
+   [ 'nl_id' => $newsletter->getId() ],
+   __METHOD__
+   );
+   }
+
+   $dbw->commit();
$this->lb->reuseConnection( $dbw );
 
return $success;
@@ -52,8 +64,19 @@
];
 
$dbw = $this->lb->getConnection( DB_MASTER );
+   $dbw->begin( __METHOD__ );
$dbw->delete( 'nl_subscriptions', $rowData, __METHOD__ );
$success = (bool)$dbw->affectedRows();
+   if ( $success ) {
+   $dbw->update(
+   'nl_newsletters',
+   [ 'nl_subscriber_count=nl_subscriber_count-1' ],
+   [ 'nl_id' => $newsletter->getId() ],
+   __METHOD__
+   );
+   }
+
+   $dbw->commit();
$this->lb->reuseConnection( $dbw );
 
return $success;
diff --git a/maintenance/updateSubscribersCount.php 
b/maintenance/updateSubscribersCount.php
new file mode 100644
index 000..17bc93a
--- /dev/null
+++ b/maintenance/updateSubscribersCount.php
@@ -0,0 +1,53 @@
+addDescription(
+   "Regenerate nl_subscribers_count in nl_newsletters from 
nl_subscriptions table" );
+   $this->requireExtension( 'Newsletter' );
+   }
+
+   public function execute() {
+   $dbw = $this->getDB( DB_MASTER );
+   $offset = 0;
+   while ( true ) {
+   $res = $dbw->select( [ 'nl_newsletters', 
'nl_subscriptions' ],
+   [ 'nl_id', 'subscriber_count' => 
'COUNT(nls_subscriber_id)' ],
+   'nl_id > ' . $dbw->addQuotes( $offset ),
+   __METHOD__,
+   [ 'GROUP BY' => 'nl_id', 'LIMIT' => 50, 'ORDER 
BY' => 'nl_id' ],
+   [ 'nl_subscriptions' => [ 'LEFT JOIN', 
'nls_newsletter_id=nl_id' ] ]
+   );
+
+   if ( $res->numRows() === 0 ) {
+   break;
+   }
+
+   foreach ( $res as $row ) {
+   $dbw->update(
+   'nl_newsletters',
+   [ 'nl_subscriber_count' => 
$row->subscriber_count ],
+   [ 'nl_id' => $row->nl_id ],
+   __METHOD__
+   );
+   }
+
+   $this->output( "Updated " . $res->numRows() . " rows 
\n" );
+
+   wfWaitForSlaves();
+
+   // We need to get the last element and add to 

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add in 'nl_subscribers_count' column to 'nl_newsletters' table

2017-05-20 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354756 )

Change subject: Add in 'nl_subscribers_count' column to 'nl_newsletters' table
..

Add in 'nl_subscribers_count' column to 'nl_newsletters' table

* Would save costly queries on Special:Newsletters
* Can help later in sorting via subscribers count too

Bug: T131607
Change-Id: I3842e5a83c8cd09459d5a4156758bf6292c097e9
---
M Newsletter.hooks.php
M includes/NewsletterDb.php
A maintenance/updateSubscribersCount.php
A sql/nl_newsletters-add-subscriber_count.sql
4 files changed, 78 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/56/354756/1

diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 48cb1c0..32dd5e5 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -115,6 +115,8 @@
__DIR__ . '/sql/nl_main_page_id-drop-index.sql' );
$updater->addExtensionIndex( 'nl_newsletters', 
'nl_main_page_active',
__DIR__ . '/sql/nl_newsletters-add-unique.sql' );
+   $updater->addExtensionField( 'nl_newsletters', 
'nl_subscriber_count',
+   __DIR__ . 
'/sql/nl_newsletters-add-subscriber_count.sql' );
 
return true;
}
diff --git a/includes/NewsletterDb.php b/includes/NewsletterDb.php
index bc523bd..eea58d0 100644
--- a/includes/NewsletterDb.php
+++ b/includes/NewsletterDb.php
@@ -32,8 +32,20 @@
];
}
$dbw = $this->lb->getConnection( DB_MASTER );
+   $dbw->begin( __METHOD__ );
$dbw->insert( 'nl_subscriptions', $rowData, __METHOD__, [ 
'IGNORE' ] );
$success = (bool)$dbw->affectedRows();
+
+   if ( $success ) {
+   $dbw->update(
+   'nl_newsletters',
+   [ 'nl_subscriber_count=nl_subscriber_count+1' ],
+   [ 'nl_id' => $newsletter->getId() ],
+   __METHOD__
+   );
+   }
+
+   $dbw->commit();
$this->lb->reuseConnection( $dbw );
 
return $success;
@@ -52,8 +64,19 @@
];
 
$dbw = $this->lb->getConnection( DB_MASTER );
+   $dbw->begin( __METHOD__ );
$dbw->delete( 'nl_subscriptions', $rowData, __METHOD__ );
$success = (bool)$dbw->affectedRows();
+   if ( $success ) {
+   $dbw->update(
+   'nl_newsletters',
+   [ 'nl_subscriber_count=nl_subscriber_count-1' ],
+   [ 'nl_id' => $newsletter->getId() ],
+   __METHOD__
+   );
+   }
+
+   $dbw->commit();
$this->lb->reuseConnection( $dbw );
 
return $success;
diff --git a/maintenance/updateSubscribersCount.php 
b/maintenance/updateSubscribersCount.php
new file mode 100644
index 000..fffaee4
--- /dev/null
+++ b/maintenance/updateSubscribersCount.php
@@ -0,0 +1,50 @@
+addDescription(
+   "Regenerate nl_subscribers_count in nl_newsletters from 
nl_subscriptions table" );
+   $this->requireExtension( 'Newsletter' );
+   }
+
+   public function execute() {
+   $dbw = $this->getDB( DB_MASTER );
+   $offset = 0;
+   while ( true ) {
+   $res =
+   $dbw->select( [ 'nl_newsletters', 
'nl_subscriptions' ],
+   [ 'nl_id', 'subscriber_count' => 
'COUNT(nls_subscriber_id)' ],
+   'nl_id > ' . $dbw->addQuotes( $offset ),
+   __METHOD__,
+   [ 'GROUP BY' => 'nl_id', 'LIMIT' => 50, 
'ORDER BY' => 'nl_id' ],
+   [ 'nl_subscriptions' => [ 'LEFT JOIN', 
'nls_newsletter_id=nl_id' ] ] );
+
+   if ( $res->numRows() === 0 ) {
+   break;
+   }
+
+   foreach ( $res as $row ) {
+   $dbw->update( 'nl_newsletters', [ 
'nl_subscriber_count' => $row->subscriber_count ],
+   [ 'nl_id' => $row->nl_id ], __METHOD__ 
);
+   }
+
+   $this->output( "Updated " . $res->numRows() . " rows 
\n" );
+
+   wfWaitForSlaves();
+
+   // We need to get the last element and add to offset.
+   $offset = $row->nl_id;
+   }
+
+   $this->output( "Done!\n" );
+   }
+}
+
+$maintClass = 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (2a8f71d02)

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354754 )

Change subject: Update VE core submodule to master (2a8f71d02)
..


Update VE core submodule to master (2a8f71d02)

New changes:
1caf22c92 Localisation updates from https://translatewiki.net.
2add169fd demo.minimal should use getInitializedPromise
44fd23bdc rebaseUncommittedChange: remove weird duplicated selection update code
0c35c6390 Rebaser: Start on i18n
2a8f71d02 ce.ContentBranchNode#destroy: Also call parent

Change-Id: I1fd0b4c90cc9f29f842c09ad5dbf2ac52518182a
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ve b/lib/ve
index ee59e9d..2a8f71d 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit ee59e9d337c2fcf040e5975476ec3b93725004f8
+Subproject commit 2a8f71d02667a0ef5353b0d748fd6f3fbeb9977b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1fd0b4c90cc9f29f842c09ad5dbf2ac52518182a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
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] mediawiki/core[master]: ApiSandbox: Fix HTTP error handling

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354654 )

Change subject: ApiSandbox: Fix HTTP error handling
..


ApiSandbox: Fix HTTP error handling

Since bf69459, ApiSandbox seems to stall out when an API request
results in an HTTP error (e.g. due to a PHP fatal error). Before that
revision, it displayed the 'apisandbox-results-error' message in this
situation.

Apparently the jQuery 3 changes to Deferred behavior caused it to be
impossible to have a then() filter return `this` (or anything else) in
order to avoid replacing the existing promise that's being resolved or
rejected.

Bug: T165857
Change-Id: I3f646cdfe7fe8987437980790788821f51e728d1
---
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
1 file changed, 17 insertions(+), 15 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
index f53850a..da8bdcd 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
@@ -1100,25 +1100,18 @@
}
} )
.then( null, function ( code, data, 
result, jqXHR ) {
+   var deferred = $.Deferred();
+
if ( code !== 'http' ) {
// Not really an error, 
work around mw.Api thinking it is.
-   return $.Deferred()
-   .resolve( 
result, jqXHR )
-   .promise();
+   deferred.resolve( 
result, jqXHR );
+   } else {
+   // Just forward it.
+   deferred.reject.apply( 
deferred, arguments );
}
-   return this;
+   return deferred.promise();
} )
-   .fail( function ( code, data ) {
-   var details = 'HTTP error: ' + 
data.exception;
-   $result.empty()
-   .append(
-   new 
OO.ui.LabelWidget( {
-   label: 
mw.message( 'apisandbox-results-error', details ).text(),
-   
classes: [ 'error' ]
-   } ).$element
-   );
-   } )
-   .done( function ( data, jqXHR ) {
+   .then( function ( data, jqXHR ) {
var m, loadTime, button, clear,
ct = 
jqXHR.getResponseHeader( 'Content-Type' );
 
@@ -1195,6 +1188,15 @@
.on( 'click', 
button.setDisabled, [ true ], button )

.$element.appendTo( $result );
}
+   }, function ( code, data ) {
+   var details = 'HTTP error: ' + 
data.exception;
+   $result.empty()
+   .append(
+   new 
OO.ui.LabelWidget( {
+   label: 
mw.message( 'apisandbox-results-error', details ).text(),
+   
classes: [ 'error' ]
+   } ).$element
+   );
} );
} );
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: rebaser: Focus surface on load

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354718 )

Change subject: rebaser: Focus surface on load
..


rebaser: Focus surface on load

Change-Id: I5c7a921de014e5ad70063c6b46db6c23067af435
---
M rebaser/demo.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/rebaser/demo.js b/rebaser/demo.js
index 83fbf4a..b5553f5 100644
--- a/rebaser/demo.js
+++ b/rebaser/demo.js
@@ -16,6 +16,7 @@
target.addSurface( ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( '' ) ) );
synchronizer = new ve.dm.SurfaceSynchronizer( target.surface.model, 
ve.docName );
target.surface.view.setSynchronizer( synchronizer );
+   target.surface.view.focus();
 
authorList = new ve.ui.AuthorListWidget( synchronizer );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c7a921de014e5ad70063c6b46db6c23067af435
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] mediawiki...VisualEditor[master]: rebaser: Add popstate/teardown handling

2017-05-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354755 )

Change subject: rebaser: Add popstate/teardown handling
..

rebaser: Add popstate/teardown handling

Change-Id: I3faa7e2dd79fa5f1816833852325185caa4e82d4
---
M modules/ve-mw-collab/SpecialCollabPad.php
M modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
M modules/ve-mw-collab/ve.init.mw.CollabTarget.js
3 files changed, 99 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/55/354755/1

diff --git a/modules/ve-mw-collab/SpecialCollabPad.php 
b/modules/ve-mw-collab/SpecialCollabPad.php
index 04930d0..14ad803 100644
--- a/modules/ve-mw-collab/SpecialCollabPad.php
+++ b/modules/ve-mw-collab/SpecialCollabPad.php
@@ -43,33 +43,40 @@
$output->addModules( 'ext.visualEditor.collabTarget.init' );
 
$output->enableOOUI();
+
+   $documentNameField = new OOUI\ActionFieldLayout(
+   new OOUI\TextInputWidget( [
+   'classes' => [ 
've-init-mw-collabTarget-nameInput' ],
+   'placeholder' => $this->msg( 
'visualeditor-rebase-client-document-name' )->text(),
+   'autofocus' => true,
+   'infusable' => true
+   ] ),
+   new OOUI\ButtonWidget( [
+   'classes' => [ 
've-init-mw-collabTarget-nameButton' ],
+   'label' => $this->msg( 
'visualeditor-rebase-client-document-create-edit' )->text(),
+   // Only enable once JS has loaded
+   'disabled' => true,
+   'infusable' => true
+   ] ),
+   [
+   'classes' => [ 
've-init-mw-collabTarget-nameField' ],
+   'infusable' => true
+   ]
+   );
+   $progressBar = new OOUI\ProgressBarWidget( [
+   'classes' => [ 've-init-mw-collabTarget-loading' ],
+   'infusable' => true
+   ] );
+
if ( $par ) {
$title = Title::newFromText( $par );
$output->setPageTitle( 'CollabPad: ' . 
$title->getPrefixedText() );
-   $output->addHTML( new OOUI\ProgressBarWidget( [
-   'classes' => [ 
've-init-mw-collabTarget-loading' ]
-   ] ) );
+   $documentNameField->addClasses( [ 
'oo-ui-element-hidden' ] );
} else {
// Scripts only, styles already added above
$output->addModules( 'ext.visualEditor.collabTarget' );
-   // TODO: Output this "form" unconditionally so the user 
can
-   // navigate back to it without reloading the page.
-   $output->addHTML( new OOUI\ActionFieldLayout(
-   new OOUI\TextInputWidget( [
-   'classes' => [ 
've-init-mw-collabTarget-nameInput' ],
-   'placeholder' => $this->msg( 
'visualeditor-rebase-client-document-name' )->text(),
-   'autofocus' => true,
-   'infusable' => true
-   ] ),
-   new OOUI\ButtonWidget( [
-   'classes' => [ 
've-init-mw-collabTarget-nameButton' ],
-   'label' => $this->msg( 
'visualeditor-rebase-client-document-create-edit' )->text(),
-   // Only enable once JS has loaded
-   'disabled' => true,
-   'infusable' => true
-   ] ),
-   [ 'classes' => [ 
've-init-mw-collabTarget-nameField' ] ] )
-   );
+   $progressBar->addClasses( [ 'oo-ui-element-hidden' ] );
}
+   $output->addHTML( $progressBar . $documentNameField );
}
 }
diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js 
b/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
index ef7c677..ecf090b 100644
--- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
+++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js
@@ -10,13 +10,18 @@
  */
 
 ( function () {
-   var $content = $( '#mw-content-text' ),
+   var target,
conf = mw.config.get( 'wgVisualEditorConfig' ),
-   pageTitle = mw.Title.newFromText( mw.config.get( 
'collabPadPageName' ) || '' ),
+   pageName = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Various test fixes for postgres

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354082 )

Change subject: Various test fixes for postgres
..


Various test fixes for postgres

* Add another TS_MW timestamp coercion to WatchedItemStore.
* Do not expect timestamp conversion for pager mOffset.
  They have been used in Pager URLs for ages.
* Do not assume the user_id for UTSysop is 1; use the row value.

Bug: T75174
Change-Id: I590a4b7363ccff26d9ac9f51b95fc1aa072503b2
---
M includes/WatchedItemStore.php
M tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
M tests/phpunit/includes/pager/RangeChronologicalPagerTest.php
3 files changed, 18 insertions(+), 18 deletions(-)

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



diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php
index 228f93b..06f93c6 100644
--- a/includes/WatchedItemStore.php
+++ b/includes/WatchedItemStore.php
@@ -581,7 +581,8 @@
);
 
foreach ( $res as $row ) {
-   $timestamps[$row->wl_namespace][$row->wl_title] = 
$row->wl_notificationtimestamp;
+   $timestamps[$row->wl_namespace][$row->wl_title] =
+   wfTimestampOrNull( TS_MW, 
$row->wl_notificationtimestamp );
}
 
return $timestamps;
diff --git a/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php 
b/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
index c4b52f0..333fd88 100644
--- a/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
@@ -107,16 +107,10 @@
'user' => 0,
'user_text' => 'User',
'namespace' => NS_USER,
-   'title' => 'UTSysop',
-   'params' => [
-   '4::userid' => 1,
-   ],
+   'title' => 'UTSysop'
],
[
-   'text' => 'User account UTSysop was 
created by User',
-   'api' => [
-   'userid' => 1,
-   ],
+   'text' => 'User account UTSysop was 
created by User'
],
],
];
@@ -126,6 +120,10 @@
 * @dataProvider provideCreate2LogDatabaseRows
 */
public function testCreate2LogDatabaseRows( $row, $extra ) {
+   // Make UTSysop user and use its user_id (sequence does not 
reset to 1 for postgres)
+   $user = static::getTestSysop()->getUser();
+   $row['params']['4::userid'] = $user->getId();
+   $extra['api']['userid'] = $user->getId();
$this->doTestLogFormatter( $row, $extra );
}
 
@@ -145,16 +143,10 @@
'user' => 0,
'user_text' => 'Sysop',
'namespace' => NS_USER,
-   'title' => 'UTSysop',
-   'params' => [
-   '4::userid' => 1,
-   ],
+   'title' => 'UTSysop'
],
[
-   'text' => 'User account UTSysop was 
created by Sysop and password was sent by email',
-   'api' => [
-   'userid' => 1,
-   ],
+   'text' => 'User account UTSysop was 
created by Sysop and password was sent by email'
],
],
];
@@ -164,6 +156,10 @@
 * @dataProvider provideByemailLogDatabaseRows
 */
public function testByemailLogDatabaseRows( $row, $extra ) {
+   // Make UTSysop user and use its user_id (sequence does not 
reset to 1 for postgres)
+   $user = static::getTestSysop()->getUser();
+   $row['params']['4::userid'] = $user->getId();
+   $extra['api']['userid'] = $user->getId();
$this->doTestLogFormatter( $row, $extra );
}
 
diff --git a/tests/phpunit/includes/pager/RangeChronologicalPagerTest.php 
b/tests/phpunit/includes/pager/RangeChronologicalPagerTest.php
index 3374f4a..4721ce6 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (2a8f71d02)

2017-05-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354754 )

Change subject: Update VE core submodule to master (2a8f71d02)
..

Update VE core submodule to master (2a8f71d02)

New changes:
1caf22c92 Localisation updates from https://translatewiki.net.
2add169fd demo.minimal should use getInitializedPromise
44fd23bdc rebaseUncommittedChange: remove weird duplicated selection update code
0c35c6390 Rebaser: Start on i18n
2a8f71d02 ce.ContentBranchNode#destroy: Also call parent

Change-Id: I1fd0b4c90cc9f29f842c09ad5dbf2ac52518182a
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/54/354754/1

diff --git a/lib/ve b/lib/ve
index ee59e9d..2a8f71d 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit ee59e9d337c2fcf040e5975476ec3b93725004f8
+Subproject commit 2a8f71d02667a0ef5353b0d748fd6f3fbeb9977b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fd0b4c90cc9f29f842c09ad5dbf2ac52518182a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ce.ContentBranchNode#destroy: Also call parent

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354753 )

Change subject: ce.ContentBranchNode#destroy: Also call parent
..


ce.ContentBranchNode#destroy: Also call parent

Change-Id: I975ada921cf7a3d8ce327608362f48e7b6124a57
---
M src/ce/ve.ce.ContentBranchNode.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index ba39b84..6e73bf5 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -476,4 +476,7 @@
  */
 ve.ce.ContentBranchNode.prototype.destroy = function () {
this.$element.off( 'click', this.onClickHandler );
+
+   // Parent method
+   ve.ce.ContentBranchNode.super.prototype.destroy.call( this );
 };

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ce.ContentBranchNode#destroy: Also call parent

2017-05-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354753 )

Change subject: ce.ContentBranchNode#destroy: Also call parent
..

ce.ContentBranchNode#destroy: Also call parent

Change-Id: I975ada921cf7a3d8ce327608362f48e7b6124a57
---
M src/ce/ve.ce.ContentBranchNode.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/53/354753/1

diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index ba39b84..6e73bf5 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -476,4 +476,7 @@
  */
 ve.ce.ContentBranchNode.prototype.destroy = function () {
this.$element.off( 'click', this.onClickHandler );
+
+   // Parent method
+   ve.ce.ContentBranchNode.super.prototype.destroy.call( this );
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I975ada921cf7a3d8ce327608362f48e7b6124a57
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Remove detailHTML / parameters from user script

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354496 )

Change subject: Remove detailHTML / parameters from user script
..


Remove detailHTML / parameters from user script

Since all messages for constraints with parameters now include all the
information necessary to understand them (including the parameters), the
parameters (detailHTML in the API response) are no longer necessary as a
separate part of the report.

Bug: T164354
Change-Id: Ib3e0bce50e76b75dcb7b5bfa25a93817a37f0eb4
---
M docs/user.js
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/docs/user.js b/docs/user.js
index 08a65e3..8d96b8c 100644
--- a/docs/user.js
+++ b/docs/user.js
@@ -47,11 +47,6 @@
$( '' ).html( result[ 'message-html' 
] )
);
}
-   if ( result.constraint.detailHTML ) {
-   $report.append( $( '' ).append(
-   $( '' ).html( 
result.constraint.detailHTML )
-   ) );
-   }
 
return new OO.ui.PanelLayout( {
expanded: false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3e0bce50e76b75dcb7b5bfa25a93817a37f0eb4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
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] oojs/ui[master]: demos: Show code that can be used to create the widget

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/353960 )

Change subject: demos: Show code that can be used to create the widget
..


demos: Show code that can be used to create the widget

Bug: T165457
Co-Authored-By: Bartosz Dziewoński 
Change-Id: Ib3f59a68eecc42ca90ce5fa58884d81238685b26
---
M Gruntfile.js
M demos/demo.js
M demos/index.html
M demos/pages/widgets.js
M demos/styles/demo.css
M package.json
M src/Element.js
7 files changed, 143 insertions(+), 5 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 9f3bbac..ac995a3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -302,7 +302,7 @@
},
demos: {
// Make sure you update this if dependencies 
are added
-   src: 
'{node_modules/{jquery,oojs}/dist/**/*,composer.json,dist/**/*,php/**/*}',
+   src: 
'{node_modules/{jquery,oojs}/dist/**/*,composer.json,dist/**/*,php/**/*,node_modules/prismjs/**/*}',
dest: 'demos/',
expand: true
},
diff --git a/demos/demo.js b/demos/demo.js
index 2deae12..24d1377 100644
--- a/demos/demo.js
+++ b/demos/demo.js
@@ -1,4 +1,5 @@
 /* eslint-disable no-console */
+/* globals Prism */
 /**
  * @class
  * @extends {OO.ui.Element}
@@ -436,8 +437,8 @@
  * @param {string} widget Variable name for layout's field widget
  * @return {jQuery} Console interface element
  */
-Demo.prototype.buildConsole = function ( item, layout, widget ) {
-   var $toggle, $log, $label, $input, $submit, $console, $form,
+Demo.prototype.buildConsole = function ( item, layout, widget, showLayoutCode 
) {
+   var $toggle, $log, $label, $input, $submit, $console, $form, $pre, 
$code,
console = window.console;
 
function exec( str ) {
@@ -499,10 +500,106 @@
$log.prop( 'scrollTop', $log.prop( 'scrollHeight' ) );
}
 
+   function getCode( item ) {
+   var config, isDemoWidget, constructorName, defaultConfig, url, 
params, out,
+   replaceKeyword = 'replace-',
+   replaceLater = [];
+
+   // If no item was passed we shouldn't show a code block
+   if ( item === undefined ) {
+   return false;
+   }
+
+   isDemoWidget = item.constructor.name.indexOf( 'Demo' ) === 0;
+   config = item.initialConfig;
+   constructorName = ( isDemoWidget ? 'Demo.' : 'OO.ui.' ) + 
item.constructor.name.slice( 4 );
+
+   // Prevent the default config from being part of the code
+   if ( item instanceof OO.ui.ActionFieldLayout ) {
+   defaultConfig = ( new item.constructor( new 
OO.ui.TextInputWidget(), new OO.ui.ButtonWidget() ) ).initialConfig;
+   } else if ( item instanceof OO.ui.FieldLayout ) {
+   defaultConfig = ( new item.constructor( new 
OO.ui.ButtonWidget() ) ).initialConfig;
+   } else {
+   defaultConfig = ( new item.constructor() 
).initialConfig;
+   }
+   Object.keys( defaultConfig ).forEach( function ( key ) {
+   if ( config[ key ] === defaultConfig[ key ] ) {
+   delete config[ key ];
+   } else if (
+   typeof config[ key ] === 'object' && typeof 
defaultConfig[ key ] === 'object' &&
+   OO.compare( config[ key ], defaultConfig[ key ] 
)
+   ) {
+   delete config[ key ];
+   }
+   } );
+
+   config = JSON.stringify( config, function ( k, v ) {
+   if ( v instanceof OO.ui.Element || v instanceof 
OO.ui.HtmlSnippet || v instanceof jQuery || v instanceof Function ) {
+   replaceLater.push( v );
+   return replaceKeyword + ( replaceLater.length - 
1 ).toString();
+   }
+   return v;
+   }, '\t' );
+
+   // We replace later, because running getCode in place will 
treat the new code
+   // as a string and won't do proper indentation either
+   replaceLater.forEach( function ( obj, i ) {
+   config = config.replace(
+   // Match any number of spaces (for indentation) 
followed by our placeholder
+   new RegExp( '([ ]+)"' + replaceKeyword + i + 
'"' ),
+   function ( all, 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use PageImage const for property and inject into PageImagesD...

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354688 )

Change subject: Use PageImage const for property and inject into 
PageImagesDataUpdater
..


Use PageImage const for property and inject into PageImagesDataUpdater

Change-Id: If0d750bcc09fec26d4cc01aec6c1ba938e29b6b5
---
M repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
M repo/includes/ParserOutput/PageImagesDataUpdater.php
M repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
3 files changed, 17 insertions(+), 9 deletions(-)

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



diff --git a/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php 
b/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
index a0cf2a1..b3c42de 100644
--- a/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
@@ -4,6 +4,7 @@
 
 use GeoData\GeoData;
 use Language;
+use PageImages;
 use Serializers\Serializer;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\DataModel\Services\Entity\PropertyDataTypeMatcher;
@@ -187,8 +188,11 @@
new ImageLinksDataUpdater( $propertyDataTypeMatcher )
);
 
-   if ( !empty( $this->preferredPageImagesProperties ) ) {
-   $updaters[] = new PageImagesDataUpdater( 
$this->preferredPageImagesProperties );
+   if ( !empty( $this->preferredPageImagesProperties ) && 
class_exists( PageImages::class ) ) {
+   $updaters[] = new PageImagesDataUpdater(
+   $this->preferredPageImagesProperties,
+   PageImages::PROP_NAME
+   );
}
 
if ( class_exists( GeoData::class ) ) {
diff --git a/repo/includes/ParserOutput/PageImagesDataUpdater.php 
b/repo/includes/ParserOutput/PageImagesDataUpdater.php
index 21ec39e..8248a3b 100644
--- a/repo/includes/ParserOutput/PageImagesDataUpdater.php
+++ b/repo/includes/ParserOutput/PageImagesDataUpdater.php
@@ -27,6 +27,11 @@
/**
 * @var string
 */
+   private $pagePropName;
+
+   /**
+* @var string
+*/
private $bestProperty;
 
/**
@@ -41,9 +46,11 @@
 
/**
 * @param string[] $imagePropertyIds List of image property id strings, 
in order of preference.
+* @param string $pagePropName PageImages page prop name
 */
-   public function __construct( array $imagePropertyIds ) {
+   public function __construct( array $imagePropertyIds, $pagePropName ) {
$this->propertyPriorities = array_flip( array_unique( 
array_values( $imagePropertyIds ) ) );
+   $this->pagePropName = $pagePropName;
}
 
/**
@@ -175,13 +182,10 @@
 * @param ParserOutput $parserOutput
 */
public function updateParserOutput( ParserOutput $parserOutput ) {
-   // This page property's name is the only "soft dependency" on 
the PageImages extension.
-   $propertyName = 'page_image';
-
if ( $this->bestFileName === null ) {
-   $parserOutput->unsetProperty( $propertyName );
+   $parserOutput->unsetProperty( $this->pagePropName );
} else {
-   $parserOutput->setProperty( $propertyName, 
$this->bestFileName );
+   $parserOutput->setProperty( $this->pagePropName, 
$this->bestFileName );
}
}
 
diff --git 
a/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php 
b/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
index c41d991..a98016c 100644
--- a/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
+++ b/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
@@ -29,7 +29,7 @@
 * @return PageImagesDataUpdater
 */
private function newInstance( array $propertyIds ) {
-   return new PageImagesDataUpdater( $propertyIds );
+   return new PageImagesDataUpdater( $propertyIds, 'page_image' );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0d750bcc09fec26d4cc01aec6c1ba938e29b6b5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
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] mediawiki...CollaborationKit[master]: Fix edit conflict handling in lists.

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354745 )

Change subject: Fix edit conflict handling in lists.
..


Fix edit conflict handling in lists.

We assume the current DOM is latest, (since the change to allow
duplicate entries), so that should be the base timestamp.

Bug: T165672
Change-Id: Ib2e083cb262cdd0a0377c139709e624a60b6d17c
---
M extension.json
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.list.edit.js
3 files changed, 28 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 005c968..db5658e 100644
--- a/extension.json
+++ b/extension.json
@@ -86,6 +86,9 @@
],
"OutputPageBodyAttributes": [
"CollaborationHubContentEditor::setCollabkitTheme"
+   ],
+   "BeforePageDisplay": [
+   "CollaborationListContent::onBeforePageDisplay"
]
},
"@fixme": "Does having ext.CollaborationKit.list.styles as a dependency 
double load from addModuleStyles?",
diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 8027394..f39a580 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -1206,6 +1206,7 @@
&& $title->userCan( 'edit', $user, 'quick' )
) {
$output->addJsConfigVars( 
'wgEnableCollaborationKitListEdit', true );
+
// FIXME: only load .list.members if the list is a 
member list
// (displaymode = members)
$output->addModules( [
@@ -1217,6 +1218,18 @@
}
 
/**
+* Hook to add timestamp for edit conflict detection
+*
+* @param OutputPage $out
+* @param Skin $skin
+*/
+   public static function onBeforePageDisplay( OutputPage $out, $skin ) {
+   // Used for edit conflict detection in lists.
+   $revTS = (int)$out->getRevisionTimestamp();
+   $out->addJsConfigVars( 'wgCollabkitLastEdit', $revTS );
+   }
+
+   /**
 * Hook to use custom edit page for lists
 *
 * @param WikiPage|Article|ImagePage|CategoryPage|Page $page
diff --git a/modules/ext.CollaborationKit.list.edit.js 
b/modules/ext.CollaborationKit.list.edit.js
index 85e8c0d..b01e31b 100644
--- a/modules/ext.CollaborationKit.list.edit.js
+++ b/modules/ext.CollaborationKit.list.edit.js
@@ -279,7 +279,9 @@
saveJson = function ( params, callback ) {
var api = new mw.Api(),
i,
-   j;
+   j,
+   lastRevTS,
+   baseTimestamp = params.timestamp;
 
// Strip out UID; we don't want to save it.
for ( i = 0; i < params.content.columns.length; i++ ) {
@@ -288,6 +290,14 @@
}
}
 
+   // Since we depend on things in the DOM, make our base timestamp
+   // for edit conflict the earlier of the last edit + 1 second and
+   // the time data was fetched.
+   lastRevTS = mw.config.get( 'wgCollabkitLastEdit' );
+   if ( lastRevTS ) {
+   lastRevTS += 1; // 1 second after last rev timestamp
+   baseTimestamp = Math.min( lastRevTS, +( 
params.timestamp.replace( /\D/g, '' ) ) );
+   }
// This will explode if we hit a captcha
api.postWithEditToken( {
action: 'edit',
@@ -298,7 +308,7 @@
summary: params.summary,
pageid: params.pageid,
text: JSON.stringify( params.content ),
-   basetimestamp: params.timestamp
+   basetimestamp: baseTimestamp
} ).done( callback ).fail( function () {
// FIXME proper error handling.
alert( mw.msg( 'collaborationkit-list-error-saving' ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2e083cb262cdd0a0377c139709e624a60b6d17c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Page might have been moved without redirect or deleted. Test...

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354719 )

Change subject: Page might have been moved without redirect or deleted. Test if 
the page actually exists.
..


Page might have been moved without redirect or deleted.
Test if the page actually exists.

Bug: T86491
Change-Id: Id5b6b0799bcac2aa69b26e9e8a7dd86e282f95c9
---
M scripts/newitem.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/scripts/newitem.py b/scripts/newitem.py
index 5ee4901..52ca0b6 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -94,6 +94,9 @@
 
 self.current_page = page
 
+if not page.exists():
+pywikibot.output('%s does not exist. Skipping.' % page)
+return
 if page.isRedirectPage():
 pywikibot.output(u'%s is a redirect page. Skipping.' % page)
 return

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5b6b0799bcac2aa69b26e9e8a7dd86e282f95c9
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Multichill 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Multichill 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: [WIP] Hygiene: fix missing @covers annotations in codebase

2017-05-20 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354752 )

Change subject: [WIP] Hygiene: fix missing @covers annotations in codebase
..

[WIP] Hygiene: fix missing @covers annotations in codebase

Changes:
 - added missing @covers annotations
 - fixed some docblock

Bug: T151340
Change-Id: Id83726d4517014e90d6274bad1cdef23b147a200
---
M tests/phpunit/MobileContextTest.php
M tests/phpunit/MobileFormatterTest.php
M tests/phpunit/MobileFrontend.hooksTest.php
M tests/phpunit/api/ApiMobileViewTest.php
M tests/phpunit/api/ApiParseExtenderTest.php
M tests/phpunit/skins/SkinMinervaTest.php
6 files changed, 106 insertions(+), 12 deletions(-)


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

diff --git a/tests/phpunit/MobileContextTest.php 
b/tests/phpunit/MobileContextTest.php
index f08da42..5a37dc6 100644
--- a/tests/phpunit/MobileContextTest.php
+++ b/tests/phpunit/MobileContextTest.php
@@ -245,6 +245,8 @@
 
/**
 * A null title shouldn't result in a fatal exception - bug T142914
+* @covers MobileContext::shouldDisplayMobileView
+* @covers MobileContext::useFormat
 */
public function testRedirectMobileEnabledPages() {
$this->setMwGlobals( [
@@ -550,6 +552,9 @@
];
}
 
+   /**
+* @codeCoverageIgnore
+*/
public function testBug71329() {
SpecialPageFactory::resetList();
RequestContext::resetMain();
diff --git a/tests/phpunit/MobileFormatterTest.php 
b/tests/phpunit/MobileFormatterTest.php
index 2de4339..dca5e8a 100644
--- a/tests/phpunit/MobileFormatterTest.php
+++ b/tests/phpunit/MobileFormatterTest.php
@@ -77,6 +77,12 @@
$this->assertEquals( str_replace( "\n", '', $expected ), 
str_replace( "\n", '', $html ) );
}
 
+   /**
+* @covers MobileFormatter::enableExpandableSections
+* @covers MobileFormatter::filterContent
+* @covers MobileFormatter::doRewriteImagesForLazyLoading
+* @covers MobileFormatter::skipLazyLoadingForSmallDimensions
+*/
public function testHtmlTransformWhenSkippingLazyLoadingSmallImages() {
$smallPic =  '';
$enableSections = function ( MobileFormatter $mf ) {
@@ -872,6 +878,12 @@
];
}
 
+   /**
+* @covers MobileFormatter::enableTOCPlaceholder
+* @covers MobileFormatter::enableExpandableSections
+* @covers MobileFormatter::filterContent
+* @covers MobileFormatter::getText
+*/
public function testInsertTOCPlaceholder() {
$input = 'Hello world.HeadingText.';
$mf = new MobileFormatter( $input, Title::newFromText( 'Mobile' 
) );
@@ -887,6 +899,7 @@
 
/**
 * @see https://phabricator.wikimedia.org/T137375
+* @covers MobileFormatter::filterContent
 */
public function testT137375() {
$input = 'Hello, world!Section heading';
diff --git a/tests/phpunit/MobileFrontend.hooksTest.php 
b/tests/phpunit/MobileFrontend.hooksTest.php
index 361164d..56cd3eb 100644
--- a/tests/phpunit/MobileFrontend.hooksTest.php
+++ b/tests/phpunit/MobileFrontend.hooksTest.php
@@ -179,6 +179,9 @@
];
}
 
+   /**
+* @codeCoverageIgnore
+*/
public function testOnTitleSquidURLs() {
$this->setMwGlobals( [
'wgMobileUrlTemplate' => '%h0.m.%h1.%h2',
diff --git a/tests/phpunit/api/ApiMobileViewTest.php 
b/tests/phpunit/api/ApiMobileViewTest.php
index 45e996f..521331a 100644
--- a/tests/phpunit/api/ApiMobileViewTest.php
+++ b/tests/phpunit/api/ApiMobileViewTest.php
@@ -75,6 +75,12 @@
  */
 class ApiMobileViewTest extends MediaWikiTestCase {
 
+   public function setUp() {
+   parent::setUp();
+
+   $this->setMwGlobals( 'wgAPIModules', [ 'mobileview' => 
'MockApiMobileView' ] );
+   }
+
/**
 * @dataProvider provideGetRequestedSectionIds
 * @covers ApiMobileView::getRequestedSectionIds
@@ -118,12 +124,6 @@
];
}
 
-   public function setUp() {
-   parent::setUp();
-
-   $this->setMwGlobals( 'wgAPIModules', [ 'mobileview' => 
'MockApiMobileView' ] );
-   }
-
private function getMobileViewApi( $input ) {
$request = new FauxRequest( $input );
$context = new RequestContext();
@@ -153,6 +153,20 @@
/**
 * @dataProvider provideView
 * @covers ApiMobileView::execute
+* @covers ApiMobileView::makeTitle
+* @covers ApiMobileView::getPageImage
+* @covers ApiMobileView::isMainPage
+* @covers ApiMobileView::stringSplitter
+* @covers ApiMobileView::prepareSection
+* @covers 

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: use UserArray::newFromNames instead of manually doing this

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354751 )

Change subject: use UserArray::newFromNames instead of manually doing this
..


use UserArray::newFromNames instead of manually doing this

Bug: T159083
Change-Id: If9ebf8862e3dc3c711494090a6f9cb420aa518f0
---
M includes/content/NewsletterContent.php
1 file changed, 1 insertion(+), 11 deletions(-)

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



diff --git a/includes/content/NewsletterContent.php 
b/includes/content/NewsletterContent.php
index 92e8573..4da1bff 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -107,17 +107,7 @@
return false;
}
 
-   /** @var User[] $publishers */
-   $publishers = [];
-
-   foreach ( $publishersList as $publisherName ) {
-   $user = User::newFromName( $publisherName );
-   if ( $user && $user->getId() ) {
-   $publishers[] = $user->getId();
-   }
-   }
-
-   return UserArray::newFromIDs( $publishers );
+   return UserArray::newFromNames( $publishersList );
}
 
public function onSuccess() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9ebf8862e3dc3c711494090a6f9cb420aa518f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: use UserArray::newFromNames instead of manually doing this

2017-05-20 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354751 )

Change subject: use UserArray::newFromNames instead of manually doing this
..

use UserArray::newFromNames instead of manually doing this

Bug: T159083
Change-Id: If9ebf8862e3dc3c711494090a6f9cb420aa518f0
---
M includes/content/NewsletterContent.php
1 file changed, 1 insertion(+), 11 deletions(-)


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

diff --git a/includes/content/NewsletterContent.php 
b/includes/content/NewsletterContent.php
index 92e8573..4da1bff 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -107,17 +107,7 @@
return false;
}
 
-   /** @var User[] $publishers */
-   $publishers = [];
-
-   foreach ( $publishersList as $publisherName ) {
-   $user = User::newFromName( $publisherName );
-   if ( $user && $user->getId() ) {
-   $publishers[] = $user->getId();
-   }
-   }
-
-   return UserArray::newFromIDs( $publishers );
+   return UserArray::newFromNames( $publishersList );
}
 
public function onSuccess() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9ebf8862e3dc3c711494090a6f9cb420aa518f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Make the tests pass again: * https://en.wikisource.org/w/ind...

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354697 )

Change subject: Make the tests pass again: * 
https://en.wikisource.org/w/index.php?type=revision=6811951=4889209 
made the number of validated pages increase * 
https://en.wikipedia.org/w/index.php?type=revision=780329438=780327410
 made the edit test 
..


Make the tests pass again:
* https://en.wikisource.org/w/index.php?type=revision=6811951=4889209
made the number of validated pages increase
* 
https://en.wikipedia.org/w/index.php?type=revision=780329438=780327410
 made the edit test fail
* wikistats is broken, just disabled the tests

Bug: T165830
Change-Id: Iee6f815f7995eb6dc60d3a91f69fc24a6f101037
---
M tests/pagegenerators_tests.py
M tests/wikistats_tests.py
2 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index b24180d..6eaca83 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -238,7 +238,7 @@
 site = self.site
 gen = pagegenerators.PagesFromTitlesGenerator(self.titles, site)
 gen = pagegenerators.CategoryFilterPageGenerator(gen, 
self.catfilter_list, site)
-self.assertEqual(len(tuple(gen)), 9)
+self.assertEqual(len(tuple(gen)), 10)
 
 
 class TestQualityFilterPageGenerator(TestCase):
@@ -314,12 +314,12 @@
 gen, last_edit_end=two_days_ago)
 self.assertEqual(len(list(gen)), 0)
 
-gen = PagesFromTitlesGenerator(['Template:Sidebox'], self.site)
+gen = PagesFromTitlesGenerator(['Template:Side box'], self.site)
 gen = pagegenerators.EdittimeFilterPageGenerator(
 gen, last_edit_end=nine_days_ago)
 self.assertEqual(len(list(gen)), 1)
 
-gen = PagesFromTitlesGenerator(['Template:Sidebox'], self.site)
+gen = PagesFromTitlesGenerator(['Template:Side box'], self.site)
 gen = pagegenerators.EdittimeFilterPageGenerator(
 gen, last_edit_start=nine_days_ago)
 self.assertEqual(len(list(gen)), 0)
diff --git a/tests/wikistats_tests.py b/tests/wikistats_tests.py
index f866eaf..c373ae3 100644
--- a/tests/wikistats_tests.py
+++ b/tests/wikistats_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Test cases for the WikiStats dataset."""
 #
-# (C) Pywikibot team, 2014-2016
+# (C) Pywikibot team, 2014-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -15,6 +15,8 @@
 from tests.aspects import unittest, TestCase
 
 
+@unittest.skip('Wikistats at https://wikistats.wmflabs.org/ '
+   'appears to be broken. See T165830.')
 class WikiStatsTestCase(TestCase):
 
 """Test WikiStats dump."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee6f815f7995eb6dc60d3a91f69fc24a6f101037
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Multichill 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Reduce the database query load by caching all newsletters lo...

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354749 )

Change subject: Reduce the database query load by caching all newsletters 
locally
..


Reduce the database query load by caching all newsletters locally

Bug: T159083
Change-Id: I69c969b7963b3d1edc40dbb056c5658fff9f4f6d
---
M includes/specials/pagers/NewsletterTablePager.php
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/pagers/NewsletterTablePager.php 
b/includes/specials/pagers/NewsletterTablePager.php
index 44b8299..7623d1d 100644
--- a/includes/specials/pagers/NewsletterTablePager.php
+++ b/includes/specials/pagers/NewsletterTablePager.php
@@ -22,6 +22,8 @@
 
protected $mode;
 
+   private $newslettersArray;
+
public function __construct( IContextSource $context = null, Database 
$readDb = null ) {
if ( $readDb !== null ) {
$this->mDb = $readDb;
@@ -103,6 +105,13 @@
}
}
 
+   public function preprocessResults( $result ) {
+   foreach ( $result as $res ) {
+   $this->newslettersArray[$res->nl_id] = 
Newsletter::newFromID( (int)$res->nl_id );
+   }
+   parent::preprocessResults( $result );
+   }
+
public function getQueryInfo() {
$userId = $this->getUser()->getId();
$tblSubscriptions = $this->mDb->tableName( 'nl_subscriptions' );
@@ -152,7 +161,7 @@
 
$linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
$id = $this->mCurrentRow->nl_id;
-   $newsletter = Newsletter::newFromID( (int)$id );
+   $newsletter = $this->newslettersArray[(int)$id];
switch ( $field ) {
case 'nl_name':
$title = Title::makeTitleSafe( NS_NEWSLETTER, 
$newsletter->getName() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69c969b7963b3d1edc40dbb056c5658fff9f4f6d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Added MediaWiki flavour.

2017-05-20 Thread Nark0 (Code Review)
Nark0 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354750 )

Change subject: Added MediaWiki flavour.
..

Added MediaWiki flavour.

Since, we are not using any suffix here, we had to modify the appId
function in build.gradle in order to avoid a conflict with the
provider authority.

Modified some drawables and strings to use the MediaWiki ones. This
is still work in progress for other subtask.

Bug: T165783
Change-Id: Ie1df1f17668a40ad1c1101fce9f21beae213575c
---
M app/build.gradle
M app/src/main/res/values/strings.xml
A app/src/mediawiki/res/drawable-hdpi/w_nav_mark.png
A app/src/mediawiki/res/drawable-xhdpi/w_nav_mark.png
A app/src/mediawiki/res/drawable-xxhdpi/w_nav_mark.png
A app/src/mediawiki/res/drawable-xxxhdpi/w_nav_mark.png
A app/src/mediawiki/res/drawable/wp_wordmark.png
A app/src/mediawiki/res/layout/activity_about.xml
A app/src/mediawiki/res/mipmap-hdpi/launcher.png
A app/src/mediawiki/res/mipmap-mdpi/launcher.png
A app/src/mediawiki/res/mipmap-xhdpi/launcher.png
A app/src/mediawiki/res/mipmap-xxhdpi/launcher.png
A app/src/mediawiki/res/mipmap-xxxhdpi/launcher.png
A app/src/mediawiki/res/values/strings.xml
A app/src/mediawiki/res/values/strings_no_translate.xml
15 files changed, 214 insertions(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index fbf1f65..88b1504 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -132,6 +132,12 @@
 manifestPlaceholders = 
[customChannel:getProperty('customChannel').toString()]
 signingConfig signingConfigs.prod
 }
+mediawiki {
+applicationId 'org.mediawiki'
+versionName computeVersionName('mediawiki')
+signingConfig signingConfigs.prod
+testInstrumentationRunner 'org.wikipedia.test.AndroidTestRunner'
+}
 }
 
 packagingOptions {
@@ -269,6 +275,6 @@
 
 private String appId(ProductFlavor flavor) {
 String suffix = flavor.applicationIdSuffix
-String id = android.defaultConfig.applicationId + (suffix ? ".$suffix" : 
'')
+String id = flavor.applicationId + (suffix ? ".$suffix" : '')
 return id
 }
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index 7af728d..b618ffe 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -3,6 +3,7 @@
 Wikipedia
 Wikipedia 
Beta
 Wikipedia 
Alpha
+MediaWiki
 
 Wikimedia
 
diff --git a/app/src/mediawiki/res/drawable-hdpi/w_nav_mark.png 
b/app/src/mediawiki/res/drawable-hdpi/w_nav_mark.png
new file mode 100644
index 000..283a8f8
--- /dev/null
+++ b/app/src/mediawiki/res/drawable-hdpi/w_nav_mark.png
Binary files differ
diff --git a/app/src/mediawiki/res/drawable-xhdpi/w_nav_mark.png 
b/app/src/mediawiki/res/drawable-xhdpi/w_nav_mark.png
new file mode 100644
index 000..af89eb0
--- /dev/null
+++ b/app/src/mediawiki/res/drawable-xhdpi/w_nav_mark.png
Binary files differ
diff --git a/app/src/mediawiki/res/drawable-xxhdpi/w_nav_mark.png 
b/app/src/mediawiki/res/drawable-xxhdpi/w_nav_mark.png
new file mode 100644
index 000..2119207
--- /dev/null
+++ b/app/src/mediawiki/res/drawable-xxhdpi/w_nav_mark.png
Binary files differ
diff --git a/app/src/mediawiki/res/drawable-xxxhdpi/w_nav_mark.png 
b/app/src/mediawiki/res/drawable-xxxhdpi/w_nav_mark.png
new file mode 100644
index 000..e7088c5
--- /dev/null
+++ b/app/src/mediawiki/res/drawable-xxxhdpi/w_nav_mark.png
Binary files differ
diff --git a/app/src/mediawiki/res/drawable/wp_wordmark.png 
b/app/src/mediawiki/res/drawable/wp_wordmark.png
new file mode 100644
index 000..713a7f5
--- /dev/null
+++ b/app/src/mediawiki/res/drawable/wp_wordmark.png
Binary files differ
diff --git a/app/src/mediawiki/res/layout/activity_about.xml 
b/app/src/mediawiki/res/layout/activity_about.xml
new file mode 100644
index 000..d9a9637
--- /dev/null
+++ b/app/src/mediawiki/res/layout/activity_about.xml
@@ -0,0 +1,173 @@
+
+
+http://schemas.android.com/apk/res/android;
+xmlns:app="http://schemas.android.com/apk/res-auto;
+xmlns:tools="http://schemas.android.com/tools;
+android:id="@+id/about_scrollview"
+android:layout_width="match_parent"
+android:layout_height="match_parent"
+android:background="?attr/window_background_color"
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/mediawiki/res/mipmap-hdpi/launcher.png 
b/app/src/mediawiki/res/mipmap-hdpi/launcher.png
new file mode 100755
index 000..b5e2bf0
--- /dev/null
+++ b/app/src/mediawiki/res/mipmap-hdpi/launcher.png
Binary files differ
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Improve DB query on Special:Newsletters

2017-05-20 Thread Brian Wolff (Code Review)
Brian Wolff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354636 )

Change subject: Improve DB query on Special:Newsletters
..


Improve DB query on Special:Newsletters

Bug: T159083
Change-Id: I626a945c6af7a066c622019b679a6e6491391f54
---
M includes/specials/pagers/NewsletterTablePager.php
A sql/nl_newsletter-add-nl-active_name.sql
A sql/nl_newsletter-drop-nl-active.sql
M tests/specials/SpecialNewslettersTest.php
4 files changed, 96 insertions(+), 21 deletions(-)

Approvals:
  Brian Wolff: Looks good to me, but someone else must approve
  01tonythomas: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/pagers/NewsletterTablePager.php 
b/includes/specials/pagers/NewsletterTablePager.php
index 70b9d11..44b8299 100644
--- a/includes/specials/pagers/NewsletterTablePager.php
+++ b/includes/specials/pagers/NewsletterTablePager.php
@@ -20,6 +20,8 @@
 */
private $option;
 
+   protected $mode;
+
public function __construct( IContextSource $context = null, Database 
$readDb = null ) {
if ( $readDb !== null ) {
$this->mDb = $readDb;
@@ -44,35 +46,102 @@
return $this->fieldNames;
}
 
-   public function getQueryInfo() {
-   // TODO we could probably just retrieve all subscribers IDs as 
a string here.
+   private function getSubscribedQuery( $offset, $limit, $descending ) {
+   // XXX Hacky
+   $oldIndex = $this->mIndexField;
+   $this->mIndexField = 'nl_name';
+   $this->mode = 'subscribed';
+   list( $tables, $fields, $conds, $fname, $options, $join_conds ) 
=
+   $this->buildQueryInfo( $offset, $limit, $descending );
+   $subscribedPart = $this->mDb->selectSQLText(
+   $tables, $fields, $conds, $fname, $options, $join_conds
+   );
+   $this->mIndexField = $oldIndex;
+   return $subscribedPart;
+   }
 
+   private function getUnsubscribedQuery( $offset, $limit, $descending ) {
+   // XXX Hacky
+   $oldIndex = $this->mIndexField;
+   $this->mIndexField = 'nl_name';
+   $this->mode = 'unsubscribed';
+   list( $tables, $fields, $conds, $fname, $options, $join_conds ) 
=
+   $this->buildQueryInfo( $offset, $limit, $descending );
+   $unsubscribedPart = $this->mDb->selectSQLText(
+   $tables, $fields, $conds, $fname, $options, $join_conds
+   );
+   $this->mIndexField = $oldIndex;
+   return $unsubscribedPart;
+   }
+
+   public function reallyDoQuery( $offset, $limit, $descending ) {
+   $realOffset = substr( $offset, 1 );
+   if ( $this->option === 'subscribed' ) {
+   return $this->mDb->query(
+   $this->getSubscribedQuery(
+   $realOffset, $limit, $descending
+   ),
+   __METHOD__
+   );
+   } elseif ( $this->option == 'all' && substr( $offset, 0, 1 ) 
!== 'U' ) {
+   $subscribedPart = $this->getSubscribedQuery( 
$realOffset, $limit, $descending );
+   $unsubscribedPart = $this->getUnsubscribedQuery( '', 
$limit, $descending );
+   $combinedResult = $this->mDb->unionQueries(
+   [ $subscribedPart, $unsubscribedPart ],
+   true
+   );
+   $combinedResult .= " ORDER BY nls_subscriber_id DESC 
LIMIT " . (int)
+   $limit . ";";
+   return $this->mDb->query( $combinedResult, __METHOD__ );
+   } else {
+   // unsubscribed, or we are out of subscribed results.
+   return $this->mDb->query(
+   $this->getUnsubscribedQuery(
+   $realOffset, $limit, $descending
+   ), __METHOD__
+   );
+   }
+   }
+
+   public function getQueryInfo() {
$userId = $this->getUser()->getId();
$tblSubscriptions = $this->mDb->tableName( 'nl_subscriptions' );
 
$info = [
-   'tables' => [ 'nl_newsletters' ],
+   'tables' => [ 'nl_newsletters', 'nl_subscriptions' ],
'fields' => [
'nl_name',
'nl_desc',
'nl_id',
'subscribers' => "( SELECT COUNT(*) FROM 
$tblSubscriptions WHERE nls_newsletter_id 

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Reduce the database query load by caching all newsletters lo...

2017-05-20 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354749 )

Change subject: Reduce the database query load by caching all newsletters 
locally
..

Reduce the database query load by caching all newsletters locally

Bug: T159083
Change-Id: I69c969b7963b3d1edc40dbb056c5658fff9f4f6d
---
M includes/specials/pagers/NewsletterTablePager.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/49/354749/1

diff --git a/includes/specials/pagers/NewsletterTablePager.php 
b/includes/specials/pagers/NewsletterTablePager.php
index 70b9d11..f7b22bb 100644
--- a/includes/specials/pagers/NewsletterTablePager.php
+++ b/includes/specials/pagers/NewsletterTablePager.php
@@ -20,6 +20,8 @@
 */
private $option;
 
+   private $newslettersArray;
+
public function __construct( IContextSource $context = null, Database 
$readDb = null ) {
if ( $readDb !== null ) {
$this->mDb = $readDb;
@@ -42,6 +44,13 @@
}
 
return $this->fieldNames;
+   }
+
+   public function preprocessResults( $result ) {
+   foreach ( $result as $res ) {
+   $this->newslettersArray[$res->nl_id] = 
Newsletter::newFromID( (int)$res->nl_id );
+   }
+   parent::preprocessResults( $result ); // TODO: Change the 
autogenerated stub
}
 
public function getQueryInfo() {
@@ -83,7 +92,7 @@
 
$linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
$id = $this->mCurrentRow->nl_id;
-   $newsletter = Newsletter::newFromID( (int)$id );
+   $newsletter = $this->newslettersArray[(int)$id];
switch ( $field ) {
case 'nl_name':
$title = Title::makeTitleSafe( NS_NEWSLETTER, 
$newsletter->getName() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69c969b7963b3d1edc40dbb056c5658fff9f4f6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.ime from upstream

2017-05-20 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354748 )

Change subject: Update jquery.ime from upstream
..

Update jquery.ime from upstream

Change-Id: I39f2b75710896802a68a64a5d292bc0d2fdd8a4c
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/48/354748/1

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index b431fa7..2817cef 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1,4 +1,4 @@
-/*! jquery.ime - v0.1.0+20170509
+/*! jquery.ime - v0.1.0+20170520
 * https://github.com/wikimedia/jquery.ime
 * Copyright (c) 2017 Santhosh Thottingal; Licensed GPL, MIT */
 ( function ( $ ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39f2b75710896802a68a64a5d292bc0d2fdd8a4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nemo bis <federicol...@tiscali.it>

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jequery.uls for new languages added and other changes

2017-05-20 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354747 )

Change subject: Update jequery.uls for new languages added and other changes
..

Update jequery.uls for new languages added and other changes

Bug: T165883
Change-Id: Iad97ad909ef2057a992cc23cddc27601fa38d4d3
---
M lib/jquery.uls/i18n/af.json
M lib/jquery.uls/i18n/yi.json
M lib/jquery.uls/src/jquery.uls.data.js
3 files changed, 5 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/47/354747/1

diff --git a/lib/jquery.uls/i18n/af.json b/lib/jquery.uls/i18n/af.json
index a70d072..72aa4a7 100644
--- a/lib/jquery.uls/i18n/af.json
+++ b/lib/jquery.uls/i18n/af.json
@@ -3,7 +3,8 @@
"authors": [
"Naudefj",
"Amire80",
-   "Puvircho"
+   "Puvircho",
+   "Fwolff"
]
},
"uls-region-WW": "Wêreldwyd",
@@ -18,6 +19,6 @@
"uls-no-results-found": "Geen resultate gevind nie",
"uls-common-languages": "Taalvoorstelle",
"uls-no-results-suggestion-title": "U mag geïnteresseerd wees in:",
-   "uls-search-help": "U kan soek volgens taalnaam, skripnaam, ISO-kode 
van die taal of u kan per streek deurblaai.",
+   "uls-search-help": "U kan soek volgens taalnaam, skrifnaam, ISO-kode 
van die taal of u kan per streek deurblaai.",
"uls-search-placeholder": "Soek na ’n taal"
 }
diff --git a/lib/jquery.uls/i18n/yi.json b/lib/jquery.uls/i18n/yi.json
index 73502ea..bf5c52c 100644
--- a/lib/jquery.uls/i18n/yi.json
+++ b/lib/jquery.uls/i18n/yi.json
@@ -16,6 +16,6 @@
"uls-no-results-found": "קיין רעזולטאטן נישט געטראפֿן.",
"uls-common-languages": "פֿארגעשלאַָגענע שפראַכן",
"uls-no-results-suggestion-title": "עס וועט אייך אפשר אינטרעסירן:",
-   "uls-search-help": "איר קענט זוכן לויט שפראך־נאמען, סקריפט־נאמען, שפראך 
ISO־קאד אדער קענט איר בלעטערן לויט ראיאן.",
+   "uls-search-help": "איר קענט זוכן לויט שפראך־נאמען, שריפֿט־נאמען, שפראך 
ISO־קאד אדער קענט איר בלעטערן לויט ראיאן.",
"uls-search-placeholder": "זוכן א שפראך"
 }
diff --git a/lib/jquery.uls/src/jquery.uls.data.js 
b/lib/jquery.uls/src/jquery.uls.data.js
index 833d274..a96dd48 100644
--- a/lib/jquery.uls/src/jquery.uls.data.js
+++ b/lib/jquery.uls/src/jquery.uls.data.js
@@ -3,5 +3,5 @@
'use strict';
$.uls = $.uls || {};
//noinspection JSHint
-   $.uls.data = {"languages":{"aa":["Latn",["AF"],"Qafár 
af"],"ab":["Cyrl",["EU"],"Аҧсшәа"],"abs":["Latn",["AS"],"Bahasa 
Ambon"],"ace":["Latn",["AS","PA"],"Acèh"],"acf":["Latn",["AM"],"kwéyòl"],"ady":["Cyrl",["EU","ME"],"Адыгабзэ"],"ady-cyrl":["ady"],"ady-latn":["Latn",["EU","ME"],"Adygabze"],"aeb":["aeb-arab"],"aeb-arab":["Arab",["AF"],"تونسي"],"aeb-latn":["Latn",["AF"],"Tûnsî"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"अहिराणी"],"ais":["Latn",["AS"],"Sakizaya"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo
 
innaaɬiilka"],"aln":["Latn",["EU"],"Gegë"],"am":["Ethi",["AF"],"አማርኛ"],"ami":["Latn",["AS"],"Pangcah"],"an":["Latn",["EU"],"aragonés"],"ang":["Latn",["EU"],"Ænglisc"],"anp":["Deva",["AS"],"अङ्गिका"],"ar":["Arab",["ME"],"العربية"],"arc":["Syrc",["ME"],"ܐܪܡܝܐ"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Arab",["AF"],"جازايرية"],"ary":["Latn",["ME"],"Maġribi"],"arz":["Arab",["ME"],"مصرى"],"as":["Beng",["AS"],"অসমীয়া"],"ase":["Sgnw",["AM"],"American
 sign 
language"],"ast":["Latn",["EU"],"asturianu"],"atj":["Latn",["AM"],"atikamekw"],"av":["Cyrl",["EU"],"авар"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar
 
aru"],"az":["az-latn"],"az-arab":["Arab",["AS","ME"],"تۆرکجه"],"az-latn":["Latn",["EU","ME"],"azərbaycanca"],"az-cyrl":["Cyrl",["EU","ME"],"азәрбајҹанҹа"],"azb":["az-arab"],"azj":["az-latn"],"ba":["Cyrl",["EU"],"башҡортса"],"ban":["Bali",["AS"],"ᬩᬲᬩᬮᬶ"],"bar":["Latn",["EU"],"Boarisch"],"bat-smg":["sgs"],"bbc-latn":["Latn",["AS"],"Batak
 Toba"],"bbc-batk":["Batk",["AS"],"Batak Toba"],"bbc":["Latn",["AS"],"Batak 
Toba"],"bcc":["Arab",["AS","ME"],"جهلسری بلوچی"],"bcl":["Latn",["AS"],"Bikol 
Central"],"be-tarask":["Cyrl",["EU"],"беларуская 
(тарашкевіца)"],"be-x-old":["be-tarask"],"be":["Cyrl",["EU"],"беларуская"],"bew":["Latn",["AS"],"Bahasa
 
Betawi"],"bfa":["Latn",["AF"],"Bari"],"bft":["Arab",["AS"],"بلتی"],"bfq":["Taml",["AS"],"படகா"],"bg":["Cyrl",["EU"],"български"],"bgn":["Arab",["AS","ME"],"روچ
 کپتین 
بلوچی"],"bh":["bho"],"bho":["Deva",["AS"],"भोजपुरी"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa
 
Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"বাংলা"],"bo":["Tibt",["AS"],"བོད་ཡིག"],"bpy":["Beng",["AS"],"বিষ্ণুপ্রিয়া
 

[MediaWiki-commits] [Gerrit] operations...pybal[master]: Move IP classes to pybal.ip

2017-05-20 Thread Ema (Code Review)
Ema has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354746 )

Change subject: Move IP classes to pybal.ip
..

Move IP classes to pybal.ip

Move IPv4IP and IPv6IP to pybal.ip. Add unit tests for pybal.ip and
(very basic!) tests for the Origin and BaseASPath BGP attributes.

Change-Id: I4e474adb9177fc934977339266eb7c3b145dae08
---
M pybal/bgp.py
A pybal/ip.py
A pybal/test/test_bgp.py
A pybal/test/test_ip.py
4 files changed, 225 insertions(+), 140 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/pybal 
refs/changes/46/354746/1

diff --git a/pybal/bgp.py b/pybal/bgp.py
index cc44fb5..a9aa7e9 100644
--- a/pybal/bgp.py
+++ b/pybal/bgp.py
@@ -20,6 +20,9 @@
 from twisted import copyright
 from twisted.internet import reactor, protocol, base, interfaces, error, defer
 
+# pybal imports
+from .ip import IPPrefix, IPv4IP, IPv6IP
+
 # Constants
 VERSION = 4
 PORT = 179
@@ -174,146 +177,6 @@
 be initiated.
 """
 
-# TODO: Replace by some better third party classes or rewrite
-class IPPrefix(object):
-"""Class that represents an IP prefix"""
-
-def __init__(self, ipprefix, addressfamily=None):
-self.prefix = None # packed ip string
-
-if isinstance(ipprefix, IPPrefix):
-self.prefix, self.prefixlen, self.addressfamily = ipprefix.prefix, 
ipprefix.prefixlen, ipprefix.addressfamily
-elif type(ipprefix) is tuple:
-# address family must be specified
-if not addressfamily:
-raise ValueError()
-
-self.addressfamily = addressfamily
-
-prefix, self.prefixlen = ipprefix
-if type(prefix) is str:
-# tuple (ipstr, prefixlen)
-self.prefix = prefix
-elif type(prefix) is int:
-if self.addressfamily == AFI_INET:
-# tuple (ipint, prefixlen)
-self.prefix = struct.pack('!I', prefix)
-else:
-raise ValueError()
-else:
-# Assume prefix is a sequence of octets
-self.prefix = b"".join(map(chr, prefix))
-elif type(ipprefix) is str:
-# textual form
-prefix, prefixlen = ipprefix.split('/')
-self.addressfamily = addressfamily or (':' in prefix and AFI_INET6 
or AFI_INET)
-
-if self.addressfamily == AFI_INET:
-self.prefix = b"".join([chr(int(o)) for o in 
prefix.split('.')])
-elif self.addressfamily == AFI_INET6:
-self.prefix = bytearray()
-hexlist = prefix.split(":")
-if len(hexlist) > 8:
-raise ValueError()
-
-for hexstr in hexlist:
-if hexstr is not "":
-self.prefix += struct.pack('!H', int(hexstr, 16))
-else:
-zeroCount = 8 - len(hexlist) + 1
-self.prefix += struct.pack('!%dH' % zeroCount, *((0,) 
* zeroCount))
-self.prefix = bytes(self.prefix)
-
-self.prefixlen = int(prefixlen)
-else:
-raise ValueError()
-
-def __repr__(self):
-return repr(str(self))
-
-def __str__(self):
-if self.addressfamily == AFI_INET:
-return '.'.join([str(ord(o)) for o in self.packed(pad=True)]) + 
'/%d' % self.prefixlen
-elif self.addressfamily == AFI_INET6:
-return ':'.join([hex(o)[2:] for o in struct.unpack('!8H', 
self.packed(pad=True))]) + '/%d' % self.prefixlen
-
-def __eq__(self, other):
-# FIXME: masked ips
-return isinstance(other, IPPrefix) and self.prefixlen == 
other.prefixlen and self.prefix == other.prefix
-
-def __ne__(self, other):
-return not self.__eq__(other)
-
-def __lt__(self, other):
-return self.prefix < other.prefix or \
-(self.prefix == other.prefix and self.prefixlen < other.prefixlen)
-
-def __le__(self, other):
-return self.__lt__(other) or self.__eq__(other)
-
-def __gt__(self, other):
-return self.prefix > other.prefix or \
-(self.prefix == other.prefix and self.prefixlen > other.prefixlen)
-
-def __ge__(self, other):
-return self.__gt__(other) or self.__eq__(other)
-
-def __hash__(self):
-return hash(self.prefix) ^ hash(self.prefixlen)
-
-def __len__(self):
-return self.prefixlen
-
-def _packedMaxLen(self):
-return (self.addressfamily == AFI_INET6 and 16 or 4)
-
-def ipToInt(self):
-return reduce(lambda x, y: x * 256 + y, map(ord, self.prefix))
-
-def netmask(self):
-return ~( (1 << (len(self.prefix)*8 - self.prefixlen)) - 1)
-
-def mask(self, prefixlen, shorten=False):
-# DEBUG
-assert len(self.prefix) == self._packedMaxLen()
-
-masklen = 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Config2: limit the number of retries to 15

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354714 )

Change subject: Config2: limit the number of retries to 15
..


Config2: limit the number of retries to 15

This limits the waiting time until timeout from 43 min to 23.

Bug: T165898
Change-Id: Icb13572c91c2eb5ab1e8844ab4073205fe1f29f3
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 9f732f2..78898cc 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -649,7 +649,7 @@
 step = -1
 
 # Maximum number of times to retry an API request before quitting.
-max_retries = 25
+max_retries = 15
 # Minimum time to wait before resubmitting a failed API request.
 retry_wait = 5
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb13572c91c2eb5ab1e8844ab4073205fe1f29f3
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Strainu 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Strainu 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix edit conflict handling in lists.

2017-05-20 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354745 )

Change subject: Fix edit conflict handling in lists.
..

Fix edit conflict handling in lists.

We assume the current DOM is latest, (since the change to allow
duplicate entries), so that should be the base timestamp.

Bug: T165672
Change-Id: Ib2e083cb262cdd0a0377c139709e624a60b6d17c
---
M extension.json
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.list.edit.js
3 files changed, 28 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index 005c968..db5658e 100644
--- a/extension.json
+++ b/extension.json
@@ -86,6 +86,9 @@
],
"OutputPageBodyAttributes": [
"CollaborationHubContentEditor::setCollabkitTheme"
+   ],
+   "BeforePageDisplay": [
+   "CollaborationListContent::onBeforePageDisplay"
]
},
"@fixme": "Does having ext.CollaborationKit.list.styles as a dependency 
double load from addModuleStyles?",
diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 8027394..f39a580 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -1206,6 +1206,7 @@
&& $title->userCan( 'edit', $user, 'quick' )
) {
$output->addJsConfigVars( 
'wgEnableCollaborationKitListEdit', true );
+
// FIXME: only load .list.members if the list is a 
member list
// (displaymode = members)
$output->addModules( [
@@ -1217,6 +1218,18 @@
}
 
/**
+* Hook to add timestamp for edit conflict detection
+*
+* @param OutputPage $out
+* @param Skin $skin
+*/
+   public static function onBeforePageDisplay( OutputPage $out, $skin ) {
+   // Used for edit conflict detection in lists.
+   $revTS = (int)$out->getRevisionTimestamp();
+   $out->addJsConfigVars( 'wgCollabkitLastEdit', $revTS );
+   }
+
+   /**
 * Hook to use custom edit page for lists
 *
 * @param WikiPage|Article|ImagePage|CategoryPage|Page $page
diff --git a/modules/ext.CollaborationKit.list.edit.js 
b/modules/ext.CollaborationKit.list.edit.js
index 85e8c0d..a2f5cf6 100644
--- a/modules/ext.CollaborationKit.list.edit.js
+++ b/modules/ext.CollaborationKit.list.edit.js
@@ -279,7 +279,9 @@
saveJson = function ( params, callback ) {
var api = new mw.Api(),
i,
-   j;
+   j,
+   lastRevTS,
+   baseTimestamp = params.timestamp;
 
// Strip out UID; we don't want to save it.
for ( i = 0; i < params.content.columns.length; i++ ) {
@@ -288,6 +290,14 @@
}
}
 
+   // Since we depend on things in the DOM, make our base timestamp
+   // for edit conflict the earlier of the last edit + 1 second and
+   // the time data was fetched.
+   lastRevTS = mw.config.get( 'wgCollabkitLastEdit' );
+   if ( lastRevTS ) {
+   lastRevTS += 1; // 1 second after last rev timestamp
+   baseTimestamp = Math.min( lastRevTS, 
+(params.timestamp.replace( /\D/g, '' )) );
+   }
// This will explode if we hit a captcha
api.postWithEditToken( {
action: 'edit',
@@ -298,7 +308,7 @@
summary: params.summary,
pageid: params.pageid,
text: JSON.stringify( params.content ),
-   basetimestamp: params.timestamp
+   basetimestamp: baseTimestamp
} ).done( callback ).fail( function () {
// FIXME proper error handling.
alert( mw.msg( 'collaborationkit-list-error-saving' ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2e083cb262cdd0a0377c139709e624a60b6d17c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: New SSH key for me

2017-05-20 Thread Volans (Code Review)
Volans has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354743 )

Change subject: New SSH key for me
..


New SSH key for me

(I'm at the hackathon. You too? Find me to confirm)

Change-Id: Ie50bb06a2857b3896adf36d63fd11daf7eb680ce
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 84437f4..86fe0f3 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1191,8 +1191,7 @@
 gid: 500
 name: daniel
 realname: Daniel Kinzler
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EBJQAAAIEAuH1eNAxPgzMG0GoCZBtNx/eTnneQRT0Z/IZvbj0uQusaNlSG7MlFrUEI/HWCwIcWZlAdMBCvp2Ywc7+flvgH+JuBzbjvXDhhkC9o0/9wxKEwGRnP8RDnNBlaouzk/ROP4m8L2FZahAahFzoqDqYxzBl7bQ/iw+N811rAo+R0AGU=
-daniel.kinz...@wikimedia.de]
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDZiSU9lcD1L2jmvcRqyLCBmHwSyfatrIvjqvgubJygm2WNWfeIXBbl5ljdV+6gdP4dhuvNecUqet8v9+tUtZrnr2qnHTD8Uf/5jnOdf1HWmdZlbCsrAWAwJKdwCk91TStG90tgBclBqMcPG7v9QTg2T6GG6Vm4e2HkUTYz8bTbLxO21Hr0atreJUl0uDYmXPWPyJcmsMVHeCiWzdBD2eKlNDcX9Yxn2SkqIGVitNF2Bahfq4uiCj5EcdeYWFngjRupomKuydVJVgAR3y5suZk/N+xbfoIqjw0axI9VIs97jfOyfn1Vs3GMIRnOQQtFKklciEoo/S4b6fuVSBmKTtnZ
 daki@C159]
 uid: 545
 email: daniel.kinz...@wikimedia.de
   dartar:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie50bb06a2857b3896adf36d63fd11daf7eb680ce
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Daniel Kinzler 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Align inline label's position

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354738 )

Change subject: WikimediaUI theme: Align inline label's position
..


WikimediaUI theme: Align inline label's position

Bug: T165794
Change-Id: I420b5541fa765d2a881f445e813f5eb3921e3775
---
M src/themes/wikimediaui/widgets.less
1 file changed, 11 insertions(+), 7 deletions(-)

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



diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index bfe74c8..50a159c 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -1879,23 +1879,27 @@
}
}
 
+   > .oo-ui-labelElement-label {
+   color: @color-subtle;
+   margin-top: @border-width-default; // Address `border` on 
`input`
+   padding: @padding-top-default @padding-horizontal-default 
@padding-bottom-default @padding-horizontal-input-text;
+   line-height: @line-height-widget-singleline;
+   }
+
&.oo-ui-indicatorElement {
input,
textarea {
padding-right: @size-indicator + 2 * 
@padding-horizontal-input-text;
}
 
+   &.oo-ui-textInputWidget-labelPosition-after > 
.oo-ui-labelElement-label {
+   padding-right: 0;
+   }
+
.oo-ui-indicatorElement-indicator {
max-height: @size-default;
margin-right: @padding-horizontal-default;
}
-   }
-
-   > .oo-ui-labelElement-label {
-   color: @color-subtle;
-   margin-top: 1px; // Address `border` on `input`
-   padding: @padding-top-default 0 @padding-bottom-default 
@padding-horizontal-input-text;
-   line-height: @line-height-widget-singleline;
}
 
&-labelPosition-after {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I420b5541fa765d2a881f445e813f5eb3921e3775
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: 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] mediawiki...TwoColConflict[master]: Make base version selection button primary

2017-05-20 Thread WMDE-Fisch (Code Review)
WMDE-Fisch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354744 )

Change subject: Make base version selection button primary
..

Make base version selection button primary

Also deactivate edit buttons when dialog is active.

Change-Id: I603fe6903b6560108ccaff16c2e424d236f6de0b
---
M modules/ext.TwoColConflict.BaseVersionSelector.js
M modules/ext.TwoColConflict.init.js
2 files changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/44/354744/1

diff --git a/modules/ext.TwoColConflict.BaseVersionSelector.js 
b/modules/ext.TwoColConflict.BaseVersionSelector.js
index 62210c5..43a4ca5 100644
--- a/modules/ext.TwoColConflict.BaseVersionSelector.js
+++ b/modules/ext.TwoColConflict.BaseVersionSelector.js
@@ -55,7 +55,7 @@
 
submit = new OO.ui.ButtonWidget( {
label: mw.msg( 
'twoColConflict-base-selection-submit-label' ),
-   flags: [ 'progressive' ]
+   flags: [ 'primary', 'constructive' ]
} );
submit.on( 'click', function () {
self.setBaseVersion();
diff --git a/modules/ext.TwoColConflict.init.js 
b/modules/ext.TwoColConflict.init.js
index 4a0e315..0bab1cf 100644
--- a/modules/ext.TwoColConflict.init.js
+++ b/modules/ext.TwoColConflict.init.js
@@ -136,12 +136,21 @@
adjustEditorColSpacing( false );
}
 
+   function beforeBaseVersionSelection() {
+   $( '.editButtons .oo-ui-buttonElement-button' ).attr( 
'disabled', 'true' );
+   $( '.editButtons .oo-ui-buttonElement' ).removeClass( 
'oo-ui-widget-enabled' );
+   $( '.editButtons .oo-ui-buttonElement' ).addClass( 
'oo-ui-widget-disabled' );
+   }
+
function afterBaseVersionSelection() {
$( '.mw-twocolconflict-form' ).removeClass( 
'mw-twocolconflict-before-base-selection' );
// select 'hide' as the default option
$( 'input[name="mw-twocolconflict-same"]' )[ 1 ].click();
redrawPage();
autoScroll.scrollToFirstOwnOrConflict();
+   $( '.editButtons .oo-ui-buttonElement-button' ).attr( 
'disabled', 'false' );
+   $( '.editButtons .oo-ui-buttonElement' ).addClass( 
'oo-ui-widget-enabled' );
+   $( '.editButtons .oo-ui-buttonElement' ).removeClass( 
'oo-ui-widget-disabled' );
}
 
function initAndShowBaseVersionSelector() {
@@ -151,6 +160,7 @@
} );
 
$( '.mw-twocolconflict-col-header' ).append( 
windowManager.$element );
+   beforeBaseVersionSelection();
versionSelector.setCloseCallback( afterBaseVersionSelection );
windowManager.addWindows( [ versionSelector ] );
windowManager.openWindow( versionSelector );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I603fe6903b6560108ccaff16c2e424d236f6de0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: New SSH key for me

2017-05-20 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354743 )

Change subject: New SSH key for me
..

New SSH key for me

Change-Id: Ie50bb06a2857b3896adf36d63fd11daf7eb680ce
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/354743/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 84437f4..86fe0f3 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1191,8 +1191,7 @@
 gid: 500
 name: daniel
 realname: Daniel Kinzler
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EBJQAAAIEAuH1eNAxPgzMG0GoCZBtNx/eTnneQRT0Z/IZvbj0uQusaNlSG7MlFrUEI/HWCwIcWZlAdMBCvp2Ywc7+flvgH+JuBzbjvXDhhkC9o0/9wxKEwGRnP8RDnNBlaouzk/ROP4m8L2FZahAahFzoqDqYxzBl7bQ/iw+N811rAo+R0AGU=
-daniel.kinz...@wikimedia.de]
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDZiSU9lcD1L2jmvcRqyLCBmHwSyfatrIvjqvgubJygm2WNWfeIXBbl5ljdV+6gdP4dhuvNecUqet8v9+tUtZrnr2qnHTD8Uf/5jnOdf1HWmdZlbCsrAWAwJKdwCk91TStG90tgBclBqMcPG7v9QTg2T6GG6Vm4e2HkUTYz8bTbLxO21Hr0atreJUl0uDYmXPWPyJcmsMVHeCiWzdBD2eKlNDcX9Yxn2SkqIGVitNF2Bahfq4uiCj5EcdeYWFngjRupomKuydVJVgAR3y5suZk/N+xbfoIqjw0axI9VIs97jfOyfn1Vs3GMIRnOQQtFKklciEoo/S4b6fuVSBmKTtnZ
 daki@C159]
 uid: 545
 email: daniel.kinz...@wikimedia.de
   dartar:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie50bb06a2857b3896adf36d63fd11daf7eb680ce
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Fix up a couple of minor things in demo widgets

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354735 )

Change subject: demos: Fix up a couple of minor things in demo widgets
..


demos: Fix up a couple of minor things in demo widgets

* Demo.NumberLookupTextInputWidget: Pass config to parent constructor
* Demo.CapsuleNumberPopupMultiselectWidget: Don't abuse config so much

Change-Id: Ie92d3da3654fb75ff2bfb762007e33d439c9bfff
---
M demos/classes/CapsuleNumberPopupMultiselectWidget.js
M demos/classes/NumberLookupTextInputWidget.js
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/demos/classes/CapsuleNumberPopupMultiselectWidget.js 
b/demos/classes/CapsuleNumberPopupMultiselectWidget.js
index ca8a533..5cf3826 100644
--- a/demos/classes/CapsuleNumberPopupMultiselectWidget.js
+++ b/demos/classes/CapsuleNumberPopupMultiselectWidget.js
@@ -7,11 +7,14 @@
// Parent constructor
Demo.CapsuleNumberPopupMultiselectWidget.parent.call( this, $.extend( 
{}, config, {
allowArbitrary: true,
-   popup: { $content: this.capsulePopupWidget.$element }
+   popup: {}
} ) );
 
// Events
this.capsulePopupWidget.connect( this, { enter: 'onPopupEnter' } );
+
+   // Initialization
+   this.popup.$body.append( this.capsulePopupWidget.$element );
 };
 
 OO.inheritClass( Demo.CapsuleNumberPopupMultiselectWidget, 
OO.ui.CapsuleMultiselectWidget );
diff --git a/demos/classes/NumberLookupTextInputWidget.js 
b/demos/classes/NumberLookupTextInputWidget.js
index 97d0753..7ad5d16 100644
--- a/demos/classes/NumberLookupTextInputWidget.js
+++ b/demos/classes/NumberLookupTextInputWidget.js
@@ -10,7 +10,7 @@
  */
 Demo.NumberLookupTextInputWidget = function DemoNumberLookupTextInputWidget( 
config ) {
// Parent constructor
-   OO.ui.TextInputWidget.call( this, { validate: 'integer' } );
+   OO.ui.TextInputWidget.call( this, $.extend( { validate: 'integer' }, 
config ) );
// Mixin constructors
OO.ui.mixin.LookupElement.call( this, config );
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie92d3da3654fb75ff2bfb762007e33d439c9bfff
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
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] oojs/ui[master]: PopupButtonWidget: Handle empty configuration

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354734 )

Change subject: PopupButtonWidget: Handle empty configuration
..


PopupButtonWidget: Handle empty configuration

Previously, constructing `new OO.ui.PopupButtonWidget()` (with no
configuration at all) would throw an exception.

Change-Id: Id93214df0e633646ae35bac118313f85b3bb6b6e
---
M src/widgets/PopupButtonWidget.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/widgets/PopupButtonWidget.js b/src/widgets/PopupButtonWidget.js
index 10e164d..f769c46 100644
--- a/src/widgets/PopupButtonWidget.js
+++ b/src/widgets/PopupButtonWidget.js
@@ -28,6 +28,9 @@
  *  See .
  */
 OO.ui.PopupButtonWidget = function OoUiPopupButtonWidget( config ) {
+   // Configuration initialization
+   config = config || {};
+
// Parent constructor
OO.ui.PopupButtonWidget.parent.call( this, config );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id93214df0e633646ae35bac118313f85b3bb6b6e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
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] labs...heritage[wikidata]: [WIP]Construct country sqls for wikidata configs

2017-05-20 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354742 )

Change subject: [WIP]Construct country sqls for wikidata configs
..

[WIP]Construct country sqls for wikidata configs

Partial work for T165758

Bug: T165758
Change-Id: Ia7a26127508a9456b257059b5435a52666b22aec
---
A erfgoedbot/sql/wikidata_table_template.sql
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/42/354742/1

diff --git a/erfgoedbot/sql/wikidata_table_template.sql 
b/erfgoedbot/sql/wikidata_table_template.sql
new file mode 100644
index 000..4c31a31
--- /dev/null
+++ b/erfgoedbot/sql/wikidata_table_template.sql
@@ -0,0 +1,17 @@
+DROP TABLE IF EXISTS `monuments_{country}_({lang})`;
+CREATE TABLE IF NOT EXISTS `monuments_{country}_({lang})` (
+  `id` int(11) NOT NULL DEFAULT  0,
+  `admin` varchar(255) NOT NULL DEFAULT '',
+  `commonscat` varchar(255) NOT NULL DEFAULT '',
+  `lat` double DEFAULT NULL,
+  `lon` double DEFAULT NULL,
+  `image` varchar(255) NOT NULL DEFAULT '',
+  `source` varchar(510) NOT NULL DEFAULT '',
+  `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
+  `monument_article` varchar(255) NOT NULL DEFAULT '',
+  `registrant_url` varchar(255) NOT NULL DEFAULT '',
+  `wd_item` varchar(255) NOT NULL DEFAULT '',
+  PRIMARY KEY (`id`),
+  KEY `latitude` (`lat`),
+  KEY `longitude` (`lon`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7a26127508a9456b257059b5435a52666b22aec
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: wikidata
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Improve MenuBuilder code quality

2017-05-20 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354741 )

Change subject: Hygiene: Improve MenuBuilder code quality
..

Hygiene: Improve MenuBuilder code quality

Changes:
 - changed the namespace to MobileFrontend/Minerva as this is part of minerva 
skin
 - fixed unit tests to follow our code style
 - added missing unit tests to reach 100% code coverage

Change-Id: I4c6ef84431aacc1697da706b2cfc3e3304e46522
---
M extension.json
M includes/MenuBuilder.php
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinerva.php
M tests/phpunit/MenuBuilderTest.php
5 files changed, 71 insertions(+), 35 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7bac35e..b254664 100644
--- a/extension.json
+++ b/extension.json
@@ -86,8 +86,8 @@
"MFResourceLoaderParsedMessageModule": 
"includes/modules/MFResourceLoaderParsedMessageModule.php",
"SkinMinerva": "includes/skins/SkinMinerva.php",
"ICustomizableSkin": "includes/skins/ICustomizableSkin.php",
-   "MobileFrontend\\MenuBuilder": "includes/MenuBuilder.php",
-   "MobileFrontend\\MenuEntry": "includes/MenuBuilder.php",
+   "MediaWiki\\Minerva\\MenuBuilder": "includes/MenuBuilder.php",
+   "MediaWiki\\Minerva\\MenuEntry": "includes/MenuBuilder.php",
"MobileFrontend\\Devices\\DeviceDetector": 
"includes/devices/DeviceDetector.php",
"MobileFrontend\\Devices\\DeviceProperties": 
"includes/devices/DeviceProperties.php",
"MobileFrontend\\Devices\\AMFDeviceDetector": 
"includes/devices/AMFDeviceDetector.php",
diff --git a/includes/MenuBuilder.php b/includes/MenuBuilder.php
index e2e68b2..12f0992 100644
--- a/includes/MenuBuilder.php
+++ b/includes/MenuBuilder.php
@@ -1,6 +1,6 @@
 getFile();
if ( !$file || !in_array( $file->getMimeType(),
- $config->get( 
'MFResponsiveImageWhitelist' ) ) ) {
+   $config->get( 
'MFResponsiveImageWhitelist' ) ) ) {
// Remove all responsive image 'srcset' 
attributes, except
// from SVG->PNG renderings which usually 
aren't too huge,
// or other whitelisted types.
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 8cadaf4..1b92b23 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -2,7 +2,7 @@
 /**
  * SkinMinerva.php
  */
-use MobileFrontend\MenuBuilder;
+use MediaWiki\Minerva\MenuBuilder;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Logger\LoggerFactory;
 
diff --git a/tests/phpunit/MenuBuilderTest.php 
b/tests/phpunit/MenuBuilderTest.php
index 25322c4..da6430c 100644
--- a/tests/phpunit/MenuBuilderTest.php
+++ b/tests/phpunit/MenuBuilderTest.php
@@ -1,8 +1,9 @@
 assertEmpty( $menu->getEntries() );
}
 
/**
-* @covers \MobileFrontend\MenuBuilder::insert
-* @covers \MobileFrontend\MenuEntry::addComponent
-* @covers \MobileFrontend\MenuBuilder::getEntries
+* @covers \MediaWiki\Minerva\MenuBuilder::insert
+* @covers \MediaWiki\Minerva\MenuBuilder::search
+* @covers \MediaWiki\Minerva\MenuBuilder::getEntries
+* @covers \MediaWiki\Minerva\MenuEntry::addComponent
 */
-   public function test_inserting_an_entry() {
+   public function testInsertingAnEntry() {
$menu = new MenuBuilder();
$menu->insert( 'home' )
->addComponent(
@@ -58,11 +60,12 @@
}
 
/**
-* @covers \MobileFrontend\MenuBuilder::insert
-* @covers \MobileFrontend\MenuEntry::addComponent
-* @covers \MobileFrontend\MenuBuilder::getEntries
+* @covers \MediaWiki\Minerva\MenuBuilder::insert
+* @covers \MediaWiki\Minerva\MenuBuilder::search
+* @covers \MediaWiki\Minerva\MenuBuilder::getEntries
+* @covers \MediaWiki\Minerva\MenuEntry::addComponent
 */
-   public function test_inserting_an_entry_after_another() {
+   public function testInsertingAnEntryAfterAnother() {
$menu = new MenuBuilder();
$menu->insert( 'home' )
->addComponent(
@@ -110,10 +113,11 @@
/**
 * @expectedException \DomainException
 * @expectedExceptionMessage The "home" entry doesn't exist.
-* @covers \MobileFrontend\MenuBuilder::insertAfter
-* @covers \MobileFrontend\MenuEntry::addComponent
+* @covers \MediaWiki\Minerva\MenuBuilder::insertAfter
+* @covers \MediaWiki\Minerva\MenuBuilder::search
+* @covers \MediaWiki\Minerva\MenuEntry::addComponent
 */

[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Bringing back the top reviewers stats

2017-05-20 Thread MusikAnimal (Code Review)
MusikAnimal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354740 )

Change subject: Bringing back the top reviewers stats
..

Bringing back the top reviewers stats

To use, pass topreviewers=timerange to the action=pagetriagestats API
Possible values: last-day, last-week or last-month

This data is not exposed in the Page Curation interface

Bug: T165910
Change-Id: I58dc596c22c12d0ebd48fe619549bb8b9bfc0a0d
---
M api/ApiPageTriageStats.php
M i18n/en.json
M i18n/qqq.json
M includes/PageTriageUtil.php
4 files changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage 
refs/changes/40/354740/1

diff --git a/api/ApiPageTriageStats.php b/api/ApiPageTriageStats.php
index 19d54c1..759e7e8 100644
--- a/api/ApiPageTriageStats.php
+++ b/api/ApiPageTriageStats.php
@@ -16,6 +16,10 @@
'filteredarticle' => 
PageTriageUtil::getArticleFilterStat( $params ),
];
 
+   if ( isset( $params['topreviewers'] ) ) {
+   $data['topreviewers'] = PageTriageUtil::getTopTriagers( 
$params['topreviewers'] );
+   }
+
$result = [ 'result' => 'success', 'stats' => $data ];
$this->getResult()->addValue( null, $this->getModuleName(), 
$result );
}
@@ -58,6 +62,9 @@
'username' => [
ApiBase::PARAM_TYPE => 'user',
],
+   'topreviewers' => [
+   ApiBase::PARAM_TYPE => 'string',
+   ],
];
}
 }
diff --git a/i18n/en.json b/i18n/en.json
index ac3b5d5..2a52669 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -405,6 +405,7 @@
"apihelp-pagetriagestats-param-non_autoconfirmed_users": "Whether to 
include only pages created by non-autoconfirmed users.",
"apihelp-pagetriagestats-param-blocked_users": "Whether to include only 
pages created by blocked users.",
"apihelp-pagetriagestats-param-username": "Include only pages created 
by username.",
+   "apihelp-pagetriagestats-topreviewers": "Include the top 10 reviewers 
over the given timeframe. Valid values include last-day, last-week (default), 
or last-month.",
"apihelp-pagetriagetagging-description": "Add tags to an article.",
"apihelp-pagetriagetagging-param-pageid": "The article for which to be 
tagged.",
"apihelp-pagetriagetagging-param-top": "The tagging text to be added to 
the top of an article.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8f8f2fd..ec9f7b0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -418,6 +418,7 @@
"apihelp-pagetriagestats-param-non_autoconfirmed_users": 
"{{doc-apihelp-param|pagetriagestats|non_autoconfirmed_users}}",
"apihelp-pagetriagestats-param-blocked_users": 
"{{doc-apihelp-param|pagetriagestats|blocked_users}}",
"apihelp-pagetriagestats-param-username": 
"{{doc-apihelp-param|pagetriagestats|username}}",
+   "apihelp-pagetriagestats-param-topreviewers": 
"{{doc-apihelp-param|pagetriagestats|topreviewers}}",
"apihelp-pagetriagetagging-description": 
"{{doc-apihelp-description|pagetriagetagging}}",
"apihelp-pagetriagetagging-param-pageid": 
"{{doc-apihelp-param|pagetriagetagging|pageid}}",
"apihelp-pagetriagetagging-param-top": 
"{{doc-apihelp-param|pagetriagetagging|top}}",
diff --git a/includes/PageTriageUtil.php b/includes/PageTriageUtil.php
index 6799efd..1fa076a 100755
--- a/includes/PageTriageUtil.php
+++ b/includes/PageTriageUtil.php
@@ -119,6 +119,11 @@
return ApiPageTriageList::getPageIds( $filters, true );
}
 
+   /**
+* Get number of reviewed articles in the past week
+* @param  string|int $namespace Namespace number
+* @return array Stats to be returned
+*/
public static function getReviewedArticleStat( $namespace = '' ) {
global $wgMemc;
 
@@ -162,16 +167,17 @@
 
// make it expire in 10 minutes
$wgMemc->set( $key, $data, 600 );
+
return $data;
}
 
/**
 * Get top page triagers in various time frame
 * @param $time string - time to look back for top triagers, possible 
values include
-*   last-day, last-week
+*   last-day, last-week, last-month
 * @return array
 */
-   public static function getTopTriager( $time = 'last-week' ) {
+   public static function getTopTriagers( $time = 'last-week' ) {
global $wgMemc;
 
$now = wfTimestamp( TS_UNIX );
@@ -179,7 +185,8 @@
// times to look back for top trigers and expiration time in 
cache
$timeFrame = [
'last-day' => [ 

[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Remove unused private variable

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354539 )

Change subject: Remove unused private variable
..


Remove unused private variable

Change-Id: I9a18a3bf0e79803a3dbb76b91abe87e681560f82
---
M maintenance/update_scratch_token_format.php
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/maintenance/update_scratch_token_format.php 
b/maintenance/update_scratch_token_format.php
index c0274c9..1f887b9 100644
--- a/maintenance/update_scratch_token_format.php
+++ b/maintenance/update_scratch_token_format.php
@@ -32,9 +32,6 @@
 require_once "$IP/maintenance/Maintenance.php";
 
 class UpdateScratchTokenFormat extends Maintenance {
-
-   private $mPurgeDays = null;
-
function __construct() {
parent::__construct();
$this->mDescription = 'Script to update scratch_token column 
format';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a18a3bf0e79803a3dbb76b91abe87e681560f82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Fix directionality of ULS CLL callout

2017-05-20 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354739 )

Change subject: Fix directionality of ULS CLL callout
..

Fix directionality of ULS CLL callout

Callout appears toward content regardless of where it's appearing from.
Callout and triangle are now alligned to the top of the callout to avoid
issues with it appearing over a scrollbacl. Callout is re-implemented as only
a triangle, instead of a diamond, to avoid overlap errors.

Bug: T161586
Change-Id: I7717e26525ac527ede486796f49083ed40ee7d4f
---
M resources/css/ext.uls.compactlinks.less
M resources/js/ext.uls.compactlinks.js
2 files changed, 46 insertions(+), 29 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/39/354739/1

diff --git a/resources/css/ext.uls.compactlinks.less 
b/resources/css/ext.uls.compactlinks.less
index 8223c9f..13650c0 100644
--- a/resources/css/ext.uls.compactlinks.less
+++ b/resources/css/ext.uls.compactlinks.less
@@ -30,34 +30,49 @@
background-color: #ccc;
 }
 
-.interlanguage-uls-menu:before {
-   background: none repeat scroll 0 0 #fcfcfc;
-   border-left: 1px solid rgba( 0, 0, 0, 0.2 );
-   border-top: 1px solid rgba( 0, 0, 0, 0.2 );
-   box-shadow: -2px -2px 2px rgba( 0, 0, 0, 0.1 );
-   content: '';
-   height: 16px;
-   width: 16px;
-   left: -9px;
+/* @noflip */
+.interlanguage-uls-menu:before,
+.interlanguage-uls-menu:after {
+   border-top: 10px solid transparent;
+   border-bottom: 10px solid transparent;
+   display: inline-block;
+   /* 17px aligns nicely with the size of the search row in language 
selection */
+   top: 17px;
position: absolute;
-   /* The dialog middle is positioned 250px away from the center of the 
trigger. Substract 8 for
-* half of the box height to center middle of the box rather than the 
top.  The remaining 2 are
-* either for top-margin of the menu and border of this box, or because 
we use do not account
-* for the margin of the trigger when we use $.fn.outerWidth without 
true as a parameter.
-*/
-   top: 240px;
-   transform: rotate( -45deg );
-   -webkit-transform: rotate( -45deg );
-   -moz-transform: rotate( -45deg );
-   -o-transform: rotate( -45deg );
-   -ms-transform: rotate( -45deg );
-   background-clip: padding-box;
+   content: '';
 }
 
-body.rtl .interlanguage-uls-menu:before {
-   transform: rotate( 45deg );
-   -webkit-transform: rotate( 45deg );
-   -moz-transform: rotate( 45deg );
-   -o-transform: rotate( 45deg );
-   -ms-transform: rotate( 45deg );
+.interlanguage-uls-menu.selector-right {
+   &::before,
+   &::after {
+   /* @noflip */
+   border-left: 10px solid #c9c9c9;
+   /* @noflip */
+   right: -11px;
+
+   }
+   &::after {
+   /* @noflip */
+   border-left: 10px solid #fcfcfc;
+   /* @noflip */
+   right: -10px;
+   }
+}
+/* @noflip */
+.interlanguage-uls-menu.selector-left {
+   &::before,
+   &::after {
+   /* @noflip */
+   border-right: 10px solid #c9c9c9;
+   /* @noflip */
+   left: -11px;
+
+   }
+   &::after {
+   /* @noflip */
+   border-right: 10px solid #fcfcfc;
+   /* @noflip */
+   left: -10px;
+
+   }
 }
diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 69e23c0..897ffe3 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -157,13 +157,15 @@
// The resulting value is rounded up 14 to have 
a small space between.
triangleWidth = 14;
 
-   if ( dir === 'rtl' ) {
+   if ( offset.left > $( window ).width() / 2  ) {
this.left = offset.left - 
this.$menu.outerWidth() - triangleWidth;
+   this.$menu.addClass( 'selector-right' );
} else {
this.left = offset.left + width + 
triangleWidth;
+   this.$menu.addClass( 'selector-left' );
}
// Offset -250px from the middle of the trigger
-   this.top = offset.top + ( height / 2 ) - 250;
+   this.top = offset.top + ( height / 2 ) - 27;
 
this.$menu.css( {
left: this.left,

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Align inline label's position

2017-05-20 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354738 )

Change subject: WikimediaUI theme: Align inline label's position
..

WikimediaUI theme: Align inline label's position

Bug: T165794
Change-Id: I420b5541fa765d2a881f445e813f5eb3921e3775
---
M src/themes/wikimediaui/widgets.less
1 file changed, 11 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/38/354738/1

diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index bfe74c8..50a159c 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -1879,23 +1879,27 @@
}
}
 
+   > .oo-ui-labelElement-label {
+   color: @color-subtle;
+   margin-top: @border-width-default; // Address `border` on 
`input`
+   padding: @padding-top-default @padding-horizontal-default 
@padding-bottom-default @padding-horizontal-input-text;
+   line-height: @line-height-widget-singleline;
+   }
+
&.oo-ui-indicatorElement {
input,
textarea {
padding-right: @size-indicator + 2 * 
@padding-horizontal-input-text;
}
 
+   &.oo-ui-textInputWidget-labelPosition-after > 
.oo-ui-labelElement-label {
+   padding-right: 0;
+   }
+
.oo-ui-indicatorElement-indicator {
max-height: @size-default;
margin-right: @padding-horizontal-default;
}
-   }
-
-   > .oo-ui-labelElement-label {
-   color: @color-subtle;
-   margin-top: 1px; // Address `border` on `input`
-   padding: @padding-top-default 0 @padding-bottom-default 
@padding-horizontal-input-text;
-   line-height: @line-height-widget-singleline;
}
 
&-labelPosition-after {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Change $wgUploadNavigationUrl on srwiki

2017-05-20 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354737 )

Change subject: Change $wgUploadNavigationUrl on srwiki
..

Change $wgUploadNavigationUrl on srwiki

Bug: T165901
Change-Id: I70fb97dd1be476762941045df270958b52bf78a5
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 24979a9..3a73667 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1582,6 +1582,7 @@
'ruwiki' => false, // T14334
'ruwikinews' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=ru',
'sewikimedia' => false, // T63947
+   'srwiki' => '/wiki/Википедија:Водич_за_отпремање', // T165901
'svwikisource' => false,
'svwiktionary' => false,
'specieswiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Only add the resolution switcher to video files

2017-05-20 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354736 )

Change subject: Only add the resolution switcher to video files
..

Only add the resolution switcher to video files

Adding this button is problematic, since we don't really need it in
audio players, and the module also wasn't compatible with audio only
files.

Change-Id: Ie90a16187d7c7fc5181a9b5a2963c3939f97668b
---
M resources/ext.tmh.player.js
1 file changed, 23 insertions(+), 19 deletions(-)


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

diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js
index 8e6f054..77ab011 100755
--- a/resources/ext.tmh.player.js
+++ b/resources/ext.tmh.player.js
@@ -1,6 +1,6 @@
 /* global videojs */
 ( function ( $, mw, videojs ) {
-   var globalConfig, audioConfig, playerConfig;
+   var globalConfig, videoConfig, audioConfig, playerConfig;
 
globalConfig = {
language: mw.config.get( 'wgUserLanguage' ),
@@ -13,17 +13,6 @@
},
techOrder: [ 'html5' ],
plugins: {
-   videoJsResolutionSwitcher: {
-   sourceOrder: true,
-   customSourcePicker: function ( player, 
sources/* , label */ ) {
-   // Resolution switcher gets confused by 
preload=none on ogv.js
-   if ( player.preload() === 'none' ) {
-   player.preload( 'metadata' );
-   }
-   player.src( sources );
-   return player;
-   }
-   },
responsiveLayout: {
layoutMap: [
{ layoutClassName: 'vjs-layout-tiny', 
width: 3 },
@@ -34,6 +23,22 @@
},
replayButton: {},
infoButton: {}
+   }
+   };
+
+   videoConfig = {
+   plugins: {
+   videoJsResolutionSwitcher: {
+   sourceOrder: true,
+   customSourcePicker: function ( player, 
sources/* , label */ ) {
+   // Resolution switcher gets confused by 
preload=none on ogv.js
+   if ( player.preload() === 'none' ) {
+   player.preload( 'metadata' );
+   }
+   player.src( sources );
+   return player;
+   }
+   }
}
};
 
@@ -52,18 +57,17 @@
function loadSinglePlayer( index ) {
var i, l, preload, resolutions, playerHeight, 
defaultRes,
videoplayer = this,
-   $videoplayer = $( this );
+   $videoplayer = $( this ),
+   isAudio = videoplayer.tagName.toLowerCase() === 
'audio';
 
if ( $videoplayer.closest( '.video-js' ).length ) {
// This player has already been transformed.
return;
}
+
playerConfig = $.extend( {}, globalConfig );
-   if ( videoplayer.tagName.toLowerCase() === 'audio' ) {
-   // We hide the big play button, show the 
controlbar with CSS
-   // We remove the fullscreen button
-   playerConfig = $.extend( true, {}, 
playerConfig, audioConfig );
-   }
+   playerConfig = $.extend( true, {}, playerConfig, 
isAudio ? audioConfig : videoConfig );
+
// Future interactions go faster if we've preloaded a 
little
preload = 'metadata';
if ( !mw.OgvJsSupport.canPlayNatively() ) {
@@ -117,7 +121,7 @@
break;
}
}
-   if ( defaultRes ) {
+   if ( !isAudio && defaultRes ) {
playerConfig.plugins.videoJsResolutionSwitcher[ 
'default' ] = defaultRes;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie90a16187d7c7fc5181a9b5a2963c3939f97668b
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Use lists in description steps

2017-05-20 Thread WMDE-Fisch (Code Review)
WMDE-Fisch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354733 )

Change subject: Use lists in description steps
..

Use lists in description steps

Change-Id: I4adfc097a3df7487c3aaa83a22f3ca509512ea2f
---
M includes/TwoColConflictPage.php
M modules/ext.TwoColConflict.less
2 files changed, 14 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/33/354733/1

diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php
index c8c614e..7552a9b 100644
--- a/includes/TwoColConflictPage.php
+++ b/includes/TwoColConflictPage.php
@@ -278,15 +278,15 @@
$out = '';
$out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-title' ) . '';
$out .= '';
-   $out .= '';
-   $out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-1' ) . '';
-   $out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-2' ) . '';
-   $out .= '';
-   $out .= '';
-   $out .= $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) . '';
-   $out .= $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) . '';
-   $out .= $this->getContext()->msg( 
'twoColConflict-base-selection-desc-3' );
-   $out .= '';
+   $out .= '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-1' ) . '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-2' ) . '';
+   $out .= '';
+   $out .= '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) . '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) . '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-3' ) . '';
+   $out .= '';
 
return $out;
}
diff --git a/modules/ext.TwoColConflict.less b/modules/ext.TwoColConflict.less
index edcb42f..e47de99 100644
--- a/modules/ext.TwoColConflict.less
+++ b/modules/ext.TwoColConflict.less
@@ -44,6 +44,11 @@
margin-bottom: 10px;
 }
 
+.mw-twocolconflict-col-desc ul {
+   list-style: none;
+   margin: 0;
+}
+
 .mw-twocolconflict-base-selection-desc {
display: none;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4adfc097a3df7487c3aaa83a22f3ca509512ea2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Fix up minor things in demo widgets

2017-05-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354735 )

Change subject: demos: Fix up minor things in demo widgets
..

demos: Fix up minor things in demo widgets

* Demo.NumberLookupTextInputWidget: Pass config to parent constructor
* Demo.CapsuleNumberPopupMultiselectWidget: Don't abuse config so bad

Change-Id: Ie92d3da3654fb75ff2bfb762007e33d439c9bfff
---
M demos/classes/CapsuleNumberPopupMultiselectWidget.js
M demos/classes/NumberLookupTextInputWidget.js
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/35/354735/1

diff --git a/demos/classes/CapsuleNumberPopupMultiselectWidget.js 
b/demos/classes/CapsuleNumberPopupMultiselectWidget.js
index ca8a533..5cf3826 100644
--- a/demos/classes/CapsuleNumberPopupMultiselectWidget.js
+++ b/demos/classes/CapsuleNumberPopupMultiselectWidget.js
@@ -7,11 +7,14 @@
// Parent constructor
Demo.CapsuleNumberPopupMultiselectWidget.parent.call( this, $.extend( 
{}, config, {
allowArbitrary: true,
-   popup: { $content: this.capsulePopupWidget.$element }
+   popup: {}
} ) );
 
// Events
this.capsulePopupWidget.connect( this, { enter: 'onPopupEnter' } );
+
+   // Initialization
+   this.popup.$body.append( this.capsulePopupWidget.$element );
 };
 
 OO.inheritClass( Demo.CapsuleNumberPopupMultiselectWidget, 
OO.ui.CapsuleMultiselectWidget );
diff --git a/demos/classes/NumberLookupTextInputWidget.js 
b/demos/classes/NumberLookupTextInputWidget.js
index 97d0753..7ad5d16 100644
--- a/demos/classes/NumberLookupTextInputWidget.js
+++ b/demos/classes/NumberLookupTextInputWidget.js
@@ -10,7 +10,7 @@
  */
 Demo.NumberLookupTextInputWidget = function DemoNumberLookupTextInputWidget( 
config ) {
// Parent constructor
-   OO.ui.TextInputWidget.call( this, { validate: 'integer' } );
+   OO.ui.TextInputWidget.call( this, $.extend( { validate: 'integer' }, 
config ) );
// Mixin constructors
OO.ui.mixin.LookupElement.call( this, config );
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie92d3da3654fb75ff2bfb762007e33d439c9bfff
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: PopupButtonWidget: Handle empty configuration

2017-05-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354734 )

Change subject: PopupButtonWidget: Handle empty configuration
..

PopupButtonWidget: Handle empty configuration

Previously, constructing `new OO.ui.PopupButtonWidget()` (with no
configuration at all) would throw an exception.

Change-Id: Id93214df0e633646ae35bac118313f85b3bb6b6e
---
M src/widgets/PopupButtonWidget.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/34/354734/1

diff --git a/src/widgets/PopupButtonWidget.js b/src/widgets/PopupButtonWidget.js
index 10e164d..f769c46 100644
--- a/src/widgets/PopupButtonWidget.js
+++ b/src/widgets/PopupButtonWidget.js
@@ -28,6 +28,9 @@
  *  See .
  */
 OO.ui.PopupButtonWidget = function OoUiPopupButtonWidget( config ) {
+   // Configuration initialization
+   config = config || {};
+
// Parent constructor
OO.ui.PopupButtonWidget.parent.call( this, config );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id93214df0e633646ae35bac118313f85b3bb6b6e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: [DNM] Reduce the number of Wikibase jobs

2017-05-20 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354725 )

Change subject: [DNM] Reduce the number of Wikibase jobs
..

[DNM] Reduce the number of Wikibase jobs

Bug: T160989
Change-Id: Ia42d4bfd960a91932f1cff403d799ea0db97b2d3
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/25/354725/2

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 392da0a..4854d21 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -6776,20 +6776,15 @@
 php5:  # 'check php5'
   - mwext-Wikibase-repo-tests-sqlite-php55-trusty
   - mwext-Wikibase-client-tests-mysql-php55-trusty
-  - mwext-Wikibase-client-tests-sqlite-php55-trusty
 test:
   - mwext-mw-selenium-composer-jessie
   - mwext-Wikibase-repo-tests-sqlite-hhvm-jessie
   - mwext-Wikibase-client-tests-mysql-hhvm-jessie
-  - mwext-Wikibase-client-tests-sqlite-hhvm-jessie
 gate-and-submit: 
   - mwext-mw-selenium-composer-jessie
-  - mwext-Wikibase-repo-tests-sqlite-php55-trusty
   - mwext-Wikibase-repo-tests-sqlite-hhvm-jessie
   - mwext-Wikibase-client-tests-mysql-php55-trusty
-  - mwext-Wikibase-client-tests-sqlite-php55-trusty
   - mwext-Wikibase-client-tests-mysql-hhvm-jessie
-  - mwext-Wikibase-client-tests-sqlite-hhvm-jessie
 gate-and-submit-swat: *mediawiki-extensions-wikibase-gate-and-submit
 experimental:
   - mwext-php70-phan-jessie

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia42d4bfd960a91932f1cff403d799ea0db97b2d3
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Cleanup ORES config: Drop wgOresExtensionStatus (default), a...

2017-05-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354732 )

Change subject: Cleanup ORES config: Drop wgOresExtensionStatus (default), 
alphasort
..

Cleanup ORES config: Drop wgOresExtensionStatus (default), alphasort

We don't set wgOresExtensionStatus to anything other than 'on' which is
(a) the extension default and (b) going away soon as it's pointless, so
let's just clean it up. Also alphasorting the list of those wikis which
have the extension at all, as normal (grouped by family).

Change-Id: I160d81a06bbdb07209b20bb043f0c32363cc3442
---
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
2 files changed, 11 insertions(+), 16 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 5b7a033..8c84aa3 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -430,10 +430,6 @@
'default' => false,
'wikipedia' => true, // T127661
],
-   'wgOresExtensionStatus' => [
-   'cawiki' => 'on',
-   'ruwiki' => 'on',
-   ],
'wgOresModels' => [
'default' => [
'damaging' => true,
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index dca05eb..eff475d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18003,21 +18003,20 @@
 ],
 'wmgUseORES' => [
'default' => false,
-   'fawiki' => true, // T130211
-   'wikidatawiki' => true, // T130212
-   'nlwiki' => true, // T139432
-   'ruwiki' => true, // T139541
-   'ptwiki' => true, // T139692
-   'trwiki' => true, // T139992
-   'plwiki' => true, // T140005
-   'enwiki' => true, // T140003
+
'cswiki' => true, // T151611
+   'enwiki' => true, // T140003
'etwiki' => true, // T159609
-   'hewiki' => true, // T161621
+   'fawiki' => true, // T130211
'fiwiki' => true, // T163011
-],
-'wgOresExtensionStatus' => [
-   'default' => 'on',
+   'hewiki' => true, // T161621
+   'nlwiki' => true, // T139432
+   'plwiki' => true, // T140005
+   'ptwiki' => true, // T139692
+   'ruwiki' => true, // T139541
+   'trwiki' => true, // T139992
+
+   'wikidatawiki' => true, // T130212
 ],
 'wgOresModels' => [
'default' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Beta Features: Update last-big-change-plus-six-month dates i...

2017-05-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354731 )

Change subject: Beta Features: Update last-big-change-plus-six-month dates in 
comments
..

Beta Features: Update last-big-change-plus-six-month dates in comments

Removed (no longer Beta Features):
* ORES (graduated, see bfc85146c and later)
* RevisionSlider (graduated, see 72c0b2476)
* ReadMore (dropped, see dbb73c389)

Date bumped:
* Compact language links (last big change: 2017-05-20)
* Page previews (last big change: 2017-05-05)
* ContentTranslation (last big change: 2017-05-20)
* Wikitext edit mode for VE (last big change: 2017-05-02)
* Two column edit conflict (last big change: 2017-05-12)
* Recent changes filters (last big change: 2017-05-18)

Change-Id: Icf87a3054ebe29c3b1484fe9117bf29b74651f50
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 9 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 996323c..dca05eb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13198,15 +13198,12 @@
'default' => [
'visualeditor-enable',  // [Editing] 
On-going (special permission) – VisualEditor
'beta-feature-flow-user-talk-page', // [Editing] 
On-going (special permission) – Flow opt-in
-   'uls-compact-links',// [Editing] 
2017-02-19 – Compact language links
-   'popups',   // [Reading] 
2017-03-23 – Hovercards
-   'cx',   // [Editing] 
2017-05-08 - ContentTranslation
-   'read-more',// [Reading] 
2017-03-15 - Read more
-   'ores-enabled', // [Research] 
2017-05-10 - ORES
-   'revisionslider',   // [WMDE] 
2017-05-08 - RevisionSlider
-   'visualeditor-newwikitext', // [Editing] 
2017-05-29 – New wikitext editor
-   'twocolconflict',   // [WMDE] 
2017-07-18 – New edit conflict view
-   'rcenhancedfilters',// [Editing] 
2017-09-28 - Enhanced recent changes filters
+   'uls-compact-links',// [Editing] 
2017-11-20 – Compact language links
+   'popups',   // [Reading] 
2017-11-05 – Page Previews
+   'cx',   // [Editing] 
2017-11-20 - ContentTranslation
+   'visualeditor-newwikitext', // [Editing] 
2017-11-02 – New wikitext editor
+   'twocolconflict',   // [WMDE TW] 
2017-11-12 – New edit conflict view
+   'rcenhancedfilters',// [Editing] 
2017-11-18 - Enhanced recent changes filters
'tmh-videojs',  // [Editing] 
2017-11-29 - New video player
],
 ],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Ensure the number of fitlered pages respects all filters

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354518 )

Change subject: Ensure the number of fitlered pages respects all filters
..


Ensure the number of fitlered pages respects all filters

This is basically done by using the queries in ApiPageTriageList
except doing a COUNT.

Bug: T165738
Change-Id: Icfd6aea82fb834c1ae93d19cabf1b5c5967396b9
---
M SpecialNewPagesFeed.php
M api/ApiPageTriageList.php
M api/ApiPageTriageStats.php
M i18n/en.json
M i18n/qqq.json
M includes/PageTriageUtil.php
M modules/ext.pageTriage.views.list/ext.pageTriage.listControlNav.js
7 files changed, 112 insertions(+), 120 deletions(-)

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



diff --git a/SpecialNewPagesFeed.php b/SpecialNewPagesFeed.php
index a598f96..cba88fd 100644
--- a/SpecialNewPagesFeed.php
+++ b/SpecialNewPagesFeed.php
@@ -229,33 +229,40 @@
<%= 
mw.msg( 'pagetriage-filter-second-show-heading' ) %>


-   
+   


<%= mw.msg( 'pagetriage-filter-no-categories' ) %>

 
-   
+   


<%= mw.msg( 'pagetriage-filter-orphan' ) %>

 
-   
+   


<%= mw.msg( 'pagetriage-filter-non-autoconfirmed' ) %>

 
-   
+   


<%= mw.msg( 'pagetriage-filter-blocked' ) %>

 
-   
+   


<%= mw.msg( 'pagetriage-filter-bot-edits' ) %>

 
-   
+   


<%= mw.msg( 'pagetriage-filter-user-heading' ) %>

 
-   
+   


<%= mw.msg( 'pagetriage-filter-all' ) %>

diff --git a/api/ApiPageTriageList.php b/api/ApiPageTriageList.php
index 87b4b52..160b35d 100644
--- a/api/ApiPageTriageList.php
+++ b/api/ApiPageTriageList.php
@@ -98,24 +98,27 @@
 
/**
 * Return all the page ids in PageTraige matching the specified filters
-* @param $opts array of filtering options
-* @return array an array of ids
+* @param $opts array Array of filtering options
+* @param $count boolean Set to true to return a count instead
+* @return array|int an array of ids or total number of pages
 *
-* @Todo - enforce a range of timestamp to reduce tag record scan
+* @todo - enforce a range of timestamp to reduce tag record scan
  

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Do not fail on item creation in browser tests if the item ex...

2017-05-20 Thread Jakob (Code Review)
Jakob has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354730 )

Change subject: Do not fail on item creation in browser tests if the item 
exists.
..

Do not fail on item creation in browser tests if the item exists.

Steps like "Given I have an item with label 'foo' and description 'bar'"
fail if the item already exists on the tested wikibase instance which
makes it impossible to run the same test twice. With this change it tries
to create the item and still passes if the item already exists.

Change-Id: Iccecf6ad21220049e76a9bd1e6fe7ea06259d930
---
M tests/browser/features/step_definitions/entity_steps.rb
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/tests/browser/features/step_definitions/entity_steps.rb 
b/tests/browser/features/step_definitions/entity_steps.rb
index 80ebf6a..a3cdd38 100644
--- a/tests/browser/features/step_definitions/entity_steps.rb
+++ b/tests/browser/features/step_definitions/entity_steps.rb
@@ -41,7 +41,11 @@
 
 Given(/^I have an item with label "(.*)" and description "(.*)"$/) do |label, 
description|
   item_data = '{"labels":{"en":{"language":"en","value":"' + label + 
'"}},"descriptions":{"en":{"language":"en","value":"' + description + '"}}}'
-  @item_under_test = visit(ItemPage).create_item(item_data)
+  begin
+@item_under_test = visit(ItemPage).create_item(item_data)
+  rescue MediawikiApi::ApiError => error
+fail unless error.code == 'modification-failed' && /Item .+ already has 
label/i =~ error.info
+  end
 end
 
 Given(/^I am on the page of the item to test$/) do

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Drop all trace of the Beta Features integration

2017-05-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354729 )

Change subject: Drop all trace of the Beta Features integration
..

Drop all trace of the Beta Features integration

This includes dropping the 'OresExtensionStatus' config setting (it's now
always true; if you don't want the extension to operate on a wiki, please
don't install it there).

Change-Id: I9d593f99a2987f90dc2abbdd13c4dd98409b90e8
---
M extension.json
M i18n/en.json
M i18n/qqq.json
D images/ORES-beta-features-ltr.svg
D images/ORES-beta-features-rtl.svg
M includes/Hooks.php
M tests/phpunit/includes/HooksTest.php
7 files changed, 20 insertions(+), 211 deletions(-)


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

diff --git a/extension.json b/extension.json
index 6cd88a2..72d6428 100644
--- a/extension.json
+++ b/extension.json
@@ -63,9 +63,6 @@
"EnhancedChangesListModifyLineData": [
"ORES\\Hooks::onEnhancedChangesListModifyLineData"
],
-   "GetBetaFeaturePreferences": [
-   "ORES\\Hooks::onGetBetaFeaturePreferences"
-   ],
"GetPreferences": [
"ORES\\Hooks::onGetPreferences"
],
@@ -121,7 +118,6 @@
"ORESFetchScoreJob": "ORES\\FetchScoreJob"
},
"config": {
-   "OresExtensionStatus": "on",
"OresBaseUrl": "https://ores.wikimedia.org/;,
"OresExcludeBots": true,
"OresModels": {
diff --git a/i18n/en.json b/i18n/en.json
index f051aa0..c2daa5a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -2,8 +2,6 @@
"@metadata": {
"authors": []
},
-   "ores-beta-feature-description": "ORES is an AI-based tool that 
highlights probably damaging edits in recent changes and watchlist.",
-   "ores-beta-feature-message": "ORES",
"ores-desc": "Expose automated revision scores in the interface",
"ores-damaging-filter": "$1 probably good edits",
"ores-damaging-letter": "r",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bb65610..f9ecdc6 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,8 +8,6 @@
"Liuxinyu970226"
]
},
-   "ores-beta-feature-description": "Description of ORES in beta features 
page.",
-   "ores-beta-feature-message": "Title of ORES section in beta features 
page.",
"ores-desc": 
"{{desc|name=ORES|url=https://www.mediawiki.org/wiki/Extension:ORES}};,
"ores-damaging-filter": "Label to toggle filtering on ORES data. 
Parameters:\n* $1 - Action to be performed by toggling. Can be either 'show' or 
'hide'.",
"ores-damaging-letter": "Single letter for tagging possibly damaging 
recent changes.",
diff --git a/images/ORES-beta-features-ltr.svg 
b/images/ORES-beta-features-ltr.svg
deleted file mode 100644
index c4adef1..000
--- a/images/ORES-beta-features-ltr.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/images/ORES-beta-features-rtl.svg 
b/images/ORES-beta-features-rtl.svg
deleted file mode 100644
index 692b409..000
--- a/images/ORES-beta-features-rtl.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 295b9bf..207553d 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -2,7 +2,6 @@
 
 namespace ORES;
 
-use BetaFeatures;
 use ChangesList;
 use ChangesListBooleanFilterGroup;
 use ChangesListFilterGroup;
@@ -93,7 +92,7 @@
ChangesListSpecialPage $clsp
) {
// ORES is disabled on Recentchangeslinked: T163063
-   if ( !self::oresEnabled( $clsp->getUser() ) || $clsp->getName() 
=== 'Recentchangeslinked' ) {
+   if ( $clsp->getName() === 'Recentchangeslinked' ) {
return;
   

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Replace CodeMirror icons with new icons (#36C)

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/353493 )

Change subject: Replace CodeMirror icons with new icons (#36C)
..


Replace CodeMirror icons with new icons (#36C)

Bug: T164441
Change-Id: I2e185dfa468ede51bd1a0e41b3b4dcf43a74313c
---
M resources/ext.CodeMirror.js
M resources/ext.CodeMirror.less
A resources/images/cm-icon.png
A resources/images/cm-icon.svg
M resources/images/cm-off.png
M resources/images/cm-off.svg
M resources/images/cm-on.png
M resources/images/cm-on.svg
M resources/images/old-cm-off.png
M resources/images/old-cm-off.svg
M resources/images/old-cm-on.png
M resources/images/old-cm-on.svg
12 files changed, 55 insertions(+), 264 deletions(-)

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



diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index ed1ae7d..7f766dd 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -242,34 +242,40 @@
 * Adds the CodeMirror button to WikiEditor
 */
function addCodeMirrorToWikiEditor() {
-   if ( $( '#wikiEditor-section-main' ).length > 0 ) {
-   $( '#wpTextbox1' ).wikiEditor(
-   'addToToolbar',
-   {
-   section: 'main',
-   groups: {
-   codemirror: {
-   tools: {
-   CodeMirror: {
-   label: 
mw.msg( 'codemirror-toggle-label' ),
-   type: 
'button',
-   offset: 
[ 2, 2 ],
-   action: 
{
-   
type: 'callback',
-   
execute: function ( context ) {
-   
// eslint-disable-next-line no-use-before-define
-   
switchCodeMirror( context );
-   
}
+   var $codeMirrorButton;
+
+   $( '#wpTextbox1' ).wikiEditor(
+   'addToToolbar',
+   {
+   section: 'main',
+   groups: {
+   codemirror: {
+   tools: {
+   CodeMirror: {
+   label: mw.msg( 
'codemirror-toggle-label' ),
+   type: 'button',
+   action: {
+   type: 
'callback',
+   
execute: function () {
+   
// eslint-disable-next-line no-use-before-define
+   
switchCodeMirror();
}
}
}
}
}
}
-   );
-   // eslint-disable-next-line no-use-before-define
-   updateToolbarButton( $( '#wpTextbox1' ).data( 
'wikiEditor-context' ) );
-   }
+   }
+   );
+
+   $codeMirrorButton = $( '#wpTextbox1' ).data( 
'wikiEditor-context' ).modules.toolbar.$toolbar.find( 'a.tool[rel=CodeMirror]' 
);
+   // FIXME in 
extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
+   $codeMirrorButton
+   .css( 'background-image', '' )
+   .attr( 'id', 'mw-editbutton-codemirror' );
+
+   // eslint-disable-next-line no-use-before-define
+   updateToolbarButton();
}
 
// define JQuery hook for searching and replacing text using JS if 
CodeMirror is enabled, see Bug: T108711
@@ -309,27 +315,17 @@
 
/**
 * Updates CodeMirror 

[MediaWiki-commits] [Gerrit] translatewiki[master]: Don't warn if "{{GENDER:$2|You}}" isn't kept in an Echo message

2017-05-20 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354728 )

Change subject: Don't warn if "{{GENDER:$2|You}}" isn't kept in an Echo message
..

Don't warn if "{{GENDER:$2|You}}" isn't kept in an Echo message

Requested by Base for Ukrainian.

Change-Id: Ie8dd96f5d0f6a205738547c8d5055cbe94586e5a
---
M groups/check-blacklist.php
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/28/354728/1

diff --git a/groups/check-blacklist.php b/groups/check-blacklist.php
index 0087859..0053edd 100644
--- a/groups/check-blacklist.php
+++ b/groups/check-blacklist.php
@@ -252,6 +252,13 @@
]
],
[
+   'group' => 'ext-echo-interface',
+   'check' => 'variable',
+   'message' => [
+   'notification-header-mention-failure-too-many', // 
GENDER parameter not needed e.g. in uk
+   ]
+   ],
+   [
'group' => 'ext-editsubpages',
'check' => 'links',
'message' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8dd96f5d0f6a205738547c8d5055cbe94586e5a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Reduce default max_retries from 25 to 15

2017-05-20 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354727 )

Change subject: Reduce default max_retries from 25 to 15
..

Reduce default max_retries from 25 to 15

25 retries (~43 minutes) is excessively long. 15 seems sufficiant.

Bug: T165898
Change-Id: Ie8bdfa098b913ca43105d24736defe0c7761c6d5
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/27/354727/1

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 9f732f2..78898cc 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -649,7 +649,7 @@
 step = -1
 
 # Maximum number of times to retry an API request before quitting.
-max_retries = 25
+max_retries = 15
 # Minimum time to wait before resubmitting a failed API request.
 retry_wait = 5
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Make PageImages default API license parameter configurable

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354705 )

Change subject: Make PageImages default API license parameter configurable
..


Make PageImages default API license parameter configurable

Bug: T156190
Change-Id: Id4b43f2597d5a063dca0d46f308b6283620e9974
---
M extension.json
M includes/ApiQueryPageImages.php
M tests/phpunit/ApiQueryPageImagesTest.php
3 files changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 87ddf34..c60bafc 100644
--- a/extension.json
+++ b/extension.json
@@ -88,6 +88,10 @@
"@doc": "Temporary feature flag - Whether page images 
should be restricted to those in section id 0.",
"@fixme": "Please remove a month after it has defaulted 
to true on the cluster (T152115)",
"value": true
+   },
+   "PageImagesAPIDefaultLicense": {
+   "@doc": "Get images with either a 'free' license or 
'any' (including free and non-free) license by default, via 'pilicense' option, 
in pageprops query api. The value of this setting should be either 'free' or 
'any'.",
+   "value": "free"
}
},
"manifest_version": 2
diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php
index aabad0f..a75ffe6 100644
--- a/includes/ApiQueryPageImages.php
+++ b/includes/ApiQueryPageImages.php
@@ -264,7 +264,7 @@
'license' => [
ApiBase::PARAM_TYPE => [ 
self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ],
ApiBase::PARAM_ISMULTI => false,
-   ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE,
+   ApiBase::PARAM_DFLT => $this->getConfig()->get( 
'PageImagesAPIDefaultLicense' ),
],
'continue' => [
ApiBase::PARAM_TYPE => 'integer',
diff --git a/tests/phpunit/ApiQueryPageImagesTest.php 
b/tests/phpunit/ApiQueryPageImagesTest.php
index ca58815..ebb9ec9 100644
--- a/tests/phpunit/ApiQueryPageImagesTest.php
+++ b/tests/phpunit/ApiQueryPageImagesTest.php
@@ -59,10 +59,18 @@
 class ApiQueryPageImagesTest extends PHPUnit_Framework_TestCase {
 
private function newInstance() {
+   $config = new \HashConfig( [
+   'PageImagesAPIDefaultLicense' => 'free'
+   ]);
+
$context = $this->getMockBuilder( 'IContextSource' )
->disableOriginalConstructor()
->getMock();
 
+   $context->expects( $this->any() )
+   ->method( 'getConfig' )
+   ->willReturn( $config );
+
$main = $this->getMockBuilder( 'ApiMain' )
->disableOriginalConstructor()
->getMock();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4b43f2597d5a063dca0d46f308b6283620e9974
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
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] mediawiki...SyntaxHighlight_GeSHi[master]: Remove geshi from composer and npm package manifests

2017-05-20 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354726 )

Change subject: Remove geshi from composer and npm package manifests
..

Remove geshi from composer and npm package manifests

Both of these seem to be private and are therefor easily renamed

Bug: T164939
Change-Id: I09be0ef0131d31182ed8bb6be221c76dba2c1a53
---
M composer.json
M package.json
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SyntaxHighlight_GeSHi 
refs/changes/26/354726/1

diff --git a/composer.json b/composer.json
index 30ac741..bc3fc91 100644
--- a/composer.json
+++ b/composer.json
@@ -1,5 +1,5 @@
 {
-   "name": "mediawiki/syntax-highlight_geshi",
+   "name": "mediawiki/syntax-highlight",
"description": "Syntax highlighting extension for MediaWiki",
"require": {
"symfony/process": "~3.2"
diff --git a/package.json b/package.json
index 443f5a2..07b0636 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,8 @@
 {
-  "name": "SyntaxHighlight_GeSHi",
+  "name": "SyntaxHighlight",
   "version": "0.0.0",
   "private": true,
-  "description": "Build tools for the SyntaxHighlight_GeSHi MediaWiki 
extension.",
+  "description": "Build tools for the SyntaxHighlight MediaWiki extension.",
   "scripts": {
 "test": "grunt test"
   },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09be0ef0131d31182ed8bb6be221c76dba2c1a53
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use file width/height instead of metadata for getContentHeaders

2017-05-20 Thread Gilles (Code Review)
Gilles has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354724 )

Change subject: Use file width/height instead of metadata for getContentHeaders
..

Use file width/height instead of metadata for getContentHeaders

This allows us to populate X-Content-Dimensions without touching the
existing metadata format. Which makes the migration of existing content a lot 
faster by
only having to run refreshFileHeaders.

Bug: T150741
Change-Id: I2c0f39b2b01f364c3fab997ccc2f874b7f101d8a
---
M includes/filerepo/file/File.php
M includes/filerepo/file/LocalFile.php
M includes/media/DjVu.php
M includes/media/Exif.php
M includes/media/ExifBitmap.php
M includes/media/FormatMetadata.php
M includes/media/GIFMetadataExtractor.php
M includes/media/MediaHandler.php
M includes/media/PNGMetadataExtractor.php
M includes/media/XCF.php
M maintenance/importImages.php
M tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
M tests/phpunit/includes/media/ExifTest.php
M tests/phpunit/includes/media/GIFMetadataExtractorTest.php
M tests/phpunit/includes/media/GIFTest.php
M tests/phpunit/includes/media/JpegTest.php
M tests/phpunit/includes/media/PNGTest.php
M tests/phpunit/includes/media/TiffTest.php
M tests/phpunit/includes/media/XCFTest.php
19 files changed, 36 insertions(+), 80 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/354724/1

diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 7116c22..cb5b9a4 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -2170,7 +2170,7 @@
$metadata = MediaWiki\quietCall( 
'unserialize', $metadata );
}
 
-   return $handler->getContentHeaders( $metadata );
+   return $handler->getContentHeaders( $metadata, 
$this->width, $this->height );
}
}
 
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 194c0ed..b6d9a78 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1202,7 +1202,7 @@
if ( $handler ) {
$metadata = MediaWiki\quietCall( 'unserialize', 
$props['metadata'] );
 
-   $options['headers'] = $handler->getContentHeaders( 
$metadata );
+   $options['headers'] = $handler->getContentHeaders( 
$metadata, $props['width'], $props['height'] );
} else {
$options['headers'] = [];
}
diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php
index 374e166..922502a 100644
--- a/includes/media/DjVu.php
+++ b/includes/media/DjVu.php
@@ -465,9 +465,12 @@
/**
* Get useful response headers for GET/HEAD requests for a file with the 
given metadata
* @param $metadata Array Contains this handler's unserialized 
getMetadata() for a file
-   * @return array
+   * @param $fallbackWidth int Width to fall back to if metadata doesn't 
have any
+   * @param $fallbackHeight int Height to fall back to if metadata doesn't 
have any
+   * @return Array
+   * @since 1.30
*/
-   public function getContentHeaders( $metadata ) {
+   public function getContentHeaders( $metadata, $fallbackWidth = null, 
$fallbackHeight = null ) {
if ( !is_array( $metadata ) || !isset( $metadata['xml'] ) ) {
return [];
}
diff --git a/includes/media/Exif.php b/includes/media/Exif.php
index 621a4aa..95fa859 100644
--- a/includes/media/Exif.php
+++ b/includes/media/Exif.php
@@ -117,11 +117,6 @@
 * @link http://exif.org/Exif2-2.PDF The Exif 2.2 specification
 */
$this->mExifTags = [
-   'COMPUTED' => [
-   'Width' => Exif::SHORT_OR_LONG, # Image width
-   'Height' => Exif::SHORT_OR_LONG, # Image height
-   ],
-
# TIFF Rev. 6.0 Attribute Information (p22)
'IFD0' => [
# Tags relating to image structure
diff --git a/includes/media/ExifBitmap.php b/includes/media/ExifBitmap.php
index cf4b12e..0e10abb 100644
--- a/includes/media/ExifBitmap.php
+++ b/includes/media/ExifBitmap.php
@@ -242,36 +242,4 @@
 
return 0;
}
-
-   /**
-   * Get useful response headers for GET/HEAD requests for a file with the 
given metadata
-   * @param $metadata Array Contains this handler's unserialized 
getMetadata() for a file
-   * @return Array
-   */
-   public function getContentHeaders( $metadata ) {
-   if ( !isset( $metadata['Width'] ) || !isset( 
$metadata['Height'] ) ) {
-   

[MediaWiki-commits] [Gerrit] operations...pybal[master]: Allow for withdrawals and NLRI to be sent in the same UPDATE

2017-05-20 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354723 )

Change subject: Allow for withdrawals and NLRI to be sent in the same UPDATE
..

Allow for withdrawals and NLRI to be sent in the same UPDATE

For inet-unicast UPDATEs, allow withdrawn routes and new NLRI
to be shared within the same packet.

Change-Id: I7d67f908f53f1c973e9a8751ded0bf9ca5702132
---
M pybal/bgp.py
1 file changed, 28 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/pybal 
refs/changes/23/354723/1

diff --git a/pybal/bgp.py b/pybal/bgp.py
index 6bd179e..de8c4d8 100644
--- a/pybal/bgp.py
+++ b/pybal/bgp.py
@@ -1520,6 +1520,15 @@
 self.attrCount += added
 return added
 
+def clearAttributes(self):
+"""
+Removes all previously added attributes from the packet.
+"""
+
+del self.msg[2][2:]
+self.msg[0:2] = 0, 0
+self._updateMsgLen()
+
 def addSomeNLRI(self, nlriSet):
 """
 Incrementally adds as many nlri to the UPDATE message as will
@@ -2500,16 +2509,32 @@
 withdrawalPrefixSet = set([w.prefix for w in withdrawals])
 adPrefixSet = set([ad.prefix for ad in advertisements])
 
+bgpupdate = BGPUpdateMessage()
 # Start with withdrawals, if there are any
 while len(withdrawals) > 0:
-bgpupdate = BGPUpdateMessage()
 prefixesAdded = 
bgpupdate.addSomeWithdrawals(withdrawalPrefixSet)
 if prefixesAdded == 0:
 raise ValueError("Could not add any withdrawals")
+if len(withdrawals) > 0:
+# We overflowed the packet
+self.estabProtocol.sendMessage(bgpupdate)
+bgpupdate = BGPUpdateMessage()
+
+# Attempt to add all attributes and (some) NLRI to the existing
+# packet, to optimize for the common case of small updates
+try:
+bgpupdate.addAttributes(attributes)
+except ValueError:
+# Alas, didn't fit. Just send out.
+self.estabProtocol.sendMessage(bgpupdate)
+else:
+prefixesAdded = bgpupdate.addSomeNLRI(adPrefixSet)
+if prefixesAdded == 0:
+# Nevermind
+bgpupdate.clearAttributes()
 self.estabProtocol.sendMessage(bgpupdate)
 
-# Start with a clean slate, RFC4760 forbids sending the same
-# prefix in withdrawals and any NLRI or MPReachNLRI/MPUnreachNLRI
+# Start with a clean slate
 while len(adPrefixSet) > 0:
 bgpupdate = BGPUpdateMessage()
 # For inet-unicast, we need to add the complete set of

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d67f908f53f1c973e9a8751ded0bf9ca5702132
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/pybal
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma 

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Disable the RevisionSlider for screenreaders

2017-05-20 Thread WMDE-Fisch (Code Review)
WMDE-Fisch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354722 )

Change subject: Disable the RevisionSlider for screenreaders
..

Disable the RevisionSlider for screenreaders

Until the sliding mechanism has full support to work with screen-
readers the tool will be disabled for them to avoid unnecessary
confusion.

Bug: T165489
Change-Id: Id0da2c891040ac7e6f1b6ce5ba5f65b727d3cb07
---
M src/RevisionSliderHooks.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/22/354722/1

diff --git a/src/RevisionSliderHooks.php b/src/RevisionSliderHooks.php
index 2cabf66..ab25070 100644
--- a/src/RevisionSliderHooks.php
+++ b/src/RevisionSliderHooks.php
@@ -93,7 +93,11 @@
 
$out->prependHTML(
Html::rawElement(
-   'div', [ 'class' => 'mw-revslider-container' ],
+   'div',
+   [
+   'class' => 'mw-revslider-container',
+   'aria-hidden' => 'true'
+   ],
$toggleButton .
Html::rawElement(
'div',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0da2c891040ac7e6f1b6ce5ba5f65b727d3cb07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Rebaser: Start on i18n

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354521 )

Change subject: Rebaser: Start on i18n
..


Rebaser: Start on i18n

Requires loading bits of the platform on the landing page.

Change-Id: I5f60726ef0467dac23c2b6d4d5b6bcd5a779417a
---
M i18n/en.json
M i18n/qqq.json
M rebaser/index.js
M rebaser/views/index.ejs
M src/ui/widgets/ve.ui.AuthorListWidget.js
5 files changed, 64 insertions(+), 38 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 80e3ea2..a5bf4bb 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -135,6 +135,9 @@
"visualeditor-mediasizewidget-sizeoptions-custom": "Custom",
"visualeditor-mediasizewidget-sizeoptions-default": "Default",
"visualeditor-mediasizewidget-sizeoptions-scale": "Scale",
+   "visualeditor-rebase-client-author-name": "Name",
+   "visualeditor-rebase-client-document-name": "Document name",
+   "visualeditor-rebase-client-document-create-edit": "Create/edit",
"visualeditor-shortcuts-clipboard": "Clipboard",
"visualeditor-shortcuts-dialog": "Dialog windows",
"visualeditor-shortcuts-formatting": "Paragraph formatting",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f477435..bb3a303 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -143,6 +143,9 @@
"visualeditor-mediasizewidget-sizeoptions-custom": "Label for the media 
size widget size select for custom size.\n{{Identical|Custom}}",
"visualeditor-mediasizewidget-sizeoptions-default": "Label for the 
media size widget size select for default size.\n{{Identical|Default}}",
"visualeditor-mediasizewidget-sizeoptions-scale": "Label for the media 
size widget size select for scaled size. The expected input is a percentage - 
see 
[[MediaWiki:Visualeditor-mediasizewidget-label-scale/en]].\n{{Identical|Scale}}",
+   "visualeditor-rebase-client-author-name": "Label for the input to set 
or change the user's account display name.",
+   "visualeditor-rebase-client-document-name": "Label for document name 
input",
+   "visualeditor-rebase-client-document-create-edit": "Label for button to 
create or edit a document by name",
"visualeditor-shortcuts-clipboard": "Heading for clipboard shortcuts",
"visualeditor-shortcuts-dialog": "Heading for dialog window control 
shortcuts",
"visualeditor-shortcuts-formatting": "Heading for paragraph formatting 
shortcuts",
diff --git a/rebaser/index.js b/rebaser/index.js
index 4864571..4313402 100644
--- a/rebaser/index.js
+++ b/rebaser/index.js
@@ -1,28 +1,29 @@
 $( function () {
-   var documentNameInput = new OO.ui.TextInputWidget( {
-   placeholder: 'Document name'
-   } ),
-   submitButton = new OO.ui.ButtonWidget( {
-   label: 'Create/edit'
-   } ),
-   documentNameField = new OO.ui.ActionFieldLayout( 
documentNameInput, submitButton, {
-   align: 'top'
-   } );
+   new ve.init.sa.Platform( ve.messagePaths ).initialize().done( function 
() {
+   var documentNameInput = new OO.ui.TextInputWidget( {
+   placeholder: OO.ui.msg( 
'visualeditor-rebase-client-document-name' )
+   } ),
+   submitButton = new OO.ui.ButtonWidget( {
+   label: OO.ui.msg( 
'visualeditor-rebase-client-document-create-edit' )
+   } ),
+   documentNameField = new OO.ui.ActionFieldLayout( 
documentNameInput, submitButton, {
+   align: 'top'
+   } );
 
-   function onSubmit() {
-   var docName = documentNameInput.getValue().replace( / /g, '_' );
-   if ( docName ) {
-   window.location.href = '/doc/edit/' + 
encodeURIComponent( docName );
-   } else {
-   documentNameInput.focus();
+   function onSubmit() {
+   var docName = documentNameInput.getValue().replace( / 
/g, '_' );
+   if ( docName ) {
+   window.location.href = '/doc/edit/' + 
encodeURIComponent( docName );
+   } else {
+   documentNameInput.focus();
+   }
}
-   }
 
-   submitButton.on( 'click', onSubmit );
-   documentNameInput.on( 'enter', onSubmit );
+   submitButton.on( 'click', onSubmit );
+   documentNameInput.on( 'enter', onSubmit );
 
-   $( '.ve-demo-index' ).append( documentNameField.$element );
+   $( '.ve-demo-index' ).append( documentNameField.$element );
 
-   

[MediaWiki-commits] [Gerrit] mediawiki...ArticlePlaceholder[master]: [WIP] redesign the ArticlePlaceholder pages

2017-05-20 Thread Lucie Kaffee (Code Review)
Lucie Kaffee has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354721 )

Change subject: [WIP] redesign the ArticlePlaceholder pages
..

[WIP] redesign the ArticlePlaceholder pages

Change-Id: I092e1842605299fb257350633471148378f17eda
---
M includes/Lua/mw/ext/articlePlaceholder/imageStatementRenderer.lua
M includes/Lua/mw/ext/articlePlaceholder/statementListRenderer.lua
M includes/Lua/mw/ext/articlePlaceholder/topImageRenderer.lua
M 
modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplay.css
4 files changed, 28 insertions(+), 17 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder 
refs/changes/21/354721/1

diff --git a/includes/Lua/mw/ext/articlePlaceholder/imageStatementRenderer.lua 
b/includes/Lua/mw/ext/articlePlaceholder/imageStatementRenderer.lua
index af0de3d..0ac7f70 100644
--- a/includes/Lua/mw/ext/articlePlaceholder/imageStatementRenderer.lua
+++ b/includes/Lua/mw/ext/articlePlaceholder/imageStatementRenderer.lua
@@ -18,27 +18,14 @@
   local qualifier = ''
   local image = ''
 
-  local referenceRenderer = self._entityrenderer:getReferenceRenderer()
-  local qualifierRenderer = self._entityrenderer:getQualifierRenderer()
-
   if statement ~= nil then
 for key, value in pairs( statement ) do
   if key == 'mainsnak' then
 image = mw.wikibase.renderSnak( value )
-  elseif key == 'references' then
-reference = referenceRenderer( value )
-  elseif key == 'qualifiers' then
-qualifier = qualifierRenderer( value )
   end
 end
   end
-  local result = '[[File:' .. image .. '|thumb|' .. orientationImage
-  if inlineQualifiers == true then
-result = result .. '|300px|' .. reference .. ' ' .. qualifier .. ']]'
-  else
-result = result .. '|340x220px|' .. reference .. ' ' .. ']]' .. qualifier
-  end
-  return result
+  return '[[File:' .. image .. '|300px]]'
 end
 
 -- Get a function which is bound to the given entityrenderer.
diff --git a/includes/Lua/mw/ext/articlePlaceholder/statementListRenderer.lua 
b/includes/Lua/mw/ext/articlePlaceholder/statementListRenderer.lua
index 8a4abdb..e75ab71 100644
--- a/includes/Lua/mw/ext/articlePlaceholder/statementListRenderer.lua
+++ b/includes/Lua/mw/ext/articlePlaceholder/statementListRenderer.lua
@@ -40,7 +40,6 @@
 if label == 'coordinates' then
   label = label:gsub("^%l", string.upper)
 end
-
 result = result .. '' .. label .. ''
 result = result .. bestStatementRenderer( entity, propertyIDs[i] )
 result = result .. ''
diff --git a/includes/Lua/mw/ext/articlePlaceholder/topImageRenderer.lua 
b/includes/Lua/mw/ext/articlePlaceholder/topImageRenderer.lua
index 7fbefc5..078949d 100644
--- a/includes/Lua/mw/ext/articlePlaceholder/topImageRenderer.lua
+++ b/includes/Lua/mw/ext/articlePlaceholder/topImageRenderer.lua
@@ -22,7 +22,7 @@
 local imageStatementRenderer = 
self._entityrenderer:getImageStatementRenderer()
 
 renderedImage = imageStatementRenderer( imageStatement, orientationImage, 
true )
-renderedImage = '' .. 
renderedImage .. ''
+renderedImage = '' .. 
renderedImage:gsub('150', '300') .. ''
   end
 
   return renderedImage
diff --git 
a/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplay.css
 
b/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplay.css
index 211188d..83ade79 100644
--- 
a/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplay.css
+++ 
b/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplay.css
@@ -3,16 +3,35 @@
border: 1px solid #aaa;
vertical-align: top;
padding: 10px;
-   margin: 20px;
+   margin: 10px;
width: 350px;
max-height: 300px;
overflow: auto;
 }
 
+.articleplaceholer-description {
+   display: inline-block;
+   border: 1px solid #aaa;
+   vertical-align: top;
+   padding: 10px;
+   margin: 10px;
+   margin-bottom: 10px;
+   width: 740px;
+   max-height: 300px;
+   overflow: auto;
+   font-family: 'Linux Libertine','Georgia','Times',serif;
+   font-size: 1.2em;
+
+}
+
 /* Needs a selector that's stronger than ".mw-body h2" */
 .mw-body .articleplaceholder-statementgroup h2,
 .mw-body .articleplaceholder-identifierlist h2 {
+   border-bottom: none;
+   font-family: sans-serif; 
+   font-size: 0.9em;
margin-top: 0;
+   color: rgb(118, 123, 129);
 }
 
 .mw-articleplaceholder-createarticle-buttons {
@@ -27,6 +46,10 @@
 
 .articleplaceholder-topimage {
float: right;
+   margin-top: 10px;
+   display: inline-block;
+   border: 1px solid #aaa;
+   padding: 5px;
 }
 
 .articleplaceholder-identifierlist {
@@ -48,6 +71,8 @@
 
 .articleplaceholder-statement {
margin-top: 0;
+   

[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Describe group changes for references and references lists

2017-05-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343134 )

Change subject: Describe group changes for references and references lists
..


Describe group changes for references and references lists

Bug: T160589
Change-Id: Ifccafdf08704f67027dae2703ff2ded809fb6ab7
---
M includes/CiteHooks.php
M modules/ve-cite/i18n/en.json
M modules/ve-cite/i18n/qqq.json
M modules/ve-cite/ve.dm.MWReferenceNode.js
M modules/ve-cite/ve.dm.MWReferencesListNode.js
5 files changed, 46 insertions(+), 6 deletions(-)

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



diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php
index b011178..e3ee7e6 100644
--- a/includes/CiteHooks.php
+++ b/includes/CiteHooks.php
@@ -151,6 +151,12 @@
"ext.visualEditor.mediawiki"
],
"messages" => [
+   "cite-ve-changedesc-ref-group-both",
+   "cite-ve-changedesc-ref-group-from",
+   "cite-ve-changedesc-ref-group-to",
+   "cite-ve-changedesc-reflist-group-both",
+   "cite-ve-changedesc-reflist-group-from",
+   "cite-ve-changedesc-reflist-group-to",
"cite-ve-dialog-reference-editing-reused",
"cite-ve-dialog-reference-options-group-label",

"cite-ve-dialog-reference-options-group-placeholder",
diff --git a/modules/ve-cite/i18n/en.json b/modules/ve-cite/i18n/en.json
index f3a57bd..6e6f7ae 100644
--- a/modules/ve-cite/i18n/en.json
+++ b/modules/ve-cite/i18n/en.json
@@ -22,6 +22,12 @@
"visualeditor-cite-tool-name-news": "News",
"visualeditor-cite-tool-name-web": "Website",
"cite-tool-definition.json": "null",
+   "cite-ve-changedesc-ref-group-both": "Reference group changed from 
\"$1\" to \"$2\"",
+   "cite-ve-changedesc-ref-group-from": "Reference group changed from 
\"$1\" to the general group",
+   "cite-ve-changedesc-ref-group-to": "Reference group changed from the 
general group to \"$1\"",
+   "cite-ve-changedesc-reflist-group-both": "References list group changed 
from \"$1\" to \"$2\"",
+   "cite-ve-changedesc-reflist-group-from": "References list group changed 
from \"$1\" to the general group",
+   "cite-ve-changedesc-reflist-group-to": "References list group changed 
from the general group to \"$1\"",
"cite-ve-dialog-reference-editing-reused": "This reference is used $1 
{{PLURAL:$1|times}} on this page.",
"cite-ve-dialog-reference-options-group-label": "Use this group",
"cite-ve-dialog-reference-options-group-placeholder": "General 
references",
@@ -46,4 +52,4 @@
"cite-ve-referenceslist-missingref": "This reference is defined in a 
template or other generated block, and for now can only be edited in source 
mode.",
"cite-ve-toolbar-group-label": "Cite",
"cite-ve-othergroup-item": "$1 reference"
-}
\ No newline at end of file
+}
diff --git a/modules/ve-cite/i18n/qqq.json b/modules/ve-cite/i18n/qqq.json
index 59efd59..ae99ba8 100644
--- a/modules/ve-cite/i18n/qqq.json
+++ b/modules/ve-cite/i18n/qqq.json
@@ -33,6 +33,12 @@
"visualeditor-cite-tool-name-news": "Title of tool that inserts a 
citation for a news.\n{{Identical|News}}",
"visualeditor-cite-tool-name-web": "Title of tool that inserts a 
citation for a website.\n{{Identical|Website}}",
"cite-tool-definition.json": "{{ignored}}\nJSON list of objects 
detailing each citation with name (key referring to a 
visualeditor-cite-tool-name-x message), icon ('ref-cite-book', 
'ref-cite-journal', 'ref-cite-news', 'ref-cite-web'), and template 
name\n{{Identical|Null}}",
+   "cite-ve-changedesc-ref-group-both": "Description of a reference 
changing group\n\nParameters:\n* $1 – the name of the group it was before\n* $2 
– the name of the group it is now",
+   "cite-ve-changedesc-ref-group-from": "Description of a reference 
changing group to the general group\n\nParameters:\n* $1 – the name of the 
group it was before",
+   "cite-ve-changedesc-ref-group-to": "Description of a reference changing 
group from the general group\n\nParameters:\n* $1 – the name of the group it is 
now",
+   "cite-ve-changedesc-reflist-group-both": "Description of a references 
list changing group\n\nParameters:\n* $1 – the name of the group it was 
before\n* $2 – the name of the group it is now",
+   "cite-ve-changedesc-reflist-group-from": "Description of a references 
list changing group to the general group\n\nParameters:\n* $1 – the name of the 
group it was before",
+   "cite-ve-changedesc-reflist-group-to": "Description of a references 
list changing group from the general group\n\nParameters:\n* $1 – 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Request information from site via API

2017-05-20 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354720 )

Change subject: Request information from site via API
..

Request information from site via API

Instead of requiring people to insert information about their site,
with this change, the user can input the path to the api.php (without
the api.php) and save to request the information of the wiki.

Change-Id: Ie96c40413c21931a773b4082ca0934dbc0c925ca
---
M 
app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
A app/src/main/java/org/wikipedia/settings/SiteInfo.java
M app/src/main/res/values/dev_settings_strings.xml
M app/src/main/res/xml/developer_preferences.xml
4 files changed, 159 insertions(+), 1 deletion(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
 
b/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
index 6d5329a3..78a034a 100644
--- 
a/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
+++ 
b/app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
@@ -1,7 +1,13 @@
 package org.wikipedia.settings;
 
+import android.app.Dialog;
+import android.app.ProgressDialog;
 import android.content.Context;
+import android.content.DialogInterface;
 import android.support.annotation.NonNull;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.preference.EditTextPreference;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceCategory;
 import android.support.v7.preference.PreferenceFragmentCompat;
@@ -10,10 +16,26 @@
 import org.wikipedia.R;
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.crash.RemoteLogException;
+import org.wikipedia.dataclient.WikiSite;
+import org.wikipedia.dataclient.mwapi.MwException;
+import org.wikipedia.dataclient.mwapi.MwQueryResponse;
+import org.wikipedia.dataclient.retrofit.RetrofitException;
+import org.wikipedia.dataclient.retrofit.RetrofitFactory;
+import org.wikipedia.login.LoginClient;
 import org.wikipedia.useroption.ui.UserOptionRowActivity;
 import org.wikipedia.util.log.L;
 
+import java.io.IOException;
 import java.util.List;
+import java.util.Map;
+
+import retrofit2.Call;
+import retrofit2.Response;
+import retrofit2.Retrofit;
+import retrofit2.http.Field;
+import retrofit2.http.FormUrlEncoded;
+import retrofit2.http.GET;
+import retrofit2.http.POST;
 
 /*package*/ class DeveloperSettingsPreferenceLoader extends 
BasePreferenceLoader {
 @NonNull private final Context context;
@@ -50,6 +72,74 @@
 setUpCrashButton(findPreference(getCrashButtonKey()));
 setUpUserOptionButton(findPreference(getUserOptionButtonKey()));
 
setUpRemoteLogButton(findPreference(R.string.preference_key_remote_log));
+setUpMediaWikiBaseUri((EditTextPreference) 
findPreference(R.string.preference_key_mediawiki_base_uri));
+}
+
+private void setUpMediaWikiBaseUri(final EditTextPreference pref) {
+pref.setOnPreferenceChangeListener(new 
Preference.OnPreferenceChangeListener() {
+private static final String API_PHP_FILENAME = "api.php";
+
+@Override
+public boolean onPreferenceChange(Preference preference, final 
Object newValue) {
+String apiUrl = (String) newValue;
+if (apiUrl.endsWith(API_PHP_FILENAME)) {
+apiUrl = apiUrl.replace(API_PHP_FILENAME, "");
+}
+final ProgressDialog dialog = ProgressDialog.show(
+getActivity(),
+"",
+
getActivity().getString(R.string.dialog_loading_siteinfo_wait),
+true
+);
+
+Retrofit retrofitClient = RetrofitFactory.newInstance(apiUrl, 
new WikiSite(apiUrl));
+Service request = retrofitClient.create(Service.class);
+Call call = 
request.requestSiteinfo();
+call.enqueue(new 
retrofit2.Callback() {
+@Override public void 
onResponse(Call call,
+ 
Response response) {
+if (response.isSuccessful()) {
+if (response.body().query().server() != null) {
+pref.setText(response.body().query().server());
+}
+} else {
+showAlert(getActivity().getString(
+R.string.dialog_loading_siteinfo_failed,
+Integer.toString(response.code())
+  

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Page might have been moved without redirect or deleted. Test...

2017-05-20 Thread Multichill (Code Review)
Multichill has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354719 )

Change subject: Page might have been moved without redirect or deleted. Test if 
the page actually exists.
..

Page might have been moved without redirect or deleted.
Test if the page actually exists.

Bug: T86491
Change-Id: Id5b6b0799bcac2aa69b26e9e8a7dd86e282f95c9
---
M scripts/newitem.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/19/354719/1

diff --git a/scripts/newitem.py b/scripts/newitem.py
index 5ee4901..ffdb423 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -94,6 +94,9 @@
 
 self.current_page = page
 
+if not page.exists():
+pywikibot.output(u'%s does not exist. Skipping.' % page)
+return
 if page.isRedirectPage():
 pywikibot.output(u'%s is a redirect page. Skipping.' % page)
 return

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: rebaser: Focus surface on load

2017-05-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354718 )

Change subject: rebaser: Focus surface on load
..

rebaser: Focus surface on load

Change-Id: I5c7a921de014e5ad70063c6b46db6c23067af435
---
M rebaser/demo.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/18/354718/1

diff --git a/rebaser/demo.js b/rebaser/demo.js
index 83fbf4a..b5553f5 100644
--- a/rebaser/demo.js
+++ b/rebaser/demo.js
@@ -16,6 +16,7 @@
target.addSurface( ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( '' ) ) );
synchronizer = new ve.dm.SurfaceSynchronizer( target.surface.model, 
ve.docName );
target.surface.view.setSynchronizer( synchronizer );
+   target.surface.view.focus();
 
authorList = new ve.ui.AuthorListWidget( synchronizer );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c7a921de014e5ad70063c6b46db6c23067af435
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


  1   2   3   >