[MediaWiki-commits] [Gerrit] pywikibot/core[master]: isbn.py: convertIsbn10toIsbn13 should not fail for ISBN13

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

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

Change subject: isbn.py: convertIsbn10toIsbn13 should not fail for ISBN13
..

isbn.py: convertIsbn10toIsbn13 should not fail for ISBN13

The patch was originally introduced in a8008a210585759ac46f962eb2d6bd1ebad0460c
by Aadith1996, but reverted to fix minor issues.

Bug: T138911
Change-Id: I47118f6aa18cb659d1f9f96cdab93615e24af07b
---
M scripts/isbn.py
M tests/isbn_tests.py
2 files changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/scripts/isbn.py b/scripts/isbn.py
index f1e1a4b..cfd1fbb 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -1466,7 +1466,11 @@
 except InvalidIsbnException:
 # don't change
 return isbn
-i13 = getIsbn(isbn).toISBN13()
+i1x = getIsbn(isbn)
+if not isinstance(i1x, ISBN13):
+i13 = i1x.toISBN13()
+else:
+i13 = i1x
 return i13.code
 
 
diff --git a/tests/isbn_tests.py b/tests/isbn_tests.py
index 701c50d..da97687 100644
--- a/tests/isbn_tests.py
+++ b/tests/isbn_tests.py
@@ -138,6 +138,11 @@
  'ISBN 978-0-9752298-0-4')
 self.assertEqual(convertIsbn10toIsbn13('ISBN 0-9752298-0-1'),
  'ISBN 0-9752298-0-1')  # Invalid ISBN - no changes
+# Should not fail for ISBN13
+self.assertEqual(
+convertIsbn10toIsbn13('ISBN 978-0-7869-3669-4'),
+'ISBN 978-0-7869-3669-4'
+)
 
 # Errors
 isbn = ISBN10('9492098059')

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: "Image size limit" text should always read left-to-right

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

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

Change subject: "Image size limit" text should always read left-to-right
..

"Image size limit" text should always read left-to-right

Bug: T144386
Change-Id: I10ab5ed71c114bbfefcc841d8a3d4b280bf1acf2
---
M includes/Preferences.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/323675/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index d86b19a..9a46980 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -633,6 +633,7 @@
'options' => self::getImageSizes( $context ),
'label-message' => 'imagemaxsize',
'section' => 'rendering/files',
+   'direction' => 'ltr',
];
$defaultPreferences['thumbsize'] = [
'type' => 'select',
@@ -1212,7 +1213,8 @@
$pixels = $context->msg( 'unit-pixel' )->text();
 
foreach ( $context->getConfig()->get( 'ImageLimits' ) as $index 
=> $limits ) {
-   $display = "{$limits[0]}×{$limits[1]}" . $pixels;
+   // Note: there is a ‎ before the × character, see 
T144386
+   $display = "{$limits[0]}‎×{$limits[1]}" . $pixels;
$ret[$display] = $index;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Failsafe for if thumbnail fails to load for some reason.

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

Change subject: Failsafe for if thumbnail fails to load for some reason.
..


Failsafe for if thumbnail fails to load for some reason.

This is a result of an issue we are having on our Labs staging wiki.

Change-Id: Ia3413505a107a14f95c3552725e4d6928022a8dd
---
M modules/ext.CollaborationKit.hubimage.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ext.CollaborationKit.hubimage.js 
b/modules/ext.CollaborationKit.hubimage.js
index 19249f2..a0b627d 100644
--- a/modules/ext.CollaborationKit.hubimage.js
+++ b/modules/ext.CollaborationKit.hubimage.js
@@ -99,6 +99,8 @@
$( 'img.hubimagePreview' )
.attr( 'src', data.query.pages[ 
-1 ].imageinfo[ 0 ].thumburl )
.css( 'margin-bottom', '10px' )
+   .css( 'width', '200px' )
+   .css( 'height', 'auto' )
.css( 'display', 'block' );
}
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3413505a107a14f95c3552725e4d6928022a8dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
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] mediawiki...CollaborationKit[master]: Failsafe for if thumbnail fails to load for some reason.

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

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

Change subject: Failsafe for if thumbnail fails to load for some reason.
..

Failsafe for if thumbnail fails to load for some reason.

This is a result of an issue we are having on our Labs staging wiki.

Change-Id: Ia3413505a107a14f95c3552725e4d6928022a8dd
---
M modules/ext.CollaborationKit.hubimage.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ext.CollaborationKit.hubimage.js 
b/modules/ext.CollaborationKit.hubimage.js
index 19249f2..a0b627d 100644
--- a/modules/ext.CollaborationKit.hubimage.js
+++ b/modules/ext.CollaborationKit.hubimage.js
@@ -99,6 +99,8 @@
$( 'img.hubimagePreview' )
.attr( 'src', data.query.pages[ 
-1 ].imageinfo[ 0 ].thumburl )
.css( 'margin-bottom', '10px' )
+   .css( 'width', '200px' )
+   .css( 'height', 'auto' )
.css( 'display', 'block' );
}
);

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Raise error when replace is done synchronously

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

Change subject: Raise error when replace is done synchronously
..


Raise error when replace is done synchronously

Bug: T98707
Change-Id: Iba614480373477af41ab245d6383918f59b9d287
---
M scripts/replace.py
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/scripts/replace.py b/scripts/replace.py
index ff9b06f..1abd206 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -672,6 +672,16 @@
 else:  # unsuccessful pages
 self._pending_processed_titles.put((page.title(asLink=True), 
False))
 
+def _replace_async_callback(self, page, err):
+"""Callback for asynchronous page edit."""
+self._count_changes(page, err)
+
+def _replace_sync_callback(self, page, err):
+"""Callback for synchronous page edit."""
+self._count_changes(page, err)
+if isinstance(err, Exception):
+raise err
+
 def generate_summary(self, applied_replacements):
 """Generate a summary message for the replacements."""
 # all replacements which are merged into the default message
@@ -781,7 +791,7 @@
 if choice == 'y':
 page.text = new_text
 page.save(summary=self.generate_summary(applied), 
async=True,
-  callback=self._count_changes, quiet=True)
+  callback=self._replace_async_callback, 
quiet=True)
 while not self._pending_processed_titles.empty():
 proc_title, res = self._pending_processed_titles.get()
 pywikibot.output('Page %s%s saved'
@@ -792,7 +802,7 @@
 try:
 page.text = new_text
 page.save(summary=self.generate_summary(applied),
-  callback=self._count_changes, quiet=True)
+  callback=self._replace_sync_callback, quiet=True)
 except pywikibot.EditConflict:
 pywikibot.output(u'Skipping %s because of edit conflict'
  % (page.title(),))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba614480373477af41ab245d6383918f59b9d287
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 
Gerrit-Reviewer: Alex S.H. Lin 
Gerrit-Reviewer: Andre Engels 
Gerrit-Reviewer: Bináris 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: DrTrigon 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Malafaya 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Multichill 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: Sn1per 
Gerrit-Reviewer: Strainu 
Gerrit-Reviewer: Whym 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: saper 

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


[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Remove portal symlink

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

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

Change subject: Remove portal symlink
..

Remove portal symlink

Bug: T151685
Change-Id: I19e09b11ad4ce28e7c520976de2948f203e7a653
---
D prod/wikipedia.org/portal
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/73/323673/1

diff --git a/prod/wikipedia.org/portal b/prod/wikipedia.org/portal
deleted file mode 12
index a96aa0e..000
--- a/prod/wikipedia.org/portal
+++ /dev/null
@@ -1 +0,0 @@
-..
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19e09b11ad4ce28e7c520976de2948f203e7a653
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


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

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

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


Purges cache upon adding a new feature to a hub.

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

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

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

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



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

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12bd045104cd61e1cad4b9725d58736a80fdd3f1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
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] mediawiki...CollaborationKit[master]: Adding hub image selector and embedding icon and color selec...

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

Change subject: Adding hub image selector and embedding icon and color 
selectors in proper places.
..


Adding hub image selector and embedding icon and color selectors in proper 
places.

Adds VisualEditor as a dependency.

Change-Id: I1c2a2f028f647390ec8cd98741c9b2dcf5bf7e31
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CollaborationHubContentEditor.php
M includes/SpecialCreateCollaborationHub.php
M modules/ext.CollaborationKit.colour.js
A modules/ext.CollaborationKit.hubimage.js
M modules/ext.CollaborationKit.icon.js
8 files changed, 154 insertions(+), 16 deletions(-)

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



diff --git a/extension.json b/extension.json
index c120287..ea49f1f 100644
--- a/extension.json
+++ b/extension.json
@@ -111,6 +111,23 @@
"cancel"
]
},
+   "ext.CollaborationKit.hubimage": {
+   "scripts": "ext.CollaborationKit.hubimage.js",
+   "dependencies": [
+   "oojs-ui",
+   "oojs-ui.styles.icons-movement",
+   "mediawiki.widgets",
+   "mediawiki.widgets.UserInputWidget",
+   "ext.visualEditor.mwimage",
+   "mediawiki.api"
+   ],
+   "messages": [
+   "collaborationkit-hubimage-browser",
+   "collaborationkit-hubimage-select",
+   "collaborationkit-hubimage-launchbutton",
+   "cancel"
+   ]
+   },
"ext.CollaborationKit.colour": {
"scripts": "ext.CollaborationKit.colour.js",
"dependencies": [
diff --git a/i18n/en.json b/i18n/en.json
index 7bdf6e6..311394b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -92,6 +92,9 @@
"collaborationkit-colour-launchbutton": "Browse colors",
"collaborationkit-colour-browser": "Color browser",
"collaborationkit-colour-select": "Select",
+   "collaborationkit-hubimage-launchbutton": "Browse images",
+   "collaborationkit-hubimage-browser": "Media browser",
+   "collaborationkit-hubimage-select": "Select",
"collaborationkit-subpage-toc-label": "Part of a project:",
"collaborationkit-red1": "Dark red",
"collaborationkit-red2": "Red",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 51ea868..4a9d86c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -92,6 +92,9 @@
"collaborationkit-colour-launchbutton": "Button label for button that 
launches the hub colour browser",
"collaborationkit-colour-browser": "Header label for the hub colour 
browser",
"collaborationkit-colour-select": "Button for selecting a colour in the 
hub colour browser",
+   "collaborationkit-hubimage-launchbutton": "Button label for button that 
launches the hub image browser",
+   "collaborationkit-hubimage-browser": "Header label for the hub image 
browser",
+   "collaborationkit-hubimage-select": "Button for selecting an image in 
the hub image browser",
"collaborationkit-subpage-toc-label": "Label for the toc on a 
Collaboration Hub subpage",
"collaborationkit-red1": "Color label",
"collaborationkit-red2": "Color label",
diff --git a/includes/CollaborationHubContentEditor.php 
b/includes/CollaborationHubContentEditor.php
index 8094556..66c7df9 100644
--- a/includes/CollaborationHubContentEditor.php
+++ b/includes/CollaborationHubContentEditor.php
@@ -9,6 +9,13 @@
// Make human readable the default format for editing, but still
// save as json. Can be overriden by url 
?format=application/json param.
$this->contentFormat = 
CollaborationHubContentHandler::FORMAT_WIKI;
+
+   // Nice JavaScript buttons
+   $out = $this->getContext()->getOutput();
+   $out->addModules( 'ext.CollaborationKit.colour' );
+   $out->addModules( 'ext.CollaborationKit.hubimage' );
+   $out->addModuleStyles( 
'ext.CollaborationKit.colourbrowser.styles' );
+   $out->addJsConfigVars( 'wgCollaborationKitColourList', 
CollaborationHubContent::getThemeColours() );
}
 
/**
diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index 4ea8cca..5c5160d 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -19,8 +19,10 @@
public function execute( $par ) {
$out = $this->getContext()->getOutput();
$out->addModules( 'ext.CollaborationKit.colour'

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Removing edit section links and re-implementing some as OOjs...

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

Change subject: Removing edit section links and re-implementing some as OOjs UI 
frameless buttons
..


Removing edit section links and re-implementing some as OOjs UI frameless 
buttons

The problem with the stock edit section links is that where VisualEditor is 
installed, the message, regardless of its content, is replaced with 'edit 
source'. Rather than fix this, we sidestep it by just using OOjs UI frameless 
buttons. However, due to other design issues, I have not re-implemented all the 
buttons; just the "view" button for each feature and an "edit" button by 
announcements.

Bug: T148877
Change-Id: I2d700d1a423892a9643cbc909767e8d610cf7979
---
M i18n/en.json
M includes/SpecialCreateCollaborationHub.php
M includes/content/CollaborationHubContent.php
M modules/ext.CollaborationKit.hub.styles.less
4 files changed, 29 insertions(+), 70 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 62f7fb9..7bdf6e6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -78,7 +78,7 @@
"collaborationkit-hub-missingpage-create": "Create feature",
"collaborationkit-hub-pagetitle-members": "Members",
"collaborationkit-hub-pagetitle-announcements": "Announcements",
-   "collaborationkit-hub-subpage-view": "View",
+   "collaborationkit-hub-subpage-view": "View page",
"collaborationkit-hub-subpage-remove": "Remove feature",
"collaborationkit-hub-edit-apierror": "API edit error: $1",
"collaborationkit-hub-edit-tojsonerror": "Error converting to JSON",
diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index 0551cdd..4ea8cca 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -123,7 +123,7 @@
!$title->userCan( 'create' ) ||
!$title->userCan( 'editcontentmodel' )
) {
-   return Status::newFatal( 
'collaborationhkit-createhub-nopermission' );
+   return Status::newFatal( 
'collaborationkit-createhub-nopermission' );
}
 
/* Comment this out until it's actually implemented (T135408)
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index a8408a0..a5fc1a8 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -284,6 +284,7 @@
 
// Add some style stuff
$output->addModuleStyles( 
'ext.CollaborationKit.hub.styles' );
+   $output->addModuleStyles( 
'oojs-ui.styles.icons-editing-core' );
$output->addModules( 'ext.CollaborationKit.icons' );
$output->addModules( 'ext.CollaborationKit.blots' );
$output->addModules( 'ext.CollaborationKit.list.styles' 
);
@@ -396,18 +397,20 @@
$announcementsWikiPage = WikiPage::factory( 
$announcementsTitle );
$announcementsText = 
$announcementsWikiPage->getContent()->getParserOutput( $announcementsTitle 
)->getText();
 
-   $announcementsEditLink = Html::rawElement(
-   'a',
-   [ 'href' => $announcementsTitle->getEditURL() ],
-   wfMessage( 'edit' )
+   $announcementsEditButton = $this->makeEditSectionLink(
+   $announcementsTitle->getEditURL(),
+   wfMessage( 'edit' 
)->inContentLanguage()->text(),
+   'edit'
);
+   $announcementsEditButton->setAttributes( [ 'style' => 
'display:block;' ] );
 
$announcementsHeader = Html::rawElement(
'h3',
[],
-   $announcementsSubpageName . 
$this->makeEditSectionLink( $announcementsEditLink )
+   $announcementsSubpageName
);
-   return $announcementsHeader . $announcementsText;
+
+   return $announcementsHeader . $announcementsEditButton 
. $announcementsText;
}
}
 
@@ -586,48 +589,14 @@
$sectionLinks = [];
$sectionLinksText = '';
if ( isset( $spRev ) ) {
-   $sectionLinks[ 'viewLink' ] = $linkRenderer->makeLink(
-   $spTitle,
-   wfMessage( 'collaborationkit-hub-subpage-view' 
)->inContentLanguage()->text()
-   );
-   }
-   if ( $spTitle->

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Update firebase/php-jwt from v3.0.0 to v4.0.0

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

Change subject: Update firebase/php-jwt from v3.0.0 to v4.0.0
..


Update firebase/php-jwt from v3.0.0 to v4.0.0

https://github.com/firebase/php-jwt/compare/v3.0.0...v4.0.0

Change-Id: I35788b64c0b4a80af088700367732abc5c2cbdb0
Depends-On: I39d1045720bb59c9099c3342a65f2eef3ec6d87a
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 84c363c..8f16d59 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-2.0+",
"prefer-stable": true,
"require": {
-   "firebase/php-jwt": "3.0.0",
+   "firebase/php-jwt": "4.0.0",
"php": ">=5.3.3"
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35788b64c0b4a80af088700367732abc5c2cbdb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgUserEmailUseReplyTo = true; on group0 wikis

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

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

Change subject: Set $wgUserEmailUseReplyTo = true; on group0 wikis
..

Set $wgUserEmailUseReplyTo = true; on group0 wikis

Due to popular mail hosts making their DMARC policies more strict,
trying to send email from the user's own email address often fails.

Instead, just send the email from w...@wikimedia.org, and have the
user's email be in the reply-to header.

This is just on group0 wikis for now, once it has been tested for a
while (maybe a week), we can roll it out everywhere.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 523dde3..4bceae8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11814,6 +11814,7 @@
 ],
 
 'wgUserEmailUseReplyTo' => [
+   'group0' => true, // T66795
'default' => false, // T14655
 ],
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Babel[master]: Fix 1.27 compatibility

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

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

Change subject: Fix 1.27 compatibility
..

Fix 1.27 compatibility

Just use wfGetLB(), which is deprecated, but works fine in newer
versions of MediaWiki.

Bug: T151400
Change-Id: Ia6daae951afca07355ce95a90e0011ee8ac98122
---
M includes/Database.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/includes/Database.php b/includes/Database.php
index 0f8dca7..847bc39 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -21,7 +21,6 @@
 namespace MediaWiki\Babel;
 
 use LoadBalancer;
-use MediaWiki\MediaWikiServices;
 
 class Database {
 
@@ -31,8 +30,7 @@
private $loadBalancer;
 
public function __construct() {
-   $this->loadBalancer = MediaWikiServices::getInstance()
-   ->getDBLoadBalancer();
+   $this->loadBalancer = wfGetLB();
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Standard placeholder colours for CapsuleMul...

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

Change subject: MediaWiki theme: Standard placeholder colours for 
CapsuleMultiselectWidget too
..


MediaWiki theme: Standard placeholder colours for CapsuleMultiselectWidget too

Follow-up to caa934cb.

Change-Id: I560941115ac7cc8efc74367a1f4775373210bdf6
---
M src/themes/mediawiki/widgets.less
1 file changed, 44 insertions(+), 36 deletions(-)

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



diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index fa006bf..69dc4ef 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -761,29 +761,7 @@
}
}
 
-   // Normalize placeholder styling, see T139034
-   // Firefox 4-18
-   :-moz-placeholder { // stylelint-disable-line 
selector-no-vendor-prefix
-   color: @color-placeholder;
-   opacity: 1;
-   }
-   // Firefox 19-
-   ::-moz-placeholder { // stylelint-disable-line 
selector-no-vendor-prefix
-   color: @color-placeholder;
-   opacity: 1;
-   }
-   // Internet Explorer 10-11
-   :-ms-input-placeholder { // stylelint-disable-line 
selector-no-vendor-prefix
-   color: @color-placeholder;
-   }
-   // WebKit, Blink, Edge
-   ::-webkit-input-placeholder { // stylelint-disable-line 
selector-no-vendor-prefix
-   color: @color-placeholder;
-   }
-   // W3C Standard Selectors Level 4
-   :placeholder-shown {
-   color: @color-placeholder;
-   }
+   .mw-placeholder();
 
&.oo-ui-flaggedElement-invalid {
input,
@@ -923,20 +901,24 @@
position: absolute;
}
 
-   > .oo-ui-capsuleMultiselectWidget-content > input {
-   border: 0;
-   line-height: 1.675;
-   margin: 0 0 0 0.2em;
-   padding: 0;
-   font-size: inherit;
-   font-family: inherit;
-   background-color: transparent;
-   color: @color-emphasized;
-   vertical-align: middle;
+   > .oo-ui-capsuleMultiselectWidget-content {
+   .mw-placeholder();
 
-   &:focus {
-   // Chrome
-   outline: 0;
+   > input {
+   border: 0;
+   line-height: 1.675;
+   margin: 0 0 0 0.2em;
+   padding: 0;
+   font-size: inherit;
+   font-family: inherit;
+   background-color: transparent;
+   color: @color-emphasized;
+   vertical-align: middle;
+
+   &:focus {
+   // Chrome
+   outline: 0;
+   }
}
}
}
@@ -1705,3 +1687,29 @@
margin-right: 0;
}
 }
+
+.mw-placeholder () {
+   // Normalize placeholder styling, see T139034
+   // Firefox 4-18
+   :-moz-placeholder { // stylelint-disable-line selector-no-vendor-prefix
+   color: @color-placeholder;
+   opacity: 1;
+   }
+   // Firefox 19-
+   ::-moz-placeholder { // stylelint-disable-line selector-no-vendor-prefix
+   color: @color-placeholder;
+   opacity: 1;
+   }
+   // Internet Explorer 10-11
+   :-ms-input-placeholder { // stylelint-disable-line 
selector-no-vendor-prefix
+   color: @color-placeholder;
+   }
+   // WebKit, Blink, Edge
+   ::-webkit-input-placeholder { // stylelint-disable-line 
selector-no-vendor-prefix
+   color: @color-placeholder;
+   }
+   // W3C Standard Selectors Level 4
+   :placeholder-shown {
+   color: @color-placeholder;
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I560941115ac7cc8efc74367a1f4775373210bdf6
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing li

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Separate out ArticleTarget as a module

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

Change subject: Separate out ArticleTarget as a module
..


Separate out ArticleTarget as a module

Also move save button command help registration to ArticleTarget.

Bug: T151096
Change-Id: I941d17254a2e20a82aa46fd538abf887d757c0c3
---
M extension.json
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js
3 files changed, 38 insertions(+), 21 deletions(-)

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



diff --git a/extension.json b/extension.json
index ec17413..9b779ba 100644
--- a/extension.json
+++ b/extension.json
@@ -305,7 +305,6 @@
"messages": [
"accesskey-ca-editsource",
"accesskey-ca-ve-edit",
-   "accesskey-save",
"create",
"create-local",
"edit",
@@ -378,6 +377,7 @@
"ext.visualEditor.base",
"ext.visualEditor.mediawiki",
"ext.visualEditor.core.desktop",
+   "ext.visualEditor.articleTarget",
"ext.visualEditor.desktopTarget",
"jquery.cookie",
"mediawiki.jqueryMsg",
@@ -409,6 +409,7 @@
"ext.visualEditor.base",
"ext.visualEditor.mediawiki.mobile",
"ext.visualEditor.core.mobile",
+   "ext.visualEditor.articleTarget",
"ext.visualEditor.mwimage.core"
],
"messages" : [
@@ -465,12 +466,7 @@
"modules/ve-mw/init/ve.init.mw.Platform.js",

"modules/ve-mw/init/ve.init.mw.Platform.init.js",
"modules/ve-mw/init/ve.init.mw.Target.js",
-   
"modules/ve-mw/init/ve.init.mw.ArticleTarget.js",
-   
"modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js",

"modules/ve-mw/init/ve.init.mw.trackSubscriber.js"
-   ],
-   "styles": [
-   
"modules/ve-mw/init/styles/ve.init.mw.ArticleTarget.css"
],
"dependencies": [
"jquery.byteLength",
@@ -492,6 +488,28 @@
"messages": [
"visualeditor-quick-access-characters.json",
"visualeditor-special-characters-group-other"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   },
+   "ext.visualEditor.articleTarget": {
+   "scripts": [
+   
"modules/ve-mw/init/ve.init.mw.ArticleTarget.js",
+   
"modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js",
+   "modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js"
+   ],
+   "styles": [
+   
"modules/ve-mw/init/styles/ve.init.mw.ArticleTarget.css",
+   
"modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css"
+   ],
+   "dependencies": [
+   "ext.visualEditor.mediawiki",
+   "ext.visualEditor.core"
+   ],
+   "messages": [
+   "accesskey-save"
],
"targets": [
"desktop",
@@ -1151,7 +1169,6 @@
"modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWExtensionPreviewDialog.js",
-   
"modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWCancelConfirmDialog.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWWikitextSwitchConfirmDialog.js",
@@ -1168,7 +1185,6 @@
"styles": [

"modules/ve-mw/ui/styles/inspectors/ve.ui.MWExtensionInspector.css",

"modules/ve-mw/ui/styles/inspectors/ve

[MediaWiki-commits] [Gerrit] mediawiki...DisplayTitle[master]: Created new extension from non-semantic bits of SemanticTitle

2016-11-26 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged.

Change subject: Created new extension from non-semantic bits of SemanticTitle
..


Created new extension from non-semantic bits of SemanticTitle

Change-Id: I7141e0916d67b03fa3e75c52853de2c0f3030619
---
A COPYING
A DisplayTitle.i18n.magic.php
A DisplayTitleHooks.php
A extension.json
A i18n/en.json
A i18n/qqq.json
6 files changed, 295 insertions(+), 0 deletions(-)

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



diff --git a/COPYING b/COPYING
new file mode 100644
index 000..20db8a2
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 The MITRE Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/DisplayTitle.i18n.magic.php b/DisplayTitle.i18n.magic.php
new file mode 100644
index 000..6c6dc4e
--- /dev/null
+++ b/DisplayTitle.i18n.magic.php
@@ -0,0 +1,28 @@
+ [ 0, 'getdisplaytitle' ]
+];
diff --git a/DisplayTitleHooks.php b/DisplayTitleHooks.php
new file mode 100644
index 000..d77839e
--- /dev/null
+++ b/DisplayTitleHooks.php
@@ -0,0 +1,192 @@
+https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
+* @since 1.0
+* @param Parser &$parser the Parser object
+* @return bool continue checking hooks
+*/
+   public static function onParserFirstCallInit( &$parser ) {
+   $parser->setFunctionHook( 'getdisplaytitle',
+   'DisplayTitleHooks::getdisplaytitleParserFunction' );
+   return true;
+   }
+
+   /**
+* Handle #getdisplaytitle parser function.
+*
+* @since 1.0
+* @param Parser $parser the Parser object
+* @param string $pagename the name of the page
+* @return string the displaytitle of the page; defaults to pagename if
+* displaytitle is not set
+*/
+   public static function getdisplaytitleParserFunction( Parser $parser,
+   $pagename ) {
+   $title = Title::newFromText( $pagename );
+   if ( !is_null( $title ) ) {
+   self::getDisplayTitle( $title, $pagename );
+   }
+   return $pagename;
+   }
+
+   /**
+* Implements LinkBegin hook.
+* See https://www.mediawiki.org/wiki/Manual:Hooks/LinkBegin
+* Handle links. Implements LinkBegin hook of Linker class.
+* If a link is customized by a user (e. g. [[Target|Text]]) it should
+* remain intact. Let us assume a link is not customized if its html is
+* the prefixed or (to support Semantic MediaWiki queries) non-prefixed 
title
+* of the target page.
+*
+* @since 1.0
+* @param string $dummy no longer used
+* @param Title $target the Title object that the link is pointing to
+* @param string &$html the HTML of the link text
+* @param array &$customAttribs HTML attributes
+* @param string &$query query string
+* @param array &$options options
+* @param string &$ret the value to return if the hook returns false
+* @return bool continue checking hooks
+*/
+   public static function onLinkBegin( $dummy, Title $target, &$html,
+   &$customAttribs, &$query, &$options, &$ret ) {
+   if ( isset( $html ) && is_string( $html ) ) {
+   $title = Title::newFromText( $html );
+   if ( !is_null( $title ) &&
+   $title->getText() === $target->getText() &&
+   ( $title->getSubjectNsText() === 
$target->getSubjectNsText() ||
+   $title->getSubjectNsText() === '' ) ) {
+   self::getDisplayTitle( $target, $html );
+   }
+   } else {
+   self::getDisplayTitle( $target, $html );
+   

[MediaWiki-commits] [Gerrit] mediawiki...SimpleSort[master]: Add keyed sort option

2016-11-26 Thread Clump (Code Review)
Clump has submitted this change and it was merged.

Change subject: Add keyed sort option
..


Add keyed sort option

Add an option "keyed", which then expects two lists.  Sorting is applied to the 
first
list, and the second list is sorted the same way.  Also include an option
"stoponblank" which truncates the sorted output at the first blank entry.

Change-Id: Iafdd45a207c59e4454d33fc6bd2ea7ae4dfad448
---
M SimpleSort.hooks.php
1 file changed, 64 insertions(+), 21 deletions(-)

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



diff --git a/SimpleSort.hooks.php b/SimpleSort.hooks.php
index 21323a4..058b64f 100644
--- a/SimpleSort.hooks.php
+++ b/SimpleSort.hooks.php
@@ -18,16 +18,18 @@
}
 
// Render the output of {{#simplesort:}}.
-   // If two arguments are supplied, the 1st specifies options, 
whitespace-separated:
-   //  desc   Sort in descending order
-   //  alpha  Alphabetic sorting (regular, not natural)
-   //  numNumeric sorting
-   //  case   Case-sensitive sorting
-   //  insep="x"  Use x as a list separator in order to identify individual 
elements in the input.
-   // Note that whitespace on either side of x is ignored, 
and discarded.
-   // The quotes are required.
-   //  outsep="x" Use x as a list separator in the output.
-   // The quotes are required.
+   // If two or more arguments are supplied, the 1st specifies options, 
whitespace-separated:
+   //  desc Sort in descending order
+   //  alphaAlphabetic sorting (regular, not natural)
+   //  num  Numeric sorting
+   //  case C ase-sensitive sorting
+   //  insep="x"Use x as a list separator in order to identify individual 
elements in the input.
+   //   Note that whitespace on either side of x is 
ignored, and discarded.
+   //   The quotes are required.
+   //  outsep="x"   Use x as a list separator in the output.
+   //   The quotes are required.
+   //  keyedSorting is applied to two lists simultaneously, returning 
only the second list.
+   //  stoponblank  A blank element means to truncate the list at that point.  
If keyed, this applies to the first list.
//  Default sorting options are to use php's "natural", case-insensitive 
sort order,
//  and a comma-separator for both input and output.
// The remaining argument is the sortable list.
@@ -39,6 +41,8 @@
   $cs = false; // Case-sensitive
   $insep = ",";  // Input separator.
   $outsep = ",";  // Output separator.
+  $keyed = false;  // Keyed output sorting.
+  $stoponblank = false;  // Truncate list at first blank element.
 
   $numargs = func_num_args();
   $arglist = func_get_args();
@@ -66,9 +70,9 @@
   $outsep = $insep;
   }
 
-  // Only 3 options actually possible, but excessively, parse 
up to 4 to
+  // Only 5 options actually possible, but excessively, parse 
up to 6 to
   //  catch and isolate trailing debris.
-  $opts = preg_split( "/[\s]+/", trim( $options ), 4 );
+  $opts = preg_split( "/[\s]+/", trim( $options ), 6 );
 
   // Check for each option.  Ignore blank options if they 
somehow got in there.
   for ( $i=0; $i < count( $opts ); $i++ ) {
@@ -82,6 +86,10 @@
   $nat = false;
   } else if ( $opts[$i] === "case" ) {
   $cs = true;
+  } else if ( $opts[$i] === "keyed" ) {
+  $keyed = true;
+  } else if ( $opts[$i] === "stoponblank" ) {
+  $stoponblank = true;
   } else if ( $opts[$i] !== "" ) {
   return wfMessage( 'simplesort-err', 
$opts[$i] )->text();
   }
@@ -94,22 +102,57 @@
   if ( $input === "" ) {
   $output = "";
   } else {
-  if ( $insep === "" )
-  $ilist = str_split( preg_replace( "/[\s]+/", "", 
$input ) );
-  else
-  $ilist = preg_split( "/[\s]*" . preg_quote( $insep ) 
. "[\s]*/", $input );
-
   $flags = ( ( $nat ) ? SORT_NATURAL : ( ( $alpha ) ? 
SORT_STRING : SORT_NUMERIC ) )
   | ( ( $cs ) ? 0 : SORT_FLAG_CASE );
 
-  if ( $asc )
-  sort( $ilist, $flags );
-  else
-  rsort( $ilist, $flags );
+  $ilist = SimpleSortHooks::stringToArray( $input, $insep );
+
+  if ( $stoponblank ) {
+  $max

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Wrap SyslogHandler in WhatFailureGroupHandler in elk role

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

Change subject: Wrap SyslogHandler in WhatFailureGroupHandler in elk role
..


Wrap SyslogHandler in WhatFailureGroupHandler in elk role

SyslogHandler can throw exceptions when called after it has been
destructed; mirror how WMF production setup handles the issue.

Also update for new coding standards for no good reason.

Bug: T151428
Change-Id: I79c72cc9f0ccb723d69adef57884bc2768dad06a
---
M puppet/modules/role/templates/elk/monolog.php.erb
1 file changed, 16 insertions(+), 7 deletions(-)

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



diff --git a/puppet/modules/role/templates/elk/monolog.php.erb 
b/puppet/modules/role/templates/elk/monolog.php.erb
index cd6d77a..1c78a74 100644
--- a/puppet/modules/role/templates/elk/monolog.php.erb
+++ b/puppet/modules/role/templates/elk/monolog.php.erb
@@ -3,14 +3,23 @@
 $wgDebugTimestamps = false;
 $wgDBerrorLog = true;
 
-$wgMWLoggerDefaultSpi['args'][0]['loggers']['@default']['handlers'][] = 
'syslog';
-$wgMWLoggerDefaultSpi['args'][0]['handlers']['syslog'] = array(
+$wgMWLoggerDefaultSpi['args'][0]['loggers']['@default']['handlers'][] = 'what';
+$wgMWLoggerDefaultSpi['args'][0]['handlers']['syslog'] = [
'class' => '\\MediaWiki\\Logger\\Monolog\\SyslogHandler',
-   'args' => array( 'mediawiki', '127.0.0.1', 10514 ),
+   'args' => [ 'mediawiki', '127.0.0.1', 10514 ],
'formatter' => 'logstash',
-);
-$wgMWLoggerDefaultSpi['args'][0]['formatters']['logstash'] = array(
+];
+$wgMWLoggerDefaultSpi['args'][0]['handlers']['what'] = [
+   'class' => '\\Monolog\\Handler\\WhatFailureGroupHandler',
+   'args' => [
+   function () {
+   $provider = 
\MediaWiki\Logger\LoggerFactory::getProvider();
+   return array_map( [ $provider, 'getHandler' ], [ 
'syslog' ] );
+   }
+   ],
+];
+$wgMWLoggerDefaultSpi['args'][0]['formatters']['logstash'] = [
'class' => '\\Monolog\\Formatter\\LogstashFormatter',
-   'args'  => array( 'mediawiki', php_uname( 'n' ), null, '', 1 ),
-);
+   'args'  => [ 'mediawiki', php_uname( 'n' ), null, '', 1 ],
+];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79c72cc9f0ccb723d69adef57884bc2768dad06a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SimpleSort[master]: Add keyed sort option

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

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

Change subject: Add keyed sort option
..

Add keyed sort option

Add an option "keyed", which then expects two lists.  Sorting is applied to the 
first
list, and the second list is sorted the same way.  Also include an option
"stoponblank" which truncates the sorted output at the first blank entry.

Change-Id: Iafdd45a207c59e4454d33fc6bd2ea7ae4dfad448
---
M SimpleSort.hooks.php
1 file changed, 64 insertions(+), 21 deletions(-)


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

diff --git a/SimpleSort.hooks.php b/SimpleSort.hooks.php
index 21323a4..058b64f 100644
--- a/SimpleSort.hooks.php
+++ b/SimpleSort.hooks.php
@@ -18,16 +18,18 @@
}
 
// Render the output of {{#simplesort:}}.
-   // If two arguments are supplied, the 1st specifies options, 
whitespace-separated:
-   //  desc   Sort in descending order
-   //  alpha  Alphabetic sorting (regular, not natural)
-   //  numNumeric sorting
-   //  case   Case-sensitive sorting
-   //  insep="x"  Use x as a list separator in order to identify individual 
elements in the input.
-   // Note that whitespace on either side of x is ignored, 
and discarded.
-   // The quotes are required.
-   //  outsep="x" Use x as a list separator in the output.
-   // The quotes are required.
+   // If two or more arguments are supplied, the 1st specifies options, 
whitespace-separated:
+   //  desc Sort in descending order
+   //  alphaAlphabetic sorting (regular, not natural)
+   //  num  Numeric sorting
+   //  case C ase-sensitive sorting
+   //  insep="x"Use x as a list separator in order to identify individual 
elements in the input.
+   //   Note that whitespace on either side of x is 
ignored, and discarded.
+   //   The quotes are required.
+   //  outsep="x"   Use x as a list separator in the output.
+   //   The quotes are required.
+   //  keyedSorting is applied to two lists simultaneously, returning 
only the second list.
+   //  stoponblank  A blank element means to truncate the list at that point.  
If keyed, this applies to the first list.
//  Default sorting options are to use php's "natural", case-insensitive 
sort order,
//  and a comma-separator for both input and output.
// The remaining argument is the sortable list.
@@ -39,6 +41,8 @@
   $cs = false; // Case-sensitive
   $insep = ",";  // Input separator.
   $outsep = ",";  // Output separator.
+  $keyed = false;  // Keyed output sorting.
+  $stoponblank = false;  // Truncate list at first blank element.
 
   $numargs = func_num_args();
   $arglist = func_get_args();
@@ -66,9 +70,9 @@
   $outsep = $insep;
   }
 
-  // Only 3 options actually possible, but excessively, parse 
up to 4 to
+  // Only 5 options actually possible, but excessively, parse 
up to 6 to
   //  catch and isolate trailing debris.
-  $opts = preg_split( "/[\s]+/", trim( $options ), 4 );
+  $opts = preg_split( "/[\s]+/", trim( $options ), 6 );
 
   // Check for each option.  Ignore blank options if they 
somehow got in there.
   for ( $i=0; $i < count( $opts ); $i++ ) {
@@ -82,6 +86,10 @@
   $nat = false;
   } else if ( $opts[$i] === "case" ) {
   $cs = true;
+  } else if ( $opts[$i] === "keyed" ) {
+  $keyed = true;
+  } else if ( $opts[$i] === "stoponblank" ) {
+  $stoponblank = true;
   } else if ( $opts[$i] !== "" ) {
   return wfMessage( 'simplesort-err', 
$opts[$i] )->text();
   }
@@ -94,22 +102,57 @@
   if ( $input === "" ) {
   $output = "";
   } else {
-  if ( $insep === "" )
-  $ilist = str_split( preg_replace( "/[\s]+/", "", 
$input ) );
-  else
-  $ilist = preg_split( "/[\s]*" . preg_quote( $insep ) 
. "[\s]*/", $input );
-
   $flags = ( ( $nat ) ? SORT_NATURAL : ( ( $alpha ) ? 
SORT_STRING : SORT_NUMERIC ) )
   | ( ( $cs ) ? 0 : SORT_FLAG_CASE );
 
-  if ( $asc )
-  sort( $ilist, $flags );
-  else
-  rsort( $ilist, $flags );
+  $ilist = SimpleSortHooks::stringToArray( $input, $insep 

[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Disable page was using the OAuth throttler instead of OATH

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

Change subject: Disable page was using the OAuth throttler instead of OATH
..


Disable page was using the OAuth throttler instead of OATH

Follow-up to: Icbe5cdf
Bug: T151536
Change-Id: Id25eaa86f31aab20b1e597c0711b71ad109fbf77
---
M special/SpecialOATHDisable.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/special/SpecialOATHDisable.php b/special/SpecialOATHDisable.php
index 2c06f22..f4bb01a 100644
--- a/special/SpecialOATHDisable.php
+++ b/special/SpecialOATHDisable.php
@@ -100,7 +100,7 @@
// Don't increase pingLimiter, just check for limit exceeded.
if ( $this->OATHUser->getUser()->pingLimiter( 'badoath', 0 ) ) {
// Arbitrary duration given here
-   return [ 'oauthauth-throttled', Message::durationParam( 
60 ) ];
+   return [ 'oathauth-throttled', Message::durationParam( 
60 ) ];
}
 
if ( !$this->OATHUser->getKey()->verifyToken( 
$formData['token'], $this->OATHUser ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id25eaa86f31aab20b1e597c0711b71ad109fbf77
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Gergő Tisza 
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...CategoryTree[master]: adding $magicWords translations for bengali

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

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

Change subject: adding $magicWords translations for bengali
..

adding $magicWords translations for bengali

Bug: T151690
Change-Id: I1abd5753a6c8ece21f2b69b1eae785fe6adff4a7
---
M CategoryTree.i18n.magic.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree 
refs/changes/69/323669/2

diff --git a/CategoryTree.i18n.magic.php b/CategoryTree.i18n.magic.php
index a01d967..083a6e0 100644
--- a/CategoryTree.i18n.magic.php
+++ b/CategoryTree.i18n.magic.php
@@ -36,6 +36,11 @@
'categorytree' => [ 0, 'GwezennadurRummad' ],
 ];
 
+/** Bengali (বাংলা) */
+$magicWords['bn'] = [
+   'categorytree' => [ 0, 'বিষয়শ্রেণী_বৃক্ষ', 'বিষয়শ্রেণীবৃক্ষ', 
'categorytree' ],
+];
+
 /** Chechen (нохчийн) */
 $magicWords['ce'] = [
'categorytree' => [ 0, 'категоридит', 'деревокатегорий' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1abd5753a6c8ece21f2b69b1eae785fe6adff4a7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Aftab 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add a context to ChangeTags::buildTagFilterSelector

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

Change subject: Add a context to ChangeTags::buildTagFilterSelector
..


Add a context to ChangeTags::buildTagFilterSelector

A IContextSource is added as parameter to ChangeTags::buildTagFilterSelector 
static function, which can be used to avoid the globals.

Bug: T105649
Change-Id: I50ca27c75b4807f5e4391648bfd5cac9169517e9
---
M includes/changetags/ChangeTags.php
1 file changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/includes/changetags/ChangeTags.php 
b/includes/changetags/ChangeTags.php
index e3035be..bfabd51 100644
--- a/includes/changetags/ChangeTags.php
+++ b/includes/changetags/ChangeTags.php
@@ -668,12 +668,20 @@
 * @param string $selected Tag to select by default
 * @param bool $ooui Use an OOUI TextInputWidget as selector instead of 
a non-OOUI input field
 *You need to call OutputPage::enableOOUI() yourself.
+* @param IContextSource|null $context
+* @note Even though it takes null as a valid argument, an 
IContextSource is preferred
+*   in a new code, as the null value can change in the future
 * @return array an array of (label, selector)
 */
-   public static function buildTagFilterSelector( $selected = '', $ooui = 
false ) {
-   global $wgUseTagFilter;
+   public static function buildTagFilterSelector(
+   $selected = '', $ooui = false, IContextSource $context = null
+   ) {
+   if ( !$context ) {
+   $context = RequestContext::getMain();
+   }
 
-   if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) {
+   $config = $context->getConfig();
+   if ( !$config->get( 'UseTagFilter' ) || !count( 
self::listDefinedTags() ) ) {
return [];
}
 
@@ -681,7 +689,7 @@
Html::rawElement(
'label',
[ 'for' => 'tagfilter' ],
-   wfMessage( 'tag-filter' )->parse()
+   $context->msg( 'tag-filter' )->parse()
)
];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50ca27c75b4807f5e4391648bfd5cac9169517e9
Gerrit-PatchSet: 14
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amritsreekumar 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Amritsreekumar 
Gerrit-Reviewer: Matěj Suchánek 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Rename 'type' field of authevents channel to 'eventType'

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

Change subject: Rename 'type' field of authevents channel to 'eventType'
..


Rename 'type' field of authevents channel to 'eventType'

'type' is problematic as it conflicts with a default field name
in logstash.

Bug: T145133
Change-Id: Iab1eb47a6b6c98f3c84b4f8e2d16cbe2cdbf515b
---
M includes/AuthManagerStatsdHandler.php
M tests/phpunit/AuthManagerStatsdHandlerTest.php
2 files changed, 24 insertions(+), 5 deletions(-)

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



diff --git a/includes/AuthManagerStatsdHandler.php 
b/includes/AuthManagerStatsdHandler.php
index 5d5f21d..4f315c3 100644
--- a/includes/AuthManagerStatsdHandler.php
+++ b/includes/AuthManagerStatsdHandler.php
@@ -31,7 +31,7 @@
  *
  * Events can include the following data in their context:
  *   - 'event': (string, required) the type of the event (e.g. 'login').
- *   - 'type': (string) a subtype for more complex events.
+ *   - 'eventType': (string) a subtype for more complex events.
  *   - 'successful': (bool) whether the attempt was successful. Can be omitted 
if 'status' is
  * a Status or a StatusValue.
  *   - 'status': (Status|StatusValue|string|int) attempt status (such as an 
error message key).
@@ -51,11 +51,11 @@
 * {@inheritdoc}
 */
public function handle( array $record ) {
-   $event = isset( $record['context']['event'] ) ? 
$record['context']['event'] : null;
-   $type = isset( $record['context']['type'] ) ? 
$record['context']['type'] : null;
+   $event = $this->getField( 'event', $record['context'] );
+   $type = $this->getField( [ 'eventType', 'type' ] , 
$record['context'] );
$entrypoint = $this->getEntryPoint();
-   $status = isset( $record['context']['status'] ) ? 
$record['context']['status'] : null;
-   $successful = isset( $record['context']['successful'] ) ? 
$record['context']['successful'] : null;
+   $status = $this->getField( 'status', $record['context'] );
+   $successful = $this->getField( 'successful', $record['context'] 
);
$error = null;
if ( $status instanceof Status || $status instanceof 
StatusValue ) {
$status = Status::wrap( $status );
@@ -109,4 +109,19 @@
}
return $entrypoint;
}
+
+   /**
+* Get a field from an array without triggering errors if it does not 
exist
+* @param string|array $field Field name or list of field name + 
fallbacks
+* @param array $data
+* @return mixed Field value, or null if field was missing
+*/
+   protected function getField( $field, array $data ) {
+   foreach ( (array)$field as $key ) {
+   if ( isset( $data[$key] ) ) {
+   return $data[$key];
+   }
+   }
+   return null;
+   }
 }
diff --git a/tests/phpunit/AuthManagerStatsdHandlerTest.php 
b/tests/phpunit/AuthManagerStatsdHandlerTest.php
index 8003f8d..5cc516b 100644
--- a/tests/phpunit/AuthManagerStatsdHandlerTest.php
+++ b/tests/phpunit/AuthManagerStatsdHandlerTest.php
@@ -57,6 +57,10 @@
], 'authmanager.autocreate' ],
'type' => [  [
'channel' => 'authevents',
+   'context' => [ 'event' => 'autocreate', 
'eventType' => 'session' ],
+   ], 'authmanager.autocreate.session' ],
+   'type fallback' => [  [
+   'channel' => 'authevents',
'context' => [ 'event' => 'autocreate', 'type' 
=> 'session' ],
], 'authmanager.autocreate.session' ],
'success' => [  [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab1eb47a6b6c98f3c84b4f8e2d16cbe2cdbf515b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Rename 'type' field of authevents channel to 'eventType'

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

Change subject: Rename 'type' field of authevents channel to 'eventType'
..


Rename 'type' field of authevents channel to 'eventType'

'type' is problematic as it conflicts with a default field name
in logstash.

Bug: T145133
Change-Id: Idb73ba3e431ef2bd25b14c8562d1b3f212b4e072
Depends-On: Iab1eb47a6b6c98f3c84b4f8e2d16cbe2cdbf515b
---
M SimpleCaptcha/Captcha.php
M includes/auth/CaptchaPreAuthenticationProvider.php
2 files changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index 96f7d16..952bcd8 100644
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -274,7 +274,7 @@
}
LoggerFactory::getInstance( 'authevents' )->info( 
'Captcha shown on account creation', [
'event' => 'captcha.display',
-   'type' => 'accountcreation',
+   'eventType' => 'accountcreation',
] );
$formInformation = $this->getFormInformation( 8 );
$formMetainfo = $formInformation;
@@ -324,7 +324,7 @@
 
LoggerFactory::getInstance( 'authevents' )->info( 
'Captcha shown on login', [
'event' => 'captcha.display',
-   'type' => 'login',
+   'eventType' => 'login',
'perIp' => $perIPTriggered,
'perUser' => $perUserTriggered
] );
@@ -945,7 +945,7 @@
$success = $this->passCaptchaLimitedFromRequest( 
$wgRequest, $wgUser );
LoggerFactory::getInstance( 'authevents' )->info( 
'Captcha submitted on account creation', [
'event' => 'captcha.submit',
-   'type' => 'accountcreation',
+   'eventType' => 'accountcreation',
'successful' => $success,
] );
if ( !$success ) {
@@ -1008,7 +1008,7 @@
$success = $this->passCaptchaLimitedFromRequest( 
$wgRequest, $wgUser );
LoggerFactory::getInstance( 'authevents' )->info( 
'Captcha submitted on login', [
'event' => 'captcha.submit',
-   'type' => 'login',
+   'eventType' => 'login',
'successful' => $success,
] );
if ( !$success ) {
@@ -1329,7 +1329,7 @@
LoggerFactory::getInstance( 
'authevents' )
->info( 'Captcha data 
added in account creation API', [
'event' => 
'captcha.display',
-   'type' => 
'accountcreation',
+   'eventType' => 
'accountcreation',
] );
 
break;
diff --git a/includes/auth/CaptchaPreAuthenticationProvider.php 
b/includes/auth/CaptchaPreAuthenticationProvider.php
index d877854..38a2e68 100644
--- a/includes/auth/CaptchaPreAuthenticationProvider.php
+++ b/includes/auth/CaptchaPreAuthenticationProvider.php
@@ -20,7 +20,7 @@
LoggerFactory::getInstance( 
'authevents' )
->info( 'Captcha shown on 
account creation', [
'event' => 
'captcha.display',
-   'type' => 
'accountcreation',
+   'eventType' => 
'accountcreation',
] );
}
break;
@@ -49,7 +49,7 @@
LoggerFactory::getInstance( 
'authevents' )
->info( 'Captcha shown on 
account creation', [
'event' => 
'captcha.display',
-   'type' => 
'accountcreation',
+   'eventType' => 
'accountcreation',
] );
break;
}
@@ -76,7 +76,7 @@
$success 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Rename 'type' field of authevents channel to 'eventType'

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

Change subject: Rename 'type' field of authevents channel to 'eventType'
..


Rename 'type' field of authevents channel to 'eventType'

'type' is problematic as it conflicts with a default field name
in logstash.

Bug: T145133
Change-Id: I4f6c2dcdeae6753f00f7183a52bbc4840c6efcd4
Depends-On: Iab1eb47a6b6c98f3c84b4f8e2d16cbe2cdbf515b
---
M includes/specials/SpecialCentralAutoLogin.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/specials/SpecialCentralAutoLogin.php 
b/includes/specials/SpecialCentralAutoLogin.php
index ea65157..6b483dd 100644
--- a/includes/specials/SpecialCentralAutoLogin.php
+++ b/includes/specials/SpecialCentralAutoLogin.php
@@ -85,7 +85,7 @@
) {
\MediaWiki\Logger\LoggerFactory::getInstance( 
'authevents' )->info( 'Autologin ' . $par, array(
'event' => 'autologin',
-   'type' => $par,
+   'eventType' => $par,
) );
}
 
@@ -506,7 +506,7 @@
'Autologin success',
array(
'event' => 'autologin',
-   'type' => 'success',
+   'eventType' => 'success',
)
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f6c2dcdeae6753f00f7183a52bbc4840c6efcd4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CategoryTree[master]: Rename language codes sr-ec and sr-el to sr-cyrl and sr-latn

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

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

Change subject: Rename language codes sr-ec and sr-el to sr-cyrl and sr-latn
..

Rename language codes sr-ec and sr-el to sr-cyrl and sr-latn

sr-ec and sr-el are not conform to BCP 47. https://tools.ietf.org/html/bcp47
BCP 47 explicit mentions sr-Latn and sr-Cyrl as examples.

Bug: T117845
Change-Id: I409f384a5629741d45801d733c9293b270bca62e
Depends-On: I75da0af35a2066e7963e50c56c99daf1e07c55e6
---
M CategoryTree.i18n.magic.php
R i18n/sr-cyrl.json
R i18n/sr-latn.json
3 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree 
refs/changes/67/323667/1

diff --git a/CategoryTree.i18n.magic.php b/CategoryTree.i18n.magic.php
index a01d967..daf7115 100644
--- a/CategoryTree.i18n.magic.php
+++ b/CategoryTree.i18n.magic.php
@@ -192,12 +192,12 @@
 ];
 
 /** Serbian (Cyrillic script) (српски (ћирилица)‎) */
-$magicWords['sr-ec'] = [
+$magicWords['sr-cyrl'] = [
'categorytree' => [ 0, 'стаблокатегорије', 'стабло_категорије' ],
 ];
 
 /** Serbian (Latin script) (srpski (latinica)‎) */
-$magicWords['sr-el'] = [
+$magicWords['sr-latn'] = [
'categorytree' => [ 0, 'stablokategorije', 'stablo_kategorije' ],
 ];
 
diff --git a/i18n/sr-ec.json b/i18n/sr-cyrl.json
similarity index 100%
rename from i18n/sr-ec.json
rename to i18n/sr-cyrl.json
diff --git a/i18n/sr-el.json b/i18n/sr-latn.json
similarity index 100%
rename from i18n/sr-el.json
rename to i18n/sr-latn.json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I409f384a5629741d45801d733c9293b270bca62e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...CategoryTree[master]: Adding $specialPageAliases translations for bengali (bn)

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

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

Change subject: Adding $specialPageAliases translations for bengali (bn)
..

Adding $specialPageAliases translations for bengali (bn)

Change-Id: I11526f8c82e28536e6824a7feef50f9e2ea3f4e4
---
M CategoryTree.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree 
refs/changes/66/323666/2

diff --git a/CategoryTree.alias.php b/CategoryTree.alias.php
index 5fc1591..1bceceb 100644
--- a/CategoryTree.alias.php
+++ b/CategoryTree.alias.php
@@ -82,6 +82,11 @@
'CategoryTree' => [ 'Puhun_tumbung' ],
 ];
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = [
+   'CategoryTree' => [ 'বিষয়শ্রেণী_বৃক্ষ' ],
+];
+
 /** Breton (brezhoneg) */
 $specialPageAliases['br'] = [
'CategoryTree' => [ 'GwezennadurRummad' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11526f8c82e28536e6824a7feef50f9e2ea3f4e4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Visually report damaging confidence

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

Change subject: Visually report damaging confidence
..


Visually report damaging confidence

Bug: T144922
Change-Id: I12b841e2ed65620c115a0b6110f9195b172cc010
---
M extension.json
M includes/Hooks.php
A modules/ext.ores.highlighter.js
M modules/ext.ores.styles.css
4 files changed, 49 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index 71419d5..c8c143d 100644
--- a/extension.json
+++ b/extension.json
@@ -91,8 +91,11 @@
"remoteExtPath": "ORES/modules"
},
"ResourceModules": {
-   "ext.ores.styles": {
+   "ext.ores.highlight": {
"position": "top",
+   "scripts": [
+   "ext.ores.highlighter.js"
+   ],
"styles": "ext.ores.styles.css",
"targets": [
"desktop",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index de75b4b..1a23775 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -481,9 +481,8 @@
'oresThresholds',
[ 'damaging' => $wgOresDamagingThresholds ]
);
+   $out->addModules( 'ext.ores.highlight' );
}
-
-   $out->addModuleStyles( 'ext.ores.styles' );
return true;
}
 
diff --git a/modules/ext.ores.highlighter.js b/modules/ext.ores.highlighter.js
new file mode 100644
index 000..e77c107
--- /dev/null
+++ b/modules/ext.ores.highlighter.js
@@ -0,0 +1,31 @@
+( function ( mw, $ ) {
+   'use strict';
+   if ( !$( '.mw-changeslist, .mw-contributions-list' ).length ) {
+   return;
+   }
+   var thresholds = mw.config.get( 'oresThresholds' ).damaging;
+   var names = {};
+   names[thresholds.softest] = 'softest';
+   names[thresholds.soft] = 'soft';
+   names[thresholds.hard] = 'hard';
+   $( 'li.damaging' ).each( function () {
+   var url = $( this ).children( 'a' ).attr( 'href' );
+   if ( !url ) {
+   return true;
+   }
+   var reg = /\bdiff=(\d+)/;
+   var res = reg.exec( url );
+   if ( !res || !( res[1] in mw.config.get( 'oresData' ) ) ) {
+   return true;
+   }
+   var score = mw.config.get( 'oresData' )[res[1]]['damaging'];
+   var threshold = 0;
+   for ( threshold in names ) {
+   if ( score > threshold ) {
+   $( this ).attr( 'data-ores-damaging', 
names[threshold] );
+   break;
+   }
+   }
+   } )
+}( mediaWiki, jQuery ) );
+
diff --git a/modules/ext.ores.styles.css b/modules/ext.ores.styles.css
index 3c33123..149f69b 100644
--- a/modules/ext.ores.styles.css
+++ b/modules/ext.ores.styles.css
@@ -11,6 +11,18 @@
  */
 li.damaging,
 tr.damaging {
-   background: rgba( 255, 93, 0, 0.2 );
+   background: #fef6e7;
line-height: 1.8;
 }
+
+.damaging[data-ores-damaging='softest'] {
+   background-color: #fc3;
+}
+
+.damaging[data-ores-damaging='soft'] {
+   background-color: #fef6e7;
+}
+
+.damaging[data-ores-damaging='hard'] {
+   background-color: #eaf3ff;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12b841e2ed65620c115a0b6110f9195b172cc010
Gerrit-PatchSet: 26
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Add Siberian Tatar language, sty

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

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

Change subject: Add Siberian Tatar language, sty
..

Add Siberian Tatar language, sty

There is an incubator in this language at
https://incubator.wikimedia.org/wiki/Wp/sty

And they asked to translate.

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/65/323665/1

diff --git a/LanguageSettings.php b/LanguageSettings.php
index ba6f4ea..ebdf897 100644
--- a/LanguageSettings.php
+++ b/LanguageSettings.php
@@ -80,6 +80,7 @@
 $wgExtraLanguageNames['sly'] = 'Bahasa Selayar'; # A Selayar / Siebrand 
2012-01-09
 $wgExtraLanguageNames['smj'] = 'julevsámegiella'; # Lule Saami / Nikerabbit 
2016-06-22
 $wgExtraLanguageNames['smn'] = 'anarâškielâ'; # Inari Saami / Siebrand 
2014-10-06
+$wgExtraLanguageNames['sty'] = 'Себертатар'; # Siberian Tatar / Amir 2016-11-26
 $wgExtraLanguageNames['swb'] = 'Shikomoro'; # Comorian
 $wgExtraLanguageNames['sxu'] = 'Säggssch'; # Upper Saxon
 $wgExtraLanguageNames['test'] = 'Test (site admin only)'; # Test

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I732d1fad8220325b4f752602e327e04abaa0e338
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...DiscussionThreading[master]: Fix Undefined property: EditPage::$replyadded

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

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

Change subject: Fix Undefined property: EditPage::$replyadded
..

Fix Undefined property: EditPage::$replyadded

Bug: T70742
Change-Id: Ie7adafec9ebad6f6754bbe44622b1fe49d2c6343
---
M DiscussionThreading.class.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DiscussionThreading 
refs/changes/63/323663/1

diff --git a/DiscussionThreading.class.php b/DiscussionThreading.class.php
index fb4be45..a259831 100644
--- a/DiscussionThreading.class.php
+++ b/DiscussionThreading.class.php
@@ -75,7 +75,7 @@
public static function efDiscussionThread($efform){
global $wgSectionThreadingOn;
$wgSectionThreadingOn = isset( $wgSectionThreadingOn ) ? 
$wgSectionThreadingOn : false;
-   if ( $efform->replytosection != '' && $wgSectionThreadingOn  && 
!$efform->replyadded ) {
+   if ( $efform->replytosection != '' && $wgSectionThreadingOn  && 
isset( $efform->replyadded ) && !$efform->replyadded ) {
if ($efform->replytosection != '' ) {
$text = $efform->textbox1;
$matches = array();
@@ -131,7 +131,7 @@
public static function onAttemptSave( $efform ){
global $wgSectionThreadingOn;
$wgSectionThreadingOn = isset($wgSectionThreadingOn) ? 
$wgSectionThreadingOn : false;
-   if ( $efform->section == "new" && $wgSectionThreadingOn  && 
!$efform->replyadded ) {
+   if ( $efform->section == "new" && $wgSectionThreadingOn  && 
isset( $efform->replyadded ) && !$efform->replyadded ) {
$efform->summary = $efform->summary." -- ";
}
return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7adafec9ebad6f6754bbe44622b1fe49d2c6343
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DiscussionThreading
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...DiscussionThreading[master]: Move JS to RL module

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

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

Change subject: Move JS to RL module
..

Move JS to RL module

Fix JS syntax error elseif -> else if

Fix JS indenting

Change-Id: I8682b2c757d4069356e9356657383625b092f9b3
---
M DiscussionThreading.class.php
M extension.json
A modules/ext.discussionthreading.js
3 files changed, 28 insertions(+), 17 deletions(-)


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

diff --git a/DiscussionThreading.class.php b/DiscussionThreading.class.php
index a259831..552bb68 100644
--- a/DiscussionThreading.class.php
+++ b/DiscussionThreading.class.php
@@ -98,23 +98,7 @@
$text .= "\n\n".str_repeat( ":" , strlen( 
$matches[1] )-1 ).$replaceMeText;
// Insert javascript hook that will select the 
replace me text
global $wgOut;
-   $wgOut->addScript("
-function efDiscussionThread(){
-  var ctrl = document.editform.wpTextbox1;
-  if (ctrl.setSelectionRange) {
-ctrl.focus();
-var end = ctrl.value.length;
-
ctrl.setSelectionRange(end-".strlen($replaceMeText).",end-1);
-ctrl.scrollTop = ctrl.scrollHeight;
-  } elseif (ctrl.createTextRange) {
-var range = ctrl.createTextRange();
-range.collapse(false);
-range.moveStart('character', 
-".strlen($replaceMeText).");
-range.select();
-  }
-}
-addOnloadHook(efDiscussionThread);
-");
+   $wgOut->addModuleScripts( 
'ext.discussionthreading' );
$efform->replyadded = true;
$efform->textbox1 = $text;
}
diff --git a/extension.json b/extension.json
index cfc59a2..9075444 100644
--- a/extension.json
+++ b/extension.json
@@ -25,6 +25,16 @@
"AlternateEdit": "DiscussionThreading::efDiscussionThreadEdit",
"DoEditSectionLink": "DiscussionThreading::onDoEditSectionLink"
},
+   "ResourceFileModulePaths": {
+   "localBasePath": "modules",
+   "remoteExtPath": "DiscussionThreading/modules"
+   },
+   "ResourceModules": {
+   "ext.discussionthreading": {
+   "scripts": "ext.discussionthreading.js",
+   "position": "top"
+   }
+   },
"config": {
"SectionThreadingOn": {
"value": true
diff --git a/modules/ext.discussionthreading.js 
b/modules/ext.discussionthreading.js
new file mode 100644
index 000..3574bff
--- /dev/null
+++ b/modules/ext.discussionthreading.js
@@ -0,0 +1,17 @@
+(function() {
+   function efDiscussionThread(){
+   var ctrl = document.editform.wpTextbox1;
+   if (ctrl.setSelectionRange) {
+   ctrl.focus();
+   var end = ctrl.value.length;
+   
ctrl.setSelectionRange(end-".strlen($replaceMeText).",end-1);
+   ctrl.scrollTop = ctrl.scrollHeight;
+   } else if (ctrl.createTextRange) {
+   var range = ctrl.createTextRange();
+   range.collapse(false);
+   range.moveStart('character', 
-".strlen($replaceMeText).");
+   range.select();
+   }
+   }
+   addOnloadHook(efDiscussionThread);
+})();
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8682b2c757d4069356e9356657383625b092f9b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DiscussionThreading
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


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

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

Change subject: Decommission compat
..


Decommission compat

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

Bug: T99365
Bug: T101214
Change-Id: I395c3560e954ccef183636b5c0b0d4e8288bc6ab
---
M CONTENTS
M LICENSE
M pywikibot/throttle.py
3 files changed, 62 insertions(+), 12 deletions(-)

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



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

[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Define right-manageglobalpuppet

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

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

Change subject: Define right-manageglobalpuppet
..

Define right-manageglobalpuppet

Change-Id: I13e659b1920a6a6d2ee03678a1134860a2a624aa
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager 
refs/changes/62/323662/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13e659b1920a6a6d2ee03678a1134860a2a624aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 

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


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

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

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

Change subject: Convert DiscussionThreading to extension registration
..

Convert DiscussionThreading to extension registration

Bump 1.6.0

Change-Id: I0c51aba7aba8cdda7fd8fbb2ce2ddd37b64040cb
---
M DiscussionThreading.php
A extension.json
2 files changed, 47 insertions(+), 40 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DiscussionThreading 
refs/changes/61/323661/1

diff --git a/DiscussionThreading.php b/DiscussionThreading.php
index e281b61..309ade9 100644
--- a/DiscussionThreading.php
+++ b/DiscussionThreading.php
@@ -1,41 +1,14 @@
 
- * @ingroup Extensions
- * @copyright  2007 Jack D. pond
- * @url http://www.mediawiki.org/wiki/Manual:Extensions
- * @licence GNU General Public Licence 2.0 or later
- */
-
-if (!defined('MEDIAWIKI')) die('Not an entry point.');
-
-# Internationalisation file
-$wgMessagesDirs['DiscussionThreading'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['DiscussionThreading'] =  __DIR__ . 
'/DiscussionThreading.i18n.php';
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'DiscussionThreading',
-   'author' => array( 'Jack D. Pond' , 'Daniel Brice' ),
-   'version' => '1.5.0',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:DiscussionThreading',
-   'descriptionmsg' => 'discussionthreading-desc',
-);
-
-/**
- * Set up hooks for discussion threading
- *
- * @param $wgSectionThreadingOn bool global logical variable to activate 
threading
- */
-global $wgSectionThreadingOn;
-$wgSectionThreadingOn = true;
-
-$wgAutoloadClasses['DiscussionThreading'] = __FILE__ . 
'/DiscussionThreading.class.php';
-
-$wgHooks['EditPage::showEditForm:initial'][] = 
'DiscussionThreading::efDiscussionThread';
-$wgHooks['EditPage::attemptSave'][] = 'DiscussionThreading::onAttemptSave';
-$wgHooks['EditPage::showEditForm:initial'][] = 
'DiscussionThreading::efDiscussionThreadEdit';
-$wgHooks['AlternateEdit'][] = 'DiscussionThreading::efDiscussionThreadEdit';
-$wgHooks['DoEditSectionLink'][] = 'DiscussionThreading::onDoEditSectionLink';
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'DiscussionThreading' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['DiscussionThreading'] = __DIR__ . '/i18n';
+   /*wfWarn(
+   'Deprecated PHP entry point used for DiscussionThreading 
extension. ' .
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );*/
+   return;
+} else {
+   die( 'This version of the DiscussionThreading extension requires 
MediaWiki 1.28+' );
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..5d61b60
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,34 @@
+{
+   "name": "DiscussionThreading",
+   "version": "1.6.0",
+   "author": [
+   "Jack D. Pond",
+   "Daniel Brice"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:DiscussionThreading";,
+   "descriptionmsg": "discussionthreading-desc",
+   "type": "other",
+   "MessagesDirs": {
+   "DiscussionThreading": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "DiscussionThreading": 
"DiscussionThreading.php/DiscussionThreading.class.php"
+   },
+   "Hooks": {
+   "EditPage::showEditForm:initial": [
+   "DiscussionThreading::efDiscussionThread",
+   "DiscussionThreading::efDiscussionThreadEdit"
+   ],
+   "EditPage::attemptSave": "DiscussionThreading::onAttemptSave",
+   "AlternateEdit": "DiscussionThreading::efDiscussionThreadEdit",
+   "DoEditSectionLink": "DiscussionThreading::onDoEditSectionLink"
+   },
+   "config": {
+   "SectionThreadingOn": {
+   "value": true
+   }
+   },
+   "manifest_version": 2
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c51aba7aba8cdda7fd8fbb2ce2ddd37b64040cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DiscussionThreading
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...DiscussionThreading[master]: Move functions to class

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

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

Change subject: Move functions to class
..

Move functions to class

Change-Id: If328caabd065fdf76e5e47fa621f0bc6cf271854
---
A DiscussionThreading.class.php
M DiscussionThreading.php
2 files changed, 146 insertions(+), 136 deletions(-)


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

diff --git a/DiscussionThreading.class.php b/DiscussionThreading.class.php
new file mode 100644
index 000..fb4be45
--- /dev/null
+++ b/DiscussionThreading.class.php
@@ -0,0 +1,139 @@
+isTalkPage() ) {
+   $spanOpen="";
+   $spanClose="";
+   $strippedResults = substr( substr( $result, strlen( 
$spanOpen ) ) , 0 , -strlen( $spanClose ) );
+   $commenturl = '§ion='.$section.'&replyto=yes';
+   $hint = ( $hint=='' ) ? '' : array( 'title' => 
wfMessage( 'discussionthreading-replysectionhint', $hint )->escaped() );
+   $curl = Linker::link(
+   $nt,
+   wfMessage( 'discussionthreading-replysection' 
)->escaped(),
+   $hint,
+   array( 'action' => 'edit' . $commenturl ),
+   array( 'known' )
+   );
+   $newthreadurl = '§ion=new';
+   $hint = ( $hint=='' ) ? '' : ' title="' . wfMessage( 
'discussionthreading-threadnewsectionhint', $hint )->escaped() . '"';
+   $nurl = Linker::link(
+   $nt,
+   wfMessage( 
'discussionthreading-threadnewsection' )->escaped(),
+   $hint,
+   array( 'action' => 'edit' . $newthreadurl ),
+   array( 'known' )
+   );
+   $nurl = '[' 
. $nurl . ']';
+   $curl = '[' 
. $curl . ']';
+   $result = $spanOpen . $nurl . $strippedResults . $curl 
. $spanClose;
+   }
+   return true;
+   }
+
+
+   /**
+* This function is a hook used to test to see if empty, if so, start a 
comment
+*
+* @param $efform EditPage object.
+* @return  true
+*/
+   public static function efDiscussionThreadEdit( $efform ) {
+   global $wgRequest,$wgSectionThreadingOn;
+   $efform->replytosection = '';
+   $efform->replyadded = false;
+   $efform->replytosection = $wgRequest->getVal( 'replyto' );
+   if( !$efform->mTitle->exists() ) {
+   if( $wgSectionThreadingOn && 
$efform->mTitle->isTalkPage() ) {
+   $efform->section = 'new';
+   }
+   }
+   return true;
+   }
+
+   /**
+* Create a new header, one level below the 'replyto' header, add re: 
to front and tag it with user information
+*
+* @param $efform EditPage Object before display
+* @return  true
+*/
+   public static function efDiscussionThread($efform){
+   global $wgSectionThreadingOn;
+   $wgSectionThreadingOn = isset( $wgSectionThreadingOn ) ? 
$wgSectionThreadingOn : false;
+   if ( $efform->replytosection != '' && $wgSectionThreadingOn  && 
!$efform->replyadded ) {
+   if ($efform->replytosection != '' ) {
+   $text = $efform->textbox1;
+   $matches = array();
+   preg_match( "/^(=+)(.+)\\1/mi" ,
+   $efform->textbox1 ,
+   $matches );
+   if( !empty( $matches[2] ) ) {
+   preg_match( "/.*(-+)\\1/mi" , 
$matches[2] , $matchsign );
+   if (!empty($matchsign[0]) ){
+   $text = 
$text."\n\n".$matches[1]."=Re: ".trim( $matchsign[0] )." ".$matches[1]."=";
+   } else {
+   $text = 
$text."\n\n".$matches[1]."=Re: ".trim( $matches[2] )." -- ".$matches[1]."=";
+   }
+   } else {
+   $text = $text." -- \n\n";
+   }
+   // Add an appropriate number of colons (:) to 
indent the body.
+   // Include replace me text, so the user knows 
where to reply
+   $replaceMeText = " Replace this text with yo

[MediaWiki-commits] [Gerrit] oojs/ui[master]: TextInputWidget/MediaWiki theme: Improve Less code and align...

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

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

Change subject: TextInputWidget/MediaWiki theme: Improve Less code and align 
labels
..

TextInputWidget/MediaWiki theme: Improve Less code and align labels

Following-up I1ecbf767a598704c3913d8853a458f0fe526f5d1 to align
labels with new `padding` in MediaWiki theme. Also:
* simplifying selectors by concatenating,
* relying on `left` and `right` only instead of mixing them with
`margin` and `padding`
* introducing new variables instead of fixed values,
* increasing `textarea`'s `line-height` for better readability,
* removing superfluos properties, that were either not applied or
duplicated in theme, or just setting default UA value (`margin: 0`) and
* putting `-enabled` & `-disabled` selectors at the bottom as with
other widgets.

Change-Id: Ib0db2c123366ca443bcaa718d7ee1c4c4759
---
M src/styles/widgets/TextInputWidget.less
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
3 files changed, 85 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/59/323659/1

diff --git a/src/styles/widgets/TextInputWidget.less 
b/src/styles/widgets/TextInputWidget.less
index 534c0be..76b3556 100644
--- a/src/styles/widgets/TextInputWidget.less
+++ b/src/styles/widgets/TextInputWidget.less
@@ -56,40 +56,17 @@
}
 
&.oo-ui-iconElement > .oo-ui-iconElement-icon,
-   &.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
+   &.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator,
+   > .oo-ui-labelElement-label {
display: block;
position: absolute;
top: 0;
+   }
+
+   &.oo-ui-iconElement > .oo-ui-iconElement-icon,
+   &.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
height: 100%;
-
.oo-ui-unselectable();
-   }
-
-   &.oo-ui-widget-enabled {
-   > .oo-ui-iconElement-icon,
-   > .oo-ui-indicatorElement-indicator {
-   cursor: text;
-   }
-
-   &.oo-ui-textInputWidget-type-search {
-   > .oo-ui-indicatorElement-indicator {
-   cursor: pointer;
-   }
-   }
-   }
-
-   &.oo-ui-widget-disabled {
-   input,
-   textarea {
-   .oo-ui-unselectable();
-   }
-   & .oo-ui-labelElement-label {
-   .oo-ui-unselectable();
-   }
-   }
-
-   &.oo-ui-labelElement > .oo-ui-labelElement-label {
-   display: block;
}
 
> .oo-ui-iconElement-icon,
@@ -102,9 +79,26 @@
right: 0;
}
 
-   > .oo-ui-labelElement-label {
-   position: absolute;
-   top: 0;
+   &.oo-ui-widget-enabled {
+   > .oo-ui-iconElement-icon,
+   > .oo-ui-indicatorElement-indicator,
+   > .oo-ui-labelElement-label {
+   cursor: text;
+   }
+
+   &.oo-ui-textInputWidget-type-search {
+   > .oo-ui-indicatorElement-indicator {
+   cursor: pointer;
+   }
+   }
+   }
+
+   &.oo-ui-widget-disabled {
+   input,
+   textarea,
+   & .oo-ui-labelElement-label {
+   .oo-ui-unselectable();
+   }
}
 
.theme-oo-ui-textInputWidget();
diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index ec7d6a7..47369de 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -60,6 +60,8 @@
 @min-height-toggleswitch: 26px; // equals `16px` @size-toggleswitch-grip-min + 
4px*2 distance top/bottom + 1px*2 border top/bottom
 @max-width-default: 50em;
 @max-width-input: @max-width-default;
+@max-height-icon: 32 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `2.5em`≈`32px` at base `font-size: 12.8px`
+@max-height-indicator: @max-height-icon;
 
 @size-default: 32 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `2.5em`≈`32px` at base `font-size: 12.8px`
 @size-button-default: @size-default;
@@ -94,6 +96,13 @@
 
 @padding-widget-default: 7 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.547em`≈`7px` at base `font-size: 12.8px`
 @padding-top-input-text: 8 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.625em`≈`8px` at base `font-size: 12.8px`
+@padding-top-textarea: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.625em`≈`8px` at base `font-size: 12.8px`
+@padding-left-widget-icon: @size-icon + ( 10 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default ); // equals `2.65625em`≈`34px` at base `font-s

[MediaWiki-commits] [Gerrit] mediawiki...DiscussionThreading[master]: Some code cleanup

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

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

Change subject: Some code cleanup
..

Some code cleanup

Change-Id: I0404779db619ec53d69dfb3e9ed2a37638808866
---
M DiscussionThreading.php
1 file changed, 18 insertions(+), 11 deletions(-)


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

diff --git a/DiscussionThreading.php b/DiscussionThreading.php
index 72c0e01..4108102 100644
--- a/DiscussionThreading.php
+++ b/DiscussionThreading.php
@@ -27,10 +27,10 @@
 /**
  * Set up hooks for discussion threading
  *
- * @param $wgSectionThreadingOn global logical variable to activate threading
+ * @param $wgSectionThreadingOn bool global logical variable to activate 
threading
  */
 global $wgSectionThreadingOn;
-$wgSectionThreadingOn = True;
+$wgSectionThreadingOn = true;
 
 $wgHooks['EditPage::showEditForm:initial'][] =  'efDiscussionThread';
 $wgHooks['EditPage::attemptSave'][] = 'efStampReply';
@@ -38,13 +38,21 @@
 $wgHooks['AlternateEdit'][] =  'efDiscussionThreadEdit';
 $wgHooks['DoEditSectionLink'][] =  'efDoDiscussionLink';
 
-function efDoDiscussionLink ( $callobj , $nt , $section , $hint='' , &$result )
+/**
+ * @param $callobj
+ * @param $nt Title
+ * @param $section
+ * @param string $hint
+ * @param $result
+ * @return bool
+ */
+function efDoDiscussionLink ( $callobj , $nt , $section , $hint = '' , 
&$result )
 {
global $wgSectionThreadingOn;
if($wgSectionThreadingOn && $nt->isTalkPage() ) {
$spanOpen="";
$spanClose="";
-   $strippedResults = substr( substr( $result , strlen( $spanOpen 
)) , 0 , -strlen( $spanClose ) );
+   $strippedResults = substr( substr( $result, strlen( $spanOpen ) 
) , 0 , -strlen( $spanClose ) );
$commenturl = '§ion='.$section.'&replyto=yes';
$hint = ( $hint=='' ) ? '' : array( 'title' => wfMessage( 
'discussionthreading-replysectionhint', $hint )->escaped() );
$curl = Linker::link(
@@ -65,7 +73,7 @@
);
$nurl = '[' . $nurl 
. ']';
$curl = '[' . $curl 
. ']';
-   $result = $spanOpen.$nurl.$strippedResults.$curl.$spanClose;
+   $result = $spanOpen . $nurl . $strippedResults . $curl . 
$spanClose;
}
return true;
 }
@@ -74,7 +82,7 @@
 /**
  * This function is a hook used to test to see if empty, if so, start a comment
  *
- * @param $efform form object.
+ * @param $efform EditPage object.
  * @return  true
  */
 function efDiscussionThreadEdit( $efform ) {
@@ -93,7 +101,7 @@
 /**
  * Create a new header, one level below the 'replyto' header, add re: to front 
and tag it with user information
  *
- * @param $efform Form Object before display
+ * @param $efform EditPage Object before display
  * @return  true
  */
 function efDiscussionThread($efform){
@@ -142,15 +150,14 @@
$efform->replyadded = true;
$efform->textbox1 = $text;
}
-   return ( true );
}
-   return ( true );
+   return true;
 }
 
 /**
  * When the new header is created from summary in new (+) add comment, just 
stamp the header as created
  *
- * @param $efform Form Object before display
+ * @param $efform EditPage Object before display
  * @return  true
  */
 function efStampReply($efform){
@@ -159,5 +166,5 @@
if ( $efform->section == "new" && $wgSectionThreadingOn  && 
!$efform->replyadded ) {
$efform->summary = $efform->summary." -- ";
}
-   return( true );
+   return true;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0404779db619ec53d69dfb3e9ed2a37638808866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DiscussionThreading
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...DiscussionThreading[master]: Remove < MW 1.14 support

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

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

Change subject: Remove < MW 1.14 support
..

Remove < MW 1.14 support

https://www.mediawiki.org/wiki/Manual:Hooks/EditSectionLinkForOther was removed
in MW 1.14

Change-Id: I6b830cdffa6c9616cbdca041b853c252412c20e4
---
M DiscussionThreading.php
1 file changed, 0 insertions(+), 37 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DiscussionThreading 
refs/changes/57/323657/1

diff --git a/DiscussionThreading.php b/DiscussionThreading.php
index aca0594..72c0e01 100644
--- a/DiscussionThreading.php
+++ b/DiscussionThreading.php
@@ -35,45 +35,8 @@
 $wgHooks['EditPage::showEditForm:initial'][] =  'efDiscussionThread';
 $wgHooks['EditPage::attemptSave'][] = 'efStampReply';
 $wgHooks['EditPage::showEditForm:initial'][] =  'efDiscussionThreadEdit';
-$wgHooks['EditSectionLinkForOther'][] =  'efDiscussionLink4other';
 $wgHooks['AlternateEdit'][] =  'efDiscussionThreadEdit';
 $wgHooks['DoEditSectionLink'][] =  'efDoDiscussionLink';
-
-/**
- * This function creates a linkobject for the editSectionLinkForOther function 
in linker
- *
- * @param $callobj Article object.
- * @param $title Title object.
- * @param $section Integer: section number.
- * @param $hint Link String: title, or default if omitted or empty
- * @param $url Link String: for edit url
- * @param $result String: Returns the section [new][edit][reply] html if in a 
talk page - otherwise whatever came in with
- * @return  true
- */
-function efDiscussionLink4other ( $callobj , $title , $section , $url , 
&$result )
-{
-   global $wgSectionThreadingOn;
-   if( $wgSectionThreadingOn && $title->isTalkPage() ) {
-   $commenturl = '§ion='.$section.'&replyto=yes';
-   $curl = Linker::link(
-   $title,
-   wfMessage('discussionthreading-replysection' 
)->escaped(),
-   array(),
-   array( 'action' => 'edit' . $commenturl ),
-   array( 'known' )
-   );
-   $newthreadurl = '§ion=new';
-   $nurl = Linker::link(
-   $nt,
-   wfMessage('discussionthreading-threadnewsection' 
)->escaped(),
-   array(),
-   array( 'action' => 'edit' . $newthreadurl ),
-   array( 'known' )
-   );
-   $result =  $nurl."][".$url."][".$curl;
-   }
-   return ( true );
-}
 
 function efDoDiscussionLink ( $callobj , $nt , $section , $hint='' , &$result )
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b830cdffa6c9616cbdca041b853c252412c20e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DiscussionThreading
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Add a webapp manifest

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

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

Change subject: Add a webapp manifest
..

Add a webapp manifest

Bug: T108878
Change-Id: I84c82cb7b2b02007df7adc33baaea6c54d61c4aa
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_psr4.php
M composer/installed.json
A stil/gd-text/.gitignore
A stil/gd-text/README.md
A stil/gd-text/composer.json
A stil/gd-text/examples/alignment.gif
A stil/gd-text/examples/debug.png
A stil/gd-text/examples/fonts.png
A stil/gd-text/examples/lineheight.gif
A stil/gd-text/src/Box.php
A stil/gd-text/src/Color.php
14 files changed, 564 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/56/323656/1

diff --git a/composer.json b/composer.json
index 02d8104..6065b01 100644
--- a/composer.json
+++ b/composer.json
@@ -32,6 +32,7 @@
"pimple/pimple": "2.1.1",
"psr/log": "1.0.0",
"ruflin/elastica": "3.1.1",
+   "stil/gd-text":  "1.0.0",
"symfony/process": "3.0.4",
"wikimedia/assert": "0.2.2",
"wikimedia/avro": "1.7.7",
diff --git a/composer.lock b/composer.lock
index 245..05b7f58 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "b17b7a811c8ff679b7c6d108c1f81e83",
-"content-hash": "da2b764402ee804df059aa5368f84c2d",
+"hash": "292faee4fba200fdaf2f34e66a03ff92",
+"content-hash": "e83297b8a45f948622cd770f5464d102",
 "packages": [
 {
 "name": "composer/semver",
@@ -1158,6 +1158,37 @@
 "time": "2016-03-18 07:56:36"
 },
 {
+"name": "stil/gd-text",
+"version": "v1.0.0",
+"source": {
+"type": "git",
+"url": "https://github.com/stil/gd-text.git";,
+"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/stil/gd-text/zipball/a3e561afd5a53a6a4b0c1d64ebaf51e768348a66";,
+"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66",
+"shasum": ""
+},
+"require": {
+"ext-gd": "*",
+"php": ">=5.3"
+},
+"type": "library",
+"autoload": {
+"psr-4": {
+"GDText\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/";,
+"license": [
+"MIT"
+],
+"description": "A class drawing multiline and aligned text on 
pictures. Uses GD extension.",
+"time": "2015-01-02 12:21:25"
+},
+{
 "name": "symfony/process",
 "version": "v3.0.4",
 "source": {
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 46826ac..49a958f 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -297,6 +297,8 @@
 'Firebase\\JWT\\ExpiredException' => $vendorDir . 
'/firebase/php-jwt/src/ExpiredException.php',
 'Firebase\\JWT\\JWT' => $vendorDir . '/firebase/php-jwt/src/JWT.php',
 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . 
'/firebase/php-jwt/src/SignatureInvalidException.php',
+'GDText\\Box' => $vendorDir . '/stil/gd-text/src/Box.php',
+'GDText\\Color' => $vendorDir . '/stil/gd-text/src/Color.php',
 'HtmlFormatter\\HtmlFormatter' => $vendorDir . 
'/wikimedia/html-formatter/src/HtmlFormatter.php',
 'IPSet\\IPSet' => $vendorDir . '/wikimedia/ip-set/src/IPSet.php',
 'JsonSchema\\Constraints\\CollectionConstraint' => $vendorDir . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php',
diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php
index 4888bee..4921f11 100644
--- a/composer/autoload_psr4.php
+++ b/composer/autoload_psr4.php
@@ -13,6 +13,7 @@
 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
 'JsonSchema\\' => array($vendorDir . 
'/justinrainbow/json-schema/src/JsonSchema'),
+'GDText\\' => array($vendorDir . '/stil/gd-text/src'),
 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
 'Elastica\\' => array($vendorDir . '/ruflin/elastica/lib/Elastica'),
 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
diff --git a/composer/installed.json b/composer/installed.json
index bb5d6a4..4d5f9d5 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -2052,5

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Disable git gc as source of breakages

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

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

Change subject: Disable git gc as source of breakages
..

Disable git gc as source of breakages

Bug: T151676
Change-Id: I5c3a24f9e5330691fc230dfc1715055a4fc10dcd
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index 9ec1e18..466c6c6 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -192,9 +192,5 @@
 [changeCleanup]
 # Not actually used, but Gerrit complains if unset
 interval = 1 week
-[gc]
-aggressive = true
-interval = 1 week
-startTime = Sat 02:00
 [index]
 type = LUCENE

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Add a webapp manifest

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

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

Change subject: Add a webapp manifest
..

Add a webapp manifest

Bug: T108878
Change-Id: I84c82cb7b2b02007df7adc33baaea6c54d61c4aa
---
M extension.json
M i18n/en.json
A includes/api/ApiWebappManifest.php
M includes/skins/SkinMinerva.php
4 files changed, 62 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 3ce0acb..2dafcd4 100644
--- a/extension.json
+++ b/extension.json
@@ -35,7 +35,8 @@
"Uploads": "SpecialUploads"
},
"APIModules": {
-   "mobileview": "ApiMobileView"
+   "mobileview": "ApiMobileView",
+   "webapp-manifest": "ApiWebappManifest"
},
"ValidSkinNames": {
"minerva": "Minerva"
@@ -61,6 +62,7 @@
"MobileUI": "includes/MobileUI.php",
"ApiMobileView": "includes/api/ApiMobileView.php",
"ApiParseExtender": "includes/api/ApiParseExtender.php",
+   "ApiWebappManifest": "includes/api/ApiWebappManifest.php",
"InlineDiffFormatter": "includes/diff/InlineDiffFormatter.php",
"InlineDifferenceEngine": 
"includes/diff/InlineDifferenceEngine.php",
"MobileSiteModule": "includes/modules/MobileSiteModule.php",
diff --git a/i18n/en.json b/i18n/en.json
index 728a23c..022ace8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -386,6 +386,7 @@
"apihelp-parse-param-mobileformat": "Return parse output in a format 
suitable for mobile devices.",
"apihelp-parse-param-noimages": "Disable images in mobile output.",
"apihelp-parse-param-mainpage": "Apply mobile main page 
transformations.",
+   "apihelp-webapp-manifest-description": "Returns a webapp manifest.",
"apierror-mobilefrontend-badidtitle": "Bad revision id/title 
combination.",
"apierror-mobilefrontend-toomanysizeparams": "thumbsize is 
mutually exclusive with thumbwidth and thumbheight.",
"apiwarn-mobilefrontend-ignoringnoheadings": "noheadings 
makes no sense on the main page, ignoring.",
diff --git a/includes/api/ApiWebappManifest.php 
b/includes/api/ApiWebappManifest.php
new file mode 100644
index 000..a395cae
--- /dev/null
+++ b/includes/api/ApiWebappManifest.php
@@ -0,0 +1,45 @@
+getConfig();
+   $resultObj = $this->getResult();
+   $resultObj->addValue( null, 'name', $config->get( 'Sitename' ) 
);
+   $resultObj->addValue( null, 'orientation', 'portrait' );
+   $resultObj->addValue( null, 'dir', $config->get( 'ContLang' 
)->getDir() );
+   $resultObj->addValue( null, 'lang', $config->get( 
'LanguageCode' ) );
+   $resultObj->addValue( null, 'display', 'browser' );
+   $resultObj->addValue( null, 'theme_color', '#252525' );
+   $resultObj->addValue( null, 'background_color', '#FF' );
+   $resultObj->addValue( null, 'start_url', 
Title::newMainPage()->getFullUrl() );
+
+   $icons = [];
+
+   $logo = $config->get( 'Logo' );
+   if ( $logo !== false ) {
+   $icons[] = [ 'src' => $logo ];
+   }
+   $favicon = $config->get( 'Favicon' );
+   if ( $favicon !== false ) {
+   $icons[] = [ 'src' => $favicon ];
+   }
+   $appleTouchIcon = $config->get( 'AppleTouchIcon' );
+   if ( $appleTouchIcon !== false ) {
+   $icons[] = [ 'src' => $appleTouchIcon ];
+   }
+
+   $resultObj->addValue( null, 'icons', $icons );
+   }
+
+}
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 3880393..f815988 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -53,6 +53,7 @@
 * @return QuickTemplate
 */
protected function prepareQuickTemplate() {
+   global $wgServer;
$appleTouchIcon = $this->getConfig()->get( 'AppleTouchIcon' );
 
$out = $this->getOutput();
@@ -63,6 +64,18 @@
$out->addMeta( 'viewport', 'initial-scale=1.0, 
user-scalable=yes, minimum-scale=0.25, ' .
'maximum-scale=5.0, width=device-width'
);
+   $out->addLink(
+   array(
+   'rel' => 'manifest',
+   'href' => wfExpandUrl(
+   wfAppendQuery(
+   wfScript( 'api' ),
+   [ 'action' => 
'webapp-manifest', 'format' => 'json' ]
+   ),
+ 

[MediaWiki-commits] [Gerrit] mediawiki...EventBus[master]: Don't try to get revision ID for a link update if no revisio...

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

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

Change subject: Don't try to get revision ID for a link update if no revision 
triggered it
..

Don't try to get revision ID for a link update if no revision triggered it

Change-Id: I618f9fb50ec73090234509e26e25f607878779e6
---
M EventBus.hooks.php
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/EventBus.hooks.php b/EventBus.hooks.php
index c08482a..47c9df2 100644
--- a/EventBus.hooks.php
+++ b/EventBus.hooks.php
@@ -664,10 +664,13 @@
'page_id'=> $title->getArticleID(),
'page_title' => $title->getPrefixedDBkey(),
'page_namespace' => $title->getNamespace(),
-   'page_is_redirect'   => $title->isRedirect(),
-   'rev_id' => $revision->getId()
+   'page_is_redirect'   => $title->isRedirect()
];
 
+   if ( $revision ) {
+   $attrs['rev_id'] = $revision->getId();
+   }
+
if ( !is_null( $user ) ) {
$attrs['performer'] = self::createPerformerAttrs( $user 
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I618f9fb50ec73090234509e26e25f607878779e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[REL1_27]: Add a webapp manifest

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

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

Change subject: Add a webapp manifest
..

Add a webapp manifest

Bug: T108878
Change-Id: I24ff5347b39ce2b7cf04ff6f8a46b47accc933b7
---
M extension.json
A includes/api/ApiWebappManifest.php
M includes/skins/SkinMinerva.php
3 files changed, 69 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 3be6a3d..1f32afc 100644
--- a/extension.json
+++ b/extension.json
@@ -48,7 +48,8 @@
"Uploads": "SpecialUploads"
},
"APIModules": {
-   "mobileview": "ApiMobileView"
+   "mobileview": "ApiMobileView",
+   "webapp-manifest": "ApiWebappManifest"
},
"ValidSkinNames": {
"minerva": "Minerva"
@@ -78,6 +79,7 @@
"MobileUI": "includes/MobileUI.php",
"ApiMobileView": "includes/api/ApiMobileView.php",
"ApiParseExtender": "includes/api/ApiParseExtender.php",
+   "ApiWebappManifest": "includes/api/ApiWebappManifest.php",
"InlineDiffFormatter": "includes/diff/InlineDiffFormatter.php",
"InlineDifferenceEngine": 
"includes/diff/InlineDifferenceEngine.php",
"MobileSiteModule": "includes/modules/MobileSiteModule.php",
diff --git a/includes/api/ApiWebappManifest.php 
b/includes/api/ApiWebappManifest.php
new file mode 100644
index 000..f3eb649
--- /dev/null
+++ b/includes/api/ApiWebappManifest.php
@@ -0,0 +1,53 @@
+getConfig();
+$resultObj = $this->getResult();
+$resultObj->addValue( null, 'name', $config->get( 'Sitename' ) );
+$resultObj->addValue( null, 'orientation', 'portrait' );
+$resultObj->addValue( null, 'dir', $config->get( 'ContLang' 
)->getDir() );
+$resultObj->addValue( null, 'lang', $config->get( 'LanguageCode' ) );
+$resultObj->addValue( null, 'display', 'browser' );
+$resultObj->addValue( null, 'theme_color', '#252525' );
+$resultObj->addValue( null, 'background_color', '#FF' );
+$resultObj->addValue( null, 'start_url', 
Title::newMainPage()->getFullUrl() );
+
+$icons = [];
+
+$logo = $config->get( 'Logo' );
+if ( $logo !== false ) {
+$icons[] = [ 'src' => $logo ];
+}
+$favicon = $config->get( 'Favicon' );
+if ( $favicon !== false ) {
+$icons[] = [ 'src' => $favicon ];
+}
+$appleTouchIcon = $config->get( 'AppleTouchIcon' );
+if ( $appleTouchIcon !== false ) {
+$icons[] = [ 'src' => $appleTouchIcon ];
+}
+
+$resultObj->addValue( null, 'icons', $icons );
+}
+
+/**
+* Get description of this Api.
+* @deprecated since MediaWiki core 1.25
+* @return string
+*/
+public function getDescription() {
+return 'Returns a webapp manifest';
+}
+}
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index ec80170..497909b 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -46,6 +46,7 @@
 * @return QuickTemplate
 */
protected function prepareQuickTemplate() {
+   global $wgServer;
$appleTouchIcon = $this->getConfig()->get( 'AppleTouchIcon' );
 
$out = $this->getOutput();
@@ -56,6 +57,18 @@
$out->addMeta( 'viewport', 'initial-scale=1.0, 
user-scalable=yes, minimum-scale=0.25, ' .
'maximum-scale=5.0, width=device-width'
);
+   $out->addLink(
+   array(
+   'rel' => 'manifest',
+   'href' => wfExpandUrl(
+   wfAppendQuery(
+   wfScript( 'api' ),
+   [ 'action' => 
'webapp-manifest', 'format' => 'json' ]
+   ),
+   PROTO_RELATIVE
+   )
+   )
+   );
 
// Generate skin template
$tpl = parent::prepareQuickTemplate();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24ff5347b39ce2b7cf04ff6f8a46b47accc933b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: REL1_27
Gerrit-Owner: Rudloff 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Create user group messages for wikitech.wikimedia.org

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

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

Change subject: Create user group messages for wikitech.wikimedia.org
..

Create user group messages for wikitech.wikimedia.org

Wikitech has some specific user groups only used there. As such I've
created a /wikimedialabs/ folder to host this very specific messages. I've
also tagged them as optional because translation is not really required
but it won't harm if done. In addition to the en.json file, I've added a
qqq.json file to host the descriptions to help possible translators.

Change-Id: I3eb60bb2f225e5bb8a83062984c53804312b42ff
---
A i18n/wikimedialabs/en.json
A i18n/wikimedialabs/qqq.json
2 files changed, 36 insertions(+), 0 deletions(-)


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

diff --git a/i18n/wikimedialabs/en.json b/i18n/wikimedialabs/en.json
new file mode 100644
index 000..e720d5c
--- /dev/null
+++ b/i18n/wikimedialabs/en.json
@@ -0,0 +1,18 @@
+{
+   "@metadata": {
+   "authors": []
+   },
+   "group-contentadmin": "Content administrators",
+   "group-contentadmin-member": "{{GENDER:$1|content administrator}}",
+   "grouppage-contentadmin": "{{ns:project}}:Content administrators",
+   "group-cloudadmin": "Cloud administrators",
+   "group-cloudadmin-member": "{{GENDER:$1|cloud administrator}}",
+   "grouppage-cloudadmin": "{{ns:project}}:Cloud administrators",
+   "group-shell": "Shell users",
+   "group-shell-member": "{{GENDER:$1|shell user}}",
+   "grouppage-shell": "{{ns:project}}:Shell users",
+   "group-shellmanagers": "Shell users managers",
+   "group-shellmanagers-member": "{{GENDER:$1|shell users manager}}",
+   "grouppage-shellmanagers": "{{GENDER:$1}}:Shell users manager}}",
+   "right-manageglobalpuppet": "Manage the global puppet",
+}
\ No newline at end of file
diff --git a/i18n/wikimedialabs/qqq.json b/i18n/wikimedialabs/qqq.json
new file mode 100644
index 000..725d2a1
--- /dev/null
+++ b/i18n/wikimedialabs/qqq.json
@@ -0,0 +1,18 @@
+{
+   "@metadata": {
+   "authors": []
+   },
+   "group-contentadmin": 
"{{optional}}\n{{doc-group|contentadmin}}\nSpecific user group description for 
Wikimedia Labs wikitechwiki.",
+   "group-contentadmin-member": 
"{{optional}}\n{{doc-group|contentadmin|member}}\nSpecific user group for 
Wikimedia Labs wikitechwiki.",
+   "grouppage-contentadmin": 
"{{optional}}\n{{doc-group|contentadmin|page}}\nSpecific user group information 
page for Wikimedia Labs wikitechwiki.",
+   "group-cloudadmin": "{{optional}}\n{{doc-group|cloudadmin}}\nSpecific 
user group description for Wikimedia Labs wikitechwiki.",
+   "group-cloudadmin-member": 
"{{optional}}\n{{doc-group|cloudadmin|member}}\nSpecific user group for 
Wikimedia Labs wikitechwiki.",
+   "grouppage-cloudadmin": 
"{{optional}}\n{{doc-group|cloudadmin|page}}\nSpecific user group information 
page for Wikimedia Labs wikitechwiki.",
+   "group-shell": "{{optional}}\n{{doc-group|shell}}\nSpecific user group 
description for Wikimedia Labs wikitechwiki.",
+   "group-shell-member": 
"{{optional}}\n{{doc-group|shell|member}}\nSpecific user group for Wikimedia 
Labs wikitechwiki.",
+   "grouppage-shell": "{{optional}}\n{{doc-group|shell|page}}"\nSpecific 
user group information page for Wikimedia Labs wikitechwiki.,
+   "group-shellmanagers": 
"{{optional}}\n{{doc-group|shellmanagers}}\nSpecific user group description for 
Wikimedia Labs wikitechwiki.",
+   "group-shellmanagers-member": 
"{{optional}}\n{{doc-group|shellmanagers|member}}\nSpecific user group for 
Wikimedia Labs wikitechwiki.",
+   "grouppage-shellmanagers": 
"{{optional}}\n{{doc-group|shellmanagers|page}}\nSpecific user group 
information page for Wikimedia Labs wikitechwiki.",
+   "right-manageglobalpuppet": 
"{{optional}}\n{{doc-right|manageglobalpuppet}}\nSpecific user permission used 
in Wikimedia Labs wikitechwiki.",
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3eb60bb2f225e5bb8a83062984c53804312b42ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 

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


[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: Remove 2ColConflict, seems dupey

2016-11-26 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Remove 2ColConflict, seems dupey
..


Remove 2ColConflict, seems dupey

Change-Id: Ic9b76aa4f790e7c1ea982316a5b29a7fd731
---
M .gitmodules
D 2ColConflict
2 files changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index 22171a9..4cee69c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,7 +1,3 @@
-[submodule "2ColConflict"]
-   path = 2ColConflict
-   url = 
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/2ColConflict.git
-   branch = .
 [submodule "AJAXPoll"]
path = AJAXPoll
url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AJAXPoll.git
diff --git a/2ColConflict b/2ColConflict
deleted file mode 16
index 4fd6a3f..000
--- a/2ColConflict
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4fd6a3f86538f97fb4c96aa55bdf3452b3c2796a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9b76aa4f790e7c1ea982316a5b29a7fd731
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: Remove 2ColConflict, seems dupey

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

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

Change subject: Remove 2ColConflict, seems dupey
..

Remove 2ColConflict, seems dupey

Change-Id: Ic9b76aa4f790e7c1ea982316a5b29a7fd731
---
M .gitmodules
D 2ColConflict
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/50/323650/1

diff --git a/.gitmodules b/.gitmodules
index 22171a9..4cee69c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,7 +1,3 @@
-[submodule "2ColConflict"]
-   path = 2ColConflict
-   url = 
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/2ColConflict.git
-   branch = .
 [submodule "AJAXPoll"]
path = AJAXPoll
url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AJAXPoll.git
diff --git a/2ColConflict b/2ColConflict
deleted file mode 16
index 4fd6a3f..000
--- a/2ColConflict
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4fd6a3f86538f97fb4c96aa55bdf3452b3c2796a

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make reset button in SpecialWatchlist a OOUI form

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

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

Change subject: Make reset button in SpecialWatchlist a OOUI form
..

Make reset button in SpecialWatchlist a OOUI form

Change-Id: I65dc3e117a38e06da2460d0e209da7ccfd72d3cf
---
M includes/specials/SpecialWatchlist.php
1 file changed, 44 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/323649/1

diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 4824961..070db2c 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -605,15 +605,7 @@
$form .= "";
 
if ( $numItems > 0 && $showUpdatedMarker ) {
-   $form .= Xml::openElement( 'form', [ 'method' => 'post',
-   'action' => 
$this->getPageTitle()->getLocalURL(),
-   'id' => 'mw-watchlist-resetbutton' ] ) . "\n" .
-   Xml::submitButton( $this->msg( 'enotif_reset' 
)->text(), [ 'name' => 'dummy' ] ) . "\n" .
-   Html::hidden( 'reset', 'all' ) . "\n";
-   foreach ( $nondefaults as $key => $value ) {
-   $form .= Html::hidden( $key, $value ) . "\n";
-   }
-   $form .= Xml::closeElement( 'form' ) . "\n";
+   $form .= $this->addResetButton( $nondefaults );
}
 
$form .= Xml::openElement( 'form', [
@@ -656,4 +648,47 @@
$count = $store->countWatchedItems( $this->getUser() );
return floor( $count / 2 );
}
+
+   /**
+* @param string[] $nondefaults
+* @return \OOUI\FormLayout
+*/
+   private function addResetButton( $nondefaults ) {
+   $this->getOutput()->enableOOUI();
+   $resetForm = new OOUI\FormLayout( [
+   'method' => 'post',
+   'action' => $this->getPageTitle()->getLocalURL(),
+   'id' => 'mw-watchlist-resetbutton'
+   ] );
+   $resetFields = [ new OOUI\FieldLayout(
+   new OOUI\ButtonInputWidget( [
+   'name' => 'dummy',
+   'value' => $this->msg( 'enotif_reset' )->text(),
+   'label' => $this->msg( 'enotif_reset' )->text(),
+   'flags' => [ 'primary', 'progressive' ],
+   'type' => 'submit',
+   ] ),
+   [
+   'align' => 'top',
+   ]
+   ) ];
+
+   $resetFieldset = new OOUI\FieldsetLayout( [
+   'label' => $this->msg( 'move-page-legend' )->text(),
+   'id' => 'mw-movepage-table',
+   'items' => $resetFields,
+   ] );
+   $resetHiddenFields = Html::hidden( 'reset', 'all' ) . "\n";
+   foreach ( $nondefaults as $key => $value ) {
+   $resetHiddenFields .= Html::hidden( $key, $value ) . 
"\n";
+   }
+   $resetForm->appendContent(
+   $resetFieldset,
+   new OOUI\HtmlSnippet(
+   $resetHiddenFields
+   )
+   );
+   return $resetForm;
+   }
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2016-11-26T10:00:01+0000

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

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

Change subject: New Wikidata Build - 2016-11-26T10:00:01+
..

New Wikidata Build - 2016-11-26T10:00:01+

Change-Id: I883ff618b3bb701628fa6f9de3346eb82377286c
---
M composer.lock
M extensions/ExternalValidation/i18n/pt.json
M extensions/MediaInfo/i18n/pt.json
M extensions/Wikibase/client/includes/Store/Sql/DirectSqlStore.php
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/client/tests/phpunit/includes/Api/PageTermsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php
M extensions/Wikibase/lib/i18n/nb.json
M extensions/Wikibase/lib/i18n/sv.json
M extensions/Wikibase/lib/includes/Store/Sql/TermSqlIndex.php
M extensions/Wikibase/lib/includes/TermIndexEntry.php
M 
extensions/Wikibase/lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
M extensions/Wikibase/lib/tests/phpunit/NoBadDependencyUsageTest.php
M extensions/Wikibase/lib/tests/phpunit/Store/BufferingTermLookupTest.php
M extensions/Wikibase/lib/tests/phpunit/Store/EntityTermLookupTest.php
M 
extensions/Wikibase/lib/tests/phpunit/Store/LanguageFallbackLabelDescriptionLookupTest.php
M extensions/Wikibase/lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
M extensions/Wikibase/lib/tests/phpunit/Store/TermPropertyLabelResolverTest.php
M extensions/Wikibase/lib/tests/phpunit/TermIndexEntryTest.php
M extensions/Wikibase/repo/i18n/be-tarask.json
M extensions/Wikibase/repo/i18n/eu.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/gl.json
M extensions/Wikibase/repo/i18n/he.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/pt.json
M extensions/Wikibase/repo/i18n/uk.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/Store/Sql/SqlStore.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/LabelDescriptionDuplicateDetectorTest.php
M vendor/composer/installed.json
31 files changed, 337 insertions(+), 244 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index b0772a6..95699ad 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1267,7 +1267,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityExternalValidation";,
-"reference": "10ce1f4549dc3bcaae7ec8cb1af6fc22f535514f"
+"reference": "76a3c709d986ceebda6391dc1be38cf915d5e8a9"
 },
 "require": {
 "data-values/common": ">=0.1 <0.4",
@@ -1319,7 +1319,7 @@
 "support": {
 "issues": 
"https://phabricator.wikimedia.org/project/profile/1203/";
 },
-"time": "2016-11-21 15:55:42"
+"time": "2016-11-25 21:56:38"
 },
 {
 "name": "wikibase/internal-serialization",
@@ -1436,7 +1436,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseMediaInfo";,
-"reference": "90b82546ca3971d79fa24b21a641747cb82ec469"
+"reference": "467cbdc87e6e25db5a7cee8a43e8a53ef6bb36db"
 },
 "require": {
 "php": ">=5.5.0",
@@ -1482,7 +1482,7 @@
 "issues": "https://phabricator.wikimedia.org/";,
 "irc": "irc://irc.freenode.net/wikidata"
 },
-"time": "2016-10-25 12:33:42"
+"time": "2016-11-25 21:56:28"
 },
 {
 "name": "wikibase/quality",
@@ -1585,12 +1585,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-"reference": "bec3312b78e3fac35c01486875ae3c78c468d1d5"
+"reference": "3469b1112cbb0a2fcc8f64a79b035b7394a77aec"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/bec3312b78e3fac35c01486875ae3c78c468d1d5";,
-"reference": "bec3312b78e3fac35c01486875ae3c78c468d1d5",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/3469b1112cbb0a2fcc8f64a79b035b7394a77aec";,
+"reference": "3469b1112cbb0a2fcc8f64a79b035b7394a77aec",
 "shasum": ""
 },
 "require": {
@@ -1664,7 +1664,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-11-25 08:08:36"
+"time": "2016-11-25 21:56:03"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Exte