[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: BSAboutBlueSpice: Changed the icon in the left navigation #6773

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

Change subject: BSAboutBlueSpice: Changed the icon in the left navigation #6773
..


BSAboutBlueSpice: Changed the icon in the left navigation #6773

Change-Id: Ieac7a5fd65f6adadde05c096c9bfa62b572c4fce
---
D AboutBlueSpice/resources/about-24px.png
M AboutBlueSpice/resources/bluespice.aboutbluespice.css
2 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/AboutBlueSpice/resources/about-24px.png 
b/AboutBlueSpice/resources/about-24px.png
deleted file mode 100644
index 4ecfe9c..000
--- a/AboutBlueSpice/resources/about-24px.png
+++ /dev/null
Binary files differ
diff --git a/AboutBlueSpice/resources/bluespice.aboutbluespice.css 
b/AboutBlueSpice/resources/bluespice.aboutbluespice.css
index 4c709cd..a666ce5 100644
--- a/AboutBlueSpice/resources/bluespice.aboutbluespice.css
+++ b/AboutBlueSpice/resources/bluespice.aboutbluespice.css
@@ -1,10 +1,5 @@
-#bs-nav-sections #n-aboutbluespice .icon24 {
-   /*@embed*/
-   background-image:url("about-24px.png");
-   float: left;
-   margin-right: 8px;
-}
 
 #bs-nav-sections #n-aboutbluespice .icon24::before {
-   content: "";
+   content: "\e9bf";
+   font-family: "entypo" !important;
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieac7a5fd65f6adadde05c096c9bfa62b572c4fce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1067 and db1080

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

Change subject: db-eqiad.php: Depool db1067 and db1080
..


db-eqiad.php: Depool db1067 and db1080

Depool db1067 and db1080 for an alter table

Bug: T166204
Change-Id: I0029d0f72d5d6d7f67562259f197372dbb832fa8
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 79b2bee..5d8cd9c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -94,14 +94,14 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,   # D1 2.8TB 160GB, old master
+#  'db1067' => 0,   # D1 2.8TB 160GB, old master #T166204
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 10,  # D1 2.8TB 160GB, api
'db1072' => 50,  # B2 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
-   'db1080' => 500, # A2 3.6TB 512GB
+#  'db1080' => 500, # A2 3.6TB 512GB #T166204
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: BSAboutBlueSpice: Changed the icon in the left navigation #6773

2017-07-09 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364147 )

Change subject: BSAboutBlueSpice: Changed the icon in the left navigation #6773
..

BSAboutBlueSpice: Changed the icon in the left navigation #6773

Change-Id: Ieac7a5fd65f6adadde05c096c9bfa62b572c4fce
---
D AboutBlueSpice/resources/about-24px.png
M AboutBlueSpice/resources/bluespice.aboutbluespice.css
2 files changed, 2 insertions(+), 7 deletions(-)


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

diff --git a/AboutBlueSpice/resources/about-24px.png 
b/AboutBlueSpice/resources/about-24px.png
deleted file mode 100644
index 4ecfe9c..000
--- a/AboutBlueSpice/resources/about-24px.png
+++ /dev/null
Binary files differ
diff --git a/AboutBlueSpice/resources/bluespice.aboutbluespice.css 
b/AboutBlueSpice/resources/bluespice.aboutbluespice.css
index 4c709cd..a666ce5 100644
--- a/AboutBlueSpice/resources/bluespice.aboutbluespice.css
+++ b/AboutBlueSpice/resources/bluespice.aboutbluespice.css
@@ -1,10 +1,5 @@
-#bs-nav-sections #n-aboutbluespice .icon24 {
-   /*@embed*/
-   background-image:url("about-24px.png");
-   float: left;
-   margin-right: 8px;
-}
 
 #bs-nav-sections #n-aboutbluespice .icon24::before {
-   content: "";
+   content: "\e9bf";
+   font-family: "entypo" !important;
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieac7a5fd65f6adadde05c096c9bfa62b572c4fce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Pwirth 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Fix for Blog RSS feed

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

Change subject: Fix for Blog RSS feed
..


Fix for Blog RSS feed

Im not sure what was the idea for blog RSS feed, and if this change should
even be

Customer complained about RSS feed in section Blog not showing any items
and NS_BLOG is not even listed in the list.

I have added Blog ns into select box.

When choosing any other NS (other than Blog) code retrieves subpages from
Blog page in that NS. That is ok for other NSs, but when selecting Blog ns
user is not expection to have to have another page named Blog inside
containing blog entries,  but they expect RSS feed to show all pages
inside Blog NS.

ERM: #6605

Needs cherry-picking to REL1_27 and (if possible) REL1_23

Change-Id: Idd7ee6c22052ced4facd81c836033efed22acc8d
---
M Blog/Blog.class.php
1 file changed, 33 insertions(+), 24 deletions(-)

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



diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 1c56280..00553d3 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -702,52 +702,61 @@
 
$oRequest = $this->getRequest();
$sTitle = $oRequest->getVal( 'p', '' );
-   $iNSid = $oRequest->getInt( 'ns', 0 );
+   $iNS = $oRequest->getInt( 'ns', 0 );
$aNamespaces = $wgContLang->getNamespaces();
 
-   if( $iNSid != 0 ) {
-   $sPageName = $aNamespaces[$iNSid].':'.$sTitle;
+   if( $iNS != 0 ) {
+   $sPageName = $aNamespaces[$iNS] . ':' . $sTitle;
} else {
$sPageName = $sTitle;
}
-
-   /*$dbr = wfGetDB( DB_SLAVE );
-   $res = $dbr->select(
-   array( 'page', 'recentchanges' ),
-   '*',
-   array(
-   'page_title' => $sTitle,
-   'page_namespace' => $iNSid,
-   'rc_timestamp > '. $dbr->timestamp( time() - 
intval( 7 * 86400 ) )
-   ),
-   __METHOD__,
-   array( 'ORDER BY' => 'rc_timestamp DESC' ),
-   array(
-   'page'=> array( 'LEFT JOIN', 'rc_cur_id = 
page_id' )
-   )
-   );*/
 
$oChannel = RSSCreator::createChannel(
RSSCreator::xmlEncode( $wgSitename . ' - ' . $sPageName 
),
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'], 
wfMessage( 'bs-blog-rss-desc-blog' )->plain()
);
 
-   $oTitle = Title::makeTitle( $iNSid , 'Blog' );
-   $aSubpages = $oTitle->getSubpages();
+   $aSubpages = $this->getBlogPages( $iNS );
 
foreach( $aSubpages as $oSubpage ) {
-// $oPageCP = new BsPageContentProvider();
if( $oSubpage instanceof Title ) {}
$entry = RSSItemCreator::createItem(
$oSubpage->getText(),
$oSubpage->getFullURL(),

BsPageContentProvider::getInstance()->getContentFromTitle( $oSubpage )
-// $oPageCP->getHTMLContentFor( $oSubpage )
);
$entry->setPubDate( wfTimestamp( TS_UNIX, 
$oSubpage->getTouched() ) );
$oChannel->addItem($entry);
}
return $oChannel->buildOutput();
+   }
+
+   protected function getBlogPages( $iNS ) {
+   $aSubpages = array();
+   if( $iNS == NS_BLOG ) {
+   $dbr = wfGetDB( DB_SLAVE );
+   $res = $dbr->select(
+   array( 'page' ),
+   array( 'page_title', 'page_namespace'),
+   array(
+   'page_namespace' => $iNS
+   ),
+   __METHOD__
+   );
+   foreach( $res as $row ) {
+   $oTmpTitle = Title::newFromRow( $row );
+   $aSubpages[] = $oTmpTitle;
+   }
+   } else {
+   $oTitle = Title::newFromText( 'Blog', $iNS );
+   if( $oTitle && $oTitle instanceof Title ) {
+   $aSubpages = $oTitle->getSubpages();
+   BSDebug::logVar($aSubpages);
+   }
+
+   }
+
+   return $aSubpages;
}
 
// TODO: make RSSStandards methods more generic
@@ -761,7 +770,7 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: Fix for Blog RSS feed

2017-07-09 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364146 )

Change subject: Fix for Blog RSS feed
..

Fix for Blog RSS feed

Im not sure what was the idea for blog RSS feed, and if this change should
even be

Customer complained about RSS feed in section Blog not showing any items
and NS_BLOG is not even listed in the list.

I have added Blog ns into select box.

When choosing any other NS (other than Blog) code retrieves subpages from
Blog page in that NS. That is ok for other NSs, but when selecting Blog ns
user is not expection to have to have another page named Blog inside
containing blog entries,  but they expect RSS feed to show all pages
inside Blog NS.

ERM: #6605

Needs cherry-picking to REL1_27 and (if possible) REL1_23

Change-Id: Idd7ee6c22052ced4facd81c836033efed22acc8d
---
M Blog/Blog.class.php
1 file changed, 33 insertions(+), 24 deletions(-)


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

diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 375144c..165fc96 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -701,52 +701,61 @@
 
$oRequest = $this->getRequest();
$sTitle = $oRequest->getVal( 'p', '' );
-   $iNSid = $oRequest->getInt( 'ns', 0 );
+   $iNS = $oRequest->getInt( 'ns', 0 );
$aNamespaces = $wgContLang->getNamespaces();
 
-   if( $iNSid != 0 ) {
-   $sPageName = $aNamespaces[$iNSid].':'.$sTitle;
+   if( $iNS != 0 ) {
+   $sPageName = $aNamespaces[$iNS] . ':' . $sTitle;
} else {
$sPageName = $sTitle;
}
-
-   /*$dbr = wfGetDB( DB_SLAVE );
-   $res = $dbr->select(
-   array( 'page', 'recentchanges' ),
-   '*',
-   array(
-   'page_title' => $sTitle,
-   'page_namespace' => $iNSid,
-   'rc_timestamp > '. $dbr->timestamp( time() - 
intval( 7 * 86400 ) )
-   ),
-   __METHOD__,
-   array( 'ORDER BY' => 'rc_timestamp DESC' ),
-   array(
-   'page'=> array( 'LEFT JOIN', 'rc_cur_id = 
page_id' )
-   )
-   );*/
 
$oChannel = RSSCreator::createChannel(
RSSCreator::xmlEncode( $wgSitename . ' - ' . $sPageName 
),
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'], 
wfMessage( 'bs-blog-rss-desc-blog' )->plain()
);
 
-   $oTitle = Title::makeTitle( $iNSid , 'Blog' );
-   $aSubpages = $oTitle->getSubpages();
+   $aSubpages = $this->getBlogPages( $iNS );
 
foreach( $aSubpages as $oSubpage ) {
-// $oPageCP = new BsPageContentProvider();
if( $oSubpage instanceof Title ) {}
$entry = RSSItemCreator::createItem(
$oSubpage->getText(),
$oSubpage->getFullURL(),

BsPageContentProvider::getInstance()->getContentFromTitle( $oSubpage )
-// $oPageCP->getHTMLContentFor( $oSubpage )
);
$entry->setPubDate( wfTimestamp( TS_UNIX, 
$oSubpage->getTouched() ) );
$oChannel->addItem($entry);
}
return $oChannel->buildOutput();
+   }
+
+   protected function getBlogPages( $iNS ) {
+   $aSubpages = array();
+   if( $iNS == NS_BLOG ) {
+   $dbr = wfGetDB( DB_SLAVE );
+   $res = $dbr->select(
+   array( 'page' ),
+   array( 'page_title', 'page_namespace'),
+   array(
+   'page_namespace' => $iNS
+   ),
+   __METHOD__
+   );
+   foreach( $res as $row ) {
+   $oTmpTitle = Title::newFromRow( $row );
+   $aSubpages[] = $oTmpTitle;
+   }
+   } else {
+   $oTitle = Title::newFromText( 'Blog', $iNS );
+   if( $oTitle && $oTitle instanceof Title ) {
+   $aSubpages = $oTitle->getSubpages();
+   BSDebug::logVar($aSubpages);
+   }
+
+   }
+
+   return $aSubpages;
}
 
// TODO: make RSSStandards methods more generic
@@ 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1067 and db1080

2017-07-09 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364145 )

Change subject: db-eqiad.php: Depool db1067 and db1080
..

db-eqiad.php: Depool db1067 and db1080

Depool db1067 and db1080 for an alter table

Bug: T166204
Change-Id: I0029d0f72d5d6d7f67562259f197372dbb832fa8
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 79b2bee..5d8cd9c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -94,14 +94,14 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,   # D1 2.8TB 160GB, old master
+#  'db1067' => 0,   # D1 2.8TB 160GB, old master #T166204
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 10,  # D1 2.8TB 160GB, api
'db1072' => 50,  # B2 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
-   'db1080' => 500, # A2 3.6TB 512GB
+#  'db1080' => 500, # A2 3.6TB 512GB #T166204
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: WIP: Adaptation in cxserver

2017-07-09 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363804 )

Change subject: WIP: Adaptation in cxserver
..

WIP: Adaptation in cxserver

Change-Id: I8f748fb290767cf3ca913448d66695a0dec00736
---
A adapt/Adapter.js
A adapt/TranslationUnits/Image.js
A adapt/TranslationUnits/Link.js
A adapt/TranslationUnits/Reference.js
A adapt/TranslationUnits/index.js
M lineardoc/Doc.js
M lineardoc/TextBlock.js
7 files changed, 231 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/04/363804/1

diff --git a/adapt/Adapter.js b/adapt/Adapter.js
new file mode 100644
index 000..d71b5dc
--- /dev/null
+++ b/adapt/Adapter.js
@@ -0,0 +1,53 @@
+'use strict';
+
+var LinearDoc = require( '../lineardoc' );
+
+function Adapter( content, sourceLanguage, targetLanguage ) {
+   this.parser = new LinearDoc.Parser();
+   this.parser.init();
+   this.sourceLanguage = sourceLanguage;
+   this.targetLanguage = targetLanguage;
+   this.content = content;
+   this.originalDoc = null;
+   this.adaptedDoc = null;
+}
+
+Adapter.prototype.adapt = function () {
+   this.parser.write( this.content );
+   this.originalDoc = this.parser.builder.doc;
+   this.adaptedDoc = this.originalDoc.adapt( this.getAdapter.bind( this ) 
);
+   return this.adaptedDoc;
+};
+
+/**
+ * Get the adapter for the given tag(translation unit).
+ */
+Adapter.prototype.getAdapter = function ( element ) {
+   var name, match = false, translationUnit, translationUnits, context;
+   translationUnits = require( __dirname + '/TranslationUnits/' );
+   for ( name in translationUnits ) {
+   translationUnit = translationUnits[ name ];
+   if ( translationUnit.matchTagNames ) {
+   match = translationUnit.matchTagNames.includes( 
element.name );
+   }
+   if ( translationUnit.matchRdfaTypes ) {
+   match = translationUnit.matchRdfaTypes.includes( 
element.attributes.rel ) || translationUnit.matchRdfaTypes.includes( 
element.attributes.typeof );
+   }
+   if ( match ) {
+   break;
+   }
+   }
+   if ( !match ) {
+   console.log( 'No adapter for' );
+   console.dir( element );
+   return null;
+   }
+   context = {
+   sourceLanguage: this.sourceLanguage,
+   targetLanguage: this.targetLanguage
+   };
+   console.log( 'Adapting: ' + translationUnit.name );
+   return new translationUnits[ name ]( element, context );
+};
+
+module.exports.Adapter = Adapter;
diff --git a/adapt/TranslationUnits/Image.js b/adapt/TranslationUnits/Image.js
new file mode 100644
index 000..1715ee3
--- /dev/null
+++ b/adapt/TranslationUnits/Image.js
@@ -0,0 +1,78 @@
+function MWImage( node, context ) {
+   this.node = node;
+   this.context = context;
+}
+
+MWImage.name = 'image';
+MWImage.matchTagNames = [ 'figure' ];
+MWImage.matchRdfaTypes = [ 'mw:Image/Thumb' ];
+
+MWImage.prototype.adapt = function() {
+   var imageSource;
+
+   this.node.attributes[ 'adapted' ] = 'true';
+   console.dir( this.node );
+   /*
+   this.sourceImage = this.sourceDocument.getElementsByTagName( 'img' )[ 0 
];
+   this.sourceResource = this.sourceImage.attributes[ 'resource' );
+   imageSource = this.sourceImage.getAttribute( 'src' );
+   if ( !this.isCommonsImage( imageSource ) ) {
+   // Create an empty paragraph
+   this.targetDocument = document.createElement( 'p' );
+   this.setTargetId( this.targetDocument );
+   mw.log( '[CX] Could not adapt non Commons image ' + imageSource 
);
+   this.emit( 'adapt', this.targetDocument, this.MTProvider );
+   return;
+   }
+
+   mw.log( '[CX] Adapting image ' + imageSource );*/
+   return this.node;
+};
+
+/**
+ * Adapt the image namespace to target language.
+ * @return {[type]} [description]
+ */
+MWImage.prototype.adaptNamespace = function () {
+   return this.requestManager.getNamespaceAlias(
+   this.targetLanguage,
+   'File'
+   ).then( function ( namespaceAlias ) {
+   this.targetResource = this.sourceResource.replace(
+   /(\.\/)*(.+)(:)/g,
+   '$1' + namespaceAlias + '$3'
+   );
+   this.targetImage.setAttribute( 'resource', this.targetResource 
);
+   }.bind( this ) );
+};
+
+/**
+ * Check if an image is coming from Commons or not. Uses the URL pattern of 
the common file
+ * repository to determine whether the image is stored there.
+ * @static
+ * @param {string} imageSrc
+ * @return {boolean}
+ */
+MWImage.isCommonsImage = function ( imageSrc ) {
+   return imageSrc.indexOf( 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Don't mess with $wgHooks in DeletedContributionsLineEnding hook

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

Change subject: Don't mess with $wgHooks in DeletedContributionsLineEnding hook
..


Don't mess with $wgHooks in DeletedContributionsLineEnding hook

Change-Id: I74ea86eff573328c3d79bc6e860a46a7ae0b7e4d
---
M Hooks.php
1 file changed, 2 insertions(+), 11 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index e84e611..262a676 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -777,9 +777,6 @@
 * @return bool
 */
public static function onDeletedContributionsLineEnding( $pager, &$ret, 
$row, &$classes ) {
-   global $wgHooks;
-   static $javascriptIncluded = false;
-
if ( !$row instanceof Flow\Formatter\FormatterRow ) {
return true;
}
@@ -805,14 +802,8 @@
 
// If we output one or more lines of contributions entries we 
also need to include
// the javascript that hooks into moderation actions.
-   // @todo not a huge fan of this static variable, what else 
though?
-   if ( !$javascriptIncluded ) {
-   $javascriptIncluded = true;
-   $wgHooks['SpecialPageAfterExecute'][] = function ( 
$specialPage, $subPage ) {
-   $specialPage->getOutput()->addModules( [ 
'ext.flow.contributions' ] );
-   $specialPage->getOutput()->addModuleStyles( [ 
'ext.flow.contributions.styles' ] );
-   };
-   }
+   $pager->getOutput()->addModules( [ 'ext.flow.contributions' ] );
+   $pager->getOutput()->addModuleStyles( [ 
'ext.flow.contributions.styles' ] );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I74ea86eff573328c3d79bc6e860a46a7ae0b7e4d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Catrope 
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...CentralAuth[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I4dd48bea826310fda99ac9f7d416a687636c3bda
---
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthPrimaryAuthenticationProvider.php
M includes/CentralAuthUser.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/SuppressUserJob.php
M includes/session/CentralAuthSessionProvider.php
M includes/session/CentralAuthTokenSessionProvider.php
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialGlobalGroupMembership.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameProgress.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalRenameUser.php
M includes/specials/SpecialGlobalUsers.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
M includes/specials/SpecialWikiSets.php
19 files changed, 540 insertions(+), 223 deletions(-)

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



diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 60ef39d..b292acd 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -54,7 +54,8 @@
$wgHooks['AbortAutoAccount'][] = 
'CentralAuthPreAuthManagerHooks::onAbortAutoAccount';
$wgHooks['UserLoginComplete'][] = 
'CentralAuthPreAuthManagerHooks::onUserLoginComplete';
$wgHooks['UserLogout'][] = 
'CentralAuthPreAuthManagerHooks::onUserLogout';
-   $wgHooks['SpecialPage_initList'][] = 
'CentralAuthPreAuthManagerHooks::onSpecialPage_initList';
+   $wgHooks['SpecialPage_initList'][] =
+   
'CentralAuthPreAuthManagerHooks::onSpecialPage_initList';
 
if ( $wgCentralAuthCheckSULMigration ) {
// Install hidden special page for renamed users
@@ -106,7 +107,9 @@
$wgAutoloadClasses['CentralAuthAntiSpoofHooks'] =

"$caBase/AntiSpoof/CentralAuthAntiSpoofHooks.php";
 
-   if ( !class_exists( MediaWiki\Auth\AuthManager::class ) 
|| !empty( $wgDisableAuthManager ) ) {
+   if ( !class_exists( MediaWiki\Auth\AuthManager::class ) 
||
+   !empty( $wgDisableAuthManager )
+   ) {
$wgHooks['AbortNewAccount'][] =

'CentralAuthAntiSpoofHooks::asAbortNewAccountHook';
}
@@ -158,12 +161,15 @@
 * @param string $type Unused
 * @param string $action
 * @param Title $title
-* @param Skin|null $skin If null, we want to use the wiki content 
language, since that will go to the IRC feed.
+* @param Skin|null $skin If null, we want to use the wiki content 
language,
+*   since that will go to the IRC feed.
 * @param array $params
 * @param bool $filterWikilinks
 * @return string
 */
-   public static function onHandleWikiSetLogEntry( $type, $action, $title, 
$skin, $params, $filterWikilinks = false ) {
+   public static function onHandleWikiSetLogEntry(
+   $type, $action, $title, $skin, $params, $filterWikilinks = false
+   ) {
if ( $skin ) {
$link = Linker::link( $title, htmlspecialchars( 
$params[0] ) );
} else {
@@ -181,8 +187,14 @@
$args = [ WikiSet::formatType( $params[1] ), 
WikiSet::formatType( $params[2] ) ];
break;
case 'setchange':
-   $args = [ $params[1]
-   ? $params[1] : wfMessage( 'rightsnone' 
)->text(), $params[2] ? $params[2] : wfMessage( 'rightsnone' )->text() ];
+   $args = [
+   $params[1]
+   ? $params[1]
+   : wfMessage( 'rightsnone' 
)->text(),
+   $params[2]
+   ? $params[2]
+   : wfMessage( 'rightsnone' 
)->text()
+   ];
break;
default: // 'deleteset'
$args = [];
@@ -206,23 +218,33 @@
 * @param string $type Unused
 * @param string $action Unused
 * @param Title $title Unused
-* @param Skin|null $skin If null, we want to use 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I6830de495b8c943ef015b29b40a57d9539c92d6c
---
M Question.php
M Quiz.class.php
M phpcs.xml
3 files changed, 87 insertions(+), 31 deletions(-)

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



diff --git a/Question.php b/Question.php
index 57212ca..c73a33d 100644
--- a/Question.php
+++ b/Question.php
@@ -204,20 +204,29 @@
// A single choice 
object with many correct proposal is a syntax error.
if ( $this->mType == 
'singleChoice' && $expectOn > 1 ) {

$this->setState( 'error' );
-   $inputStyle = 
'style="outline: ' . Quiz::getColor( 'error' ) . ' solid 3px; *border: 3px 
solid ' . Quiz::getColor( 'error' ) . ';"';
-   $title = 
'title="' . wfMessage( 'quiz_colorError' )->escaped() . '"';
+   $inputStyle = 
'style="outline: ' . Quiz::getColor( 'error' ) .
+   ' solid 
3px; *border: 3px solid ' . Quiz::getColor( 'error' ) .
+   ';"';
+   $title = 
'title="' .
+   
wfMessage( 'quiz_colorError' )->escaped() . '"';
$disabled = 
'disabled="disabled"';
}
if ( 
$this->mBeingCorrected ) {
if ( $checked ) 
{

$checkedCount++;

$this->setState( 'right' );
-   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'right' ) . ' solid 3px; 
*border: 3px solid ' . Quiz::getColor( 'right' ) . ';"';
-   $title 
= 'title="' . wfMessage( 'quiz_colorRight' )->escaped() . '"';
+   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'right' ) .
+   
' solid 3px; *border: 3px solid ' .
+   
Quiz::getColor( 'right' ) . ';"';
+   $title 
= 'title="' . wfMessage( 'quiz_colorRight' )->escaped() .
+   
'"';
} else {

$this->setState( 'na_wrong' );
-   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'wrong' ) . ' solid 3px; 
*border: 3px solid ' . Quiz::getColor( 'wrong' ) . ';"';
-   $title 
= 'title="' . wfMessage( 'quiz_colorWrong' )->escaped() . '"';
+   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'wrong' ) .
+   
' solid 3px; *border: 3px solid ' .
+   
Quiz::getColor( 'wrong' ) . ';"';
+   $title 
= 'title="' . wfMessage( 'quiz_colorWrong' )->escaped() .
+   
'"';
}
}
break;
@@ -226,8 +235,11 @@
if ( $checked ) 
{

$checkedCount++;

$this->setState( 'wrong' );
-   
$inputStyle = 'style="outline: ' . Quiz::getColor( 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I48b8b4389d7a9dbb2ae33d7c86defed56adda93c
---
M GlobalCssJs.hooks.php
M GlobalCssJs.php
M ResourceLoaderGlobalModule.php
M ResourceLoaderGlobalSiteModule.php
M phpcs.xml
M removeOldManualUserPages.php
M tests/phpunit/RemoveOldManualUserPagesTest.php
7 files changed, 102 insertions(+), 42 deletions(-)

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



diff --git a/GlobalCssJs.hooks.php b/GlobalCssJs.hooks.php
index a270822..8491a77 100644
--- a/GlobalCssJs.hooks.php
+++ b/GlobalCssJs.hooks.php
@@ -123,9 +123,13 @@
) {
$title = $editPage->getTitle();
$name = $user->getName();
-   if ( $config->get( 'AllowUserJs' ) && 
$editPage->isJsSubpage && $title->getText() == $name . '/global.js' ) {
+   if ( $config->get( 'AllowUserJs' ) && 
$editPage->isJsSubpage &&
+   $title->getText() == $name . '/global.js'
+   ) {
$msg = 'globalcssjs-warning-js';
-   } elseif ( $config->get( 'AllowUserCss' ) && 
$editPage->isCssSubpage && $title->getText() == $name . '/global.css' ) {
+   } elseif ( $config->get( 'AllowUserCss' ) && 
$editPage->isCssSubpage &&
+   $title->getText() == $name . '/global.css'
+   ) {
$msg = 'globalcssjs-warning-css';
} else {
// CSS or JS page, but not a global one
diff --git a/GlobalCssJs.php b/GlobalCssJs.php
index aca4c7c..616c809 100644
--- a/GlobalCssJs.php
+++ b/GlobalCssJs.php
@@ -5,7 +5,8 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['GlobalCssJs'] = __DIR__ . '/i18n/core';
/* wfWarn(
-   'Deprecated PHP entry point used for GlobalCssJs extension. 
Please use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for GlobalCssJs extension. ' .
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
); */
return true;
diff --git a/ResourceLoaderGlobalModule.php b/ResourceLoaderGlobalModule.php
index 36dc33e..ad37fe2 100644
--- a/ResourceLoaderGlobalModule.php
+++ b/ResourceLoaderGlobalModule.php
@@ -56,7 +56,9 @@
break;
case 'type':
if ( $option !== 'style' && $option !== 
'script' ) {
-   throw new 
InvalidArgumentException( "type must be either 'style' or 'script', not 
'$option'" );
+   throw new 
InvalidArgumentException(
+   "type must be either 
'style' or 'script', not '$option'"
+   );
}
$this->type = $option;
break;
diff --git a/ResourceLoaderGlobalSiteModule.php 
b/ResourceLoaderGlobalSiteModule.php
index ccc5e97..da58639 100644
--- a/ResourceLoaderGlobalSiteModule.php
+++ b/ResourceLoaderGlobalSiteModule.php
@@ -33,7 +33,9 @@
 * @return array
 */
protected function getPages( ResourceLoaderContext $context ) {
-   if ( !ConfigFactory::getDefaultInstance()->makeConfig( 
'globalcssjs' )->get( 'UseGlobalSiteCssJs' ) ) {
+   if ( !ConfigFactory::getDefaultInstance()
+   ->makeConfig( 'globalcssjs' )->get( 
'UseGlobalSiteCssJs' )
+   ) {
return [];
}
 
diff --git a/phpcs.xml b/phpcs.xml
index 7097afc..5a35dc8 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,7 +1,6 @@
 
 

-   



diff --git a/removeOldManualUserPages.php b/removeOldManualUserPages.php
index 1170b68..17b08da 100644
--- a/removeOldManualUserPages.php
+++ b/removeOldManualUserPages.php
@@ -20,9 +20,11 @@
 
public function __construct() {
parent::__construct();
-   $this->mDescription = 'Remove reundant user script pages that 
import global.js and/or global.css';
+   $this->mDescription = 'Remove reundant user script pages that ' 
.
+   'import global.js and/or global.css';
$this->addOption( 'user', 'User name', true, true );
-   $this->addOption( 'ignorerevisionlimit', 'Whether to ignore the 
1 revision limit', false, false );

[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I75f07ccc2131a2b01f53ff6c7adba386cb6d84bf
---
M Translate.i18n.magic.php
M api/ApiTranslationStash.php
M composer.json
M ffs/AmdFFS.php
M ffs/FlatPhpFFS.php
M ffs/GettextFFS.php
M ffs/JsonFFS.php
M ffs/MediaWikiComplexMessages.php
M insertables/MediaWikiInsertablesSuggester.php
M insertables/NumericalParameterInsertablesSuggester.php
M phpcs.xml
M scripts/create-language-models.php
M scripts/createCheckIndex.php
M scripts/fallbacks-graph.php
M specials/SpecialExportTranslations.php
M specials/SpecialLanguageStats.php
M specials/SpecialTranslationStats.php
M tag/SpecialPageTranslation.php
M tag/TranslatablePage.php
M tests/generateRandomSandboxData.php
M tests/phpunit/PageTranslationParserTest.php
M translationaids/GettextDocumentationAid.php
M translationaids/InsertablesAid.php
M ttmserver/DatabaseTTMServer.php
M ttmserver/ElasticSearchTTMServer.php
M ttmserver/FuzzyLikeThis.php
M ttmserver/TTMServerMessageUpdateJob.php
M utils/ArrayFlattener.php
M utils/ExternalMessageSourceStateComparator.php
M utils/MessageWebImporter.php
M utils/StatsTable.php
M webservices/QueryAggregator.php
M webservices/TranslationQueryResponse.php
33 files changed, 51 insertions(+), 53 deletions(-)

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



diff --git a/Translate.i18n.magic.php b/Translate.i18n.magic.php
index de78330..a8f69ce 100644
--- a/Translate.i18n.magic.php
+++ b/Translate.i18n.magic.php
@@ -12,4 +12,3 @@
 $magicWords['en'] = [
'translation' => [ 0, 'translation' ],
 ];
-
diff --git a/api/ApiTranslationStash.php b/api/ApiTranslationStash.php
index 71a22cd..9a486c0 100644
--- a/api/ApiTranslationStash.php
+++ b/api/ApiTranslationStash.php
@@ -19,7 +19,7 @@
// The user we are operating on, not necessarly the user making 
the request
$user = $this->getUser();
 
-   if ( isset( $params['username'] ) ){
+   if ( isset( $params['username'] ) ) {
if ( $this->getUser()->isAllowed( 
'translate-sandboxmanage' ) ) {
$user = User::newFromName( $params['username'] 
);
if ( !$user ) {
diff --git a/composer.json b/composer.json
index c8a1392..4791fb9 100644
--- a/composer.json
+++ b/composer.json
@@ -41,7 +41,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "~0.7.2",
+   "mediawiki/mediawiki-codesniffer": "0.10.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"suggest": {
@@ -52,7 +52,7 @@
"scripts": {
"fix": "phpcbf",
"test": [
-   "parallel-lint . --exclude vendor --exclude extensions",
+   "parallel-lint . --exclude vendor --exclude 
node_modules --exclude extensions",
"phpcs -p -s"
]
}
diff --git a/ffs/AmdFFS.php b/ffs/AmdFFS.php
index aff9ab9..41f739c 100644
--- a/ffs/AmdFFS.php
+++ b/ffs/AmdFFS.php
@@ -66,7 +66,7 @@
public function readFromVariable( $data ) {
$authors = AmdFFS::extractAuthors( $data );
$data = AmdFFS::extractMessagePart( $data );
-   $messages = (array) FormatJson::decode( $data, /*as array*/true 
);
+   $messages = (array)FormatJson::decode( $data, /*as array*/true 
);
$metadata = [];
 
// Take care of regular language bundles, as well as the root 
bundle.
diff --git a/ffs/FlatPhpFFS.php b/ffs/FlatPhpFFS.php
index 0c71c0d..fc3ec6e 100644
--- a/ffs/FlatPhpFFS.php
+++ b/ffs/FlatPhpFFS.php
@@ -39,7 +39,7 @@
foreach ( $matches as $_ ) {
$legal = Title::legalChars();
$key = preg_replace_callback( "/([^$legal]|)/u",
-   function( $m ) {
+   function ( $m ) {
return '\x' . dechex( ord( $m[0] ) );
},
$_[1]
diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php
index 616501a..68d9fe7 100644
--- a/ffs/GettextFFS.php
+++ b/ffs/GettextFFS.php
@@ -135,7 +135,6 @@
 
// Then parse the messages
foreach ( $sections as $section ) {
-
$item = self::parseGettextSection( $section, 
$pluralCount, $metadata );
if ( $item === false ) {
continue;
@@ -165,7 +164,6 @@
}
 
public static function parseGettextSection( $section, 

[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: Id9505936148fc99f72f5d7ea4c6285ba8bd91037
---
M PageAssessments.hooks.php
M api/ApiQueryPageAssessments.php
M api/ApiQueryProjectPages.php
M maintenance/purgeUnusedProjects.php
M phpcs.xml
5 files changed, 41 insertions(+), 21 deletions(-)

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



diff --git a/PageAssessments.hooks.php b/PageAssessments.hooks.php
index 908f335..584d4e8 100644
--- a/PageAssessments.hooks.php
+++ b/PageAssessments.hooks.php
@@ -36,7 +36,9 @@
 * @param mixed $ticket
 */
public static function onLinksUpdateComplete( &$linksUpdate, $ticket = 
null ) {
-   $assessmentsOnTalkPages = 
RequestContext::getMain()->getConfig()->get( 'PageAssessmentsOnTalkPages' );
+   $assessmentsOnTalkPages = 
RequestContext::getMain()->getConfig()->get(
+   'PageAssessmentsOnTalkPages'
+   );
$title = $linksUpdate->getTitle();
// Only check for assessment data where assessments are 
actually made.
if ( ( $assessmentsOnTalkPages && $title->isTalkPage() ) ||
@@ -65,15 +67,20 @@
 */
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater = null ) {
$dbDir = __DIR__ . '/db';
-   $updater->addExtensionTable( 'page_assessments_projects', 
"$dbDir/addProjectsTable.sql", true );
-   $updater->addExtensionTable( 'page_assessments', 
"$dbDir/addReviewsTable.sql", true );
-   $updater->addExtensionField( 'page_assessments_projects', 
'pap_parent_id', "$dbDir/patch-subprojects.sql", true );
+   $updater->addExtensionTable( 'page_assessments_projects',
+   "$dbDir/addProjectsTable.sql", true );
+   $updater->addExtensionTable( 'page_assessments',
+   "$dbDir/addReviewsTable.sql", true );
+   $updater->addExtensionField( 'page_assessments_projects',
+   'pap_parent_id', "$dbDir/patch-subprojects.sql", true );
}
 
/**
 * Delete assessment records when page is deleted
 */
-   public static function onArticleDeleteComplete( &$article, &$user, 
$reason, $id, $content = null, $logEntry ) {
+   public static function onArticleDeleteComplete(
+   &$article, &$user, $reason, $id, $content = null, $logEntry
+   ) {
PageAssessmentsBody::deleteRecordsForPage( $id );
}
 
diff --git a/api/ApiQueryPageAssessments.php b/api/ApiQueryPageAssessments.php
index 7257d6b..a61452c 100644
--- a/api/ApiQueryPageAssessments.php
+++ b/api/ApiQueryPageAssessments.php
@@ -44,7 +44,9 @@
}
 
$fit = $result->addValue(
-   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ], $projectName, $projectValues
+   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ],
+   $projectName,
+   $projectValues
);
 
if ( !$fit ) {
@@ -53,8 +55,12 @@
}
 
// Make it easier to parse XML-formatted results
-   $result->addArrayType( [ 'query', 'pages', 
$row->page_id, $this->getModuleName() ], 'kvp', 'project' );
-   $result->addIndexedTagName( [ 'query', 'pages', 
$row->page_id, $this->getModuleName() ], 'p' );
+   $result->addArrayType(
+   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ], 'kvp', 'project'
+   );
+   $result->addIndexedTagName(
+   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ], 'p'
+   );
}
}
 
@@ -89,7 +95,8 @@
$this->handleQueryContinuation( $params['continue'] );
}
 
-   // assure strict ordering, but mysql gets cranky if you order 
by a field when there's only one to sort
+   // assure strict ordering, but mysql gets cranky if you order 
by a field
+   // when there's only one to sort
if ( count( $pages ) > 1 ) {
$this->addOption( 'ORDER BY', 'pa_page_id, 
pa_project_id' );
} else {
@@ -103,10 +110,12 @@
 
$continuePage = (int)$continues[0];
$continueProject = (int)$continues[1];
-   $this->dieContinueUsageIf( $continues[0] !== 
(string)$continuePage ); // die if PHP has made unhelpful falsy conversions
-   

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I2c77b3b19101e7fcefaaf91c6711f232edd60d9c
---
M composer.json
M includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
M includes/BuildDocument/Completion/SuggestBuilder.php
M includes/BuildDocument/RedirectsAndIncomingLinks.php
M includes/CirrusConfigInterwikiResolver.php
M includes/CirrusSearch.php
M includes/CompletionRequestLog.php
M includes/CompletionSuggester.php
M includes/DataSender.php
M includes/ElasticaErrorHandler.php
M includes/ElasticsearchIntermediary.php
M includes/Hooks.php
M includes/InterwikiSearcher.php
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Maintenance/MetaStoreIndex.php
M includes/Maintenance/OrderedStreamingForkController.php
M includes/Maintenance/Reindexer.php
M includes/Maintenance/SuggesterAnalysisConfigBuilder.php
M includes/Maintenance/Validators/ShardAllocationValidator.php
M includes/Maintenance/Validators/Validator.php
M includes/NearMatchPicker.php
M includes/OtherIndexes.php
M includes/Query/FileNumericFeature.php
M includes/Query/FullTextQueryStringQueryBuilder.php
M includes/Query/RegexInSourceFeature.php
M includes/Query/SimpleKeywordFeature.php
M includes/RequestLogger.php
M includes/Search/Filters.php
M includes/Search/RescoreBuilders.php
M includes/Search/ResultSet.php
M includes/Search/ResultsType.php
M includes/Search/TextIndexField.php
M includes/SearchConfig.php
M includes/Searcher.php
M includes/SiteMatrixInterwikiResolver.php
M includes/Updater.php
M includes/Util.php
M maintenance/copySearchIndex.php
M maintenance/dumpIndex.php
M maintenance/forceSearchIndex.php
M maintenance/metastore.php
M maintenance/saneitizeJobs.php
M maintenance/updateSuggesterIndex.php
M phpcs.xml
M profiles/PhraseSuggesterProfiles.config.php
M scripts/postprocess-phan.php
M tests/relforge/RelForgeSettings.php
M tests/relforge/bm25enwiki/misc.inc
M tests/relforge/bm25enwiki/similarity.inc
M tests/relforge/bm25enwiki_allfield/misc.inc
M tests/relforge/bm25enwiki_inclinks_pv/misc.inc
M tests/relforge/bm25enwiki_inclinks_pv/similarity.inc
M tests/relforge/bm25enwiki_inclinks_pv_reverse/similarity.inc
M tests/relforge/bm25frwiki/misc.inc
M tests/relforge/bm25frwiki/similarity.inc
M tests/relforge/en-wp-bm25-wp10-normal-sugg/misc.inc
M tests/relforge/en-wp-bm25-wp10-normal-sugg/similarity.inc
M tests/relforge/en-wp-bm25-wp10/misc.inc
M tests/relforge/en-wp-bm25-wp10/similarity.inc
M tests/relforge/mw-suggest-anywords/misc.inc
M tests/unit/CompletionSuggesterTest.php
M tests/unit/InterwikiResolverTest.php
M tests/unit/LanguageDetectTest.php
M tests/unit/Query/InCategoryFeatureTest.php
M tests/unit/Query/PreferRecentFeatureTest.php
M tests/unit/RequestLoggerTest.php
M tests/unit/SuggestBuilderTest.php
M tests/unit/SuggestScoringTest.php
M tests/unit/UtilTest.php
70 files changed, 191 insertions(+), 208 deletions(-)

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



diff --git a/composer.json b/composer.json
index 207ad2e..06ceb86 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.10.0"
},
"scripts": {
"fix": "phpcbf",
diff --git 
a/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php 
b/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
index 5856aff..94eee82 100644
--- a/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
+++ b/includes/BuildDocument/Completion/NaiveSubphrasesSuggestionsBuilder.php
@@ -57,7 +57,6 @@
}
$cr = self::$RANGES_BY_TYPE[$config['type']];
return new self( $cr, $limit );
-
}
 
/**
diff --git a/includes/BuildDocument/Completion/SuggestBuilder.php 
b/includes/BuildDocument/Completion/SuggestBuilder.php
index f8a60aa..9494add 100644
--- a/includes/BuildDocument/Completion/SuggestBuilder.php
+++ b/includes/BuildDocument/Completion/SuggestBuilder.php
@@ -165,7 +165,7 @@
$lb->execute();
// This is far from perfect:
// - we won't try to group similar redirects since we 
don't know which one
-   //   is the official one
+   // is the official one
// - we will certainly suggest multiple times the same 
pages

[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: Ie683924e7ebbae91bcc0cbd7d80621ec1b3aacc7
---
M FlaggedRevs.php
M api/actions/ApiReview.php
M api/actions/ApiStabilize.php
M api/reports/ApiQueryConfiguredPages.php
M api/reports/ApiQueryFlagged.php
M api/reports/ApiQueryOldreviewedpages.php
M api/reports/ApiQueryReviewedpages.php
M backend/FlaggedRevsLog.php
M frontend/FlaggablePageView.php
M frontend/FlaggedRevsXML.php
M frontend/RevisionReviewFormUI.php
M maintenance/fixBug28348.php
M maintenance/purgeReviewablePages.php
M phpcs.xml
M scribunto/FlaggedRevs.library.php
15 files changed, 174 insertions(+), 79 deletions(-)

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



diff --git a/FlaggedRevs.php b/FlaggedRevs.php
index f5182ea..c74bb3f 100644
--- a/FlaggedRevs.php
+++ b/FlaggedRevs.php
@@ -272,8 +272,10 @@
 # UI setup, forms, and HTML elements
 $wgAutoloadClasses['FlaggedRevsUISetup'] = 
"$frontendDir/FlaggedRevsUI.setup.php";
 $wgAutoloadClasses['FlaggablePageView'] = "$frontendDir/FlaggablePageView.php";
-$wgAutoloadClasses['FlaggedRevsReviewLogFormatter'] = 
"$frontendDir/FlaggedRevsReviewLogFormatter.php";
-$wgAutoloadClasses['FlaggedRevsStableLogFormatter'] = 
"$frontendDir/FlaggedRevsStableLogFormatter.php";
+$wgAutoloadClasses['FlaggedRevsReviewLogFormatter'] =
+   "$frontendDir/FlaggedRevsReviewLogFormatter.php";
+$wgAutoloadClasses['FlaggedRevsStableLogFormatter'] =
+   "$frontendDir/FlaggedRevsStableLogFormatter.php";
 $wgAutoloadClasses['FlaggedRevsXML'] = "$frontendDir/FlaggedRevsXML.php";
 $wgAutoloadClasses['RevisionReviewFormUI'] = 
"$frontendDir/RevisionReviewFormUI.php";
 $wgAutoloadClasses['RejectConfirmationFormUI'] = 
"$frontendDir/RejectConfirmationFormUI.php";
@@ -389,7 +391,9 @@
'revreview-sadv-reviewing-p', 'revreview-sadv-reviewing-c',
'revreview-adv-start-link', 'revreview-adv-stop-link'
],
-   'dependencies'  => [ 'mediawiki.util', 'mediawiki.notify', 
'mediawiki.user', 'mediawiki.jqueryMsg' ],
+   'dependencies'  => [
+   'mediawiki.util', 'mediawiki.notify', 'mediawiki.user', 
'mediawiki.jqueryMsg'
+   ],
'localBasePath' => $localModulePath,
'remoteExtPath' => $remoteModulePath,
 ];
@@ -446,12 +450,16 @@
 # Various actions are used for log filtering ...
 $wgLogActionsHandlers['review/approve']  = 'FlaggedRevsReviewLogFormatter'; // 
checked (again)
 $wgLogActionsHandlers['review/approve2']  = 'FlaggedRevsReviewLogFormatter'; 
// quality (again)
-$wgLogActionsHandlers['review/approve-i']  = 'FlaggedRevsReviewLogFormatter'; 
// checked (first time)
-$wgLogActionsHandlers['review/approve2-i']  = 'FlaggedRevsReviewLogFormatter'; 
// quality (first time)
+$wgLogActionsHandlers['review/approve-i']  =
+   'FlaggedRevsReviewLogFormatter'; // checked (first time)
+$wgLogActionsHandlers['review/approve2-i']  =
+   'FlaggedRevsReviewLogFormatter'; // quality (first time)
 $wgLogActionsHandlers['review/approve-a']  = 'FlaggedRevsReviewLogFormatter'; 
// checked (auto)
 $wgLogActionsHandlers['review/approve2-a']  = 'FlaggedRevsReviewLogFormatter'; 
// quality (auto)
-$wgLogActionsHandlers['review/approve-ia']  = 'FlaggedRevsReviewLogFormatter'; 
// checked (initial & auto)
-$wgLogActionsHandlers['review/approve2-ia']  = 
'FlaggedRevsReviewLogFormatter'; // quality (initial & auto)
+$wgLogActionsHandlers['review/approve-ia']  =
+   'FlaggedRevsReviewLogFormatter'; // checked (initial & auto)
+$wgLogActionsHandlers['review/approve2-ia']  =
+   'FlaggedRevsReviewLogFormatter'; // quality (initial & auto)
 $wgLogActionsHandlers['review/unapprove'] = 'FlaggedRevsReviewLogFormatter'; 
// was checked
 $wgLogActionsHandlers['review/unapprove2'] = 'FlaggedRevsReviewLogFormatter'; 
// was quality
 
@@ -554,7 +562,8 @@
 if ( version_compare( $wgVersion, '1.29', '<' ) ) {
$wgHooks['EditPageBeforeEditChecks'][] = 
'FlaggedRevsUIHooks::onEditPageBeforeEditChecks';
 } else {
-   $wgHooks['EditPageGetCheckboxesDefinition'][] = 
'FlaggedRevsUIHooks::onEditPageGetCheckboxesDefinition';
+   $wgHooks['EditPageGetCheckboxesDefinition'][] =
+   'FlaggedRevsUIHooks::onEditPageGetCheckboxesDefinition';
 }
 $wgHooks['EditPage::showEditForm:fields'][] = 
'FlaggedRevsUIHooks::addRevisionIDField';
 # Add draft link to section edit error
diff --git a/api/actions/ApiReview.php b/api/actions/ApiReview.php
index cb11030..8a80692 100644
--- a/api/actions/ApiReview.php
+++ b/api/actions/ApiReview.php
@@ -132,8 +132,10 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
$this->dieWithError( 
'apierror-flaggedrevs-cantreview', 'permissiondenied' );
} else {
- 

[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I810ca14844d2ed32fc95b24c849c288ca162c93b
---
M api/ApiListNovaInstances.php
M api/ApiNovaAddress.php
M api/ApiNovaInstance.php
M api/ApiNovaProjectLimits.php
M api/ApiNovaProjects.php
M api/ApiNovaServiceGroups.php
M nova/OpenStackNovaController.php
M nova/OpenStackNovaDomain.php
M nova/OpenStackNovaHost.php
M nova/OpenStackNovaInstance.php
M nova/OpenStackNovaPrivateHost.php
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaPublicHost.php
M nova/OpenStackNovaSecondaryAuthenticationProvider.php
M nova/OpenStackNovaSecurityGroupRule.php
M nova/OpenStackNovaServiceGroup.php
M nova/OpenStackNovaSudoer.php
M nova/OpenStackNovaUser.php
18 files changed, 470 insertions(+), 153 deletions(-)

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



diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php
index df39e4f..0c80880 100644
--- a/api/ApiListNovaInstances.php
+++ b/api/ApiListNovaInstances.php
@@ -30,12 +30,15 @@
}
}
 
-   $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances', 
$params['region'], $params['project'] );
+   $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances',
+   $params['region'], $params['project'] );
$instancesInfo = $wgMemc->get( $key );
if ( $instancesInfo === false ) {
$user = new OpenStackNovaUser( 
$wgOpenStackManagerLDAPUsername );
$userNova = OpenStackNovaController::newFromUser( $user 
);
-   $userNova->authenticate( 
$wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword );
+   $userNova->authenticate(
+   $wgOpenStackManagerLDAPUsername, 
$wgOpenStackManagerLDAPUserPassword
+   );
 
$userNova->setProject( $project->getName() );
$userNova->setRegion( $params['region'] ); // validated 
by API
@@ -67,9 +70,13 @@
}
 
if ( defined( 'ApiResult::META_CONTENT' ) ) {
-   $this->getResult()->addIndexedTagName( [ 'query', 
$this->getModuleName() ], 'instance' );
+   $this->getResult()->addIndexedTagName(
+   [ 'query', $this->getModuleName() ], 'instance'
+   );
} else {
-   $this->getResult()->setIndexedTagName_internal( [ 
'query', $this->getModuleName() ], 'instance' );
+   $this->getResult()->setIndexedTagName_internal(
+   [ 'query', $this->getModuleName() ], 'instance'
+   );
}
}
 
diff --git a/api/ApiNovaAddress.php b/api/ApiNovaAddress.php
index 385473e..2b616a0 100644
--- a/api/ApiNovaAddress.php
+++ b/api/ApiNovaAddress.php
@@ -9,7 +9,9 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError( 
'openstackmanager-nonovacred' );
} else {
-   $this->dieUsage( 'No credentials found for your 
account.', 'openstackmanager-nonovacred' );
+   $this->dieUsage(
+   'No credentials found for your 
account.', 'openstackmanager-nonovacred'
+   );
}
}
 
@@ -20,7 +22,10 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
$this->dieWithError( [ 
'openstackmanager-noaccount', wfEscapeWikiText( $p ) ] );
} else {
-   $this->dieUsage( 'User account is not 
in the project specified.', 'openstackmanager-noaccount' );
+   $this->dieUsage(
+   'User account is not in the 
project specified.',
+   'openstackmanager-noaccount'
+   );
}
}
 
@@ -32,7 +37,9 @@
wfEscapeWikiText( $p ),
] );
} else {
-   $this->dieUsage( 'User account is not 
in the projectadmin role.', 'openstackmanager-needrole' );
+   $this->dieUsage(
+   'User account is not in the 
projectadmin role.', 'openstackmanager-needrole'
+  

[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: If918ef0edbeb0238e0a0ba2e227d7419dc95a539
---
M api/ApiFeedLQTThreads.php
M api/ApiQueryLQTThreads.php
M api/ApiThreadAction.php
M classes/DeletionController.php
M classes/Hooks.php
M classes/NewMessagesController.php
M classes/Thread.php
M classes/Threads.php
M classes/View.php
M composer.json
M import/import-parsed-discussions.php
M migrateDatabase.php
M pages/NewUserMessagesView.php
M pages/TalkpageView.php
M phpcs.xml
15 files changed, 105 insertions(+), 105 deletions(-)

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



diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index 744e928..3e42c5d 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -18,7 +18,7 @@
 
 if ( !defined( 'MEDIAWIKI' ) ) {
// Eclipse helper - will be ignored in production
-   require_once ( "ApiBase.php" );
+   require_once "ApiBase.php";
 }
 
 use MediaWiki\MediaWikiServices;
diff --git a/api/ApiQueryLQTThreads.php b/api/ApiQueryLQTThreads.php
index f2759e8..6869a9b 100644
--- a/api/ApiQueryLQTThreads.php
+++ b/api/ApiQueryLQTThreads.php
@@ -98,8 +98,7 @@
 
$ids = [];
$count = 0;
-   foreach ( $res as $row )
-   {
+   foreach ( $res as $row ) {
if ( ++$count > $params['limit'] ) {
// We've had enough
$this->setContinueEnumParameter( 'startid', 
$row->thread_id );
@@ -142,7 +141,7 @@
'*',
'tr_thread',
'reactions',
-   function( $row ) {
+   function ( $row ) {
return [ 
"{$row->tr_user}_{$row->tr_type}" => [
'type' => $row->tr_type,
'user-id' => $row->tr_user,
diff --git a/api/ApiThreadAction.php b/api/ApiThreadAction.php
index 236dc5f..0259b15 100644
--- a/api/ApiThreadAction.php
+++ b/api/ApiThreadAction.php
@@ -163,8 +163,8 @@
$title = null;
$article = $thread->article();
if ( empty( $params['subject'] ) ||
-   ! Thread::validateSubject( $params['subject'], $title, 
null, $article ) ) {
-
+   !Thread::validateSubject( $params['subject'], $title, 
null, $article )
+   ) {
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError( 
'apierror-liquidthreads-nosubject', 'no-valid-subject' );
} else {
diff --git a/classes/DeletionController.php b/classes/DeletionController.php
index 2b9bed8..7264865 100644
--- a/classes/DeletionController.php
+++ b/classes/DeletionController.php
@@ -123,7 +123,7 @@
 
public static function onArticleDelete( $article ) {
// Synchronise article data so that moving the article doesn't 
break any
-   //  article association.
+   // article association.
Threads::synchroniseArticleData( $article );
 
return true;
diff --git a/classes/Hooks.php b/classes/Hooks.php
index 340cf2e..b960759 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -328,8 +328,8 @@
}
 
if ( $title->getNamespace() == NS_LQT_THREAD && self::$editType 
!= 'new' &&
-   $wgLiquidThreadsShowBumpCheckbox )
-   {
+   $wgLiquidThreadsShowBumpCheckbox
+   ) {
$checkboxes['wpBumpThread'] = [
'id' => 'wpBumpThread',
'label-message' => 'lqt-edit-bump',
@@ -462,7 +462,7 @@
 
static function onMovePageIsValidMove( Title $oldTitle ) {
// Synchronise article data so that moving the article doesn't 
break any
-   //  article association.
+   // article association.
Threads::synchroniseArticleData( new Article( $oldTitle, 0 ) );
 
return true;
@@ -486,7 +486,7 @@
}
 
// Now we're dealing with blocked users with user talk editing 
allowed editing pages
-   //  in the thread namespace.
+   // in the thread namespace.
 
if ( $title->exists() ) {
// If the page actually exists, allow the user to edit 
posts on their own talk page.
@@ -505,7 +505,7 @@
}
} else {
  

[MediaWiki-commits] [Gerrit] mediawiki...GWToolset[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I39de83f50f34d5ea0aa7c635e1d52ea978a69694
---
M GWToolset.php
M includes/Config.php
M includes/Forms/MetadataDetectForm.php
M includes/Forms/MetadataMappingForm.php
M includes/Handlers/Forms/MetadataDetectHandler.php
M includes/Helpers/FileChecks.php
M includes/Helpers/WikiChecks.php
M maintenance/cleanupGWTFileBackend.php
M phpcs.xml
9 files changed, 86 insertions(+), 44 deletions(-)

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



diff --git a/GWToolset.php b/GWToolset.php
index f72384b..90a8021 100644
--- a/GWToolset.php
+++ b/GWToolset.php
@@ -10,7 +10,8 @@
 namespace GWToolset;
 
 if ( !defined( 'MEDIAWIKI' ) ) {
-   echo 'This file is part of a MediaWiki extension; it is not a valid 
entry point. To install this extension, follow the instructions in the INSTALL 
file.';
+   echo 'This file is part of a MediaWiki extension; it is not a valid 
entry point. To install ' .
+   'this extension, follow the instructions in the INSTALL file.';
exit();
 }
 
@@ -50,25 +51,34 @@
'GWToolset\Config' => __DIR__ . '/includes/Config.php',
'GWToolset\GWTException' => __DIR__ . '/includes/GWTException.php',
'GWToolset\Utils' => __DIR__ . '/includes/Utils.php',
-   'GWToolset\Adapters\DataAdapterInterface' => __DIR__ . 
'/includes/Adapters/DataAdapterInterface.php',
-   'GWToolset\Adapters\Php\MappingPhpAdapter' => __DIR__ . 
'/includes/Adapters/Php/MappingPhpAdapter.php',
-   'GWToolset\Adapters\Php\MediawikiTemplatePhpAdapter' => __DIR__ . 
'/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php',
-   'GWToolset\Adapters\Php\MetadataPhpAdapter' => __DIR__ . 
'/includes/Adapters/Php/MetadataPhpAdapter.php',
+   'GWToolset\Adapters\DataAdapterInterface' =>
+   __DIR__ . '/includes/Adapters/DataAdapterInterface.php',
+   'GWToolset\Adapters\Php\MappingPhpAdapter' =>
+   __DIR__ . '/includes/Adapters/Php/MappingPhpAdapter.php',
+   'GWToolset\Adapters\Php\MediawikiTemplatePhpAdapter' =>
+   __DIR__ . 
'/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php',
+   'GWToolset\Adapters\Php\MetadataPhpAdapter' =>
+   __DIR__ . '/includes/Adapters/Php/MetadataPhpAdapter.php',
'GWToolset\Forms\MetadataDetectForm' => __DIR__ . 
'/includes/Forms/MetadataDetectForm.php',
'GWToolset\Forms\MetadataMappingForm' => __DIR__ . 
'/includes/Forms/MetadataMappingForm.php',
'GWToolset\Forms\PreviewForm' => __DIR__ . 
'/includes/Forms/PreviewForm.php',
'GWToolset\Handlers\Forms\FormHandler' => __DIR__ . 
'/includes/Handlers/Forms/FormHandler.php',
-   'GWToolset\Handlers\Forms\MetadataDetectHandler' => __DIR__ . 
'/includes/Handlers/Forms/MetadataDetectHandler.php',
-   'GWToolset\Handlers\Forms\MetadataMappingHandler' => __DIR__ . 
'/includes/Handlers/Forms/MetadataMappingHandler.php',
+   'GWToolset\Handlers\Forms\MetadataDetectHandler' =>
+   __DIR__ . '/includes/Handlers/Forms/MetadataDetectHandler.php',
+   'GWToolset\Handlers\Forms\MetadataMappingHandler' =>
+   __DIR__ . '/includes/Handlers/Forms/MetadataMappingHandler.php',
'GWToolset\Handlers\UploadHandler' => __DIR__ . 
'/includes/Handlers/UploadHandler.php',
-   'GWToolset\Handlers\Xml\XmlDetectHandler' => __DIR__ . 
'/includes/Handlers/Xml/XmlDetectHandler.php',
+   'GWToolset\Handlers\Xml\XmlDetectHandler' =>
+   __DIR__ . '/includes/Handlers/Xml/XmlDetectHandler.php',
'GWToolset\Handlers\Xml\XmlHandler' => __DIR__ . 
'/includes/Handlers/Xml/XmlHandler.php',
-   'GWToolset\Handlers\Xml\XmlMappingHandler' => __DIR__ . 
'/includes/Handlers/Xml/XmlMappingHandler.php',
+   'GWToolset\Handlers\Xml\XmlMappingHandler' =>
+   __DIR__ . '/includes/Handlers/Xml/XmlMappingHandler.php',
'GWToolset\Helpers\FileChecks' => __DIR__ . 
'/includes/Helpers/FileChecks.php',
'GWToolset\Helpers\GWTFileBackend' => __DIR__ . 
'/includes/Helpers/GWTFileBackend.php',
'GWToolset\Helpers\WikiChecks' => __DIR__ . 
'/includes/Helpers/WikiChecks.php',
'GWToolset\Hooks' => __DIR__ . '/includes/Hooks/Hooks.php',
-   'GWToolset\Jobs\GWTFileBackendCleanupJob' => __DIR__ . 
'/includes/Jobs/GWTFileBackendCleanupJob.php',
+   'GWToolset\Jobs\GWTFileBackendCleanupJob' =>
+   __DIR__ . '/includes/Jobs/GWTFileBackendCleanupJob.php',
'GWToolset\Jobs\UploadMediafileJob' => __DIR__ . 
'/includes/Jobs/UploadMediafileJob.php',
'GWToolset\Jobs\UploadMetadataJob' => __DIR__ . 
'/includes/Jobs/UploadMetadataJob.php',
'GWToolset\Models\Mapping' => __DIR__ . '/includes/Models/Mapping.php',
diff --git a/includes/Config.php 

[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I562a8e0c1e585d6b3e81d35a56deb4722f7e135a
---
M OpenStackManager.php
M OpenStackManagerEvent.php
M maintenance/onInstanceActionCompletion.php
M maintenance/purgeOldServiceGroups.php
M maintenance/qualifyInstancePages.php
M maintenance/syncProjectGroups.php
M maintenance/transitionServiceGroupSchema.php
M maintenance/updatedomains.php
M phpcs.xml
M special/SpecialNova.php
M special/SpecialNovaAddress.php
M special/SpecialNovaDomain.php
M special/SpecialNovaKey.php
M special/SpecialNovaProject.php
M special/SpecialNovaProxy.php
M special/SpecialNovaResources.php
M special/SpecialNovaRole.php
M special/SpecialNovaServiceGroup.php
M special/SpecialNovaSudoer.php
M special/SpecialNovaVolume.php
20 files changed, 509 insertions(+), 166 deletions(-)

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



diff --git a/OpenStackManager.php b/OpenStackManager.php
index 2458f63..2059f45 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -173,7 +173,8 @@
 $wgAutoloadClasses['OpenStackNovaPrivateHost'] = $dir . 
'nova/OpenStackNovaPrivateHost.php';
 $wgAutoloadClasses['OpenStackNovaAddress'] = $dir . 
'nova/OpenStackNovaAddress.php';
 $wgAutoloadClasses['OpenStackNovaSecurityGroup'] = $dir . 
'nova/OpenStackNovaSecurityGroup.php';
-$wgAutoloadClasses['OpenStackNovaSecurityGroupRule'] = $dir . 
'nova/OpenStackNovaSecurityGroupRule.php';
+$wgAutoloadClasses['OpenStackNovaSecurityGroupRule'] =
+   $dir . 'nova/OpenStackNovaSecurityGroupRule.php';
 $wgAutoloadClasses['OpenStackNovaRole'] = $dir . 'nova/OpenStackNovaRole.php';
 $wgAutoloadClasses['OpenStackNovaServiceGroup'] = $dir . 
'nova/OpenStackNovaServiceGroup.php';
 $wgAutoloadClasses['OpenStackNovaVolume'] = $dir . 
'nova/OpenStackNovaVolume.php';
@@ -183,8 +184,10 @@
 $wgAutoloadClasses['OpenStackNovaLdapConnection'] = $dir . 
'nova/OpenStackNovaLdapConnection.php';
 $wgAutoloadClasses['OpenStackNovaProject'] = $dir . 
'nova/OpenStackNovaProject.php';
 $wgAutoloadClasses['OpenStackNovaProjectLimits'] = $dir . 
'nova/OpenStackNovaProjectLimits.php';
-$wgAutoloadClasses['OpenStackNovaShellAccountNameRequest'] = $dir . 
'nova/OpenStackNovaShellAccountNameRequest.php';
-$wgAutoloadClasses['OpenStackNovaSecondaryAuthenticationProvider'] = $dir . 
'/nova/OpenStackNovaSecondaryAuthenticationProvider.php';
+$wgAutoloadClasses['OpenStackNovaShellAccountNameRequest'] =
+   $dir . 'nova/OpenStackNovaShellAccountNameRequest.php';
+$wgAutoloadClasses['OpenStackNovaSecondaryAuthenticationProvider'] =
+   $dir . '/nova/OpenStackNovaSecondaryAuthenticationProvider.php';
 $wgAutoloadClasses['SpecialNovaKey'] = $dir . 'special/SpecialNovaKey.php';
 $wgAutoloadClasses['SpecialNovaProject'] = $dir . 
'special/SpecialNovaProject.php';
 $wgAutoloadClasses['SpecialNovaDomain'] = $dir . 
'special/SpecialNovaDomain.php';
@@ -203,7 +206,8 @@
 $wgAutoloadClasses['ApiNovaServiceGroups'] = $dir . 
'api/ApiNovaServiceGroups.php';
 $wgAutoloadClasses['ApiListNovaProjects'] = $dir . 
'api/ApiListNovaProjects.php';
 $wgAutoloadClasses['ApiListNovaInstances'] = $dir . 
'api/ApiListNovaInstances.php';
-$wgAutoloadClasses['EchoOpenStackManagerPresentationModel'] = $dir . 
'EchoOpenStackManagerPresentationModel.php';
+$wgAutoloadClasses['EchoOpenStackManagerPresentationModel'] =
+   $dir . 'EchoOpenStackManagerPresentationModel.php';
 $wgAutoloadClasses['OpenStackManagerEvent'] = $dir . 
'OpenStackManagerEvent.php';
 $wgSpecialPages['NovaKey'] = 'SpecialNovaKey';
 $wgSpecialPages['NovaProject'] = 'SpecialNovaProject';
@@ -311,8 +315,17 @@
switch ( $updater->getDB()->getType() ) {
case 'mysql':
$updater->addExtensionTable( 'openstack_tokens', 
"$base/schema-changes/tokens.sql" );
-   $updater->addExtensionTable( 'openstack_notification_event', 
"$base/schema-changes/openstack_add_notification_events_table.sql" );
-   $updater->addExtensionUpdate( [ 'modifyField', 
'openstack_tokens', 'token', 
"$base/schema-changes/openstack_change_token_size.sql", true ] );
+   $updater->addExtensionTable(
+   'openstack_notification_event',
+   
"$base/schema-changes/openstack_add_notification_events_table.sql"
+   );
+   $updater->addExtensionUpdate( [
+   'modifyField',
+   'openstack_tokens',
+   'token',
+   "$base/schema-changes/openstack_change_token_size.sql",
+   true
+   ] );
break;
}
return true;
@@ -377,7 +390,9 @@
$event->getType() == 'osm-instance-deleted'
) {
$extra = $event->getExtra();
-   foreach 

[MediaWiki-commits] [Gerrit] mediawiki...cldr[master]: Activate Generic.Files.LineLength

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

Change subject: Activate Generic.Files.LineLength
..


Activate Generic.Files.LineLength

The sniff already passed

Change-Id: I5e6c6bac2b411e8644debb063f5d1b43b8fdb0ed
---
M phpcs.xml
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/phpcs.xml b/phpcs.xml
index 8504891..ae5a704 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,11 +7,10 @@



-   

.

-   
+   
node_modules
vendor
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e6c6bac2b411e8644debb063f5d1b43b8fdb0ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...LiquidThreads[master]: Remove eclipse helper

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

Change subject: Remove eclipse helper
..


Remove eclipse helper

Was removed in core back in 2011 -
https://phabricator.wikimedia.org/rMW2e7d867478f1c9a34994236555bc493535da5da8


Change-Id: I683c06a5c9f54de7253d2f9a0339d4702a251a22
---
M api/ApiFeedLQTThreads.php
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index 3e42c5d..3477294 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -16,11 +16,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   // Eclipse helper - will be ignored in production
-   require_once "ApiBase.php";
-}
-
 use MediaWiki\MediaWikiServices;
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I683c06a5c9f54de7253d2f9a0339d4702a251a22
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...TwoColConflict[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: Id6ee38af6372f807a496c7fa5d33b4f22436eaf4
---
M includes/TwoColConflictPage.php
M phpcs.xml
M tests/phpunit/includes/LineBasedUnifiedDiffFormatterTest.php
3 files changed, 30 insertions(+), 20 deletions(-)

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



diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php
index 29eec16..13fed0a 100644
--- a/includes/TwoColConflictPage.php
+++ b/includes/TwoColConflictPage.php
@@ -55,7 +55,8 @@
$this->addCSS();
$this->addJS();
$this->deactivateWikEd();
-   $this->editFormTextTop = '';
+   $this->editFormTextTop =
+   '';
$this->editFormTextBottom = '';
$this->editFormTextBeforeContent = 
$this->addEditFormBeforeContent();
$this->editFormTextAfterContent = 
$this->addEditFormAfterContent();
@@ -122,10 +123,11 @@
$out .= '';
$out .= '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() . '' .
-   $this->buildEditSummary() . '';
+   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() .
+   '' . $this->buildEditSummary() . '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() . '';
+   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() .
+   '';
$out .= '';
$out .= '';
$out .= '';
@@ -298,14 +300,20 @@
$out .= '';
$out .= '';
$out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-1' ) . '';
-   $out .= ''
-   . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-2', $this->getSubmitButtonLabel() ) . '';
+   $out .= '' .
+   $this->getContext()->msg(
+   'twoColConflict-editor-col-desc-2', 
$this->getSubmitButtonLabel()
+   ) . '';
$out .= '';
$out .= '';
-   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) . '';
-   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) . '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) .
+   '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) .
+   '';
$out .= ''
-   . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-3', $this->getSubmitButtonLabel() ) . 
'';
+   . $this->getContext()->msg(
+   'twoColConflict-base-selection-desc-3', 
$this->getSubmitButtonLabel()
+   ) . '';
$out .= '';
 
return $out;
@@ -527,7 +535,9 @@
'' .
( count( $lines ) > 1 ? "\n" : 
$this->getContext()->msg( 'word-separator' ) ) .
'' .
-   htmlspecialchars( $this->trimStringToFullWord( 
array_pop( $lines ), $maxLength / 2, false ) ) .
+   htmlspecialchars(
+   $this->trimStringToFullWord( array_pop( $lines 
), $maxLength / 2, false )
+   ) .
'';
}
 
@@ -599,11 +609,12 @@
}
 
private function addJS() {
-   $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflict', 'true' );
-   $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflictWikiEditor', $this->wikiEditorIsEnabled() );
-   $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflictSubmitLabel', $this->getSubmitButtonLabel() );
+   $out = $this->context->getOutput();
+   $out->addJsConfigVars( 'wgTwoColConflict', 'true' );
+   $out->addJsConfigVars( 'wgTwoColConflictWikiEditor', 
$this->wikiEditorIsEnabled() );
+   $out->addJsConfigVars( 'wgTwoColConflictSubmitLabel', 
$this->getSubmitButtonLabel() );
 
-   $this->context->getOutput()->addModules( [
+   $out->addModules( [
'ext.TwoColConflict.initJs',
'ext.TwoColConflict.filterOptionsJs'
] );
diff --git a/phpcs.xml b/phpcs.xml

[MediaWiki-commits] [Gerrit] labs/striker[master]: Phabricator: replace maniphest.update with maniphest.edit

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364144 )

Change subject: Phabricator: replace maniphest.update with maniphest.edit
..

Phabricator: replace maniphest.update with maniphest.edit

Bug: T159044
Change-Id: I99286c9a12a6242a57ca382c484a503fa2a2ac5c
---
M striker/phabricator.py
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/44/364144/1

diff --git a/striker/phabricator.py b/striker/phabricator.py
index aa08fab..72c3704 100644
--- a/striker/phabricator.py
+++ b/striker/phabricator.py
@@ -293,8 +293,9 @@
 :param task: Task number (e.g. T12345)
 :param comment: Comment to add to task
 """
-phid = self.task(task)['phid']
-self.post('maniphest.update', {
-'phid': phid,
-'comments': comment,
+self.post('maniphest.edit', {
+'objectIdentifier': self.task(task)['phid'],
+'transactions': [
+{'type': 'comment', 'value': comment},
+],
 })

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: I09840d341c803f86baf372e289742ba7be39af89
---
M includes/ArticleAdder.php
M includes/CourseActivityView.php
M includes/DYKBox.php
M includes/DiffTable.php
M includes/ErrorPageErrorWithSelflink.php
M includes/RoleObject.php
M includes/Utils.php
M includes/pagers/ArticleTable.php
M includes/pagers/CoursePager.php
M includes/pagers/EPPager.php
M includes/pagers/OAPager.php
M includes/pagers/StudentActivityPager.php
M includes/specials/SpecialAmbassadorProfile.php
M includes/specials/SpecialCAs.php
M includes/specials/SpecialEducationProgram.php
M includes/specials/SpecialEnroll.php
M includes/specials/SpecialManageCourses.php
M includes/specials/SpecialMyCourses.php
M includes/specials/SpecialOAs.php
M includes/specials/SpecialStudents.php
M includes/specials/VerySpecialPage.php
M includes/tables/PageTable.php
22 files changed, 190 insertions(+), 77 deletions(-)

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



diff --git a/includes/ArticleAdder.php b/includes/ArticleAdder.php
index 522b119..52edb51 100644
--- a/includes/ArticleAdder.php
+++ b/includes/ArticleAdder.php
@@ -61,7 +61,9 @@
 *
 * @return boolean Indicates if the article was actually added. False 
means it already existed.
 */
-   public function addArticle( $actionUser, $courseId, $userId, $pageId, 
$pageTitle, $reviewers = [] ) {
+   public function addArticle(
+   $actionUser, $courseId, $userId, $pageId, $pageTitle, 
$reviewers = []
+   ) {
$articleExists = $this->articleStore->hasArticleWith(
$courseId,
$userId,
diff --git a/includes/CourseActivityView.php b/includes/CourseActivityView.php
index 9d58f60..219e5b2 100644
--- a/includes/CourseActivityView.php
+++ b/includes/CourseActivityView.php
@@ -39,7 +39,9 @@
protected $eventStore;
protected $courseStore;
 
-   public function __construct( OutputPage $outputPage, Language 
$language, EventStore $eventStore, CourseStore $courseStore ) {
+   public function __construct(
+   OutputPage $outputPage, Language $language, EventStore 
$eventStore, CourseStore $courseStore
+   ) {
$this->outputPage = $outputPage;
$this->language = $language;
$this->eventStore = $eventStore;
diff --git a/includes/DYKBox.php b/includes/DYKBox.php
index 8f00360..25eb378 100644
--- a/includes/DYKBox.php
+++ b/includes/DYKBox.php
@@ -31,7 +31,9 @@
 * @param string|bool $specificCategory
 * @param IContextSource|null $context
 */
-   public function __construct( $mainCategory, $specificCategory = false, 
IContextSource $context = null ) {
+   public function __construct(
+   $mainCategory, $specificCategory = false, IContextSource 
$context = null
+   ) {
if ( !is_null( $context ) ) {
$this->setContext( $context );
}
diff --git a/includes/DiffTable.php b/includes/DiffTable.php
index d1d7228..f1caf14 100644
--- a/includes/DiffTable.php
+++ b/includes/DiffTable.php
@@ -75,8 +75,12 @@
foreach ( $this->diff->getChangedFields() as $field => $values 
) {
$out->addHTML( '' );
 
-   $source = array_key_exists( 'source', $values ) ? 
$this->formatValue( $values['source'], $field ) : '';
-   $target = array_key_exists( 'target', $values ) ? 
$this->formatValue( $values['target'], $field ) : '';
+   $source = array_key_exists( 'source', $values )
+   ? $this->formatValue( $values['source'], $field 
)
+   : '';
+   $target = array_key_exists( 'target', $values )
+   ? $this->formatValue( $values['target'], $field 
)
+   : '';
 
$out->addElement( 'th', [], $field );
$out->addElement( 'td', [], $source );
@@ -90,7 +94,8 @@
 
/**
 * Do additional formatting.
-* This is a bit of a hack and really ought to be aware of the field 
type rather then using field names.
+* This is a bit of a hack and really ought to be aware of the field 
type rather
+* then using field names.
 *
 * @since 0.2
 *
diff --git a/includes/ErrorPageErrorWithSelflink.php 
b/includes/ErrorPageErrorWithSelflink.php
index 41a6634..6aca6ea 100644
--- a/includes/ErrorPageErrorWithSelflink.php
+++ b/includes/ErrorPageErrorWithSelflink.php
@@ -27,8 +27,8 @@
 *
 * @param \Message|string $msg Message key (string) for error text, or 
a Message object
 *
- 

[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Organize phpcs.xml a bit

Change-Id: If784a52e3af3ace68a2dc42a081d0d44cf38107a
---
M EducationProgram.hooks.php
M composer.json
M maintenance/deleteEducation.php
M maintenance/importWEPData.php
M maintenance/importWEPFromDB.php
M phpcs.xml
M tests/phpunit/ActionsTest.php
M tests/phpunit/ArticleAdderTest.php
M tests/phpunit/ArticleStoreTest.php
M tests/phpunit/EPArticleTest.php
M tests/phpunit/ExtensionTest.php
11 files changed, 153 insertions(+), 56 deletions(-)

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



diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php
index c04b342..2728b6b 100755
--- a/EducationProgram.hooks.php
+++ b/EducationProgram.hooks.php
@@ -36,7 +36,9 @@
 
global $wgEPSettings, $wgExtensionAssetsPath, $wgScriptPath;
 
-   $epResourceDir = $wgExtensionAssetsPath === false ? 
$wgScriptPath . '/extensions' : $wgExtensionAssetsPath;
+   $epResourceDir = $wgExtensionAssetsPath === false
+   ? $wgScriptPath . '/extensions'
+   : $wgExtensionAssetsPath;
 
$wgEPSettings['resourceDir'] = $epResourceDir;
$wgEPSettings['imageDir'] = $epResourceDir . 'images/';
@@ -269,13 +271,17 @@
 * @param array $links
 * @param Title $title
 */
-   protected static function displayTabs( SkinTemplate &$sktemplate, array 
&$links, Title $title ) {
+   protected static function displayTabs(
+   SkinTemplate &$sktemplate, array &$links, Title $title
+   ) {
if ( $title->getNamespace() == EP_NS ) {
$links['views'] = [];
$links['actions'] = [];
 
$user = $sktemplate->getUser();
-   $class = Utils::isCourse( $title ) ? 
'EducationProgram\Courses' : 'EducationProgram\Orgs';
+   $class = Utils::isCourse( $title )
+   ? 'EducationProgram\Courses'
+   : 'EducationProgram\Orgs';
$exists = $class::singleton()->hasIdentifier( 
$title->getText() );
$type = $sktemplate->getRequest()->getText( 'action' );
$isSpecial = $sktemplate->getTitle()->isSpecialPage();
@@ -321,14 +327,18 @@
];
 
$student = Student::newFromUser( $user 
);
-   $hasCourse = $student !== false && 
$student->hasCourse( [ 'title' => $title->getText() ] );
+   $hasCourse = $student !== false &&
+   $student->hasCourse( [ 'title' 
=> $title->getText() ] );
 
if ( $user->isAllowed( 'ep-enroll' ) && 
!$user->isBlocked() ) {
-   if ( !$hasCourse && 
Courses::singleton()->hasActiveTitle( $title->getText() ) ) {
+   if ( !$hasCourse &&
+   
Courses::singleton()->hasActiveTitle( $title->getText() )
+   ) {

$links['views']['enroll'] = [
'class' => 
$isSpecial ? 'selected' : false,
'text' => 
$sktemplate->msg( 'ep-tab-enroll' )->text(),
-   'href' => 
\SpecialPage::getTitleFor( 'Enroll', $title->getText() )->getLocalURL()
+   'href' => 
\SpecialPage::getTitleFor( 'Enroll', $title->getText() )
+   
->getLocalURL()
];
}
}
@@ -337,7 +347,8 @@
$links[$isSpecial ? 'views' : 
'actions']['disenroll'] = [
'class' => $isSpecial ? 
'selected' : false,
'text' => 
$sktemplate->msg( 'ep-tab-disenroll' )->text(),
-   'href' => 
\SpecialPage::getTitleFor( 'Disenroll', $title->getText() )->getLocalURL()
+   'href' => 
\SpecialPage::getTitleFor( 'Disenroll', $title->getText() )
+   

[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Change-Id: If624217c99dcddffb7bfc48c218a72110673fe6b
---
M includes/Events/RecentPageEventGrouper.php
M includes/Events/TimelineGroup.php
M includes/actions/Action.php
M includes/actions/AddArticleAction.php
M includes/actions/CompareAction.php
M includes/actions/DeleteAction.php
M includes/actions/EditAction.php
M includes/actions/EditCourseAction.php
M includes/actions/EditOrgAction.php
M includes/actions/RestoreAction.php
M includes/actions/UndeleteAction.php
M includes/actions/UndoAction.php
M includes/actions/ViewAction.php
M includes/actions/ViewCourseAction.php
M includes/api/ApiEnlist.php
M includes/api/ApiListStudents.php
M includes/api/ApiRefreshEducation.php
M includes/notifications/PresentationModel/CourseTalk.php
M includes/rows/Course.php
M includes/rows/Org.php
M includes/rows/PageObject.php
M includes/rows/RevisionedObject.php
22 files changed, 225 insertions(+), 92 deletions(-)

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



diff --git a/includes/Events/RecentPageEventGrouper.php 
b/includes/Events/RecentPageEventGrouper.php
index f5216ad..12ae8bb 100644
--- a/includes/Events/RecentPageEventGrouper.php
+++ b/includes/Events/RecentPageEventGrouper.php
@@ -79,7 +79,8 @@
$eventInfo = $event->getInfo();
 
$groupId = $eventInfo['page'] . '|';
-   $groupId .= array_key_exists( 'parent', $eventInfo ) && 
is_null( $eventInfo['parent'] ) ? 'create' : 'edit';
+   $groupId .= array_key_exists( 'parent', $eventInfo ) && 
is_null( $eventInfo['parent'] )
+   ? 'create' : 'edit';
 
if ( !array_key_exists( $groupId, $groups ) ) {
$groups[$groupId] = [];
diff --git a/includes/Events/TimelineGroup.php 
b/includes/Events/TimelineGroup.php
index b2569c7..fb7f9da 100644
--- a/includes/Events/TimelineGroup.php
+++ b/includes/Events/TimelineGroup.php
@@ -77,7 +77,9 @@
 * @return mixed
 * @throws Exception
 */
-   public static function newFromEventGroup( EventGroup $group, OutputPage 
$outputPage, Language $language ) {
+   public static function newFromEventGroup(
+   EventGroup $group, OutputPage $outputPage, Language $language
+   ) {
$type = null;
 
/**
@@ -87,7 +89,9 @@
if ( is_null( $type ) ) {
$type = $event->getType();
} elseif ( $type !== $event->getType() ) {
-   throw new Exception( 'Got events of different 
types when trying to build a ' . __CLASS__ );
+   throw new Exception(
+   'Got events of different types when 
trying to build a ' . __CLASS__
+   );
}
}
 
@@ -98,7 +102,9 @@
'edit-' . NS_USER_TALK => 
'\EducationProgram\Events\EditGroup',
];
 
-   $class = array_key_exists( $type, $typeMap ) ? $typeMap[$type] 
: '\EducationProgram\Events\UnknownGroup';
+   $class = array_key_exists( $type, $typeMap )
+   ? $typeMap[$type]
+   : '\EducationProgram\Events\UnknownGroup';
 
return new $class( $group->getEvents(), $outputPage, $language 
);
}
@@ -323,7 +329,9 @@
$text = $this->newMessage( 
'ep-timeline-cutoff', $text )->plain();
}
} else {
-   $text = trim( $info['comment'] ) === '' ? 
$this->newMessage( 'ep-timeline-no-summary' )->plain() : $info['comment'];
+   $text = trim( $info['comment'] ) === ''
+   ? $this->newMessage( 'ep-timeline-no-summary' 
)->plain()
+   : $info['comment'];
}
 
$html .= strip_tags(
@@ -390,9 +398,11 @@
 
// Give grep a chance to find the usages:
// ep-timeline-users-edit-article, ep-timeline-users-edit-talk, 
ep-timeline-users-edit-user,
-   // ep-timeline-users-edit-usertalk, 
ep-timeline-users-edit-user-self, ep-timeline-users-edit-usertalk-self,
-   // ep-timeline-users-create-article, 
ep-timeline-users-create-talk, ep-timeline-users-create-user,
-   // ep-timeline-users-create-usertalk, 
ep-timeline-users-create-user-self, ep-timeline-users-create-usertalk-self
+   // ep-timeline-users-edit-usertalk, 
ep-timeline-users-edit-user-self,
+   // ep-timeline-users-edit-usertalk-self, 
ep-timeline-users-create-article,
+   // ep-timeline-users-create-talk, 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP Ingenico gateway mimics GlobalCollect

2017-07-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364143 )

Change subject: WIP Ingenico gateway mimics GlobalCollect
..

WIP Ingenico gateway mimics GlobalCollect

Just swaps out the API calls and response parsing.
TODO: actually parse stuff

Change-Id: I4c02abd190b1ea27c1921f37196481d87cd0162a
---
M gateway_common/donation.api.php
A ingenico_gateway/ingenico.adapter.php
A tests/phpunit/Adapter/Ingenico/IngenicoApiTest.php
A tests/phpunit/Adapter/Ingenico/IngenicoFormLoadTest.php
A tests/phpunit/Adapter/Ingenico/IngenicoOrphanAdapterTest.php
A tests/phpunit/Adapter/Ingenico/IngenicoOrphanRectifierTest.php
A tests/phpunit/Adapter/Ingenico/IngenicoTest.php
A tests/phpunit/Adapter/Ingenico/RealTimeBankTransferIdealTest.php
A tests/phpunit/Adapter/Ingenico/RecurringTest.php
A tests/phpunit/Adapter/Ingenico/ResultSwitcherTest.php
10 files changed, 2,019 insertions(+), 11 deletions(-)


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

diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index c90896b..2a4f908 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -37,17 +37,23 @@
return;
}
 
-   if ( $this->gateway == 'globalcollect' ) {
-   switch ( $method ) {
-   // TODO: add other iframe payment methods
-   case 'cc':
-   $result = $gatewayObj->do_transaction( 
'INSERT_ORDERWITHPAYMENT' );
-   break;
-   default:
-   $result = $gatewayObj->do_transaction( 
'TEST_CONNECTION' );
-   }
-   } elseif ( $this->gateway == 'adyen' ) {
-   $result = $gatewayObj->do_transaction( 'donate' );
+   switch( $this->gateway ) {
+   case 'globalcollect':
+   switch ( $method ) {
+   // TODO: add other iframe payment 
methods
+   case 'cc':
+   $result = 
$gatewayObj->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
+   break;
+   default:
+   $result = 
$gatewayObj->do_transaction( 'TEST_CONNECTION' );
+   }
+   break;
+   case 'ingenico':
+   $result = $gatewayObj->do_transaction( 
'createHostedCheckout' );
+   break;
+   case 'adyen':
+   $result = $gatewayObj->do_transaction( 'donate' 
);
+   break;
}
 
// $normalizedData = $gatewayObj->getData_Unstaged_Escaped();
diff --git a/ingenico_gateway/ingenico.adapter.php 
b/ingenico_gateway/ingenico.adapter.php
new file mode 100644
index 000..1718bd9
--- /dev/null
+++ b/ingenico_gateway/ingenico.adapter.php
@@ -0,0 +1,68 @@
+getData_Unstaged_Escaped( 'email' );
+   $this->logger->info( "Making API call for donor $email" );
+
+   $filterResult = $this->runSessionVelocityFilter();
+   if ( $filterResult == false ) {
+   return false;
+   }
+
+   $provider = $this->getPaymentProvider();
+   switch( $this->getCurrentTransaction() ) {
+   case 'createHostedCheckout':
+   $payment = new Payment(
+   $this->getData_Staged( 'amount' ),
+   $this->getData_Staged( 'currency' ),
+   $this->getData_Staged( 'order_id' ),
+   $this->getData_Staged( 'locale' ),
+   $this->getData_Staged( 'country' ),
+   array(
+   'payment_product' => 
$this->getData_Staged( 'payment_product' ),
+   )
+   );
+
+   $result = $provider->createHostedPayment( 
$payment );
+   $this->transaction_response->setRawResponse( 
json_encode( $result ) );
+   return true;
+   default:
+   return false;
+   }
+   }
+
+   protected function getPaymentProvider() {
+   $method = $this->getData_Unstaged_Escaped( 'payment_method' );
+   return 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update cxserver to 3375da5

2017-07-09 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364142 )

Change subject: Update cxserver to 3375da5
..

Update cxserver to 3375da5

List of changes:
3375da5 Enable machine translation for Dutch (nl)

Change-Id: I47b7ccceeff7f6f47b8773be6dd36656af8697d3
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy 
refs/changes/42/364142/1

diff --git a/src b/src
index e69353b..3375da5 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit e69353be25481c9d374238a317c027fc5088a056
+Subproject commit 3375da5c8e3d5ed93e14c8441ea935dba892816b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47b7ccceeff7f6f47b8773be6dd36656af8697d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/deploy
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlogPage[master]: Remove $wgBlogPageDisplay['left_ad'] feature that was never ...

2017-07-09 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364141 )

Change subject: Remove $wgBlogPageDisplay['left_ad'] feature that was never 
completed
..

Remove $wgBlogPageDisplay['left_ad'] feature that was never completed

This is a feature that was leftover from the past (ArmchairGM/Wikia NYC)
which was never completed. There's no point in having it inside here
anyways, as there's extensions such as ShoutWikiAds that already
provide an advertisement feature.

Change-Id: I0f0c7653f9fd49470644703a48b1c154f43395bc
---
M extension.json
M includes/BlogPage.class.php
2 files changed, 1 insertion(+), 22 deletions(-)


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

diff --git a/extension.json b/extension.json
index 59cd130..713db0b 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "BlogPage",
-   "version": "2.5.0",
+   "version": "2.6.0",
"author": [
"David Pean",
"Jack Phoenix"
@@ -30,7 +30,6 @@
"author_articles": true,
"recent_editors": true,
"recent_voters": true,
-   "left_ad": false,
"popular_articles": true,
"in_the_news": true,
"comments_of_day": true,
diff --git a/includes/BlogPage.class.php b/includes/BlogPage.class.php
index 9caf282..c1cd48d 100644
--- a/includes/BlogPage.class.php
+++ b/includes/BlogPage.class.php
@@ -678,26 +678,6 @@
}
 
/**
-* Get an ad unit for the left side, if this feature is enabled in 
BlogPage
-* config.
-*
-* @return string HTML or nothing
-*/
-   public function leftAdUnit() {
-   global $wgBlogPageDisplay;
-
-   if ( $wgBlogPageDisplay['left_ad'] == false ) {
-   return '';
-   }
-
-   $output = '
-   
-   ';
-
-   return $output;
-   }
-
-   /**
 * Get some random news items from MediaWiki:Inthenews, if this feature 
is
 * enabled in BlogPage config and that interface message has some 
content.
 *

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use instead of

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

Change subject: Use  instead of 
..


Use  instead of 

"copyright" is not in the list of the allowed values for the attribut rel:
https://w3c.github.io/html/single-page.html#allowed-keywords-and-their-meanings

Bug: T167284
Change-Id: I09205bb146001d1d1d90e6a0f25d21851f3f697c
---
M includes/OutputPage.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 24a506c..969171d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -295,7 +295,7 @@
private $mEnableSectionEditLinks = true;
 
/**
-* @var string|null The URL to send in a  element with 
rel=copyright
+* @var string|null The URL to send in a  element with rel=license
 */
private $copyrightUrl;
 
@@ -3446,7 +3446,7 @@
 
if ( $copyright ) {
$tags['copyright'] = Html::element( 'link', [
-   'rel' => 'copyright',
+   'rel' => 'license',
'href' => $copyright ]
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09205bb146001d1d1d90e6a0f25d21851f3f697c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Martineznovo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Show message when duplicate SUL attach occurs

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364140 )

Change subject: Show message when duplicate SUL attach occurs
..

Show message when duplicate SUL attach occurs

Bug: T164847
Change-Id: I7770b04626d6a04019996e25658695df4bc5bedf
---
M striker/labsauth/views.py
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/40/364140/1

diff --git a/striker/labsauth/views.py b/striker/labsauth/views.py
index 0898228..a12ef48 100644
--- a/striker/labsauth/views.py
+++ b/striker/labsauth/views.py
@@ -27,6 +27,7 @@
 from django.contrib.auth import views as auth_views
 from django.core import urlresolvers
 from django.db.utils import DatabaseError
+from django.db.utils import IntegrityError
 from django.utils.six.moves.urllib.parse import urlparse
 from django.utils.translation import ugettext_lazy as _
 from django.views.decorators.cache import never_cache
@@ -151,6 +152,14 @@
 messages.info(
 req, _("Updated OAuth credentials for {user}".format(
 user=sul_user['username'])))
+except IntegrityError:
+logger.exception('user.save failed')
+messages.error(
+req,
+_(
+'Wikimedia account "{sul}" is already attached '
+'to another LDAP account.'
+).format(sul=sul_user['username']))
 except DatabaseError:
 logger.exception('user.save failed')
 messages.error(

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

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

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Check to see if ssh key is a duplicate

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364139 )

Change subject: Check to see if ssh key is a duplicate
..

Check to see if ssh key is a duplicate

Our LDAP schema does not allow the same key to be set multiple times for
the same user (reasonable). Check provided key against existing keys
when validating the user's input. As a belt and suspenders protection,
also catch LDAP save errors and turn them into nicer messages for the
user.

Change-Id: I2e229ac11a15fa60587f026e203cf725ed9bffcd
Bugs: T167931
---
M striker/profile/forms.py
M striker/profile/views.py
2 files changed, 28 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/39/364139/1

diff --git a/striker/profile/forms.py b/striker/profile/forms.py
index aa9cca9..6a878a7 100644
--- a/striker/profile/forms.py
+++ b/striker/profile/forms.py
@@ -66,6 +66,10 @@
 required=True,
 )
 
+def __init__(self, *args, **kwargs):
+self.keys = kwargs.pop('keys', [])
+super(SshKeyForm, self).__init__(*args, **kwargs)
+
 def clean_public_key(self):
 pub_key = self.cleaned_data.get('public_key').strip()
 key = utils.parse_ssh_key(pub_key)
@@ -78,6 +82,11 @@
 # of extracting the public key from an unencrypted private key.
 raise forms.ValidationError(
 _('Invalid public key.'), code='key_invalid')
+if pub_key in self.keys:
+raise forms.ValidationError(
+_('Public key {hash} already in use.').format(
+hash=key.hash_sha256()),
+code='key_duplicate')
 self.key = key
 return pub_key
 
diff --git a/striker/profile/views.py b/striker/profile/views.py
index 9f84b04..93bb5ed 100644
--- a/striker/profile/views.py
+++ b/striker/profile/views.py
@@ -29,6 +29,8 @@
 from django.views.decorators.debug import sensitive_post_parameters
 from django.utils.translation import ugettext_lazy as _
 
+import ldap
+
 from striker import decorators
 from striker import phabricator
 from striker.profile import forms
@@ -111,19 +113,27 @@
 @login_required
 def ssh_key_add(req):
 if req.method == 'POST':
-form = forms.SshKeyForm(data=req.POST)
+ldapuser = req.user.ldapuser
+keys = ldapuser.ssh_keys
+form = forms.SshKeyForm(data=req.POST, keys=keys)
 if form.is_valid():
-ldapuser = req.user.ldapuser
-keys = ldapuser.ssh_keys
 keys.append(form.cleaned_data.get('public_key'))
 ldapuser.ssh_keys = keys
-ldapuser.save()
-messages.info(
-req,
-_('Added SSH key {key_hash}').format(
-key_hash=form.key.hash_sha256()))
+try:
+ldapuser.save()
+messages.info(
+req,
+_('Added SSH key {key_hash}').format(
+key_hash=form.key.hash_sha256()))
+except ldap.TYPE_OR_VALUE_EXISTS as e:
+logger.exception('Failed to add ssh key')
+messages.error(
+req,
+_('Error saving ssh key. [req id: {id}]').format(
+id=req.id))
 else:
-messages.error(req, _('Invalid public key.'))
+# Pull the error message out of the form's errors
+messages.error(req, form.errors['public_key'][0])
 return shortcuts.redirect(urlresolvers.reverse('profile:ssh_keys'))
 
 

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

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

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Tools LDAP model migrations

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364138 )

Change subject: Tools LDAP model migrations
..

Tools LDAP model migrations

Django really wants to manage all the models it can find. This doesn't
work out very well with the LDAP backend so we need to remember to mark
LDAP models as unmanaged. I'm not really sure why they don't do this in
the base class. Even when marked as unmanaged Django wants to have
a no-op migration that tell it that the models exist.

Change-Id: Ie38d4fabb275665837ad23e5cdf0e05f07a8a14c
---
A striker/tools/migrations/0008_ldap_models.py
M striker/tools/models.py
2 files changed, 78 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/38/364138/1

diff --git a/striker/tools/migrations/0008_ldap_models.py 
b/striker/tools/migrations/0008_ldap_models.py
new file mode 100644
index 000..e608b06
--- /dev/null
+++ b/striker/tools/migrations/0008_ldap_models.py
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import ldapdb.models.fields
+
+
+class Migration(migrations.Migration):
+
+dependencies = [
+('tools', '0007_toolinfo_tags'),
+]
+
+operations = [
+migrations.CreateModel(
+# Unmanaged model. This won't actually apply when you run the
+# migration. There's no way to convince Django not to generate
+# these migrations in the first place.
+name='SudoRole',
+fields=[
+('dn', models.CharField(primary_key=True, serialize=False, 
max_length=200)),
+('cn', ldapdb.models.fields.CharField(primary_key=True, 
db_column='cn', serialize=False, max_length=200)),
+('users', 
ldapdb.models.fields.ListField(db_column='sudoUser')),
+('hosts', 
ldapdb.models.fields.ListField(db_column='sudoHost')),
+('commands', 
ldapdb.models.fields.ListField(db_column='sudoCommand')),
+('options', 
ldapdb.models.fields.ListField(db_column='sudoOption')),
+('runas_users', 
ldapdb.models.fields.ListField(db_column='sudoRunAsUser')),
+],
+options={
+'managed': False,
+},
+),
+migrations.CreateModel(
+# Unmanaged model. This won't actually apply when you run the
+# migration. There's no way to convince Django not to generate
+# these migrations in the first place.
+name='ToolUser',
+fields=[
+('dn', models.CharField(primary_key=True, serialize=False, 
max_length=200)),
+('uid', ldapdb.models.fields.CharField(primary_key=True, 
db_column='uid', serialize=False, max_length=200)),
+('cn', ldapdb.models.fields.CharField(db_column='cn', 
unique=True, max_length=200)),
+('sn', ldapdb.models.fields.CharField(db_column='sn', 
unique=True, max_length=200)),
+('uid_number', 
ldapdb.models.fields.IntegerField(db_column='uidNumber', unique=True)),
+('gid_number', 
ldapdb.models.fields.IntegerField(db_column='gidNumber')),
+('home_directory', 
ldapdb.models.fields.CharField(db_column='homeDirectory', max_length=200)),
+('login_shell', 
ldapdb.models.fields.CharField(db_column='loginShell', max_length=64)),
+],
+options={
+'managed': False,
+},
+),
+migrations.AlterModelOptions(
+# Unmanaged model. This won't actually apply when you run the
+# migration. There's no way to convince Django not to generate
+# these migrations in the first place.
+name='maintainer',
+options={'managed': False},
+),
+migrations.AlterModelOptions(
+# Unmanaged model. This won't actually apply when you run the
+# migration. There's no way to convince Django not to generate
+# these migrations in the first place.
+name='tool',
+options={'managed': False},
+),
+]
diff --git a/striker/tools/models.py b/striker/tools/models.py
index 3feae27..9384b12 100644
--- a/striker/tools/models.py
+++ b/striker/tools/models.py
@@ -60,6 +60,9 @@
 
 objects = MaintainerManager()
 
+class Meta:
+managed = False
+
 def __str__(self):
 return self.username
 
@@ -80,6 +83,9 @@
 cn = fields.CharField(db_column='cn', max_length=200, primary_key=True)
 gid_number = fields.IntegerField(db_column='gidNumber', unique=True)
 members = fields.ListField(db_column='member')
+
+class Meta:
+managed = False
 
 @property
 def name(self):
@@ -142,6 +148,9 @@
 db_column='homeDirectory', max_length=200)
 login_shell = 

[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: [WIP] Add TOC and page numbers via PDF post-processing

2017-07-09 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364137 )

Change subject: [WIP] Add TOC and page numbers via PDF post-processing
..

[WIP] Add TOC and page numbers via PDF post-processing

Parse the PDF named destination dictionary to find which page each
section ID appears on, then parse page annotations to find TOC item
positions and add the page number to each. Also add page numbers
to the bottom of each page.

Bug: T168871
Change-Id: Idacd765465ef86029baee502795f91f91b650dd6
---
M Collection.hooks.php
M Collection.php
M SpecialRenderBook.php
M composer.json
M includes/BookRenderer.php
A includes/PdfPostProcessor.php
6 files changed, 267 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection 
refs/changes/37/364137/1

diff --git a/Collection.hooks.php b/Collection.hooks.php
index 797e87f..41b5b6f 100644
--- a/Collection.hooks.php
+++ b/Collection.hooks.php
@@ -21,13 +21,19 @@
  */
 
 class CollectionHooks {
-   public static function onSetup() {
+   public static function onRegistration() {
// This prevents this extension from being run in environments
// that don't have the dependent code in core; this should be
// updated as a part of when additional dependencies are
// created and pushed into MediaWiki's core.  In particular
// this tracks the use of OOjs UI in the Collection extension.
wfUseMW( '1.25wmf19' );
+
+   // install Composer autoloader
+   $extensionRoot =  __DIR__;
+   if ( file_exists( $extensionRoot . '/vendor/autoload.php' ) ) {
+   require_once $extensionRoot . '/vendor/autoload.php';
+   }
}
 
/**
diff --git a/Collection.php b/Collection.php
index adee851..0bb8cd8 100644
--- a/Collection.php
+++ b/Collection.php
@@ -186,6 +186,8 @@
= __DIR__ . '/includes/BookRenderer.php';
 
$wgAutoloadClasses[MediaWiki\Extensions\Collection\RemexCollectionMunger::class]
= __DIR__ . '/includes/RemexCollectionMunger.php';
+$wgAutoloadClasses[\MediaWiki\Extensions\Collection\PdfPostProcessor::class]
+   = __DIR__ . '/includes/PdfPostProcessor.php';
 
 $wgAutoloadClasses['CollectionPageTemplate'] = __DIR__ . 
'/templates/CollectionPageTemplate.php';
 $wgAutoloadClasses['CollectionListTemplate'] = __DIR__ . 
'/templates/CollectionListTemplate.php';
@@ -218,7 +220,6 @@
 $wgHooks['SidebarBeforeOutput'][] = 'CollectionHooks::buildSidebar';
 $wgHooks['SiteNoticeAfter'][] = 'CollectionHooks::siteNoticeAfter';
 $wgHooks['OutputPageCheckLastModified'][] = 
'CollectionHooks::checkLastModified';
-$wgExtensionFunctions[] = 'CollectionHooks::onSetup';
 
 $wgAvailableRights[] = 'collectionsaveasuserpage';
 $wgAvailableRights[] = 'collectionsaveascommunitypage';
@@ -281,6 +282,8 @@
 
 $wgCollectionVivlioHtml = __DIR__ . 
'/vivliostyle-viewer/vivliostyle-viewer.html';
 
+CollectionHooks::onRegistration();
+
 # register global Ajax functions:
 
 function wfAjaxGetCollection() {
diff --git a/SpecialRenderBook.php b/SpecialRenderBook.php
index 2002533..1d75c50 100644
--- a/SpecialRenderBook.php
+++ b/SpecialRenderBook.php
@@ -2,6 +2,7 @@
 
 use MediaWiki\Extensions\Collection\BookRenderer;
 use MediaWiki\Extensions\Collection\DataProvider;
+use MediaWiki\Extensions\Collection\PdfPostProcessor;
 use MediaWiki\MediaWikiServices;
 
 function d($x) {
@@ -60,21 +61,27 @@
 
case 'electron':
case 'electron-vivlio':
-   // FIXME should just redirect to /raw instead 
and make that cacheable but
-   // need non-session-based storage for that
$book = $this->getBook();
-
-   $mode = ( $subPage === 'electron-vivlio' ) ? 
'vivlio' : 'skinned';
-   $bookUrl = $this->getUrl( $mode, $book['key'] );
-   // hack hack
-   $electronUrl = 
'http://electron.local.wmftest.net:10241/pdf';
-   $accessKey = 'secret';
-
-   $url = $electronUrl . '?' . wfArrayToCgi( [
-   'accessKey' => $accessKey,
-   'url' => $bookUrl,
-   ] );
+   $url = $this->getUrl( $subPage, $book['key'] );
$out->redirect( $url );
+   return;
+
+   case 'postprocessed':
+   $book = $this->getBook();
+   $pdfUrl = $this->getUrl( 'electron', 
$book['key'] );
+   $pdfContent = Http::get( $pdfUrl );
+
+   

[MediaWiki-commits] [Gerrit] labs/striker[master]: Refactor striker.tools.views

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364136 )

Change subject: Refactor striker.tools.views
..

Refactor striker.tools.views

The striker.tools.views module was getting to be quite long, so this
change splits it into several smaller modules.

Change-Id: If9d20212f1dac651968b1f645a636c13e4294c56
---
M striker/tools/urls.py
M striker/tools/utils.py
D striker/tools/views.py
A striker/tools/views/__init__.py
A striker/tools/views/decorators.py
A striker/tools/views/membership.py
A striker/tools/views/repo.py
A striker/tools/views/tool.py
A striker/tools/views/toolinfo.py
9 files changed, 1,132 insertions(+), 956 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/36/364136/1

diff --git a/striker/tools/urls.py b/striker/tools/urls.py
index 7a56500..e6378a4 100644
--- a/striker/tools/urls.py
+++ b/striker/tools/urls.py
@@ -20,7 +20,10 @@
 
 from django.conf import urls
 
-import striker.tools.views
+from striker.tools.views.toolinfo import HistoryView
+from striker.tools.views.toolinfo import TagAutocomplete
+from striker.tools.views.tool import MaintainerAutocomplete
+from striker.tools.views.tool import ToolUserAutocomplete
 
 
 TOOL = r'(?P[_a-z][-0-9_a-z]*)'
@@ -32,12 +35,12 @@
 urls.url(r'^$', 'striker.tools.views.index', name='index'),
 urls.url(
 r'^id/{tool}$'.format(tool=TOOL),
-'striker.tools.views.tool',
+'striker.tools.views.tool.view',
 name='tool'
 ),
 urls.url(
 r'^id/{tool}/info/create$'.format(tool=TOOL),
-'striker.tools.views.info_create',
+'striker.tools.views.toolinfo.create',
 name='info_create'
 ),
 urls.url(
@@ -45,7 +48,7 @@
 tool=TOOL,
 info_id=INFO_ID,
 ),
-'striker.tools.views.info_read',
+'striker.tools.views.toolinfo.read',
 name='info_read'
 ),
 urls.url(
@@ -53,7 +56,7 @@
 tool=TOOL,
 info_id=INFO_ID,
 ),
-'striker.tools.views.info_edit',
+'striker.tools.views.toolinfo.edit',
 name='info_edit'
 ),
 urls.url(
@@ -61,7 +64,7 @@
 tool=TOOL,
 info_id=INFO_ID,
 ),
-striker.tools.views.ToolInfoHistoryView.as_view(),
+HistoryView.as_view(),
 name='info_history'
 ),
 urls.url(
@@ -70,7 +73,7 @@
 info_id=INFO_ID,
 version_id=VERSION_ID,
 ),
-'striker.tools.views.info_revision',
+'striker.tools.views.toolinfo.revision',
 name='info_revision'
 ),
 urls.url(
@@ -79,52 +82,52 @@
 info_id=INFO_ID,
 version_id=VERSION_ID,
 ),
-'striker.tools.views.info_revision',
+'striker.tools.views.toolinfo.revision',
 name='info_admin'
 ),
 urls.url(
 r'^id/{tool}/repos/create$'.format(tool=TOOL),
-'striker.tools.views.repo_create',
+'striker.tools.views.repo.create',
 name='repo_create'
 ),
 urls.url(
 r'^id/{tool}/repos/id/{repo}$'.format(tool=TOOL, repo=REPO),
-'striker.tools.views.repo_view',
+'striker.tools.views.repo.view',
 name='repo_view'
 ),
 urls.url(
 r'^id/{tool}/maintainers/$'.format(tool=TOOL),
-'striker.tools.views.maintainers',
+'striker.tools.views.tool.maintainers',
 name='maintainers'
 ),
 urls.url(
 r'^membership/$',
-'striker.tools.views.membership',
+'striker.tools.views.membership.membership',
 name='membership'
 ),
 urls.url(
 r'^membership/apply$',
-'striker.tools.views.membership_apply',
+'striker.tools.views.membership.apply',
 name='membership_apply'
 ),
 urls.url(
 r'^membership/status/(?P\d+)$',
-'striker.tools.views.membership_status',
+'striker.tools.views.membership.status',
 name='membership_status'
 ),
 urls.url(
 r'tags/autocomplete/$',
-striker.tools.views.ToolInfoTagAutocomplete.as_view(),
+TagAutocomplete.as_view(),
 name='tags_autocomplete'
 ),
 urls.url(
 r'toolinfo/v1/toolinfo.json$',
-'striker.tools.views.toolinfo',
+'striker.tools.views.toolinfo.json_v1',
 name='toolinfo'
 ),
 urls.url(
 r'create/$',
-'striker.tools.views.tool_create',
+'striker.tools.views.tool.create',
 name='tool_create'
 ),
 urls.url(r'^api/', urls.include(
@@ -132,15 +135,16 @@
 'striker.tools.views',
 urls.url(
 r'^autocomplete/maintainer$',
-striker.tools.views.MaintainerAutocomplete.as_view(),
+MaintainerAutocomplete.as_view(),
 name='maintainer'),
 urls.url(
 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Create new tools

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364133 )

Change subject: Create new tools
..

Create new tools

Allow Tool Labs members to create new tool accounts. Tool creation
will also create a basic ToolInfo record for the new tool.

Bug: T149458
Change-Id: I1b112b7d04dcf20771c938fd67ac302f6c0b4c3f
---
M contrib/del-tool.sh
M striker/settings.py
M striker/templates/goals/TOOL_MAINTAINER.html
A striker/templates/tools/create.html
M striker/templates/tools/index.html
M striker/tools/forms.py
M striker/tools/models.py
M striker/tools/urls.py
A striker/tools/utils.py
M striker/tools/views.py
10 files changed, 427 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/33/364133/1

diff --git a/contrib/del-tool.sh b/contrib/del-tool.sh
index cc9aead..ac86603 100755
--- a/contrib/del-tool.sh
+++ b/contrib/del-tool.sh
@@ -2,7 +2,7 @@
 # Hack a tool into the testing LDAP server setup with MediaWiki-Vagrant's
 # role::striker.
 #
-# Usage: add-tool.sh NAME [DN_OF_MAINTAINER]
+# Usage: del-tool.sh NAME [DN_OF_MAINTAINER]
 
 TOOL=${1:?TOOL required}
 BASE_DN="dc=wmftest,dc=net"
@@ -13,4 +13,10 @@
 /usr/bin/ldapadd -x -D "${ADMIN_DN}" -w "${ADMIN_PASS}" <{% blocktrans with url='https://tools.wmflabs.org/' %}Your account is not 
associated with any tools. Visit tools.wmflabs.org to 
find a existing tool to join or create a new tool.{% endblocktrans %}
+{% url "tools:index" as tools_url %}
+{% blocktrans with url='' %}Your account is not associated with any tools. 
Visit the Tools page to find a existing tool to 
join or create a new tool.{% endblocktrans %}
 {% endblock %}
diff --git a/striker/templates/tools/create.html 
b/striker/templates/tools/create.html
new file mode 100644
index 000..f26cdc7
--- /dev/null
+++ b/striker/templates/tools/create.html
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+{% load bootstrap3 %}
+{% load i18n %}
+{% load staticfiles %}
+
+{% block title %}{% trans "Create Tool account" %}{% endblock %}
+
+{% block pre_content %}
+
+  {% trans "Tools" %}
+  {% trans "Create Tool account" %}
+
+{{ block.super }}
+{% endblock %}
+
+{% block content %}
+
+  
+
+  
+{% bootstrap_icon "wrench" %} {% trans "Create 
Tool account" %}
+  
+  
+{% blocktrans with 
help="https://wikitech.wikimedia.org/wiki/Help:Tool_Labs#What_is_a_Tool_account.3F;
 %}A Tool account is the "user" associated with a Tool on Tool Labs. The 
account allows multiple Tool Labs users to collaborate on creating and 
maintaining a tool. Maintainers may have more than one tool account, and tool 
accounts may have more than one maintainer. See help on 
wikitech for more information.{% endblocktrans %}
+
+  {% csrf_token %}
+  {% bootstrap_form form %}
+  {% buttons %}
+  
+  {% endbuttons %}
+
+  
+
+  
+
+{% endblock %}
+
+{% block js %}
+{{ block.super }}
+
+
+{{ form.media }}
+{% endblock %}
diff --git a/striker/templates/tools/index.html 
b/striker/templates/tools/index.html
index 10cfb5d..a44db7d 100644
--- a/striker/templates/tools/index.html
+++ b/striker/templates/tools/index.html
@@ -11,11 +11,14 @@
 {% bootstrap_icon "star" %} {% trans "Your 
tools" %}
 {% if not user.is_anonymous %}
 
+  {% if member %}
+  {% 
bootstrap_icon "plus-sign" %} {% trans "Create Tool account" %}
+  {% endif %}
   {% for tool in my_tools %}
   {{ tool.name }}
   {% empty %}
   {% if member %}
-  {% blocktrans with 
url='https://tools.wmflabs.org/' %}Your account is not associated with any 
tools. Visit tools.wmflabs.org to find a existing tool 
to join or create a new tool.{% endblocktrans %}
+  {% blocktrans %}Your account is not 
associated with any tools.{% endblocktrans %}
   {% else %}
   
 {% blocktrans %}Request membership in the Tool Labs project so 
you can create your own tool and help maintain existing tools.{% endblocktrans 
%}
diff --git a/striker/tools/forms.py b/striker/tools/forms.py
index 47a821f..89bfe8b 100644
--- a/striker/tools/forms.py
+++ b/striker/tools/forms.py
@@ -21,15 +21,19 @@
 import re
 
 from django import forms
+from django.core import validators
+from django.utils.safestring import mark_safe
 from django.utils.translation import ugettext_lazy as _
 
 from dal import autocomplete
 from parsley.decorators import parsleyfy
 
 from striker import phabricator
+from striker.tools import utils
 from striker.tools.models import AccessRequest
 from striker.tools.models import SoftwareLicense
 from striker.tools.models import ToolInfo
+from striker.tools.models import ToolInfoTag
 
 
 phab = phabricator.Client.default_client()
@@ -194,3 +198,95 @@
 class ToolInfoPublicForm(ToolInfoForm):
 class Meta(ToolInfoForm.Meta):
 exclude = ('name', 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Update to use Toolforge branding

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364134 )

Change subject: Update to use Toolforge branding
..

Update to use Toolforge branding

Change "Tool Labs" to "Toolforge" in all locations. Also use Wikimedia
VPS or Wikimedia Cloud Services in appropriate places instead of "Labs".

Bug: T168480
Change-Id: Ifcc9bfc9b8e5427b2d2576660ec1f1044a5bac1a
---
M README.rst
M setup.py
M striker/goals/signals/handlers.py
M striker/templates/base.html
M striker/templates/goals/ACCOUNT_SSH.html
M striker/templates/goals/TOOL_GIT.html
M striker/templates/goals/TOOL_MEMBER.html
M striker/templates/index.html
M striker/templates/index/anon.html
M striker/templates/labsauth/base.html
M striker/templates/profile/settings/accounts/ldap.html
M striker/templates/register/base.html
M striker/templates/register/confirm.html
M striker/templates/register/email.html
M striker/templates/register/shell.html
M striker/templates/tools/create.html
M striker/templates/tools/index.html
M striker/templates/tools/membership.html
M striker/templates/tools/membership/apply.html
M striker/templates/tools/membership/status.html
M striker/tools/forms.py
M striker/tools/models.py
M striker/tools/views.py
23 files changed, 36 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/34/364134/1

diff --git a/README.rst b/README.rst
index f055a9a..4e93068 100644
--- a/README.rst
+++ b/README.rst
@@ -1,9 +1,9 @@
 ===
-Striker (Wikimedia Tool Labs Dashboard)
+Striker (Wikimedia Toolforge Dashboard)
 ===
 
 **Striker** is a Django-based project that provides services needed by
-Wikimedia Tool Labs developers. A blacksmith's striker is an assistant whose
+Wikimedia Toolforge developers. A blacksmith's striker is an assistant whose
 job is to swing a large sledgehammer in forging operations at the direction of
 the blacksmith.
 
diff --git a/setup.py b/setup.py
index bb333ca..fd2f0b8 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
 setup(
 name='Striker',
 version='0.1',
-description='Wikimedia Tool Labs Dashboard',
+description='Wikimedia Toolforge Dashboard',
 author='Wikimedia Foundation',
 license='GPLv3+',
 url='https://tools.wmflabs.org/',
diff --git a/striker/goals/signals/handlers.py 
b/striker/goals/signals/handlers.py
index 6da3f89..b42777a 100644
--- a/striker/goals/signals/handlers.py
+++ b/striker/goals/signals/handlers.py
@@ -52,7 +52,7 @@
 
 
 def check_goal_member(user):
-"""Check LabsUser model for Tool Labs membership."""
+"""Check LabsUser model for Toolforge membership."""
 groups = user.groups.values_list('name', flat=True)
 if settings.TOOLS_TOOL_LABS_GROUP_NAME in groups:
 user.milestones.recordMilestone(GOALS['TOOL_MEMBER'])
diff --git a/striker/templates/base.html b/striker/templates/base.html
index fee0fab..e6dd50e 100644
--- a/striker/templates/base.html
+++ b/striker/templates/base.html
@@ -33,7 +33,7 @@
 
   
   
-
+
   
 
 
diff --git a/striker/templates/goals/ACCOUNT_SSH.html 
b/striker/templates/goals/ACCOUNT_SSH.html
index cff77b4..60126c3 100644
--- a/striker/templates/goals/ACCOUNT_SSH.html
+++ b/striker/templates/goals/ACCOUNT_SSH.html
@@ -4,7 +4,7 @@
 {% block title %}{% trans "Add your SSH public key" %}{% endblock %}
 
 {% block body %}
-{% blocktrans %}Labs and Tool Labs servers are accessed using https://en.wikipedia.org/wiki/Secure_Shell;>SSH. You need to upload 
an ssh public key to enable your SSH access.{% endblocktrans %}
+{% blocktrans %}Wikimedia VPS and Toolforge servers are accessed using https://en.wikipedia.org/wiki/Secure_Shell;>SSH. You need to upload 
an ssh public key to enable your SSH access.{% endblocktrans %}
 {% blocktrans %}See https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Access#Generating_and_uploading_an_SSH_key;>the
 help documentation for more information on how to generate and upload your 
public SSH key.{% endblocktrans %}
 {% trans 
"Add public SSH key" %}
 {% endblock %}
diff --git a/striker/templates/goals/TOOL_GIT.html 
b/striker/templates/goals/TOOL_GIT.html
index 4538eb6..2f38e15 100644
--- a/striker/templates/goals/TOOL_GIT.html
+++ b/striker/templates/goals/TOOL_GIT.html
@@ -4,6 +4,6 @@
 {% block title %}{% trans "Add a git repository to a tool" %}{% endblock %}
 
 {% block body %}
-{% blocktrans %}Tool Labs now offers hosting for git repositories using 
Phabricator and Diffusion. You can add a Diffusion repository to any tool you 
maintain.{% endblocktrans %}
+{% blocktrans %}Toolforge offers hosting for git repositories using 
Phabricator and Diffusion. You can add a Diffusion repository to any tool you 
maintain.{% endblocktrans %}
 {% trans "View my 
tools" %}
 {% endblock %}
diff --git 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Upgrade parsley.js to v2.7.2

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364132 )

Change subject: Upgrade parsley.js to v2.7.2
..

Upgrade parsley.js to v2.7.2

Upgrade the Parsely.js library used for client side form validation from
v2.4.4 to v 2.7.2. This is being done primarily to have access to the
'data-parsley-debounce' annotation that can be used to rate limit
backend requests for expensive validations.

Change-Id: I9933987eb516438b4ad4b402df71f2b0253ebeeb
---
M static/js/parsley.js
M static/js/parsley.min.js
M static/js/parsley.min.js.map
3 files changed, 430 insertions(+), 348 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/32/364132/1


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

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

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Manage tool maintainers

2017-07-09 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364135 )

Change subject: Manage tool maintainers
..

Manage tool maintainers

Add support of adding and removing tool maintainers. Also support adding
and removing other tools accounts. This is needed to allow the legacy
practice of using a tool account as a library source for one or more
dependent tools.

Bug: T149458
Bug: T128400
Change-Id: I84e8452b0c592283a6deb7c577f6ec3f037489ce
---
M striker/openstack.py
M striker/register/utils.py
M striker/settings.py
M striker/templates/tools/index.html
A striker/templates/tools/maintainers.html
M striker/templates/tools/tool.html
A striker/tools/cache.py
M striker/tools/forms.py
M striker/tools/migrations/0001_squashed.py
M striker/tools/models.py
M striker/tools/urls.py
M striker/tools/views.py
12 files changed, 429 insertions(+), 98 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/35/364135/1

diff --git a/striker/openstack.py b/striker/openstack.py
index 6a20d02..6c5c166 100644
--- a/striker/openstack.py
+++ b/striker/openstack.py
@@ -81,11 +81,14 @@
 """Convenience method for getting a client with super user rights."""
 return self._client(project='admin', interface='admin')
 
-def role(self, name):
+def _roles(self):
 if self.roles is None:
 keystone = self._client()
 self.roles = {r.name: r for r in keystone.roles.list()}
-return self.roles[name]
+return self.roles
+
+def role(self, name):
+return self._roles()[name]
 
 def grant_role(self, role, user, project=None):
 project = project or self.project
@@ -98,3 +101,18 @@
 # We need global admin rights to change role assignments
 keystone = self._admin_client()
 keystone.roles.revoke(role, user=user, project=project)
+
+def users_by_role(self, project=None):
+project = project or self.project
+keystone = self._client()
+# Ignore novaadmin & novaobserver in all user lists
+seen = ['novaadmin', 'novaobserver']
+data = {}
+for role_name, role_id in self._roles().items():
+data[role_name] = [
+r.user['id'] for r in keystone.role_assignments.list(
+project=project, role=role_id)
+if r.user['id'] not in seen
+]
+seen += data[role_name]
+return data
diff --git a/striker/register/utils.py b/striker/register/utils.py
index 2cacc45..c43541b 100644
--- a/striker/register/utils.py
+++ b/striker/register/utils.py
@@ -27,7 +27,7 @@
 
 from striker import mediawiki
 from striker.labsauth.models import LabsUser
-from striker.tools.models import Maintainer
+from striker.labsauth.models import PosixAccount
 
 
 logger = logging.getLogger(__name__)
@@ -35,6 +35,7 @@
 
 def sul_available(name):
 try:
+# TODO: change to LdapUser once T148048 is done
 LabsUser.objects.get(sulname=name)
 except LabsUser.DoesNotExist:
 return True
@@ -82,8 +83,9 @@
 
 def username_available(name):
 try:
-Maintainer.objects.get(full_name=name)
-except Maintainer.DoesNotExist:
+# Check vs any posix account
+PosixAccount.objects.get(cn=name)
+except PosixAccount.DoesNotExist:
 return True
 else:
 return False
@@ -91,8 +93,9 @@
 
 def shellname_available(name):
 try:
-Maintainer.objects.get(username=name)
-except Maintainer.DoesNotExist:
+# Check vs any posix account
+PosixAccount.objects.get(uid=name)
+except PosixAccount.DoesNotExist:
 return True
 else:
 return False
diff --git a/striker/settings.py b/striker/settings.py
index 0afdbad..584d957 100644
--- a/striker/settings.py
+++ b/striker/settings.py
@@ -21,6 +21,7 @@
 import configparser
 import ldap
 import os
+import sys
 
 import django_auth_ldap.config
 
@@ -38,6 +39,10 @@
 '/etc/striker/striker.ini',
 ])
 
+# Hack so that we can guard things that will probably fail miserably in test
+# like contacting an external server
+TEST_MODE = 'test' in sys.argv
+
 # == Logging ==
 LOGGING = {
 'version': 1,
diff --git a/striker/templates/tools/index.html 
b/striker/templates/tools/index.html
index 7ee9bfb..f30c5d4 100644
--- a/striker/templates/tools/index.html
+++ b/striker/templates/tools/index.html
@@ -11,9 +11,6 @@
 {% bootstrap_icon "star" %} {% trans "Your 
tools" %}
 {% if not user.is_anonymous %}
 
-  {% if member %}
-  {% 
bootstrap_icon "plus-sign" %} {% trans "Create Tool account" %}
-  {% endif %}
   {% for tool in my_tools %}
   {{ tool.name }}
   {% empty %}
@@ -22,21 +19,25 @@
   {% else %}
   
 {% blocktrans %}Request membership in the Toolforge project so 
you can create your own tool and 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add import sources for specieswiki

2017-07-09 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364131 )

Change subject: Add import sources for specieswiki
..

Add import sources for specieswiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6edc83a..3a0b650 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11202,6 +11202,7 @@
'sv', 'ta', 'te', 'th', 'tr', 'uk', 'vi', 'yi', 'zh',
'meta', 'commons',
], // T34411
+   'specieswiki' => [ 'd', 'c', 'incubator', 'outreach', 'm', 'mediawiki' 
], // T170094
'srnwiki' => [ 'incubator' ],
'srwiki' => [ 'wikt', 'meta' ], // T64533
'srwiktionary' => [ 'w' ],

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add composer-merge-plugin

2017-07-09 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364130 )

Change subject: Add composer-merge-plugin
..

Add composer-merge-plugin

T169593

Change-Id: I6d44d7006b7c8815433d270a4a8a46b4d4b9e606
---
M composer.json
M composer.lock
2 files changed, 89 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/30/364130/1

diff --git a/composer.json b/composer.json
index 345150b..27af0c7 100644
--- a/composer.json
+++ b/composer.json
@@ -24,13 +24,22 @@
 "phpmailer/phpmailer": "5.2.*",
 "phpseclib/phpseclib":  "~2.0",
 "predis/predis": "1.*",
-"twig/twig": "1.*"
+"twig/twig": "1.*",
+"wikimedia/composer-merge-plugin": "^1.4"
 },
 "repositories": [
-{
-"type": "git",
-"url": "https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;
-}
+  {
+"type": "git",
+"url": "https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;
+  },
+  {
+"type": "git",
+"url": "https://github.com/eileenmcnaughton/omnimail-silverpop;
+  },
+  {
+"type": "git",
+"url": "https://github.com/eileenmcnaughton/silverpop-php-connector;
+  }
 ],
 "require-dev": {
 "phpunit/phpunit": "5.*",
@@ -38,8 +47,24 @@
 "jakub-onderka/php-console-highlighter": "~0.3.2"
 },
 "scripts": {
-"test": [
-   "parallel-lint -e php,module,install,inc --exclude 
vendor ."
-   ]
+  "test": [
+"parallel-lint -e php,module,install,inc --exclude vendor --exclude 
sites/default/civicrm/extensions/org.wikimedia.omnimail/vendor."
+  ]
+},
+"minimum-stability": "dev",
+"prefer-stable": true,
+"extra": {
+  "merge-plugin": {
+"include": [
+  "sites/default/civicrm/extensions/*/composer.json"
+],
+"recurse": true,
+"replace": false,
+"ignore-duplicates": false,
+"merge-dev": true,
+"merge-extra": false,
+"merge-extra-deep": false,
+"merge-scripts": false
+  }
 }
 }
diff --git a/composer.lock b/composer.lock
index e086b90..ef63c35 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "9d359779ffaa56b80b732235f55a98e9",
+"content-hash": "7099968f02637a7ce97dae3c0569ac66",
 "packages": [
 {
 "name": "addshore/psr-6-mediawiki-bagostuff-adapter",
@@ -88,7 +88,7 @@
 "payment",
 "payments"
 ],
-"time": "2016-02-17T00:44:20+00:00"
+"time": "2016-02-17 00:53:20"
 },
 {
 "name": "clio/clio",
@@ -198,7 +198,7 @@
 "queue",
 "transaction"
 ],
-"time": "2017-04-17T14:11:55+00:00"
+"time": "2017-04-17 14:11:55"
 },
 {
 "name": "cogpowered/finediff",
@@ -1139,6 +1139,55 @@
 "time": "2017-01-11T19:36:15+00:00"
 },
 {
+"name": "wikimedia/composer-merge-plugin",
+"version": "v1.4.0",
+"source": {
+"type": "git",
+"url": 
"https://github.com/wikimedia/composer-merge-plugin.git;,
+"reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/ca453f9f13d8b05f86f20ea10be992a782e6f78c;,
+"reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c",
+"shasum": ""
+},
+"require": {
+"composer-plugin-api": "^1.0",
+"php": ">=5.3.2"
+},
+"require-dev": {
+"composer/composer": "~1.0.0",
+"jakub-onderka/php-parallel-lint": "~0.8",
+"phpunit/phpunit": "~4.8|~5.0",
+"squizlabs/php_codesniffer": "~2.1.0"
+},
+"type": "composer-plugin",
+"extra": {
+"branch-alias": {
+"dev-master": "1.3.x-dev"
+},
+"class": "Wikimedia\\Composer\\MergePlugin"
+},
+"autoload": {
+"psr-4": {
+"Wikimedia\\Composer\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"MIT"
+],
+"authors": [
+{
+"name": "Bryan Davis",
+

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Do not try to compile a regex object in harvest_template.py

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

Change subject: Do not try to compile a regex object in harvest_template.py
..


Do not try to compile a regex object in harvest_template.py

Change-Id: Ic03189f91c66fc2ef1b59fe4bbbd1482fb1f753d
---
M scripts/harvest_template.py
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index bfcc6ac..b9954af 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -34,7 +34,6 @@
 __version__ = '$Id$'
 #
 
-import re
 import signal
 
 willstop = False
@@ -172,7 +171,7 @@
 else:
 if claim.type == 'wikibase-item':
 # Try to extract a valid page
-match = re.search(pywikibot.link_regex, value)
+match = pywikibot.link_regex.search(value)
 if match:
 link_text = match.group(1)
 else:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic03189f91c66fc2ef1b59fe4bbbd1482fb1f753d
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] format string must be concatenated first

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

Change subject: [bugfix] format string must be concatenated first
..


[bugfix] format string must be concatenated first

Bug: T170087
Change-Id: Ie106f296258ddf3404a2ae30489395375e2eeb93
---
M scripts/checkimages.py
1 file changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Framawiki: Looks good to me, but someone else must approve
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 7b22ade..2caf92b 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -872,8 +872,8 @@
 # It's not only on commons but the image needs a check
 # the second usually is a url or something like that.
 # Compare the two in equal way, both url.
-repme = (self.list_entry +
- "is also on '''Commons''': [[commons:File:%s]]"
+repme = ((self.list_entry +
+  "is also on '''Commons''': [[commons:File:%s]]")
  % (self.imageName,
 commons_image_with_this_hash.title(
 withNamespace=False)))
@@ -1012,11 +1012,11 @@
 
 if self.duplicatesReport or only_report:
 if only_report:
-repme = (self.list_entry + 'has the following duplicates '
- "('''forced mode'''):"
+repme = ((self.list_entry + 'has the following duplicates '
+  "('''forced mode'''):")
  % self.image.title(asUrl=True))
 else:
-repme = (self.list_entry + 'has the following duplicates:'
+repme = ((self.list_entry + 'has the following 
duplicates:')
  % self.image.title(asUrl=True))
 
 for dup_page in duplicates:
@@ -1299,10 +1299,10 @@
 self.some_problem = False
 else:
 if not self.seems_ok and self.license_found:
-rep_text_license_fake = (self.list_entry +
- "seems to have a ''fake license'', "
- 'license detected: '
- '%s' %
+rep_text_license_fake = ((self.list_entry +
+  "seems to have a ''fake license'', "
+  'license detected: '
+  '%s') %
  (self.imageName, self.license_found))
 printWithTimeZone(
 u"%s seems to have a fake license: %s, reporting..."

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie106f296258ddf3404a2ae30489395375e2eeb93
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Merlijn van Deen 
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...CentralAuth[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364128 )

Change subject: Break long lines
..

Break long lines

Change-Id: I4dd48bea826310fda99ac9f7d416a687636c3bda
---
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthPrimaryAuthenticationProvider.php
M includes/CentralAuthUser.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/SuppressUserJob.php
M includes/session/CentralAuthSessionProvider.php
M includes/session/CentralAuthTokenSessionProvider.php
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialGlobalGroupMembership.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameProgress.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalRenameUser.php
M includes/specials/SpecialGlobalUsers.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
M includes/specials/SpecialWikiSets.php
19 files changed, 540 insertions(+), 223 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/28/364128/1

diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 60ef39d..b292acd 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -54,7 +54,8 @@
$wgHooks['AbortAutoAccount'][] = 
'CentralAuthPreAuthManagerHooks::onAbortAutoAccount';
$wgHooks['UserLoginComplete'][] = 
'CentralAuthPreAuthManagerHooks::onUserLoginComplete';
$wgHooks['UserLogout'][] = 
'CentralAuthPreAuthManagerHooks::onUserLogout';
-   $wgHooks['SpecialPage_initList'][] = 
'CentralAuthPreAuthManagerHooks::onSpecialPage_initList';
+   $wgHooks['SpecialPage_initList'][] =
+   
'CentralAuthPreAuthManagerHooks::onSpecialPage_initList';
 
if ( $wgCentralAuthCheckSULMigration ) {
// Install hidden special page for renamed users
@@ -106,7 +107,9 @@
$wgAutoloadClasses['CentralAuthAntiSpoofHooks'] =

"$caBase/AntiSpoof/CentralAuthAntiSpoofHooks.php";
 
-   if ( !class_exists( MediaWiki\Auth\AuthManager::class ) 
|| !empty( $wgDisableAuthManager ) ) {
+   if ( !class_exists( MediaWiki\Auth\AuthManager::class ) 
||
+   !empty( $wgDisableAuthManager )
+   ) {
$wgHooks['AbortNewAccount'][] =

'CentralAuthAntiSpoofHooks::asAbortNewAccountHook';
}
@@ -158,12 +161,15 @@
 * @param string $type Unused
 * @param string $action
 * @param Title $title
-* @param Skin|null $skin If null, we want to use the wiki content 
language, since that will go to the IRC feed.
+* @param Skin|null $skin If null, we want to use the wiki content 
language,
+*   since that will go to the IRC feed.
 * @param array $params
 * @param bool $filterWikilinks
 * @return string
 */
-   public static function onHandleWikiSetLogEntry( $type, $action, $title, 
$skin, $params, $filterWikilinks = false ) {
+   public static function onHandleWikiSetLogEntry(
+   $type, $action, $title, $skin, $params, $filterWikilinks = false
+   ) {
if ( $skin ) {
$link = Linker::link( $title, htmlspecialchars( 
$params[0] ) );
} else {
@@ -181,8 +187,14 @@
$args = [ WikiSet::formatType( $params[1] ), 
WikiSet::formatType( $params[2] ) ];
break;
case 'setchange':
-   $args = [ $params[1]
-   ? $params[1] : wfMessage( 'rightsnone' 
)->text(), $params[2] ? $params[2] : wfMessage( 'rightsnone' )->text() ];
+   $args = [
+   $params[1]
+   ? $params[1]
+   : wfMessage( 'rightsnone' 
)->text(),
+   $params[2]
+   ? $params[2]
+   : wfMessage( 'rightsnone' 
)->text()
+   ];
break;
default: // 'deleteset'
$args = [];
@@ -206,23 +218,33 @@
 * @param string $type Unused
 * @param string $action Unused
 * @param Title $title Unused
-* @param Skin|null $skin 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364129 )

Change subject: Break long lines
..

Break long lines

Change-Id: Ide9ffeecf37036f715e9f82dcd2c435cd64a4527
---
M AntiSpoof/CentralAuthAntiSpoofHooks.php
M CentralAuth.php
M includes/GlobalRename/GlobalRenameUserStatus.php
M includes/GlobalRename/GlobalUserMergeDatabaseUpdates.php
M includes/api/ApiQueryGlobalUserInfo.php
M includes/api/ApiQueryWikiSets.php
M maintenance/checkLocalNames.php
M maintenance/checkLocalUser.php
M maintenance/createLocalAccount.php
M maintenance/deleteEmptyAccounts.php
M maintenance/forceRenameUsers.php
M maintenance/migrateAccount.php
M maintenance/migratePass1.php
M maintenance/populateListOfUsersToRename.php
M maintenance/populateLocalAndGlobalIds.php
M maintenance/resetGlobalUserTokens.php
M maintenance/sendConfirmAndMigrateEmail.php
M phpcs.xml
M tests/phpunit/CentralAuthPluginUsingDatabaseTest.php
M tests/phpunit/CentralAuthUserTest.php
20 files changed, 255 insertions(+), 83 deletions(-)


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

diff --git a/AntiSpoof/CentralAuthAntiSpoofHooks.php 
b/AntiSpoof/CentralAuthAntiSpoofHooks.php
index b3d0a3d..a2ce69a 100644
--- a/AntiSpoof/CentralAuthAntiSpoofHooks.php
+++ b/AntiSpoof/CentralAuthAntiSpoofHooks.php
@@ -14,7 +14,9 @@
public static function asAbortNewAccountHook( $user, &$message ) {
global $wgAntiSpoofAccounts, $wgUser, $wgRequest;
 
-   $status = self::testNewAccount( $user, $wgUser, 
$wgAntiSpoofAccounts, $wgRequest->getCheck( 'wpIgnoreAntiSpoof' ) );
+   $status = self::testNewAccount(
+   $user, $wgUser, $wgAntiSpoofAccounts, 
$wgRequest->getCheck( 'wpIgnoreAntiSpoof' )
+   );
if ( !$status->isGood() ) {
$message = Status::wrap( $status 
)->getMessage()->escaped();
}
@@ -54,18 +56,23 @@
if ( empty( $conflicts ) ) {
$logger->info( "{$mode}PASS new account '$name' 
[$normalized]" );
} else {
-   $logger->info( "{$mode}CONFLICT new account 
'$name' [$normalized] spoofs " . implode( ',', $conflicts ) );
+   $logger->info( "{$mode}CONFLICT new account 
'$name' [$normalized] spoofs " .
+   implode( ',', $conflicts ) );
if ( $active ) {
$numConflicts = count( $conflicts );
 
// This message pasting-together sucks.
-   $message = wfMessage( 
'antispoof-conflict-top', $name )->numParams( $numConflicts )->escaped();
+   $message = wfMessage( 
'antispoof-conflict-top', $name )
+   ->numParams( $numConflicts 
)->escaped();
$message .= '';
foreach ( $conflicts as $simUser ) {
-   $message .= '' . wfMessage( 
'antispoof-conflict-item', $simUser )->escaped() . '';
+   $message .= '' .
+   wfMessage( 
'antispoof-conflict-item', $simUser )->escaped() . '';
}
$message .= '' . wfMessage( 
'antispoof-conflict-bottom' )->escaped();
-   return StatusValue::newFatal( new 
RawMessage( '$1', Message::rawParam( $message ) ) );
+   return StatusValue::newFatal(
+   new RawMessage( '$1', 
Message::rawParam( $message ) )
+   );
}
}
} else {
diff --git a/CentralAuth.php b/CentralAuth.php
index 426045f..4f927a2 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -5,7 +5,8 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['CentralAuth'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['CentralAuthAlias'] = __DIR__ . 
'/CentralAuth.alias.php';
-   $wgExtensionMessagesFiles['SpecialCentralAuthAliasesNoTranslate'] = 
__DIR__ . '/CentralAuth.notranslate-alias.php';
+   $wgExtensionMessagesFiles['SpecialCentralAuthAliasesNoTranslate'] =
+   __DIR__ . '/CentralAuth.notranslate-alias.php';
// wfWarn(
// 'Deprecated PHP entry point used for CentralAuth extension. ' .
// 'Please use wfLoadExtension instead, ' .
diff --git a/includes/GlobalRename/GlobalRenameUserStatus.php 

[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Replace a Linker::link call in SpecialArticleFeedbackv5.php

2017-07-09 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364127 )

Change subject: Replace a Linker::link call in SpecialArticleFeedbackv5.php
..

Replace a Linker::link call in SpecialArticleFeedbackv5.php

Bug: T149346
Change-Id: I9308f9d410a834cb0c5e70c53614ba3578202f33
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 
refs/changes/27/364127/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9308f9d410a834cb0c5e70c53614ba3578202f33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 

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


[MediaWiki-commits] [Gerrit] mediawiki...Theme[master]: Version 2.1: add the theme name as a class name to the

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

Change subject: Version 2.1: add the theme name as a class name to the  
element to ease per-theme styling
..


Version 2.1: add the theme name as a class name to the  element to ease 
per-theme styling

This allows on-wiki CSS pages such as [[MediaWiki:Vector.css]] to contain
styles for multiple themes, such as the default theme (=on-wiki
customizations on top of the skin's CSS) as well as any and all themes the
skin may have (e.g. Dark and DeepSea in Vector's case; for example,
DeepSea-specific CSS rules could be prefixed with .theme-deepsea).

HT Lcawte & SamanthaNguyen

Change-Id: I55397f13efcd3407e91772903fefa041b1c18e57
---
M Theme.hooks.php
M extension.json
2 files changed, 39 insertions(+), 2 deletions(-)

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



diff --git a/Theme.hooks.php b/Theme.hooks.php
index 73fdc23..7fa9e29 100644
--- a/Theme.hooks.php
+++ b/Theme.hooks.php
@@ -110,4 +110,40 @@
return true;
}
 
+   /**
+* Add theme- class to the  element to allow per-theme
+* styling on on-wiki CSS pages, such as MediaWiki:Vector.css.
+* The class is added only for non-default themes.
+*
+* @param OutputPage $out
+* @param Skin $sk
+* @param array $bodyAttrs Existing attributes of the  tag as an 
array
+*/
+   public static function onOutputPageBodyAttributes( $out, $sk, 
&$bodyAttrs ) {
+   global $wgDefaultTheme;
+
+   // Check the following things in this order:
+   // 1) value of $wgDefaultTheme (set in site configuration)
+   // 2) user's personal preference/override
+   // 3) per-page usetheme URL parameter
+   $userTheme = $wgDefaultTheme;
+   // User's personal theme override, if any
+   $user = $out->getUser();
+   if ( $user->getOption( 'theme' ) ) {
+   $userTheme = $user->getOption( 'theme' );
+   }
+   $theme = $out->getRequest()->getVal( 'usetheme', $userTheme );
+   $theme = strtolower( htmlspecialchars( $theme ) ); // paranoia
+
+   if ( !Theme::skinHasTheme( $sk->getSkinName(), $theme ) ) {
+   return true;
+   }
+
+   if ( isset( $theme ) && $theme !== 'default' ) {
+   $bodyAttrs['class'] .= ' theme-' . $theme;
+   }
+
+   return true;
+   }
+
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 10cb143..1a61085 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "Theme",
"namemsg": "theme-extensionname",
-   "version": "2.0.1",
+   "version": "2.1",
"author": [
"Ryan Schmidt",
"Jack Phoenix",
@@ -89,7 +89,8 @@
"ThemeHooks::onBeforePageDisplay",
"ThemeHooks::addJSonPreferences"
],
-   "GetPreferences": "ThemeHooks::onGetPreferences"
+   "GetPreferences": "ThemeHooks::onGetPreferences",
+   "OutputPageBodyAttributes": 
"ThemeHooks::onOutputPageBodyAttributes"
},
"manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55397f13efcd3407e91772903fefa041b1c18e57
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Theme
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Lewis Cawte 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364125 )

Change subject: Break long lines
..

Break long lines

Change-Id: I562a8e0c1e585d6b3e81d35a56deb4722f7e135a
---
M OpenStackManager.php
M OpenStackManagerEvent.php
M maintenance/onInstanceActionCompletion.php
M maintenance/purgeOldServiceGroups.php
M maintenance/qualifyInstancePages.php
M maintenance/syncProjectGroups.php
M maintenance/transitionServiceGroupSchema.php
M maintenance/updatedomains.php
M phpcs.xml
M special/SpecialNova.php
M special/SpecialNovaAddress.php
M special/SpecialNovaDomain.php
M special/SpecialNovaKey.php
M special/SpecialNovaProject.php
M special/SpecialNovaProxy.php
M special/SpecialNovaResources.php
M special/SpecialNovaRole.php
M special/SpecialNovaServiceGroup.php
M special/SpecialNovaSudoer.php
M special/SpecialNovaVolume.php
20 files changed, 509 insertions(+), 166 deletions(-)


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

diff --git a/OpenStackManager.php b/OpenStackManager.php
index 2458f63..2059f45 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -173,7 +173,8 @@
 $wgAutoloadClasses['OpenStackNovaPrivateHost'] = $dir . 
'nova/OpenStackNovaPrivateHost.php';
 $wgAutoloadClasses['OpenStackNovaAddress'] = $dir . 
'nova/OpenStackNovaAddress.php';
 $wgAutoloadClasses['OpenStackNovaSecurityGroup'] = $dir . 
'nova/OpenStackNovaSecurityGroup.php';
-$wgAutoloadClasses['OpenStackNovaSecurityGroupRule'] = $dir . 
'nova/OpenStackNovaSecurityGroupRule.php';
+$wgAutoloadClasses['OpenStackNovaSecurityGroupRule'] =
+   $dir . 'nova/OpenStackNovaSecurityGroupRule.php';
 $wgAutoloadClasses['OpenStackNovaRole'] = $dir . 'nova/OpenStackNovaRole.php';
 $wgAutoloadClasses['OpenStackNovaServiceGroup'] = $dir . 
'nova/OpenStackNovaServiceGroup.php';
 $wgAutoloadClasses['OpenStackNovaVolume'] = $dir . 
'nova/OpenStackNovaVolume.php';
@@ -183,8 +184,10 @@
 $wgAutoloadClasses['OpenStackNovaLdapConnection'] = $dir . 
'nova/OpenStackNovaLdapConnection.php';
 $wgAutoloadClasses['OpenStackNovaProject'] = $dir . 
'nova/OpenStackNovaProject.php';
 $wgAutoloadClasses['OpenStackNovaProjectLimits'] = $dir . 
'nova/OpenStackNovaProjectLimits.php';
-$wgAutoloadClasses['OpenStackNovaShellAccountNameRequest'] = $dir . 
'nova/OpenStackNovaShellAccountNameRequest.php';
-$wgAutoloadClasses['OpenStackNovaSecondaryAuthenticationProvider'] = $dir . 
'/nova/OpenStackNovaSecondaryAuthenticationProvider.php';
+$wgAutoloadClasses['OpenStackNovaShellAccountNameRequest'] =
+   $dir . 'nova/OpenStackNovaShellAccountNameRequest.php';
+$wgAutoloadClasses['OpenStackNovaSecondaryAuthenticationProvider'] =
+   $dir . '/nova/OpenStackNovaSecondaryAuthenticationProvider.php';
 $wgAutoloadClasses['SpecialNovaKey'] = $dir . 'special/SpecialNovaKey.php';
 $wgAutoloadClasses['SpecialNovaProject'] = $dir . 
'special/SpecialNovaProject.php';
 $wgAutoloadClasses['SpecialNovaDomain'] = $dir . 
'special/SpecialNovaDomain.php';
@@ -203,7 +206,8 @@
 $wgAutoloadClasses['ApiNovaServiceGroups'] = $dir . 
'api/ApiNovaServiceGroups.php';
 $wgAutoloadClasses['ApiListNovaProjects'] = $dir . 
'api/ApiListNovaProjects.php';
 $wgAutoloadClasses['ApiListNovaInstances'] = $dir . 
'api/ApiListNovaInstances.php';
-$wgAutoloadClasses['EchoOpenStackManagerPresentationModel'] = $dir . 
'EchoOpenStackManagerPresentationModel.php';
+$wgAutoloadClasses['EchoOpenStackManagerPresentationModel'] =
+   $dir . 'EchoOpenStackManagerPresentationModel.php';
 $wgAutoloadClasses['OpenStackManagerEvent'] = $dir . 
'OpenStackManagerEvent.php';
 $wgSpecialPages['NovaKey'] = 'SpecialNovaKey';
 $wgSpecialPages['NovaProject'] = 'SpecialNovaProject';
@@ -311,8 +315,17 @@
switch ( $updater->getDB()->getType() ) {
case 'mysql':
$updater->addExtensionTable( 'openstack_tokens', 
"$base/schema-changes/tokens.sql" );
-   $updater->addExtensionTable( 'openstack_notification_event', 
"$base/schema-changes/openstack_add_notification_events_table.sql" );
-   $updater->addExtensionUpdate( [ 'modifyField', 
'openstack_tokens', 'token', 
"$base/schema-changes/openstack_change_token_size.sql", true ] );
+   $updater->addExtensionTable(
+   'openstack_notification_event',
+   
"$base/schema-changes/openstack_add_notification_events_table.sql"
+   );
+   $updater->addExtensionUpdate( [
+   'modifyField',
+   'openstack_tokens',
+   'token',
+   "$base/schema-changes/openstack_change_token_size.sql",
+   true
+   ] );
break;
}
return true;
@@ -377,7 +390,9 @@
$event->getType() == 'osm-instance-deleted'
) {
$extra = 

[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364124 )

Change subject: Break long lines
..

Break long lines

Change-Id: I810ca14844d2ed32fc95b24c849c288ca162c93b
---
M api/ApiListNovaInstances.php
M api/ApiNovaAddress.php
M api/ApiNovaInstance.php
M api/ApiNovaProjectLimits.php
M api/ApiNovaProjects.php
M api/ApiNovaServiceGroups.php
M nova/OpenStackNovaController.php
M nova/OpenStackNovaDomain.php
M nova/OpenStackNovaHost.php
M nova/OpenStackNovaInstance.php
M nova/OpenStackNovaPrivateHost.php
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaPublicHost.php
M nova/OpenStackNovaSecondaryAuthenticationProvider.php
M nova/OpenStackNovaSecurityGroupRule.php
M nova/OpenStackNovaServiceGroup.php
M nova/OpenStackNovaSudoer.php
M nova/OpenStackNovaUser.php
18 files changed, 470 insertions(+), 153 deletions(-)


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

diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php
index df39e4f..0c80880 100644
--- a/api/ApiListNovaInstances.php
+++ b/api/ApiListNovaInstances.php
@@ -30,12 +30,15 @@
}
}
 
-   $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances', 
$params['region'], $params['project'] );
+   $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances',
+   $params['region'], $params['project'] );
$instancesInfo = $wgMemc->get( $key );
if ( $instancesInfo === false ) {
$user = new OpenStackNovaUser( 
$wgOpenStackManagerLDAPUsername );
$userNova = OpenStackNovaController::newFromUser( $user 
);
-   $userNova->authenticate( 
$wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword );
+   $userNova->authenticate(
+   $wgOpenStackManagerLDAPUsername, 
$wgOpenStackManagerLDAPUserPassword
+   );
 
$userNova->setProject( $project->getName() );
$userNova->setRegion( $params['region'] ); // validated 
by API
@@ -67,9 +70,13 @@
}
 
if ( defined( 'ApiResult::META_CONTENT' ) ) {
-   $this->getResult()->addIndexedTagName( [ 'query', 
$this->getModuleName() ], 'instance' );
+   $this->getResult()->addIndexedTagName(
+   [ 'query', $this->getModuleName() ], 'instance'
+   );
} else {
-   $this->getResult()->setIndexedTagName_internal( [ 
'query', $this->getModuleName() ], 'instance' );
+   $this->getResult()->setIndexedTagName_internal(
+   [ 'query', $this->getModuleName() ], 'instance'
+   );
}
}
 
diff --git a/api/ApiNovaAddress.php b/api/ApiNovaAddress.php
index 385473e..2b616a0 100644
--- a/api/ApiNovaAddress.php
+++ b/api/ApiNovaAddress.php
@@ -9,7 +9,9 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError( 
'openstackmanager-nonovacred' );
} else {
-   $this->dieUsage( 'No credentials found for your 
account.', 'openstackmanager-nonovacred' );
+   $this->dieUsage(
+   'No credentials found for your 
account.', 'openstackmanager-nonovacred'
+   );
}
}
 
@@ -20,7 +22,10 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
$this->dieWithError( [ 
'openstackmanager-noaccount', wfEscapeWikiText( $p ) ] );
} else {
-   $this->dieUsage( 'User account is not 
in the project specified.', 'openstackmanager-noaccount' );
+   $this->dieUsage(
+   'User account is not in the 
project specified.',
+   'openstackmanager-noaccount'
+   );
}
}
 
@@ -32,7 +37,9 @@
wfEscapeWikiText( $p ),
] );
} else {
-   $this->dieUsage( 'User account is not 
in the projectadmin role.', 'openstackmanager-needrole' );
+   $this->dieUsage(
+   'User account is not in the 
projectadmin role.', 'openstackmanager-needrole'
+ 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [DNM] Add support for item without link to harvest_template

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

Change subject: [DNM] Add support for item without link to harvest_template
..


[DNM] Add support for item without link to harvest_template

Bug: T64014
Change-Id: I71f6857ca6ca4a322444182d19177c4ed9483181
---
M scripts/harvest_template.py
1 file changed, 4 insertions(+), 9 deletions(-)

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



diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 93ff8a3..bfcc6ac 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -101,8 +101,6 @@
 return titles
 
 def _template_link_target(self, item, link_text):
-linked_page = None
-
 link = pywikibot.Link(link_text)
 linked_page = pywikibot.Page(link)
 
@@ -175,14 +173,11 @@
 if claim.type == 'wikibase-item':
 # Try to extract a valid page
 match = re.search(pywikibot.link_regex, value)
-if not match:
-pywikibot.output(
-'%s field %s value %s is not a '
-'wikilink. Skipping.'
-% (claim.getID(), field, value))
-continue
+if match:
+link_text = match.group(1)
+else:
+link_text = value
 
-link_text = match.group(1)
 linked_item = self._template_link_target(
 item, link_text)
 if not linked_item:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71f6857ca6ca4a322444182d19177c4ed9483181
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] format string must be concatenated first

2017-07-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364123 )

Change subject: [bugfix] format string must be concatenated first
..

[bugfix] format string must be concatenated first

Bug: T170087
Change-Id: Ie106f296258ddf3404a2ae30489395375e2eeb93
---
M scripts/checkimages.py
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/23/364123/1

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 7b22ade..2caf92b 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -872,8 +872,8 @@
 # It's not only on commons but the image needs a check
 # the second usually is a url or something like that.
 # Compare the two in equal way, both url.
-repme = (self.list_entry +
- "is also on '''Commons''': [[commons:File:%s]]"
+repme = ((self.list_entry +
+  "is also on '''Commons''': [[commons:File:%s]]")
  % (self.imageName,
 commons_image_with_this_hash.title(
 withNamespace=False)))
@@ -1012,11 +1012,11 @@
 
 if self.duplicatesReport or only_report:
 if only_report:
-repme = (self.list_entry + 'has the following duplicates '
- "('''forced mode'''):"
+repme = ((self.list_entry + 'has the following duplicates '
+  "('''forced mode'''):")
  % self.image.title(asUrl=True))
 else:
-repme = (self.list_entry + 'has the following duplicates:'
+repme = ((self.list_entry + 'has the following 
duplicates:')
  % self.image.title(asUrl=True))
 
 for dup_page in duplicates:
@@ -1299,10 +1299,10 @@
 self.some_problem = False
 else:
 if not self.seems_ok and self.license_found:
-rep_text_license_fake = (self.list_entry +
- "seems to have a ''fake license'', "
- 'license detected: '
- '%s' %
+rep_text_license_fake = ((self.list_entry +
+  "seems to have a ''fake license'', "
+  'license detected: '
+  '%s') %
  (self.imageName, self.license_found))
 printWithTimeZone(
 u"%s seems to have a fake license: %s, reporting..."

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [DOC] Remove deprecated option -time from script documentation

2017-07-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364122 )

Change subject: [DOC] Remove deprecated option -time from script documentation
..

[DOC] Remove deprecated option -time from script documentation

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/22/364122/1

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 7b22ade..1ca1baa 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -34,8 +34,6 @@
 
 -sleep[:#]  Time in seconds between repeat runs (default: 30)
 
--time[:#]   The -time option is deprecated. Use -sleep instead.
-
 -wait[:#]   Wait x second before check the images (default: 0)
 
 -skip[:#]   The bot skip the first [:#] images (default: 0)

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgUploadNavigationUrl for few wikis

2017-07-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364121 )

Change subject: Set $wgUploadNavigationUrl for few wikis
..

Set $wgUploadNavigationUrl for few wikis

Bug: T170083
Change-Id: Id4d7314956ed86c2577e44211f1ab3a9a54b3377
---
M wmf-config/InitialiseSettings.php
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6edc83a..c37da32 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1545,6 +1545,7 @@
'bgwiki' => '/wiki/MediaWiki:Uploadtext', // T16836
'bnwiki' => '/wiki/উইকিপিডিয়া:আপলোড',
'bswiki' => '/wiki/Wikipedia:Upload', // T14044
+   'cawiki' => '/wiki/Ajuda:Carregar_un_fitxer', // T170083
'dawiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=da=dk', // 
T39662
'dewikisource' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=de',
'enwiki' => '/wiki/Wikipedia:File_Upload_Wizard', // T44263
@@ -1559,6 +1560,8 @@
'fawiki' => '/wiki/ویکی‌پدیا:بارگذاری',
'fawikivoyage' => 
'/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D8%B3%D9%81%D8%B1:%D8%A8%D8%A7%D8%B1%DA%AF%D8%B0%D8%A7%D8%B1%DB%8C',
 // T102714
'frwiki' => '/wiki/Aide:Importer_un_fichier',
+   'frwiktionary' => '/wiki/Aide:Importer_un_fichier', // T170083
+   'frwikiversity' => '/wiki/Aide:Importer_un_fichier', // T170083
'gomwiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=gom', // T96468
'guwiki' => false,
'hewikinews' => false,
@@ -1572,6 +1575,7 @@
'jawiki' => 
'/wiki/Wikipedia:%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89',
'jawikisource' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=ja',
'kowiki' => '/wiki/위키백과:파일_올리기', // T54076
+   'kuwiki' => '//commons.wikimedia.org/wiki/Commons:Upload?uselang=ku', 
// T170083
'lrcwiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=lrc', // T102026
'metawiki' => false, // T52287
'mlwiki' => '/wiki/വിക്കിപീഡിയ:അപ്‌ലോഡ്',
@@ -1581,6 +1585,7 @@
'nlwikisource' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nl',
'nlwikivoyage' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nl', // T73403
'nlwiktionary' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nl',
+   'nlwikiquote' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nl', // T170083
'plwiki' => '//pl.wikipedia.org/wiki/Wikipedia:Prześlij_plik', // T44579
'plwikinews' => false,
'plwikiquote' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=pl',
@@ -1592,12 +1597,18 @@
'ruwikinews' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=ru',
'sewikimedia' => false, // T63947
'srwiki' => '/wiki/Википедија:Водич_за_отпремање', // T165901
+   'svwikiversity' => '/wiki/Wikiversity:Ladda_upp_filer', // T170083
'svwikisource' => false,
'svwiktionary' => false,
'specieswiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard',
'tawiki' => '/wiki/விக்கிப்பீடியா:File_Upload_Wizard', // T85697
'tewiki' => '/wiki/వికీపీడియా:ఫైల్_ఎక్కింపు_విజర్డు', // T59042
'thwiki' => 
'/wiki/%E0%B8%A7%E0%B8%B4%E0%B8%81%E0%B8%B4%E0%B8%9E%E0%B8%B5%E0%B9%80%E0%B8%94%E0%B8%B5%E0%B8%A2:%E0%B8%AD%E0%B8%B1%E0%B8%9B%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94',
+   'ukwiki' => '/wiki/Вікіпедія:Майстер_завантаження_файлів', // T170083
+   'viwiki' => '/wiki/Wikipedia:Tải_tập_tin_lên', // T170083
+   'viwikibooks' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=vi', // T170083
+   'viwiktionary' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=vi', // T170083
+   'viwikisource' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=vi', // T170083
'zhwiki' => '/wiki/Project:%E4%B8%8A%E4%BC%A0',
'zhwikinews' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=zh-hans',
'zh_yuewiki' => '/wiki/Project:%E4%B8%8A%E8%BC%89',

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

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

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


[MediaWiki-commits] [Gerrit] labs...lists[master]: Queries fix in order to prevent computational overruns

2017-07-09 Thread Incola (Code Review)
Incola has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/364103 )

Change subject: Queries fix in order to prevent computational overruns
..


Queries fix in order to prevent computational overruns

Change-Id: I9f144171b12515df3311dc2e8c5b4a91edd32abf
---
M query/itwiki/Redirect/Redirect_orfani.cnf
M query/itwiki/Redirect/Redirect_orfani.sql
M query/itwiki/Voci/Voci_orfane_con_interlink.cnf
M query/itwiki/Voci/Voci_orfane_con_interlink.sql
M query/itwiki/Voci/Voci_orfane_in_ordine_alfabetico.cnf
M query/itwiki/Voci/Voci_orfane_in_ordine_alfabetico.sql
M query/itwiki/Voci/Voci_orfane_per_creatore.cnf
M query/itwiki/Voci/Voci_orfane_per_creatore.sql
M query/itwiki/Voci/Voci_orfane_per_data_di_creazione.cnf
M query/itwiki/Voci/Voci_orfane_per_data_di_creazione.sql
M query/itwiki/Voci/Voci_orfane_per_dimensione.cnf
M query/itwiki/Voci/Voci_orfane_per_dimensione.sql
M query/itwiki/Voci/Voci_orfane_senza_interlink.cnf
M query/itwiki/Voci/Voci_orfane_senza_interlink.sql
14 files changed, 186 insertions(+), 182 deletions(-)



diff --git a/query/itwiki/Redirect/Redirect_orfani.cnf 
b/query/itwiki/Redirect/Redirect_orfani.cnf
index c92db27..e363eec 100644
--- a/query/itwiki/Redirect/Redirect_orfani.cnf
+++ b/query/itwiki/Redirect/Redirect_orfani.cnf
@@ -1,5 +1,5 @@
-[query]
-project = itwiki
-frequency = twicemonthly
-author = Mauro742
-license = CC-BY-SA
+[query]
+project = itwiki
+frequency = twicemonthly
+author = Mauro742, Mess
+license = CC-BY-SA
diff --git a/query/itwiki/Redirect/Redirect_orfani.sql 
b/query/itwiki/Redirect/Redirect_orfani.sql
index 84f1a82..853bd21 100644
--- a/query/itwiki/Redirect/Redirect_orfani.sql
+++ b/query/itwiki/Redirect/Redirect_orfani.sql
@@ -1,9 +1,13 @@
-CONNECT itwiki_p itwiki.labsdb;
-SELECT CONCAT('# [[', page_title, ']] - [[', rd_title, ']] 
([[Speciale:PuntanoQui/', page_title, ']])')
-  FROM page JOIN redirect ON page_id=rd_from
-  WHERE page_namespace=0 AND rd_namespace = 0
-AND NOT EXISTS ( SELECT * 
-  FROM page AS p JOIN pagelinks ON p.page_id = pl_from 
-WHERE p.page_namespace IN (0, 4, 10, 12, 100, 102) AND pl_namespace = 
0 AND pl_title = page.page_title)
-  ORDER BY page_title
-  LIMIT 7500;
+CONNECT itwiki_p itwiki.labsdb;
+SELECT CONCAT('# [[', page_title, ']] - [[', rd_title, ']] 
([[Speciale:PuntanoQui/', page_title, ']])')
+FROM page 
+LEFT JOIN pagelinks
+ON pl_title = page_title
+AND pl_namespace = page_namespace
+LEFT JOIN redirect
+ON rd_from = page_id
+WHERE page_namespace=0
+AND rd_namespace=0
+AND pl_namespace IS NULL
+ORDER BY page_title
+LIMIT 1;
diff --git a/query/itwiki/Voci/Voci_orfane_con_interlink.cnf 
b/query/itwiki/Voci/Voci_orfane_con_interlink.cnf
index 2063ed9..2c7cffc 100644
--- a/query/itwiki/Voci/Voci_orfane_con_interlink.cnf
+++ b/query/itwiki/Voci/Voci_orfane_con_interlink.cnf
@@ -1,5 +1,5 @@
 [query]
 project = itwiki
 frequency = weekly
-author = unknown
+author = Mess
 license = CC-BY-SA
diff --git a/query/itwiki/Voci/Voci_orfane_con_interlink.sql 
b/query/itwiki/Voci/Voci_orfane_con_interlink.sql
index 107f5df..fa624f3 100644
--- a/query/itwiki/Voci/Voci_orfane_con_interlink.sql
+++ b/query/itwiki/Voci/Voci_orfane_con_interlink.sql
@@ -3,33 +3,33 @@
 FROM page
 WHERE page_namespace = 0
 AND page_is_redirect = 0
-AND page_title NOT IN
-(SELECT pl_title
-FROM pagelinks
-WHERE pl_namespace = 0
-AND pl_from NOT IN
-(SELECT page_id
-FROM page
-WHERE page_namespace <> 0)
-AND pl_from NOT IN
-(SELECT page_id
-FROM page JOIN redirect ON page_id=rd_from
-  WHERE page_namespace=0 AND rd_namespace = 0
-AND NOT EXISTS ( SELECT * 
-  FROM page AS p JOIN pagelinks ON p.page_id = pl_from 
-WHERE p.page_namespace = 0 AND pl_namespace = 0 AND pl_title = 
page.page_title))
-AND pl_from NOT IN
-(SELECT cl_from
-FROM categorylinks, pagelinks
-WHERE cl_to = pl_title
-AND pl_namespace = 14
-AND pl_from = 4195411)) /* 
Wikipedia:ConnectivityProjectInternationalization/ArticlesNotFormingValidLinks 
*/
-AND page_id NOT IN
-(SELECT cl_from
-FROM categorylinks, pagelinks
-WHERE cl_to = pl_title
-AND pl_namespace = 14
-AND pl_from = 4195411) /* 
Wikipedia:ConnectivityProjectInternationalization/ArticlesNotFormingValidLinks 
*/
+AND page_title NOT IN (
+  SELECT pl_title
+  FROM pagelinks
+  WHERE pl_from_namespace = 0
+  AND pl_namespace = 0
+  AND pl_title = page_title
+  AND pl_from NOT IN
+  (SELECT page_id
+   FROM page
+   LEFT JOIN pagelinks
+   ON pl_title = page_title
+   AND pl_namespace = page_namespace
+   WHERE page_namespace=0
+   AND page_is_redirect=1
+   AND pl_namespace IS NULL)
+  AND pl_from NOT IN
+  (SELECT cl_from
+   FROM categorylinks, pagelinks
+   WHERE cl_to = pl_title
+   AND pl_namespace = 14
+   AND pl_from = 4195411)) /* 
Wikipedia:ConnectivityProjectInternationalization/ArticlesNotFormingValidLinks 
*/
+   AND page_id NOT IN
+   (SELECT cl_from
+FROM categorylinks, pagelinks
+WHERE cl_to = 

[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364120 )

Change subject: Break long lines
..

Break long lines

Change-Id: Id9505936148fc99f72f5d7ea4c6285ba8bd91037
---
M PageAssessments.hooks.php
M api/ApiQueryPageAssessments.php
M api/ApiQueryProjectPages.php
M maintenance/purgeUnusedProjects.php
M phpcs.xml
5 files changed, 41 insertions(+), 21 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageAssessments 
refs/changes/20/364120/1

diff --git a/PageAssessments.hooks.php b/PageAssessments.hooks.php
index 908f335..584d4e8 100644
--- a/PageAssessments.hooks.php
+++ b/PageAssessments.hooks.php
@@ -36,7 +36,9 @@
 * @param mixed $ticket
 */
public static function onLinksUpdateComplete( &$linksUpdate, $ticket = 
null ) {
-   $assessmentsOnTalkPages = 
RequestContext::getMain()->getConfig()->get( 'PageAssessmentsOnTalkPages' );
+   $assessmentsOnTalkPages = 
RequestContext::getMain()->getConfig()->get(
+   'PageAssessmentsOnTalkPages'
+   );
$title = $linksUpdate->getTitle();
// Only check for assessment data where assessments are 
actually made.
if ( ( $assessmentsOnTalkPages && $title->isTalkPage() ) ||
@@ -65,15 +67,20 @@
 */
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater = null ) {
$dbDir = __DIR__ . '/db';
-   $updater->addExtensionTable( 'page_assessments_projects', 
"$dbDir/addProjectsTable.sql", true );
-   $updater->addExtensionTable( 'page_assessments', 
"$dbDir/addReviewsTable.sql", true );
-   $updater->addExtensionField( 'page_assessments_projects', 
'pap_parent_id', "$dbDir/patch-subprojects.sql", true );
+   $updater->addExtensionTable( 'page_assessments_projects',
+   "$dbDir/addProjectsTable.sql", true );
+   $updater->addExtensionTable( 'page_assessments',
+   "$dbDir/addReviewsTable.sql", true );
+   $updater->addExtensionField( 'page_assessments_projects',
+   'pap_parent_id', "$dbDir/patch-subprojects.sql", true );
}
 
/**
 * Delete assessment records when page is deleted
 */
-   public static function onArticleDeleteComplete( &$article, &$user, 
$reason, $id, $content = null, $logEntry ) {
+   public static function onArticleDeleteComplete(
+   &$article, &$user, $reason, $id, $content = null, $logEntry
+   ) {
PageAssessmentsBody::deleteRecordsForPage( $id );
}
 
diff --git a/api/ApiQueryPageAssessments.php b/api/ApiQueryPageAssessments.php
index 7257d6b..a61452c 100644
--- a/api/ApiQueryPageAssessments.php
+++ b/api/ApiQueryPageAssessments.php
@@ -44,7 +44,9 @@
}
 
$fit = $result->addValue(
-   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ], $projectName, $projectValues
+   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ],
+   $projectName,
+   $projectValues
);
 
if ( !$fit ) {
@@ -53,8 +55,12 @@
}
 
// Make it easier to parse XML-formatted results
-   $result->addArrayType( [ 'query', 'pages', 
$row->page_id, $this->getModuleName() ], 'kvp', 'project' );
-   $result->addIndexedTagName( [ 'query', 'pages', 
$row->page_id, $this->getModuleName() ], 'p' );
+   $result->addArrayType(
+   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ], 'kvp', 'project'
+   );
+   $result->addIndexedTagName(
+   [ 'query', 'pages', $row->page_id, 
$this->getModuleName() ], 'p'
+   );
}
}
 
@@ -89,7 +95,8 @@
$this->handleQueryContinuation( $params['continue'] );
}
 
-   // assure strict ordering, but mysql gets cranky if you order 
by a field when there's only one to sort
+   // assure strict ordering, but mysql gets cranky if you order 
by a field
+   // when there's only one to sort
if ( count( $pages ) > 1 ) {
$this->addOption( 'ORDER BY', 'pa_page_id, 
pa_project_id' );
} else {
@@ -103,10 +110,12 @@
 
$continuePage = (int)$continues[0];
$continueProject = (int)$continues[1];
-   $this->dieContinueUsageIf( $continues[0] !== 
(string)$continuePage ); // die if PHP has made unhelpful falsy conversions
-  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rename ckb to Kurdish

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

Change subject: Rename ckb to Kurdish
..


Rename ckb to Kurdish

Bug: T116761
Change-Id: If5abc7c859c3fbf13e3ebf1be98693ee6fc04d9a
---
M languages/data/Names.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/languages/data/Names.php b/languages/data/Names.php
index 76ced3e..00d91ce 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -115,7 +115,7 @@
'cho' => 'Choctaw', # Choctaw
'chr' => 'ᏣᎳᎩ', # Cherokee
'chy' => 'Tsetsêhestâhese', # Cheyenne
-   'ckb' => 'کوردیی ناوەندی', # Central Kurdish
+   'ckb' => 'کوردی', # Central Kurdish
'co' => 'corsu', # Corsican
'cps' => 'Capiceño', # Capiznon
'cr' => 'Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ', # Cree

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5abc7c859c3fbf13e3ebf1be98693ee6fc04d9a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Do not try to compile a regex object in harvest_template.py

2017-07-09 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364119 )

Change subject: Do not try to compile a regex object in harvest_template.py
..

Do not try to compile a regex object in harvest_template.py

Change-Id: Ic03189f91c66fc2ef1b59fe4bbbd1482fb1f753d
---
M scripts/harvest_template.py
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 93ff8a3..68f5b4c 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -174,7 +174,7 @@
 else:
 if claim.type == 'wikibase-item':
 # Try to extract a valid page
-match = re.search(pywikibot.link_regex, value)
+match = pywikibot.link_regex.search(value)
 if not match:
 pywikibot.output(
 '%s field %s value %s is not a '

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic03189f91c66fc2ef1b59fe4bbbd1482fb1f753d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 

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


[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364118 )

Change subject: Break long lines
..

Break long lines

Change-Id: Ie683924e7ebbae91bcc0cbd7d80621ec1b3aacc7
---
M FlaggedRevs.php
M api/actions/ApiReview.php
M api/actions/ApiStabilize.php
M api/reports/ApiQueryConfiguredPages.php
M api/reports/ApiQueryFlagged.php
M api/reports/ApiQueryOldreviewedpages.php
M api/reports/ApiQueryReviewedpages.php
M backend/FlaggedRevsLog.php
M frontend/FlaggablePageView.php
M frontend/FlaggedRevsXML.php
M frontend/RevisionReviewFormUI.php
M maintenance/fixBug28348.php
M maintenance/purgeReviewablePages.php
M phpcs.xml
M scribunto/FlaggedRevs.library.php
15 files changed, 174 insertions(+), 79 deletions(-)


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

diff --git a/FlaggedRevs.php b/FlaggedRevs.php
index f5182ea..c74bb3f 100644
--- a/FlaggedRevs.php
+++ b/FlaggedRevs.php
@@ -272,8 +272,10 @@
 # UI setup, forms, and HTML elements
 $wgAutoloadClasses['FlaggedRevsUISetup'] = 
"$frontendDir/FlaggedRevsUI.setup.php";
 $wgAutoloadClasses['FlaggablePageView'] = "$frontendDir/FlaggablePageView.php";
-$wgAutoloadClasses['FlaggedRevsReviewLogFormatter'] = 
"$frontendDir/FlaggedRevsReviewLogFormatter.php";
-$wgAutoloadClasses['FlaggedRevsStableLogFormatter'] = 
"$frontendDir/FlaggedRevsStableLogFormatter.php";
+$wgAutoloadClasses['FlaggedRevsReviewLogFormatter'] =
+   "$frontendDir/FlaggedRevsReviewLogFormatter.php";
+$wgAutoloadClasses['FlaggedRevsStableLogFormatter'] =
+   "$frontendDir/FlaggedRevsStableLogFormatter.php";
 $wgAutoloadClasses['FlaggedRevsXML'] = "$frontendDir/FlaggedRevsXML.php";
 $wgAutoloadClasses['RevisionReviewFormUI'] = 
"$frontendDir/RevisionReviewFormUI.php";
 $wgAutoloadClasses['RejectConfirmationFormUI'] = 
"$frontendDir/RejectConfirmationFormUI.php";
@@ -389,7 +391,9 @@
'revreview-sadv-reviewing-p', 'revreview-sadv-reviewing-c',
'revreview-adv-start-link', 'revreview-adv-stop-link'
],
-   'dependencies'  => [ 'mediawiki.util', 'mediawiki.notify', 
'mediawiki.user', 'mediawiki.jqueryMsg' ],
+   'dependencies'  => [
+   'mediawiki.util', 'mediawiki.notify', 'mediawiki.user', 
'mediawiki.jqueryMsg'
+   ],
'localBasePath' => $localModulePath,
'remoteExtPath' => $remoteModulePath,
 ];
@@ -446,12 +450,16 @@
 # Various actions are used for log filtering ...
 $wgLogActionsHandlers['review/approve']  = 'FlaggedRevsReviewLogFormatter'; // 
checked (again)
 $wgLogActionsHandlers['review/approve2']  = 'FlaggedRevsReviewLogFormatter'; 
// quality (again)
-$wgLogActionsHandlers['review/approve-i']  = 'FlaggedRevsReviewLogFormatter'; 
// checked (first time)
-$wgLogActionsHandlers['review/approve2-i']  = 'FlaggedRevsReviewLogFormatter'; 
// quality (first time)
+$wgLogActionsHandlers['review/approve-i']  =
+   'FlaggedRevsReviewLogFormatter'; // checked (first time)
+$wgLogActionsHandlers['review/approve2-i']  =
+   'FlaggedRevsReviewLogFormatter'; // quality (first time)
 $wgLogActionsHandlers['review/approve-a']  = 'FlaggedRevsReviewLogFormatter'; 
// checked (auto)
 $wgLogActionsHandlers['review/approve2-a']  = 'FlaggedRevsReviewLogFormatter'; 
// quality (auto)
-$wgLogActionsHandlers['review/approve-ia']  = 'FlaggedRevsReviewLogFormatter'; 
// checked (initial & auto)
-$wgLogActionsHandlers['review/approve2-ia']  = 
'FlaggedRevsReviewLogFormatter'; // quality (initial & auto)
+$wgLogActionsHandlers['review/approve-ia']  =
+   'FlaggedRevsReviewLogFormatter'; // checked (initial & auto)
+$wgLogActionsHandlers['review/approve2-ia']  =
+   'FlaggedRevsReviewLogFormatter'; // quality (initial & auto)
 $wgLogActionsHandlers['review/unapprove'] = 'FlaggedRevsReviewLogFormatter'; 
// was checked
 $wgLogActionsHandlers['review/unapprove2'] = 'FlaggedRevsReviewLogFormatter'; 
// was quality
 
@@ -554,7 +562,8 @@
 if ( version_compare( $wgVersion, '1.29', '<' ) ) {
$wgHooks['EditPageBeforeEditChecks'][] = 
'FlaggedRevsUIHooks::onEditPageBeforeEditChecks';
 } else {
-   $wgHooks['EditPageGetCheckboxesDefinition'][] = 
'FlaggedRevsUIHooks::onEditPageGetCheckboxesDefinition';
+   $wgHooks['EditPageGetCheckboxesDefinition'][] =
+   'FlaggedRevsUIHooks::onEditPageGetCheckboxesDefinition';
 }
 $wgHooks['EditPage::showEditForm:fields'][] = 
'FlaggedRevsUIHooks::addRevisionIDField';
 # Add draft link to section edit error
diff --git a/api/actions/ApiReview.php b/api/actions/ApiReview.php
index cb11030..8a80692 100644
--- a/api/actions/ApiReview.php
+++ b/api/actions/ApiReview.php
@@ -132,8 +132,10 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
$this->dieWithError( 
'apierror-flaggedrevs-cantreview', 'permissiondenied' );
} else 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [DNM] Add support for item without link to harvest_template

2017-07-09 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364117 )

Change subject: [DNM] Add support for item without link to harvest_template
..

[DNM] Add support for item without link to harvest_template

Bug: T64014
Change-Id: I71f6857ca6ca4a322444182d19177c4ed9483181
---
M scripts/harvest_template.py
1 file changed, 4 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/17/364117/1

diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 93ff8a3..bfcc6ac 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -101,8 +101,6 @@
 return titles
 
 def _template_link_target(self, item, link_text):
-linked_page = None
-
 link = pywikibot.Link(link_text)
 linked_page = pywikibot.Page(link)
 
@@ -175,14 +173,11 @@
 if claim.type == 'wikibase-item':
 # Try to extract a valid page
 match = re.search(pywikibot.link_regex, value)
-if not match:
-pywikibot.output(
-'%s field %s value %s is not a '
-'wikilink. Skipping.'
-% (claim.getID(), field, value))
-continue
+if match:
+link_text = match.group(1)
+else:
+link_text = value
 
-link_text = match.group(1)
 linked_item = self._template_link_target(
 item, link_text)
 if not linked_item:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71f6857ca6ca4a322444182d19177c4ed9483181
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 

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


[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364116 )

Change subject: Break long lines
..

Break long lines

Change-Id: I569a62cbb1b3655f1ff87b5da5c1287e9bc8b4eb
---
M backend/MWOAuthConsumer.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthException.php
M backend/MWOAuthServer.php
M control/MWOAuthConsumerSubmitControl.php
M examples/testClient.php
M frontend/MWOAuthUI.hooks.php
M frontend/specialpages/SpecialMWOAuth.php
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
M frontend/specialpages/SpecialMWOAuthManageMyGrants.php
M maintenance/importCentralWikiLogs.php
M maintenance/migrateCentralWiki.php
M phpcs.xml
13 files changed, 92 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/16/364116/1

diff --git a/backend/MWOAuthConsumer.php b/backend/MWOAuthConsumer.php
index 982b6e6..976bdce 100644
--- a/backend/MWOAuthConsumer.php
+++ b/backend/MWOAuthConsumer.php
@@ -45,7 +45,10 @@
protected $version;
/** @var string OAuth callback URL for authorization step*/
protected $callbackUrl;
-   /** @var int OAuth callback URL is a prefix and we allow all URLs which 
have callbackUrl as the prefix */
+   /**
+* @var int OAuth callback URL is a prefix and we allow all URLs which
+*   have callbackUrl as the prefix
+*/
protected $callbackIsPrefix;
/** @var string Application description */
protected $description;
diff --git a/backend/MWOAuthDataStore.php b/backend/MWOAuthDataStore.php
index b0ac61b..68fef92 100644
--- a/backend/MWOAuthDataStore.php
+++ b/backend/MWOAuthDataStore.php
@@ -24,7 +24,9 @@
 */
public function __construct( \DBConnRef $centralSlave, $centralMaster, 
\BagOStuff $cache ) {
if ( $centralMaster !== null && !( $centralMaster instanceof 
\DBConnRef ) ) {
-   throw new \InvalidArgumentException( __METHOD__ . ': 
$centralMaster must be a DB or null' );
+   throw new \InvalidArgumentException(
+   __METHOD__ . ': $centralMaster must be a DB or 
null'
+   );
}
$this->centralSlave = $centralSlave;
$this->centralMaster = $centralMaster;
@@ -138,8 +140,12 @@
public function new_request_token( $consumer, $callback = 'oob' ) {
$token = MWOAuthDataStore::newToken();
$cacheConsumerKey = MWOAuthUtils::getCacheKey( 'consumer', 
'request', $token->key );
-   $cacheTokenKey = MWOAuthUtils::getCacheKey( 'token', 
$consumer->key, 'request', $token->key );
-   $cacheCallbackKey = MWOAuthUtils::getCacheKey( 'callback', 
$consumer->key, 'request', $token->key );
+   $cacheTokenKey = MWOAuthUtils::getCacheKey(
+   'token', $consumer->key, 'request', $token->key
+   );
+   $cacheCallbackKey = MWOAuthUtils::getCacheKey(
+   'callback', $consumer->key, 'request', $token->key
+   );
$this->cache->add( $cacheConsumerKey, $consumer->key, 600 ); // 
10 minutes. Kindof arbitray.
$this->cache->add( $cacheTokenKey, $token, 600 ); // 10 
minutes. Kindof arbitray.
$this->cache->add( $cacheCallbackKey, $callback, 600 ); // 10 
minutes. Kindof arbitray.
diff --git a/backend/MWOAuthException.php b/backend/MWOAuthException.php
index da050f4..7d1b0ae 100644
--- a/backend/MWOAuthException.php
+++ b/backend/MWOAuthException.php
@@ -13,7 +13,9 @@
function __construct( $msg, $params = null ) {
$this->msg = $msg;
$this->params = $params;
-   parent::__construct( wfMessage( $msg, $params )->inLanguage( 
'en' )->useDatabase( false )->plain() );
+   parent::__construct(
+   wfMessage( $msg, $params )->inLanguage( 'en' 
)->useDatabase( false )->plain()
+   );
}
 
 }
diff --git a/backend/MWOAuthServer.php b/backend/MWOAuthServer.php
index ede505f..f98e6c4 100644
--- a/backend/MWOAuthServer.php
+++ b/backend/MWOAuthServer.php
@@ -111,7 +111,8 @@
// Host must match exactly
$knownCallback['host'] === $reqCallback['host'] &&
// Port must be either missing from both or an exact 
match
-   static::getOrNull( 'port', $knownCallback ) === 
static::getorNull( 'port', $reqCallback ) &&
+   static::getOrNull( 'port', $knownCallback ) ===
+   static::getOrNull( 'port', $reqCallback ) &&
// Path must be an exact match if query is provided in 
the
// registered callback. Otherwise it must be a prefix 
match if
// 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgUploadNavigationUrl for fr.wikt

2017-07-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364115 )

Change subject: Set $wgUploadNavigationUrl for fr.wikt
..

Set $wgUploadNavigationUrl for fr.wikt

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6edc83a..e4a8cfb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1559,6 +1559,7 @@
'fawiki' => '/wiki/ویکی‌پدیا:بارگذاری',
'fawikivoyage' => 
'/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D8%B3%D9%81%D8%B1:%D8%A8%D8%A7%D8%B1%DA%AF%D8%B0%D8%A7%D8%B1%DB%8C',
 // T102714
'frwiki' => '/wiki/Aide:Importer_un_fichier',
+   'frwiktionary' => '/wiki/Aide:Importer_un_fichier', // T170083
'gomwiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=gom', // T96468
'guwiki' => false,
'hewikinews' => false,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GWToolset[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364114 )

Change subject: Break long lines
..

Break long lines

Change-Id: I39de83f50f34d5ea0aa7c635e1d52ea978a69694
---
M GWToolset.php
M includes/Config.php
M includes/Forms/MetadataDetectForm.php
M includes/Forms/MetadataMappingForm.php
M includes/Handlers/Forms/MetadataDetectHandler.php
M includes/Helpers/FileChecks.php
M includes/Helpers/WikiChecks.php
M maintenance/cleanupGWTFileBackend.php
M phpcs.xml
9 files changed, 86 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset 
refs/changes/14/364114/1

diff --git a/GWToolset.php b/GWToolset.php
index f72384b..90a8021 100644
--- a/GWToolset.php
+++ b/GWToolset.php
@@ -10,7 +10,8 @@
 namespace GWToolset;
 
 if ( !defined( 'MEDIAWIKI' ) ) {
-   echo 'This file is part of a MediaWiki extension; it is not a valid 
entry point. To install this extension, follow the instructions in the INSTALL 
file.';
+   echo 'This file is part of a MediaWiki extension; it is not a valid 
entry point. To install ' .
+   'this extension, follow the instructions in the INSTALL file.';
exit();
 }
 
@@ -50,25 +51,34 @@
'GWToolset\Config' => __DIR__ . '/includes/Config.php',
'GWToolset\GWTException' => __DIR__ . '/includes/GWTException.php',
'GWToolset\Utils' => __DIR__ . '/includes/Utils.php',
-   'GWToolset\Adapters\DataAdapterInterface' => __DIR__ . 
'/includes/Adapters/DataAdapterInterface.php',
-   'GWToolset\Adapters\Php\MappingPhpAdapter' => __DIR__ . 
'/includes/Adapters/Php/MappingPhpAdapter.php',
-   'GWToolset\Adapters\Php\MediawikiTemplatePhpAdapter' => __DIR__ . 
'/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php',
-   'GWToolset\Adapters\Php\MetadataPhpAdapter' => __DIR__ . 
'/includes/Adapters/Php/MetadataPhpAdapter.php',
+   'GWToolset\Adapters\DataAdapterInterface' =>
+   __DIR__ . '/includes/Adapters/DataAdapterInterface.php',
+   'GWToolset\Adapters\Php\MappingPhpAdapter' =>
+   __DIR__ . '/includes/Adapters/Php/MappingPhpAdapter.php',
+   'GWToolset\Adapters\Php\MediawikiTemplatePhpAdapter' =>
+   __DIR__ . 
'/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php',
+   'GWToolset\Adapters\Php\MetadataPhpAdapter' =>
+   __DIR__ . '/includes/Adapters/Php/MetadataPhpAdapter.php',
'GWToolset\Forms\MetadataDetectForm' => __DIR__ . 
'/includes/Forms/MetadataDetectForm.php',
'GWToolset\Forms\MetadataMappingForm' => __DIR__ . 
'/includes/Forms/MetadataMappingForm.php',
'GWToolset\Forms\PreviewForm' => __DIR__ . 
'/includes/Forms/PreviewForm.php',
'GWToolset\Handlers\Forms\FormHandler' => __DIR__ . 
'/includes/Handlers/Forms/FormHandler.php',
-   'GWToolset\Handlers\Forms\MetadataDetectHandler' => __DIR__ . 
'/includes/Handlers/Forms/MetadataDetectHandler.php',
-   'GWToolset\Handlers\Forms\MetadataMappingHandler' => __DIR__ . 
'/includes/Handlers/Forms/MetadataMappingHandler.php',
+   'GWToolset\Handlers\Forms\MetadataDetectHandler' =>
+   __DIR__ . '/includes/Handlers/Forms/MetadataDetectHandler.php',
+   'GWToolset\Handlers\Forms\MetadataMappingHandler' =>
+   __DIR__ . '/includes/Handlers/Forms/MetadataMappingHandler.php',
'GWToolset\Handlers\UploadHandler' => __DIR__ . 
'/includes/Handlers/UploadHandler.php',
-   'GWToolset\Handlers\Xml\XmlDetectHandler' => __DIR__ . 
'/includes/Handlers/Xml/XmlDetectHandler.php',
+   'GWToolset\Handlers\Xml\XmlDetectHandler' =>
+   __DIR__ . '/includes/Handlers/Xml/XmlDetectHandler.php',
'GWToolset\Handlers\Xml\XmlHandler' => __DIR__ . 
'/includes/Handlers/Xml/XmlHandler.php',
-   'GWToolset\Handlers\Xml\XmlMappingHandler' => __DIR__ . 
'/includes/Handlers/Xml/XmlMappingHandler.php',
+   'GWToolset\Handlers\Xml\XmlMappingHandler' =>
+   __DIR__ . '/includes/Handlers/Xml/XmlMappingHandler.php',
'GWToolset\Helpers\FileChecks' => __DIR__ . 
'/includes/Helpers/FileChecks.php',
'GWToolset\Helpers\GWTFileBackend' => __DIR__ . 
'/includes/Helpers/GWTFileBackend.php',
'GWToolset\Helpers\WikiChecks' => __DIR__ . 
'/includes/Helpers/WikiChecks.php',
'GWToolset\Hooks' => __DIR__ . '/includes/Hooks/Hooks.php',
-   'GWToolset\Jobs\GWTFileBackendCleanupJob' => __DIR__ . 
'/includes/Jobs/GWTFileBackendCleanupJob.php',
+   'GWToolset\Jobs\GWTFileBackendCleanupJob' =>
+   __DIR__ . '/includes/Jobs/GWTFileBackendCleanupJob.php',
'GWToolset\Jobs\UploadMediafileJob' => __DIR__ . 
'/includes/Jobs/UploadMediafileJob.php',
'GWToolset\Jobs\UploadMetadataJob' => __DIR__ . 
'/includes/Jobs/UploadMetadataJob.php',
'GWToolset\Models\Mapping' => __DIR__ . '/includes/Models/Mapping.php',
diff --git 

[MediaWiki-commits] [Gerrit] translatewiki[master]: Add Ho language

2017-07-09 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364113 )

Change subject: Add Ho language
..

Add Ho language

Discussion:
http://bit.ly/2s4e9SR

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/13/364113/1

diff --git a/LanguageSettings.php b/LanguageSettings.php
index 41c8e37..9b39da9 100644
--- a/LanguageSettings.php
+++ b/LanguageSettings.php
@@ -36,6 +36,7 @@
 $wgExtraLanguageNames['hak-hant'] = '客家語(繁體)'; # Hakka Chinese (Traditional 
Han script) / Siebrand 2017-05-20
 $wgExtraLanguageNames['hif-deva'] = 'फ़ीजी हिन्दी'; # Fiji Hindi (Devangari 
script) / Siebrand 2010-08-26
 $wgExtraLanguageNames['hne'] = 'छत्तीसगढ़ी'; # Amir 2011-12-01
+$wgExtraLanguageNames['hoc'] = 'ᢹᣉᣉ'; # Ho language. Amir 2017-07-09
 $wgExtraLanguageNames['hsn'] = '湘语'; # Xiang Chinese / Siebrand 2011-04-06
 $wgExtraLanguageNames['hu-formal'] = 'Magyar (magázó)'; # Siebrand 2009-01-01
 $wgExtraLanguageNames['izh'] = 'ižoran keel'; # Ingrian / Robin 2012-11-17 / 
Language classified as not written in Ethnologue. Should be removed.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5886f6ce0421f7c89633add213f9086bd7ce0ae1
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...LifeWeb[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364112 )

Change subject: Break long lines
..

Break long lines

Change-Id: I37141764512a1842fd443047223f6086f98067cb
---
M ApiLifeWeb.php
M LifeWeb.php
M SpecialLifeWeb.php
M lib/LifeWeb/Character.php
M lib/LifeWeb/Question.php
M lib/LifeWeb/Taxon.php
M phpcs.xml
7 files changed, 43 insertions(+), 23 deletions(-)


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

diff --git a/ApiLifeWeb.php b/ApiLifeWeb.php
index 8c2fc2c..a90440c 100644
--- a/ApiLifeWeb.php
+++ b/ApiLifeWeb.php
@@ -12,39 +12,48 @@
 
$params = $this->extractRequestParams();
if ( $params['what'] == 'taxonData' ) {
-   $result->addValue( null, 'taxonData', 
\LifeWeb\Taxon::getTaxonData( $params['clearCache'] ) );
+   $result->addValue( null, 'taxonData',
+   \LifeWeb\Taxon::getTaxonData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'characterData' ) {
-   $result->addValue( null, 'characterData', 
\LifeWeb\Character::getCharacterData( $params['clearCache'] ) );
+   $result->addValue( null, 'characterData',
+   \LifeWeb\Character::getCharacterData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'questionData' ) {
-   $result->addValue( null, 'questionData', 
\LifeWeb\Question::getQuestionData( $params['clearCache'] ) );
+   $result->addValue( null, 'questionData',
+   \LifeWeb\Question::getQuestionData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'degreeData' ) {
-   $result->addValue( null, 'degreeData', 
\LifeWeb\Degree::getDegreeData( $params['clearCache'] ) );
+   $result->addValue( null, 'degreeData',
+   \LifeWeb\Degree::getDegreeData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'equipmentData' ) {
-   $result->addValue( null, 'equipmentData', 
\LifeWeb\Equipment::getEquipmentData( $params['clearCache'] ) );
+   $result->addValue( null, 'equipmentData',
+   \LifeWeb\Equipment::getEquipmentData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'difficultyData' ) {
-   $result->addValue( null, 'difficultyData', 
\LifeWeb\Difficulty::getDifficultyData( $params['clearCache'] ) );
+   $result->addValue( null, 'difficultyData',
+   \LifeWeb\Difficulty::getDifficultyData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'collectionData' ) {
-   $result->addValue( null, 'collectionData', 
\LifeWeb\Collection::getCollectionData( $params['clearCache'] ) );
+   $result->addValue( null, 'collectionData',
+   \LifeWeb\Collection::getCollectionData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'componentData' ) {
-   $result->addValue( null, 'componentData', 
\LifeWeb\Component::getComponentData( $params['clearCache'] ) );
+   $result->addValue( null, 'componentData',
+   \LifeWeb\Component::getComponentData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'topicData' ) {
-   $result->addValue( null, 'topicData', 
\LifeWeb\Topic::getTopicData( $params['clearCache'] ) );
+   $result->addValue( null, 'topicData',
+   \LifeWeb\Topic::getTopicData( 
$params['clearCache'] ) );
$result->addValue( null, 'ok', 'true' );
 
} elseif ( $params['what'] == 'questionEquipmentData' ) {
diff --git a/LifeWeb.php b/LifeWeb.php
index f3d9f62..6858e0e 100644
--- a/LifeWeb.php
+++ b/LifeWeb.php
@@ -5,7 +5,8 @@
  * @author Simon A. Eugster 
  */
 
-# Alert the user that this is not a valid access point to MediaWiki if they 
try to access the special pages file directly.
+# Alert the user that this is not a valid access point to MediaWiki

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use LogFormatter::getLinkRenderer in LogFormatter extensions

2017-07-09 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364111 )

Change subject: Use LogFormatter::getLinkRenderer in LogFormatter extensions
..

Use LogFormatter::getLinkRenderer in LogFormatter extensions

And additionally, migrate another two usages of deprecated
Linker methods.

Bug: T149346
Change-Id: I222da144a37f7d77eaf4bdde901b58c992f1af85
---
M includes/logging/BlockLogFormatter.php
M includes/logging/ContentModelLogFormatter.php
M includes/logging/DeleteLogFormatter.php
M includes/logging/LogFormatter.php
M includes/logging/MergeLogFormatter.php
M includes/logging/MoveLogFormatter.php
M includes/logging/PatrolLogFormatter.php
M includes/logging/ProtectLogFormatter.php
8 files changed, 11 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/364111/1

diff --git a/includes/logging/BlockLogFormatter.php 
b/includes/logging/BlockLogFormatter.php
index a0bfb59..25589de 100644
--- a/includes/logging/BlockLogFormatter.php
+++ b/includes/logging/BlockLogFormatter.php
@@ -22,8 +22,6 @@
  * @since 1.25
  */
 
-use MediaWiki\MediaWikiServices;
-
 /**
  * This class formats block log entries.
  *
@@ -99,7 +97,7 @@
 
public function getActionLinks() {
$subtype = $this->entry->getSubtype();
-   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+   $linkRenderer = $this->getLinkRenderer();
if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // 
Action is hidden
|| !( $subtype === 'block' || $subtype === 'reblock' )
|| !$this->context->getUser()->isAllowed( 'block' )
diff --git a/includes/logging/ContentModelLogFormatter.php 
b/includes/logging/ContentModelLogFormatter.php
index 861ea30..e05357c 100644
--- a/includes/logging/ContentModelLogFormatter.php
+++ b/includes/logging/ContentModelLogFormatter.php
@@ -1,7 +1,5 @@
 context->getLanguage();
@@ -20,7 +18,7 @@
}
 
$params = $this->extractParameters();
-   $revert = 
MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
+   $revert = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'ChangeContentModel' ),
$this->msg( 'logentry-contentmodel-change-revertlink' 
)->text(),
[],
diff --git a/includes/logging/DeleteLogFormatter.php 
b/includes/logging/DeleteLogFormatter.php
index ceb0052..ef00634 100644
--- a/includes/logging/DeleteLogFormatter.php
+++ b/includes/logging/DeleteLogFormatter.php
@@ -23,8 +23,6 @@
  * @since 1.22
  */
 
-use MediaWiki\MediaWikiServices;
-
 /**
  * This class formats delete log entries.
  *
@@ -135,7 +133,7 @@
 
public function getActionLinks() {
$user = $this->context->getUser();
-   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+   $linkRenderer = $this->getLinkRenderer();
if ( !$user->isAllowed( 'deletedhistory' )
|| $this->entry->isDeleted( LogPage::DELETED_ACTION )
) {
diff --git a/includes/logging/LogFormatter.php 
b/includes/logging/LogFormatter.php
index 2a47943..b58cc34 100644
--- a/includes/logging/LogFormatter.php
+++ b/includes/logging/LogFormatter.php
@@ -645,7 +645,8 @@
 */
protected function makePageLink( Title $title = null, $parameters = [], 
$html = null ) {
if ( !$this->plaintext ) {
-   $link = Linker::link( $title, $html, [], $parameters );
+   $html = $html !== null ? new HtmlArmor( $html ) : $html;
+   $link = $this->getLinkRenderer()->makeLink( $title, 
$html, [], $parameters );
} else {
if ( !$title instanceof Title ) {
throw new MWException( "Expected title, got 
null" );
diff --git a/includes/logging/MergeLogFormatter.php 
b/includes/logging/MergeLogFormatter.php
index b0edd4c..8775097 100644
--- a/includes/logging/MergeLogFormatter.php
+++ b/includes/logging/MergeLogFormatter.php
@@ -54,9 +54,9 @@
 
// Show unmerge link
$params = $this->extractParameters();
-   $revert = Linker::linkKnown(
+   $revert = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'MergeHistory' ),
-   $this->msg( 'revertmerge' )->escaped(),
+   $this->msg( 'revertmerge' )->text(),
[],
[
'target' => $params[3],
diff --git a/includes/logging/MoveLogFormatter.php 
b/includes/logging/MoveLogFormatter.php
index afbf8e9..43ca0ea 100644
--- a/includes/logging/MoveLogFormatter.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...LdapAuthentication[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364110 )

Change subject: Break long lines
..

Break long lines

Change-Id: If7bdb2f7a7a9fd551c9f1b479f021da1f4a50fea
---
M LdapAuthentication.php
M LdapAuthenticationPlugin.php
M LdapAutoAuthentication.php
M phpcs.xml
4 files changed, 210 insertions(+), 58 deletions(-)


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

diff --git a/LdapAuthentication.php b/LdapAuthentication.php
index 6e7bc1c..562eb2a 100644
--- a/LdapAuthentication.php
+++ b/LdapAuthentication.php
@@ -94,7 +94,8 @@
 ];
 
 $wgAutoloadClasses['LdapAuthenticationPlugin'] = __DIR__ . 
'/LdapAuthenticationPlugin.php';
-$wgAutoloadClasses['LdapPrimaryAuthenticationProvider'] = __DIR__ . 
'/LdapPrimaryAuthenticationProvider.php';
+$wgAutoloadClasses['LdapPrimaryAuthenticationProvider'] =
+   __DIR__ . '/LdapPrimaryAuthenticationProvider.php';
 
 $wgMessagesDirs['LdapAuthentication'] = __DIR__ . '/i18n';
 
@@ -160,8 +161,13 @@
$wgAuth->printDebug( "Entering AutoAuthSetup.", NONSENSITIVE );
 
# We need both authentication username and domain (bug 34787)
-   if ( $wgAuth->getConf( "AutoAuthUsername" ) !== "" && $wgAuth->getConf( 
"AutoAuthDomain" ) !== "" ) {
-   $wgAuth->printDebug( "wgLDAPAutoAuthUsername and 
wgLDAPAutoAuthDomain is not null, adding hooks.", NONSENSITIVE );
+   if ( $wgAuth->getConf( "AutoAuthUsername" ) !== "" &&
+   $wgAuth->getConf( "AutoAuthDomain" ) !== ""
+   ) {
+   $wgAuth->printDebug(
+   "wgLDAPAutoAuthUsername and wgLDAPAutoAuthDomain is not 
null, adding hooks.",
+   NONSENSITIVE
+   );
$wgHooks['UserLoadAfterLoadFromSession'][] = 
'LdapAutoAuthentication::Authenticate';
 
// Disallow logout link
diff --git a/LdapAuthenticationPlugin.php b/LdapAuthenticationPlugin.php
index aa04669..b92f2b4 100644
--- a/LdapAuthenticationPlugin.php
+++ b/LdapAuthenticationPlugin.php
@@ -163,9 +163,27 @@
 * @param null $deref
 * @return resource
 */
-   public static function ldap_search( $ldapconn, $basedn, $filter, 
$attributes = [], $attrsonly = null, $sizelimit = null, $timelimit = null, 
$deref = null ) {
+   public static function ldap_search(
+   $ldapconn,
+   $basedn,
+   $filter,
+   $attributes = [],
+   $attrsonly = null,
+   $sizelimit = null,
+   $timelimit = null,
+   $deref = null
+   ) {
wfSuppressWarnings();
-   $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes, 
$attrsonly, $sizelimit, $timelimit, $deref );
+   $ret = ldap_search(
+   $ldapconn,
+   $basedn,
+   $filter,
+   $attributes,
+   $attrsonly,
+   $sizelimit,
+   $timelimit,
+   $deref
+   );
wfRestoreWarnings();
return $ret;
}
@@ -182,9 +200,27 @@
 * @param null $deref
 * @return resource
 */
-   public static function ldap_read( $ldapconn, $basedn, $filter, 
$attributes = [], $attrsonly = null, $sizelimit = null, $timelimit = null, 
$deref = null ) {
+   public static function ldap_read(
+   $ldapconn,
+   $basedn,
+   $filter,
+   $attributes = [],
+   $attrsonly = null,
+   $sizelimit = null,
+   $timelimit = null,
+   $deref = null
+   ) {
wfSuppressWarnings();
-   $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes, 
$attrsonly, $sizelimit, $timelimit, $deref );
+   $ret = ldap_read(
+   $ldapconn,
+   $basedn,
+   $filter,
+   $attributes,
+   $attrsonly,
+   $sizelimit,
+   $timelimit,
+   $deref
+   );
wfRestoreWarnings();
return $ret;
}
@@ -201,9 +237,27 @@
 * @param null $deref
 * @return \resource
 */
-   public static function ldap_list( $ldapconn, $basedn, $filter, 
$attributes = [], $attrsonly = null, $sizelimit = null, $timelimit = null, 
$deref = null ) {
+   public static function ldap_list(
+   $ldapconn,
+   $basedn,
+   $filter,
+   $attributes = [],
+   $attrsonly = null,
+   $sizelimit = null,
+   $timelimit = null,
+   $deref = null
+   ) {

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364109 )

Change subject: Break long lines
..

Break long lines

Change-Id: I6830de495b8c943ef015b29b40a57d9539c92d6c
---
M Question.php
M Quiz.class.php
M phpcs.xml
3 files changed, 87 insertions(+), 31 deletions(-)


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

diff --git a/Question.php b/Question.php
index 57212ca..c73a33d 100644
--- a/Question.php
+++ b/Question.php
@@ -204,20 +204,29 @@
// A single choice 
object with many correct proposal is a syntax error.
if ( $this->mType == 
'singleChoice' && $expectOn > 1 ) {

$this->setState( 'error' );
-   $inputStyle = 
'style="outline: ' . Quiz::getColor( 'error' ) . ' solid 3px; *border: 3px 
solid ' . Quiz::getColor( 'error' ) . ';"';
-   $title = 
'title="' . wfMessage( 'quiz_colorError' )->escaped() . '"';
+   $inputStyle = 
'style="outline: ' . Quiz::getColor( 'error' ) .
+   ' solid 
3px; *border: 3px solid ' . Quiz::getColor( 'error' ) .
+   ';"';
+   $title = 
'title="' .
+   
wfMessage( 'quiz_colorError' )->escaped() . '"';
$disabled = 
'disabled="disabled"';
}
if ( 
$this->mBeingCorrected ) {
if ( $checked ) 
{

$checkedCount++;

$this->setState( 'right' );
-   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'right' ) . ' solid 3px; 
*border: 3px solid ' . Quiz::getColor( 'right' ) . ';"';
-   $title 
= 'title="' . wfMessage( 'quiz_colorRight' )->escaped() . '"';
+   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'right' ) .
+   
' solid 3px; *border: 3px solid ' .
+   
Quiz::getColor( 'right' ) . ';"';
+   $title 
= 'title="' . wfMessage( 'quiz_colorRight' )->escaped() .
+   
'"';
} else {

$this->setState( 'na_wrong' );
-   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'wrong' ) . ' solid 3px; 
*border: 3px solid ' . Quiz::getColor( 'wrong' ) . ';"';
-   $title 
= 'title="' . wfMessage( 'quiz_colorWrong' )->escaped() . '"';
+   
$inputStyle = 'style="outline: ' . Quiz::getColor( 'wrong' ) .
+   
' solid 3px; *border: 3px solid ' .
+   
Quiz::getColor( 'wrong' ) . ';"';
+   $title 
= 'title="' . wfMessage( 'quiz_colorWrong' )->escaped() .
+   
'"';
}
}
break;
@@ -226,8 +235,11 @@
if ( $checked ) 
{

$checkedCount++;

$this->setState( 'wrong' );
-   
$inputStyle = 'style="outline: ' . 

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Break long line

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364108 )

Change subject: Break long line
..

Break long line

Exclude one file, because it is using <<addCSS();
$this->addJS();
$this->deactivateWikEd();
-   $this->editFormTextTop = '';
+   $this->editFormTextTop =
+   '';
$this->editFormTextBottom = '';
$this->editFormTextBeforeContent = 
$this->addEditFormBeforeContent();
$this->editFormTextAfterContent = 
$this->addEditFormAfterContent();
@@ -122,10 +123,11 @@
$out .= '';
$out .= '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() . '' .
-   $this->buildEditSummary() . '';
+   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() .
+   '' . $this->buildEditSummary() . '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() . '';
+   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() .
+   '';
$out .= '';
$out .= '';
$out .= '';
@@ -298,14 +300,20 @@
$out .= '';
$out .= '';
$out .= '' . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-1' ) . '';
-   $out .= ''
-   . $this->getContext()->msg( 
'twoColConflict-editor-col-desc-2', $this->getSubmitButtonLabel() ) . '';
+   $out .= '' .
+   $this->getContext()->msg(
+   'twoColConflict-editor-col-desc-2', 
$this->getSubmitButtonLabel()
+   ) . '';
$out .= '';
$out .= '';
-   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) . '';
-   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) . '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-1' ) .
+   '';
+   $out .= '' . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-2' ) .
+   '';
$out .= ''
-   . $this->getContext()->msg( 
'twoColConflict-base-selection-desc-3', $this->getSubmitButtonLabel() ) . 
'';
+   . $this->getContext()->msg(
+   'twoColConflict-base-selection-desc-3', 
$this->getSubmitButtonLabel()
+   ) . '';
$out .= '';
 
return $out;
@@ -527,7 +535,9 @@
'' .
( count( $lines ) > 1 ? "\n" : 
$this->getContext()->msg( 'word-separator' ) ) .
'' .
-   htmlspecialchars( $this->trimStringToFullWord( 
array_pop( $lines ), $maxLength / 2, false ) ) .
+   htmlspecialchars(
+   $this->trimStringToFullWord( array_pop( $lines 
), $maxLength / 2, false )
+   ) .
'';
}
 
@@ -599,11 +609,12 @@
}
 
private function addJS() {
-   $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflict', 'true' );
-   $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflictWikiEditor', $this->wikiEditorIsEnabled() );
-   $this->context->getOutput()->addJsConfigVars( 
'wgTwoColConflictSubmitLabel', $this->getSubmitButtonLabel() );
+   $out = $this->context->getOutput();
+   $out->addJsConfigVars( 'wgTwoColConflict', 'true' );
+   $out->addJsConfigVars( 'wgTwoColConflictWikiEditor', 
$this->wikiEditorIsEnabled() );
+   $out->addJsConfigVars( 'wgTwoColConflictSubmitLabel', 
$this->getSubmitButtonLabel() );
 
-   $this->context->getOutput()->addModules( [
+   $out->addModules( [
'ext.TwoColConflict.initJs',
'ext.TwoColConflict.filterOptionsJs'
] );

[MediaWiki-commits] [Gerrit] mediawiki...cldr[master]: Activate Generic.Files.LineLength

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364107 )

Change subject: Activate Generic.Files.LineLength
..

Activate Generic.Files.LineLength

The sniff already passed

Change-Id: I5e6c6bac2b411e8644debb063f5d1b43b8fdb0ed
---
M phpcs.xml
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/phpcs.xml b/phpcs.xml
index 8504891..ae5a704 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,11 +7,10 @@



-   

.

-   
+   
node_modules
vendor
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e6c6bac2b411e8644debb063f5d1b43b8fdb0ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: Break long lines

2017-07-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364106 )

Change subject: Break long lines
..

Break long lines

Change-Id: I48b8b4389d7a9dbb2ae33d7c86defed56adda93c
---
M GlobalCssJs.hooks.php
M GlobalCssJs.php
M ResourceLoaderGlobalModule.php
M ResourceLoaderGlobalSiteModule.php
M phpcs.xml
M removeOldManualUserPages.php
M tests/phpunit/RemoveOldManualUserPagesTest.php
7 files changed, 102 insertions(+), 42 deletions(-)


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

diff --git a/GlobalCssJs.hooks.php b/GlobalCssJs.hooks.php
index a270822..8491a77 100644
--- a/GlobalCssJs.hooks.php
+++ b/GlobalCssJs.hooks.php
@@ -123,9 +123,13 @@
) {
$title = $editPage->getTitle();
$name = $user->getName();
-   if ( $config->get( 'AllowUserJs' ) && 
$editPage->isJsSubpage && $title->getText() == $name . '/global.js' ) {
+   if ( $config->get( 'AllowUserJs' ) && 
$editPage->isJsSubpage &&
+   $title->getText() == $name . '/global.js'
+   ) {
$msg = 'globalcssjs-warning-js';
-   } elseif ( $config->get( 'AllowUserCss' ) && 
$editPage->isCssSubpage && $title->getText() == $name . '/global.css' ) {
+   } elseif ( $config->get( 'AllowUserCss' ) && 
$editPage->isCssSubpage &&
+   $title->getText() == $name . '/global.css'
+   ) {
$msg = 'globalcssjs-warning-css';
} else {
// CSS or JS page, but not a global one
diff --git a/GlobalCssJs.php b/GlobalCssJs.php
index aca4c7c..616c809 100644
--- a/GlobalCssJs.php
+++ b/GlobalCssJs.php
@@ -5,7 +5,8 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['GlobalCssJs'] = __DIR__ . '/i18n/core';
/* wfWarn(
-   'Deprecated PHP entry point used for GlobalCssJs extension. 
Please use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for GlobalCssJs extension. ' .
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
); */
return true;
diff --git a/ResourceLoaderGlobalModule.php b/ResourceLoaderGlobalModule.php
index 36dc33e..ad37fe2 100644
--- a/ResourceLoaderGlobalModule.php
+++ b/ResourceLoaderGlobalModule.php
@@ -56,7 +56,9 @@
break;
case 'type':
if ( $option !== 'style' && $option !== 
'script' ) {
-   throw new 
InvalidArgumentException( "type must be either 'style' or 'script', not 
'$option'" );
+   throw new 
InvalidArgumentException(
+   "type must be either 
'style' or 'script', not '$option'"
+   );
}
$this->type = $option;
break;
diff --git a/ResourceLoaderGlobalSiteModule.php 
b/ResourceLoaderGlobalSiteModule.php
index ccc5e97..da58639 100644
--- a/ResourceLoaderGlobalSiteModule.php
+++ b/ResourceLoaderGlobalSiteModule.php
@@ -33,7 +33,9 @@
 * @return array
 */
protected function getPages( ResourceLoaderContext $context ) {
-   if ( !ConfigFactory::getDefaultInstance()->makeConfig( 
'globalcssjs' )->get( 'UseGlobalSiteCssJs' ) ) {
+   if ( !ConfigFactory::getDefaultInstance()
+   ->makeConfig( 'globalcssjs' )->get( 
'UseGlobalSiteCssJs' )
+   ) {
return [];
}
 
diff --git a/phpcs.xml b/phpcs.xml
index 7097afc..5a35dc8 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,7 +1,6 @@
 
 

-   



diff --git a/removeOldManualUserPages.php b/removeOldManualUserPages.php
index 1170b68..17b08da 100644
--- a/removeOldManualUserPages.php
+++ b/removeOldManualUserPages.php
@@ -20,9 +20,11 @@
 
public function __construct() {
parent::__construct();
-   $this->mDescription = 'Remove reundant user script pages that 
import global.js and/or global.css';
+   $this->mDescription = 'Remove reundant user script pages that ' 
.
+   'import global.js and/or global.css';
$this->addOption( 'user', 'User name', true, true );
-   $this->addOption( 'ignorerevisionlimit', 'Whether to ignore the 
1 revision 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: template.py: Show a sample with -ns namespace alias option

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

Change subject: template.py: Show a sample with -ns namespace alias option
..


template.py: Show a sample with -ns namespace alias option

Change-Id: If817844bbf5c2ee5ea3a5736402f1cb6dce548bf
---
M scripts/template.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scripts/template.py b/scripts/template.py
index a68bf3a..f44f541 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -97,9 +97,9 @@
 
 
 This next example substitutes templates test1, test2, and space test on all
-pages:
+user talk pages (namespace #3):
 
-python pwb.py template test1 test2 "space test" -subst -always
+python pwb.py template test1 test2 "space test" -subst -ns:3 -always
 
 """
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If817844bbf5c2ee5ea3a5736402f1cb6dce548bf
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...lists[master]: Queries fix in order to prevent computational overruns

2017-07-09 Thread Mess (Code Review)
Mess has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364103 )

Change subject: Queries fix in order to prevent computational overruns
..

Queries fix in order to prevent computational overruns

Change-Id: I9f144171b12515df3311dc2e8c5b4a91edd32abf
---
M query/itwiki/Redirect/Redirect_orfani.cnf
M query/itwiki/Redirect/Redirect_orfani.sql
M query/itwiki/Voci/Voci_orfane_con_interlink.cnf
M query/itwiki/Voci/Voci_orfane_con_interlink.sql
M query/itwiki/Voci/Voci_orfane_in_ordine_alfabetico.cnf
M query/itwiki/Voci/Voci_orfane_in_ordine_alfabetico.sql
M query/itwiki/Voci/Voci_orfane_per_creatore.cnf
M query/itwiki/Voci/Voci_orfane_per_creatore.sql
M query/itwiki/Voci/Voci_orfane_per_data_di_creazione.cnf
M query/itwiki/Voci/Voci_orfane_per_data_di_creazione.sql
M query/itwiki/Voci/Voci_orfane_per_dimensione.cnf
M query/itwiki/Voci/Voci_orfane_per_dimensione.sql
M query/itwiki/Voci/Voci_orfane_senza_interlink.cnf
M query/itwiki/Voci/Voci_orfane_senza_interlink.sql
14 files changed, 186 insertions(+), 182 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/lists 
refs/changes/03/364103/2

diff --git a/query/itwiki/Redirect/Redirect_orfani.cnf 
b/query/itwiki/Redirect/Redirect_orfani.cnf
index c92db27..e363eec 100644
--- a/query/itwiki/Redirect/Redirect_orfani.cnf
+++ b/query/itwiki/Redirect/Redirect_orfani.cnf
@@ -1,5 +1,5 @@
-[query]
-project = itwiki
-frequency = twicemonthly
-author = Mauro742
-license = CC-BY-SA
+[query]
+project = itwiki
+frequency = twicemonthly
+author = Mauro742, Mess
+license = CC-BY-SA
diff --git a/query/itwiki/Redirect/Redirect_orfani.sql 
b/query/itwiki/Redirect/Redirect_orfani.sql
index 84f1a82..853bd21 100644
--- a/query/itwiki/Redirect/Redirect_orfani.sql
+++ b/query/itwiki/Redirect/Redirect_orfani.sql
@@ -1,9 +1,13 @@
-CONNECT itwiki_p itwiki.labsdb;
-SELECT CONCAT('# [[', page_title, ']] - [[', rd_title, ']] 
([[Speciale:PuntanoQui/', page_title, ']])')
-  FROM page JOIN redirect ON page_id=rd_from
-  WHERE page_namespace=0 AND rd_namespace = 0
-AND NOT EXISTS ( SELECT * 
-  FROM page AS p JOIN pagelinks ON p.page_id = pl_from 
-WHERE p.page_namespace IN (0, 4, 10, 12, 100, 102) AND pl_namespace = 
0 AND pl_title = page.page_title)
-  ORDER BY page_title
-  LIMIT 7500;
+CONNECT itwiki_p itwiki.labsdb;
+SELECT CONCAT('# [[', page_title, ']] - [[', rd_title, ']] 
([[Speciale:PuntanoQui/', page_title, ']])')
+FROM page 
+LEFT JOIN pagelinks
+ON pl_title = page_title
+AND pl_namespace = page_namespace
+LEFT JOIN redirect
+ON rd_from = page_id
+WHERE page_namespace=0
+AND rd_namespace=0
+AND pl_namespace IS NULL
+ORDER BY page_title
+LIMIT 1;
diff --git a/query/itwiki/Voci/Voci_orfane_con_interlink.cnf 
b/query/itwiki/Voci/Voci_orfane_con_interlink.cnf
index 2063ed9..2c7cffc 100644
--- a/query/itwiki/Voci/Voci_orfane_con_interlink.cnf
+++ b/query/itwiki/Voci/Voci_orfane_con_interlink.cnf
@@ -1,5 +1,5 @@
 [query]
 project = itwiki
 frequency = weekly
-author = unknown
+author = Mess
 license = CC-BY-SA
diff --git a/query/itwiki/Voci/Voci_orfane_con_interlink.sql 
b/query/itwiki/Voci/Voci_orfane_con_interlink.sql
index 107f5df..fa624f3 100644
--- a/query/itwiki/Voci/Voci_orfane_con_interlink.sql
+++ b/query/itwiki/Voci/Voci_orfane_con_interlink.sql
@@ -3,33 +3,33 @@
 FROM page
 WHERE page_namespace = 0
 AND page_is_redirect = 0
-AND page_title NOT IN
-(SELECT pl_title
-FROM pagelinks
-WHERE pl_namespace = 0
-AND pl_from NOT IN
-(SELECT page_id
-FROM page
-WHERE page_namespace <> 0)
-AND pl_from NOT IN
-(SELECT page_id
-FROM page JOIN redirect ON page_id=rd_from
-  WHERE page_namespace=0 AND rd_namespace = 0
-AND NOT EXISTS ( SELECT * 
-  FROM page AS p JOIN pagelinks ON p.page_id = pl_from 
-WHERE p.page_namespace = 0 AND pl_namespace = 0 AND pl_title = 
page.page_title))
-AND pl_from NOT IN
-(SELECT cl_from
-FROM categorylinks, pagelinks
-WHERE cl_to = pl_title
-AND pl_namespace = 14
-AND pl_from = 4195411)) /* 
Wikipedia:ConnectivityProjectInternationalization/ArticlesNotFormingValidLinks 
*/
-AND page_id NOT IN
-(SELECT cl_from
-FROM categorylinks, pagelinks
-WHERE cl_to = pl_title
-AND pl_namespace = 14
-AND pl_from = 4195411) /* 
Wikipedia:ConnectivityProjectInternationalization/ArticlesNotFormingValidLinks 
*/
+AND page_title NOT IN (
+  SELECT pl_title
+  FROM pagelinks
+  WHERE pl_from_namespace = 0
+  AND pl_namespace = 0
+  AND pl_title = page_title
+  AND pl_from NOT IN
+  (SELECT page_id
+   FROM page
+   LEFT JOIN pagelinks
+   ON pl_title = page_title
+   AND pl_namespace = page_namespace
+   WHERE page_namespace=0
+   AND page_is_redirect=1
+   AND pl_namespace IS NULL)
+  AND pl_from NOT IN
+  (SELECT cl_from
+   FROM categorylinks, pagelinks
+   WHERE cl_to = pl_title
+   AND pl_namespace = 14
+   AND pl_from = 4195411)) /* 
Wikipedia:ConnectivityProjectInternationalization/ArticlesNotFormingValidLinks 
*/
+   AND page_id NOT 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [DOC] Improve deprecation warnings

2017-07-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364105 )

Change subject: [DOC] Improve deprecation warnings
..

[DOC] Improve deprecation warnings

- Provide a better deprecation warning for DataSite data access methods
- Note: There is no equivalent value for info['type'] and urls property

Bug: T170075
Change-Id: I89bad3b050fb0dee3187c26468dc1bcdec35ee27
---
M pywikibot/site.py
1 file changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/364105/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index e2bc6cc..d2756e3 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -7276,8 +7276,26 @@
 props = attr.replace("get_", "")
 if props in ['info', 'sitelinks', 'aliases', 'labels',
  'descriptions', 'urls']:
+if props == 'info':
+instead = (
+'\n'
+"{'lastrevid': WikibasePage.latest_revision_id,\n"
+" 'pageid': WikibasePage.pageid,\n"
+" 'title': WikibasePage.title(),\n"
+" 'modified': WikibasePage._timestamp,\n"
+" 'ns': WikibasePage.namespace(),\n"
+" 'type': WikibasePage.entity_type, # for subclasses\n"
+" 'id': WikibasePage.id"
+'}\n')
+elif props == 'sitelinks':
+instead = 'ItemPage.sitelinks'
+elif props in ('aliases', 'labels', 'descriptions'):
+instead = ('WikibasePage.{0} after WikibasePage.get()'
+   .format(attr))
+else:  # urls
+instead = None
 issue_deprecation_warning('DataSite.{0}()'.format(attr),
-  'WikibasePage', 2)
+  instead, 2)
 if props == 'urls':
 props = 'sitelinks/urls'
 method = self._get_propertyitem

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Set ladsgroup as absented user

2017-07-09 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/364104 )

Change subject: Set ladsgroup as absented user
..


Set ladsgroup as absented user

Follow up of: https://gerrit.wikimedia.org/r/#/c/364102

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

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index d7402c8..fcd9d4e 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -7,7 +7,7 @@
   johnflewis, marc, jkrauska, akumar, mnoushad, spage, tnegrin, 
msyed, kleduc,
   manybubbles, haithams, jzerebecki, ashwinpp, ironholds, robla, 
asherman,
   laner, declerambaul, srijan, junikowski, krenair, springle, 
jhobs, vbaranetsky,
-  yurik, bsimmers, bcohn, hjiang, tomasz, csteipp, zareen, 
jgirault]
+  yurik, bsimmers, bcohn, hjiang, tomasz, csteipp, zareen, 
jgirault, ladsgroup]
   absent_ldap:
 description: meta group for absented users which had privileged LDAP 
access in the past
 members: [siddharth11, adavenport]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I858a489b02e50a1e0d719f32459e553d1d996ae1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey 
Gerrit-Reviewer: Elukey 
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/puppet[production]: Set ladsgroup as absented user

2017-07-09 Thread Elukey (Code Review)
Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364104 )

Change subject: Set ladsgroup as absented user
..

Set ladsgroup as absented user

Follow up of: https://gerrit.wikimedia.org/r/#/c/364102

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


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index d7402c8..fcd9d4e 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -7,7 +7,7 @@
   johnflewis, marc, jkrauska, akumar, mnoushad, spage, tnegrin, 
msyed, kleduc,
   manybubbles, haithams, jzerebecki, ashwinpp, ironholds, robla, 
asherman,
   laner, declerambaul, srijan, junikowski, krenair, springle, 
jhobs, vbaranetsky,
-  yurik, bsimmers, bcohn, hjiang, tomasz, csteipp, zareen, 
jgirault]
+  yurik, bsimmers, bcohn, hjiang, tomasz, csteipp, zareen, 
jgirault, ladsgroup]
   absent_ldap:
 description: meta group for absented users which had privileged LDAP 
access in the past
 members: [siddharth11, adavenport]

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove ladsgroup from production access

2017-07-09 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/364102 )

Change subject: Remove ladsgroup from production access
..


Remove ladsgroup from production access

Change-Id: I5ffe3ba7acc92de3835d0657a7b486b317267b9e
---
M modules/admin/data/data.yaml
1 file changed, 7 insertions(+), 9 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index dd0a5c9..d7402c8 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -61,7 +61,7 @@
   tgr, phuedx, ejegg, twentyafterfour, legoktm, catrope,
   mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, 
dcausse,
   bsitzmann, mholloway-shell, dduvall, dereckson,
-  ladsgroup, bawolff, zfilipin, addshore, niharika29, ppchelko, 
pmiazga,
+  bawolff, zfilipin, addshore, niharika29, ppchelko, pmiazga,
   musikanimal]
 privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL',
  'ALL = NOPASSWD: /sbin/restart hhvm',
@@ -200,7 +200,7 @@
   deskana, dduvall, nettrom, mforns, jkatz, ebernhardson,
   mlitn, tbayer, joal, kartik, nikerabbit, pcoombe,
   neilpquinn-wmf, maxsem, jminor, dpatrick, atgomez, dstrine,
-  ladsgroup, ovasileva]
+  ovasileva]
   statistics-admins:
 posix_name: stats
 description: access files created by stats user cron jobs
@@ -241,7 +241,7 @@
   bmansurov, atgomez, amire80, kartik, pcoombe, foks, mpany, 
jsamra,
   jdlrobson, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro,
   psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon,
-  piccardi, fdans, eevans, anomie, demon, ladsgroup, musikanimal, 
joewalsh,
+  piccardi, fdans, eevans, anomie, demon, musikanimal, joewalsh,
   kaldari, goransm, ema, dworley]
   analytics-admins:
 gid: 732
@@ -411,7 +411,7 @@
 gid: 763
 description: Service deploy users
 members: [bd808, eevans, gwicke, mobrovac, ppchelko, demon, 
twentyafterfour, thcipriani, dduvall,
-  bsitzmann, mholloway-shell, kartik, halfak, ladsgroup, 
smalyshev, hoo,
+  bsitzmann, mholloway-shell, kartik, halfak, smalyshev, hoo,
   ssastry, cscott, arlolra, jdlrobson, maxsem]
 privileges: []
 
@@ -541,7 +541,7 @@
   ores-admin:
 description: ORES admins
 gid: 782
-members: [awight, halfak, ladsgroup]
+members: [awight, halfak]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service uwsgi-ores *',
  'ALL = NOPASSWD: /usr/sbin/service celery-ores-worker *']
   sectools-roots:
@@ -989,13 +989,11 @@
 uid: 2008
 email: ttij...@wikimedia.org
   ladsgroup:
-ensure: present
+ensure: absent
 gid: 500
 name: ladsgroup
 realname: Amir Sarabadani
-ssh_keys:
-   - ssh-rsa 
B3NzaC1yc2EDAQABAAACAQC4VTfdeTSboPh/af2zT6ov13A7kSygXEspRgq3/d2BWcNFvwIIpgtpCnHzA6YPvuhrjksw34jk3OvuuQoTyWYfuwql8Wu8O9f32WD4dhrKhB8Rchxj6rrncBrGS5k0HeLr+HMrknVSSXGH60GAFNRGYLCGA+zBXLAja+xROTipIRHOF0SLlsfpY04HTrEtKcKdj8n9BnGpbT7vFp+AmXeSHg9DwRn6yvem3x1ghBFdfg+XwmIqsV4wR2b7GLX2Y6+ei53657v2VxVsORdfn4yV7FcjeVYnwNxMOVMfYcFCz+1LU9ROPDw5sCqyDPMtyQPxExiprKNT9UHkUj7aqE61o4AF1vSb9AEdUpjGgiMl+Dr8Sd+T2sNOq5uFxtWSfuNqgGHY+nOYPmSHsxthwXc7CH7x/eBDefUZwTdwX8Vf/FYOAyiviknCzwLoAbkQwRjOwFZVqJMwRwRyMToKODTTgOM0s3g/5P8n5AYwTLt1I6dLeC3nju3lywyeWb6DkFOB48mg561AU1soTnSKffse7AtJ5Ye3GFEBKxBCRJUpc7EVesOhjTdcmBWYeSSmwxHCjiCact4tyk8ZiLuRqd3EZ0KFT/6W5d4csrJUwBDNWo+7M69gVIMn/zDCy3ZViGMsqPFfXSrpKw8k0WtPBTKdHFPJ0KoLERctzkrNkfBTVw==
 Ladsgroup @ prod
-   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCY5EyIRrtuxDgh8SOkTQl8tYAu5ZOGMO0MA9RiqMb6za8ossDmKCwD5JKwooYmT8yFA5JnvyOC0adsCCA+enylrX6r6FK0ur+dekfCGF/dsyxSJU9aw6WwVr2BThrfPjzbMR1IuN4I0t134fYE0VUvibod1kGoxSGYdWvqEFf+v7b2MqWtU+xASBFEbrx2knqVBjyy6+O8sUikfKX+vyCSxiQa2GE66LM8SuX+0JnhlDNuXleQzdFpJ9novw/+/1KqOJOg3i8/Jb1/AEMf/eChombWdjNccGtPueRyJAXEl2tCuLvt9Vf7PBZaoxhAV0Bo0GcwRVBwvsyaNDuVabLJ
+ssh_keys: []
 uid: 3182
 email: amir.tafreshi_...@wikimedia.de
   manybubbles:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ffe3ba7acc92de3835d0657a7b486b317267b9e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey 
Gerrit-Reviewer: Elukey 
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/puppet[production]: Remove ladsgroup from production access

2017-07-09 Thread Elukey (Code Review)
Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364102 )

Change subject: Remove ladsgroup from production access
..

Remove ladsgroup from production access

Change-Id: I5ffe3ba7acc92de3835d0657a7b486b317267b9e
---
M modules/admin/data/data.yaml
1 file changed, 7 insertions(+), 9 deletions(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index dd0a5c9..d7402c8 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -61,7 +61,7 @@
   tgr, phuedx, ejegg, twentyafterfour, legoktm, catrope,
   mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, 
dcausse,
   bsitzmann, mholloway-shell, dduvall, dereckson,
-  ladsgroup, bawolff, zfilipin, addshore, niharika29, ppchelko, 
pmiazga,
+  bawolff, zfilipin, addshore, niharika29, ppchelko, pmiazga,
   musikanimal]
 privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL',
  'ALL = NOPASSWD: /sbin/restart hhvm',
@@ -200,7 +200,7 @@
   deskana, dduvall, nettrom, mforns, jkatz, ebernhardson,
   mlitn, tbayer, joal, kartik, nikerabbit, pcoombe,
   neilpquinn-wmf, maxsem, jminor, dpatrick, atgomez, dstrine,
-  ladsgroup, ovasileva]
+  ovasileva]
   statistics-admins:
 posix_name: stats
 description: access files created by stats user cron jobs
@@ -241,7 +241,7 @@
   bmansurov, atgomez, amire80, kartik, pcoombe, foks, mpany, 
jsamra,
   jdlrobson, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro,
   psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon,
-  piccardi, fdans, eevans, anomie, demon, ladsgroup, musikanimal, 
joewalsh,
+  piccardi, fdans, eevans, anomie, demon, musikanimal, joewalsh,
   kaldari, goransm, ema, dworley]
   analytics-admins:
 gid: 732
@@ -411,7 +411,7 @@
 gid: 763
 description: Service deploy users
 members: [bd808, eevans, gwicke, mobrovac, ppchelko, demon, 
twentyafterfour, thcipriani, dduvall,
-  bsitzmann, mholloway-shell, kartik, halfak, ladsgroup, 
smalyshev, hoo,
+  bsitzmann, mholloway-shell, kartik, halfak, smalyshev, hoo,
   ssastry, cscott, arlolra, jdlrobson, maxsem]
 privileges: []
 
@@ -541,7 +541,7 @@
   ores-admin:
 description: ORES admins
 gid: 782
-members: [awight, halfak, ladsgroup]
+members: [awight, halfak]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service uwsgi-ores *',
  'ALL = NOPASSWD: /usr/sbin/service celery-ores-worker *']
   sectools-roots:
@@ -989,13 +989,11 @@
 uid: 2008
 email: ttij...@wikimedia.org
   ladsgroup:
-ensure: present
+ensure: absent
 gid: 500
 name: ladsgroup
 realname: Amir Sarabadani
-ssh_keys:
-   - ssh-rsa 
B3NzaC1yc2EDAQABAAACAQC4VTfdeTSboPh/af2zT6ov13A7kSygXEspRgq3/d2BWcNFvwIIpgtpCnHzA6YPvuhrjksw34jk3OvuuQoTyWYfuwql8Wu8O9f32WD4dhrKhB8Rchxj6rrncBrGS5k0HeLr+HMrknVSSXGH60GAFNRGYLCGA+zBXLAja+xROTipIRHOF0SLlsfpY04HTrEtKcKdj8n9BnGpbT7vFp+AmXeSHg9DwRn6yvem3x1ghBFdfg+XwmIqsV4wR2b7GLX2Y6+ei53657v2VxVsORdfn4yV7FcjeVYnwNxMOVMfYcFCz+1LU9ROPDw5sCqyDPMtyQPxExiprKNT9UHkUj7aqE61o4AF1vSb9AEdUpjGgiMl+Dr8Sd+T2sNOq5uFxtWSfuNqgGHY+nOYPmSHsxthwXc7CH7x/eBDefUZwTdwX8Vf/FYOAyiviknCzwLoAbkQwRjOwFZVqJMwRwRyMToKODTTgOM0s3g/5P8n5AYwTLt1I6dLeC3nju3lywyeWb6DkFOB48mg561AU1soTnSKffse7AtJ5Ye3GFEBKxBCRJUpc7EVesOhjTdcmBWYeSSmwxHCjiCact4tyk8ZiLuRqd3EZ0KFT/6W5d4csrJUwBDNWo+7M69gVIMn/zDCy3ZViGMsqPFfXSrpKw8k0WtPBTKdHFPJ0KoLERctzkrNkfBTVw==
 Ladsgroup @ prod
-   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCY5EyIRrtuxDgh8SOkTQl8tYAu5ZOGMO0MA9RiqMb6za8ossDmKCwD5JKwooYmT8yFA5JnvyOC0adsCCA+enylrX6r6FK0ur+dekfCGF/dsyxSJU9aw6WwVr2BThrfPjzbMR1IuN4I0t134fYE0VUvibod1kGoxSGYdWvqEFf+v7b2MqWtU+xASBFEbrx2knqVBjyy6+O8sUikfKX+vyCSxiQa2GE66LM8SuX+0JnhlDNuXleQzdFpJ9novw/+/1KqOJOg3i8/Jb1/AEMf/eChombWdjNccGtPueRyJAXEl2tCuLvt9Vf7PBZaoxhAV0Bo0GcwRVBwvsyaNDuVabLJ
+ssh_keys: []
 uid: 3182
 email: amir.tafreshi_...@wikimedia.de
   manybubbles:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Theme[master]: Version 2.1: add the theme name as a class name to the

2017-07-09 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364101 )

Change subject: Version 2.1: add the theme name as a class name to the  
element to ease per-theme styling
..

Version 2.1: add the theme name as a class name to the  element to ease 
per-theme styling

This allows on-wiki CSS pages such as [[MediaWiki:Vector.css]] to contain
styles for multiple themes, such as the default theme (=on-wiki
customizations on top of the skin's CSS) as well as any and all themes the
skin may have (e.g. Dark and DeepSea in Vector's case; for example,
DeepSea-specific CSS rules could be prefixed with body.theme-deepsea).

HT Lcawte & SamanthaNguyen

Change-Id: I55397f13efcd3407e91772903fefa041b1c18e57
---
M Theme.hooks.php
M extension.json
2 files changed, 39 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Theme 
refs/changes/01/364101/1

diff --git a/Theme.hooks.php b/Theme.hooks.php
index 73fdc23..7fa9e29 100644
--- a/Theme.hooks.php
+++ b/Theme.hooks.php
@@ -110,4 +110,40 @@
return true;
}
 
+   /**
+* Add theme- class to the  element to allow per-theme
+* styling on on-wiki CSS pages, such as MediaWiki:Vector.css.
+* The class is added only for non-default themes.
+*
+* @param OutputPage $out
+* @param Skin $sk
+* @param array $bodyAttrs Existing attributes of the  tag as an 
array
+*/
+   public static function onOutputPageBodyAttributes( $out, $sk, 
&$bodyAttrs ) {
+   global $wgDefaultTheme;
+
+   // Check the following things in this order:
+   // 1) value of $wgDefaultTheme (set in site configuration)
+   // 2) user's personal preference/override
+   // 3) per-page usetheme URL parameter
+   $userTheme = $wgDefaultTheme;
+   // User's personal theme override, if any
+   $user = $out->getUser();
+   if ( $user->getOption( 'theme' ) ) {
+   $userTheme = $user->getOption( 'theme' );
+   }
+   $theme = $out->getRequest()->getVal( 'usetheme', $userTheme );
+   $theme = strtolower( htmlspecialchars( $theme ) ); // paranoia
+
+   if ( !Theme::skinHasTheme( $sk->getSkinName(), $theme ) ) {
+   return true;
+   }
+
+   if ( isset( $theme ) && $theme !== 'default' ) {
+   $bodyAttrs['class'] .= ' theme-' . $theme;
+   }
+
+   return true;
+   }
+
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 10cb143..1a61085 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "Theme",
"namemsg": "theme-extensionname",
-   "version": "2.0.1",
+   "version": "2.1",
"author": [
"Ryan Schmidt",
"Jack Phoenix",
@@ -89,7 +89,8 @@
"ThemeHooks::onBeforePageDisplay",
"ThemeHooks::addJSonPreferences"
],
-   "GetPreferences": "ThemeHooks::onGetPreferences"
+   "GetPreferences": "ThemeHooks::onGetPreferences",
+   "OutputPageBodyAttributes": 
"ThemeHooks::onOutputPageBodyAttributes"
},
"manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I55397f13efcd3407e91772903fefa041b1c18e57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Theme
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] re-enable get_aliases test

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

Change subject: [bugfix] re-enable get_aliases test
..


[bugfix] re-enable get_aliases test

Alias for 'en' was removed on wikidata item Q60.
Use 'fr' instead.

Bug: T170073
Change-Id: Ie52ba879d2ee3044e31f9a95796dc218b2581048
---
M tests/wikibase_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 00459a3..3c68d47 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -1837,7 +1837,7 @@
 data = self.repo.get_aliases(60)
 self.assertOneDeprecation()
 self.assertIsInstance(data, dict)
-self.assertIn('en', data)
+self.assertIn('fr', data)  # T170073
 
 def test_get_descriptions(self):
 """Test get_descriptions."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie52ba879d2ee3044e31f9a95796dc218b2581048
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] illustratewikidata: rename page_image key in page_i...

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

Change subject: [bugfix] illustratewikidata: rename page_image key in 
page_image_free
..


[bugfix] illustratewikidata: rename page_image key in page_image_free

The name of the key is no longer page_image but is now page_image_free.
So illustrate_wikidata.py is actually entirely broken.
Note: I don't think that we need, with this script, to get non-free images too. 
So I'll just implement the rename, not the both elements key.

Bug: T169447
Change-Id: Ia28c472c88baaad68f0042057905a0dbcd433ec8
---
M scripts/illustrate_wikidata.py
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/scripts/illustrate_wikidata.py b/scripts/illustrate_wikidata.py
index 81bd6ba..329fb4d 100755
--- a/scripts/illustrate_wikidata.py
+++ b/scripts/illustrate_wikidata.py
@@ -59,7 +59,7 @@
 self.current_page = page
 
 pywikibot.output(u'Found %s' % item.title())
-imagename = page.properties().get('page_image')
+imagename = page.properties().get('page_image_free')
 
 if not imagename:
 return
@@ -79,8 +79,8 @@
 image = pywikibot.FilePage(image.getRedirectTarget())
 
 if not image.exists():
-pywikibot.output('[[%s]] doesn\'t exist so I can\'t link to it'
- % (image.title(),))
+pywikibot.output("%s doesn't exist so I can't link to it"
+ % image.title(asLink=True))
 return
 
 newclaim.setTarget(image)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia28c472c88baaad68f0042057905a0dbcd433ec8
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix word wrapping CSS in source mode

2017-07-09 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364100 )

Change subject: Fix word wrapping CSS in source mode
..

Fix word wrapping CSS in source mode

Bug: T159271
Bug: T169851
Change-Id: I43f8f97dfb88ee512f54856a2a535b3766967604
---
M src/ui/styles/ve.ui.Surface.css
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/00/364100/1

diff --git a/src/ui/styles/ve.ui.Surface.css b/src/ui/styles/ve.ui.Surface.css
index ec2ca07..f85118d 100644
--- a/src/ui/styles/ve.ui.Surface.css
+++ b/src/ui/styles/ve.ui.Surface.css
@@ -38,4 +38,7 @@
 
 .ve-ui-surface-source .ve-ce-paragraphNode {
margin: 0;
+   word-wrap: break-word;
+   white-space: pre-wrap;
+   word-break: normal;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43f8f97dfb88ee512f54856a2a535b3766967604
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] re-enable get_aliases test

2017-07-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364099 )

Change subject: [bugfix] re-enable get_aliases test
..

[bugfix] re-enable get_aliases test

Alias for 'en' was removed on wikidata item Q60.
Use 'fr' instead.

Bug: T170073
Change-Id: Ie52ba879d2ee3044e31f9a95796dc218b2581048
---
M tests/wikibase_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/99/364099/1

diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 00459a3..3c68d47 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -1837,7 +1837,7 @@
 data = self.repo.get_aliases(60)
 self.assertOneDeprecation()
 self.assertIsInstance(data, dict)
-self.assertIn('en', data)
+self.assertIn('fr', data)  # T170073
 
 def test_get_descriptions(self):
 """Test get_descriptions."""

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-07-09T10:00:01+0000

2017-07-09 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364098 )

Change subject: New Wikidata Build - 2017-07-09T10:00:01+
..

New Wikidata Build - 2017-07-09T10:00:01+

Change-Id: Ibcec38e52167c7e5717ce66bbdc3f13be33682a9
---
M composer.lock
M extensions/ArticlePlaceholder/composer.json
M extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php
M extensions/ArticlePlaceholder/phpcs.xml
M 
extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
M 
extensions/ArticlePlaceholder/tests/phpunit/includes/BaseTemplateToolboxHookHandlerTest.php
M extensions/ArticlePlaceholder/tests/phpunit/includes/SearchHookHandlerTest.php
M extensions/Constraints/.eslintignore
M extensions/Constraints/README.md
M extensions/Constraints/api/CheckConstraints.php
D extensions/Constraints/docs/user.js
M extensions/Constraints/extension.json
M extensions/Constraints/i18n/ast.json
M extensions/Constraints/i18n/cs.json
M extensions/Constraints/i18n/de.json
M extensions/Constraints/i18n/en.json
M extensions/Constraints/i18n/es.json
M extensions/Constraints/i18n/eu.json
M extensions/Constraints/i18n/fr.json
M extensions/Constraints/i18n/gl.json
M extensions/Constraints/i18n/he.json
M extensions/Constraints/i18n/hi.json
A extensions/Constraints/i18n/ia.json
M extensions/Constraints/i18n/it.json
M extensions/Constraints/i18n/ko.json
M extensions/Constraints/i18n/lb.json
M extensions/Constraints/i18n/nb.json
M extensions/Constraints/i18n/nl.json
M extensions/Constraints/i18n/pl.json
M extensions/Constraints/i18n/pt.json
M extensions/Constraints/i18n/qqq.json
A extensions/Constraints/i18n/roa-tara.json
M extensions/Constraints/i18n/sv.json
A extensions/Constraints/i18n/th.json
M extensions/Constraints/i18n/zh-hans.json
M extensions/Constraints/includes/Constraint.php
M extensions/Constraints/includes/ConstraintCheck/Checker/CommonsLinkChecker.php
M 
extensions/Constraints/includes/ConstraintCheck/Checker/ConflictsWithChecker.php
M 
extensions/Constraints/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/FormatChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/InverseChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/ItemChecker.php
M 
extensions/Constraints/includes/ConstraintCheck/Checker/MandatoryQualifiersChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/MultiValueChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/OneOfChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/QualifierChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/QualifiersChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/RangeChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/SingleValueChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/SymmetricChecker.php
M 
extensions/Constraints/includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/TypeChecker.php
D extensions/Constraints/includes/ConstraintCheck/Checker/TypeSparqlChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/UniqueValueChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/ValueTypeChecker.php
D 
extensions/Constraints/includes/ConstraintCheck/Checker/ValueTypeSparqlChecker.php
M 
extensions/Constraints/includes/ConstraintCheck/DelegatingConstraintChecker.php
M 
extensions/Constraints/includes/ConstraintCheck/Helper/ConnectionCheckerHelper.php
M 
extensions/Constraints/includes/ConstraintCheck/Helper/ConstraintParameterParser.php
D 
extensions/Constraints/includes/ConstraintCheck/Helper/ConstraintStatementParameterParser.php
M extensions/Constraints/includes/ConstraintCheck/Helper/RangeCheckerHelper.php
M extensions/Constraints/includes/ConstraintCheck/Helper/SparqlHelper.php
M extensions/Constraints/includes/ConstraintCheck/Helper/TypeCheckerHelper.php
M extensions/Constraints/includes/ConstraintCheck/Result/CheckResult.php
M extensions/Constraints/includes/ConstraintParameterRenderer.php
M extensions/Constraints/includes/ConstraintReportFactory.php
M extensions/Constraints/includes/ConstraintRepository.php
M extensions/Constraints/includes/UpdateConstraintsTableJob.php
A extensions/Constraints/maintenance/ImportConstraintStatements.php
M extensions/Constraints/maintenance/UpdateConstraintsTable.php
M extensions/Constraints/modules/SpecialConstraintReportPage.css
M extensions/Constraints/modules/SpecialConstraintReportPage.js
A extensions/Constraints/modules/gadget-skip.js
A extensions/Constraints/modules/gadget.css
A extensions/Constraints/modules/gadget.js
M extensions/Constraints/specials/SpecialConstraintReport.php
M extensions/Constraints/tests/phpunit/Api/CheckConstraintsTest.php
M 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix : ShareAFact schema : populating text field in case of h...

2017-07-09 Thread Yashasvi (Code Review)
Yashasvi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364097 )

Change subject: Fix : ShareAFact schema : populating text field in case of 
highlight type events
..

Fix : ShareAFact schema : populating text field in case of highlight type events

Change-Id: I1c98a355bdce51db9f72b15c137ee380d921f10a
---
M app/src/main/java/org/wikipedia/analytics/ShareAFactFunnel.java
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
2 files changed, 25 insertions(+), 14 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/analytics/ShareAFactFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/ShareAFactFunnel.java
index 867df74..982d6ca 100644
--- a/app/src/main/java/org/wikipedia/analytics/ShareAFactFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/ShareAFactFunnel.java
@@ -61,8 +61,8 @@
 }
 
 /** Text in the web view was highlighted. */
-public void logHighlight() {
-logAction("highlight", null);
+public void logHighlight(String text) {
+logAction("highlight", text);
 }
 
 /** The share button in the UI was tapped. */
diff --git a/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java 
b/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
index 8ad7dae..bed0926 100755
--- a/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
+++ b/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
@@ -57,6 +57,7 @@
 private static final String PAYLOAD_PURPOSE_SHARE = "share";
 private static final String PAYLOAD_PURPOSE_DEFINE = "define";
 private static final String PAYLOAD_PURPOSE_EDIT_HERE = "edit_here";
+private static final String PAYLOAD_PURPOSE_HIGHLIGHT = "highlight";
 private static final String PAYLOAD_TEXT_KEY = "text";
 
 @ColorRes private static final int SHARE_TOOL_TIP_COLOR = 
R.color.foundation_blue;
@@ -93,11 +94,21 @@
 case PAYLOAD_PURPOSE_EDIT_HERE:
 onEditHerePayload(messagePayload.optInt("sectionID", 
0), text);
 break;
+case PAYLOAD_PURPOSE_HIGHLIGHT:
+onHighlightText(text);
+break;
 default:
 L.d("Unknown purpose=" + purpose);
 }
 }
 });
+}
+
+private void onHighlightText(String text) {
+if (funnel == null) {
+createFunnel();
+}
+funnel.logHighlight(text);
 }
 
 public void showWiktionaryDefinition(String text) {
@@ -192,8 +203,7 @@
 editItem.setVisible(false);
 }
 
-createFunnel();
-funnel.logHighlight();
+requestTextSelection(PAYLOAD_PURPOSE_HIGHLIGHT);
 }
 
 private boolean shouldEnableWiktionaryDialog() {
@@ -260,6 +270,7 @@
 
 private class RequestTextSelectOnMenuItemClickListener implements 
MenuItem.OnMenuItemClickListener {
 @NonNull private final String purpose;
+
 RequestTextSelectOnMenuItemClickListener(@NonNull String purpose) {
 this.purpose = purpose;
 }
@@ -270,17 +281,17 @@
 leaveActionMode();
 return true;
 }
+}
 
-private void requestTextSelection(String purpose) {
-// send an event to the WebView that will make it return the
-// selected text (or first paragraph) back to us...
-try {
-JSONObject payload = new JSONObject();
-payload.put(PAYLOAD_PURPOSE_KEY, purpose);
-bridge.sendMessage("getTextSelection", payload);
-} catch (JSONException e) {
-throw new RuntimeException(e);
-}
+private void requestTextSelection(String purpose) {
+// send an event to the WebView that will make it return the
+// selected text (or first paragraph) back to us...
+try {
+JSONObject payload = new JSONObject();
+payload.put(PAYLOAD_PURPOSE_KEY, purpose);
+bridge.sendMessage("getTextSelection", payload);
+} catch (JSONException e) {
+throw new RuntimeException(e);
 }
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Don't mess with $wgHooks in DeletedContributionsLineEnding hook

2017-07-09 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364096 )

Change subject: Don't mess with $wgHooks in DeletedContributionsLineEnding hook
..

Don't mess with $wgHooks in DeletedContributionsLineEnding hook

Change-Id: I74ea86eff573328c3d79bc6e860a46a7ae0b7e4d
---
M Hooks.php
1 file changed, 2 insertions(+), 10 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index f139b26..be4320e 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -785,9 +785,6 @@
 * @return bool
 */
public static function onDeletedContributionsLineEnding( $pager, &$ret, 
$row, &$classes ) {
-   global $wgHooks;
-   static $javascriptIncluded = false;
-
if ( !$row instanceof Flow\Formatter\FormatterRow ) {
return true;
}
@@ -814,13 +811,8 @@
// If we output one or more lines of contributions entries we 
also need to include
// the javascript that hooks into moderation actions.
// @todo not a huge fan of this static variable, what else 
though?
-   if ( !$javascriptIncluded ) {
-   $javascriptIncluded = true;
-   $wgHooks['SpecialPageAfterExecute'][] = function( 
$specialPage, $subPage ) {
-   $specialPage->getOutput()->addModules( [ 
'ext.flow.contributions' ] );
-   $specialPage->getOutput()->addModuleStyles( [ 
'ext.flow.contributions.styles' ] );
-   };
-   }
+   $pager->getOutput()->addModules( [ 'ext.flow.contributions' ] );
+   $pager->getOutput()->addModuleStyles( [ 
'ext.flow.contributions.styles' ] );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74ea86eff573328c3d79bc6e860a46a7ae0b7e4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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...SecurePoll[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I5d1441d34998def07d5250950116579ef6b3972d
---
M cli/convertVotes.php
M cli/purgePrivateVoteData.php
M composer.json
M includes/ballots/ApprovalBallot.php
M includes/ballots/Ballot.php
M includes/ballots/ChooseBallot.php
M includes/entities/Question.php
M includes/main/Store.php
M includes/pages/EntryPage.php
M includes/pages/TallyPage.php
M includes/talliers/CommentDumper.php
M includes/talliers/ElectionTallier.php
M includes/talliers/HistogramRangeTallier.php
M includes/talliers/PairwiseTallier.php
M includes/talliers/PluralityTallier.php
M phpcs.xml
16 files changed, 14 insertions(+), 20 deletions(-)

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



diff --git a/cli/convertVotes.php b/cli/convertVotes.php
index b69198d..e10f027 100644
--- a/cli/convertVotes.php
+++ b/cli/convertVotes.php
@@ -112,4 +112,3 @@
fwrite( STDERR, rtrim( $message ) . "\n" );
exit( 1 );
 }
-
diff --git a/cli/purgePrivateVoteData.php b/cli/purgePrivateVoteData.php
index f63e20c..96d5432 100644
--- a/cli/purgePrivateVoteData.php
+++ b/cli/purgePrivateVoteData.php
@@ -72,7 +72,6 @@
}
 
if ( count( $electionsToPurge ) > 0 ) {
-
$conds = [ 'vote_election' => $electionsToPurge ];
// In case a partial purge ran previously
$conds[] = "( vote_ip != '' OR vote_xff != '' OR 
vote_ua != '' )";
diff --git a/composer.json b/composer.json
index b8f68fb..4f55859 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.10.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/ballots/ApprovalBallot.php 
b/includes/ballots/ApprovalBallot.php
index b33ea39..e780d14 100644
--- a/includes/ballots/ApprovalBallot.php
+++ b/includes/ballots/ApprovalBallot.php
@@ -95,4 +95,3 @@
}
 
 }
-
diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 011938c..4dab82b 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -246,7 +246,7 @@
[ $this, 'getCurrentVoteCallback' ],
$voter->getId()
);
-   if ( !$status->isOK() ){
+   if ( !$status->isOK() ) {
return false;
}
 
diff --git a/includes/ballots/ChooseBallot.php 
b/includes/ballots/ChooseBallot.php
index ae6b7ab..04d62da 100644
--- a/includes/ballots/ChooseBallot.php
+++ b/includes/ballots/ChooseBallot.php
@@ -100,4 +100,3 @@
return $s;
}
 }
-
diff --git a/includes/entities/Question.php b/includes/entities/Question.php
index 5e2a99d..8d9f160 100644
--- a/includes/entities/Question.php
+++ b/includes/entities/Question.php
@@ -28,7 +28,6 @@
function getMessageNames() {
$ballot = $this->getElection()->getBallot();
return array_merge( $ballot->getMessageNames( $this ), [ 'text' 
] );
-
}
 
/**
diff --git a/includes/main/Store.php b/includes/main/Store.php
index da9aa22..8f851cf 100644
--- a/includes/main/Store.php
+++ b/includes/main/Store.php
@@ -237,7 +237,7 @@
'vote_current' => 1,
'vote_struck' => 0
];
-   if ( $voterId !== null ){
+   if ( $voterId !== null ) {
$where['vote_voter'] = $voterId;
}
$res = $dbr->select(
@@ -249,7 +249,7 @@
 
foreach ( $res as $row ) {
$status = call_user_func( $callback, $this, 
$row->vote_record );
-   if ( $status instanceof Status && !$status->isOK() ){
+   if ( $status instanceof Status && !$status->isOK() ) {
return $status;
}
}
@@ -485,8 +485,8 @@
if ( $xr->name === 'vote' ) {
# Notify tallier of vote record if requested
if ( $this->voteCallback && $electionInfo
-   && $electionInfo['id'] == 
$this->voteElectionId )
-   {
+   && $electionInfo['id'] == 
$this->voteElectionId
+   ) {
$record = $this->readStringElement();
 

[MediaWiki-commits] [Gerrit] mediawiki...LdapAuthentication[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: Ice6b2418ff5a6baf642b0a7952eaa866790c23c3
---
M LdapAuthentication.php
M LdapAuthenticationPlugin.php
M composer.json
M phpcs.xml
4 files changed, 9 insertions(+), 6 deletions(-)

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



diff --git a/LdapAuthentication.php b/LdapAuthentication.php
index dc7df51..6e7bc1c 100644
--- a/LdapAuthentication.php
+++ b/LdapAuthentication.php
@@ -164,6 +164,7 @@
$wgAuth->printDebug( "wgLDAPAutoAuthUsername and 
wgLDAPAutoAuthDomain is not null, adding hooks.", NONSENSITIVE );
$wgHooks['UserLoadAfterLoadFromSession'][] = 
'LdapAutoAuthentication::Authenticate';
 
-   $wgHooks['PersonalUrls'][] = 
'LdapAutoAuthentication::NoLogout'; /* Disallow logout link */
+   // Disallow logout link
+   $wgHooks['PersonalUrls'][] = 'LdapAutoAuthentication::NoLogout';
}
 }
diff --git a/LdapAuthenticationPlugin.php b/LdapAuthenticationPlugin.php
index a769257..aa04669 100644
--- a/LdapAuthenticationPlugin.php
+++ b/LdapAuthenticationPlugin.php
@@ -603,7 +603,6 @@
}
 
if ( $this->connect() ) {
-
$this->userdn = $this->getSearchString( $username );
 
// It is possible that getSearchString will return an
@@ -1516,7 +1515,6 @@
$usertopass = $this->userdn;
} else {
if ( $this->getConf( 
'GroupUseRetrievedUsername' ) && $this->LDAPUsername != '' ) {
-
$usertopass = $this->LDAPUsername;
} else {
$usertopass = $username;
@@ -1705,7 +1703,7 @@
}
 
$entries = LdapAuthenticationPlugin::ldap_get_entries( 
$this->ldapconn, $info );
-   if ( $entries ){
+   if ( $entries ) {
// We need to shift because the first entry will be a 
count
array_shift( $entries );
// Let's get a list of both full dn groups and 
shortname groups
@@ -1797,7 +1795,8 @@
# so as the user is currently not a 
member of the ldap group, he shall be removed from the local group
$user->removeGroup( $cGroup );
}
-   } else { # no, but maybe the user has recently been 
added to the ldap group?
+   } else {
+   # no, but maybe the user has recently been 
added to the ldap group?
$this->printDebug( "Checking to see if user is 
in: $cGroup", NONSENSITIVE );
if ( $this->hasLDAPGroup( $cGroup ) ) {
$this->printDebug( "Adding user to: 
$cGroup", NONSENSITIVE );
diff --git a/composer.json b/composer.json
index eed8ae7..00ef0de 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.10.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 18af257..c87ec1c 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,6 +2,9 @@
 


+   
+   
+   




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice6b2418ff5a6baf642b0a7952eaa866790c23c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LdapAuthentication
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...OpenStackManager[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: Ib7702d6a37df8222fe7b7e533e84e19d11dccbda
---
M OpenStackManager.php
M api/ApiNovaProjectLimits.php
M api/ApiNovaProjects.php
M api/ApiNovaServiceGroups.php
M composer.json
M includes/YamlContent.php
M maintenance/syncProjectGroups.php
M maintenance/updatedomains.php
M nova/OpenStackNovaController.php
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaSecondaryAuthenticationProvider.php
M nova/OpenStackNovaShellAccountNameRequest.php
M nova/OpenStackNovaUser.php
M phpcs.xml
M special/SpecialNovaAddress.php
M special/SpecialNovaKey.php
M special/SpecialNovaSudoer.php
17 files changed, 17 insertions(+), 24 deletions(-)

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



diff --git a/OpenStackManager.php b/OpenStackManager.php
index 0e0c738..2458f63 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -90,7 +90,7 @@
 $wgOpenStackManagerServiceGroupHomedirPattern = '/home/%p%u/';
 
 // Username for special observer user -- hidden
-//  from the OSM front end.
+// from the OSM front end.
 $wgOpenStackHiddenUsernames = [ 'novaobserver' ];
 
 // Key/value pairs like array( 'region1' => '10.4.0.11', 'region2' => 
'10.68.1.35' )
diff --git a/api/ApiNovaProjectLimits.php b/api/ApiNovaProjectLimits.php
index 2133776..b1f8769 100644
--- a/api/ApiNovaProjectLimits.php
+++ b/api/ApiNovaProjectLimits.php
@@ -69,7 +69,6 @@
}
$this->getResult()->addValue( null, 
$this->getModuleName(), [ 'regions' => $limitsOut ] );
}
-
}
 
// Face parameter.
diff --git a/api/ApiNovaProjects.php b/api/ApiNovaProjects.php
index a9b4fe4..09ee0f2 100644
--- a/api/ApiNovaProjects.php
+++ b/api/ApiNovaProjects.php
@@ -61,7 +61,6 @@
$this->getResult()->addValue( null, 
$this->getModuleName(), $data );
break;
}
-
}
 
// Face parameter.
diff --git a/api/ApiNovaServiceGroups.php b/api/ApiNovaServiceGroups.php
index d69d872..1daba6c 100644
--- a/api/ApiNovaServiceGroups.php
+++ b/api/ApiNovaServiceGroups.php
@@ -24,7 +24,6 @@
$this->getResult()->addValue( null, 
$this->getModuleName(), $data );
break;
}
-
}
 
// Face parameter.
diff --git a/composer.json b/composer.json
index a1adda4..6a20d4f 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.10.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/YamlContent.php b/includes/YamlContent.php
index 947bb15..0c45b75 100644
--- a/includes/YamlContent.php
+++ b/includes/YamlContent.php
@@ -44,7 +44,6 @@
return null;
}
return Spyc::YAMLDump( $decoded, 4, 0 );
-
}
 
/**
diff --git a/maintenance/syncProjectGroups.php 
b/maintenance/syncProjectGroups.php
index 5cc734c..d0cb94e 100644
--- a/maintenance/syncProjectGroups.php
+++ b/maintenance/syncProjectGroups.php
@@ -37,8 +37,8 @@
$attempt_count++;
 
// -1: failure
-   //  0: no change
-   //  1: successful sync
+   // 0: no change
+   // 1: successful sync
 
if ( $retval != 0 ) {
$this->output( ( $retval ? "Succeeded" : 
"Failed" )  . " syncing members for project $projectName and group " . 
$project->projectGroup->getProjectGroupName() );
diff --git a/maintenance/updatedomains.php b/maintenance/updatedomains.php
index f4e4e65..b99c6b5 100644
--- a/maintenance/updatedomains.php
+++ b/maintenance/updatedomains.php
@@ -65,7 +65,7 @@
}
}
}
-   } elseif ( $this->hasOption( 'name' ) )  {
+   } elseif ( $this->hasOption( 'name' ) ) {
if ( !$this->hasOption( 'region' ) ) {
$this->error( "--name requires --region.\n", 
true );
}
diff --git a/nova/OpenStackNovaController.php b/nova/OpenStackNovaController.php
index ef96e8d..eeacf52 100644
--- a/nova/OpenStackNovaController.php
+++ b/nova/OpenStackNovaController.php
@@ -199,7 +199,7 @@
$backendarray = explode( ':', $backends[0] );
 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I84149ff9f719902af04925b8d43a676ad6f81486
---
M composer.json
M includes/CentralAuthGroupMembershipProxy.php
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthUser.php
M includes/CreateLocalAccountJob.php
M includes/GlobalRename/GlobalRenameUserStatus.php
M includes/GlobalRename/GlobalUserMergeLogger.php
M includes/LocalRenameJob/LocalPageMoveJob.php
M includes/LocalRenameJob/LocalRenameJob.php
M includes/api/ApiQueryGlobalAllUsers.php
M includes/api/ApiQueryGlobalGroups.php
M includes/api/ApiQueryGlobalUserInfo.php
M includes/session/CentralAuthSessionProvider.php
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialGlobalGroupMembership.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalUserMerge.php
M includes/specials/SpecialGlobalUsers.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
M maintenance/checkLocalNames.php
M maintenance/checkLocalUser.php
M maintenance/deleteEmptyAccounts.php
M maintenance/migrateAccount.php
M maintenance/migratePass1.php
M maintenance/populateLocalAndGlobalIds.php
M maintenance/resetGlobalUserTokens.php
M maintenance/sendConfirmAndMigrateEmail.php
M phpcs.xml
M tests/phpunit/CentralAuthUserTest.php
33 files changed, 63 insertions(+), 77 deletions(-)

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



diff --git a/composer.json b/composer.json
index b8f68fb..4f55859 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.10.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/CentralAuthGroupMembershipProxy.php 
b/includes/CentralAuthGroupMembershipProxy.php
index c3d9c2c..8e8ad45 100644
--- a/includes/CentralAuthGroupMembershipProxy.php
+++ b/includes/CentralAuthGroupMembershipProxy.php
@@ -100,7 +100,7 @@
 */
function getGroupMemberships() {
$groups = $this->getGroups();
-   return array_combine( $groups, array_map( function( $group ) {
+   return array_combine( $groups, array_map( function ( $group ) {
return new UserGroupMembership( $this->getId(), $group 
);
}, $groups ) );
}
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 0236011..60ef39d 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -345,7 +345,7 @@
 * @return bool
 */
static function onSpecialPasswordResetOnSubmit( &$users, $data, 
&$abortError ) {
-   if ( count( $users ) == 0 || !$users[0] instanceof User ){
+   if ( count( $users ) == 0 || !$users[0] instanceof User ) {
// We can't handle this
return true;
}
@@ -580,7 +580,7 @@
}
 
$username = $user->getName();
-   DeferredUpdates::addCallableUpdate( function() use ( $username 
) {
+   DeferredUpdates::addCallableUpdate( function () use ( $username 
) {
$centralUser = 
CentralAuthUser::getMasterInstanceByName( $username );
if ( $centralUser->exists() ) {
$centralUser->resetAuthToken();
diff --git a/includes/CentralAuthPlugin.php b/includes/CentralAuthPlugin.php
index f58468b..43c5fad 100644
--- a/includes/CentralAuthPlugin.php
+++ b/includes/CentralAuthPlugin.php
@@ -213,8 +213,8 @@
 
$central = CentralAuthUser::getMasterInstance( $user );
if ( $central->exists() && $central->isAttached() &&
-   $central->getEmail() != $user->getEmail() )
-   {
+   $central->getEmail() != $user->getEmail()
+   ) {
$user->setEmail( $central->getEmail() );
$user->mEmailAuthenticated = 
$central->getEmailAuthenticationTimestamp();
$user->saveSettings();
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 903138d..70528b9 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -1839,7 +1839,6 @@
$engine->send( $rc, $formatter->getLine( 
$userpage, $wikiID ) 

[MediaWiki-commits] [Gerrit] mediawiki...SyntaxHighlight_GeSHi[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: Ie3c4add8601ace14b6ff956e1fb451bc2d379860
---
M SyntaxHighlight.GeSHi.php
M SyntaxHighlight.ace.php
M SyntaxHighlight.class.php
M composer.json
M phpcs.xml
5 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/SyntaxHighlight.GeSHi.php b/SyntaxHighlight.GeSHi.php
index f98ea96..b66ecad 100644
--- a/SyntaxHighlight.GeSHi.php
+++ b/SyntaxHighlight.GeSHi.php
@@ -37,4 +37,3 @@
return $this->html;
}
 }
-
diff --git a/SyntaxHighlight.ace.php b/SyntaxHighlight.ace.php
index 712153d..54991f3 100644
--- a/SyntaxHighlight.ace.php
+++ b/SyntaxHighlight.ace.php
@@ -19,8 +19,7 @@
 /**
  * Class provides functionality to map Ace lexer definitions
  */
-class SyntaxHighlightAce
-{
+class SyntaxHighlightAce {
/** @var array This map is inverted, because it is easier to maintain 
this way */
private static $aceLexers = [
'ABAP' => [ 'abap' ],
@@ -105,7 +104,7 @@
'Nix'  => [ 'nix', 'nixos' ],
'NSIS' => [ 'nsis', 'nsi', 'nsh' ],
'ObjectiveC'   => [ 'objectivec', 'objective-c', 'obj-c', 
'objc',
-   'objective-c++', 'objectivec++', 'obj-c++', 
'objc++' ],
+   'objective-c++', 'objectivec++', 'obj-c++', 'objc++' ],
'OCaml'=> [ 'ocaml' ],
'Pascal'   => [ 'pascal', 'delphi', 'pas', 'objectpascal' ],
'Perl' => [ 'perl', 'pl', 'perl6', 'pl6' ],
diff --git a/SyntaxHighlight.class.php b/SyntaxHighlight.class.php
index f941e33..c0fe27d 100644
--- a/SyntaxHighlight.class.php
+++ b/SyntaxHighlight.class.php
@@ -304,7 +304,7 @@
replace this with "$process->run(); $output = 
$process->getOutput();"
*/
$output = '';
-   $process->run( function( $type, $capturedOutput ) use ( 
&$output ) {
+   $process->run( function ( $type, $capturedOutput ) use 
( &$output ) {
$output .= $capturedOutput;
} );
 
@@ -324,7 +324,6 @@
 
$status->value = $output;
return $status;
-
}
 
/**
@@ -404,8 +403,8 @@
 * @since MW 1.21
 */
public static function onContentGetParserOutput( Content $content, 
Title $title,
-   $revId, ParserOptions $options, $generateHtml, 
ParserOutput &$output ) {
-
+   $revId, ParserOptions $options, $generateHtml, ParserOutput 
&$output
+   ) {
global $wgParser, $wgTextModelsToParse;
 
if ( !$generateHtml ) {
@@ -551,4 +550,3 @@
}
 }
 class_alias( SyntaxHighlight::class, 'SyntaxHighlight_GeSHi' );
-
diff --git a/composer.json b/composer.json
index a708409..30617df 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "mediawiki/mediawiki-codesniffer": "0.10.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"license": "GPL-2.0+",
diff --git a/phpcs.xml b/phpcs.xml
index b21da71..597e3a3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,10 @@
 
 
-   
+   
+   
+   
+   
+   
.



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3c4add8601ace14b6ff956e1fb451bc2d379860
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...timeline[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: Ie083ee067f91c141fb8d13a9fa29dc702e6210da
---
M Timeline.body.php
M Timeline.php
M composer.json
M phpcs.xml
4 files changed, 17 insertions(+), 10 deletions(-)

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



diff --git a/Timeline.body.php b/Timeline.body.php
index a69a744..3603279 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -79,12 +79,15 @@
$tmpFile = TempFSFile::factory( 'timeline_' );
if ( $tmpFile ) {
$tmpPath = $tmpFile->getPath();
-   file_put_contents( $tmpPath, $timelinesrc ); // 
store plot data to file
+   // store plot data to file
+   file_put_contents( $tmpPath, $timelinesrc );
 
-   $filesCollect = []; // temp files to clean up
+   // temp files to clean up
+   $filesCollect = [];
foreach ( [ 'map', 'png', 'svg', 'err' ] as 
$ext ) {
$fileCollect = new TempFSFile( 
"{$tmpPath}.{$ext}" );
-   $fileCollect->autocollect(); // clean 
this up
+   // clean this up
+   $fileCollect->autocollect();
$filesCollect[] = $fileCollect;
}
 
@@ -148,12 +151,14 @@
}
}
if ( !$backend->doQuickOperations( $ops 
)->isOK() ) {
+   // FIXME Hard coded english text
return "Timeline error. "
-   . "Could not store output 
files"; // ugh
+   . "Could not store output 
files";
}
} else {
+   // FIXME Hard coded english text
return "Timeline error. "
-   . "Could not create temp 
file"; // ugh
+   . "Could not create temp 
file";
}
 
if ( $ret == "" || $retVal > 0 ) {
diff --git a/Timeline.php b/Timeline.php
index 2226c97..b7a2aeb 100644
--- a/Timeline.php
+++ b/Timeline.php
@@ -5,7 +5,8 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['Timeline'] = __DIR__ . '/i18n';
 /* wfWarn(
-   'Deprecated PHP entry point used for Timeline extension. Please 
use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for Timeline extension. ' .
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
);
 */
@@ -13,4 +14,3 @@
 } else {
die( 'This version of the Timeline extension requires MediaWiki 1.28+' 
);
 }
-
diff --git a/composer.json b/composer.json
index 3e676f3..1366381 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "mediawiki/mediawiki-codesniffer": "0.10.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 3e4aafb..18ef00c 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,9 +1,11 @@
 
 
-   
+   
+   
+   
.

-   
+   
vendor/
node_modules/
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie083ee067f91c141fb8d13a9fa29dc702e6210da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...AbuseFilter[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I5f37c45d748d5f0da21aceaef32cc89367e312ff
---
M AbuseFilter.hooks.php
M Views/AbuseFilterViewEdit.php
M Views/AbuseFilterViewExamine.php
M Views/AbuseFilterViewList.php
M Views/AbuseFilterViewTestBatch.php
M composer.json
M includes/AFComputedVariable.php
M includes/AbuseFilter.class.php
M includes/parser/AbuseFilterTokenizer.php
M phpcs.xml
M tests/legacyParserTest.php
11 files changed, 43 insertions(+), 43 deletions(-)

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



diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index 3b88509..55be162 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -49,8 +49,8 @@
 * @return bool Always true
 */
public static function onEditFilterMergedContent( IContextSource 
$context, Content $content,
-   Status $status, $summary, User $user, $minoredit ) {
-
+   Status $status, $summary, User $user, $minoredit
+   ) {
$text = AbuseFilter::contentToString( $content );
 
$filterStatus = self::filterEdit( $context, $content, $text, 
$status, $summary, $minoredit );
@@ -75,8 +75,8 @@
 * @return Status
 */
public static function filterEdit( IContextSource $context, $content, 
$text,
-   Status $status, $summary, $minoredit ) {
-
+   Status $status, $summary, $minoredit
+   ) {
$title = $context->getTitle();
 
self::$successful_action_vars = false;
@@ -507,7 +507,7 @@
 
$tags = $cache->getWithSetCallback(
// Key to store the cached value under
-   $cache->makeKey( self::FETCH_ALL_TAGS_KEY, (int) 
$enabled ),
+   $cache->makeKey( self::FETCH_ALL_TAGS_KEY, 
(int)$enabled ),
 
// Time-to-live (in seconds)
$cache::TTL_MINUTE,
@@ -648,11 +648,11 @@
} else {
/*
$updater->addExtensionUpdate( array(
-'modifyField',
-'abuse_filter_log',
-'afl_namespace',
-
"$dir/db_patches/patch-afl-namespace_int.sqlite.sql",
-true
+   'modifyField',
+   'abuse_filter_log',
+   'afl_namespace',
+   
"$dir/db_patches/patch-afl-namespace_int.sqlite.sql",
+   true
) );
 */
/* @todo Modify a column in sqlite, which do 
not support such
diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php
index e2f3de2..7b14c21 100644
--- a/Views/AbuseFilterViewEdit.php
+++ b/Views/AbuseFilterViewEdit.php
@@ -157,11 +157,11 @@
// Check for restricted actions
global $wgAbuseFilterRestrictions;
if ( count( array_intersect_key(
-array_filter( 
$wgAbuseFilterRestrictions ),
-array_merge(
-array_filter( $actions 
),
-array_filter( 
$origActions )
-)
+   array_filter( 
$wgAbuseFilterRestrictions ),
+   array_merge(
+   array_filter( $actions ),
+   array_filter( $origActions )
+   )
) )
&& !$user->isAllowed( 
'abusefilter-modify-restricted' )
) {
@@ -217,11 +217,11 @@
 
// T67807
// integer 1's & 0's might be better understood than 
booleans
-   $newRow['af_enabled'] = (int) $newRow['af_enabled'];
-   $newRow['af_hidden'] = (int) $newRow['af_hidden'];
-   $newRow['af_throttled'] = (int) $newRow['af_throttled'];
-   $newRow['af_deleted'] = (int) $newRow['af_deleted'];
-   $newRow['af_global'] = (int) $newRow['af_global'];
+   

[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Break long lines

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

Change subject: Break long lines
..


Break long lines

Organize phpcs.xml a bit

Change-Id: I0f738528bcddb7ed9d49f7476db89af7f77fac28
---
M api/ApiQueryCheckUser.php
M composer.json
M maintenance/importCheckUserLogs.php
M maintenance/populateCheckUserTable.php
M phpcs.xml
M specials/SpecialCheckUser.php
6 files changed, 89 insertions(+), 42 deletions(-)

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



diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php
index 2865c2e..40815c3 100644
--- a/api/ApiQueryCheckUser.php
+++ b/api/ApiQueryCheckUser.php
@@ -40,7 +40,10 @@
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError( 
'apierror-checkuser-timelimit', 'invalidtime' );
} else {
-   $this->dieUsage( 'You need use correct time 
limit (like "-2 weeks" or "2 weeks ago")', 'invalidtime' );
+   $this->dieUsage(
+   'You need use correct time limit (like 
"-2 weeks" or "2 weeks ago")',
+   'invalidtime'
+   );
}
}
 
@@ -54,7 +57,9 @@
$user_id = User::idFromName( $target );
if ( !$user_id ) {
if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
-   $this->dieWithError( [ 
'nosuchusershort', wfEscapeWikiText( $target ) ], 'nosuchuser' );
+   $this->dieWithError(
+   [ 'nosuchusershort', 
wfEscapeWikiText( $target ) ], 'nosuchuser'
+   );
} else {
$this->dieUsage( 'Target user 
does not exist', 'nosuchuser' );
}
@@ -114,7 +119,9 @@
$user_id = User::idFromName( $target );
if ( !$user_id ) {
if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
-   $this->dieWithError( [ 
'nosuchusershort', wfEscapeWikiText( $target ) ], 'nosuchuser' );
+   $this->dieWithError(
+   [ 
'nosuchusershort', wfEscapeWikiText( $target ) ], 'nosuchuser'
+   );
} else {
$this->dieUsage( 
'Target user does not exist', 'nosuchuser' );
}
diff --git a/composer.json b/composer.json
index 1117040..8d267da 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor",
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
"phpcs -p -s"
],
"fix": "phpcbf"
diff --git a/maintenance/importCheckUserLogs.php 
b/maintenance/importCheckUserLogs.php
index cb74f5f..03c4704 100644
--- a/maintenance/importCheckUserLogs.php
+++ b/maintenance/importCheckUserLogs.php
@@ -52,11 +52,16 @@
$line = str_replace( "\0", '', $line );
 
$regexes = [
-   'ipedits-xff' => "!^$rxTimestamp, $rxUser got edits 
for XFF $rxTarget on $rxWiki$rxReason!",
-   'ipedits' => "!^$rxTimestamp, $rxUser got edits 
for" . " $rxTarget on $rxWiki$rxReason!",
-   'ipusers-xff' => "!^$rxTimestamp, $rxUser got users 
for XFF $rxTarget on $rxWiki$rxReason!",
-   'ipusers' => "!^$rxTimestamp, $rxUser got users 
for" . " $rxTarget on $rxWiki$rxReason!",
-   'userips' => "!^$rxTimestamp, $rxUser got IPs 
for" .   " $rxTarget on $rxWiki$rxReason!",
+   'ipedits-xff' => "!^$rxTimestamp, $rxUser got edits 
for XFF " .
+   "$rxTarget on $rxWiki$rxReason!",
+   'ipedits' => "!^$rxTimestamp, $rxUser got edits 
for" .
+   " $rxTarget on $rxWiki$rxReason!",
+   'ipusers-xff' => "!^$rxTimestamp, $rxUser got users 
for XFF " .
+   "$rxTarget on $rxWiki$rxReason!",
+   'ipusers' => "!^$rxTimestamp, $rxUser got users 

[MediaWiki-commits] [Gerrit] mediawiki...EventBus[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I0d1ef4230478b9d746e149b8afabb6d5734c849c
---
M EventBus.hooks.php
M EventBusRCFeedEngine.php
M composer.json
M phpcs.xml
4 files changed, 16 insertions(+), 15 deletions(-)

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



diff --git a/EventBus.hooks.php b/EventBus.hooks.php
index f7b376a..4c70214 100644
--- a/EventBus.hooks.php
+++ b/EventBus.hooks.php
@@ -36,7 +36,7 @@
[ 'tags' => $tags ]
);
 
-   DeferredUpdates::addCallableUpdate( function() use ( $event ) {
+   DeferredUpdates::addCallableUpdate( function () use ( $event ) {
EventBus::getInstance()->send( [ $event ] );
} );
}
@@ -71,7 +71,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -132,7 +132,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -189,7 +189,7 @@
$attrs
);
 
-   DeferredUpdates::addCallableUpdate( function() use ( $events ) {
+   DeferredUpdates::addCallableUpdate( function () use ( $events ) 
{
EventBus::getInstance()->send( $events );
} );
}
@@ -262,7 +262,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -376,7 +376,7 @@
}
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -434,7 +434,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -548,7 +548,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -615,7 +615,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
@@ -661,7 +661,7 @@
);
 
DeferredUpdates::addCallableUpdate(
-   function() use ( $events ) {
+   function () use ( $events ) {
EventBus::getInstance()->send( $events );
}
);
diff --git a/EventBusRCFeedEngine.php b/EventBusRCFeedEngine.php
index 0771dcf..8fdd642 100644
--- a/EventBusRCFeedEngine.php
+++ b/EventBusRCFeedEngine.php
@@ -26,7 +26,7 @@
 */
public function send( array $feed, $line ) {
DeferredUpdates::addCallableUpdate(
-   function() use ( $feed, $line ) {
+   function () use ( $feed, $line ) {
// construct EventBus config from RCFeed $feed 
uri.
$config = $feed;
// RCFeedEngines are selected via URI protocol 
schemes.  This engine
diff --git a/composer.json b/composer.json
index f9ef91b..f251a24 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"minimum-stability": "dev",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "mediawiki/mediawiki-codesniffer": "0.10.0",

[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: I32e5f186d1d89b4e4c20c84733c7aa5a52e52cfc
---
M api/ApiRevisionUpdate.php
M backend/CodeComment.php
M backend/CodeRevision.php
M backend/DiffHighlighter.php
M composer.json
M phpcs.xml
M ui/CodeCommentsListView.php
M ui/CodeRevisionCommitter.php
8 files changed, 12 insertions(+), 11 deletions(-)

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



diff --git a/api/ApiRevisionUpdate.php b/api/ApiRevisionUpdate.php
index b4e9c12..69bf1d3 100644
--- a/api/ApiRevisionUpdate.php
+++ b/api/ApiRevisionUpdate.php
@@ -30,7 +30,7 @@
$this->checkUserRightsAny( 'codereview-use' );
} else {
if ( !$user->isAllowed( 'codereview-use' ) ) {
-$this->dieUsage( 'You don\'t have permission 
to update code', 'permissiondenied' );
+   $this->dieUsage( 'You don\'t have permission to 
update code', 'permissiondenied' );
}
}
 
@@ -51,8 +51,7 @@
if (
!$wgCodeReviewInlineComments
&& isset( $params['patchline'] )
-   )
-   {
+   ) {
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError(

'apierror-codereview-inlinecommentingdisabled', 'inlinecommentingdisabled' );
diff --git a/backend/CodeComment.php b/backend/CodeComment.php
index 5517e44..abf0e10 100644
--- a/backend/CodeComment.php
+++ b/backend/CodeComment.php
@@ -52,7 +52,7 @@
'cc_timestamp',
'cc_sortkey'
],
-   [ 'cc_id' => (int) $cc_id ],
+   [ 'cc_id' => (int)$cc_id ],
__METHOD__
);
return self::newFromRow( $rev, $row );
diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php
index 1424c0d..a65b4c7 100644
--- a/backend/CodeRevision.php
+++ b/backend/CodeRevision.php
@@ -516,7 +516,6 @@
 
// Notify commenters and revision author of 
followup revision
foreach ( $users as $user ) {
-
/**
 * @var $user User
 */
diff --git a/backend/DiffHighlighter.php b/backend/DiffHighlighter.php
index 380e8b4..f7d5f3d 100644
--- a/backend/DiffHighlighter.php
+++ b/backend/DiffHighlighter.php
@@ -95,9 +95,9 @@
function formatLine( $content, $class = null ) {
if ( $class === null ) {
return Html::rawElement( 'tr', $this->getLineIdAttr(),
- Html::element( 'td', [ 'class' => 
'linenumbers' ], $this->left )
-   . Html::element( 'td', [ 'class' => 
'linenumbers' ], $this->right )
-   . Html::rawElement( 'td', [], 
Html::element( 'span', [], $content ) )
+   Html::element( 'td', [ 'class' => 'linenumbers' 
], $this->left ) .
+   Html::element( 'td', [ 'class' => 
'linenumbers' ], $this->right ) .
+   Html::rawElement( 'td', [], 
Html::element( 'span', [], $content ) )
);
}
 
diff --git a/composer.json b/composer.json
index b8f68fb..4f55859 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.10.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index ab68c68..b046d4c 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -3,6 +3,9 @@



+   
+   
+   

.

diff --git a/ui/CodeCommentsListView.php b/ui/CodeCommentsListView.php
index d09bfa3..6d967be 100644
--- a/ui/CodeCommentsListView.php
+++ b/ui/CodeCommentsListView.php
@@ -38,7 +38,7 @@
$query['conds']['cc_user_text'] = User::newFromName( 
$this->mView->mAuthor )->getName();
}
 
-   return $query;
+   return $query;
}
 
function getCountQuery() {
diff --git a/ui/CodeRevisionCommitter.php 

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

Change-Id: If7a1eb8217d47a56ccab1a2821f609d776805aa5
---
M ProofreadPage.body.php
M SpecialProofreadPages.php
M composer.json
M includes/ProofreadPageInit.php
M includes/index/ProofreadIndexEntry.php
M includes/index/ProofreadIndexPage.php
M includes/page/EditPagePage.php
M includes/page/PageContentBuilder.php
M includes/page/ProofreadPagePage.php
M maintenance/fixProofreadIndexPagesContentModel.php
M maintenance/fixProofreadPagePagesContentModel.php
M phpcs.xml
12 files changed, 25 insertions(+), 29 deletions(-)

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



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index c279c67..4d493c6 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -388,7 +388,8 @@
if ( $ot->inNamespace( self::getPageNamespaceId() ) ) {
self::updateIndexOfPage( $ot );
} elseif ( $ot->inNamespace( self::getIndexNamespaceId() )
- && !$nt->inNamespace( self::getIndexNamespaceId() ) ) 
{
+   && !$nt->inNamespace( self::getIndexNamespaceId() )
+   ) {
// The page is moved out of the Index namespace.
// Remove all index data associated with that page.
 
@@ -585,8 +586,8 @@
 * @return bool
 */
public static function onEditFilterMergedContent( IContextSource 
$context, Content $content,
-   Status $status, $summary, User $user, $minoredit ) {
-
+   Status $status, $summary, User $user, $minoredit
+   ) {
// If the content's model isn't ours, ignore this; there's 
nothing for us to do here.
if ( !( $content instanceof PageContent ) ) {
return true;
@@ -649,7 +650,6 @@
 * @return bool
 */
public static function onGetPreferences( $user, &$preferences ) {
-
// Show header and footer fields when editing in the Page 
namespace
$preferences['proofreadpage-showheaders'] = [
'type'   => 'toggle',
@@ -751,7 +751,7 @@
}
}
catch ( FileNotFoundException $e ) {
-}
+   }
 
// Prev, Next and Index links
$indexPage = $page->getIndex();
@@ -770,7 +770,7 @@
];
}
catch ( OutOfBoundsException $e ) {
-  } // if the previous page does not exits
+   } // if the previous page does not exits
 
try {
$nextPage  = $pagination->getPage( 
$pageNumber + 1 );
@@ -782,10 +782,10 @@
];
}
catch ( OutOfBoundsException $e ) {
-  } // if the next page does not exits
+   } // if the next page does not exits
}
catch ( PageNotInPaginationException $e ) {
- }
+   }
 
$links['namespaces']['proofreadPageIndexLink'] = [
'class' => ( $skin->skinname === 'vector' ) ? 
'icon' : '',
@@ -864,7 +864,7 @@
global $wgContentHandlers;
 
// L10n
-   include_once ( __DIR__ . '/ProofreadPage.namespaces.php' );
+   include_once __DIR__ . '/ProofreadPage.namespaces.php';
 
// Content handler
define( 'CONTENT_MODEL_PROOFREAD_PAGE', 'proofread-page' );
diff --git a/SpecialProofreadPages.php b/SpecialProofreadPages.php
index a457d61..4b5e4fc 100644
--- a/SpecialProofreadPages.php
+++ b/SpecialProofreadPages.php
@@ -46,7 +46,6 @@
$this->suppressSqlOffset = false;
 
if ( !$wgDisableTextSearch ) {
-
if ( !$this->including() ) {
// Only show the search form when not including 
in another page.
$output->addHTML( $this->getSearchForm() );
diff --git a/composer.json b/composer.json
index 412c464..b5e294c 100644
--- a/composer.json
+++ b/composer.json
@@ -9,13 +9,13 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "mediawiki/mediawiki-codesniffer": "0.10.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": 

[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.8.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.8.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.8.1

Update to 0.10.0 is blocked by T167168

Change-Id: If1f0e881605f38af11ed88444df843bcbd9d1572
---
M Collection.body.php
M Collection.hooks.php
M Collection.php
M Collection.suggest.php
M RenderingAPI.php
M composer.json
M phpcs.xml
M templates/CollectionFailedTemplate.php
M templates/CollectionFinishedTemplate.php
9 files changed, 14 insertions(+), 18 deletions(-)

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



diff --git a/Collection.body.php b/Collection.body.php
index 6df7bb6..4a1af42 100644
--- a/Collection.body.php
+++ b/Collection.body.php
@@ -194,8 +194,9 @@
return;
}
if ( !CollectionSession::countArticles()
-|| $request->getVal( 'overwrite' )
-|| $request->getVal( 'append' ) ) {
+   || $request->getVal( 'overwrite' )
+   || $request->getVal( 'append' )
+   ) {
$collection = $this->loadCollection( 
$title, $request->getVal( 'append' ) );
if ( $collection ) {

CollectionSession::startSession();
@@ -597,7 +598,6 @@
 * @return bool
 */
public static function addArticle( $title, $oldid = 0 ) {
-
$latest = $title->getLatestRevID();
 
$currentVersion = 0;
diff --git a/Collection.hooks.php b/Collection.hooks.php
index 797e87f..4cc5423 100644
--- a/Collection.hooks.php
+++ b/Collection.hooks.php
@@ -145,9 +145,9 @@
if ( $action == 'view' || $action == 'purge' ) {
if ( !$sk->getOutput()->isPrintable() ) {
$out[] = [ 'text' => $sk->msg( 
'printableversion' )->text(),
-   'id' => 't-print',
-   'href' => $title->getLocalURL( 
[ 'printable' => 'yes' ] )
-   ];
+   'id' => 't-print',
+   'href' => $title->getLocalURL( [ 
'printable' => 'yes' ] )
+   ];
}
}
 
@@ -280,7 +280,7 @@
'class' => 'collection-creatorbox-row',
],
self::getBookCreatorBoxContent( $title, 
$addRemoveState, $oldid )
-   );
+   );
 
$html .= Xml::closeElement( 'div' );
return $html;
@@ -376,7 +376,6 @@
],
$query
);
-
}
 
/**
diff --git a/Collection.php b/Collection.php
index 53cea55..d48ac80 100644
--- a/Collection.php
+++ b/Collection.php
@@ -196,7 +196,6 @@
 
 $wgAutoloadClasses['CollectionRenderingAPI'] = __DIR__ . '/RenderingAPI.php';
 $wgAutoloadClasses['MWServeRenderingAPI'] = __DIR__ . '/RenderingAPI.php';
-$wgAutoloadClasses['NewRenderingAPI'] = __DIR__ . '/RenderingAPI.php';
 $wgAutoloadClasses['CollectionAPIResult'] = __DIR__ . '/RenderingAPI.php';
 
 $wgMessagesDirs['Collection'] = __DIR__ . '/i18n';
diff --git a/Collection.suggest.php b/Collection.suggest.php
index 6f45d4a..b796989 100644
--- a/Collection.suggest.php
+++ b/Collection.suggest.php
@@ -114,7 +114,7 @@
// remove the suggestion data from the session
public static function clear() {
if ( isset( $_SESSION['wsCollectionSuggestBan'] ) ) {
-   unset( $_SESSION['wsCollectionSuggestBan'] );
+   unset( $_SESSION['wsCollectionSuggestBan'] );
}
if ( isset( $_SESSION['wsCollectionSuggestProp'] ) ) {
unset( $_SESSION['wsCollectionSuggestProp'] );
diff --git a/RenderingAPI.php b/RenderingAPI.php
index 1add33b..96a6594 100644
--- a/RenderingAPI.php
+++ b/RenderingAPI.php
@@ -313,10 +313,6 @@
}
 }
 
-/*
-class NewRenderingAPI extends CollectionRenderingAPI {}
-*/
-
 /**
  * A wrapper for data returned by the API
  */
diff --git a/composer.json b/composer.json
index a97066e..f537847 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.8.1"
},

[MediaWiki-commits] [Gerrit] mediawiki...WikiLexicalData[master]: Remove eclipse helper

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

Change subject: Remove eclipse helper
..


Remove eclipse helper

Was removed in core back in 2011 -
https://phabricator.wikimedia.org/rMW2e7d867478f1c9a34994236555bc493535da5da8


Change-Id: I2b8e9eb33495dbd86d6e4d77d8aa274134056ad9
---
M includes/api/ApiWikiData.php
M includes/api/ApiWikiDataFormatBase.php
M includes/api/ApiWikiDataFormatXml.php
3 files changed, 0 insertions(+), 15 deletions(-)

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



diff --git a/includes/api/ApiWikiData.php b/includes/api/ApiWikiData.php
index e10bcfe..4d29b50 100644
--- a/includes/api/ApiWikiData.php
+++ b/includes/api/ApiWikiData.php
@@ -23,11 +23,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
  
-if ( !defined( 'MEDIAWIKI' ) ) {
-   // Eclipse helper - will be ignored in production
-   require_once ( 'ApiBase.php' );
-}
-
 class ApiWikiData extends ApiBase {

private $printer;
diff --git a/includes/api/ApiWikiDataFormatBase.php 
b/includes/api/ApiWikiDataFormatBase.php
index 0a479ce..0b71bb4 100644
--- a/includes/api/ApiWikiDataFormatBase.php
+++ b/includes/api/ApiWikiDataFormatBase.php
@@ -24,11 +24,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   // Eclipse helper - will be ignored in production
-   require_once ( 'ApiFormatBase.php' );
-}
-
 abstract class ApiWikiDataFormatBase extends ApiFormatBase {
 
protected $dmRecords;
diff --git a/includes/api/ApiWikiDataFormatXml.php 
b/includes/api/ApiWikiDataFormatXml.php
index 876909d..c999f30 100644
--- a/includes/api/ApiWikiDataFormatXml.php
+++ b/includes/api/ApiWikiDataFormatXml.php
@@ -24,11 +24,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   // Eclipse helper - will be ignored in production
-   require_once ( 'ApiFormatBase.php' );
-}
-
 class ApiWikiDataFormatXml extends ApiWikiDataFormatBase {
 
private $mRootElemName = 'wikidata';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b8e9eb33495dbd86d6e4d77d8aa274134056ad9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...Favorites[master]: Remove eclipse helper

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

Change subject: Remove eclipse helper
..


Remove eclipse helper

Was removed in core back in 2011 -
https://phabricator.wikimedia.org/rMW2e7d867478f1c9a34994236555bc493535da5da8

Change-Id: I8fd54f84e9f83c5574e0022e1e16abc6ac708aca
---
M api/ApiFavorite.php
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/api/ApiFavorite.php b/api/ApiFavorite.php
index b3e5df2..427701a 100644
--- a/api/ApiFavorite.php
+++ b/api/ApiFavorite.php
@@ -1,10 +1,5 @@
 https://gerrit.wikimedia.org/r/364085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fd54f84e9f83c5574e0022e1e16abc6ac708aca
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Favorites
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...Wikibase[master]: Phan: ignore PhanUndeclaredConstant

2017-07-09 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363828 )

Change subject: Phan: ignore PhanUndeclaredConstant
..


Phan: ignore PhanUndeclaredConstant

repo/Wikibase.i18n.namespaces.php dynamically generates constant
whenever they are missing. Something Phan can not catch.

Bug: T169980
Change-Id: Ieb3a8357d4d1f9435c47b09c74edc3995ba165e7
---
M tests/phan/config.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Ladsgroup: Verified; Looks good to me, approved
  Addshore: Looks good to me, approved



diff --git a/tests/phan/config.php b/tests/phan/config.php
index aa05e75..e08ded8 100644
--- a/tests/phan/config.php
+++ b/tests/phan/config.php
@@ -352,6 +352,8 @@
"PhanUndeclaredClassConstant",
// approximate error count: 14
"PhanUndeclaredClassMethod",
+   // approximate error count: 54
+   "PhanUndeclaredConstant",
// approximate error count: 139
"PhanUndeclaredMethod",
// approximate error count: 25

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb3a8357d4d1f9435c47b09c74edc3995ba165e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   >