[MediaWiki-commits] [Gerrit] translatewiki[master]: Support %1 as insertables for the Kiwix Project

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325917 )

Change subject: Support %1 as insertables for the Kiwix Project
..


Support %1 as insertables for the Kiwix Project

Bug: T150243
Change-Id: Ia5743bb0d1e3e6b25403495391083d36956343c2
---
M groups/Kiwix/Kiwix.yaml
A groups/Kiwix/KiwixInsertablesSuggester.php
2 files changed, 37 insertions(+), 0 deletions(-)

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



diff --git a/groups/Kiwix/Kiwix.yaml b/groups/Kiwix/Kiwix.yaml
index 3466f89..e5a69bd 100644
--- a/groups/Kiwix/Kiwix.yaml
+++ b/groups/Kiwix/Kiwix.yaml
@@ -15,3 +15,9 @@
   optional:
 - "*.accesskey"
 - ui.main.cssdirection
+
+INSERTABLES:
+  class: KiwixInsertablesSuggester
+
+AUTOLOAD:
+  KiwixInsertablesSuggester: KiwixInsertablesSuggester.php
diff --git a/groups/Kiwix/KiwixInsertablesSuggester.php 
b/groups/Kiwix/KiwixInsertablesSuggester.php
new file mode 100644
index 000..d0cc506
--- /dev/null
+++ b/groups/Kiwix/KiwixInsertablesSuggester.php
@@ -0,0 +1,31 @@
+https://gerrit.wikimedia.org/r/325917
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5743bb0d1e3e6b25403495391083d36956343c2
Gerrit-PatchSet: 3
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: MtDu 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make DifferenceEngine's markPatrolledLink and getRevisionHea...

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326075 )

Change subject: Make DifferenceEngine's markPatrolledLink and getRevisionHeader 
public so that hooked functions can use them where needed
..

Make DifferenceEngine's markPatrolledLink and getRevisionHeader public so that 
hooked functions can use them where needed

The said hooks were added to core in
https://gerrit.wikimedia.org/r/#/c/298026/ . One of the many intended use
cases is https://gerrit.wikimedia.org/r/#/c/326074/ which currently fatals
due to these two being protected, and obviously we don't want to lose
functionality when hooking into one (or more) of the aforementioned hooks.

Change-Id: I260c8b57c0bb2af3a6982bd7142b112a4a023391
---
M includes/diff/DifferenceEngine.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index bd65fb4..736353b 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -481,7 +481,7 @@
 *
 * @return string HTML or empty string
 */
-   protected function markPatrolledLink() {
+   public function markPatrolledLink() {
if ( $this->mMarkPatrolledLink === null ) {
$linkInfo = $this->getMarkPatrolledLinkInfo();
// If false, there is no patrol link needed/allowed
@@ -1064,7 +1064,7 @@
 *
 * @return string HTML fragment
 */
-   protected function getRevisionHeader( Revision $rev, $complete = '' ) {
+   public function getRevisionHeader( Revision $rev, $complete = '' ) {
$lang = $this->getLanguage();
$user = $this->getUser();
$revtimestamp = $rev->getTimestamp();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I260c8b57c0bb2af3a6982bd7142b112a4a023391
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] mediawiki...SocialProfile[master]: Avatars in page diff views

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326074 )

Change subject: Avatars in page diff views
..

Avatars in page diff views

Requires MW 1.28 or newer.

Based on code written by Scott Cushman for wikiHow with some tweaks by me
for SocialProfile.

Change-Id: I296c11cd64cd405df78b052604d8a9047679941e
---
A UserProfile/AvatarsInDiffs.css
M UserProfile/UserProfile.php
M UserProfile/UserProfileHooks.php
3 files changed, 207 insertions(+), 0 deletions(-)


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

diff --git a/UserProfile/AvatarsInDiffs.css b/UserProfile/AvatarsInDiffs.css
new file mode 100644
index 000..c797f73
--- /dev/null
+++ b/UserProfile/AvatarsInDiffs.css
@@ -0,0 +1,83 @@
+/* All the interesting bits and pieces from wikiHow's /skins/common/diff.css
+ * @date 25 April 2015
+ */
+table.diff {
+   font-size: .8em;
+}
+
+table.diff td {
+   text-align: left;
+}
+
+table.diff,
+table.diff td.diff-otitle,
+table.diff td.diff-ntitle {
+   background-color: #FFF;
+}
+
+#mw-diff-otitle1,
+#mw-diff-ntitle1 {
+   text-align: center;
+}
+
+td.diff-addedline .diffchange,
+td.diff-deletedline .diffchange {
+   border-radius: 0.33em;
+}
+
+table.diff col.diff-marker {
+   /* changed from percentages to pixels to fix table-layout:fixed bug in 
IE9 with diff table */
+   width: 2%;
+}
+
+table.diff col.diff-content {
+   /* changed from percentages to pixels to fix table-layout:fixed bug in 
IE9 with diff table */
+   width: 48%;
+}
+
+table.diff td.diff-multi {
+   text-align: center;
+}
+
+table.diff td div {
+   /* As fallback, scrollbars will be added for very wide cells
+  instead of text overflowing or widening */
+   overflow: auto;
+   max-width: 305px;
+}
+
+.rccomment {
+   font-weight: bold;
+   clear: both;
+   padding-top: 1em;
+}
+
+.rccomment_middle table {
+   width: 100%;
+}
+
+.rccomment_middle td.avatar {
+   width: 20px;
+}
+
+table.diff h4 {
+   font-size: 14px;
+   background: none;
+   padding: 0;
+   margin: 0;
+}
+
+/* details at top */
+.diff_details {
+   margin: 0 auto;
+}
+.diff_avatar {
+   width: 60px;
+   float: left;
+   margin-right: 10px;
+}
+
+.diff-hr {
+   border: none;
+   margin-top: 10px;
+}
\ No newline at end of file
diff --git a/UserProfile/UserProfile.php b/UserProfile/UserProfile.php
index a72d744..27b9874 100644
--- a/UserProfile/UserProfile.php
+++ b/UserProfile/UserProfile.php
@@ -3,6 +3,9 @@
 define( 'NS_USER_PROFILE', 202 );
 define( 'NS_USER_WIKI', 200 );
 
+// Show user avatars in diffs?
+$wgUserProfileAvatarsInDiffs = true;
+
 /**
  * If you want to require users to have a certain number of certain things, 
like
  * five edits or three friends or two comments or whatever (is supported by
@@ -92,6 +95,14 @@
'position' => 'top'
 );
 
+// CSS for user avatars in page diffs
+$wgResourceModules['ext.socialprofile.userprofile.diff'] = array(
+   'styles' => 'AvatarsInDiffs.css',
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'SocialProfile/UserProfile',
+   'position' => 'top'
+);
+
 # Add new log types for profile edits and avatar uploads
 global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions;
 $wgLogTypes[]= 'profile';
@@ -105,3 +116,8 @@
 $wgLogActions['avatar/avatar'] = 'avatarlogentry';
 
 $wgHooks['ArticleFromTitle'][] = 'UserProfileHooks::onArticleFromTitle';
+
+$wgHooks['DifferenceEngineShowDiff'][] = 
'UserProfileHooks::onDifferenceEngineShowDiff';
+$wgHooks['DifferenceEngineShowDiffPage'][] = 
'UserProfileHooks::onDifferenceEngineShowDiffPage';
+$wgHooks['DifferenceEngineOldHeader'][] = 
'UserProfileHooks::onDifferenceEngineOldHeader';
+$wgHooks['DifferenceEngineNewHeader'][] = 
'UserProfileHooks::onDifferenceEngineNewHeader';
\ No newline at end of file
diff --git a/UserProfile/UserProfileHooks.php b/UserProfile/UserProfileHooks.php
index bcb526a..b15f739 100644
--- a/UserProfile/UserProfileHooks.php
+++ b/UserProfile/UserProfileHooks.php
@@ -60,4 +60,112 @@
return true;
}
 
+   /**
+* Load the necessary CSS for avatars in diffs if that feature is 
enabled.
+*
+* @param DifferenceEngine $differenceEngine
+* @return bool
+*/
+   public static function onDifferenceEngineShowDiff( &$differenceEngine ) 
{
+   global $wgUserProfileAvatarsInDiffs;
+   if ( $wgUserProfileAvatarsInDiffs ) {
+   $differenceEngine->getOutput()->addModuleStyles( 
'ext.socialprofile.userprofile.diff' );
+   }
+   return true;
+   }
+
+   /**
+* Load the necessary CSS for avatars in diffs if that feature is 
enabled.
+*
+* @param OutputPage $out
+* @return bool

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Moved UserProfile hooks into a separate file & class

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326073 )

Change subject: Moved UserProfile hooks into a separate file & class
..


Moved UserProfile hooks into a separate file & class

Also slightly cleaned up the code to make use of some fancy "new" Title
methods and tweaked function documentation.

Change-Id: Ib4e67adc01b97d54bdd1f0451870c66ba3041897
---
M SocialProfile.php
M UserProfile/UserProfile.php
A UserProfile/UserProfileHooks.php
3 files changed, 65 insertions(+), 58 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/SocialProfile.php b/SocialProfile.php
index 9f6a9d5..09d4a69 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -57,6 +57,7 @@
 $wgAutoloadClasses['UserBoard'] = __DIR__ . '/UserBoard/UserBoardClass.php';
 $wgAutoloadClasses['UserBoardHooks'] = __DIR__ . 
'/UserBoard/UserBoardHooks.php';
 $wgAutoloadClasses['UserProfile'] = __DIR__ . 
'/UserProfile/UserProfileClass.php';
+$wgAutoloadClasses['UserProfileHooks'] = __DIR__ . 
'/UserProfile/UserProfileHooks.php';
 $wgAutoloadClasses['UserProfilePage'] = __DIR__ . 
'/UserProfile/UserProfilePage.php';
 $wgAutoloadClasses['UserRelationship'] = __DIR__ . 
'/UserRelationship/UserRelationshipClass.php';
 $wgAutoloadClasses['UserRelationshipHooks'] = __DIR__ . 
'/UserRelationship/UserRelationshipHooks.php';
diff --git a/UserProfile/UserProfile.php b/UserProfile/UserProfile.php
index 95c8230..a72d744 100644
--- a/UserProfile/UserProfile.php
+++ b/UserProfile/UserProfile.php
@@ -104,61 +104,4 @@
 $wgLogHeaders['avatar']  = 'avatarlogpagetext';
 $wgLogActions['avatar/avatar'] = 'avatarlogentry';
 
-$wgHooks['ArticleFromTitle'][] = 'wfUserProfileFromTitle';
-
-/**
- * Called by ArticleFromTitle hook
- * Calls UserProfilePage instead of standard article
- *
- * @param &$title Title object
- * @param &$article Article object
- * @return true
- */
-function wfUserProfileFromTitle( &$title, &$article ) {
-   global $wgRequest, $wgOut, $wgHooks, $wgUserPageChoice;
-
-   if ( strpos( $title->getText(), '/' ) === false &&
-   ( NS_USER == $title->getNamespace() || NS_USER_PROFILE == 
$title->getNamespace() )
-   ) {
-   $show_user_page = false;
-   if ( $wgUserPageChoice ) {
-   $profile = new UserProfile( $title->getText() );
-   $profile_data = $profile->getProfile();
-
-   // If they want regular page, ignore this hook
-   if ( isset( $profile_data['user_id'] ) && 
$profile_data['user_id'] && $profile_data['user_page_type'] == 0 ) {
-   $show_user_page = true;
-   }
-   }
-
-   if ( !$show_user_page ) {
-   // Prevents editing of userpage
-   if ( $wgRequest->getVal( 'action' ) == 'edit' ) {
-   $wgOut->redirect( $title->getFullURL() );
-   }
-   } else {
-   $wgOut->enableClientCache( false );
-   $wgHooks['ParserLimitReport'][] = 
'wfUserProfileMarkUncacheable';
-   }
-
-   $wgOut->addModuleStyles( array(
-   'ext.socialprofile.clearfix',
-   'ext.socialprofile.userprofile.css'
-   ) );
-
-   $article = new UserProfilePage( $title );
-   }
-   return true;
-}
-
-/**
- * Mark page as uncacheable
- *
- * @param $parser Parser object
- * @param &$limitReport String: unused
- * @return true
- */
-function wfUserProfileMarkUncacheable( $parser, &$limitReport ) {
-   $parser->disableCache();
-   return true;
-}
\ No newline at end of file
+$wgHooks['ArticleFromTitle'][] = 'UserProfileHooks::onArticleFromTitle';
diff --git a/UserProfile/UserProfileHooks.php b/UserProfile/UserProfileHooks.php
new file mode 100644
index 000..bcb526a
--- /dev/null
+++ b/UserProfile/UserProfileHooks.php
@@ -0,0 +1,63 @@
+isSubpage() &&
+   $title->inNamespaces( [ NS_USER, NS_USER_PROFILE ] )
+   ) {
+   $show_user_page = false;
+   if ( $wgUserPageChoice ) {
+   $profile = new UserProfile( $title->getText() );
+   $profile_data = $profile->getProfile();
+
+   // If they want regular page, ignore this hook
+   if ( isset( $profile_data['user_id'] ) && 
$profile_data['user_id'] && $profile_data['user_page_type'] == 0 ) {
+   $show_user_page = true;
+   }
+   }
+
+   if ( !$show_user_page ) {
+   // Prevents editing of userpage
+   if 

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Moved UserProfile hooks into a separate file & class

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326073 )

Change subject: Moved UserProfile hooks into a separate file & class
..

Moved UserProfile hooks into a separate file & class

Also slightly cleaned up the code to make use of some fancy "new" Title
methods and tweaked function documentation.

Change-Id: Ib4e67adc01b97d54bdd1f0451870c66ba3041897
---
M SocialProfile.php
M UserProfile/UserProfile.php
A UserProfile/UserProfileHooks.php
3 files changed, 65 insertions(+), 58 deletions(-)


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

diff --git a/SocialProfile.php b/SocialProfile.php
index 9f6a9d5..09d4a69 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -57,6 +57,7 @@
 $wgAutoloadClasses['UserBoard'] = __DIR__ . '/UserBoard/UserBoardClass.php';
 $wgAutoloadClasses['UserBoardHooks'] = __DIR__ . 
'/UserBoard/UserBoardHooks.php';
 $wgAutoloadClasses['UserProfile'] = __DIR__ . 
'/UserProfile/UserProfileClass.php';
+$wgAutoloadClasses['UserProfileHooks'] = __DIR__ . 
'/UserProfile/UserProfileHooks.php';
 $wgAutoloadClasses['UserProfilePage'] = __DIR__ . 
'/UserProfile/UserProfilePage.php';
 $wgAutoloadClasses['UserRelationship'] = __DIR__ . 
'/UserRelationship/UserRelationshipClass.php';
 $wgAutoloadClasses['UserRelationshipHooks'] = __DIR__ . 
'/UserRelationship/UserRelationshipHooks.php';
diff --git a/UserProfile/UserProfile.php b/UserProfile/UserProfile.php
index 95c8230..a72d744 100644
--- a/UserProfile/UserProfile.php
+++ b/UserProfile/UserProfile.php
@@ -104,61 +104,4 @@
 $wgLogHeaders['avatar']  = 'avatarlogpagetext';
 $wgLogActions['avatar/avatar'] = 'avatarlogentry';
 
-$wgHooks['ArticleFromTitle'][] = 'wfUserProfileFromTitle';
-
-/**
- * Called by ArticleFromTitle hook
- * Calls UserProfilePage instead of standard article
- *
- * @param &$title Title object
- * @param &$article Article object
- * @return true
- */
-function wfUserProfileFromTitle( &$title, &$article ) {
-   global $wgRequest, $wgOut, $wgHooks, $wgUserPageChoice;
-
-   if ( strpos( $title->getText(), '/' ) === false &&
-   ( NS_USER == $title->getNamespace() || NS_USER_PROFILE == 
$title->getNamespace() )
-   ) {
-   $show_user_page = false;
-   if ( $wgUserPageChoice ) {
-   $profile = new UserProfile( $title->getText() );
-   $profile_data = $profile->getProfile();
-
-   // If they want regular page, ignore this hook
-   if ( isset( $profile_data['user_id'] ) && 
$profile_data['user_id'] && $profile_data['user_page_type'] == 0 ) {
-   $show_user_page = true;
-   }
-   }
-
-   if ( !$show_user_page ) {
-   // Prevents editing of userpage
-   if ( $wgRequest->getVal( 'action' ) == 'edit' ) {
-   $wgOut->redirect( $title->getFullURL() );
-   }
-   } else {
-   $wgOut->enableClientCache( false );
-   $wgHooks['ParserLimitReport'][] = 
'wfUserProfileMarkUncacheable';
-   }
-
-   $wgOut->addModuleStyles( array(
-   'ext.socialprofile.clearfix',
-   'ext.socialprofile.userprofile.css'
-   ) );
-
-   $article = new UserProfilePage( $title );
-   }
-   return true;
-}
-
-/**
- * Mark page as uncacheable
- *
- * @param $parser Parser object
- * @param &$limitReport String: unused
- * @return true
- */
-function wfUserProfileMarkUncacheable( $parser, &$limitReport ) {
-   $parser->disableCache();
-   return true;
-}
\ No newline at end of file
+$wgHooks['ArticleFromTitle'][] = 'UserProfileHooks::onArticleFromTitle';
diff --git a/UserProfile/UserProfileHooks.php b/UserProfile/UserProfileHooks.php
new file mode 100644
index 000..bcb526a
--- /dev/null
+++ b/UserProfile/UserProfileHooks.php
@@ -0,0 +1,63 @@
+isSubpage() &&
+   $title->inNamespaces( [ NS_USER, NS_USER_PROFILE ] )
+   ) {
+   $show_user_page = false;
+   if ( $wgUserPageChoice ) {
+   $profile = new UserProfile( $title->getText() );
+   $profile_data = $profile->getProfile();
+
+   // If they want regular page, ignore this hook
+   if ( isset( $profile_data['user_id'] ) && 
$profile_data['user_id'] && $profile_data['user_page_type'] == 0 ) {
+   $show_user_page = true;
+   }
+   }
+
+   if ( !$show_user_page ) {
+   // Prevents editing of userpage
+   

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: CSS fix for Special:EditProfile

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326072 )

Change subject: CSS fix for Special:EditProfile
..


CSS fix for Special:EditProfile

Change-Id: I650164756a53c255d7e4412261a8123b16bb4e9d
---
M UserProfile/SpecialEditProfile.php
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/UserProfile/SpecialEditProfile.php 
b/UserProfile/SpecialEditProfile.php
index 35d79ce..afcf671 100644
--- a/UserProfile/SpecialEditProfile.php
+++ b/UserProfile/SpecialEditProfile.php
@@ -224,7 +224,7 @@
$this->getOutput()->setPageTitle( $this->msg( 
'edit-profile-title' )->plain() );
//$form = UserProfile::getEditProfileNav( $this->msg( 
'user-profile-section-personal' )->plain() );
$form = '';
-   $form .= '';
+   $form .= '';
$form .= '
' . $this->msg( 
'user-profile-personal-info' )->plain() . '
' . $this->msg( 
'user-profile-personal-name' )->plain() . '
@@ -394,7 +394,7 @@
 
$this->getOutput()->setPageTitle( $this->msg( 
'user-profile-section-interests' )->plain() );
//$form = UserProfile::getEditProfileNav( $this->msg( 
'user-profile-section-interests' )->plain() );
-   $form = '
+   $form = '

' . $this->msg( 
'user-profile-interests-entertainment' )->plain() . '
' . $this->msg( 
'user-profile-interests-movies' )->plain() . '
@@ -428,7 +428,7 @@



-   
+   
' . $this->msg( 
'user-profile-interests-eats' )->plain() . '
' . $this->msg( 
'user-profile-interests-foodsnacks' )->plain() . '

@@ -474,7 +474,7 @@
$this->msg( 'user-profile-tidbits-title' )->plain() 
)->parse() );
$form = '' . $this->msg( 'user-profile-tidbits-title' 
)->plain() . '';
//$form = UserProfile::getEditProfileNav( $this->msg( 
'user-profile-section-custom' )->plain() );
-   $form = '
+   $form = '

' . 
$this->msg( 'user-profile-tidbits-title' )->inContentLanguage()->parse() . '


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I650164756a53c255d7e4412261a8123b16bb4e9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: CSS fix for Special:EditProfile

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326072 )

Change subject: CSS fix for Special:EditProfile
..

CSS fix for Special:EditProfile

Change-Id: I650164756a53c255d7e4412261a8123b16bb4e9d
---
M UserProfile/SpecialEditProfile.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/UserProfile/SpecialEditProfile.php 
b/UserProfile/SpecialEditProfile.php
index 35d79ce..afcf671 100644
--- a/UserProfile/SpecialEditProfile.php
+++ b/UserProfile/SpecialEditProfile.php
@@ -224,7 +224,7 @@
$this->getOutput()->setPageTitle( $this->msg( 
'edit-profile-title' )->plain() );
//$form = UserProfile::getEditProfileNav( $this->msg( 
'user-profile-section-personal' )->plain() );
$form = '';
-   $form .= '';
+   $form .= '';
$form .= '
' . $this->msg( 
'user-profile-personal-info' )->plain() . '
' . $this->msg( 
'user-profile-personal-name' )->plain() . '
@@ -394,7 +394,7 @@
 
$this->getOutput()->setPageTitle( $this->msg( 
'user-profile-section-interests' )->plain() );
//$form = UserProfile::getEditProfileNav( $this->msg( 
'user-profile-section-interests' )->plain() );
-   $form = '
+   $form = '

' . $this->msg( 
'user-profile-interests-entertainment' )->plain() . '
' . $this->msg( 
'user-profile-interests-movies' )->plain() . '
@@ -428,7 +428,7 @@



-   
+   
' . $this->msg( 
'user-profile-interests-eats' )->plain() . '
' . $this->msg( 
'user-profile-interests-foodsnacks' )->plain() . '

@@ -474,7 +474,7 @@
$this->msg( 'user-profile-tidbits-title' )->plain() 
)->parse() );
$form = '' . $this->msg( 'user-profile-tidbits-title' 
)->plain() . '';
//$form = UserProfile::getEditProfileNav( $this->msg( 
'user-profile-section-custom' )->plain() );
-   $form = '
+   $form = '

' . 
$this->msg( 'user-profile-tidbits-title' )->inContentLanguage()->parse() . '


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I650164756a53c255d7e4412261a8123b16bb4e9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
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] mediawiki...SocialProfile[master]: Display search suggestions for special pages which take a us...

2016-12-08 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326071 )

Change subject: Display search suggestions for special pages which take a user 
name as the parameter
..

Display search suggestions for special pages which take a user name as the 
parameter

And also for Special:TopUsersRecent.

Code sporked from core /includes/specials/SpecialUserrights.php for all
the other special pages but Special:TopUsersRecent.

Change-Id: I3c6b56b0c263327181258bdadaff728161bf7863
---
M UserGifts/SpecialGiveGift.php
M UserProfile/SpecialEditProfile.php
M UserProfile/SpecialRemoveAvatar.php
M UserRelationship/SpecialAddRelationship.php
M UserRelationship/SpecialRemoveRelationship.php
M UserStats/TopFansRecent.php
6 files changed, 116 insertions(+), 13 deletions(-)


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

diff --git a/UserGifts/SpecialGiveGift.php b/UserGifts/SpecialGiveGift.php
index a4a8259..56bd372 100644
--- a/UserGifts/SpecialGiveGift.php
+++ b/UserGifts/SpecialGiveGift.php
@@ -31,7 +31,7 @@
/**
 * Show the special page
 *
-* @param $par Mixed: parameter passed to the page or null
+* @param string|null $par Name of the user whom to give a gift
 */
public function execute( $par ) {
global $wgMemc, $wgUploadPath;
@@ -49,13 +49,12 @@
$out->addModuleStyles( 'ext.socialprofile.usergifts.css' );
$out->addModules( 'ext.socialprofile.usergifts.js' );
 
-   $userTitle = Title::newFromDBkey( $request->getVal( 'user' ) );
+   $userTitle = Title::newFromDBkey( $request->getVal( 'user', 
$par ) );
if ( !$userTitle ) {
$out->addHTML( $this->displayFormNoUser() );
return false;
}
 
-   $user_title = Title::makeTitle( NS_USER, $request->getVal( 
'user' ) );
$this->user_name_to = $userTitle->getText();
$this->user_id_to = User::idFromName( $this->user_name_to );
$giftId = $request->getInt( 'gift_id' );
@@ -127,7 +126,7 @@
$out->setPageTitle( $this->msg( 'g-sent-title', 
$this->user_name_to )->parse() );
 
$output .= '
-   ' .
+   ' .
$this->msg( 'g-back-link', 
$this->user_name_to )->parse() .
'

@@ -163,6 +162,24 @@
}
 
/**
+* Return an array of subpages beginning with $search that this special 
page will accept.
+*
+* @param string $search Prefix to search for
+* @param int $limit Maximum number of results to return (usually 10)
+* @param int $offset Number of results to skip (usually 0)
+* @return string[] Matching subpages
+*/
+   public function prefixSearchSubpages( $search, $limit, $offset ) {
+   $user = User::newFromName( $search );
+   if ( !$user ) {
+   // No prefix suggestion for invalid user
+   return [];
+   }
+   // Autocomplete subpage as user list - public to allow caching
+   return UserNamePrefixSearch::search( 'public', $search, $limit, 
$offset );
+   }
+
+   /**
 * Display the form for sending out a single gift.
 * Relies on the gift_id URL parameter and bails out if it's not there.
 *
diff --git a/UserProfile/SpecialEditProfile.php 
b/UserProfile/SpecialEditProfile.php
index 35d79ce..7b8f14d 100644
--- a/UserProfile/SpecialEditProfile.php
+++ b/UserProfile/SpecialEditProfile.php
@@ -133,6 +133,25 @@
$out->addHTML( $this->displayCustomForm( $target ) );
}
 
+
+   /**
+* Return an array of subpages beginning with $search that this special 
page will accept.
+*
+* @param string $search Prefix to search for
+* @param int $limit Maximum number of results to return (usually 10)
+* @param int $offset Number of results to skip (usually 0)
+* @return string[] Matching subpages
+*/
+   public function prefixSearchSubpages( $search, $limit, $offset ) {
+   $user = User::newFromName( $search );
+   if ( !$user ) {
+   // No prefix suggestion for invalid user
+   return [];
+   }
+   // Autocomplete subpage as user list - public to allow caching
+   return UserNamePrefixSearch::search( 'public', $search, $limit, 
$offset );
+   }
+
function createUserInputForm() {
$actionUrl = $this->getPageTitle()->getLocalURL( '' );
  

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: login.py: Support specifying '*' for 'family' in user-config.py

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/323518 )

Change subject: login.py: Support specifying '*' for 'family' in user-config.py
..


login.py: Support specifying '*' for 'family' in user-config.py

- __init__.py:
- Check the username and sysopname of family '*' if none is found
in the specified family.
- login_tests.py:
- Use "import unittest.mock" instead of "import mock" when available.
(mock has been part of the standard library since python 3.3)
- FakeConfig.usernames should be a defaultdict.
- Add a test for the new funtionality of LoginManager.

Bug: T120334
Change-Id: I23749a4035c7d27186a92e67c6d6206e10326ff0
---
M pywikibot/__init__.py
M pywikibot/config2.py
M pywikibot/login.py
M tests/login_tests.py
4 files changed, 49 insertions(+), 17 deletions(-)

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



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 42b93ec..c68fcfe 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -825,13 +825,16 @@
 
 interface = interface or fam.interface(code)
 
-# config.usernames is initialised with a dict for each family name
+# config.usernames is initialised with a defaultdict for each family name
 family_name = str(fam)
-if family_name in config.usernames:
-user = user or config.usernames[family_name].get(code) \
-or config.usernames[family_name].get('*')
-sysop = sysop or config.sysopnames[family_name].get(code) \
-or config.sysopnames[family_name].get('*')
+
+code_to_user = config.usernames['*'].copy()
+code_to_user.update(config.usernames[family_name])
+user = user or code_to_user.get(code) or code_to_user.get('*')
+
+code_to_sysop = config.sysopnames['*'].copy()
+code_to_sysop.update(config.sysopnames[family_name])
+sysop = sysop or code_to_sysop.get(code) or code_to_sysop.get('*')
 
 if not isinstance(interface, type):
 # If it isnt a class, assume it is a string
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 9451eb5..e1ab7dc 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -116,6 +116,7 @@
 # If you have a unique username for all languages of a family,
 # you can use '*'
 # usernames['wikibooks']['*'] = 'mySingleUsername'
+# You may use '*' for family name in a similar manner.
 #
 # If you have a sysop account on some wikis, this will be used to delete pages
 # or to edit locked pages if you add such lines to your
diff --git a/pywikibot/login.py b/pywikibot/login.py
index e110c47..01ebf6b 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -91,9 +91,12 @@
 if user:
 self.username = user
 elif sysop:
+config_names = config.sysopnames
+family_sysopnames = (
+config_names[self.site.family.name] or config_names['*']
+)
+self.username = family_sysopnames.get(self.site.code, None)
 try:
-family_sysopnames = config.sysopnames[self.site.family.name]
-self.username = family_sysopnames.get(self.site.code, None)
 self.username = self.username or family_sysopnames['*']
 except KeyError:
 raise NoUsername(u"""\
@@ -104,11 +107,14 @@
  % {'fam_name': self.site.family.name,
 'wiki_code': self.site.code})
 else:
+config_names = config.usernames
+family_usernames = (
+config_names[self.site.family.name] or config_names['*']
+)
+self.username = family_usernames.get(self.site.code, None)
 try:
-family_usernames = config.usernames[self.site.family.name]
-self.username = family_usernames.get(self.site.code, None)
 self.username = self.username or family_usernames['*']
-except:
+except KeyError:
 raise NoUsername(u"""\
 ERROR: Username for %(fam_name)s:%(wiki_code)s is undefined.
 If you have an account for that site, please add a line to user-config.py:
diff --git a/tests/login_tests.py b/tests/login_tests.py
index 9c63bc3..b40ea7c 100644
--- a/tests/login_tests.py
+++ b/tests/login_tests.py
@@ -13,8 +13,13 @@
 
 __version__ = '$Id$'
 #
-import mock
+from collections import defaultdict
+try:
+import unittest.mock as mock
+except ImportError:
+import mock
 
+from pywikibot.exceptions import NoUsername
 from pywikibot.login import LoginManager
 
 from tests.aspects import (
@@ -35,17 +40,15 @@
 code = "~FakeCode"
 family = FakeFamily
 
+
 FakeUsername = "~FakeUsername"
 
 
 class FakeConfig(object):
 """Mock."""
 
-usernames = {
-FakeFamily.name: {
-FakeSite.code: FakeUsername
-}
-}

[MediaWiki-commits] [Gerrit] integration/config[master]: phan: Move back to nodepool

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326070 )

Change subject: phan: Move back to nodepool
..


phan: Move back to nodepool

Change-Id: I044a020cd1acd1528864fff590d29716b64e30b1
---
M jjb/mediawiki.yaml
M zuul/layout.yaml
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index a7f630e..18d40ea 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -467,8 +467,8 @@
 
 # Phan! (T132636)
 - job:
-name: 'mediawiki-core-php70-phan'
-node: contintLabsSlave && DebianJessie
+name: 'mediawiki-core-php70-phan-jessie'
+node: ci-jessie-wikimedia
 concurrent: true
 properties:
  - build-discarder:
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index df8bbeb..a088ec1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -646,7 +646,7 @@
   - name: ^.*-non-voting$
 voting: false
 
-  - name: ^mediawiki-core-php70-phan$
+  - name: ^mediawiki-core-php70-phan-jessie$
 voting: false
 skip-if:
   - project: '^mediawiki/core$'
@@ -1420,7 +1420,7 @@
   - mediawiki-phpunit-hhvm-jessie
   - mediawiki-core-qunit-jessie
   - composer-package-validate
-  - mediawiki-core-php70-phan
+  - mediawiki-core-php70-phan-jessie
 php5:
   # Comment "check php5" to manually run this
   - mediawiki-phpunit-php55-trusty
@@ -1437,7 +1437,7 @@
   - mediawiki-phpunit-php55-trusty
   - mediawiki-core-qunit-jessie
   - composer-package-validate
-  # - mediawiki-core-php70-phan
+  # - mediawiki-core-php70-phan-jessie
 postmerge:
   - mediawiki-core-jsduck-publish
   - mediawiki-core-doxygen-publish

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I044a020cd1acd1528864fff590d29716b64e30b1
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] integration/config[master]: phan: Move back to nodepool

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326070 )

Change subject: phan: Move back to nodepool
..

phan: Move back to nodepool

Change-Id: I044a020cd1acd1528864fff590d29716b64e30b1
---
M jjb/mediawiki.yaml
M zuul/layout.yaml
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/70/326070/1

diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index a7f630e..18d40ea 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -467,8 +467,8 @@
 
 # Phan! (T132636)
 - job:
-name: 'mediawiki-core-php70-phan'
-node: contintLabsSlave && DebianJessie
+name: 'mediawiki-core-php70-phan-jessie'
+node: ci-jessie-wikimedia
 concurrent: true
 properties:
  - build-discarder:
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index df8bbeb..a088ec1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -646,7 +646,7 @@
   - name: ^.*-non-voting$
 voting: false
 
-  - name: ^mediawiki-core-php70-phan$
+  - name: ^mediawiki-core-php70-phan-jessie$
 voting: false
 skip-if:
   - project: '^mediawiki/core$'
@@ -1420,7 +1420,7 @@
   - mediawiki-phpunit-hhvm-jessie
   - mediawiki-core-qunit-jessie
   - composer-package-validate
-  - mediawiki-core-php70-phan
+  - mediawiki-core-php70-phan-jessie
 php5:
   # Comment "check php5" to manually run this
   - mediawiki-phpunit-php55-trusty
@@ -1437,7 +1437,7 @@
   - mediawiki-phpunit-php55-trusty
   - mediawiki-core-qunit-jessie
   - composer-package-validate
-  # - mediawiki-core-php70-phan
+  # - mediawiki-core-php70-phan-jessie
 postmerge:
   - mediawiki-core-jsduck-publish
   - mediawiki-core-doxygen-publish

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I044a020cd1acd1528864fff590d29716b64e30b1
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: phan: Output a checkstyle report and link to the result

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326069 )

Change subject: phan: Output a checkstyle report and link to the result
..


phan: Output a checkstyle report and link to the result

Change-Id: I53c1ca2df73141590da9c6875bdba02f23bb4664
---
M jjb/mediawiki.yaml
M zuul/layout.yaml
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index 9867a35..a7f630e 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -485,6 +485,12 @@
  - shell: |
 cd $WORKSPACE/src
 composer require etsy/phan:0.7 --prefer-dist --dev --no-progress 
--ansi --profile -v # todo don't hardcode version here
-PHAN=vendor/bin/phan ./tests/phan/bin/phan
+PHAN=vendor/bin/phan ./tests/phan/bin/phan -m checkstyle
 publishers:
  - castor-save
+ - checkstyle:
+pattern: 'src/tests/phan/issues/latest'
+can-run-on-failed: true
+thresholds:
+  failed:
+total-all: 1
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 06a7bea..df8bbeb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -651,6 +651,7 @@
 skip-if:
   - project: '^mediawiki/core$'
 branch: (?:^(fundraising/)?REL1_2[378]$|^wmf/1\.29\.0-wmf\.5$)
+failure-pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/checkstyleResult/'
 
   - name: ^.*rake-jessie$
 files:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53c1ca2df73141590da9c6875bdba02f23bb4664
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] integration/config[master]: phan: Output a checkstyle report and link to the result

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326069 )

Change subject: phan: Output a checkstyle report and link to the result
..

phan: Output a checkstyle report and link to the result

Change-Id: I53c1ca2df73141590da9c6875bdba02f23bb4664
---
M jjb/mediawiki.yaml
M zuul/layout.yaml
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/69/326069/1

diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index 9867a35..a7f630e 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -485,6 +485,12 @@
  - shell: |
 cd $WORKSPACE/src
 composer require etsy/phan:0.7 --prefer-dist --dev --no-progress 
--ansi --profile -v # todo don't hardcode version here
-PHAN=vendor/bin/phan ./tests/phan/bin/phan
+PHAN=vendor/bin/phan ./tests/phan/bin/phan -m checkstyle
 publishers:
  - castor-save
+ - checkstyle:
+pattern: 'src/tests/phan/issues/latest'
+can-run-on-failed: true
+thresholds:
+  failed:
+total-all: 1
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 06a7bea..df8bbeb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -651,6 +651,7 @@
 skip-if:
   - project: '^mediawiki/core$'
 branch: (?:^(fundraising/)?REL1_2[378]$|^wmf/1\.29\.0-wmf\.5$)
+failure-pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/checkstyleResult/'
 
   - name: ^.*rake-jessie$
 files:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53c1ca2df73141590da9c6875bdba02f23bb4664
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [DNM] Break Special:Blankpage for testing

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326068 )

Change subject: [DNM] Break Special:Blankpage for testing
..

[DNM] Break Special:Blankpage for testing

Change-Id: I9e452ee037646733cd356f6871d89fbdb2b14611
---
M includes/specials/SpecialBlankpage.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/326068/1

diff --git a/includes/specials/SpecialBlankpage.php 
b/includes/specials/SpecialBlankpage.php
index e61f12b..b128085 100644
--- a/includes/specials/SpecialBlankpage.php
+++ b/includes/specials/SpecialBlankpage.php
@@ -35,5 +35,8 @@
public function execute( $par ) {
$this->setHeaders();
$this->getOutput()->addWikiMsg( 'intentionallyblankpage' );
+   new ClassDoesntExist();
+
+   $this->notARealMethodEither();
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SmiteSpam[master]: Remove unused 'smitespam-loading' message

2016-12-08 Thread MtDu (Code Review)
MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326067 )

Change subject: Remove unused 'smitespam-loading' message
..

Remove unused 'smitespam-loading' message

* It was removed in https://gerrit.wikimedia.org/r/#/c/235070/1

Change-Id: I6949b06afeaec58f7e618e10cd4b561ee188a610
---
M SmiteSpam.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/SmiteSpam.php b/SmiteSpam.php
index 455e537..163b4a0 100644
--- a/SmiteSpam.php
+++ b/SmiteSpam.php
@@ -50,7 +50,6 @@
'smitespam-created-by',
'smitespam-delete',
'smitespam-delete-page-failure-msg',
-   'smitespam-loading',
'smitespam-trust',
'smitespam-trusted',
'table_pager_next',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6949b06afeaec58f7e618e10cd4b561ee188a610
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmiteSpam
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] mediawiki...SmiteSpam[master]: Replace Linker::link*() usage with LinkRenderer

2016-12-08 Thread MtDu (Code Review)
MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326066 )

Change subject: Replace Linker::link*() usage with LinkRenderer
..

Replace Linker::link*() usage with LinkRenderer

Bug: T149346
Change-Id: I71bde107d84ef38012bfb0624bfbab431ef0b532
---
M SpecialSmiteSpam.php
M SpecialSmiteSpamTrustedUsers.php
M api/SmiteSpamApiQuery.php
3 files changed, 12 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SmiteSpam 
refs/changes/66/326066/1

diff --git a/SpecialSmiteSpam.php b/SpecialSmiteSpam.php
index 03a7318..4640d43 100644
--- a/SpecialSmiteSpam.php
+++ b/SpecialSmiteSpam.php
@@ -20,7 +20,7 @@
$numPages = SiteStats::pages();
 
$out->addHTML(
-   Linker::link(
+   $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor( 
'SmiteSpamTrustedUsers' ),
wfMessage( 'smitespam-view-trusted-users' 
)->text(),
[ 'target' => '_blank' ]
diff --git a/SpecialSmiteSpamTrustedUsers.php b/SpecialSmiteSpamTrustedUsers.php
index f1e0c0f..dcb50f4 100644
--- a/SpecialSmiteSpamTrustedUsers.php
+++ b/SpecialSmiteSpamTrustedUsers.php
@@ -106,11 +106,12 @@
'' . wfMessage( 'smitespam-remove' )->text() . 
'' .
''
);
+   $linkRenderer = $this->getLinkRenderer();
foreach ( $result as $row ) {
$trustedUser = User::newFromID( $row->trusted_user_id 
)->getName();
-   $trustedUserContribsLink = Linker::link(
+   $trustedUserContribsLink = $linkRenderer->makeLink(
SpecialPage::getTitleFor( 'Contributions', 
$trustedUser ),
-   Sanitizer::escapeHtmlAllowEntities( 
$trustedUser ),
+   $trustedUser,
[ 'target' => '_blank' ]
);
$timestamp = $this->getLanguage()->userTimeAndDate(
@@ -118,9 +119,9 @@
$this->getUser()
);
$admin = User::newFromID( $row->trusted_user_admin_id 
)->getName();
-   $adminContribsLink = Linker::link(
+   $adminContribsLink = $linkRenderer->makeLink(
SpecialPage::getTitleFor( 'Contributions', 
$admin ),
-   Sanitizer::escapeHtmlAllowEntities( $admin ),
+   $admin,
[ 'target' => '_blank' ]
);
 
diff --git a/api/SmiteSpamApiQuery.php b/api/SmiteSpamApiQuery.php
index ab25093..bab89c1 100644
--- a/api/SmiteSpamApiQuery.php
+++ b/api/SmiteSpamApiQuery.php
@@ -1,5 +1,7 @@
 getMain()->getVal( 'offset' );
@@ -19,10 +21,11 @@
$pages = [];
$users = [];
 
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
foreach ( $spamPages as $page ) {
$title = $page->getTitle();
 
-   $titleLink = Linker::link(
+   $titleLink = $linkRenderer->makeLink(
$title,
null,
[ 'target' => '_blank' ]
@@ -44,9 +47,9 @@
$blocked = true;
}
$users[$creator] = [
-   'link' => Linker::link(
+   'link' => 
$linkRenderer->makeLink(

SpecialPage::getTitleFor( 'Contributions', $creator ),
-   
Sanitizer::escapeHtmlAllowEntities( $creator ),
+   $creator,
[ 'target' => 
'_blank' ]
),
'blocked' => 
(int)$blocked,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71bde107d84ef38012bfb0624bfbab431ef0b532
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmiteSpam
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update bundled CSS

2016-12-08 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326065 )

Change subject: Update bundled CSS
..

Update bundled CSS

Change-Id: I7fd906947acf2a426b714ab9c11fa8628a500049
---
M app/src/main/assets/preview.css
M app/src/main/assets/styles.css
2 files changed, 124 insertions(+), 34 deletions(-)


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

diff --git a/app/src/main/assets/preview.css b/app/src/main/assets/preview.css
index ef14c20..5d1966b 100644
--- a/app/src/main/assets/preview.css
+++ b/app/src/main/assets/preview.css
@@ -117,8 +117,19 @@
 margin: 0 12px;
   }
 }
+.client-js .collapsible-block {
+  display: none;
+}
+.client-js .collapsible-block.open-block {
+  display: block;
+}
 .nomobile {
   display: none !important;
+}
+@media all and (min-width: 720px) {
+  .client-js [onclick] + .collapsible-block {
+display: block;
+  }
 }
 .content .thumb {
   margin: 0.6em 0;
@@ -127,11 +138,6 @@
 .content .thumb .thumbinner {
   margin: 0 auto;
   max-width: 100% !important;
-}
-.content .thumb .thumbinner > div {
-  float: none !important;
-  width: auto !important;
-  clear: both !important;
 }
 .content .thumb .noresize {
   width: 100%;
@@ -197,7 +203,7 @@
 h4,
 h5,
 h6 {
-  font-family: 'Linux Libertine', 'Georgia', ' Times', serif;
+  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
   line-height: 1.3;
   word-wrap: break-word;
   word-break: break-word;
@@ -210,7 +216,7 @@
   padding: 0.5em 0;
 }
 blockquote {
-  font-family: 'Linux Libertine', 'Georgia', ' Times', serif;
+  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
   font-size: 1.1em;
   quotes: '\201C' '\201D';
   padding: 1em 25px 1em 30px;
@@ -284,6 +290,16 @@
 body.mw-hide-empty-elt .mw-empty-elt {
   display: none;
 }
+.hlist-separated li:after {
+  content: '•';
+  padding-left: 8px;
+  color: #002bb8;
+  font-size: 16px;
+  line-height: 1;
+}
+.hlist-separated :last-child:after {
+  content: '';
+}
 a {
   text-decoration: none;
   color: #002bb8;
@@ -306,7 +322,6 @@
   background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC);
   background-image: 
url(/w/extensions/MobileFrontend/resources/skins.minerva.content.styles/images/external-link-ltr-icon.png?948bf)!ie;
   background-image: linear-gradient(transparent, transparent), 
url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%2306c%22%20d%3D%22M.5%203.518h5.982V9.5H.5z%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M4.755-.16H9.99v5.39L8.417%206.774l-1.31-1.31L4.383%208.19%201.695%205.5l2.808-2.807-1.31-1.31z%22%20fill%3D%22%2306f%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M8.984.845l.022%204.884L7.19%203.91l-2.882%202.88L3.08%205.567l2.882-2.88L4.112.833z%22%20fill%3D%22%23fff%22%2F%3E%0A%3C%2Fsvg%3E%0A);
-  background-image: linear-gradient(transparent, transparent), 
url(/w/extensions/MobileFrontend/resources/skins.minerva.content.styles/images/external-link-ltr-icon.svg?acafc)!ie;
   background-image: -o-linear-gradient(transparent, transparent), 
url(/w/extensions/MobileFrontend/resources/skins.minerva.content.styles/images/external-link-ltr-icon.png?948bf);
   background-repeat: no-repeat;
   background-position: center right;
@@ -449,7 +464,8 @@
  * Makes sure that on small screens column-count is only honored if 
column-width hint is not violated.
  * https://developer.mozilla.org/en-US/docs/CSS/column-width
  */
-.references-column-count {
+.references-column-count,
+.column-count {
   -moz-column-width: 35em;
   -webkit-column-width: 35em;
   column-width: 35em;
@@ -480,6 +496,31 @@
   .content table.multicol > tbody > tr > td {
 display: block !important;
 width: auto !important;
+  }
+  .content .thumb .thumbinner {
+display: -webkit-flex;
+display: -moz-flex;
+display: -ms-flexbox;
+display: flex;
+justify-content: center;
+flex-wrap: wrap;
+align-content: flex-start;
+  }
+  .content .thumb .thumbinner > .thumbcaption {
+-webkit-box-pack: justify;
+-moz-box-pack: justify;
+-ms-flex-pack: justify;
+justify-content: space-between;
+-webkit-box-flex: 1;
+-moz-box-flex: 1;
+width: 100%;
+-ms-flex: 1 0 100%;
+flex: 1 0 100%;
+-webkit-box-ordinal-group: 1;
+-moz-box-ordinal-group: 1;
+-ms-flex-order: 1;
+order: 1;
+display: block;
   }
 }/* CSS for Parsoid Cite extension */
 
@@ -631,8 +672,8 @@
 
 li.gallerybox div.thumb {
text-align: center;
-   border: 1px solid #ccc;
-   background-color: #f9f9f9;
+   

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Creating {{int:hello}} and {{int:thank-you}} messages for WM...

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/302197 )

Change subject: Creating {{int:hello}} and {{int:thank-you}} messages for WMF 
sites
..


Creating {{int:hello}} and {{int:thank-you}} messages for WMF sites

Proposed and discussed at T137127

Bug: T137127
Change-Id: Iba9f86f7a2fe64368ef8976a85e83c3b1d779fc0
---
M i18n/temporary/en.json
M i18n/temporary/qqq.json
2 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/i18n/temporary/en.json b/i18n/temporary/en.json
index b0ef188..2224fc8 100644
--- a/i18n/temporary/en.json
+++ b/i18n/temporary/en.json
@@ -6,5 +6,7 @@
"grouppage-oversight": "{{ns:project}}:Oversight",
"group-oversight": "Oversighters",
"group-oversight-member": "oversight",
-   "please-translate": "Please help translate to your language"
-}
+   "hello": "Hello",
+   "please-translate": "Please help translate to your language",
+   "thank-you": "{{GENDER:$1|Thank you.}}"
+}
\ No newline at end of file
diff --git a/i18n/temporary/qqq.json b/i18n/temporary/qqq.json
index d9f63a4..482e576 100644
--- a/i18n/temporary/qqq.json
+++ b/i18n/temporary/qqq.json
@@ -10,5 +10,7 @@
"grouppage-oversight": "Project page explaining what Oversight 
is.\n{{Identical|Oversight}}",
"group-oversight": "Localized name of the oversight group.",
"group-oversight-member": "Localized name of the oversight group 
member.\n{{Identical|Oversight}}",
-   "please-translate": "Standalone sentence used as header or beginning of 
crosswiki custom invitations to translate."
+   "hello": "Standalone word used as a greeting or beginning of a 
crosswiki message.",
+   "please-translate": "Standalone sentence used as header or beginning of 
crosswiki custom invitations to translate.",
+   "thank-you": "Standalone word which could be used as farewell or end of 
crosswiki messages."
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba9f86f7a2fe64368ef8976a85e83c3b1d779fc0
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: TTO 
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...MobileApp[master]: Update: allows refs to span multiple columns

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/322364 )

Change subject: Update: allows refs to span multiple columns
..


Update: allows refs to span multiple columns

Remove a workaround that forced references to appear in a single column.
References are now allowed to span multiple columns when they can fit
comfortably.

Bug: T149394
Change-Id: I907888342db0be350870d22d162020115f4857c7
Depends-On: Iec0fb3f3026e5a46a0f6827388b764a48d20b52a
---
M styles/enwiki.less
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/styles/enwiki.less b/styles/enwiki.less
index 4950c9c..9f2ba14 100644
--- a/styles/enwiki.less
+++ b/styles/enwiki.less
@@ -301,13 +301,6 @@
 border: solid transparent;
 }
 
-/* Disabling column-count for {{reflist}} and {{refbegin}} */
-.references-column-count {
--moz-column-count: 1 !important;
--webkit-column-count: 1 !important;
-column-count: 1 !important;
-}
-
 /* Show fallback math formulas, since MathML is hidden */
 .mwe-math-fallback-image-inline {
 display: inline-block;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I907888342db0be350870d22d162020115f4857c7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: typo in comment: OAuth -> Oath

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/323379 )

Change subject: typo in comment: OAuth -> Oath
..


typo in comment: OAuth -> Oath

Bug: T151536
Change-Id: I39e3a3cca04be79f735e5e2050cf573ec9073169
---
M OATHAuthKey.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/OATHAuthKey.php b/OATHAuthKey.php
index f2f8834..0dd1fff 100644
--- a/OATHAuthKey.php
+++ b/OATHAuthKey.php
@@ -3,7 +3,7 @@
 /**
  * Class representing a two-factor key
  *
- * Keys can be tied to OAUTHUsers
+ * Keys can be tied to OATHUsers
  *
  * @ingroup Extensions
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39e3a3cca04be79f735e5e2050cf573ec9073169
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: Reedy 
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...stashbot[master]: stashbot.sh: Add 'attach' command

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325973 )

Change subject: stashbot.sh: Add 'attach' command
..


stashbot.sh: Add 'attach' command

Add an new `stashbot.sh attach` command that will connect to the running
pod and allow interactive debugging. h/t yuvipanda

Change-Id: If6d3d23a0e8adab9c84ef9808555a3ac79d4caab
---
M bin/stashbot.sh
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/bin/stashbot.sh b/bin/stashbot.sh
index e711a4c..c879c14 100755
--- a/bin/stashbot.sh
+++ b/bin/stashbot.sh
@@ -56,8 +56,12 @@
 git --no-pager log --stat HEAD..@{upstream} &&
 git rebase @{upstream}
 ;;
+attach)
+echo "Attaching to pod..."
+exec kubectl exec -i -t $(_get_pod) /bin/bash
+;;
 *)
-echo "Usage: $0 {start|stop|restart|status|tail|update}"
+echo "Usage: $0 {start|stop|restart|status|tail|update|attach}"
 exit 1
 ;;
 esac

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6d3d23a0e8adab9c84ef9808555a3ac79d4caab
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/stashbot
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [wip] RCFilters UI: Read preferences as base state

2016-12-08 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326064 )

Change subject: [wip] RCFilters UI: Read preferences as base state
..

[wip] RCFilters UI: Read preferences as base state

Read user preferences for filters as a base state that is then
overriden by URL parameters.

Bug: T18
Change-Id: I9e8e3430ca2f80d3f67422681e8fb69a43ee4bef
---
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
4 files changed, 51 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/326064/1

diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
index c689420..aa3556f 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
@@ -22,6 +22,7 @@
this.group = config.group || '';
this.label = config.label || this.name;
this.description = config.description;
+   this.preference = config.preference;
 
this.selected = !!config.selected;
};
@@ -80,6 +81,15 @@
};
 
/**
+* Return the preference name associated with this filter
+*
+* @return {string} Preference name
+*/
+   mw.rcfilters.dm.FilterItem.prototype.getPreferenceName = function () {
+   return this.preference;
+   };
+
+   /**
 * Get the selected state of this filter
 *
 * @return {boolean} Filter is selected
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
index 2933fb8..ef160c6 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
@@ -86,13 +86,17 @@
model.groups[ group ].title = data.title;
model.groups[ group ].type = data.type;
model.groups[ group ].separator = data.separator || '|';
+   if ( data.preference ) {
+   model.groups[ group ].preference = preference;
+   }
 
for ( i = 0; i < data.filters.length; i++ ) {
filterItem = new mw.rcfilters.dm.FilterItem( 
data.filters[ i ].name, {
group: group,
label: data.filters[ i ].label,
description: data.filters[ i 
].description,
-   selected: data.filters[ i ].selected
+   selected: data.filters[ i ].selected,
+   preference: data.filters[ i ].preference
} );
 
model.groups[ group ].filters.push( filterItem 
);
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 61c06ce..e3407d6 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -18,14 +18,45 @@
 * Initialize the filter and parameter states
 */
mw.rcfilters.Controller.prototype.initialize = function () {
-   var uri = new mw.Uri();
+   var paramData,
+   controller = this,
+   uri = new mw.Uri(),
+   prefParamStates = {};
 
+mw.user.options.set( 'hidemyself', 1 ); // Test purpose only!
+
+   // Go over filters and fetch preferences, if those are set up 
and exist
+   $.each( this.model.getFilterGroups(), function( group, data ) {
+   var prefValue;
+
+   if ( data.type === 'string_options' ) {
+   // Preference is set on the group
+   if ( data.preference ) {
+   prefValue = mw.user.options.get( 
data.preference );
+   if ( prefValue !== null ) {
+   prefParamStates[ group ] = 
prefValue;
+   }
+   }
+   } else if ( data.type === 'send_unselected_if_any' ) {
+   // Preference is set on the individual filters
+

[MediaWiki-commits] [Gerrit] labs...stashbot[master]: profile: make less output nicer

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325972 )

Change subject: profile: make less output nicer
..


profile: make less output nicer

I *hate* the default behavior of less to clear the screen on exit.
I almost always want to search around to find something interesting in
the file and then exit out to do something with that data. I don't want
to have to remember to cut-n-paste things before closing it.

Change-Id: I59f65c0b6cb82acd6d4947ab773aadb04cd14d33
---
M .profile
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.profile b/.profile
index 85bdb84..fa7cd33 100644
--- a/.profile
+++ b/.profile
@@ -4,4 +4,7 @@
 alias ls='command ls -bCF --color=auto'
 alias ll='ls -l'
 
+LESS=-FiQRwX
+export LESS
+
 source <(kubectl completion bash)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59f65c0b6cb82acd6d4947ab773aadb04cd14d33
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/stashbot
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: contrib: Add ldapPublicKey when creating dummy users

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325890 )

Change subject: contrib: Add ldapPublicKey when creating dummy users
..


contrib: Add ldapPublicKey when creating dummy users

Change-Id: Ib50e667e8098b3b1f426df21a386dd80c0159467
---
M contrib/add-user.sh
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/contrib/add-user.sh b/contrib/add-user.sh
index 2477bab..5ea67db 100755
--- a/contrib/add-user.sh
+++ b/contrib/add-user.sh
@@ -23,6 +23,7 @@
 objectClass: person
 objectClass: inetOrgPerson
 objectClass: organizationalPerson
+objectClass: ldapPublicKey
 objectClass: posixAccount
 objectClass: shadowAccount
 objectClass: top

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib50e667e8098b3b1f426df21a386dd80c0159467
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Show error counts on Special:LintErrors

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326061 )

Change subject: Show error counts on Special:LintErrors
..


Show error counts on Special:LintErrors

Change-Id: Ib49f2e391ca4b9d1eef5443c011d54a42921ce4e
---
M i18n/en.json
M i18n/qqq.json
M includes/Database.php
M includes/SpecialLintErrors.php
4 files changed, 32 insertions(+), 2 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 1771ae3..bc784f9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -26,6 +26,7 @@
"linter-category-stripped-tag-desc": "These pages have stripped tags.",
"linter-category-self-closed-tag": "Self-closed tags",
"linter-category-self-closed-tag-desc": "These pages have self-closed 
tags.",
+   "linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",
"apihelp-query+linterrors-description": "Get a list of lint errors",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 564034f..f963161 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -28,6 +28,7 @@
"linter-category-stripped-tag-desc": "Description of category",
"linter-category-self-closed-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/self-closed-tag]]",
"linter-category-self-closed-tag-desc": "Description of category",
+   "linter-numerrors": "Shown after a category link to indicate how many 
errors are in that category. $1 is the number of errors, and can be used for 
PLURAL.",
"linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is a link to edit that page, the link text is 
{{msg-mw|linker-page-edit}}",
"linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}} and 
{{msg-mw|linker-page-title-edit-template}}\n{{Identical|Edit}}",
"apihelp-query+linterrors-description": 
"{{doc-apihelp-description|query+linterrors}}",
diff --git a/includes/Database.php b/includes/Database.php
index e693ca4..11d61ab 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -39,10 +39,16 @@
private $pageId;
 
/**
+* @var CategoryManager
+*/
+   private $categoryManager;
+
+   /**
 * @param int $pageId
 */
public function __construct( $pageId ) {
$this->pageId = $pageId;
+   $this->categoryManager = new CategoryManager();
}
 
/**
@@ -116,7 +122,7 @@
private function serializeError( LintError $error ) {
return [
'linter_page' => $this->pageId,
-   'linter_cat' => ( new CategoryManager() 
)->getCategoryId( $error->category ),
+   'linter_cat' => $this->categoryManager->getCategoryId( 
$error->category ),
'linter_params' => FormatJson::encode( $error->params, 
false, FormatJson::ALL_OK ),
'linter_start' => $error->location[0],
'linter_end' => $error->location[1],
@@ -190,4 +196,25 @@
];
}
 
+   /**
+* @return int[]
+*/
+   public function getTotals() {
+   $rows = wfGetDB( DB_SLAVE )->select(
+   'linter',
+   [ 'linter_cat', 'COUNT(*) AS count' ],
+   [],
+   __METHOD__,
+   [ 'GROUP BY' => 'linter_cat' ]
+   );
+
+   // Initialize zero values
+   $ret = array_fill_keys( 
$this->categoryManager->getVisibleCategories(), 0 );
+   foreach ( $rows as $row ) {
+   $ret[$this->categoryManager->getCategoryName( 
$row->linter_cat )] = (int)$row->count;
+   }
+
+   return $ret;
+   }
+
 }
diff --git a/includes/SpecialLintErrors.php b/includes/SpecialLintErrors.php
index 78ecb6f..b2695a8 100644
--- a/includes/SpecialLintErrors.php
+++ b/includes/SpecialLintErrors.php
@@ -63,11 +63,12 @@
$linkRenderer = $this->getLinkRenderer();
$html = Html::openElement( 'ul' ) . "\n";
sort( $cats );
+   $totals = ( new Database( 0 ) )->getTotals();
foreach ( $cats as $cat ) {
$html .= Html::rawElement( 'li', [], 
$linkRenderer->makeKnownLink(
$this->getPageTitle( $cat ),
$this->msg( "linter-category-$cat" )->text()
-   ) ) . "\n";
+   ) . ' ' . $this->msg( "linter-numerrors" )->numParams( 
$totals[$cat] )->escaped() ) . "\n";
}
$html .= Html::closeElement( 'ul' );
$this->getOutput()->addHTML( $html );

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use the phan exit code directly

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326049 )

Change subject: Use the phan exit code directly
..


Use the phan exit code directly

Change-Id: Ic99e334576e350d11c57ac4b74085c99313401c4
---
M tests/phan/bin/phan
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/tests/phan/bin/phan b/tests/phan/bin/phan
index e9222a4..cfaf9a1 100755
--- a/tests/phan/bin/phan
+++ b/tests/phan/bin/phan
@@ -33,6 +33,8 @@
--output "$ROOT/tests/phan/issues/issues-${REV}" \
"${@}"
 
+EXIT_CODE="$?"
+
 # Re-link the latest file
 rm -f "${ISSUES}/latest"
 ln -s "${RUN}" "${ISSUES}/latest"
@@ -40,6 +42,4 @@
 # Output any issues that were found
 cat "${RUN}"
 
-if [ $(wc -l < ${RUN}) -ne 0 ]; then
-   exit 1
-fi
+exit $EXIT_CODE

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic99e334576e350d11c57ac4b74085c99313401c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use 1 processes instead of 4 for phan

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326043 )

Change subject: Use 1 processes instead of 4 for phan
..


Use 1 processes instead of 4 for phan

Running against mediawiki core phan needs around 1GB of memory
per process. >4GB is too excessive for a default setting. Instead
set the default to 1 process and add the ability for users to
select more processes on the command line.

Bug: T132636
Change-Id: I3d9fa462916fba519fe6d7f1916f881eefb6a942
---
M tests/phan/bin/phan
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/phan/bin/phan b/tests/phan/bin/phan
index 07caee6..e9222a4 100755
--- a/tests/phan/bin/phan
+++ b/tests/phan/bin/phan
@@ -31,9 +31,9 @@
--project-root-directory "$ROOT" \
--config-file "$ROOT/tests/phan/config.php" \
--output "$ROOT/tests/phan/issues/issues-${REV}" \
-   -j 4
+   "${@}"
 
-# Re-link the latest directory
+# Re-link the latest file
 rm -f "${ISSUES}/latest"
 ln -s "${RUN}" "${ISSUES}/latest"
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d9fa462916fba519fe6d7f1916f881eefb6a942
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Hashar 
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...parsoid[master]: [linter] Should be using ApiRequest.js

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326019 )

Change subject: [linter] Should be using ApiRequest.js
..


[linter] Should be using ApiRequest.js

 * Follow up to 4e1865f6

 * Also, cleanup posting some unused data.

Change-Id: Ia20e6c86a05ea9405ed67c8bd070db13098b5b2c
---
M lib/config/ParsoidConfig.js
M lib/logger/linter.js
M lib/mw/ApiRequest.js
M tests/mocha/lintertest.js
4 files changed, 85 insertions(+), 84 deletions(-)

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



diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index e43952d..ba87fcd 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -38,6 +38,8 @@
imgInfo: 40 * 1000,
// action=query=siteinfo
configInfo: 40 * 1000,
+   // action=record-lint
+   lint: 30 * 1000,
// Connection timeout setting for the http agent
connect: 5 * 1000,
},
diff --git a/lib/logger/linter.js b/lib/logger/linter.js
index a8d0558..dd8d74b 100644
--- a/lib/logger/linter.js
+++ b/lib/logger/linter.js
@@ -6,8 +6,7 @@
 
 'use strict';
 
-var request = require('request');
-var url = require('url');
+var LintRequest = require('../mw/ApiRequest.js').LintRequest;
 
 var Linter = function(env) {
this._env = env;
@@ -17,54 +16,32 @@
 Linter.prototype.logLintOutput = function(logData, cb) {
var env = this._env;
var enabledBuffer;
-   // Everything is enabled
-   if (env.conf.parsoid.linting === true) {
-   enabledBuffer = this.buffer;
-   } else if (Array.isArray(env.conf.parsoid.linting)) {
-   enabledBuffer = this.buffer.filter(function(item) {
-   return env.conf.parsoid.linting.indexOf(item.type) !== 
-1;
-   });
-   }
-
-   this.buffer = [];
-
-   if (env.page.id % env.conf.parsoid.linterAPISampling !== 0) {
-   return;
-   }
-
try {
-   if (env.conf.parsoid.linterSendAPI) {
-   // Only send the request if it is
-   // the latest revision
-   if (env.page.meta.revision.revid === env.page.latest) {
-   request.post(
-   env.conf.wiki.apiURI,
-   { form: {
-   data: 
JSON.stringify(enabledBuffer),
-   page: env.page.name,
-   revision: 
env.page.meta.revision.revid,
-   action: 'record-lint',
-   format: 'json',
-   formatversion: 2,
-   }, },
-   function(error, response, body) {
-   if (error) {
-   
env.log('error/lint-api', error);
-   } else if (response.statusCode 
!== 200) {
-   
env.log('error/lint-api', body);
-   } else {
-   try {
-   var b = 
JSON.parse(body);
-   if (b.error) {
-   
env.log('error/lint-api', body);
-   }
-   } catch (e) {
-   
env.log('error/lint-api', e);
-   }
-   }
-   }
-   );
-   }
+   // Everything is enabled
+   if (env.conf.parsoid.linting === true) {
+   enabledBuffer = this.buffer;
+   } else if (Array.isArray(env.conf.parsoid.linting)) {
+   enabledBuffer = this.buffer.filter(function(item) {
+   return 
env.conf.parsoid.linting.indexOf(item.type) !== -1;
+   });
+   }
+
+   this.buffer = [];
+
+   if (env.page.id % env.conf.parsoid.linterAPISampling !== 0) {
+   return;
+   }
+
+   if (env.conf.parsoid.linterSendAPI &&
+   

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: add model for news sites

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/323086 )

Change subject: Hygiene: add model for news sites
..


Hygiene: add model for news sites

Bug: T148444
Change-Id: I6dd6ec2f97d8688518907ef31af8654f83545109
---
M etc/feed/news-sites.js
1 file changed, 49 insertions(+), 26 deletions(-)

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



diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js
index 1dc0065..1a22cf7 100644
--- a/etc/feed/news-sites.js
+++ b/etc/feed/news-sites.js
@@ -1,32 +1,55 @@
 'use strict';
 
 /**
- * A hash map of (Wikipedia site) languages codes to objects with
- * information to control how to get news items for this particular
- * Wikipedia site.
- * The object consists of a title and a selector.
- * 1) The title is the page title used to scrape the news items from.
- * 2) The selector is used to query news headlines, usually found in the
- *first 'ul' but there are exceptions, often because the first 
- *contains template instructions instead of the actual news items,
- *or instead of a  Parsoid uses a . This selector should
- *not include specific categories like deaths, sports, etc.
+ * @private {!string} _title
+ * @private {!string} _headlineSelector
+ */
+class NewsSite {
+/**
+ * @param {!string} title
+ * @param {!string} headlineSelector
+ */
+constructor(title, headlineSelector) {
+this._title = title;
+this._headlineSelector = headlineSelector;
+}
+
+/**
+ * @return {!string} News source wiki portal or template title to scrape
+ *   data from
+ */
+get title() {
+return this._title;
+}
+
+/**
+ * @return {!string} Query selector for news headline containers (not
+ *   specific categories like deaths, sports, etc)
+ */
+get headlineSelector() {
+return this._headlineSelector;
+}
+}
+
+/**
+ * @type {{Object.}} A map of Wikipedia site languages codes
+ * to NewsSites
  */
 module.exports = {
-da: { title: 'Skabelon:Forside_aktuelle_begivenheder', headlineSelector: 
'div > li' },
-de: { title: 'Wikipedia:Hauptseite/Aktuelles', headlineSelector: 'li' },
-el: { title: 'Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', headlineSelector: 'li' 
},
-en: { title: 'Template:In_the_news', headlineSelector: 'ul[id^=mw] li' },
-es: { title: 'Portal:Actualidad',
-headlineSelector: 'table:nth-of-type(1) > tbody > tr > td > 
ul:nth-of-type(1) > li' },
-fi: { title: 'Malline:Uutisissa', headlineSelector: 'body > ul > li' },
-fr: { title: 'Modèle:Accueil_actualité', headlineSelector: 'div ul[id^=mw] 
> li' },
-he: { title: 'תבנית:חדשות_ואקטואליה', headlineSelector: 'body > ul > li' },
-ko: { title: '틀:새로_들어온_소식', headlineSelector: 'body > ul > li' },
-no: { title: 'Mal:Aktuelt', headlineSelector: 'ul > li' },
-pl: { title: 'Szablon:Aktualności', headlineSelector: 'ul:last-of-type > 
li' },
-pt: { title: 'Portal:Eventos_atuais', headlineSelector: 'div > ul > li' },
-ru: { title: 'Шаблон:Актуальные_события', headlineSelector: 'body > ul > 
li' },
-sv: { title: 'Portal:Huvudsida/Aktuella händelser', headlineSelector: 
'body > ul > li' },
-vi: { title: 'Bản_mẫu:Tin_tức', headlineSelector: 'ul > li' }
+da: new NewsSite('Skabelon:Forside_aktuelle_begivenheder', 'div > li'),
+de: new NewsSite('Wikipedia:Hauptseite/Aktuelles', 'li'),
+el: new NewsSite('Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', 'li'),
+en: new NewsSite('Template:In_the_news', 'ul[id^=mw] li'),
+es: new NewsSite('Portal:Actualidad',
+'table:nth-of-type(1) > tbody > tr > td > ul:nth-of-type(1) > li'),
+fi: new NewsSite('Malline:Uutisissa', 'body > ul > li'),
+fr: new NewsSite('Modèle:Accueil_actualité', 'div ul[id^=mw] > li'),
+he: new NewsSite('תבנית:חדשות_ואקטואליה', 'body > ul > li'),
+ko: new NewsSite('틀:새로_들어온_소식', 'body > ul > li'),
+no: new NewsSite('Mal:Aktuelt', 'ul > li'),
+pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li'),
+pt: new NewsSite('Portal:Eventos_atuais', 'div > ul > li'),
+ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li'),
+sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li'),
+vi: new NewsSite('Bản_mẫu:Tin_tức', 'ul > li')
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6dd6ec2f97d8688518907ef31af8654f83545109
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.5]: Bump JsonConfig for https://gerrit.wikimedia.org/r/#/c/326051/

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326060 )

Change subject: Bump JsonConfig for https://gerrit.wikimedia.org/r/#/c/326051/
..


Bump JsonConfig for https://gerrit.wikimedia.org/r/#/c/326051/

Change-Id: I2a64b963e845ca0eb33a1cf8b7e4b7d61f92a33e
---
M extensions/JsonConfig
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/JsonConfig b/extensions/JsonConfig
index 9feda92..cc2816a 16
--- a/extensions/JsonConfig
+++ b/extensions/JsonConfig
@@ -1 +1 @@
-Subproject commit 9feda92cd3448cc60b344a5dd07f811840c52402
+Subproject commit cc2816a3e1db80ba74dee6b88bb9d2090c04ea27

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a64b963e845ca0eb33a1cf8b7e4b7d61f92a33e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.5
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: update DescriptionEditSuccessViewTest screenshots

2016-12-08 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326063 )

Change subject: Fix: update DescriptionEditSuccessViewTest screenshots
..

Fix: update DescriptionEditSuccessViewTest screenshots

These replacements hardly differ from the original but were sufficiently
fuzzy to fail the diff in CI[0]. PageTitleListCardItemViewTest was
failing[1] but does not appear to be now

[0] 
https://integration.wikimedia.org/ci/job/apps-android-wikipedia-periodic-test/1101/artifact/app/screenshots-diff/
[1] 
https://integration.wikimedia.org/ci/job/apps-android-wikipedia-periodic-test/1087/artifact/app/screenshots-diff/

Change-Id: I4c41a3debea890334fd38b73a48c4472540a9bbd
---
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
10 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
index ca6c0ed..1d248c7 100644
--- 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
index ca6c0ed..1d248c7 100644
--- 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
index ca6c0ed..1d248c7 100644
--- 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
index ca6c0ed..1d248c7 100644
--- 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
index ca6c0ed..1d248c7 100644
--- 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: [linter] Use ext api for linter

2016-12-08 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326062 )

Change subject: WIP: [linter] Use ext api for linter
..

WIP: [linter] Use ext api for linter

Change-Id: Ib0ff28c14c953751f0c20985c790a2c7faa9dedb
---
M lib/config/MWParserEnvironment.js
M lib/config/ParsoidConfig.js
M lib/config/WikiConfig.js
M lib/config/extapi.js
M lib/ext/Cite/index.js
R lib/ext/Linter/index.js
M lib/index.js
M lib/logger/ParsoidLogger.js
D lib/logger/linter.js
M lib/wt2html/DOMPostProcessor.js
R tests/mocha/linter.js
11 files changed, 168 insertions(+), 188 deletions(-)


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

diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 6c90362..ed359e1 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -9,7 +9,6 @@
 var Batcher = require('../mw/Batcher.js').Batcher;
 var Util = require('../utils/Util.js').Util;
 var ParserPipelineFactory = 
require('../wt2html/parser.js').ParserPipelineFactory;
-var Linter = require('../logger/linter.js').Linter;
 var ParsoidLogger = require('../logger/ParsoidLogger.js').ParsoidLogger;
 
 /**
@@ -121,7 +120,6 @@
// Sets ids on nodes and stores data-* attributes in a JSON blob
this.pageBundle = false;
 
-   this.linter = new Linter(this);
this.configureLogging();
 
this.initializeForPageName(options.pageName || this.defaultPageName);
@@ -259,12 +257,8 @@
"fatal", "error", "warn", "info",
];
 
-   if (this.conf.parsoid.linting && !this.conf.parsoid.linterSendAPI) {
-   defaultLogLevels.push("lint");
-   }
-
// Configure backends
-   logger.registerLoggingBackends(defaultLogLevels, this.conf.parsoid, 
this.linter);
+   logger.registerLoggingBackends(defaultLogLevels, this.conf.parsoid);
 };
 
 // The default page name (true name, without wikitext url encoding)
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index ba87fcd..7569e96 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -222,16 +222,16 @@
 ParsoidConfig.prototype.addHTMLTemplateParameters = false;
 
 /**
- * @property {boolean|Array} linting Whether to enable linter Backend.
- * Or an array of enabled lint types
+ * @property {boolean|Array} linting
+ * Whether to enable linting. Or, an array of enabled lint types.
  */
 ParsoidConfig.prototype.linting = false;
 
 /**
  * @property {boolean} linterSendAPI
  * Whether to send lint errors to the MW API
- * Requires the MW Linter extension to be installed
- * and configured.
+ * Requires the MW Linter extension to be installed and configured.
+ * Otherwise, logs at level "info/lint" when linting is enabled.
  */
 ParsoidConfig.prototype.linterSendAPI = false;
 
diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index f266f53..c51b10d 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -524,10 +524,7 @@
this.extensionTags.set(tag.name.toLowerCase(), tag);
}, this);
if (ext.config.hasOwnProperty('domPostProcessor')) {
-   this.extensionPostProcessors.push({
-   tag:   tags.map(function(t) { return t.name; 
}).join('+'),
-   domPP: ext.config.domPostProcessor,
-   });
+   
this.extensionPostProcessors.push(ext.config.domPostProcessor);
}
if (ext.config.hasOwnProperty('styles')) {
ext.config.styles.forEach(function(s) {
diff --git a/lib/config/extapi.js b/lib/config/extapi.js
index 193e30e..15c3aee 100644
--- a/lib/config/extapi.js
+++ b/lib/config/extapi.js
@@ -31,8 +31,10 @@
Util: require('../utils/Util.js').Util,
DOMUtils: require('../utils/DOMUtils.js').DOMUtils,
JSUtils: require('../utils/jsutils.js').JSUtils,
+   DOMTraverser: 
require('../utils/DOMTraverser.js').DOMTraverser,
addMetaData: 
require('../wt2html/DOMPostProcessor.js').DOMPostProcessor.addMetaData,
defines: require('../wt2html/parser.defines.js'),
+   ApiRequest: require('../mw/ApiRequest.js'),
};
},
 };
diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index f523d80..abd0968 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -692,7 +692,10 @@
this.ref = new Ref(this);
this.references = new References(this);
this.config = {
-   domPostProcessor: this.domPostProcessor.bind(this),
+   domPostProcessor: {
+   name: 'cite',
+   proc: this.domPostProcessor.bind(this),
+ 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Show error counts on Special:LintErrors

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326061 )

Change subject: Show error counts on Special:LintErrors
..

Show error counts on Special:LintErrors

Change-Id: Ib49f2e391ca4b9d1eef5443c011d54a42921ce4e
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/Database.php
M includes/SpecialLintErrors.php
5 files changed, 34 insertions(+), 3 deletions(-)


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

diff --git a/extension.json b/extension.json
index f00ede7..42b7614 100644
--- a/extension.json
+++ b/extension.json
@@ -64,7 +64,8 @@
},
"LinterSubmitterWhitelist": {
"127.0.0.1": true
-   }
+   },
+   "LinterStatsdSampleFactor": false
},
"manifest_version": 1
 }
diff --git a/i18n/en.json b/i18n/en.json
index 1771ae3..bc784f9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -26,6 +26,7 @@
"linter-category-stripped-tag-desc": "These pages have stripped tags.",
"linter-category-self-closed-tag": "Self-closed tags",
"linter-category-self-closed-tag-desc": "These pages have self-closed 
tags.",
+   "linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",
"apihelp-query+linterrors-description": "Get a list of lint errors",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 564034f..f963161 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -28,6 +28,7 @@
"linter-category-stripped-tag-desc": "Description of category",
"linter-category-self-closed-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/self-closed-tag]]",
"linter-category-self-closed-tag-desc": "Description of category",
+   "linter-numerrors": "Shown after a category link to indicate how many 
errors are in that category. $1 is the number of errors, and can be used for 
PLURAL.",
"linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is a link to edit that page, the link text is 
{{msg-mw|linker-page-edit}}",
"linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}} and 
{{msg-mw|linker-page-title-edit-template}}\n{{Identical|Edit}}",
"apihelp-query+linterrors-description": 
"{{doc-apihelp-description|query+linterrors}}",
diff --git a/includes/Database.php b/includes/Database.php
index e693ca4..11d61ab 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -39,10 +39,16 @@
private $pageId;
 
/**
+* @var CategoryManager
+*/
+   private $categoryManager;
+
+   /**
 * @param int $pageId
 */
public function __construct( $pageId ) {
$this->pageId = $pageId;
+   $this->categoryManager = new CategoryManager();
}
 
/**
@@ -116,7 +122,7 @@
private function serializeError( LintError $error ) {
return [
'linter_page' => $this->pageId,
-   'linter_cat' => ( new CategoryManager() 
)->getCategoryId( $error->category ),
+   'linter_cat' => $this->categoryManager->getCategoryId( 
$error->category ),
'linter_params' => FormatJson::encode( $error->params, 
false, FormatJson::ALL_OK ),
'linter_start' => $error->location[0],
'linter_end' => $error->location[1],
@@ -190,4 +196,25 @@
];
}
 
+   /**
+* @return int[]
+*/
+   public function getTotals() {
+   $rows = wfGetDB( DB_SLAVE )->select(
+   'linter',
+   [ 'linter_cat', 'COUNT(*) AS count' ],
+   [],
+   __METHOD__,
+   [ 'GROUP BY' => 'linter_cat' ]
+   );
+
+   // Initialize zero values
+   $ret = array_fill_keys( 
$this->categoryManager->getVisibleCategories(), 0 );
+   foreach ( $rows as $row ) {
+   $ret[$this->categoryManager->getCategoryName( 
$row->linter_cat )] = (int)$row->count;
+   }
+
+   return $ret;
+   }
+
 }
diff --git a/includes/SpecialLintErrors.php b/includes/SpecialLintErrors.php
index 78ecb6f..b2695a8 100644
--- a/includes/SpecialLintErrors.php
+++ b/includes/SpecialLintErrors.php
@@ -63,11 +63,12 @@
$linkRenderer = $this->getLinkRenderer();
$html = Html::openElement( 'ul' ) . "\n";
sort( $cats );
+   $totals = ( new Database( 0 ) )->getTotals();
foreach ( $cats as $cat ) {
$html .= Html::rawElement( 'li', [], 
$linkRenderer->makeKnownLink(

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Temporarily disable centralauth-rename right

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325997 )

Change subject: Temporarily disable centralauth-rename right
..


Temporarily disable centralauth-rename right

Pending completion of T148242 - Fully populate local_user_id and
global_user_id fields in production

Stewards and global-renamers have been informed by mailing list.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a35af98..66778b9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8411,7 +8411,7 @@
],
'global-renamer' => [ // T142123, T71651
'autopatrol' => true,
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
],
'massmessage-sender' => [ // T59611, T142123
'autopatrol' => true,
@@ -8421,7 +8421,7 @@
'autopatrol' => true,
],
'steward' => [
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
'userrights-interwiki' => true,
],
'translationadmin' => [
@@ -8443,7 +8443,7 @@
'autopatrol' => true,
'centralauth-lock' => true,
'centralauth-oversight' => true,
-   'centralauth-rename' => true,
+   // 'centralauth-rename' => true,
'editcontentmodel' => true, // TODO: remove when a 
change for T85847 is deployed
'globalblock' => true,
'massmessage' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf748e384e320a69d3e04c05e7504aea41e9135a
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...experimental[master]: Updating dashboard poultry

2016-12-08 Thread Chelsyx (Code Review)
Chelsyx has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326059 )

Change subject: Updating dashboard poultry
..


Updating dashboard poultry

Change-Id: I51da2775ec943f79b385c8044fdab4c3c06577cc
---
M shiny-server/poultry
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/shiny-server/poultry b/shiny-server/poultry
index 263ab79..c4e1f7d 16
--- a/shiny-server/poultry
+++ b/shiny-server/poultry
@@ -1 +1 @@
-Subproject commit 263ab7937a776d1aa4b349a2bc35732117c5225c
+Subproject commit c4e1f7d9bc6f46365151f67c0da28f0f72c595b5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51da2775ec943f79b385c8044fdab4c3c06577cc
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/experimental
Gerrit-Branch: master
Gerrit-Owner: Chelsyx 
Gerrit-Reviewer: Chelsyx 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.5]: Bump JsonConfig for https://gerrit.wikimedia.org/r/#/c/326051/

2016-12-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326060 )

Change subject: Bump JsonConfig for https://gerrit.wikimedia.org/r/#/c/326051/
..

Bump JsonConfig for https://gerrit.wikimedia.org/r/#/c/326051/

Change-Id: I2a64b963e845ca0eb33a1cf8b7e4b7d61f92a33e
---
M extensions/AbuseFilter
M extensions/AccountAudit
M extensions/ActiveAbstract
M extensions/AntiSpoof
M extensions/Babel
M extensions/BetaFeatures
M extensions/Calendar
M extensions/Campaigns
M extensions/CategoryTree
M extensions/CentralAuth
M extensions/CentralNotice
M extensions/CharInsert
M extensions/CheckUser
M extensions/CirrusSearch
M extensions/Cite
M extensions/CleanChanges
M extensions/CodeEditor
M extensions/CodeReview
M extensions/Collection
M extensions/CommonsMetadata
M extensions/ConfirmEdit
M extensions/ContactPage
M extensions/ContributionTracking
M extensions/CreditsSource
M extensions/DisableAccount
M extensions/Disambiguator
M extensions/DismissableSiteNotice
M extensions/DonationInterface
M extensions/DoubleWiki
M extensions/DynamicSidebar
M extensions/Echo
M extensions/EducationProgram
M extensions/Elastica
M extensions/EventLogging
M extensions/ExtensionDistributor
M extensions/FeaturedFeeds
M extensions/FlaggedRevs
M extensions/Flow
M extensions/FundraiserLandingPage
M extensions/GWToolset
M extensions/Gadgets
M extensions/GeoCrumbs
M extensions/GeoData
M extensions/GettingStarted
M extensions/GlobalBlocking
M extensions/GlobalCssJs
M extensions/GlobalUsage
M extensions/GoogleNewsSitemap
M extensions/GuidedTour
M extensions/ImageMap
M extensions/InputBox
M extensions/Insider
M extensions/Interwiki
M extensions/JsonConfig
M extensions/Kartographer
M extensions/LabeledSectionTransclusion
M extensions/LandingCheck
M extensions/LdapAuthentication
M extensions/LiquidThreads
M extensions/Listings
M extensions/LocalisationUpdate
M extensions/MapSources
M extensions/MassMessage
M extensions/Math
M extensions/MobileApp
M extensions/MobileFrontend
M extensions/MoodBar
M extensions/MultimediaViewer
M extensions/MwEmbedSupport
M extensions/NavigationTiming
M extensions/NewUserMessage
M extensions/Nuke
M extensions/OATHAuth
M extensions/OAuth
M extensions/OpenStackManager
M extensions/PageImages
M extensions/PageTriage
M extensions/PagedTiffHandler
M extensions/ParserFunctions
M extensions/PdfHandler
M extensions/Poem
M extensions/PoolCounter
M extensions/Popups
M extensions/ProofreadPage
M extensions/Quiz
M extensions/RSS
M extensions/RelatedArticles
M extensions/RelatedSites
M extensions/Renameuser
M extensions/Score
M extensions/Scribunto
M extensions/SearchExtraNS
M extensions/SecurePoll
M extensions/SemanticForms
M extensions/ShortUrl
M extensions/SiteMatrix
M extensions/SpamBlacklist
M extensions/SubPageList3
M extensions/SubpageSortkey
M extensions/SyntaxHighlight_GeSHi
M extensions/TemplateData
M extensions/TemplateSandbox
M extensions/TextExtracts
M extensions/Thanks
M extensions/TimedMediaHandler
M extensions/TitleBlacklist
M extensions/TocTree
M extensions/TorBlock
M extensions/Translate
M extensions/TranslationNotifications
M extensions/TrustedXFF
M extensions/UnicodeConverter
M extensions/UniversalLanguageSelector
M extensions/UploadWizard
M extensions/UserMerge
M extensions/VectorBeta
M extensions/VipsScaler
M extensions/VisualEditor
M extensions/WikiEditor
M extensions/WikiLove
M extensions/Wikidata
M extensions/WikimediaEvents
M extensions/WikimediaIncubator
M extensions/WikimediaMaintenance
M extensions/WikimediaMessages
M extensions/ZeroBanner
M extensions/ZeroPortal
M extensions/cldr
M extensions/intersection
M extensions/timeline
M extensions/wikihiero
M skins/Vector
132 files changed, 132 insertions(+), 132 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/326060/1

diff --git a/extensions/AbuseFilter b/extensions/AbuseFilter
index 4610df2..3dcbde1 16
--- a/extensions/AbuseFilter
+++ b/extensions/AbuseFilter
@@ -1 +1 @@
-Subproject commit 4610df20996bf761e2938524e07f3e06e8dc2de0
+Subproject commit 3dcbde17c1772f47624b3cda98e723d2603da481
diff --git a/extensions/AccountAudit b/extensions/AccountAudit
index fcb7e14..ee4f6b5 16
--- a/extensions/AccountAudit
+++ b/extensions/AccountAudit
@@ -1 +1 @@
-Subproject commit fcb7e14870fa17e852b670052b8e42e4028ae6c9
+Subproject commit ee4f6b5538caba32c7eaa998ba2c4684938e9493
diff --git a/extensions/ActiveAbstract b/extensions/ActiveAbstract
index 91346a0..85dd9a5 16
--- a/extensions/ActiveAbstract
+++ b/extensions/ActiveAbstract
@@ -1 +1 @@
-Subproject commit 91346a02a74c8577f8d52e2baa8cde8b4742379d
+Subproject commit 85dd9a51e3a0472db2f839677f49b5358e63125b
diff --git a/extensions/AntiSpoof b/extensions/AntiSpoof
index a758c3f..87d2796 16
--- a/extensions/AntiSpoof
+++ b/extensions/AntiSpoof
@@ -1 +1 @@
-Subproject commit a758c3ffaa3c53b357b75c4a48e3d79b41230780
+Subproject commit 87d2796a93eac7b2174c6a07f0a002f907b14391

[MediaWiki-commits] [Gerrit] wikimedia...experimental[master]: Updating dashboard poultry

2016-12-08 Thread Chelsyx (Code Review)
Chelsyx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326059 )

Change subject: Updating dashboard poultry
..

Updating dashboard poultry

Change-Id: I51da2775ec943f79b385c8044fdab4c3c06577cc
---
M shiny-server/poultry
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/experimental 
refs/changes/59/326059/1

diff --git a/shiny-server/poultry b/shiny-server/poultry
index 263ab79..c4e1f7d 16
--- a/shiny-server/poultry
+++ b/shiny-server/poultry
@@ -1 +1 @@
-Subproject commit 263ab7937a776d1aa4b349a2bc35732117c5225c
+Subproject commit c4e1f7d9bc6f46365151f67c0da28f0f72c595b5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51da2775ec943f79b385c8044fdab4c3c06577cc
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/experimental
Gerrit-Branch: master
Gerrit-Owner: Chelsyx 

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


[MediaWiki-commits] [Gerrit] research/recommendation-api[master]: Add related articles recommendation type

2016-12-08 Thread Nschaaf (Code Review)
Nschaaf has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326058 )

Change subject: Add related articles recommendation type
..

Add related articles recommendation type

Bug: T151793
Change-Id: I5009638f89eb4e57d0472592415231c7f79c6af2
---
A recommendation/api/external_data/__init__.py
R recommendation/api/external_data/fetcher.py
A recommendation/api/external_data/wikidata.py
A recommendation/api/types/related_articles/__init__.py
A recommendation/api/types/related_articles/candidate_finder.py
A recommendation/api/types/related_articles/embedding.py
A recommendation/api/types/related_articles/related_articles.py
A recommendation/api/types/related_articles/test/__init__.py
A recommendation/api/types/related_articles/test/test_api.py
M recommendation/api/types/translation/candidate_finders.py
M recommendation/api/types/translation/filters.py
M recommendation/api/types/translation/pageviews.py
M recommendation/api/types/translation/test/test_candidate_finders.py
M recommendation/api/types/translation/test/test_pageviews.py
M recommendation/data/recommendation.ini
M recommendation/data/recommendation.wsgi
M setup.py
17 files changed, 452 insertions(+), 123 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/recommendation-api 
refs/changes/58/326058/1

diff --git a/recommendation/api/external_data/__init__.py 
b/recommendation/api/external_data/__init__.py
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/recommendation/api/external_data/__init__.py
diff --git a/recommendation/api/types/translation/data_fetcher.py 
b/recommendation/api/external_data/fetcher.py
similarity index 69%
rename from recommendation/api/types/translation/data_fetcher.py
rename to recommendation/api/external_data/fetcher.py
index 0918af3..76e8b6b 100644
--- a/recommendation/api/types/translation/data_fetcher.py
+++ b/recommendation/api/external_data/fetcher.py
@@ -47,43 +47,6 @@
 return list(set(page['title'].replace(' ', '_') for page in pages if 
'disambiguation' in page.get('pageprops', {})))
 
 
-def get_wikidata_sitelinks(source, target, titles):
-"""
-Returns a dictionary mapping from titles to wikidata ids
-for the articles in source missing in target
-"""
-endpoint = configuration.get_config_value('endpoints', 'wikidata')
-params = configuration.get_config_dict('wikidata_params')
-params['sites'] = params['sites'].format(source=source)
-params['titles'] = '|'.join(titles)
-
-title_id_dict = {}
-try:
-data = post(endpoint, data=params)
-except ValueError:
-log.info('Bad Wikidata API response')
-return title_id_dict
-
-source_wiki = '{}wiki'.format(source)
-target_wiki = '{}wiki'.format(target)
-
-if 'entities' not in data:
-log.info('None of the titles have a Wikidata Item')
-return title_id_dict
-
-for wikidata_id, v in data['entities'].items():
-sitelinks = v.get('sitelinks', None)
-if sitelinks:
-if source_wiki in sitelinks and target_wiki not in sitelinks:
-title = sitelinks[source_wiki]['title'].replace(' ', '_')
-title_id_dict[title] = wikidata_id
-
-if len(title_id_dict) == 0:
-log.info('None of the source articles missing in the target')
-
-return title_id_dict
-
-
 def get_pageviews(source, title):
 """
 Get pageview counts for a single article from pageview api
@@ -111,3 +74,37 @@
 def get_relative_timestamp(relative_days):
 date_format = configuration.get_config_value('single_article_pageviews', 
'date_format')
 return (datetime.datetime.utcnow() + 
datetime.timedelta(days=relative_days)).strftime(date_format)
+
+
+def wiki_search(source, seed, count, morelike=False):
+"""
+A client to the Mediawiki search API
+"""
+endpoint, params = build_wiki_search(source, seed, count, morelike)
+try:
+response = get(endpoint, params=params)
+except ValueError:
+log.info('Could not search for articles related to seed in %s. Choose 
another language.', source)
+return []
+
+if 'query' not in response or 'search' not in response['query']:
+log.info('Could not search for articles related to seed in %s. Choose 
another language.', source)
+return []
+
+response = response['query']['search']
+results = [r['title'].replace(' ', '_') for r in response]
+if len(results) == 0:
+log.info('No articles similar to %s in %s. Try another seed.', seed, 
source)
+return []
+
+return results
+
+
+def build_wiki_search(source, seed, count, morelike):
+endpoint = configuration.get_config_value('endpoints', 
'wikipedia').format(source=source)
+params = configuration.get_config_dict('wiki_search_params')
+params['srlimit'] = count
+if morelike:
+seed = 'morelike:' + seed
+params['srsearch'] = seed
+return 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add warnings for various query parsing failures

2016-12-08 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326057 )

Change subject: Add warnings for various query parsing failures
..

Add warnings for various query parsing failures

Bug: T149142
Change-Id: Ia574888bc5ee2669701ead8b2f0aec1d9d5c49ea
---
M i18n/en.json
M i18n/qqq.json
M includes/Query/FileNumericFeature.php
M includes/Query/GeoFeature.php
M includes/Query/InCategoryFeature.php
M includes/Query/LanguageFeature.php
M includes/Query/MoreLikeFeature.php
M includes/Query/RegexInSourceFeature.php
M includes/Search/SearchContext.php
M includes/Searcher.php
M tests/unit/Query/BaseSimpleKeywordFeatureTest.php
M tests/unit/Query/FileFeatureTest.php
M tests/unit/Query/GeoFeatureTest.php
M tests/unit/Query/InCategoryFeatureTest.php
A tests/unit/Query/LanguageFeatureTest.php
M tests/unit/Query/MoreLikeFeatureTest.php
A tests/unit/Query/RegexInSourceFeatureTest.php
17 files changed, 378 insertions(+), 46 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 389ba76..e83d58e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -55,5 +55,16 @@
"cirrussearch-completion-profile-classic-pref-name": "Classic prefix 
search",
"cirrussearch-completion-profile-classic-pref-desc": "No typo 
correction. Matches the beginning of titles.",
"cirrussearch-timed-out": "The search timed out, only partial results 
are available.",
-   "cirrussearch-regex-timed-out": "The regex search timed out, only 
partial results are available. Try simplifying your regular expression to get 
complete results."
+   "cirrussearch-regex-timed-out": "The regex search timed out, only 
partial results are available. Try simplifying your regular expression to get 
complete results.",
+   "cirrussearch-file-numeric-feature-not-a-number": "The search term '$1' 
requires numeric values, but '$2' was provided.",
+   "cirrusesarch-file-numeric-feature-multi-argument-w-sign": "The search 
term '$1' doesn't allow providing multiple arguments and a sign with '$2'.",
+   "cirrussearch-feature-not-available": "The search keyword '$1' is not 
enabled on this wiki.",
+   "cirrussearch-geo-feature-invalid-coordinates": "The geo coordinates 
'$2' provided to '$1' could not be parsed.",
+   "cirrussearch-geo-feature-invalid-distance": "The geo distance '$2' 
provided to '$1' could not be parsed.",
+   "cirrussearch-geo-feature-unknown-title": "The title '$2' provided to 
'$1' does not exist.",
+   "cirrussearch-geo-feature-title-no-coordinates": "The title '$2' 
provided to '$1' does not have any coordinates",
+   "cirrussearch-feature-too-many-conditions": "Too many conditions 
provided to '$1', truncating to $2.",
+   "cirrussearch-incategory-feature-no-valid-categories": "No valid 
categories were provided to '$1'.",
+   "cirrussearch-mlt-feature-no-valid-titles": "No valid titles provided 
to '$1'.",
+   "cirrussearch-mlt-not-configured": "The '$1' feature is misconfigured. 
Ask admin to fix $wgCirrusSearchMoreLikeThisFields"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3df6adc..59aa699 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -65,4 +65,15 @@
"cirrussearch-completion-profile-classic-pref-desc": "Description of 
the completion profile classic.",
"cirrussearch-timed-out": "Message displayed to user when the search 
query gave up due to timeout before completing.",
"cirrussearch-regex-timed-out": "Message displayed to user when the 
regex search query gave up due to timeout before completing."
+   "cirrussearch-file-numeric-feature-not-a-number": "Warning shown to 
users when a search keyword for numeric file features used something other than 
a number.",
+   "cirrusesarch-file-numeric-feature-multi-argument-w-sign": "Warning 
shown to users when a search keyword for numeric file features used multiple 
arguments with an invalid qualifier.",
+   "cirrussearch-feature-not-available": "Warning shown to users when an 
unavailable search keyword is used.",
+   "cirrussearch-geo-feature-invalid-coordinates": "Warning shown to users 
when providing invalid coordinates to a geo keyword.",
+   "cirrussearch-geo-feature-invalid-distance": "Warning shown to users 
when providing invalid distance qualifier to a geo keyword.",
+   "cirrussearch-geo-feature-unknown-title": "Warning shown to users when 
providing an unknown title to a geo keyword.",
+   "cirrussearch-geo-feature-title-no-coordinates": "Warning shown to 
users when providing an article title without coordinates to a geo keyword.",
+   "cirrussearch-feature-too-many-conditions": "Warning shown to users 
when more conditions than are allowed were provided to a keyword feature.",
+   "cirrussearch-incategory-feature-no-valid-categories": "Warning shown 
to 

[MediaWiki-commits] [Gerrit] wikimedia/textcat[master]: Allow specification of minimum length for classification

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/323998 )

Change subject: Allow specification of minimum length for classification
..


Allow specification of minimum length for classification

Also, normalize capitalization in help text.

Bug: T149318
Change-Id: Id19cedccf9a0025fac230e67997564ceae7a34c0
---
M TextCat.php
M catus.php
M tests/TextCatTest.php
3 files changed, 72 insertions(+), 9 deletions(-)

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



diff --git a/TextCat.php b/TextCat.php
index 55e1ade..1ede010 100644
--- a/TextCat.php
+++ b/TextCat.php
@@ -33,6 +33,13 @@
private $langFiles = array();
 
/**
+* Minimum Input Length to be considered for
+* classification
+* @var int
+*/
+   private $minInputLength = 0;
+
+   /**
 * @param int $maxNgrams
 */
public function setMaxNgrams( $maxNgrams ) {
@@ -44,6 +51,13 @@
 */
public function setMinFreq( $minFreq ) {
$this->minFreq = $minFreq;
+   }
+
+   /**
+* @param int $minInputLength
+*/
+   public function setMinInputLength( $minInputLength ) {
+   $this->minInputLength = $minInputLength;
}
 
/**
@@ -155,12 +169,19 @@
 *   Sorted by ascending score, with first 
result being the best.
 */
public function classify( $text, $candidates = null ) {
+   $results = array();
+
+   // strip non-word characters before checking for min length, 
don't assess empty strings
+   $wordLength = mb_strlen( preg_replace( 
"/[{$this->wordSeparator}]+/", "", $text ) );
+   if ( $wordLength < $this->minInputLength || $wordLength == 0 ) {
+   return $results;
+   }
+
$inputgrams = array_keys( $this->createLM( $text, 
$this->maxNgrams ) );
if ( $candidates ) {
// flip for more efficient lookups
$candidates = array_flip( $candidates );
}
-   $results = array();
foreach ( $this->langFiles as $language => $langFile ) {
if ( $candidates && !isset( $candidates[$language] ) ) {
continue;
diff --git a/catus.php b/catus.php
index b42fa7c..7be34ef 100644
--- a/catus.php
+++ b/catus.php
@@ -4,35 +4,37 @@
  */
 require_once __DIR__.'/TextCat.php';
 
-$options = getopt( 'a:c:d:f:t:u:l:h' );
+$options = getopt( 'a:c:d:f:j:l:t:u:h' );
 
 if ( isset( $options['h'] ) ) {
$help = <setMinInputLength( intval( $options['j'] ) );
+}
 
 $input = isset( $options['l'] ) ? $options['l'] : file_get_contents( 
"php://stdin" );
 if ( !empty( $options['c'] ) ) {
diff --git a/tests/TextCatTest.php b/tests/TextCatTest.php
index 348a673..c6ce0e7 100644
--- a/tests/TextCatTest.php
+++ b/tests/TextCatTest.php
@@ -137,4 +137,41 @@
 $this->assertEquals( array_keys( $this->multicat2->classify( 
$testLine, $res2 ) ),
 array_values( $res2 ) 
);
 }
+
+public function minInputLengthData()
+{
+return array(
+  array( 'eso es español',
+   array( 'spanish', 'catalan', 'portuguese' ), 
null, ),
+  array( 'this is english',
+   array( 'english', 'german' ), null, ),
+  array( 'c\'est français',
+   array( 'french', 'portuguese', 'romanian', 
'catalan' ), null, ),
+  // numbers and spaces get stripped, so result should be an empty 
array
+  // regardless of min input length
+  array( '56 8 49564 83 9',
+   array( 'french', 'portuguese', 'romanian', 
'catalan' ), array(), ),
+);
+}
+
+/**
+ * @dataProvider minInputLengthData
+* @param string $testLine
+* @param array $lang
+* @param array $res
+ */
+public function testMinInputLength( $testLine, $lang, $res )
+{
+   if ( !isset( $res ) ) {
+   $res = $lang;
+   }
+   # should get results when min input len is 0
+   $minLength = $this->testcat->setMinInputLength(0);
+   $this->assertEquals( array_keys( $this->testcat->classify( 
$testLine, $res ) ),
+array_values( $res ) );
+# should get no results when min input len is more than the length of 
the string
+$minLength = $this->testcat->setMinInputLength(mb_strlen($testLine) + 
1);
+$this->assertEquals( array_keys( $this->testcat->classify( $testLine, 
$res ) ),
+ 

[MediaWiki-commits] [Gerrit] integration/config[master]: Fix job links for debian-glue-non-voting too

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326050 )

Change subject: Fix job links for debian-glue-non-voting too
..


Fix job links for debian-glue-non-voting too

Change-Id: I9b54c37fe8a9e7da62d0c9c4b74a72aaebb6e703
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 6b5e206..06a7bea 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -675,7 +675,7 @@
 
   # Experimental building of Debian packages
   # based on jenkins-debian-glue
-  - name: ^debian-glue$
+  - name: ^debian-glue(-non-voting)?$
 # Point directly to artifacts
 success-pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/'
 # FIXME maybe restrict just to debian/ changes:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b54c37fe8a9e7da62d0c9c4b74a72aaebb6e703
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] integration/config[master]: [integration/uprightdiff] make debian-glue voting

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326048 )

Change subject: [integration/uprightdiff] make debian-glue voting
..


[integration/uprightdiff] make debian-glue voting

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 9e5d531..6b5e206 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -664,11 +664,6 @@
   - project: '^VisualEditor/VisualEditor$'
 branch: (?:^REL1_26$)
 
-  - name: ^debian-glue-non-voting$
-skip-if:
-  - project: '^integration/uprightdiff$'
-branch: (?!debian$)
-
   # Always trigger rake for operations/puppet since it runs puppetlint
   - name: ^operations-puppet-rake-jessie$
 files:
@@ -685,6 +680,9 @@
 success-pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/'
 # FIXME maybe restrict just to debian/ changes:
 #files: 'debian/.*'
+skip-if:
+  - project: '^integration/uprightdiff$'
+branch: (?!debian$)
 
   - name: erblint-HEAD
 files:
@@ -1358,10 +1356,9 @@
 
   - name: integration/uprightdiff
 test:
-  - debian-glue-non-voting
+  - debian-glue
 gate-and-submit:
-  # FIXME will be debian-glue eventually T152577
-  - noop
+  - debian-glue
 
   - name: integration/zuul
 test:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e883734a074b100df748826aee5bd0da878c484
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] apps...wikipedia[master]: Update: SDK Build Tools to v25.0.1

2016-12-08 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326056 )

Change subject: Update: SDK Build Tools to v25.0.1
..

Update: SDK Build Tools to v25.0.1

https://developer.android.com/studio/releases/build-tools.html

Change-Id: I48b4cf7234e0006bd9da12c54561cb9f2c8aad58
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 9a7e498..d470754 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -42,7 +42,7 @@
 // Keep version in sync with /project.properties
 compileSdkVersion 25
 
-buildToolsVersion '25.0.0'
+buildToolsVersion '25.0.1'
 compileOptions {
 sourceCompatibility = JAVA_VERSION
 targetCompatibility = JAVA_VERSION

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48b4cf7234e0006bd9da12c54561cb9f2c8aad58
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[wmf/1.29.0-wmf.5]: Track mw.ext.data.get() calls

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326051 )

Change subject: Track mw.ext.data.get() calls
..


Track mw.ext.data.get() calls

Track pages that use external data via jsonconfig_getdata
page property (contains count of the unique pages requested)

Bug: T152661
Change-Id: Ia055c2feff85824d8ecf038ce825ddced1da48a9
---
M includes/JCLuaLibrary.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/JCLuaLibrary.php b/includes/JCLuaLibrary.php
index db3d8c0..1bc5ee6 100644
--- a/includes/JCLuaLibrary.php
+++ b/includes/JCLuaLibrary.php
@@ -59,6 +59,10 @@
if ( $content === null ) {
$this->incrementExpensiveFunctionCount();
$content = JCSingleton::getContent( $jct );
+
+   $prop = 'jsonconfig_getdata';
+   $output = $this->getParser()->getOutput();
+   $output->setProperty( $prop, 1 + ( 
$output->getProperty( $prop ) ? : 0 ) );
}
 
if ( !$content ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia055c2feff85824d8ecf038ce825ddced1da48a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: wmf/1.29.0-wmf.5
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: fix or suppress miscellaneous lint

2016-12-08 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326055 )

Change subject: Hygiene: fix or suppress miscellaneous lint
..

Hygiene: fix or suppress miscellaneous lint

Change-Id: Ib0fdf6a5e79b377f79c1d651a5152631b756e888
---
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
D app/src/main/java/org/wikipedia/model/EnumStrMap.java
D app/src/main/res/color/nav_item_selector_dark.xml
D app/src/main/res/color/nav_item_selector_light.xml
D app/src/main/res/layout/inflate_header_nav_drawer.xml
M app/src/main/res/layout/view_description_edit.xml
M app/src/main/res/values/dimens.xml
7 files changed, 2 insertions(+), 98 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 4078712..420ccd7 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -153,7 +153,7 @@
 coordinator.setFeedUpdateListener(null);
 swipeRefreshLayout.setOnRefreshListener(null);
 feedView.removeOnScrollListener(feedScrollListener);
-feedView.setCallback((FeedAdapter.Callback) null);
+feedView.setCallback(null);
 feedView.setAdapter(null);
 feedAdapter = null;
 unbinder.unbind();
diff --git a/app/src/main/java/org/wikipedia/model/EnumStrMap.java 
b/app/src/main/java/org/wikipedia/model/EnumStrMap.java
deleted file mode 100644
index 2ab5ba1..000
--- a/app/src/main/java/org/wikipedia/model/EnumStrMap.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.wikipedia.model;
-
-import android.support.annotation.NonNull;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class EnumStrMap & EnumStr> {
-@NonNull private final Map map;
-
-public EnumStrMap(@NonNull Class enumeration) {
-map = strToEnumMap(enumeration);
-}
-
-@NonNull public T get(@NonNull String str) {
-T status = map.get(str);
-if (status == null) {
-throw new IllegalArgumentException("str=" + str);
-}
-return status;
-}
-
-@NonNull private Map strToEnumMap(@NonNull Class 
enumeration) {
-Map ret = new HashMap<>();
-for (T value : enumeration.getEnumConstants()) {
-ret.put(value.str(), value);
-}
-return ret;
-}
-}
\ No newline at end of file
diff --git a/app/src/main/res/color/nav_item_selector_dark.xml 
b/app/src/main/res/color/nav_item_selector_dark.xml
deleted file mode 100644
index 042e303..000
--- a/app/src/main/res/color/nav_item_selector_dark.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-http://schemas.android.com/apk/res/android;>
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/color/nav_item_selector_light.xml 
b/app/src/main/res/color/nav_item_selector_light.xml
deleted file mode 100644
index 8d13e2e..000
--- a/app/src/main/res/color/nav_item_selector_light.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-http://schemas.android.com/apk/res/android;>
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/inflate_header_nav_drawer.xml 
b/app/src/main/res/layout/inflate_header_nav_drawer.xml
deleted file mode 100644
index 4b5b8e9..000
--- a/app/src/main/res/layout/inflate_header_nav_drawer.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-http://schemas.android.com/apk/res/android;
-xmlns:app="http://schemas.android.com/apk/res-auto;
-xmlns:tools="http://schemas.android.com/tools;
-android:layout_width="match_parent"
-android:layout_height="wrap_content"
-android:minHeight="@dimen/nav_drawer_header_height"
-android:orientation="vertical"
-android:background="@color/foundation_blue">
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_description_edit.xml 
b/app/src/main/res/layout/view_description_edit.xml
index 198dcee..ba29420 100644
--- a/app/src/main/res/layout/view_description_edit.xml
+++ b/app/src/main/res/layout/view_description_edit.xml
@@ -78,7 +78,7 @@
 android:textAlignment="viewStart"
 android:gravity="start"
 app:counterEnabled="true"
-app:counterMaxLength="140"
+app:counterMaxLength="@integer/description_max_chars"
 
app:counterOverflowTextAppearance="@style/CounterOverflowTextAppearance">
 8dp
 0dp
 
-150dp
-
 3dp
 
 
 12

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

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

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: move lint rules to lint config

2016-12-08 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326054 )

Change subject: Hygiene: move lint rules to lint config
..

Hygiene: move lint rules to lint config

Also exclude the Facebook directory from all linting. Note: some linting
is inconsistent between Android Studio and Gradle:
https://code.google.com/p/android/issues/detail?id=191631

Change-Id: Ibf2365b4ef905437e7aab85559d3ef6a73967756
---
M app/build.gradle
M app/lint.xml
2 files changed, 11 insertions(+), 8 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 965b455..9a7e498 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -128,14 +128,6 @@
 }
 }
 
-// while we still have lint errors; remove once those are fixed
-lintOptions {
-disable 'MissingTranslation'
-disable 'InvalidPackage' // required by Butter Knife
-warning 'MissingQuantity'
-warning 'ImpliedQuantity'
-}
-
 packagingOptions {
 exclude 'META-INF/services/javax.annotation.processing.Processor' // 
required by Butter Knife
 
diff --git a/app/lint.xml b/app/lint.xml
index b58940a..1f7c745 100644
--- a/app/lint.xml
+++ b/app/lint.xml
@@ -18,4 +18,15 @@
 
 
 
+
+
+
+
+
+ 
+
+
+
+
+
 
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf2365b4ef905437e7aab85559d3ef6a73967756
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: visualdiff: Install uprightdiff package

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326053 )

Change subject: visualdiff: Install uprightdiff package
..

visualdiff: Install uprightdiff package

Once the packaged version has been fully tested in a visualdiff run, we
can remove the build packages and the manual git clone.

Change-Id: Id1cfb083e9105764542cd7c92556a67d0e2ff37e
---
M modules/visualdiff/manifests/init.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/326053/1

diff --git a/modules/visualdiff/manifests/init.pp 
b/modules/visualdiff/manifests/init.pp
index ee0bed1..d7458fb 100644
--- a/modules/visualdiff/manifests/init.pp
+++ b/modules/visualdiff/manifests/init.pp
@@ -8,6 +8,9 @@
 $visualdiff_packages = [
 'nodejs',
 'npm',
+'uprightdiff',
+# TODO: Remove packages needed for building once
+# packaged version of uprightdiff is tested
 'build-essential',
 'g++',
 'libopencv-highgui-dev',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Update for API error i18n

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/321454 )

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: Ibe7cb02d551ac2f85ee01edbf2b40a966ed42b74
---
M i18n/en.json
M i18n/qqq.json
M includes/ApiQueryExtracts.php
3 files changed, 36 insertions(+), 7 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index d70979a..db1eccf 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -10,5 +10,7 @@
"apihelp-query+extracts-param-intro": "Return only content before the 
first section.",
"apihelp-query+extracts-param-plaintext": "Return extracts as plain 
text instead of limited HTML.",
"apihelp-query+extracts-param-sectionformat": "How to format sections 
in plaintext mode:\n;plain:No formatting.\n;wiki:Wikitext-style formatting (== 
like this ==).\n;raw:This module's internal representation (section titles 
prefixed with ASCII 1ASCII 2section levelASCII 
2ASCII 1).",
-   "apihelp-query+extracts-example-1": "Get a 175-character extract"
+   "apihelp-query+extracts-example-1": "Get a 175-character extract",
+   "apiwarn-textextracts-limit": "exlimit was too large for a 
whole article extracts request, lowered to $1.",
+   "apiwarn-textextracts-unsupportedmodel": "$1 has content model $2, 
which is not supported; returning an empty extract."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 791975d..d4c22f7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,5 +8,7 @@
"apihelp-query+extracts-param-intro": 
"{{doc-apihelp-param|query+extracts|intro}}",
"apihelp-query+extracts-param-plaintext": 
"{{doc-apihelp-param|query+extracts|plaintext}}",
"apihelp-query+extracts-param-sectionformat": 
"{{doc-apihelp-param|query+extracts|sectionformat}}",
-   "apihelp-query+extracts-example-1": 
"{{doc-apihelp-example|query+extracts}}"
+   "apihelp-query+extracts-example-1": 
"{{doc-apihelp-example|query+extracts}}",
+   "apiwarn-textextracts-limit": "{{doc-apierror}}\n\nParameters:\n* $1 - 
Limit that will be used",
+   "apiwarn-textextracts-unsupportedmodel": 
"{{doc-apierror}}\n\nParameters:\n* $1 - Page title\n* $2 - Content model"
 }
diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index 944b649..f80b90b 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -28,6 +28,7 @@
 use ParserCache;
 use ParserOptions;
 use Title;
+use ApiUsageException;
 use UsageException;
 use User;
 use WikiPage;
@@ -68,13 +69,15 @@
$limit = intval( $params['limit'] );
if ( $limit > 1 && !$params['intro'] ) {
$limit = 1;
-   $this->setWarning( "exlimit was too large for a whole 
article extracts request, lowered to $limit" );
+   if ( is_callable( [ $this, 'addWarning' ] ) ) {
+   $this->addWarning( [ 
'apiwarn-textextracts-limit', $limit ] );
+   } else {
+   $this->setWarning( "exlimit was too large for a 
whole article extracts request, lowered to $limit" );
+   }
}
if ( isset( $params['continue'] ) ) {
$continue = intval( $params['continue'] );
-   if ( $continue < 0 || $continue > count( $titles ) ) {
-   $this->dieUsageMsg( '_badcontinue' );
-   }
+   $this->dieContinueUsageIf( $continue < 0 || $continue > 
count( $titles ) );
$titles = array_slice( $titles, $continue, null, true );
}
$count = 0;
@@ -114,7 +117,13 @@
private function getExtract( Title $title ) {
$contentModel = $title->getContentModel();
if ( !in_array( $contentModel, $this->supportedContentModels, 
true ) ) {
-   $this->setWarning( "{$title->getPrefixedDBkey()} has 
content model '$contentModel', which is not supported; returning an empty 
extract." );
+   if ( is_callable( [ $this, 'addWarning' ] ) ) {
+   $this->addWarning(
+   [ 
'apiwarn-textextracts-unsupportedmodel', wfEscapeWikiText( 
$title->getPrefixedText() ), $contentModel ]
+   );
+   } else {
+   $this->setWarning( 
"{$title->getPrefixedDBkey()} has content model '$contentModel', which is not 
supported; returning an empty extract." );
+   }
return '';
}
 
@@ -207,6 +216,22 @@
'BC' => [],
'Types' => [],
   

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update graphoid to a96a362

2016-12-08 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326052 )

Change subject: Update graphoid to a96a362
..

Update graphoid to a96a362

List of changes:
14587a7 Test node 6 & latest
a96a362 v0.1.13 updated to latest shared-lib
xxx Update node module dependencies

Change-Id: I1cd376ae822aa81f8336527156e8a9c50e9de6ba
---
D node_modules/bl/node_modules/readable-stream/.npmignore
D node_modules/bl/node_modules/readable-stream/.travis.yml
D node_modules/bl/node_modules/readable-stream/LICENSE
D node_modules/bl/node_modules/readable-stream/duplex.js
D node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
D node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
D node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
D node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
D node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
D node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE
D 
node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch
D 
node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
D node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js
D node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore
D node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml
D node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile
D 
node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json
D node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js
D node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
D node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
D 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
D 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore
D 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE
D 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
D 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
D 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
D 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
D node_modules/bl/node_modules/readable-stream/package.json
D node_modules/bl/node_modules/readable-stream/passthrough.js
D node_modules/bl/node_modules/readable-stream/readable.js
D node_modules/bl/node_modules/readable-stream/transform.js
D node_modules/bl/node_modules/readable-stream/writable.js
M node_modules/bunyan/Makefile
M node_modules/bunyan/bin/bunyan
M node_modules/bunyan/lib/bunyan.js
M node_modules/bunyan/node_modules/dtrace-provider/dtrace_probe.cc
M node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.cc
M node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.h
M 
node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s
M node_modules/bunyan/node_modules/dtrace-provider/package.json
A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-1.test.js
A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-1_fire.js
A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-2.test.js
A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-2_fire.js
M node_modules/bunyan/node_modules/moment/LICENSE
M node_modules/bunyan/node_modules/moment/locale/af.js
A node_modules/bunyan/node_modules/moment/locale/ar-dz.js
M node_modules/bunyan/node_modules/moment/locale/ar-ly.js
M node_modules/bunyan/node_modules/moment/locale/ar-ma.js
M node_modules/bunyan/node_modules/moment/locale/ar-sa.js
M node_modules/bunyan/node_modules/moment/locale/ar-tn.js
M node_modules/bunyan/node_modules/moment/locale/ar.js
M node_modules/bunyan/node_modules/moment/locale/az.js
M node_modules/bunyan/node_modules/moment/locale/be.js
M node_modules/bunyan/node_modules/moment/locale/bg.js
M node_modules/bunyan/node_modules/moment/locale/bn.js
M node_modules/bunyan/node_modules/moment/locale/bo.js
M node_modules/bunyan/node_modules/moment/locale/br.js
M node_modules/bunyan/node_modules/moment/locale/bs.js
M 

[MediaWiki-commits] [Gerrit] mediawiki...TemplateSandbox[master]: Update for API error i18n

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/321453 )

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3. Since I've decided to have TemplateSandbox's master only
support core master, this just depends on the master patch instead of
trying to maintain BC.

This also cleans up some BC stuff that isn't needed with the new "master
only supports master" policy.

Depends-On: Iae0e2ce3bd42dd4776a9779664086119ac188412
Change-Id: Id457605134756897a4c52aded7f21c11fbba30f3
---
M SpecialTemplateSandbox.php
M TemplateSandbox.hooks.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 16 insertions(+), 38 deletions(-)

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



diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index 8cc539d..1d84f82 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -94,20 +94,14 @@
$pageLang = $this->title->getPageLanguage();
$attribs = [ 'lang' => $pageLang->getCode(), 'dir' => 
$pageLang->getDir(),
'class' => 'mw-content-' . $pageLang->getDir() 
];
-   $this->output->setText( Html::rawElement( 'div', 
$attribs,
-   is_callable( [ $this->output, 'getRawText' ] )
-   ? $this->output->getRawText()
-   : $this->output->getText()
-   ) );
+   $this->output->setText( Html::rawElement( 'div', 
$attribs, $this->output->getRawText() ) );
 
$output = $this->getOutput();
$output->addParserOutput( $this->output );
 
-   if ( is_callable( 'EditPage::getPreviewLimitReport' ) ) 
{
-   $output->addHTML( Html::rawElement( 'div', [ 
'class' => 'limitreport' ],
-   EditPage::getPreviewLimitReport( 
$this->output ) ) );
-   $output->addModules( 
'mediawiki.collapseFooterLists' );
-   }
+   $output->addHTML( Html::rawElement( 'div', [ 'class' => 
'limitreport' ],
+   EditPage::getPreviewLimitReport( $this->output 
) ) );
+   $output->addModules( 'mediawiki.collapseFooterLists' );
 
$titleText = $this->output->getTitleText();
if ( strval( $titleText ) !== '' ) {
diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index ac6c3c4..23c9f18 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -58,12 +58,7 @@
return true;
}
 
-   // EditPage::getContext() is available since 1.28+
-   if ( method_exists( $editpage, 'getContext' ) ) {
-   $context = $editpage->getContext();
-   } else {
-   $context = $editpage->getArticle()->getContext();
-   }
+   $context = $editpage->getContext();
 
if ( $editpage->templatesandbox_template === '' ||
$editpage->templatesandbox_template === null
@@ -233,12 +228,7 @@
] ),
];
 
-   // EditPage::getContext() is available since 1.28+
-   if ( method_exists( $editpage, 'getContext' ) ) {
-   $context = $editpage->getContext();
-   } else {
-   $context = $editpage->getArticle()->getContext();
-   }
+   $context = $editpage->getContext();
 
$text = $context->msg( 'templatesandbox-editform-text' );
if ( !$text->isDisabled() ) {
@@ -385,11 +375,7 @@
 
if ( ( $params['title'] === null ) !== ( $params['text'] === 
null ) ) {
$p = $module->getModulePrefix();
-   $module->dieUsage(
-   "The parameters {$p}templatesandboxtitle and 
{$p}templatesandboxtext must " .
-   'both be specified or both be omitted',
-   'invalidparammix'
-   );
+   $module->dieWithError( [ 
'templatesandbox-apierror-titleandtext', $p ], 'invalidparammix' );
}
 
$prefixes = [];
@@ -399,8 +385,8 @@
$prefixTitle->isExternal()
) {
$p = $module->getModulePrefix();
-   $module->dieUsage(
-   "Invalid {$p}templatesandboxprefix: 
$prefix", "bad_{$p}templatesandboxprefix"
+   $module->dieWithError(
+

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable structured data in production

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326046 )

Change subject: Enable structured data in production
..


Enable structured data in production

Bug: T148745
Change-Id: I670e20bc9a26ffd19e182b85673d30e1e1c3d6d5
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
4 files changed, 88 insertions(+), 70 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 61ed16d..496152f 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -167,69 +167,13 @@
 
 
 // Enable Tabular data namespace on Commons - T148745
-if ( $wmgEnableTabularData ) {
-   // Safety: before extension.json, these values were initialized by 
JsonConfig.php
-   if ( !isset( $wgJsonConfigModels ) ) {
-   $wgJsonConfigModels = [];
-   }
-   if ( !isset( $wgJsonConfigs ) ) {
-   $wgJsonConfigs = [];
-   }
-   // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
-   $wgJsonConfigModels['Tabular.JsonConfig'] = 
'JsonConfig\JCTabularContent';
-   $wgJsonConfigs['Tabular.JsonConfig'] = [
-   'namespace' => 486,
-   'nsName' => 'Data',
-   // page name must end in ".tab", and contain at least one symbol
-   'pattern' => '/.\.tab$/',
-   'license' => 'CC0-1.0+',
-   'isLocal' => false,
-   ];
-   if ( $wgDBname == 'commonswiki' ) {
-   // Ensure we have a stable cross-wiki title resolution
-   // See JCSingleton::parseTitle()
-   $wgJsonConfigInterwikiPrefix = "meta";
-   $wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
-   } else {
-   $wgJsonConfigInterwikiPrefix = "commons";
-   $wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
-   'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
-   ];
-   }
-   $wgJsonConfigEnableLuaSupport = true;
+if ( $wmgEnableTabularData && $wgDBname !== 'commonswiki' ) {
+   $wgJsonConfigs['Tabular.JsonConfig']['remote']['url'] = 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php';
 }
 
 // Enable Map (GeoJSON) data namespace on Commons - T149548
-if ( $wmgEnableMapData ) {
-   // Safety: before extension.json, these values were initialized by 
JsonConfig.php
-   if ( !isset( $wgJsonConfigModels ) ) {
-   $wgJsonConfigModels = [];
-   }
-   if ( !isset( $wgJsonConfigs ) ) {
-   $wgJsonConfigs = [];
-   }
-   // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
-   $wgJsonConfigModels['Map.JsonConfig'] = 'JsonConfig\JCMapDataContent';
-   $wgJsonConfigs['Map.JsonConfig'] = [
-   'namespace' => 486,
-   'nsName' => 'Data',
-   // page name must end in ".map", and contain at least one symbol
-   'pattern' => '/.\.map$/',
-   'license' => 'CC0-1.0+',
-   'isLocal' => false,
-   ];
-   if ( $wgDBname == 'commonswiki' ) {
-   // Ensure we have a stable cross-wiki title resolution
-   // See JCSingleton::parseTitle()
-   $wgJsonConfigInterwikiPrefix = "meta";
-   $wgJsonConfigs['Map.JsonConfig']['store'] = true;
-   } else {
-   $wgJsonConfigInterwikiPrefix = "commons";
-   $wgJsonConfigs['Map.JsonConfig']['remote'] = [
-   'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
-   ];
-   }
-   $wgJsonConfigEnableLuaSupport = true;
+if ( $wmgEnableMapData && $wgDBname !== 'commonswiki' ) {
+   $wgJsonConfigs['Map.JsonConfig']['remote']['url'] = 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php';
 }
 
 
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2cd9d9e..3efcb3e 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3104,6 +3104,74 @@
$wgUsersNotifiedOnAllChanges[] = 'Yurik';
 }
 
+// Enable Tabular data namespace on Commons - T148745
+// TODO: $wmgEnableMapData and $wmgEnableTabularData should probably be merged 
into one
+if ( $wmgEnableTabularData ) {
+   // Safety: before extension.json, these values were initialized by 
JsonConfig.php
+   if ( !isset( $wgJsonConfigModels ) ) {
+   $wgJsonConfigModels = [];
+   }
+   if ( !isset( $wgJsonConfigs ) ) {
+   $wgJsonConfigs = [];
+   }
+   // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
+   $wgJsonConfigModels['Tabular.JsonConfig'] = 

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Track mw.ext.data.get() calls

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325878 )

Change subject: Track mw.ext.data.get() calls
..


Track mw.ext.data.get() calls

Track pages that use external data via jsonconfig_getdata
page property (contains count of the unique pages requested)

Bug: T152661
Change-Id: Ia055c2feff85824d8ecf038ce825ddced1da48a9
---
M includes/JCLuaLibrary.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/JCLuaLibrary.php b/includes/JCLuaLibrary.php
index db3d8c0..1bc5ee6 100644
--- a/includes/JCLuaLibrary.php
+++ b/includes/JCLuaLibrary.php
@@ -59,6 +59,10 @@
if ( $content === null ) {
$this->incrementExpensiveFunctionCount();
$content = JCSingleton::getContent( $jct );
+
+   $prop = 'jsonconfig_getdata';
+   $output = $this->getParser()->getOutput();
+   $output->setProperty( $prop, 1 + ( 
$output->getProperty( $prop ) ? : 0 ) );
}
 
if ( !$content ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia055c2feff85824d8ecf038ce825ddced1da48a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
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...JsonConfig[wmf/1.29.0-wmf.5]: Track mw.ext.data.get() calls

2016-12-08 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326051 )

Change subject: Track mw.ext.data.get() calls
..

Track mw.ext.data.get() calls

Track pages that use external data via jsonconfig_getdata
page property (contains count of the unique pages requested)

Bug: T152661
Change-Id: Ia055c2feff85824d8ecf038ce825ddced1da48a9
---
M includes/JCLuaLibrary.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/includes/JCLuaLibrary.php b/includes/JCLuaLibrary.php
index db3d8c0..1bc5ee6 100644
--- a/includes/JCLuaLibrary.php
+++ b/includes/JCLuaLibrary.php
@@ -59,6 +59,10 @@
if ( $content === null ) {
$this->incrementExpensiveFunctionCount();
$content = JCSingleton::getContent( $jct );
+
+   $prop = 'jsonconfig_getdata';
+   $output = $this->getParser()->getOutput();
+   $output->setProperty( $prop, 1 + ( 
$output->getProperty( $prop ) ? : 0 ) );
}
 
if ( !$content ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia055c2feff85824d8ecf038ce825ddced1da48a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: wmf/1.29.0-wmf.5
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Fix job links for debian-glue-non-voting too

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326050 )

Change subject: Fix job links for debian-glue-non-voting too
..

Fix job links for debian-glue-non-voting too

Change-Id: I9b54c37fe8a9e7da62d0c9c4b74a72aaebb6e703
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/50/326050/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 6b5e206..06a7bea 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -675,7 +675,7 @@
 
   # Experimental building of Debian packages
   # based on jenkins-debian-glue
-  - name: ^debian-glue$
+  - name: ^debian-glue(-non-voting)?$
 # Point directly to artifacts
 success-pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/'
 # FIXME maybe restrict just to debian/ changes:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b54c37fe8a9e7da62d0c9c4b74a72aaebb6e703
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use the phan exit code directly

2016-12-08 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326049 )

Change subject: Use the phan exit code directly
..

Use the phan exit code directly

Change-Id: Ic99e334576e350d11c57ac4b74085c99313401c4
---
M tests/phan/bin/phan
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/tests/phan/bin/phan b/tests/phan/bin/phan
index e9222a4..cfaf9a1 100755
--- a/tests/phan/bin/phan
+++ b/tests/phan/bin/phan
@@ -33,6 +33,8 @@
--output "$ROOT/tests/phan/issues/issues-${REV}" \
"${@}"
 
+EXIT_CODE="$?"
+
 # Re-link the latest file
 rm -f "${ISSUES}/latest"
 ln -s "${RUN}" "${ISSUES}/latest"
@@ -40,6 +42,4 @@
 # Output any issues that were found
 cat "${RUN}"
 
-if [ $(wc -l < ${RUN}) -ne 0 ]; then
-   exit 1
-fi
+exit $EXIT_CODE

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

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

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


[MediaWiki-commits] [Gerrit] integration/uprightdiff[debian]: Initial debianization

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325726 )

Change subject: Initial debianization
..


Initial debianization

Bug: T152577
Change-Id: Id5a1021789892141a4e9d41ee535ee0bb348e4f4
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/gbp.conf
A debian/rules
A debian/source/format
7 files changed, 96 insertions(+), 0 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..9984f20
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+uprightdiff (1.0-1) jessie-wikimedia; urgency=medium
+
+  * Initial Release
+
+ -- Kunal Mehta   Tue, 06 Dec 2016 16:01:21 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..4320944
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,22 @@
+Source: uprightdiff
+Section: devel
+Priority: optional
+Maintainer: Kunal Mehta 
+Build-Depends: debhelper (>= 9), libopencv-highgui-dev, 
libboost-program-options-dev
+Standards-Version: 3.9.8
+Homepage: https://phabricator.wikimedia.org/diffusion/IURD/
+#Vcs-Git: https://anonscm.debian.org/collab-maint/uprightdiff.git
+Vcs-Browser: https://phabricator.wikimedia.org/diffusion/IURD/
+
+Package: uprightdiff
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: examine differences between two images
+ This utility examines the differences between two images.
+ It produces a visual annotation and reports statistics.
+ .
+ It is optimised for images which come from browser screenshots.
+ It analyses the image for vertical motion, and annotates connected
+ regions that have the same vertical displacement. Then it highlights
+ any remaining ("residual") differences which are not explained by
+ vertical motion on a pixel-by-pixel basis.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..042d085
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,43 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: uprightdiff
+Source: https://phabricator.wikimedia.org/diffusion/IURD/
+
+Files: *
+Copyright: 2000-2015, Intel Corporation, all rights reserved.
+   2009-2011, Willow Garage Inc., all rights reserved.
+   2009-2015, NVIDIA Corporation, all rights reserved.
+   2010-2013, Advanced Micro Devices, Inc., all rights reserved.
+   2015, OpenCV Foundation, all rights reserved.
+   2015, Itseez Inc., all rights reserved.
+   2016, Tim Starling
+License: BSD-3-Clause
+
+Files: debian/*
+Copyright: 2016 Kunal Mehta 
+License: BSD-3-Clause
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE HOLDERS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 000..424194d
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+debian-branch = debian
+sign-tags = true
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..0d6f53e
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS 

[MediaWiki-commits] [Gerrit] integration/config[master]: [integration/uprightdiff] make debian-glue voting

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326048 )

Change subject: [integration/uprightdiff] make debian-glue voting
..

[integration/uprightdiff] make debian-glue voting

Change-Id: I4e883734a074b100df748826aee5bd0da878c484
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/48/326048/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 9e5d531..fa53fae 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -664,7 +664,7 @@
   - project: '^VisualEditor/VisualEditor$'
 branch: (?:^REL1_26$)
 
-  - name: ^debian-glue-non-voting$
+  - name: ^debian-glue$
 skip-if:
   - project: '^integration/uprightdiff$'
 branch: (?!debian$)
@@ -1358,10 +1358,9 @@
 
   - name: integration/uprightdiff
 test:
-  - debian-glue-non-voting
+  - debian-glue
 gate-and-submit:
-  # FIXME will be debian-glue eventually T152577
-  - noop
+  - debian-glue
 
   - name: integration/zuul
 test:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e883734a074b100df748826aee5bd0da878c484
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: 'damaging' filter on Special:RC / Special:Watchlist

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324507 )

Change subject: 'damaging' filter on Special:RC / Special:Watchlist
..


'damaging' filter on Special:RC / Special:Watchlist

This filter is a not a typical show/hide toggle.
It is url-driven only for the moment and will be used
by the new RC filters (ERI project).

It accepts one or many of the following values:
  likelygood, maybebad, likelybad, verylikelybad
Values are separated by a comma.

Each value is associated with a range of probabilities
that are compared against the damaging test. They
can be configured using $wgOresDamagingLevels.

Bug: T149734
Change-Id: Ida6ab5e24a6da9487b10996f7edb6b9014c9184e
---
M extension.json
M includes/Hooks.php
M tests/phpunit/includes/HooksTest.php
3 files changed, 144 insertions(+), 79 deletions(-)

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



diff --git a/extension.json b/extension.json
index d9e7428..b12c36a 100644
--- a/extension.json
+++ b/extension.json
@@ -148,6 +148,12 @@
"soft": 0.70,
"hard": 0.50
},
+   "OresDamagingLevels": {
+   "likelygood": { "min": 0, "max": 0.55 },
+   "maybebad": { "min": 0.16, "max": 1 },
+   "likelybad": { "min": 0.75, "max": 1 },
+   "verylikelybad": { "min": 0.92, "max": 1 }
+   },
"OresGoodfaithLevels": {
"good" : { "min": 0.35, "max": 1 },
"maybebad" : { "min": 0, "max": 0.65 },
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 979ad18..3f64f3c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -113,6 +113,8 @@
'msg' => 'ores-damaging-filter',
'default' => $default,
];
+
+   $filters['damaging'] = [ 'msg' => false, 'default' => 
'all' ];
}
 
if ( self::isModelEnabled( 'goodfaith' ) ) {
@@ -138,40 +140,73 @@
$name, array &$tables, array &$fields, array &$conds,
array &$query_options, array &$join_conds, FormOptions $opts
) {
-   global $wgUser;
+   global $wgUser, $wgOresDamagingLevels, $wgOresGoodfaithLevels;
+
if ( !self::oresEnabled( $wgUser ) ) {
return true;
}
 
if ( self::isModelEnabled( 'damaging' ) ) {
-   $hideNonDamaging = $opts->getValue( 'hidenondamaging' );
 
-   self::hideNonDamagingFilter(
+   self::joinWithOresTables(
+   'damaging',
+   'rc_this_oldid',
$tables,
$fields,
-   $conds,
-   $query_options,
-   $join_conds,
-   $hideNonDamaging,
-   'rc_this_oldid',
-   $wgUser
+   $join_conds
);
 
-   if ( $hideNonDamaging ) {
+   $damaging = $opts->getValue( 'damaging' );
+   $hideNonDamaging = $opts->getValue( 'hidenondamaging' );
+
+   $filtering = false;
+
+   if ( $damaging !== 'all' ) {
+   $damagingCondition = self::buildRangeFilter(
+   'damaging',
+   $damaging,
+   $wgOresDamagingLevels
+   );
+   if ( $damagingCondition ) {
+   $conds[] = $damagingCondition;
+   $filtering = true;
+   }
+   } elseif ( $hideNonDamaging ) {
+   self::hideNonDamagingFilter( $fields, $conds, 
$hideNonDamaging, $wgUser );
+   $filtering = true;
+   }
+
+   if ( $filtering ) {
+   $join_conds["ores_damaging_mdl"][0] = 'INNER 
JOIN';
+   $join_conds["ores_damaging_cls"][0] = 'INNER 
JOIN';
// Performance hack: add STRAIGHT_JOIN (146111)
$query_options[] = 'STRAIGHT_JOIN';
}
}
 
if ( self::isModelEnabled( 'goodfaith' ) ) {
-   self::goodfaithFilter(
-   $tables,
-   $fields,
-   

[MediaWiki-commits] [Gerrit] integration/config[master]: [integration/uprightdiff] non voting debian-glue job

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325930 )

Change subject: [integration/uprightdiff] non voting debian-glue job
..


[integration/uprightdiff] non voting debian-glue job

Repository is being debianized which will let us run tests
automagically: https://gerrit.wikimedia.org/r/#/c/325726/

Add debian-glue-non-voting to the test pipeline.  To satistfy test, add
a noop job in gate-and-submit, will have to be replaced by a voting
debian-glue job whenever the Debianization is done and pass.

Bug: T152577
Change-Id: I83c0d14f74f6d2e37861229343e63362c3b63984
---
M zuul/layout.yaml
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index fdf54e4..9e5d531 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -664,6 +664,11 @@
   - project: '^VisualEditor/VisualEditor$'
 branch: (?:^REL1_26$)
 
+  - name: ^debian-glue-non-voting$
+skip-if:
+  - project: '^integration/uprightdiff$'
+branch: (?!debian$)
+
   # Always trigger rake for operations/puppet since it runs puppetlint
   - name: ^operations-puppet-rake-jessie$
 files:
@@ -1351,6 +1356,13 @@
   - jshint
   - jsonlint
 
+  - name: integration/uprightdiff
+test:
+  - debian-glue-non-voting
+gate-and-submit:
+  # FIXME will be debian-glue eventually T152577
+  - noop
+
   - name: integration/zuul
 test:
   - debian-glue-non-voting

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83c0d14f74f6d2e37861229343e63362c3b63984
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
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/core[wmf/1.29.0-wmf.5]: Bump JsonConfig to wmf/1.29.0-wmf.5 tip

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326045 )

Change subject: Bump JsonConfig to wmf/1.29.0-wmf.5 tip
..


Bump JsonConfig to wmf/1.29.0-wmf.5 tip

Change-Id: I4e357009763d1c0a9b4674441b9282e452325a99
---
M extensions/JsonConfig
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/JsonConfig b/extensions/JsonConfig
index dd2be33..9feda92 16
--- a/extensions/JsonConfig
+++ b/extensions/JsonConfig
@@ -1 +1 @@
-Subproject commit dd2be334b568a54cf8fc3165f5e82023bc5b4df7
+Subproject commit 9feda92cd3448cc60b344a5dd07f811840c52402

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e357009763d1c0a9b4674441b9282e452325a99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.5
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Yurik 
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...ReplaceText[master]: Added nsall option. Fixed namespace and dry run handling.

2016-12-08 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326047 )

Change subject: Added nsall option. Fixed namespace and dry run handling.
..

Added nsall option. Fixed namespace and dry run handling.

Change-Id: I9d3b9a87191eea7096dc022671e271781fc7febf
---
M replaceAll.php
1 file changed, 37 insertions(+), 24 deletions(-)


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

diff --git a/replaceAll.php b/replaceAll.php
index 2b75fa5..89e65d0 100755
--- a/replaceAll.php
+++ b/replaceAll.php
@@ -73,8 +73,10 @@
$this->addOption( "summary", "Alternate edit summary. (%r is 
where to ".
" place the replacement text, %f the text to look 
for.)",
false, true, 's' );
-   $this->addOption( "ns", "Comma separated namespaces to search 
in. ".
-   "(Main)" );
+   $this->addOption( "nsall", "Search all canonical namespaces 
(false). If true, this option overrides the ns option.",
+   false, false, 'a' );
+   $this->addOption( "ns", "Comma separated namespaces to search 
in (Main) .",
+   false, true );
$this->addOption( "replacements", "File containing the list of 
replacements to " .
"be made.  Fields in the file are tab-separated.  See 
--show-file-format " .
"for more information.",
@@ -209,32 +211,34 @@
}
 
protected function getNamespaces() {
-   $namespaces = array( NS_MAIN );
-   $names = $this->getOption( "ns" );
-   $namespace = MWNamespace::getCanonicalNamespaces();
-   $namespace[0] = "main";
-   $nsflip = array_flip( $namespace );
-   if ( $names ) {
-   $namespaces =
-   array_filter(
-   array_map(
-   function( $namespace ) use ( 
$namespace, $nsflip ) {
-   if ( is_numeric( 
$namespace )
-   && 
isset( $namespace[ $namespace ] )
-   ) {
-   return intval( 
$namespace );
+   $nsall = $this->getOption( "nsall" );
+   $ns = $this->getOption( "ns" );
+   if ( !$nsall && !$ns ) {
+   $namespaces = [ NS_MAIN ];
+   } else {
+   $canonical = MWNamespace::getCanonicalNamespaces();
+   $canonical[NS_MAIN] = "_";
+   $namespaces = array_flip( $canonical );
+   if ( !$nsall ) {
+   $namespaces = array_map(
+   function( $n ) use ( $canonical, 
$namespaces ) {
+   if ( is_numeric( $n ) ) {
+   if ( isset( $canonical[ 
$n ] ) ) {
+   return intval( 
$n );
}
-   $namespace = 
strtolower( $namespace );
-   var_dump( 
$nsflip[$namespace] );
-   if ( isset( $nsflip[ 
$namespace ] ) ) {
-   return $nsflip[ 
$namespace ];
+   } else {
+   if ( isset( 
$namespaces[ $n ] ) ) {
+   return 
$namespaces[ $n ];
}
-   return null;
-   }, explode( ",", $names ) ),
+   }
+   return null;
+   }, explode( ",", $ns ) );
+   $namespaces = array_filter(
+   $namespaces,
function( $val ) {
return $val !== null;
-   }
-   );
+   } );
+   }
}
return $namespaces;
}
@@ -334,6 +338,11 @@
$wgShowExceptionDetails = true;
 
if ( 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable structured data in production

2016-12-08 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326046 )

Change subject: Enable structured data in production
..

Enable structured data in production

Bug: T148745
Change-Id: I670e20bc9a26ffd19e182b85673d30e1e1c3d6d5
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
4 files changed, 82 insertions(+), 70 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 61ed16d..496152f 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -167,69 +167,13 @@
 
 
 // Enable Tabular data namespace on Commons - T148745
-if ( $wmgEnableTabularData ) {
-   // Safety: before extension.json, these values were initialized by 
JsonConfig.php
-   if ( !isset( $wgJsonConfigModels ) ) {
-   $wgJsonConfigModels = [];
-   }
-   if ( !isset( $wgJsonConfigs ) ) {
-   $wgJsonConfigs = [];
-   }
-   // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
-   $wgJsonConfigModels['Tabular.JsonConfig'] = 
'JsonConfig\JCTabularContent';
-   $wgJsonConfigs['Tabular.JsonConfig'] = [
-   'namespace' => 486,
-   'nsName' => 'Data',
-   // page name must end in ".tab", and contain at least one symbol
-   'pattern' => '/.\.tab$/',
-   'license' => 'CC0-1.0+',
-   'isLocal' => false,
-   ];
-   if ( $wgDBname == 'commonswiki' ) {
-   // Ensure we have a stable cross-wiki title resolution
-   // See JCSingleton::parseTitle()
-   $wgJsonConfigInterwikiPrefix = "meta";
-   $wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
-   } else {
-   $wgJsonConfigInterwikiPrefix = "commons";
-   $wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
-   'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
-   ];
-   }
-   $wgJsonConfigEnableLuaSupport = true;
+if ( $wmgEnableTabularData && $wgDBname !== 'commonswiki' ) {
+   $wgJsonConfigs['Tabular.JsonConfig']['remote']['url'] = 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php';
 }
 
 // Enable Map (GeoJSON) data namespace on Commons - T149548
-if ( $wmgEnableMapData ) {
-   // Safety: before extension.json, these values were initialized by 
JsonConfig.php
-   if ( !isset( $wgJsonConfigModels ) ) {
-   $wgJsonConfigModels = [];
-   }
-   if ( !isset( $wgJsonConfigs ) ) {
-   $wgJsonConfigs = [];
-   }
-   // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
-   $wgJsonConfigModels['Map.JsonConfig'] = 'JsonConfig\JCMapDataContent';
-   $wgJsonConfigs['Map.JsonConfig'] = [
-   'namespace' => 486,
-   'nsName' => 'Data',
-   // page name must end in ".map", and contain at least one symbol
-   'pattern' => '/.\.map$/',
-   'license' => 'CC0-1.0+',
-   'isLocal' => false,
-   ];
-   if ( $wgDBname == 'commonswiki' ) {
-   // Ensure we have a stable cross-wiki title resolution
-   // See JCSingleton::parseTitle()
-   $wgJsonConfigInterwikiPrefix = "meta";
-   $wgJsonConfigs['Map.JsonConfig']['store'] = true;
-   } else {
-   $wgJsonConfigInterwikiPrefix = "commons";
-   $wgJsonConfigs['Map.JsonConfig']['remote'] = [
-   'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
-   ];
-   }
-   $wgJsonConfigEnableLuaSupport = true;
+if ( $wmgEnableMapData && $wgDBname !== 'commonswiki' ) {
+   $wgJsonConfigs['Map.JsonConfig']['remote']['url'] = 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php';
 }
 
 
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2cd9d9e..3efcb3e 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3104,6 +3104,74 @@
$wgUsersNotifiedOnAllChanges[] = 'Yurik';
 }
 
+// Enable Tabular data namespace on Commons - T148745
+// TODO: $wmgEnableMapData and $wmgEnableTabularData should probably be merged 
into one
+if ( $wmgEnableTabularData ) {
+   // Safety: before extension.json, these values were initialized by 
JsonConfig.php
+   if ( !isset( $wgJsonConfigModels ) ) {
+   $wgJsonConfigModels = [];
+   }
+   if ( !isset( $wgJsonConfigs ) ) {
+   $wgJsonConfigs = [];
+   }
+   // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
+   $wgJsonConfigModels['Tabular.JsonConfig'] = 
'JsonConfig\JCTabularContent';
+   

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Handle disabled error during title search test

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/322974 )

Change subject: Handle disabled error during title search test
..


Handle disabled error during title search test

Bug: T151376
Change-Id: I54af0634c4e63067f5f769ea6eee3158a1f7
---
M tests/site_tests.py
1 file changed, 24 insertions(+), 8 deletions(-)

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



diff --git a/tests/site_tests.py b/tests/site_tests.py
index 5b8e9e9..a504d44 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1409,18 +1409,34 @@
 raise unittest.SkipTest("gsrsearch returned timeout on site: 
%r" % e)
 raise
 
-def test_search_where(self):
-"""Test the site.search() method with 'where' parameter."""
+def test_search_where_text(self):
+"""Test the site.search() method with 'where' parameter set to text."""
 self.assertEqual(list(self.site.search('wiki', total=10)),
- list(self.site.search('wiki', total=10, 
where='text')))
+ list(self.site.search('wiki', total=10,
+   where='text')))
+
+def test_search_where_nearmatch(self):
+"""Test the site.search().
+
+'where' parameter set to 'nearmatch'.
+"""
 self.assertLessEqual(len(list(self.site.search('wiki', total=10,
where='nearmatch'))),
  len(list(self.site.search('wiki', total=10
-for hit in self.site.search('wiki', namespaces=0, total=10,
-get_redirects=True, where='title'):
-self.assertIsInstance(hit, pywikibot.Page)
-self.assertEqual(hit.namespace(), 0)
-self.assertTrue('wiki' in hit.title().lower())
+
+def test_search_where_title(self):
+"""Test site.search() method with 'where' parameter set to title."""
+try:
+for hit in self.site.search('wiki', namespaces=0, total=10,
+get_redirects=True, where='title'):
+self.assertIsInstance(hit, pywikibot.Page)
+self.assertEqual(hit.namespace(), 0)
+self.assertTrue('wiki' in hit.title().lower())
+except pywikibot.data.api.APIError as e:
+if e.code in ('search-title-disabled', 'gsrsearch-title-disabled'):
+raise unittest.SkipTest(
+'Title search disabled on site: {0}'.format(self.site))
+raise
 
 
 class TestUserContribsAsUser(DefaultSiteTestCase):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54af0634c4e63067f5f769ea6eee3158a1f7
Gerrit-PatchSet: 10
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Lokal Profil 
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] mediawiki/core[wmf/1.29.0-wmf.5]: Bump JsonConfig to wmf/1.29.0-wmf.5 tip

2016-12-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326045 )

Change subject: Bump JsonConfig to wmf/1.29.0-wmf.5 tip
..

Bump JsonConfig to wmf/1.29.0-wmf.5 tip

Change-Id: I4e357009763d1c0a9b4674441b9282e452325a99
---
M extensions/JsonConfig
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/326045/1

diff --git a/extensions/JsonConfig b/extensions/JsonConfig
index dd2be33..9feda92 16
--- a/extensions/JsonConfig
+++ b/extensions/JsonConfig
@@ -1 +1 @@
-Subproject commit dd2be334b568a54cf8fc3165f5e82023bc5b4df7
+Subproject commit 9feda92cd3448cc60b344a5dd07f811840c52402

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e357009763d1c0a9b4674441b9282e452325a99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.5
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Set $wgUserEmailUseReplyTo = true by default

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326044 )

Change subject: Set $wgUserEmailUseReplyTo = true by default
..

Set $wgUserEmailUseReplyTo = true by default

Mainly to work around restrictive DMARC policies (e.g., Yahoo!).

Bug: T66795
Change-Id: I3b34f6820915cc68d46ff6fd38feacd06efd2b69
---
M RELEASE-NOTES-1.29
M includes/DefaultSettings.php
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/326044/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 0cce190..402fcc2 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -22,6 +22,7 @@
   code for ApiBase::parseMsg() will no longer work.
 * ApiBase::$messageMap is no longer public. Code attempting to access it will
   result in a PHP fatal error.
+* $wgUserEmailUseReplyTo is now false by default to work around restrictive 
DMARC policies.
 
 === New features in 1.29 ===
 * (T5233) A cookie can now be set when a user is autoblocked, to track that 
user if
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5557dca..dfe993e 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1585,14 +1585,15 @@
 $wgEnableUserEmail = true;
 
 /**
- * Set to true to put the sending user's email in a Reply-To header
- * instead of From. ($wgPasswordSender will be used as From.)
+ * If true put the sending user's email in a Reply-To header
+ * instead of From (false). ($wgPasswordSender will be used as From.)
  *
  * Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
  * which can cause problems with SPF validation and leak recipient addresses
- * when bounces are sent to the sender.
+ * when bounces are sent to the sender. In addition, DMARC restrictions
+ * can cause emails to fail to be received when false.
  */
-$wgUserEmailUseReplyTo = false;
+$wgUserEmailUseReplyTo = true;
 
 /**
  * Minimum time, in hours, which must elapse between password reminder

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use 1 processes instead of 4 for phan

2016-12-08 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326043 )

Change subject: Use 1 processes instead of 4 for phan
..

Use 1 processes instead of 4 for phan

Running against mediawiki core phan needs around 1GB of memory
per process. >4GB is too excessive for a default setting. Instead
set the default to 1 process and add the ability for users to
select more processes on the command line.

Bug: T132636
Change-Id: I3d9fa462916fba519fe6d7f1916f881eefb6a942
---
M tests/phan/bin/phan
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/326043/1

diff --git a/tests/phan/bin/phan b/tests/phan/bin/phan
index 07caee6..100190d 100755
--- a/tests/phan/bin/phan
+++ b/tests/phan/bin/phan
@@ -31,7 +31,7 @@
--project-root-directory "$ROOT" \
--config-file "$ROOT/tests/phan/config.php" \
--output "$ROOT/tests/phan/issues/issues-${REV}" \
-   -j 4
+   ${@}
 
 # Re-link the latest directory
 rm -f "${ISSUES}/latest"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Update for API error i18n

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/321456 )

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: I72e033971999a05333c1ba0298cc758c6b2fbd88
---
M ApiTranscodeReset.php
M TimedMediaHandler_body.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 72 insertions(+), 18 deletions(-)

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



diff --git a/ApiTranscodeReset.php b/ApiTranscodeReset.php
index 787f7e6..543f1c6 100644
--- a/ApiTranscodeReset.php
+++ b/ApiTranscodeReset.php
@@ -12,23 +12,46 @@
global $wgUser, $wgEnableTranscode, 
$wgWaitTimeForTranscodeReset;
// Check if transcoding is enabled on this wiki at all:
if ( !$wgEnableTranscode ) {
-   $this->dieUsage( 'Transcode is disabled on this wiki', 
'disabledtranscode' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( 
'apierror-timedmedia-disabledtranscode', 'disabledtranscode' );
+   } else {
+   $this->dieUsage( 'Transcode is disabled on this 
wiki', 'disabledtranscode' );
+   }
}
 
// Confirm the user has the transcode-reset right
-   if ( !$wgUser->isAllowed( 'transcode-reset' ) ) {
-   $this->dieUsage( 'You don\'t have permission to reset 
transcodes', 'missingpermission' );
+   if ( is_callable( [ $this, 'checkUserRightsAny' ] ) ) {
+   $this->checkUserRightsAny( 'transcode-reset' );
+   } else {
+   if ( !$wgUser->isAllowed( 'transcode-reset' ) ) {
+   $this->dieUsage( 'You don\'t have permission to 
reset transcodes', 'missingpermission' );
+   }
}
$params = $this->extractRequestParams();
 
// Make sure we have a valid Title
$titleObj = Title::newFromText( $params['title'] );
if ( !$titleObj || $titleObj->isExternal() ) {
-   $this->dieUsageMsg( [ 'invalidtitle', $params['title'] 
] );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
+   } else {
+   $this->dieUsageMsg( [ 'invalidtitle', 
$params['title'] ] );
+   }
}
// Make sure the title can be transcoded
if ( !TimedMediaHandlerHooks::isTranscodableTitle( $titleObj ) 
) {
-   $this->dieUsageMsg( [ 'invalidtranscodetitle', 
$params['title'] ] );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError(
+   [
+   
'apierror-timedmedia-invalidtranscodetitle',
+   wfEscapeWikiText( 
$titleObj->getPrefixedText() )
+   ],
+   'invalidtranscodetitle'
+   );
+   } else {
+   $this->dieUsage( 
"{$titleObj->getPrefixedText()} is not transcodable.",
+   'invalidtranscodetitle' );
+   }
}
$transcodeKey = false;
// Make sure its a enabled transcode key we are trying to 
remove:
@@ -37,10 +60,17 @@
global $wgEnabledTranscodeSet, 
$wgEnabledAudioTranscodeSet;
$transcodeSet = array_merge( $wgEnabledTranscodeSet, 
$wgEnabledAudioTranscodeSet );
if ( !in_array( $params['transcodekey'], $transcodeSet 
) ) {
-   $this->dieUsage(
-   'Invalid or disabled transcode key: ' . 
htmlspecialchars( $params['transcodekey'] ),
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
+   $this->dieWithError(
+   [ 
'apierror-timedmedia-badtranscodekey', wfEscapeWikiText( 
$params['transcodekey'] ) ],
'badtranscodekey'
-   );
+   );
+   } else {
+   $this->dieUsage(
+   'Invalid or disabled transcode 
key: ' . htmlspecialchars( $params['transcodekey'] ),
+ 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 28054b5

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326042 )

Change subject: Update change-propagation to 28054b5
..


Update change-propagation to 28054b5

List of changes:
abc03b5 Move wikidata->mobileapps dependency to it's own resource-change queue 
to avoid lagging
bd0be68 Fixed tests
28054b5 Removed subscription to continue topics, not needed any more
xxx Update config template
xxx Update node module dependencies

Change-Id: I735130667095e847abba581cef44671d804de3e0
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M scap/templates/config.yaml.j2
M src
5 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 2726b69..ec70b27 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
+  "_shasum": "7eb533f8b08fa8eafeabec67a181d276848bcbc0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 8199f87..11b4990 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
+  "_shasum": "4038dde76a13ac26427a4a9cac3d1ba3fc23ea81",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index a1bba51..8f42b69 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
+  "_shasum": "0fe8af24c30eaeed113ff8230ac498797036b424",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c59bc2c..1318f1a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -585,7 +585,7 @@
   body: '{{globals.message}}'
 
   on_wikidata_description_change:
-topic: change-prop.transcludes.resource-change
+topic: change-prop.wikidata.resource-change
 match:
   meta:
 uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/'
diff --git a/src b/src
index 04bed5d..28054b5 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 04bed5da233b8b156f7d36afce6492371088493d
+Subproject commit 28054b56aef92ab34e134ddfc47b852f92199523

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I735130667095e847abba581cef44671d804de3e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 28054b5

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326042 )

Change subject: Update change-propagation to 28054b5
..

Update change-propagation to 28054b5

List of changes:
abc03b5 Move wikidata->mobileapps dependency to it's own resource-change queue 
to avoid lagging
bd0be68 Fixed tests
28054b5 Removed subscription to continue topics, not needed any more
xxx Update config template
xxx Update node module dependencies

Change-Id: I735130667095e847abba581cef44671d804de3e0
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M scap/templates/config.yaml.j2
M src
5 files changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/42/326042/1

diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 2726b69..ec70b27 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
+  "_shasum": "7eb533f8b08fa8eafeabec67a181d276848bcbc0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 8199f87..11b4990 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
+  "_shasum": "4038dde76a13ac26427a4a9cac3d1ba3fc23ea81",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index a1bba51..8f42b69 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
+  "_shasum": "0fe8af24c30eaeed113ff8230ac498797036b424",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c59bc2c..1318f1a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -585,7 +585,7 @@
   body: '{{globals.message}}'
 
   on_wikidata_description_change:
-topic: change-prop.transcludes.resource-change
+topic: change-prop.wikidata.resource-change
 match:
   meta:
 uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/'
diff --git a/src b/src
index 04bed5d..28054b5 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 04bed5da233b8b156f7d36afce6492371088493d
+Subproject commit 28054b56aef92ab34e134ddfc47b852f92199523

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I735130667095e847abba581cef44671d804de3e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: More i18n cleanup

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325990 )

Change subject: API: More i18n cleanup
..


API: More i18n cleanup

* Use errorformat for action=login Failed responses in non-BC mode.
* We removed 'messageHtml' from action=rollback's response on error, but
  left it for success. Remove it there too, it's even less useful.
* We changed action=watch's reporting of errors, but left the
  mostly-pointless reporting of "success" UI messages. These should be
  handled on the client side.

Change-Id: Ia6c402a4254fbacf4c2c3f125ce8bf0bcc71e509
---
M RELEASE-NOTES-1.29
M includes/api/ApiLogin.php
M includes/api/ApiRollback.php
M includes/api/ApiWatch.php
M resources/Resources.php
M resources/src/mediawiki/api/watch.js
M resources/src/mediawiki/page/watch.js
7 files changed, 30 insertions(+), 30 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 986ecd8..0cce190 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -58,11 +58,12 @@
 * action=revisiondelete no longer includes a "rendered" property on warnings
   and errors for each item. Use errorformat=wikitext if you're wanting parsed
   output.
-* action=rollback no longer returns a "messageHtml" property on errors. Use
-  errorformat=html if you're wanting HTML formatting of messages.
+* action=rollback no longer returns a "messageHtml" property. Use
+  errorformat=html if you're wanting HTML formatting of error messages.
 * action=upload now reports optional stash failures as an array under key
   'stasherrors' rather than a 'stashfailed' text string.
-* action=watch reports 'errors' and 'warnings' instead of a single 'error'.
+* action=watch reports 'errors' and 'warnings' instead of a single 'error', and
+  no longer returns a 'message' on success.
 
 === Action API internal changes in 1.29 ===
 * New methods were added to ApiBase to handle errors and warnings using i18n
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 723dc33..6cf1fad 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -197,9 +197,14 @@
break;
 
case 'Failed':
-   $result['reason'] = 
ApiErrorFormatter::stripMarkup(
-   $message->useDatabase( false 
)->inLanguage( 'en' )->text()
-   );
+   $errorFormatter = $this->getErrorFormatter();
+   if ( $errorFormatter instanceof 
ApiErrorFormatter_BackCompat ) {
+   $result['reason'] = 
ApiErrorFormatter::stripMarkup(
+   $message->useDatabase( false 
)->inLanguage( 'en' )->text()
+   );
+   } else {
+   $result['reason'] = 
$errorFormatter->formatMessage( $message );
+   }
break;
 
case 'Aborted':
diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php
index c802087..9584f09 100644
--- a/includes/api/ApiRollback.php
+++ b/includes/api/ApiRollback.php
@@ -92,17 +92,6 @@
'last_revid' => intval( $details['target']->getID() )
];
 
-   $oldUser = $details['current']->getUserText( 
Revision::FOR_THIS_USER );
-   $lastUser = $details['target']->getUserText( 
Revision::FOR_THIS_USER );
-   $diffUrl = $titleObj->getFullURL( [
-   'diff' => $info['revid'],
-   'oldid' => $info['old_revid'],
-   'diffonly' => '1'
-   ] );
-   $info['messageHtml'] = $this->msg( 'rollback-success-notify' )
-   ->params( $oldUser, $lastUser, $diffUrl )
-   ->parseAsBlock();
-
$this->getResult()->addValue( null, $this->getModuleName(), 
$info );
}
 
diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index d257e90..88aff41 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -110,19 +110,9 @@
if ( $params['unwatch'] ) {
$status = UnwatchAction::doUnwatch( $title, $user );
$res['unwatched'] = $status->isOK();
-   if ( $status->isOK() ) {
-   $msgKey = $title->isTalkPage() ? 
'removedwatchtext-talk' : 'removedwatchtext';
-   $res['message'] = $this->msg( $msgKey, 
$title->getPrefixedText() )
-   ->title( $title )->parseAsBlock();
-   }
} else {
$status 

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

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/322243 )

Change subject: Set $wgUserEmailUseReplyTo = true; everywhere
..


Set $wgUserEmailUseReplyTo = true; everywhere

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

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

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b5cfec7..fcc753a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11870,8 +11870,7 @@
 ],
 
 'wgUserEmailUseReplyTo' => [
-   'group0' => true, // T66795
-   'default' => false, // T14655
+   'default' => true, // T66795
 ],
 
 'wgStatsMethod' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib42b068565c87469bb13fdc4d74ae7b67efb96a2
Gerrit-PatchSet: 8
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Huji 
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/core[master]: Bump JsonConfig to master for tabular data deployment

2016-12-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326041 )

Change subject: Bump JsonConfig to master for tabular data deployment
..

Bump JsonConfig to master for tabular data deployment

Change-Id: I6a24d621cbac8feff855cc986c7c98dbc18ea7aa
---
M extensions/JsonConfig
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/326041/1

diff --git a/extensions/JsonConfig b/extensions/JsonConfig
index dd2be33..9feda92 16
--- a/extensions/JsonConfig
+++ b/extensions/JsonConfig
@@ -1 +1 @@
-Subproject commit dd2be334b568a54cf8fc3165f5e82023bc5b4df7
+Subproject commit 9feda92cd3448cc60b344a5dd07f811840c52402

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...eventstreams[master]: [PoC] Use @query/schema and ajv for server side filtering

2016-12-08 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326040 )

Change subject: [PoC] Use @query/schema and ajv for server side filtering
..

[PoC] Use @query/schema and ajv for server side filtering

Bug: T152731
Change-Id: I624f7f64d5e728a85f188316978375851a33ba65
---
M lib/eventstreams-util.js
M package.json
M routes/v1.js
3 files changed, 49 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/eventstreams 
refs/changes/40/326040/1

diff --git a/lib/eventstreams-util.js b/lib/eventstreams-util.js
index 54a43f6..7eeab3c 100644
--- a/lib/eventstreams-util.js
+++ b/lib/eventstreams-util.js
@@ -2,6 +2,13 @@
 
 const _ = require('lodash');
 
+// qss + ajv (or some jsonschema library) for query string/jsonschema filtering
+const qss = require('@query/schema').querystring;
+
+// TODO: we probably shouldn't use ajv, since it will generate code
+// from the user provided jsonschema via @query/schema.
+const Ajv = require('ajv');
+const ajv = new Ajv({v5: true});
 
 /**
  * Converts a utf-8 byte buffer or a JSON string into
@@ -55,6 +62,42 @@
 return kafkaMessage;
 }
 
+
+/**
+ * If this request has a filter query param, assume it is a @query/schema style
+ * query string.  It will be parsed into a jsonschema, and a function will
+ * be returned that will return true if kafkaMessage.message validates
+ * against the jsonschema.
+ *
+ * @param req Request object
+ *
+ * @example
+ *  filter=dewiki
+ *  filter=database=dewiki,database=ruwiki
+ *  filter=database:ne=enwiki
+ *  filter=page_title:pattern=List
+ *  filter=performer/user_text:format=ipv4
+ *  filter=rev_len:gt=1000
+ */
+function createFilterer(req) {
+if (req.query.filter) {
+// Use @query/schema to convert into
+// a json schema, and then create a validation
+// function with it to use for filtering.
+const jsonschema = qss.parse('?' + req.query.filter);
+req.logger.log(
+'info',
+{ message: 'Filtering messages with jsonschema', jsonschema: 
jsonschema }
+);
+const validate = ajv.compile(jsonschema);
+return (kafkaMessage) => {
+return validate(kafkaMessage.message);
+}
+}
+else {
+return undefined;
+}
+}
 
 
 /**
@@ -112,5 +155,6 @@
 module.exports = {
 deserializer:   deserializer,
 objectFactory:  objectFactory,
+createFilterer: createFilterer,
 rdkafkaStatsFilter: rdkafkaStatsFilter,
 };
diff --git a/package.json b/package.json
index 16328ec..b93d652 100644
--- a/package.json
+++ b/package.json
@@ -43,6 +43,8 @@
 "swagger-router": "^0.4.6",
 "lodash": "^4.15.0",
 "node-rdkafka-statsd": "^0.1.0",
+"@query/schema": "^0.3.2",
+"ajv": "^4.9.2",
 "kafka-sse": 
"git+https://phabricator.wikimedia.org/diffusion/WKSE/kafkasse.git#v0.0.5;
   },
   "devDependencies": {
diff --git a/routes/v1.js b/routes/v1.js
index 6c9d721..be851d1 100644
--- a/routes/v1.js
+++ b/routes/v1.js
@@ -17,7 +17,6 @@
 let app;
 
 
-
 /**
  * kafkaSse function wrapper that uses app config and req logger.
  * This function only exists to DRY route creation below.
@@ -37,6 +36,9 @@
 // kafka message meta data in the deserialized message.meta object
 // that will be sent to the client as an event.
 deserializer:   eUtil.deserializer,
+// If req.query.filter is defined, it will be used to filter messages
+filterer: eUtil.createFilterer(req),
+
 kafkaEventHandlers: {
 // Create a child of this app's metrics object to use
 // for consumer specific rdkafka metric reporting via 
node-rdkafka-statsd.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I624f7f64d5e728a85f188316978375851a33ba65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/eventstreams
Gerrit-Branch: master
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: [WIP] Move geosearch features to GeoData extension.

2016-12-08 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326039 )

Change subject: [WIP] Move geosearch features to GeoData extension.
..

[WIP] Move geosearch features to GeoData extension.

Depends on Id08efd46337a977639ebf3724ee3492512f326ac to actually work,
but since it works via hook, can be merged independently.

Bug: T152730
Change-Id: I24eb69b1aa91c528a230432164f6441593d95365
---
M extension.json
M includes/Hooks.php
A includes/Search/CirrusGeoFeature.php
R includes/Search/CoordinatesIndexField.php
R includes/Search/GeoPointIndexField.php
A includes/Search/GeoRadiusFunctionScoreBuilder.php
A tests/phpunit/GeoFeatureTest.php
7 files changed, 573 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index f9f82a4..15299df 100644
--- a/extension.json
+++ b/extension.json
@@ -24,12 +24,14 @@
"GeoData\\ApiQueryGeoSearchDb": 
"includes/api/ApiQueryGeoSearchDb.php",
"GeoData\\ApiQueryGeoSearchElastic": 
"includes/api/ApiQueryGeoSearchElastic.php",
"GeoData\\BoundingBox": "includes/BoundingBox.php",
+   "GeoData\\CirrusGeoFeature": 
"includes/Search/CirrusGeoFeature.php",
"GeoData\\Coord": "includes/Coord.php",
-   "GeoData\\CoordinatesIndexField" : 
"includes/CoordinatesIndexField.php",
+   "GeoData\\CoordinatesIndexField" : 
"includes/Search/CoordinatesIndexField.php",
"GeoData\\CoordinatesOutput": "includes/CoordinatesOutput.php",
"GeoData\\CoordinatesParserFunction": 
"includes/CoordinatesParserFunction.php",
"GeoData\\GeoData": "includes/GeoData.body.php",
-   "GeoData\\GeoPointIndexField" : 
"includes/GeoPointIndexField.php",
+   "GeoData\\GeoPointIndexField" : 
"includes/Search/GeoPointIndexField.php",
+   "GeoData\\GeoRadiusFunctionScoreBuilder": 
"includes/Search/GeoRadiusFunctionScoreBuilder.php",
"GeoData\\Globe": "includes/Globe.php",
"GeoData\\Hooks": "includes/Hooks.php",
"GeoData\\Math": "includes/Math.php",
@@ -45,6 +47,7 @@
"SearchIndexFields": "GeoData\\Hooks::onSearchIndexFields",
"SearchDataForIndex": "GeoData\\Hooks::onSearchDataForIndex",
"ParserTestTables": "GeoData\\Hooks::onParserTestTables",
+   "CirrusSearchAddQueryFeatures": 
"GeoData\\Hooks::onCirrusSearchAddQueryFeatures",
"ApiQuery::moduleManager": 
"GeoData\\Hooks::onApiQueryModuleManager"
},
"TrackingCategories": [
@@ -115,6 +118,12 @@
"GeoDataUseCirrusSearch": {
"value": false
},
+   "GeoDataRadiusScoreOverrides": {
+   "value": {
+   "config_override": 
"CirrusSearchPreferGeoRadiusWeight",
+   "uri_param_override": 
"cirrusPreferGeoRadiusWeight"
+   }
+   },
"GeoDataDebug": {
"value": false
}
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 133a73c..ae86c60 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -4,6 +4,7 @@
 
 use ApiModuleManager;
 use Article;
+use CirrusSearch\SearchConfig;
 use Content;
 use DatabaseUpdater;
 use LinksUpdate;
@@ -349,4 +350,13 @@
);
}
}
+
+   /**
+* Add geo-search feature to search syntax
+* @param   $config
+* @param array $features
+*/
+   public static function onCirrusSearchAddQueryFeatures( $config, array 
&$features ) {
+   $features[] = new CirrusGeoFeature();
+   }
 }
diff --git a/includes/Search/CirrusGeoFeature.php 
b/includes/Search/CirrusGeoFeature.php
new file mode 100644
index 000..4631c52
--- /dev/null
+++ b/includes/Search/CirrusGeoFeature.php
@@ -0,0 +1,225 @@
+parseGeoNearbyTitle(
+   $context->getConfig(),
+   $value
+   );
+   } else {
+   list( $coord, $radius ) = $this->parseGeoNearby( $value 
);
+   $excludeDocId = '';
+   }
+
+   $filter = null;
+   if ( $coord ) {
+   if ( substr( $key, 0, 6 ) === 'boost-' ) {
+   $this->getRescoreBuilder( $context, $negated ? 
0.1 : 1, $coord, $radius );
+   } else {
+   $filter = self::createQuery( $coord, $radius, 
$excludeDocId );
+   }
+   }
+
+   return [ $filter, false ];
+   }
+
+   /**
+* Create rescore builder for geo 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Add db patch to add securepoll_elections.el_owner

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326030 )

Change subject: Add db patch to add securepoll_elections.el_owner
..


Add db patch to add securepoll_elections.el_owner

Bug: T152721
Change-Id: I1574ebc5fc892388a480e3b2b522c70b27911a3f
---
M includes/SecurePollHooks.php
A patches/patch-el_owner.sql
2 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/includes/SecurePollHooks.php b/includes/SecurePollHooks.php
index c58dd54..794cc63 100644
--- a/includes/SecurePollHooks.php
+++ b/includes/SecurePollHooks.php
@@ -25,6 +25,11 @@
$updater->addExtensionIndex( 
'securepoll_options', 'spop_election',

"$base/patches/patch-op_election-index.sql"
);
+   $updater->addExtensionField(
+   'securepoll_elections',
+   'el_owner',
+   "$base/patches/patch-el_owner.sql"
+   );
break;
case 'postgres':
$updater->addExtensionTable( 
'securepoll_entity', "$base/SecurePoll.pg.sql" );
diff --git a/patches/patch-el_owner.sql b/patches/patch-el_owner.sql
new file mode 100644
index 000..c7081b0
--- /dev/null
+++ b/patches/patch-el_owner.sql
@@ -0,0 +1,2 @@
+ALTER TABLE /*_*/securepoll_elections
+ADD COLUMN el_owner int not null AFTER el_title;
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1574ebc5fc892388a480e3b2b522c70b27911a3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/uprightdiff[debian]: Merge branch 'master' into debian

2016-12-08 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326038 )

Change subject: Merge branch 'master' into debian
..


Merge branch 'master' into debian

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bc50b3d8bc82aa56e1459917e68b4978e80d02b
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
Gerrit-Branch: debian
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] integration/uprightdiff[debian]: Merge branch 'master' into debian

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326038 )

Change subject: Merge branch 'master' into debian
..

Merge branch 'master' into debian

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/uprightdiff 
refs/changes/38/326038/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bc50b3d8bc82aa56e1459917e68b4978e80d02b
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
Gerrit-Branch: debian
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ce.Surface showSelectionState: Avoid unnecessary refocusing

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325960 )

Change subject: ce.Surface showSelectionState: Avoid unnecessary refocusing
..


ce.Surface showSelectionState: Avoid unnecessary refocusing

Bug: T150450
Change-Id: I22a78f99b2b72f878cd3ebe5a7d82815ee0b91b7
---
M src/ce/ve.ce.Surface.js
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index e3ccc5a..ac2515c 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -3411,7 +3411,13 @@
// Setting a range doesn't give focus in all browsers so make sure this 
happens
// Also set focus after range to prevent scrolling to top
$focusTarget = $( newSel.focusNode ).closest( '[contenteditable=true]' 
);
-   if ( !OO.ui.contains( $focusTarget.get( 0 ), 
this.getElementDocument().activeElement ) ) {
+   if ( $focusTarget.get( 0 ) === this.getElementDocument().activeElement 
) {
+   // Already focused, do nothing.
+   // Support: IE<=11
+   // Focusing already-focused elements scrolls the *top* of the 
element
+   // into view, meaning that in long text blocks refocusing the 
current
+   // element will jump the viewport around.
+   } else if ( !OO.ui.contains( $focusTarget.get( 0 ), 
this.getElementDocument().activeElement ) ) {
// Note: contains *doesn't* include === here. This is desired, 
as the
// common case for getting here is when pressing backspace when 
the
// cursor is in the middle of a block of text (thus both are a 
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22a78f99b2b72f878cd3ebe5a7d82815ee0b91b7
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Fix for parsing templates that have an "attached" Cargo table

2016-12-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326036 )

Change subject: Fix for parsing templates that have an "attached" Cargo table
..


Fix for parsing templates that have an "attached" Cargo table

Change-Id: I0b0a9ad17ddce99f55647a5afcf1ab8fb15106a6
---
M includes/PF_Template.php
1 file changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/includes/PF_Template.php b/includes/PF_Template.php
index a838ab4..936a30f 100644
--- a/includes/PF_Template.php
+++ b/includes/PF_Template.php
@@ -195,10 +195,18 @@
// See if there even is DB storage for this template - if not,
// exit.
if ( is_null( $tableSchemaString ) ) {
-   return null;
+   // There's no declared table - but see if there's an
+   // attached table.
+   list( $tableName, $isDeclared ) = 
CargoUtils::getTableNameForTemplate( $templateTitle );
+   if ( $tableName == null ) {
+   return null;
+   }
+   $mainTemplatePageID = 
CargoUtils::getTemplateIDForDBTable( $tableName );
+   $tableSchemaString = CargoUtils::getPageProp( 
$mainTemplatePageID, 'CargoFields' );
+   } else {
+   $tableName = CargoUtils::getPageProp( $templatePageID, 
'CargoTableName' );
}
$tableSchema = CargoTableSchema::newFromDBString( 
$tableSchemaString );
-   $tableName = CargoUtils::getPageProp( $templatePageID, 
'CargoTableName' );
 
// Then, match template params to Cargo table fields, by
// parsing call(s) to #cargo_store.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b0a9ad17ddce99f55647a5afcf1ab8fb15106a6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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...PageForms[master]: Fix for parsing templates that have an "attached" Cargo table

2016-12-08 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326036 )

Change subject: Fix for parsing templates that have an "attached" Cargo table
..

Fix for parsing templates that have an "attached" Cargo table

Change-Id: I0b0a9ad17ddce99f55647a5afcf1ab8fb15106a6
---
M includes/PF_Template.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/36/326036/2

diff --git a/includes/PF_Template.php b/includes/PF_Template.php
index a838ab4..936a30f 100644
--- a/includes/PF_Template.php
+++ b/includes/PF_Template.php
@@ -195,10 +195,18 @@
// See if there even is DB storage for this template - if not,
// exit.
if ( is_null( $tableSchemaString ) ) {
-   return null;
+   // There's no declared table - but see if there's an
+   // attached table.
+   list( $tableName, $isDeclared ) = 
CargoUtils::getTableNameForTemplate( $templateTitle );
+   if ( $tableName == null ) {
+   return null;
+   }
+   $mainTemplatePageID = 
CargoUtils::getTemplateIDForDBTable( $tableName );
+   $tableSchemaString = CargoUtils::getPageProp( 
$mainTemplatePageID, 'CargoFields' );
+   } else {
+   $tableName = CargoUtils::getPageProp( $templatePageID, 
'CargoTableName' );
}
$tableSchema = CargoTableSchema::newFromDBString( 
$tableSchemaString );
-   $tableName = CargoUtils::getPageProp( $templatePageID, 
'CargoTableName' );
 
// Then, match template params to Cargo table fields, by
// parsing call(s) to #cargo_store.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b0a9ad17ddce99f55647a5afcf1ab8fb15106a6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HtmlArmor: Document that null is an acceptable value

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325736 )

Change subject: HtmlArmor: Document that null is an acceptable value
..


HtmlArmor: Document that null is an acceptable value

And that you'll get null back.

Change-Id: Ibd74e6af16b51796b46c2e23b7442740f5f69a0f
---
M includes/libs/HtmlArmor.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/includes/libs/HtmlArmor.php b/includes/libs/HtmlArmor.php
index 4ba1bc3..1c141ab 100644
--- a/includes/libs/HtmlArmor.php
+++ b/includes/libs/HtmlArmor.php
@@ -28,12 +28,12 @@
 class HtmlArmor {
 
/**
-* @var string
+* @var string|null
 */
private $value;
 
/**
-* @param string $value
+* @param string|null $value
 */
public function __construct( $value ) {
$this->value = $value;
@@ -44,7 +44,8 @@
 * and get safe HTML back
 *
 * @param string|HtmlArmor $input
-* @return string safe for usage in HTML
+* @return string|null safe for usage in HTML, or null
+* if the HtmlArmor instance was wrapping null.
 */
public static function getHtml( $input ) {
if ( $input instanceof HtmlArmor ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd74e6af16b51796b46c2e23b7442740f5f69a0f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Fomafix 
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...CirrusSearch[master]: [WIP][DNM] Allow extensions to hook features

2016-12-08 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326037 )

Change subject: [WIP][DNM] Allow extensions to hook features
..

[WIP][DNM] Allow extensions to hook features

Also move GeoFeature to GeoData extension.

Change-Id: Id08efd46337a977639ebf3724ee3492512f326ac
---
M README
M autoload.php
A docs/hooks.txt
D includes/Query/GeoFeature.php
M includes/Search/RescoreBuilders.php
M includes/Search/SearchContext.php
M includes/Searcher.php
M profiles/RescoreProfiles.config.php
D tests/unit/Query/GeoFeatureTest.php
9 files changed, 166 insertions(+), 638 deletions(-)


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

diff --git a/README b/README
index 23f5f92..f76813f 100644
--- a/README
+++ b/README
@@ -260,27 +260,7 @@
 
 Hooks
 -
-CirrusSearch provides hooks that other extensions can make use of to extend 
the core schema and
-modify documents.
-
-There are currently two phases to building cirrus documents: the parse phase 
and the links phase.
-The parse phase then the links phase is run when the article's rendered text 
would change (actual
-article change and template change).  Only the links phase is run when an 
article is newly links
-or unlinked.
-
-Note that this whole thing is a somewhat experimental feature at this point 
and the API hasn't
-really been settled.
-
-'CirrusSearchAnalysisConfig': Allows to hook into the configuration for 
analysis
-  - multi-dimensional configuration array for analysis of various 
languages and fields
- $builder - instance of MappingConfigBuilder, for easier use of utility 
methods to build fields
-
-'CirrusSearchMappingConfig': Allows configuration of the mapping of fields
-  - multi-dimensional configuration array that contains Elasticsearch 
document configuration.
-   The 'page' index contains configuration for Elasticsearch documents 
representing pages.
-   The 'namespace' index contains namespace configuration for Elasticsearch 
documents representing
-   namespaces.
-
+See docs/hooks.txt.
 
 Validating a new version of Elasticsearch
 -
diff --git a/autoload.php b/autoload.php
index 92f7d56..8baa1db 100644
--- a/autoload.php
+++ b/autoload.php
@@ -112,7 +112,6 @@
'CirrusSearch\\Query\\FullTextQueryBuilder' => __DIR__ . 
'/includes/Query/FullTextQueryBuilder.php',
'CirrusSearch\\Query\\FullTextQueryStringQueryBuilder' => __DIR__ . 
'/includes/Query/FullTextQueryStringQueryBuilder.php',
'CirrusSearch\\Query\\FullTextSimpleMatchQueryBuilder' => __DIR__ . 
'/includes/Query/FullTextSimpleMatchQueryBuilder.php',
-   'CirrusSearch\\Query\\GeoFeature' => __DIR__ . 
'/includes/Query/GeoFeature.php',
'CirrusSearch\\Query\\HasTemplateFeature' => __DIR__ . 
'/includes/Query/HasTemplateFeature.php',
'CirrusSearch\\Query\\InCategoryFeature' => __DIR__ . 
'/includes/Query/InCategoryFeature.php',
'CirrusSearch\\Query\\InTitleFeature' => __DIR__ . 
'/includes/Query/InTitleFeature.php',
diff --git a/docs/hooks.txt b/docs/hooks.txt
new file mode 100644
index 000..c2e32ba
--- /dev/null
+++ b/docs/hooks.txt
@@ -0,0 +1,47 @@
+CirrusSearch provides hooks that other extensions can make use of to extend 
the core schema and
+modify documents.
+
+There are currently two phases to building cirrus documents: the parse phase 
and the links phase.
+The parse phase then the links phase is run when the article's rendered text 
would change (actual
+article change and template change).  Only the links phase is run when an 
article is newly links
+or unlinked.
+
+Note that this whole thing is a somewhat experimental feature at this point 
and the API hasn't
+really been settled.
+
+'CirrusSearchAnalysisConfig': Allows to hook into the configuration for 
analysis
+ &$config - multi-dimensional configuration array for analysis of various 
languages and fields
+
+'CirrusSearchMappingConfig': Allows configuration of the mapping of fields
+ &$config - multi-dimensional configuration array that contains Elasticsearch 
document configuration.
+   The 'page' index contains configuration for Elasticsearch documents 
representing pages.
+   The 'namespace' index contains namespace configuration for Elasticsearch 
documents representing
+   namespaces.
+ $builder - instance of MappingConfigBuilder, for easier use of utility 
methods to build fields.
+
+'CirrusSearchBuildDocumentParse': Allows extensions to modify ElasticSearch 
document produced from a page
+ $doc - \Elastica\Document object representing the page. Extensions can modify 
it.
+ $title - Title object representing the page.
+ $content - Content object for the page.
+ $parserOutput - ParserOutput for the page, if exists, or null.
+
+'CirrusSearchBuildDocumentLinks': Allows extensions to process incoming and 
outgoing links for the document.
+ $doc - \Elastica\Document object representing 

[MediaWiki-commits] [Gerrit] integration/uprightdiff[master]: Don't override any other set CFLAGS

2016-12-08 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325991 )

Change subject: Don't override any other set CFLAGS
..


Don't override any other set CFLAGS

dpkg-buildflags will automatically set some hardening flags, so don't
override them.

Change-Id: Ib9ae2a37a651164c354d97ce327e40941cbe2b90
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Makefile b/Makefile
index 13213fa..49b9ee5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS=-g -std=c++11 -Wall -O2
+CFLAGS +=-g -std=c++11 -Wall -O2
 PREFIX=/usr/local
 
 all: uprightdiff

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9ae2a37a651164c354d97ce327e40941cbe2b90
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Linter] Deployed on beta cluster

2016-12-08 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326035 )

Change subject: [Linter] Deployed on beta cluster
..


[Linter] Deployed on beta cluster

https://phabricator.wikimedia.org/rOMWC6f05e35639f1854b203fa5cf302d43a41038cc19

Change-Id: I29b95039a588eaacb195398fc4dc02c4f2e0080a
---
M groups/MediaWiki/WikimediaAgg.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/WikimediaAgg.yaml 
b/groups/MediaWiki/WikimediaAgg.yaml
index fd21ee5..e162f54 100644
--- a/groups/MediaWiki/WikimediaAgg.yaml
+++ b/groups/MediaWiki/WikimediaAgg.yaml
@@ -63,6 +63,7 @@
   - ext-jsonconfig
   - ext-labeledsectiontransclusion
   - ext-landingcheck
+  - ext-linter # 
https://phabricator.wikimedia.org/rOMWC6f05e35639f1854b203fa5cf302d43a41038cc19
   - ext-ldapauthentication # 2011-12-28: labsconsole.wikimedia.org
   - ext-liquidthreads # 2009-11-11: MediaWiki.org and some other projects
   - ext-listings # Change id bc3616c74aab74b74f78bbb2ce3241e5a564b4f9 for 
Wikivoyage

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29b95039a588eaacb195398fc4dc02c4f2e0080a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Linter] Deployed on beta cluster

2016-12-08 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326035 )

Change subject: [Linter] Deployed on beta cluster
..

[Linter] Deployed on beta cluster

https://phabricator.wikimedia.org/rOMWC6f05e35639f1854b203fa5cf302d43a41038cc19

Change-Id: I29b95039a588eaacb195398fc4dc02c4f2e0080a
---
M groups/MediaWiki/WikimediaAgg.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/35/326035/1

diff --git a/groups/MediaWiki/WikimediaAgg.yaml 
b/groups/MediaWiki/WikimediaAgg.yaml
index fd21ee5..e162f54 100644
--- a/groups/MediaWiki/WikimediaAgg.yaml
+++ b/groups/MediaWiki/WikimediaAgg.yaml
@@ -63,6 +63,7 @@
   - ext-jsonconfig
   - ext-labeledsectiontransclusion
   - ext-landingcheck
+  - ext-linter # 
https://phabricator.wikimedia.org/rOMWC6f05e35639f1854b203fa5cf302d43a41038cc19
   - ext-ldapauthentication # 2011-12-28: labsconsole.wikimedia.org
   - ext-liquidthreads # 2009-11-11: MediaWiki.org and some other projects
   - ext-listings # Change id bc3616c74aab74b74f78bbb2ce3241e5a564b4f9 for 
Wikivoyage

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29b95039a588eaacb195398fc4dc02c4f2e0080a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Standardize caching on the canonical page title

2016-12-08 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326033 )

Change subject: Standardize caching on the canonical page title
..

Standardize caching on the canonical page title

Currently we cache pages using their "original" titles to construct a key.
This might be the article's canonical title or it might be a redirect
title, depending on how we got to the page.  This can lead to multiple,
potentially differing copies of an article being cached, with the copy
retrieved when loading from cache depending on the title in the link
followed.

This patch removes the "originalTitle" logic from PageViewModel so that
the correct, canonical article title is always used to construct the cache
key.  This way, we can be sure we are obtaining the correct, up-to-date
copy of the content we want from the cache.

A downside of this is that following a redirect link will result in a
cache miss even if the page is cached.  Still, this is small price to pay
for correct, predictable cache behavior.

N.B. I am not sure what purpose the "originalTitle" logic was intended to
fulfill, but removing it fixes caching and doesn't obviously break anything
else.

Bug: T152720
Change-Id: I345eb043c0ef616f236914580fa60f9122381bf1
---
M app/src/main/java/org/wikipedia/page/PageDataClient.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageViewModel.java
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
4 files changed, 9 insertions(+), 24 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageDataClient.java 
b/app/src/main/java/org/wikipedia/page/PageDataClient.java
index ae3fc9e..b309a03 100644
--- a/app/src/main/java/org/wikipedia/page/PageDataClient.java
+++ b/app/src/main/java/org/wikipedia/page/PageDataClient.java
@@ -415,7 +415,7 @@
 
 //add the page to cache!
 if (cacheOnComplete) {
-app.getPageCache().put(model.getTitleOriginal(), 
model.getPage());
+app.getPageCache().put(model.getTitle(), model.getPage());
 }
 }
 }
@@ -472,14 +472,14 @@
 
 private void loadFromCache(final ErrorCallback errorCallback) {
 app.getPageCache()
-.get(model.getTitleOriginal(), sequenceNumber.get(), new 
PageCache.CacheGetListener() {
+.get(model.getTitle(), sequenceNumber.get(), new 
PageCache.CacheGetListener() {
 @Override
 public void onGetComplete(Page page, int sequence) {
 if (!sequenceNumber.inSync(sequence)) {
 return;
 }
 if (page != null) {
-L.d("Using page from cache: " + 
model.getTitleOriginal().getDisplayText());
+L.d("Using page from cache: " + 
model.getTitle().getDisplayText());
 model.setPage(page);
 model.setTitle(page.getTitle());
 // Update our history entry, in case the Title was 
changed (i.e. normalized)
@@ -522,7 +522,6 @@
 
 private void updateThumbnail(String thumbUrl) {
 model.getTitle().setThumbUrl(thumbUrl);
-model.getTitleOriginal().setThumbUrl(thumbUrl);
 fragment.invalidateTabs();
 }
 
@@ -534,7 +533,7 @@
  * Push the current page title onto the backstack.
  */
 private void pushBackStack() {
-PageBackStackItem item = new 
PageBackStackItem(model.getTitleOriginal(), model.getCurEntry());
+PageBackStackItem item = new PageBackStackItem(model.getTitle(), 
model.getCurEntry());
 backStack.add(item);
 }
 
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 1324def..e07849a 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -234,10 +234,6 @@
 return model.getTitle();
 }
 
-public PageTitle getTitleOriginal() {
-return model.getTitleOriginal();
-}
-
 @NonNull public ShareHandler getShareHandler() {
 return shareHandler;
 }
@@ -636,7 +632,6 @@
 errorView.setVisibility(View.GONE);
 
 model.setTitle(title);
-model.setTitleOriginal(title);
 model.setCurEntry(entry);
 
 updateProgressBar(true, true, 0);
@@ -699,7 +694,7 @@
 pageDataClient.backFromEditing(data);
 FeedbackUtil.showMessage(getActivity(), 
R.string.edit_saved_successfully);
 // and reload the page...
-loadPage(model.getTitleOriginal(), model.getCurEntry(), 
PageLoadStrategy.Cache.FALLBACK, false);
+

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 04bed5d

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326034 )

Change subject: Update change-propagation to 04bed5d
..


Update change-propagation to 04bed5d

List of changes:
cb9560b Interleave continuation with leaf job processing
xxx Update the config template
xxx Update node module dependencies

Change-Id: I8204d79216170ee1c364e7d1d2a8f40bcc2ab47a
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/service-runner/lib/master.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
M scap/templates/config.yaml.j2
M src
7 files changed, 38 insertions(+), 27 deletions(-)

Approvals:
  Mobrovac: Verified; Looks good to me, approved
  Ppchelko: Looks good to me, but someone else must approve



diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 1fd2d63..2726b69 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "46a653f23d5529123f2a7623422996c0be7cfe91",
+  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index c239fb5..8199f87 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "d56a34d13568e14ff5ca40c46d8efbf4ef4f3a55",
+  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/service-runner/lib/master.js 
b/node_modules/service-runner/lib/master.js
index 5ed417f..090f199 100644
--- a/node_modules/service-runner/lib/master.js
+++ b/node_modules/service-runner/lib/master.js
@@ -133,7 +133,9 @@
 var self = this;
 var worker = cluster.workers[workerId];
 if (!worker || worker.state === 'disconnected') {
-delete self.workerStatusMap[worker.process.pid];
+if (worker) {
+delete self.workerStatusMap[worker.process.pid];
+}
 return;
 }
 self.workerStatusMap[worker.process.pid] = {
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index d7c7c0f..a1bba51 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "48d03b345a24c4e984f504d5cf4a45408bc50b7b",
+  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/node_modules/service-runner/package.json 
b/node_modules/service-runner/package.json
index 349996d..f8513e0 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
 {
   "name": "service-runner",
-  "version": "2.1.11",
+  "version": "2.1.12",
   "description": "Generic nodejs service supervisor / cluster runner",
   "main": "service-runner.js",
   "bin": {
@@ -48,9 +48,9 @@
 "mocha-jscs": "^5.0.1",
 "bunyan-prettystream": 
"git+https://github.com/hadfieldn/node-bunyan-prettystream.git#master;
   },
-  "gitHead": "a235e2f8460625cb5ee8fc64cc3071a5a070e063",
-  "_id": "service-runner@2.1.11",
-  "_shasum": "1b0c83666beef6cc0637f0573a5107d107eac5bb",
+  "gitHead": "2de01b2a4f596ccf981e1878d4f2778c087000cc",
+  "_id": "service-runner@2.1.12",
+  "_shasum": "e1848d2168287e76a09386929181510a26c1ae46",
   "_from": "service-runner@>=2.1.7 <3.0.0",
   "_npmVersion": "2.15.9",
   "_nodeVersion": "4.6.0",
@@ -59,8 +59,8 @@
 "email": "petrpche...@gmail.com"
   },
   "dist": {
-"shasum": 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 04bed5d

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326034 )

Change subject: Update change-propagation to 04bed5d
..

Update change-propagation to 04bed5d

List of changes:
cb9560b Interleave continuation with leaf job processing
xxx Update the config template
xxx Update node module dependencies

Change-Id: I8204d79216170ee1c364e7d1d2a8f40bcc2ab47a
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/service-runner/lib/master.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
M scap/templates/config.yaml.j2
M src
7 files changed, 38 insertions(+), 27 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/34/326034/1

diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 1fd2d63..2726b69 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "46a653f23d5529123f2a7623422996c0be7cfe91",
+  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index c239fb5..8199f87 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "d56a34d13568e14ff5ca40c46d8efbf4ef4f3a55",
+  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/service-runner/lib/master.js 
b/node_modules/service-runner/lib/master.js
index 5ed417f..090f199 100644
--- a/node_modules/service-runner/lib/master.js
+++ b/node_modules/service-runner/lib/master.js
@@ -133,7 +133,9 @@
 var self = this;
 var worker = cluster.workers[workerId];
 if (!worker || worker.state === 'disconnected') {
-delete self.workerStatusMap[worker.process.pid];
+if (worker) {
+delete self.workerStatusMap[worker.process.pid];
+}
 return;
 }
 self.workerStatusMap[worker.process.pid] = {
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index d7c7c0f..a1bba51 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "48d03b345a24c4e984f504d5cf4a45408bc50b7b",
+  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/node_modules/service-runner/package.json 
b/node_modules/service-runner/package.json
index 349996d..f8513e0 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
 {
   "name": "service-runner",
-  "version": "2.1.11",
+  "version": "2.1.12",
   "description": "Generic nodejs service supervisor / cluster runner",
   "main": "service-runner.js",
   "bin": {
@@ -48,9 +48,9 @@
 "mocha-jscs": "^5.0.1",
 "bunyan-prettystream": 
"git+https://github.com/hadfieldn/node-bunyan-prettystream.git#master;
   },
-  "gitHead": "a235e2f8460625cb5ee8fc64cc3071a5a070e063",
-  "_id": "service-runner@2.1.11",
-  "_shasum": "1b0c83666beef6cc0637f0573a5107d107eac5bb",
+  "gitHead": "2de01b2a4f596ccf981e1878d4f2778c087000cc",
+  "_id": "service-runner@2.1.12",
+  "_shasum": "e1848d2168287e76a09386929181510a26c1ae46",
   "_from": "service-runner@>=2.1.7 <3.0.0",
   "_npmVersion": "2.15.9",
   "_nodeVersion": "4.6.0",
@@ -59,8 +59,8 @@
 "email": "petrpche...@gmail.com"
   },
   "dist": {
-"shasum": "1b0c83666beef6cc0637f0573a5107d107eac5bb",
- 

[MediaWiki-commits] [Gerrit] integration/config[master]: Revert "Create combined PHP5.5 and HHVM composer-test job"

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326032 )

Change subject: Revert "Create combined PHP5.5 and HHVM composer-test job"
..


Revert "Create combined PHP5.5 and HHVM composer-test job"

Didn't work. set-phpflavor hhvm failed...

This reverts commit ec7c5c49af5c5f59c793269a4291f02d500b4978.

Change-Id: Ia434d94d8d92604235241eb3edc994a178563b30
---
M jjb/php.yaml
M zuul/layout.yaml
2 files changed, 4 insertions(+), 28 deletions(-)

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



diff --git a/jjb/php.yaml b/jjb/php.yaml
index 5f6e605..553c920 100644
--- a/jjb/php.yaml
+++ b/jjb/php.yaml
@@ -163,32 +163,6 @@
 triggers:
  - zuul
 
-# Runs "composer update" and "composer test" but on disposable instances
-# maintained by Nodepool. It runs both PHP55 and HHVM tests in the same job.
-- job:
-name: 'composer-php55-hhvm-trusty'
-node: ci-trusty-wikimedia
-defaults: use-remote-zuul-shallow-clone
-concurrent: true
-properties:
- - build-discarder:
- days-to-keep: 15
-triggers:
- - zuul
-builders:
- - castor-load
- - set-phpflavor:
- phpflavor: php55
- - composer-validate:
-dir: '.'
- - composer-update:
-dir: '.'
- - composer-test
- - set-phpflavor:
- phpflavor: hhvm
- - composer-test
-publishers:
- - castor-save
 
 - project:
 name: 'composer-flavored-on-nodepool'
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 3d6bb6a..fdf54e4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1164,10 +1164,12 @@
   - composer-validate
 test:
   - composer-php53
-  - composer-php55-hhvm-trusty
+  - composer-php55-trusty
+  - composer-hhvm-trusty
 gate-and-submit:
   - composer-php53
-  - composer-php55-hhvm-trusty
+  - composer-php55-trusty
+  - composer-hhvm-trusty
 experimental:
   - composer-php70-jessie
   - composer-hhvm-jessie

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia434d94d8d92604235241eb3edc994a178563b30
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] integration/config[master]: Revert "Create combined PHP5.5 and HHVM composer-test job"

2016-12-08 Thread Legoktm (Code Review)
Hello jenkins-bot,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Create combined PHP5.5 and HHVM composer-test job"
..

Revert "Create combined PHP5.5 and HHVM composer-test job"

Didn't work. set-phpflavor hhvm failed...

This reverts commit ec7c5c49af5c5f59c793269a4291f02d500b4978.

Change-Id: Ia434d94d8d92604235241eb3edc994a178563b30
---
M jjb/php.yaml
M zuul/layout.yaml
2 files changed, 4 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/32/326032/1

diff --git a/jjb/php.yaml b/jjb/php.yaml
index 5f6e605..553c920 100644
--- a/jjb/php.yaml
+++ b/jjb/php.yaml
@@ -163,32 +163,6 @@
 triggers:
  - zuul
 
-# Runs "composer update" and "composer test" but on disposable instances
-# maintained by Nodepool. It runs both PHP55 and HHVM tests in the same job.
-- job:
-name: 'composer-php55-hhvm-trusty'
-node: ci-trusty-wikimedia
-defaults: use-remote-zuul-shallow-clone
-concurrent: true
-properties:
- - build-discarder:
- days-to-keep: 15
-triggers:
- - zuul
-builders:
- - castor-load
- - set-phpflavor:
- phpflavor: php55
- - composer-validate:
-dir: '.'
- - composer-update:
-dir: '.'
- - composer-test
- - set-phpflavor:
- phpflavor: hhvm
- - composer-test
-publishers:
- - castor-save
 
 - project:
 name: 'composer-flavored-on-nodepool'
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 3d6bb6a..fdf54e4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1164,10 +1164,12 @@
   - composer-validate
 test:
   - composer-php53
-  - composer-php55-hhvm-trusty
+  - composer-php55-trusty
+  - composer-hhvm-trusty
 gate-and-submit:
   - composer-php53
-  - composer-php55-hhvm-trusty
+  - composer-php55-trusty
+  - composer-hhvm-trusty
 experimental:
   - composer-php70-jessie
   - composer-hhvm-jessie

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia434d94d8d92604235241eb3edc994a178563b30
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: 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...AbsenteeLandlord[master]: jenkins job validation, do not submit

2016-12-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326031 )

Change subject: jenkins job validation, do not submit
..

jenkins job validation, do not submit

Change-Id: I41ca740506034c211749ae4e8c256324ac476f55
---
A test.js
A test.json
A test.php
A test.py
A test.rb
5 files changed, 6 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbsenteeLandlord 
refs/changes/31/326031/1

diff --git a/test.js b/test.js
new file mode 100644
index 000..6b2b3db
--- /dev/null
+++ b/test.js
@@ -0,0 +1 @@
+console.log("hello world");
diff --git a/test.json b/test.json
new file mode 100644
index 000..0967ef4
--- /dev/null
+++ b/test.json
@@ -0,0 +1 @@
+{}
diff --git a/test.php b/test.php
new file mode 100644
index 000..71625a4
--- /dev/null
+++ b/test.php
@@ -0,0 +1,2 @@
+https://gerrit.wikimedia.org/r/326031
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41ca740506034c211749ae4e8c256324ac476f55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbsenteeLandlord
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] translatewiki[master]: [Kartographer] Add new optional key

2016-12-08 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326028 )

Change subject: [Kartographer] Add new optional key
..


[Kartographer] Add new optional key

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

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 38ae13d..97b1520 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1370,6 +1370,7 @@
 optional = kartographer-link-geonames
 optional = kartographer-link-google-maps
 optional = kartographer-link-here
+optional = kartographer-link-geohack
 optional = kartographer-link-mapquest
 optional = kartographer-link-openstreetmap
 optional = kartographer-link-skyvector

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bfb506759faebc9290b38cc60f5ba5812a77346
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Add db patch to add securepoll_elections.el_owner

2016-12-08 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326030 )

Change subject: Add db patch to add securepoll_elections.el_owner
..

Add db patch to add securepoll_elections.el_owner

Bug: T152721
Change-Id: I1574ebc5fc892388a480e3b2b522c70b27911a3f
---
M includes/SecurePollHooks.php
A patches/patch-el_owner.sql
2 files changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/includes/SecurePollHooks.php b/includes/SecurePollHooks.php
index c58dd54..794cc63 100644
--- a/includes/SecurePollHooks.php
+++ b/includes/SecurePollHooks.php
@@ -25,6 +25,11 @@
$updater->addExtensionIndex( 
'securepoll_options', 'spop_election',

"$base/patches/patch-op_election-index.sql"
);
+   $updater->addExtensionField(
+   'securepoll_elections',
+   'el_owner',
+   "$base/patches/patch-el_owner.sql"
+   );
break;
case 'postgres':
$updater->addExtensionTable( 
'securepoll_entity', "$base/SecurePoll.pg.sql" );
diff --git a/patches/patch-el_owner.sql b/patches/patch-el_owner.sql
new file mode 100644
index 000..c7081b0
--- /dev/null
+++ b/patches/patch-el_owner.sql
@@ -0,0 +1,2 @@
+ALTER TABLE /*_*/securepoll_elections
+ADD COLUMN el_owner int not null AFTER el_title;
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Create combined PHP5.5 and HHVM composer-test job

2016-12-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326020 )

Change subject: Create combined PHP5.5 and HHVM composer-test job
..


Create combined PHP5.5 and HHVM composer-test job

Bug: T142457
Change-Id: I2f52103a677b39dd2300a06ee014422b1d73ccac
---
M jjb/php.yaml
M zuul/layout.yaml
2 files changed, 28 insertions(+), 4 deletions(-)

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



diff --git a/jjb/php.yaml b/jjb/php.yaml
index 553c920..5f6e605 100644
--- a/jjb/php.yaml
+++ b/jjb/php.yaml
@@ -163,6 +163,32 @@
 triggers:
  - zuul
 
+# Runs "composer update" and "composer test" but on disposable instances
+# maintained by Nodepool. It runs both PHP55 and HHVM tests in the same job.
+- job:
+name: 'composer-php55-hhvm-trusty'
+node: ci-trusty-wikimedia
+defaults: use-remote-zuul-shallow-clone
+concurrent: true
+properties:
+ - build-discarder:
+ days-to-keep: 15
+triggers:
+ - zuul
+builders:
+ - castor-load
+ - set-phpflavor:
+ phpflavor: php55
+ - composer-validate:
+dir: '.'
+ - composer-update:
+dir: '.'
+ - composer-test
+ - set-phpflavor:
+ phpflavor: hhvm
+ - composer-test
+publishers:
+ - castor-save
 
 - project:
 name: 'composer-flavored-on-nodepool'
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index fdf54e4..3d6bb6a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1164,12 +1164,10 @@
   - composer-validate
 test:
   - composer-php53
-  - composer-php55-trusty
-  - composer-hhvm-trusty
+  - composer-php55-hhvm-trusty
 gate-and-submit:
   - composer-php53
-  - composer-php55-trusty
-  - composer-hhvm-trusty
+  - composer-php55-hhvm-trusty
 experimental:
   - composer-php70-jessie
   - composer-hhvm-jessie

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f52103a677b39dd2300a06ee014422b1d73ccac
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] translatewiki[master]: [Kartographer] Add new optional key

2016-12-08 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326028 )

Change subject: [Kartographer] Add new optional key
..

[Kartographer] Add new optional key

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


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

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 38ae13d..97b1520 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1370,6 +1370,7 @@
 optional = kartographer-link-geonames
 optional = kartographer-link-google-maps
 optional = kartographer-link-here
+optional = kartographer-link-geohack
 optional = kartographer-link-mapquest
 optional = kartographer-link-openstreetmap
 optional = kartographer-link-skyvector

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bfb506759faebc9290b38cc60f5ba5812a77346
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] mediawiki...trending-edits[master]: Remove unnecessary information

2016-12-08 Thread Ppchelko (Code Review)
Ppchelko has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325867 )

Change subject: Remove unnecessary information
..


Remove unnecessary information

Turns out these fields although interesting are not needed for
trending so I'm going to remove them to simplify the codebase

Change-Id: I651fbcf60a9c74fc0730fc7dedd06b3f5ae8a247
---
M lib/processor.js
M test/features/lib/processor.js
2 files changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/lib/processor.js b/lib/processor.js
index 1d3286c..adf570b 100644
--- a/lib/processor.js
+++ b/lib/processor.js
@@ -128,11 +128,7 @@
 } else {
 contributors.names[username].edits++;
 }
-if (contributors.names[username].edits > 
contributors.names[contributors.main].edits) {
-contributors.main = username;
-}
 page.bytes = edit.rev_len - page.rev_len;
-page.bias = contributors.names[contributors.main].edits / page.edits;
 // update
 pages.set(id, page);
 return true;
diff --git a/test/features/lib/processor.js b/test/features/lib/processor.js
index 5fc9d33..ecf4b4f 100644
--- a/test/features/lib/processor.js
+++ b/test/features/lib/processor.js
@@ -99,10 +99,7 @@
 assert.ok( pages[0].contributors.anons === 2, 'Total unique anon edits 
is tallied up.' );
 assert.ok( pages[0].contributors.names.Jon.edits === 2, 'Edits by Jon 
counted' );
 assert.ok( pages[0].contributors.names['127.0.0.5'].edits === 1, 
'Edits by anon counted' );
-assert.ok( pages[0].contributors.main === 'Bernd', 'Top editor 
recorded' );
 assert.ok( pages[0].isNew === false, 'False isNew flag for pages with 
parent id' );
-assert.ok( pages[0].bias === 3 / 8,
-'Bias is total edits by main author divided by total edits. The 
lower the less bias.' );
 });
 
 it('counts the number of anonymous edits', function() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I651fbcf60a9c74fc0730fc7dedd06b3f5ae8a247
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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...WikibaseLexeme[master]: Second pass on Lexical Category

2016-12-08 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326024 )

Change subject: Second pass on Lexical Category
..

Second pass on Lexical Category

 - Add to content as part of isstub
 - Add to serializer
 - Add to deserializer
 - Add to patcher
 - Add to differ

Bug: T149495
Change-Id: If16e1fdc56fcfdf4c3e326e99ad64706f14ef532
---
M WikibaseLexeme.entitytypes.php
M src/Content/LexemeContent.php
M src/DataModel/Lexeme.php
M src/DataModel/Serialization/LexemeDeserializer.php
M src/DataModel/Serialization/LexemeSerializer.php
M src/DataModel/Services/Diff/LexemeDiff.php
M src/DataModel/Services/Diff/LexemeDiffer.php
M src/DataModel/Services/Diff/LexemePatcher.php
M tests/phpunit/composer/DataModel/Serialization/LexemeDeserializerTest.php
M tests/phpunit/composer/DataModel/Serialization/LexemeSerializerTest.php
M tests/phpunit/composer/DataModel/Services/Diff/LexemeDifferTest.php
M tests/phpunit/composer/DataModel/Services/Diff/LexemePatcherTest.php
12 files changed, 218 insertions(+), 6 deletions(-)


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

diff --git a/WikibaseLexeme.entitytypes.php b/WikibaseLexeme.entitytypes.php
index 45ef211..c699b78 100644
--- a/WikibaseLexeme.entitytypes.php
+++ b/WikibaseLexeme.entitytypes.php
@@ -43,6 +43,7 @@
},
'deserializer-factory-callback' => function( 
DeserializerFactory $deserializerFactory ) {
return new LexemeDeserializer(
+   $deserializerFactory->newEntityIdDeserializer(),
$deserializerFactory->newTermListDeserializer(),

$deserializerFactory->newStatementListDeserializer()
);
diff --git a/src/Content/LexemeContent.php b/src/Content/LexemeContent.php
index c3eaa79..02d511b 100644
--- a/src/Content/LexemeContent.php
+++ b/src/Content/LexemeContent.php
@@ -76,6 +76,8 @@
&& !$this->getEntity()->isEmpty()
&& ( is_null( $this->getEntity()->getLemmas() )
|| !$this->getEntity()->getLemmas()->isEmpty() )
+   && ( is_null( $this->getEntity()->getLexicalCategory() )
+   || !$this->getEntity()->getLexicalCategory()->isEmpty() 
)
&& $this->getEntity()->getStatements()->isEmpty();
}
 
diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 6b8fe6c..df30238 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -5,7 +5,6 @@
 use InvalidArgumentException;
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Statement\StatementList;
 use Wikibase\DataModel\Statement\StatementListProvider;
@@ -223,9 +222,9 @@
}
 
/**
-* @param ItemId $lexicalCategory
+* @param ItemId|null $lexicalCategory
 */
-   public function setLexicalCategory( ItemId $lexicalCategory ) {
+   public function setLexicalCategory( $lexicalCategory ) {
$this->lexicalCategory = $lexicalCategory;
}
 
diff --git a/src/DataModel/Serialization/LexemeDeserializer.php 
b/src/DataModel/Serialization/LexemeDeserializer.php
index 03f6e1a..e8978a1 100644
--- a/src/DataModel/Serialization/LexemeDeserializer.php
+++ b/src/DataModel/Serialization/LexemeDeserializer.php
@@ -4,8 +4,10 @@
 
 use Deserializers\Exceptions\DeserializationException;
 use Deserializers\TypedObjectDeserializer;
+use Wikibase\DataModel\Deserializers\EntityIdDeserializer;
 use Wikibase\DataModel\Deserializers\StatementListDeserializer;
 use Wikibase\DataModel\Deserializers\TermListDeserializer;
+use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Statement\StatementList;
 use Wikibase\DataModel\Term\TermList;
 use Wikibase\Lexeme\DataModel\Lexeme;
@@ -16,6 +18,11 @@
  * @author Amir Sarabadani 
  */
 class LexemeDeserializer extends TypedObjectDeserializer {
+
+   /**
+* @var EntityIdDeserializer
+*/
+   private $entityIdDeserializer;
 
/**
 * @var TermListDeserializer
@@ -32,12 +39,14 @@
 * @param StatementListDeserializer $statementListDeserializer
 */
public function __construct(
+   EntityIdDeserializer $entityIdDeserializer,
TermListDeserializer $termListDeserializer,
StatementListDeserializer $statementListDeserializer
) {
parent::__construct( 'lexeme', 'type' );
$this->termListDeserializer = $termListDeserializer;
$this->statementListDeserializer = $statementListDeserializer;
+   $this->entityIdDeserializer = $entityIdDeserializer;
   

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix unread notification count caching

2016-12-08 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326023 )

Change subject: Fix unread notification count caching
..

Fix unread notification count caching

Purge all cache when unread count changes and
repopulate on read.

Also fix client-side estimation when
marking a foreign notification as read.

Bug: T151389
Change-Id: I62def3d40a5640e26c234bb0335bc506dbf864a0
---
M includes/NotifUser.php
M modules/controller/mw.echo.Controller.js
M tests/phpunit/NotifUserTest.php
3 files changed, 66 insertions(+), 72 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/23/326023/1

diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 53a9763..da59772 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -1,4 +1,5 @@
 getMainWANObjectCache(),
new EchoUserNotificationGateway( $user, 
MWEchoDbFactory::newFromDefault() ),
new EchoNotificationMapper(),
new EchoTargetPageMapper()
@@ -464,63 +465,20 @@
}
 
/**
-* Recalculates the number of notifications that a user has.
-* @param $dbSource int use master or slave database to pull count
+* Invalidate cache and update echo_unread_wikis if x-wiki 
notifications is enabled
+* @param $dbSource int use master or replica database to pull count
 */
-   public function resetNotificationCount( $dbSource = DB_SLAVE ) {
+   public function resetNotificationCount( $dbSource = DB_REPLICA ) {
global $wgEchoCrossWikiNotifications;
-   // Reset alert and message counts, and store them for later
-   $alertCount = $this->getNotificationCount( false, $dbSource, 
EchoAttributeManager::ALERT, false );
-   $msgCount = $this->getNotificationCount( false, $dbSource, 
EchoAttributeManager::MESSAGE, false );
-
-   // Get the capped count
-   $allCount = self::capNotificationCount( $alertCount + $msgCount 
);
-
-   // When notification counts need to be updated, the last 
notification may have changed,
-   // so we also need to recompute the cached timestamp values.
-   $alertUnread = $this->getLastUnreadNotificationTime( false, 
$dbSource, EchoAttributeManager::ALERT, false );
-   $msgUnread = $this->getLastUnreadNotificationTime( false, 
$dbSource, EchoAttributeManager::MESSAGE, false );
-   // For performance, compute the ALL count as the highest of 
these two
-   $allUnread = $alertUnread !== false &&
-   ( $msgUnread === false || $alertUnread->diff( 
$msgUnread )->invert === 1 ) ?
-   $alertUnread : $msgUnread;
-
-   // Write computed values to cache
-   $this->setInCache( $this->getMemcKey( 'echo-notification-count' 
), $allCount, 86400 );
-   $this->setInCache( $this->getMemcKey( 
'echo-notification-timestamp' ), $allUnread === false ? -1 : 
$allUnread->getTimestamp( TS_MW ), 86400 );
-
if ( $wgEchoCrossWikiNotifications ) {
-   // For performance, compute the global counts by adding 
foreign counts to the above
-   $globalAlertCount = self::capNotificationCount( 
$alertCount + $this->getForeignCount( EchoAttributeManager::ALERT ) );
-   $globalMsgCount = self::capNotificationCount( $msgCount 
+ $this->getForeignCount( EchoAttributeManager::MESSAGE ) );
-   $globalAllCount = self::capNotificationCount( 
$globalAlertCount + $globalMsgCount );
-
-   // For performance, compute the global timestamps as 
max( localTimestamp, foreignTimestamp )
-   $foreignAlertUnread = $this->getForeignTimestamp( 
EchoAttributeManager::ALERT );
-   $globalAlertUnread = $alertUnread !== false &&
-   ( $foreignAlertUnread === false || 
$alertUnread->diff( $foreignAlertUnread )->invert === 1 ) ?
-   $alertUnread : $foreignAlertUnread;
-   $foreignMsgUnread = $this->getForeignTimestamp( 
EchoAttributeManager::MESSAGE );
-   $globalMsgUnread = $msgUnread !== false &&
-   ( $foreignMsgUnread === false || 
$msgUnread->diff( $foreignMsgUnread )->invert === 1 ) ?
-   $msgUnread : $foreignMsgUnread;
-   $globalAllUnread = $globalAlertUnread !== false &&
-   ( $globalMsgUnread === false || 
$globalAlertUnread->diff( $globalMsgUnread )->invert === 1 ) ?
-   $globalAlertUnread : $globalMsgUnread;
-
-   // Write computed values to cache
-   $this->setInCache( $this->getGlobalMemcKey( 

[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: Manually bump JsonConfig cuz automatics didn't work

2016-12-08 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326022 )

Change subject: Manually bump JsonConfig cuz automatics didn't work
..


Manually bump JsonConfig cuz automatics didn't work

Change-Id: I5e95ec64a25cc2a12137971a4ed26351c51007a5
---
M JsonConfig
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Legoktm: Verified
  Yurik: Looks good to me, approved



diff --git a/JsonConfig b/JsonConfig
index d656650..9feda92 16
--- a/JsonConfig
+++ b/JsonConfig
@@ -1 +1 @@
-Subproject commit d65665078feb101d9cf7a3759c35f101340a3d06
+Subproject commit 9feda92cd3448cc60b344a5dd07f811840c52402

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e95ec64a25cc2a12137971a4ed26351c51007a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Attempted fix for b071fb1b09c0

2016-12-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326018 )

Change subject: Attempted fix for b071fb1b09c0
..


Attempted fix for b071fb1b09c0

Change-Id: I4b9e87d835459111523af22b4993b73e0b4489b2
---
M includes/PF_Template.php
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/includes/PF_Template.php b/includes/PF_Template.php
index 37cd345..a838ab4 100644
--- a/includes/PF_Template.php
+++ b/includes/PF_Template.php
@@ -84,14 +84,14 @@
// they're part of an "#if" statement), so they're only
// recorded the first time they're found.
 
-   // Replace all calls to #set with with standard SMW tags. This
-   // is done so that calls of #set within #arraymap will get
+   // Replace all calls to #set within #arraymap with standard
+   // SMW tags. This is done so that they will later get
// parsed correctly.
// This is "cheating", since it modifies the template text
// (the rest of the function doesn't do that), but trying to
// get the #arraymap check regexp to find both kinds of SMW
// property tags seemed too hard to do.
-   $this->mTemplateText = preg_replace( 
'/{{\s*#set:\s*([^=]*)=([^}]*)}}/', '[[$1:$2]]', $this->mTemplateText );
+   $this->mTemplateText = preg_replace( 
'/#arraymap.*{{\s*#set:\s*([^=]*)=([^}]*)}}/', '[[$1:$2]]', 
$this->mTemplateText );
 
// Look for "arraymap" parser function calls that map a
// property onto a list.
@@ -125,8 +125,6 @@
 
// Then, get calls to #set, #set_internal and #subobject.
// (Thankfully, they all have similar syntax).
-   // (The #set check isn't actually necessary, since they were
-   // all replaced earlier.)
if ( preg_match_all( 
'/#(set|set_internal|subobject):(.*?}}})\s*}}/mis', $this->mTemplateText, 
$matches ) ) {
foreach ( $matches[2] as $match ) {
if ( preg_match_all( 
'/([^|{]*?)=\s*{{{([^|}]*)/mis', $match, $matches2 ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b9e87d835459111523af22b4993b73e0b4489b2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >