[MediaWiki-commits] [Gerrit] pywikibot/core[master]: transliteration.py: Simplify single-character substitutions

2018-01-13 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404147 )

Change subject: transliteration.py: Simplify single-character substitutions
..

transliteration.py: Simplify single-character substitutions

Change-Id: I795a01dc39f6548999df70006af06236ba29cdb8
---
M pywikibot/userinterfaces/transliteration.py
1 file changed, 306 insertions(+), 612 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/47/404147/1

diff --git a/pywikibot/userinterfaces/transliteration.py 
b/pywikibot/userinterfaces/transliteration.py
index 274a64b..964ee17 100644
--- a/pywikibot/userinterfaces/transliteration.py
+++ b/pywikibot/userinterfaces/transliteration.py
@@ -227,10 +227,8 @@
 self.trans[u"ǯ"] = u"dzh"
 for char in u"ƸƹʔˀɁɂ":
 self.trans[char] = u"'"
-for char in u"Þ":
-self.trans[char] = u"Th"
-for char in u"þ":
-self.trans[char] = u"th"
+self.trans['Þ'] = 'Th'
+self.trans['þ'] = 'th'
 for char in u"Cʗǃ":
 self.trans[char] = u"!"
 
@@ -255,12 +253,10 @@
 self.trans[u"‱"] = u"o/ooo"
 for char in u"¶§":
 self.trans[char] = u">"
-for char in u"…":
-self.trans[char] = u"..."
+self.trans['…'] = '...'
 for char in u"‒–—―":
 self.trans[char] = u"-"
-for char in u"·":
-self.trans[char] = u" "
+self.trans['·'] = ' '
 self.trans[u"¦"] = u"|"
 self.trans[u"⁂"] = u"***"
 self.trans[u"◊"] = u"<>"
@@ -717,88 +713,54 @@
 self.trans[char] = u","
 
 # Georgian
-for char in u"ა":
-self.trans[char] = u"a"
-for char in u"ბ":
-self.trans[char] = u"b"
-for char in u"გ":
-self.trans[char] = u"g"
-for char in u"დ":
-self.trans[char] = u"d"
+self.trans['ა'] = 'a'
+self.trans['ბ'] = 'b'
+self.trans['გ'] = 'g'
+self.trans['დ'] = 'd'
 for char in u"ეჱ":
 self.trans[char] = u"e"
-for char in u"ვ":
-self.trans[char] = u"v"
-for char in u"ზ":
-self.trans[char] = u"z"
-for char in u"თ":
-self.trans[char] = u"th"
-for char in u"ი":
-self.trans[char] = u"i"
-for char in u"კ":
-self.trans[char] = u"k"
-for char in u"ლ":
-self.trans[char] = u"l"
-for char in u"მ":
-self.trans[char] = u"m"
-for char in u"ნ":
-self.trans[char] = u"n"
-for char in u"ო":
-self.trans[char] = u"o"
-for char in u"პ":
-self.trans[char] = u"p"
-for char in u"ჟ":
-self.trans[char] = u"zh"
-for char in u"რ":
-self.trans[char] = u"r"
-for char in u"ს":
-self.trans[char] = u"s"
-for char in u"ტ":
-self.trans[char] = u"t"
-for char in u"უ":
-self.trans[char] = u"u"
-for char in u"ფ":
-self.trans[char] = u"ph"
-for char in u"ქ":
-self.trans[char] = u"q"
-for char in u"ღ":
-self.trans[char] = u"gh"
+self.trans['ვ'] = 'v'
+self.trans['ზ'] = 'z'
+self.trans['თ'] = 'th'
+self.trans['ი'] = 'i'
+self.trans['კ'] = 'k'
+self.trans['ლ'] = 'l'
+self.trans['მ'] = 'm'
+self.trans['ნ'] = 'n'
+self.trans['ო'] = 'o'
+self.trans['პ'] = 'p'
+self.trans['ჟ'] = 'zh'
+self.trans['რ'] = 'r'
+self.trans['ს'] = 's'
+self.trans['ტ'] = 't'
+self.trans['უ'] = 'u'
+self.trans['ფ'] = 'ph'
+self.trans['ქ'] = 'q'
+self.trans['ღ'] = 'gh'
 for char in u"ყ":
 self.trans[char] = u"q'"
-for char in u"შ":
-self.trans[char] = u"sh"
-for char in u"ჩ":
-self.trans[char] = u"ch"
-for char in u"ც":
-self.trans[char] = u"ts"
-for char in u"ძ":
-self.trans[char] = u"dz"
+self.trans['შ'] = 'sh'
+self.trans['ჩ'] = 'ch'
+self.trans['ც'] = 'ts'
+self.trans['ძ'] = 'dz'
 for char in u"წ":
 self.trans[char] = u"ts'"
 for char in u"ჭ":
 self.trans[char] = u"ch'"
-for char in u"ხ":
-self.trans[char] = u"kh"
-for char in u"ჯ":
-self.trans[char] = u"j"
-for char in u"ჰ":
-self.trans[char] = u"h"
-for char in u"ჳ":
-self.trans[char] = u"w"
-for char in u"ჵ":
-self.trans[char] = u"o"
-for char in u"ჶ":
-self.trans[char] = u"f"
+self.trans['ხ'] = 'kh'
+self.trans['ჯ'] = 'j'
+self.trans['ჰ'] = 'h'
+self.trans['ჳ'] = 'w'
+

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Simplify transliteration table for Japanese and Chine...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403961 )

Change subject: [IMPR] Simplify transliteration table for Japanese and Chinese 
typographie
..


[IMPR] Simplify transliteration table for Japanese and Chinese typographie

Change-Id: Iae4bfbf209578444e0b7d5e641ed3b132158a255
---
M pywikibot/userinterfaces/transliteration.py
1 file changed, 22 insertions(+), 43 deletions(-)

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



diff --git a/pywikibot/userinterfaces/transliteration.py 
b/pywikibot/userinterfaces/transliteration.py
index 0736ac0..274a64b 100644
--- a/pywikibot/userinterfaces/transliteration.py
+++ b/pywikibot/userinterfaces/transliteration.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Module to transliterate text."""
 #
-# (C) Pywikibot team, 2006-2015
+# (C) Pywikibot team, 2006-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -688,52 +688,31 @@
 self.trans[char] = u"["
 for char in u"]】〗":
 self.trans[char] = u"]"
-for char in u"{":
-self.trans[char] = u"{"
-for char in u"}":
-self.trans[char] = u"}"
-for char in u"っ":
-self.trans[char] = u":"
-for char in u"ー":
-self.trans[char] = u"h"
-for char in u"゛":
-self.trans[char] = u"'"
-for char in u"゜":
-self.trans[char] = u"p"
-for char in u"。":
-self.trans[char] = u". "
-for char in u"、":
-self.trans[char] = u", "
-for char in u"・":
-self.trans[char] = u" "
-for char in u"〆":
-self.trans[char] = u"shime"
-for char in u"〜":
-self.trans[char] = u"-"
-for char in u"…":
-self.trans[char] = u"..."
-for char in u"‥":
-self.trans[char] = u".."
-for char in u"ヶ":
-self.trans[char] = u"months"
+self.trans['{'] = '{'
+self.trans['}'] = '}'
+self.trans['っ'] = ':'
+self.trans['ー'] = 'h'
+self.trans['゛'] = "'"
+self.trans['゜'] = 'p'
+self.trans['。'] = '. '
+self.trans['、'] = ', '
+self.trans['・'] = ' '
+self.trans['〆'] = 'shime'
+self.trans['〜'] = '-'
+self.trans['…'] = '...'
+self.trans['‥'] = '..'
+self.trans['ヶ'] = 'months'
 for char in u"•◦":
 self.trans[char] = u"_"
 for char in u"※*":
 self.trans[char] = u"*"
-for char in u"Ⓧ":
-self.trans[char] = u"(X)"
-for char in u"Ⓨ":
-self.trans[char] = u"(Y)"
-for char in u"!":
-self.trans[char] = u"!"
-for char in u"?":
-self.trans[char] = u"?"
-for char in u";":
-self.trans[char] = u";"
-for char in u":":
-self.trans[char] = u":"
-for char in u"。":
-self.trans[char] = u"."
+self.trans['Ⓧ'] = '(X)'
+self.trans['Ⓨ'] = '(Y)'
+self.trans['!'] = '!'
+self.trans['?'] = '?'
+self.trans[';'] = ';'
+self.trans[':'] = ':'
+self.trans['。'] = '.'
 for char in u",、":
 self.trans[char] = u","
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae4bfbf209578444e0b7d5e641ed3b132158a255
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Multichill 
Gerrit-Reviewer: Zoranzoki21 
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...SocialProfile[master]: Convert SocialProfile to use PSR-3 structured logging

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404146 )

Change subject: Convert SocialProfile to use PSR-3 structured logging
..


Convert SocialProfile to use PSR-3 structured logging

This patch converts SocialProfile to use structured logging,
which allows it to properly follow the PSR-3 standard.

This also helps to replace calls of the global wfDebug function,
and creates our own debugging channel.

References:
 - https://www.mediawiki.org/wiki/Manual:Structured_logging
 - http://www.php-fig.org/psr/psr-3/

Change-Id: Ice1a3f5ae1175ce706f8fed25792f10883681af2
---
M SystemGifts/SpecialSystemGiftManagerLogo.php
M SystemGifts/UserSystemGiftsClass.php
M UserActivity/SiteActivityHook.php
M UserBoard/UserBoardClass.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/UserGiftsClass.php
M UserProfile/UserProfilePage.php
M UserRelationship/UserRelationshipClass.php
M UserStats/TopFansByStat.php
M UserStats/TopFansRecent.php
M UserStats/TopUsers.php
M UserStats/UserStats.php
M UserStats/UserStatsTrack.php
13 files changed, 226 insertions(+), 43 deletions(-)

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



diff --git a/SystemGifts/SpecialSystemGiftManagerLogo.php 
b/SystemGifts/SpecialSystemGiftManagerLogo.php
index 38bbdd4..368e551 100644
--- a/SystemGifts/SpecialSystemGiftManagerLogo.php
+++ b/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -1,4 +1,7 @@
 mUploadCopyStatus = $request->getText( 
'wpUploadCopyStatus' );
$this->mUploadSource = $request->getText( 'wpUploadSource' );
$this->mWatchthis = $request->getBool( 'wpWatchthis' );
-   wfDebug( __METHOD__ . ": watchthis is: '$this->mWatchthis'\n" );
+
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "{method}: watchthis is: '{watchthis}'\n", [
+   'method' => __METHOD__,
+   'watchthis' => $this->mWatchthis
+   ] );
 
$this->mAction = $request->getVal( 'action' );
$this->mSessionKey = $request->getInt( 'wpSessionKey' );
@@ -722,7 +730,11 @@
return Status::newFatal( 'uploadvirus', 
htmlspecialchars( $virus ) );
}
 
-   wfDebug( __METHOD__ . ": all clear; passing.\n" );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "{method}: all clear; passing.\n", [
+   'method' => __METHOD__
+   ] );
+
return Status::newGood();
}
 }
diff --git a/SystemGifts/UserSystemGiftsClass.php 
b/SystemGifts/UserSystemGiftsClass.php
index 1824918..9f820cc 100644
--- a/SystemGifts/UserSystemGiftsClass.php
+++ b/SystemGifts/UserSystemGiftsClass.php
@@ -1,4 +1,7 @@
 makeKey( 'system_gifts', 'new_count', $user_id 
);
$data = $wgMemc->get( $key );
if ( $data != '' ) {
-   wfDebug( "Got new award count of $data for id $user_id 
from cache\n" );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "Got new award count of {data} for 
{user_id} from cache\n", [
+   'data' => $data,
+   'user_id' => $user_id
+   ] );
+
return $data;
}
}
@@ -326,7 +334,10 @@
 * @return Integer: amount of new system gifts
 */
static function getNewSystemGiftCountDB( $user_id ) {
-   wfDebug( "Got new award count for id $user_id from DB\n" );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "Got new award count for id {user_id} from 
DB\n", [
+   'user_id' => $user_id
+   ] );
 
global $wgMemc;
$key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
diff --git a/UserActivity/SiteActivityHook.php 
b/UserActivity/SiteActivityHook.php
index 65f7942..1b8fbd4 100644
--- a/UserActivity/SiteActivityHook.php
+++ b/UserActivity/SiteActivityHook.php
@@ -1,5 +1,7 @@
 makeKey( 'site_activity', 'all', $fixedLimit );
$data = $wgMemc->get( $key );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+
if ( !$data ) {
-   wfDebug( "Got site activity from DB\n" );
+   $logger->debug( "Got new site activity from DB\n" );
+
$rel = new UserActivity( '', 'ALL', $fixedLimit );
 
$rel->setActivityToggle( 'show_votes', 0 );
$activity = $rel->getActivityListGrouped();
$wgMemc->set( $key, $activity, 60 * 2 );
} else {
-   

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove a few leftover uses of the deprecated wfMemcKey function

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404143 )

Change subject: Remove a few leftover uses of the deprecated wfMemcKey function
..


Remove a few leftover uses of the deprecated wfMemcKey function

I didn't see that there were actually a few uses of the wfMemcKey
left after, so this takes care of those few leftovers.

Follows-up: Icad1be17fc1426d0defbe8e65d2d127e3d7dc737
Change-Id: If34dfc1f27f63d4e290eddfffdf541964f3e0442
---
M UserProfile/UserProfileClass.php
M UserStats/SpecialUpdateEditCounts.php
M UserStats/TopFansByStat.php
M UserStats/TopFansRecent.php
M UserStats/TopUsers.php
M UserStats/UserStats.php
M UserStats/UserStatsTrack.php
7 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/UserProfile/UserProfileClass.php b/UserProfile/UserProfileClass.php
index 5ee5afd..5f93280 100644
--- a/UserProfile/UserProfileClass.php
+++ b/UserProfile/UserProfileClass.php
@@ -73,7 +73,7 @@
static function clearCache( $user_id ) {
global $wgMemc;
 
-   $key = wfMemcKey( 'user', 'profile', 'info', $user_id );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'info', $user_id );
$wgMemc->delete( $key );
}
 
@@ -90,7 +90,7 @@
$user->loadFromId();
 
// Try cache first
-   $key = wfMemcKey( 'user', 'profile', 'info', $this->user_id );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'info', 
$this->user_id );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebug( "Got user profile info for {$this->user_name} 
from cache\n" );
diff --git a/UserStats/SpecialUpdateEditCounts.php 
b/UserStats/SpecialUpdateEditCounts.php
index a9fbbc3..248e157 100644
--- a/UserStats/SpecialUpdateEditCounts.php
+++ b/UserStats/SpecialUpdateEditCounts.php
@@ -91,7 +91,7 @@
 
global $wgMemc;
// clear stats cache for current user
-   $key = wfMemcKey( 'user', 'stats', $row->rev_user );
+   $key = $wgMemc->makeKey( 'user', 'stats', 
$row->rev_user );
$wgMemc->delete( $key );
}
}
diff --git a/UserStats/TopFansByStat.php b/UserStats/TopFansByStat.php
index 0bdd7db..9e443bf 100644
--- a/UserStats/TopFansByStat.php
+++ b/UserStats/TopFansByStat.php
@@ -64,7 +64,7 @@
// Get the list of users
 
// Try cache
-   $key = wfMemcKey( 'user_stats', 'top', $statistic, $realCount );
+   $key = $wgMemc->makeKey( 'user_stats', 'top', $statistic, 
$realCount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/UserStats/TopFansRecent.php b/UserStats/TopFansRecent.php
index 0d3d114..f521be0 100644
--- a/UserStats/TopFansRecent.php
+++ b/UserStats/TopFansRecent.php
@@ -64,7 +64,7 @@
$user_list = array();
 
// Try cache
-   $key = wfMemcKey( 'user_stats', $period, 'points', $realCount );
+   $key = $wgMemc->makeKey( 'user_stats', $period, 'points', 
$realCount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/UserStats/TopUsers.php b/UserStats/TopUsers.php
index 4bfa373..0b21433 100644
--- a/UserStats/TopUsers.php
+++ b/UserStats/TopUsers.php
@@ -34,7 +34,7 @@
$user_list = array();
 
// Try cache
-   $key = wfMemcKey( 'user_stats', 'top', 'points', $realcount );
+   $key = $wgMemc->makeKey( 'user_stats', 'top', 'points', 
$realcount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/UserStats/UserStats.php b/UserStats/UserStats.php
index 42aa76b..8842f2e 100644
--- a/UserStats/UserStats.php
+++ b/UserStats/UserStats.php
@@ -52,7 +52,7 @@
 */
public function getUserStatsCache() {
global $wgMemc;
-   $key = wfMemcKey( 'user', 'stats', $this->user_id );
+   $key = $wgMemc->makeKey( 'user', 'stats', $this->user_id );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebug( "Got user stats for {$this->user_name} from 
cache\n" );
@@ -110,7 +110,7 @@
$stats['points'] = '1000';
}
 
-   $key = wfMemcKey( 'user', 'stats', $this->user_id );
+   $key = $wgMemc->makeKey( 'user', 'stats', $this->user_id );
$wgMemc->set( $key, $stats );
return $stats;
}
diff --git a/UserStats/UserStatsTrack.php b/UserStats/UserStatsTrack.php
index eeac4ff..4cef914 100644
--- a/UserStats/UserStatsTrack.php
+++ b/UserStats/UserStatsTrack.php
@@ -106,7 +106,7 

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Convert SocialProfile to use PSR-3 structured logging

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404146 )

Change subject: Convert SocialProfile to use PSR-3 structured logging
..

Convert SocialProfile to use PSR-3 structured logging

This patch converts SocialProfile to use structured logging,
which allows it to properly follow the PSR-3 standard.

This also helps to replace calls of the global wfDebug function,
and creates our own debugging channel.

References:
 - https://www.mediawiki.org/wiki/Manual:Structured_logging
 - http://www.php-fig.org/psr/psr-3/

Change-Id: Ice1a3f5ae1175ce706f8fed25792f10883681af2
---
M SystemGifts/SpecialSystemGiftManagerLogo.php
M SystemGifts/UserSystemGiftsClass.php
M UserActivity/SiteActivityHook.php
M UserBoard/UserBoardClass.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/UserGiftsClass.php
M UserProfile/UserProfilePage.php
M UserRelationship/UserRelationshipClass.php
M UserStats/TopFansByStat.php
M UserStats/TopFansRecent.php
M UserStats/TopUsers.php
M UserStats/UserStats.php
M UserStats/UserStatsTrack.php
13 files changed, 227 insertions(+), 44 deletions(-)


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

diff --git a/SystemGifts/SpecialSystemGiftManagerLogo.php 
b/SystemGifts/SpecialSystemGiftManagerLogo.php
index 38bbdd4..368e551 100644
--- a/SystemGifts/SpecialSystemGiftManagerLogo.php
+++ b/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -1,4 +1,7 @@
 mUploadCopyStatus = $request->getText( 
'wpUploadCopyStatus' );
$this->mUploadSource = $request->getText( 'wpUploadSource' );
$this->mWatchthis = $request->getBool( 'wpWatchthis' );
-   wfDebug( __METHOD__ . ": watchthis is: '$this->mWatchthis'\n" );
+
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "{method}: watchthis is: '{watchthis}'\n", [
+   'method' => __METHOD__,
+   'watchthis' => $this->mWatchthis
+   ] );
 
$this->mAction = $request->getVal( 'action' );
$this->mSessionKey = $request->getInt( 'wpSessionKey' );
@@ -722,7 +730,11 @@
return Status::newFatal( 'uploadvirus', 
htmlspecialchars( $virus ) );
}
 
-   wfDebug( __METHOD__ . ": all clear; passing.\n" );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "{method}: all clear; passing.\n", [
+   'method' => __METHOD__
+   ] );
+
return Status::newGood();
}
 }
diff --git a/SystemGifts/UserSystemGiftsClass.php 
b/SystemGifts/UserSystemGiftsClass.php
index 1824918..9f820cc 100644
--- a/SystemGifts/UserSystemGiftsClass.php
+++ b/SystemGifts/UserSystemGiftsClass.php
@@ -1,4 +1,7 @@
 makeKey( 'system_gifts', 'new_count', $user_id 
);
$data = $wgMemc->get( $key );
if ( $data != '' ) {
-   wfDebug( "Got new award count of $data for id $user_id 
from cache\n" );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "Got new award count of {data} for 
{user_id} from cache\n", [
+   'data' => $data,
+   'user_id' => $user_id
+   ] );
+
return $data;
}
}
@@ -326,7 +334,10 @@
 * @return Integer: amount of new system gifts
 */
static function getNewSystemGiftCountDB( $user_id ) {
-   wfDebug( "Got new award count for id $user_id from DB\n" );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+   $logger->debug( "Got new award count for id {user_id} from 
DB\n", [
+   'user_id' => $user_id
+   ] );
 
global $wgMemc;
$key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
diff --git a/UserActivity/SiteActivityHook.php 
b/UserActivity/SiteActivityHook.php
index 65f7942..1b8fbd4 100644
--- a/UserActivity/SiteActivityHook.php
+++ b/UserActivity/SiteActivityHook.php
@@ -1,5 +1,7 @@
 makeKey( 'site_activity', 'all', $fixedLimit );
$data = $wgMemc->get( $key );
+   $logger = LoggerFactory::getInstance( 'SocialProfile' );
+
if ( !$data ) {
-   wfDebug( "Got site activity from DB\n" );
+   $logger->debug( "Got new site activity from DB\n" );
+
$rel = new UserActivity( '', 'ALL', $fixedLimit );
 
$rel->setActivityToggle( 'show_votes', 0 );
$activity = $rel->getActivityListGrouped();
$wgMemc->set( $key, $activity, 60 * 2 );
} else {
-

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Create Module Tests

2018-01-13 Thread Eisenhaus335 (Code Review)
Eisenhaus335 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404145 )

Change subject: Create Module Tests
..

Create Module Tests

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/45/404145/1


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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Clarify `required` true handling with `indicator: 'required'`

2018-01-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404144 )

Change subject: Clarify `required` true handling with `indicator: 'required'`
..

Clarify `required` true handling with `indicator: 'required'`

Also change demo to use a different indicator.

Bug: T184811
Change-Id: I1651a257760a769b122baa1cc84d686c72e952e8
---
M demos/pages/widgets.php
M php/widgets/MultilineTextInputWidget.php
M php/widgets/TextInputWidget.php
M src/widgets/TextInputWidget.js
4 files changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/44/404144/1

diff --git a/demos/pages/widgets.php b/demos/pages/widgets.php
index 9932470..9f1c971 100644
--- a/demos/pages/widgets.php
+++ b/demos/pages/widgets.php
@@ -430,7 +430,7 @@
new OOUI\MultilineTextInputWidget( [
'value' => "Multiline\nMultiline",
'icon' => 'tag',
-   'indicator' => 'required'
+   'indicator' => 'alert'
] ),
[
'label' => "MultilineTextInputWidget (icon, 
indicator)\xE2\x80\x8E",
diff --git a/php/widgets/MultilineTextInputWidget.php 
b/php/widgets/MultilineTextInputWidget.php
index 73d3975..1ccf7d9 100644
--- a/php/widgets/MultilineTextInputWidget.php
+++ b/php/widgets/MultilineTextInputWidget.php
@@ -23,7 +23,8 @@
 * @param number $config['maxLength'] Maximum allowed number of 
characters to input
 * @param int $config['rows'] If multiline, number of visible lines in 
textarea
 * @param bool $config['required'] Mark the field as required.
-*   Implies `indicator: 'required'`. (default: false)
+*   Implies `indicator: 'required'`. Note that `false` & setting 
`indicator: 'required'
+*   will result in no indicator shown. (default: false)
 */
public function __construct( array $config = [] ) {
// Config initialization
diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php
index a576f6a..f879c6a 100644
--- a/php/widgets/TextInputWidget.php
+++ b/php/widgets/TextInputWidget.php
@@ -51,7 +51,8 @@
 * @param bool $config['multiline'] Allow multiple lines of text 
(default: false)
 * @param int $config['rows'] If multiline, number of visible lines in 
textarea
 * @param bool $config['required'] Mark the field as required.
-*   Implies `indicator: 'required'`. (default: false)
+*   Implies `indicator: 'required'`. Note that `false` & setting 
`indicator: 'required'
+*   will result in no indicator shown. (default: false)
 * @param bool $config['autocomplete'] If the field should support 
autocomplete
 *   or not (default: true)
 * @param bool $config['spellcheck'] If the field should support 
spellcheck
diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 0032013..45908d1 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -35,7 +35,8 @@
  * @cfg {number} [maxLength] Maximum number of characters allowed in the input.
  * @cfg {string} [labelPosition='after'] The position of the inline label 
relative to that of
  *  the value or placeholder text: `'before'` or `'after'`
- * @cfg {boolean} [required=false] Mark the field as required. Implies 
`indicator: 'required'`.
+ * @cfg {boolean} [required=false] Mark the field as required with `true`. 
Implies `indicator: 'required'`.
+ *  Note that `false` & setting `indicator: 'required' will result in no 
indicator shown.
  * @cfg {boolean} [autocomplete=true] Should the browser support autocomplete 
for this field
  * @cfg {boolean} [spellcheck] Should the browser support spellcheck for this 
field (`undefined` means
  *  leaving it up to the browser).

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove a few leftover uses of the deprecated wfMemcKey function

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404143 )

Change subject: Remove a few leftover uses of the deprecated wfMemcKey function
..

Remove a few leftover uses of the deprecated wfMemcKey function

I didn't see that there were actually a few uses of the wfMemcKey
left after, so this takes care of those few leftovers.

Follows-up: Icad1be17fc1426d0defbe8e65d2d127e3d7dc737
Change-Id: If34dfc1f27f63d4e290eddfffdf541964f3e0442
---
M UserProfile/UserProfileClass.php
M UserStats/SpecialUpdateEditCounts.php
M UserStats/TopFansByStat.php
M UserStats/TopFansRecent.php
M UserStats/TopUsers.php
M UserStats/UserStats.php
M UserStats/UserStatsTrack.php
7 files changed, 10 insertions(+), 10 deletions(-)


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

diff --git a/UserProfile/UserProfileClass.php b/UserProfile/UserProfileClass.php
index 5ee5afd..5f93280 100644
--- a/UserProfile/UserProfileClass.php
+++ b/UserProfile/UserProfileClass.php
@@ -73,7 +73,7 @@
static function clearCache( $user_id ) {
global $wgMemc;
 
-   $key = wfMemcKey( 'user', 'profile', 'info', $user_id );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'info', $user_id );
$wgMemc->delete( $key );
}
 
@@ -90,7 +90,7 @@
$user->loadFromId();
 
// Try cache first
-   $key = wfMemcKey( 'user', 'profile', 'info', $this->user_id );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'info', 
$this->user_id );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebug( "Got user profile info for {$this->user_name} 
from cache\n" );
diff --git a/UserStats/SpecialUpdateEditCounts.php 
b/UserStats/SpecialUpdateEditCounts.php
index a9fbbc3..248e157 100644
--- a/UserStats/SpecialUpdateEditCounts.php
+++ b/UserStats/SpecialUpdateEditCounts.php
@@ -91,7 +91,7 @@
 
global $wgMemc;
// clear stats cache for current user
-   $key = wfMemcKey( 'user', 'stats', $row->rev_user );
+   $key = $wgMemc->makeKey( 'user', 'stats', 
$row->rev_user );
$wgMemc->delete( $key );
}
}
diff --git a/UserStats/TopFansByStat.php b/UserStats/TopFansByStat.php
index 0bdd7db..9e443bf 100644
--- a/UserStats/TopFansByStat.php
+++ b/UserStats/TopFansByStat.php
@@ -64,7 +64,7 @@
// Get the list of users
 
// Try cache
-   $key = wfMemcKey( 'user_stats', 'top', $statistic, $realCount );
+   $key = $wgMemc->makeKey( 'user_stats', 'top', $statistic, 
$realCount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/UserStats/TopFansRecent.php b/UserStats/TopFansRecent.php
index 0d3d114..f521be0 100644
--- a/UserStats/TopFansRecent.php
+++ b/UserStats/TopFansRecent.php
@@ -64,7 +64,7 @@
$user_list = array();
 
// Try cache
-   $key = wfMemcKey( 'user_stats', $period, 'points', $realCount );
+   $key = $wgMemc->makeKey( 'user_stats', $period, 'points', 
$realCount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/UserStats/TopUsers.php b/UserStats/TopUsers.php
index 4bfa373..0b21433 100644
--- a/UserStats/TopUsers.php
+++ b/UserStats/TopUsers.php
@@ -34,7 +34,7 @@
$user_list = array();
 
// Try cache
-   $key = wfMemcKey( 'user_stats', 'top', 'points', $realcount );
+   $key = $wgMemc->makeKey( 'user_stats', 'top', 'points', 
$realcount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/UserStats/UserStats.php b/UserStats/UserStats.php
index 42aa76b..8842f2e 100644
--- a/UserStats/UserStats.php
+++ b/UserStats/UserStats.php
@@ -52,7 +52,7 @@
 */
public function getUserStatsCache() {
global $wgMemc;
-   $key = wfMemcKey( 'user', 'stats', $this->user_id );
+   $key = $wgMemc->makeKey( 'user', 'stats', $this->user_id );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebug( "Got user stats for {$this->user_name} from 
cache\n" );
@@ -110,7 +110,7 @@
$stats['points'] = '1000';
}
 
-   $key = wfMemcKey( 'user', 'stats', $this->user_id );
+   $key = $wgMemc->makeKey( 'user', 'stats', $this->user_id );
$wgMemc->set( $key, $stats );
return $stats;
}
diff --git a/UserStats/UserStatsTrack.php b/UserStats/UserStatsTrack.php
index eeac4ff..4cef914 100644
--- a/UserStats/UserStatsTrack.php
+++ 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Add isAnonymous() check in User.isRegistered()

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402829 )

Change subject: [IMPR] Add isAnonymous() check in User.isRegistered()
..


[IMPR] Add isAnonymous() check in User.isRegistered()

This could safe up to 4 api calls

Bug: T183877
Change-Id: I5b165cb6675a3d38f50d413e1db3ff6519316788
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 5195af2..3eb02e4 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3188,7 +3188,8 @@
 @rtype: bool
 """
 # T135828: the registration timestamp may be None but the key exists
-return 'registration' in self.getprops(force)
+return (not self.isAnonymous()
+and 'registration' in self.getprops(force))
 
 def isAnonymous(self):
 """

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b165cb6675a3d38f50d413e1db3ff6519316788
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Zoranzoki21 
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]: WIPDNM phan 0.9

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404141 )

Change subject: WIPDNM phan 0.9
..

WIPDNM phan 0.9

Change-Id: I2eaad72b483b8224c4c327e99febed07f9548352
---
A dockerfiles/composer-71/Dockerfile.template
A dockerfiles/composer-71/changelog
A dockerfiles/composer-71/control
A dockerfiles/mediawiki-phan-0.9/Dockerfile.template
A dockerfiles/mediawiki-phan-0.9/README.md
A dockerfiles/mediawiki-phan-0.9/changelog
A dockerfiles/mediawiki-phan-0.9/control
A dockerfiles/mediawiki-phan-0.9/run.sh
A dockerfiles/php71/Dockerfile.template
A dockerfiles/php71/apt.gpg
A dockerfiles/php71/changelog
A dockerfiles/php71/control
12 files changed, 121 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/41/404141/1

diff --git a/dockerfiles/composer-71/Dockerfile.template 
b/dockerfiles/composer-71/Dockerfile.template
new file mode 100644
index 000..f28e233
--- /dev/null
+++ b/dockerfiles/composer-71/Dockerfile.template
@@ -0,0 +1,16 @@
+FROM {{ "php71" | image_tag }}
+
+USER root
+
+RUN git clone --depth 1 
https://gerrit.wikimedia.org/r/p/integration/composer.git /srv/composer \
+&& rm -rf /srv/composer/.git \
+&& ln -s /srv/composer/vendor/bin/composer /usr/bin/composer
+
+USER nobody
+
+# If a later dockerfile enables xdebug, don't
+# spam warnings about it.
+ENV COMPOSER_DISABLE_XDEBUG_WARN=1
+
+ENTRYPOINT ["/srv/composer/vendor/bin/composer"]
+CMD ["help"]
diff --git a/dockerfiles/composer-71/changelog 
b/dockerfiles/composer-71/changelog
new file mode 100644
index 000..ba5e2bc
--- /dev/null
+++ b/dockerfiles/composer-71/changelog
@@ -0,0 +1,5 @@
+composer-71 (0.1.0) wikimedia; urgency=medium
+
+  * Initial version running composer on php 7.1
+
+ -- Addshore   Thu, 13 Jan 2018 22:28:00 +
diff --git a/dockerfiles/composer-71/control b/dockerfiles/composer-71/control
new file mode 100644
index 000..73aa75a
--- /dev/null
+++ b/dockerfiles/composer-71/control
@@ -0,0 +1 @@
+Depends: php71
diff --git a/dockerfiles/mediawiki-phan-0.9/Dockerfile.template 
b/dockerfiles/mediawiki-phan-0.9/Dockerfile.template
new file mode 100644
index 000..5189f48
--- /dev/null
+++ b/dockerfiles/mediawiki-phan-0.9/Dockerfile.template
@@ -0,0 +1,27 @@
+FROM {{ "composer-71" | image_tag }}
+
+USER root
+
+RUN install -d /srv/phan -o nobody
+
+# Install php7.0 dev for phpize, and php-pear for pecl
+# pecl allows us to install the newer versions of ast
+RUN apt-get update && \
+DEBIAN_FRONTEND=noninteractive apt-get install --yes 
--no-install-recommends \
+php7.0-dev php-pear make && \
+pecl install ast && \
+apt-get remove --yes \
+php7.0-dev php-pear make && \
+apt-get autoremove --yes && apt-get clean && rm -rf /var/lib/apt/lists/* 
&& \
+mv /usr/lib/php/20151012/ast.so
+
+ENV PHAN /srv/phan/vendor/bin/phan
+
+USER nobody
+
+RUN  cd /srv/phan && \
+ composer require phan/phan:0.9.7 && \
+ rm -rf /cache/*
+
+COPY run.sh /run.sh
+ENTRYPOINT ["/run.sh"]
diff --git a/dockerfiles/mediawiki-phan-0.9/README.md 
b/dockerfiles/mediawiki-phan-0.9/README.md
new file mode 100644
index 000..b2a5430
--- /dev/null
+++ b/dockerfiles/mediawiki-phan-0.9/README.md
@@ -0,0 +1,17 @@
+##Volumes
+
+**/mediawiki**
+
+This should be a copy of mediawiki.
+
+
+## Example
+
+To run phan for the ElectronPdfService extension:
+
+```
+docker run --rm \
+-v /dev/git/gerrit/mediawiki:/mediawiki \
+docker-registry.wikimedia.org/releng/mediawiki-phan:latest \
+/mediawiki/extensions/ElectronPdfService -m checkstyle
+```
diff --git a/dockerfiles/mediawiki-phan-0.9/changelog 
b/dockerfiles/mediawiki-phan-0.9/changelog
new file mode 100644
index 000..fad0746
--- /dev/null
+++ b/dockerfiles/mediawiki-phan-0.9/changelog
@@ -0,0 +1,5 @@
+mediawiki-phan-0.9 (0.1.0) wikimedia; urgency=medium
+
+  * Initial phan 0.9.7 version
+
+ -- Addshore   Fri, 13 Jan 2018 22:27:00 +
diff --git a/dockerfiles/mediawiki-phan-0.9/control 
b/dockerfiles/mediawiki-phan-0.9/control
new file mode 100644
index 000..a687801
--- /dev/null
+++ b/dockerfiles/mediawiki-phan-0.9/control
@@ -0,0 +1 @@
+Depends: composer-71
diff --git a/dockerfiles/mediawiki-phan-0.9/run.sh 
b/dockerfiles/mediawiki-phan-0.9/run.sh
new file mode 100644
index 000..12e98dc
--- /dev/null
+++ b/dockerfiles/mediawiki-phan-0.9/run.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -euxo pipefail
+
+umask 002
+
+/mediawiki/tests/phan/bin/phan $@
diff --git a/dockerfiles/php71/Dockerfile.template 
b/dockerfiles/php71/Dockerfile.template
new file mode 100644
index 000..ae5c95f
--- /dev/null
+++ b/dockerfiles/php71/Dockerfile.template
@@ -0,0 +1,36 @@
+FROM {{ "ci-stretch" | image_tag }}
+
+COPY apt.gpg /etc/apt/trusted.gpg.d/php.gpg
+
+RUN apt-get update && \
+DEBIAN_FRONTEND=noninteractive apt-get install --yes 

[MediaWiki-commits] [Gerrit] integration/config[master]: docker: update phan image to phan 0.8.10

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404142 )

Change subject: docker: update phan image to phan 0.8.10
..

docker: update phan image to phan 0.8.10

Bug: T174339
Change-Id: Ia19975d2a13cd9347429493e3b1a0e11e4e915e7
---
M dockerfiles/mediawiki-phan/Dockerfile.template
M dockerfiles/mediawiki-phan/changelog
2 files changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/42/404142/1

diff --git a/dockerfiles/mediawiki-phan/Dockerfile.template 
b/dockerfiles/mediawiki-phan/Dockerfile.template
index 013d50f..98587c1 100644
--- a/dockerfiles/mediawiki-phan/Dockerfile.template
+++ b/dockerfiles/mediawiki-phan/Dockerfile.template
@@ -4,12 +4,20 @@
 
 RUN install -d /srv/phan -o nobody
 
+RUN apt-get update && \
+DEBIAN_FRONTEND=noninteractive apt-get install --yes 
--no-install-recommends \
+php7.0-dev php-pear make && \
+pecl install ast && \
+apt-get remove --yes \
+php7.0-dev php-pear make && \
+apt-get autoremove --yes && apt-get clean && rm -rf /var/lib/apt/lists/*
+
 ENV PHAN /srv/phan/vendor/bin/phan
 
 USER nobody
 
 RUN  cd /srv/phan && \
- composer require phan/phan:0.8 && \
+ composer require phan/phan:0.8.10 && \
  rm -rf /cache/*
 
 COPY run.sh /run.sh
diff --git a/dockerfiles/mediawiki-phan/changelog 
b/dockerfiles/mediawiki-phan/changelog
index 36f2904..ca7eefc 100644
--- a/dockerfiles/mediawiki-phan/changelog
+++ b/dockerfiles/mediawiki-phan/changelog
@@ -1,3 +1,9 @@
+mediawiki-phan (0.2.0) wikimedia; urgency=medium
+
+  * Initial port to docker-pkg.
+
+ -- Addshore   Fri, 13 Jan 2018 23:40:00 +
+
 mediawiki-phan (0.1.0) wikimedia; urgency=medium
 
   * Initial port to docker-pkg.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Use ReadOnlyMode MediaWiki service introduced in 1.29.0

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404139 )

Change subject: Use ReadOnlyMode MediaWiki service introduced in 1.29.0
..


Use ReadOnlyMode MediaWiki service introduced in 1.29.0

This helps avoid calling the global wfReadOnly function,
and in turn uses a MediaWiki service instead, introduced
in 1.29.0.

Change-Id: I841504ac3316c2bb264a82a56780482fa1ed4a11
---
M UserBoard/ApiDeleteUserBoardMessage.php
M UserBoard/ApiSendUserBoardMessage.php
M UserRelationship/ApiRelationshipResponse.php
3 files changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/UserBoard/ApiDeleteUserBoardMessage.php 
b/UserBoard/ApiDeleteUserBoardMessage.php
index 85edd33..0238a18 100644
--- a/UserBoard/ApiDeleteUserBoardMessage.php
+++ b/UserBoard/ApiDeleteUserBoardMessage.php
@@ -1,14 +1,17 @@
 getMain();
$user = $this->getUser();
+   $readOnlyMode = 
MediaWikiServices::getInstance()->getReadOnlyMode();
 
$messageId = $main->getVal( 'id' );
 
// Don't allow deleting messages when the database is locked 
for some reason
-   if ( wfReadOnly() ) {
+   if ( $readOnlyMode->isReadOnly() ) {
$this->getResult()->addValue( null, 'result', 'You 
cannot delete messages right now.' );
return true;
}
diff --git a/UserBoard/ApiSendUserBoardMessage.php 
b/UserBoard/ApiSendUserBoardMessage.php
index b8853ec..d4e9754 100644
--- a/UserBoard/ApiSendUserBoardMessage.php
+++ b/UserBoard/ApiSendUserBoardMessage.php
@@ -1,5 +1,7 @@
 getMain();
@@ -9,10 +11,11 @@
$message_type = $main->getVal( 'type' ) || 0;
 
$user = $this->getUser();
+   $readOnlyMode = 
MediaWikiServices::getInstance()->getReadOnlyMode();
 
// Don't allow blocked users to send messages and also don't 
allow message
// sending when the database is locked for some reason
-   if ( $user->isBlocked() || wfReadOnly() ) {
+   if ( $user->isBlocked() || $readOnlyMode->isReadOnly() ) {
$this->getResult()->addValue( null, 'result', 'You 
cannot send messages.' );
return true;
}
diff --git a/UserRelationship/ApiRelationshipResponse.php 
b/UserRelationship/ApiRelationshipResponse.php
index 09676b7..8d772ee 100644
--- a/UserRelationship/ApiRelationshipResponse.php
+++ b/UserRelationship/ApiRelationshipResponse.php
@@ -1,5 +1,7 @@
 getMain();
@@ -8,10 +10,11 @@
$requestId = $main->getVal( 'id' );
 
$user = $this->getUser();
+   $readOnlyMode = 
MediaWikiServices::getInstance()->getReadOnlyMode();
 
// Don't allow blocked users to send messages and also don't 
allow message
// sending when the database is locked for some reason
-   if ( $user->isBlocked() || wfReadOnly() ) {
+   if ( $user->isBlocked() || $readOnlyMode->isReadOnly() ) {
return false;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I841504ac3316c2bb264a82a56780482fa1ed4a11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Lewis Cawte 
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...SocialProfile[master]: Use ReadOnlyMode MediaWiki service introduced in 1.29.0

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404139 )

Change subject: Use ReadOnlyMode MediaWiki service introduced in 1.29.0
..

Use ReadOnlyMode MediaWiki service introduced in 1.29.0

This helps avoid calling the global wfReadOnly function,
and in turn uses a MediaWiki service instead, introduced
in 1.29.0.

Change-Id: I841504ac3316c2bb264a82a56780482fa1ed4a11
---
M UserBoard/ApiDeleteUserBoardMessage.php
M UserBoard/ApiSendUserBoardMessage.php
M UserRelationship/ApiRelationshipResponse.php
3 files changed, 12 insertions(+), 3 deletions(-)


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

diff --git a/UserBoard/ApiDeleteUserBoardMessage.php 
b/UserBoard/ApiDeleteUserBoardMessage.php
index 85edd33..0238a18 100644
--- a/UserBoard/ApiDeleteUserBoardMessage.php
+++ b/UserBoard/ApiDeleteUserBoardMessage.php
@@ -1,14 +1,17 @@
 getMain();
$user = $this->getUser();
+   $readOnlyMode = 
MediaWikiServices::getInstance()->getReadOnlyMode();
 
$messageId = $main->getVal( 'id' );
 
// Don't allow deleting messages when the database is locked 
for some reason
-   if ( wfReadOnly() ) {
+   if ( $readOnlyMode->isReadOnly() ) {
$this->getResult()->addValue( null, 'result', 'You 
cannot delete messages right now.' );
return true;
}
diff --git a/UserBoard/ApiSendUserBoardMessage.php 
b/UserBoard/ApiSendUserBoardMessage.php
index b8853ec..d4e9754 100644
--- a/UserBoard/ApiSendUserBoardMessage.php
+++ b/UserBoard/ApiSendUserBoardMessage.php
@@ -1,5 +1,7 @@
 getMain();
@@ -9,10 +11,11 @@
$message_type = $main->getVal( 'type' ) || 0;
 
$user = $this->getUser();
+   $readOnlyMode = 
MediaWikiServices::getInstance()->getReadOnlyMode();
 
// Don't allow blocked users to send messages and also don't 
allow message
// sending when the database is locked for some reason
-   if ( $user->isBlocked() || wfReadOnly() ) {
+   if ( $user->isBlocked() || $readOnlyMode->isReadOnly() ) {
$this->getResult()->addValue( null, 'result', 'You 
cannot send messages.' );
return true;
}
diff --git a/UserRelationship/ApiRelationshipResponse.php 
b/UserRelationship/ApiRelationshipResponse.php
index 09676b7..8d772ee 100644
--- a/UserRelationship/ApiRelationshipResponse.php
+++ b/UserRelationship/ApiRelationshipResponse.php
@@ -1,5 +1,7 @@
 getMain();
@@ -8,10 +10,11 @@
$requestId = $main->getVal( 'id' );
 
$user = $this->getUser();
+   $readOnlyMode = 
MediaWikiServices::getInstance()->getReadOnlyMode();
 
// Don't allow blocked users to send messages and also don't 
allow message
// sending when the database is locked for some reason
-   if ( $user->isBlocked() || wfReadOnly() ) {
+   if ( $user->isBlocked() || $readOnlyMode->isReadOnly() ) {
return false;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Unit test NewsletterDb::getNewsletter

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404062 )

Change subject: Unit test NewsletterDb::getNewsletter
..


Unit test NewsletterDb::getNewsletter

Bug: T183810
Change-Id: I59d331ddda77d527496c2d61d52c785b1ac3ebbf
---
M tests/NewsletterDbTest.php
1 file changed, 37 insertions(+), 0 deletions(-)

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



diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index 007e23c..44d9012 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -394,6 +394,43 @@
}
 
/**
+* @covers NewsletterDb::getNewsletter
+*/
+   public function testGetNewsletter() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+
+   $mockResWrapper = $this->getMockBuilder( 'ResultWrapper' )
+   ->disableOriginalConstructor()
+   ->getMock();
+   $mockResWrapper->expects( $this->once() )
+   ->method( 'current' )
+   ->will( $this->returnValue(
+   (Object)[
+   'nl_id' => $newsletter->getId(),
+   'nl_name' => $newsletter->getName(),
+   'nl_desc' => 
$newsletter->getDescription(),
+   'nl_main_page_id' => 
$newsletter->getPageId(),
+   ]
+   ) );
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'select' )
+   ->with(
+   'nl_newsletters',
+   [ 'nl_id', 'nl_name', 'nl_desc', 
'nl_main_page_id' ],
+   [ 'nl_id' => $newsletter->getId(), 'nl_active' 
=> 1 ]
+   )
+   ->will( $this->returnValue( $mockResWrapper ) );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+
+   $result = $table->getNewsletter( $newsletter->getId() );
+   $this->assertEquals( $newsletter, $result );
+   }
+
+   /**
 * @covers NewsletterDb::getNewsletterFromName
 */
public function testGetNewsletterFromName() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59d331ddda77d527496c2d61d52c785b1ac3ebbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
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...SocialProfile[master]: Clean up permission checks in special pages

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400619 )

Change subject: Clean up permission checks in special pages
..


Clean up permission checks in special pages

This patch helps cleans up checks to reduce code duplication, by
calling parent functions in most places, including:
* checkPermissions()
* requireLogin()

For more fine-grained permissions, a new permission called
'populate-user-profiles' has been created. This is given to
the 'staff' group by default.

This also changes around checks to the proper order, which is:
* check user permissions
* check if database is in read-only
* check if user is blocked
* set headers

This also sets header in a few special pages that didn't already set them,
which included:
* Special:ToggleUserPageType
* Special:PopulateExistingUsersProfiles

Change-Id: I88c2c91fbd6844a653ab96e49fb1224e9caa30d3
---
M SystemGifts/SpecialPopulateAwards.php
M SystemGifts/SpecialRemoveMasterSystemGift.php
M SystemGifts/SpecialSystemGiftManager.php
M SystemGifts/SpecialSystemGiftManagerLogo.php
M UserBoard/SpecialSendBoardBlast.php
M UserBoard/i18n/en.json
M UserBoard/i18n/qqq.json
M UserGifts/SpecialGiftManager.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/SpecialRemoveMasterGift.php
M UserProfile/SpecialEditProfile.php
M UserProfile/SpecialPopulateExistingUsersProfiles.php
M UserProfile/SpecialToggleUserPageType.php
M UserProfile/SpecialUpdateProfile.php
M UserProfile/UserProfile.php
M UserProfile/i18n/en.json
M UserProfile/i18n/qqq.json
M UserRelationship/SpecialViewRelationshipRequests.php
M UserRelationship/SpecialViewRelationships.php
M UserRelationship/i18n/en.json
M UserStats/GenerateTopUsersReport.php
M UserStats/SpecialUpdateEditCounts.php
22 files changed, 124 insertions(+), 150 deletions(-)

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



diff --git a/SystemGifts/SpecialPopulateAwards.php 
b/SystemGifts/SpecialPopulateAwards.php
index 27a3399..17dc727 100644
--- a/SystemGifts/SpecialPopulateAwards.php
+++ b/SystemGifts/SpecialPopulateAwards.php
@@ -27,10 +27,8 @@
$out = $this->getOutput();
$user = $this->getUser();
 
-   // If the user doesn't have the required 'awardsmanage' 
permission, display an error
-   if ( !$user->isAllowed( 'awardsmanage' ) ) {
-   throw new PermissionsError( 'awardsmanage' );
-   }
+   // make sure user has the correct permissions
+   $this->checkPermissions();
 
// Show a message if the database is in read-only mode
$this->checkReadOnly();
diff --git a/SystemGifts/SpecialRemoveMasterSystemGift.php 
b/SystemGifts/SpecialRemoveMasterSystemGift.php
index 559537b..a68b07b 100644
--- a/SystemGifts/SpecialRemoveMasterSystemGift.php
+++ b/SystemGifts/SpecialRemoveMasterSystemGift.php
@@ -11,7 +11,7 @@
 * Constructor
 */
public function __construct() {
-   parent::__construct( 'RemoveMasterSystemGift' );
+   parent::__construct( 'RemoveMasterSystemGift', 'awardsmanage' );
}
 
/**
@@ -41,10 +41,8 @@
$request = $this->getRequest();
$user = $this->getUser();
 
-   // If the user doesn't have the required 'awardsmanage' 
permission, display an error
-   if ( !$user->isAllowed( 'awardsmanage' ) ) {
-   throw new PermissionsError( 'awardsmanage' );
-   }
+   // make sure user has the correct permissions
+   $this->checkPermissions();
 
// Show a message if the database is in read-only mode
$this->checkReadOnly();
diff --git a/SystemGifts/SpecialSystemGiftManager.php 
b/SystemGifts/SpecialSystemGiftManager.php
index f39c129..fce80de 100644
--- a/SystemGifts/SpecialSystemGiftManager.php
+++ b/SystemGifts/SpecialSystemGiftManager.php
@@ -30,13 +30,8 @@
$request = $this->getRequest();
$user = $this->getUser();
 
-   // Set the page title, robot policies, etc.
-   $this->setHeaders();
-
-   // If the user doesn't have the required 'awardsmanage' 
permission, display an error
-   if ( !$user->isAllowed( 'awardsmanage' ) ) {
-   throw new PermissionsError( 'awardsmanage' );
-   }
+   // make sure user has the correct permissions
+   $this->checkPermissions();
 
// Show a message if the database is in read-only mode
$this->checkReadOnly();
@@ -46,6 +41,10 @@
throw new UserBlockedError( $user->getBlock() );
}
 
+   // Set the page title, robot policies, etc.
+   $out->setArticleRelated( false );
+   $out->setRobotPolicy( 

[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403842 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Ib40ec6ec8e148c8f60e6bfd8a740a783b202a648
---
M ArticleFeedbackv5.activity.php
M ArticleFeedbackv5.hooks.php
M ArticleFeedbackv5.model.php
M api/ApiAddFlagNoteArticleFeedbackv5.php
M data/DataModel.php
M data/maintenance/DataModelPurgeCache.php
M data/tests/DataModelSampleTests.php
M maintenance/purgeCache.php
M tests/ArticleFeedbackv5ModelTest.php
9 files changed, 29 insertions(+), 28 deletions(-)

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



diff --git a/ArticleFeedbackv5.activity.php b/ArticleFeedbackv5.activity.php
index a7dbbd8..7a2af83 100644
--- a/ArticleFeedbackv5.activity.php
+++ b/ArticleFeedbackv5.activity.php
@@ -188,7 +188,7 @@
 * data in cache may be out of date.
 */
global $wgMemc;
-   $key = wfMemcKey( get_called_class(), 
'getLastEditorActivity', $itemId );
+   $key = $wgMemc->makeKey( get_called_class(), 
'getLastEditorActivity', $itemId );
$wgMemc->delete( $key );
}
 
@@ -285,7 +285,7 @@
foreach( $wgArticleFeedbackv5Permissions as $permission 
) {
if ( $user->isAllowed( $permission ) ) {
// get count for this specific 
permission level from cache
-   $key = wfMemcKey( 'articlefeedbackv5', 
'getActivityCount', $permission, $feedback->aft_id );
+   $key = $wgMemc->makeKey( 
'articlefeedbackv5', 'getActivityCount', $permission, $feedback->aft_id );
$count = $wgMemc->get( $key );
 
if ( $count === false ) {
@@ -322,7 +322,7 @@
// get permission level that should be updated
$permission = self::$actions[$action]['permissions'];
 
-   $key = wfMemcKey( 'articlefeedbackv5', 'getActivityCount', 
$permission, $feedbackId );
+   $key = $wgMemc->makeKey( 'articlefeedbackv5', 
'getActivityCount', $permission, $feedbackId );
$count = $wgMemc->get( $key );
 
/*
@@ -389,7 +389,7 @@
continue;
}
 
-   $key = wfMemcKey( get_called_class(), 
'getLastEditorActivity', $feedback->aft_id );
+   $key = $wgMemc->makeKey( get_called_class(), 
'getLastEditorActivity', $feedback->aft_id );
$cache = $wgMemc->get( $key );
if ( $cache !== false ) {
$activity[$feedback->aft_id] = $cache;
@@ -487,7 +487,7 @@
}
 
// cache, per feedback entry
-   $key = wfMemcKey( get_called_class(), 
'getLastEditorActivity', $params['feedbackId'] );
+   $key = $wgMemc->makeKey( get_called_class(), 
'getLastEditorActivity', $params['feedbackId'] );
$wgMemc->set( $key, $action, 60 * 60 );
 
$activity[$params['feedbackId']] = $action;
diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php
index e3f268e..01b50fe 100644
--- a/ArticleFeedbackv5.hooks.php
+++ b/ArticleFeedbackv5.hooks.php
@@ -518,7 +518,7 @@
if ( $pager->contribs == 'newbie' ) {
// fetch max user id from cache (if present)
global $wgMemc;
-   $key = wfMemcKey( 'articlefeedbackv5', 'maxUserId' );
+   $key = $wgMemc->makeKey( 'articlefeedbackv5', 
'maxUserId' );
$max = $wgMemc->get( $key );
if ( $max === false ) {
// max user id not present in cache; fetch from 
db & save to cache for 1h
diff --git a/ArticleFeedbackv5.model.php b/ArticleFeedbackv5.model.php
index 5f29276..9cc0f34 100644
--- a/ArticleFeedbackv5.model.php
+++ b/ArticleFeedbackv5.model.php
@@ -245,7 +245,7 @@
return $existingValue + $difference;
};
 
-   $key = wfMemcKey( get_called_class(), 'getCountFound', 
$shard );
+   $key = static::getCache()->makeKey( get_called_class(), 
'getCountFound', $shard );
static::getCache()->merge( $key, $callback );
}
}
@@ -261,7 +261,7 @@
 * @return float
 */
public static function getCountFound( $pageId = null ) {
-

[MediaWiki-commits] [Gerrit] mediawiki...SharedHelpPages[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403877 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I25d09ce3dff4363fd3569fbe6e52b2177d5a2c1e
---
M SharedHelpPage.body.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/SharedHelpPage.body.php b/SharedHelpPage.body.php
index a065d38..800fbf7 100644
--- a/SharedHelpPage.body.php
+++ b/SharedHelpPage.body.php
@@ -276,8 +276,8 @@
// either from memcached, or failing that, via an API query.
global $wgContLang, $wgLanguageCode, $wgMemc;
 
-   $projectNSCacheKey = wfMemcKey( 'helppages', $wgLanguageCode, 
'projectns' );
-   $projectTalkNSCacheKey = wfMemcKey( 'helppages', 
$wgLanguageCode, 'projecttalkns' );
+   $projectNSCacheKey = $wgMemc->makeKey( 'helppages', 
$wgLanguageCode, 'projectns' );
+   $projectTalkNSCacheKey = $wgMemc->makeKey( 'helppages', 
$wgLanguageCode, 'projecttalkns' );
 
$remoteWikiProjectNS = $wgMemc->get( $projectNSCacheKey );
$remoteWikiProjectTalkNS = $wgMemc->get( $projectTalkNSCacheKey 
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25d09ce3dff4363fd3569fbe6e52b2177d5a2c1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SharedHelpPages
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...NewSignupPage[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403876 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I8993282673199d5050a0a62d2384382c69c81da2
---
M includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/auth/NewSignupPageSecondaryAuthenticationProvider.php 
b/includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
index 2f3194e..0372854 100644
--- a/includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
+++ b/includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
@@ -97,7 +97,7 @@
}
 
if ( $wgRegisterTrack ) {
-   $wgMemc->delete( wfMemcKey( 'users', 'new', '1' ) );
+   $wgMemc->delete( $wgMemc->makeKey( 'users', 'new', '1' 
) );
 
// How the user registered (via email from friend, just 
on the site etc.)?
$from = $req->from;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8993282673199d5050a0a62d2384382c69c81da2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NewSignupPage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Video[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403867 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I9e0f85e34e48fb98938ea9e26b91e30357f58829
---
M includes/providers/BlipTVVideo.php
M includes/providers/HuluVideo.php
M includes/providers/ViddlerVideo.php
3 files changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/includes/providers/BlipTVVideo.php 
b/includes/providers/BlipTVVideo.php
index b82f0dc..4ff401f 100644
--- a/includes/providers/BlipTVVideo.php
+++ b/includes/providers/BlipTVVideo.php
@@ -23,7 +23,7 @@
 
$videoId = $matches[1];
 
-   $cacheKey = wfMemcKey( 'video', 'bliptv', $videoId );
+   $cacheKey = $wgMemc->makeKey( 'video', 'bliptv', $videoId );
$cachedEmbedId = $wgMemc->get( $cacheKey );
 
if ( $cachedEmbedId !== false ) {
diff --git a/includes/providers/HuluVideo.php b/includes/providers/HuluVideo.php
index a5fdcdd..899e728 100644
--- a/includes/providers/HuluVideo.php
+++ b/includes/providers/HuluVideo.php
@@ -24,7 +24,7 @@
 
$videoId = $matches['id'];
 
-   $cacheKey = wfMemcKey( 'video', 'hulu', $videoId );
+   $cacheKey = $wgMemc->makeKey( 'video', 'hulu', $videoId );
$cachedEmbedId = $wgMemc->get( $cacheKey );
 
if ( $cachedEmbedId !== false ) {
diff --git a/includes/providers/ViddlerVideo.php 
b/includes/providers/ViddlerVideo.php
index 56f6db4..1152d84 100644
--- a/includes/providers/ViddlerVideo.php
+++ b/includes/providers/ViddlerVideo.php
@@ -12,11 +12,10 @@
return 437 / 288;
}
 
-
protected function extractVideoId( $url ) {
global $wgMemc;
 
-   $cacheKey = wfMemcKey( 'video', 'viddler', sha1( $url ) );
+   $cacheKey = $wgMemc->makeKey( 'video', 'viddler', sha1( $url ) 
);
$cachedEmbedId = $wgMemc->get( $cacheKey );
 
if ( $cachedEmbedId !== false ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e0f85e34e48fb98938ea9e26b91e30357f58829
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PollNY[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403872 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I15f00e509f4c69028ef4c4846bf256dff39df890
---
M includes/Poll.class.php
M includes/PollNY.hooks.php
M includes/specials/SpecialCreatePoll.php
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/Poll.class.php b/includes/Poll.class.php
index 77bbf76..c836277 100644
--- a/includes/Poll.class.php
+++ b/includes/Poll.class.php
@@ -330,7 +330,7 @@
 
$polls = array();
// Try cache
-   $key = wfMemcKey( 'polls', 'order', $order, 'count', $count );
+   $key = $wgMemc->makeKey( 'polls', 'order', $order, 'count', 
$count );
$data = $wgMemc->get( $key );
if( !empty( $data ) && is_array( $data ) ) {
wfDebug( "Got polls list ($count) ordered by {$order} 
from cache\n" );
diff --git a/includes/PollNY.hooks.php b/includes/PollNY.hooks.php
index 9b81f63..0879e3d 100644
--- a/includes/PollNY.hooks.php
+++ b/includes/PollNY.hooks.php
@@ -55,7 +55,7 @@
if ( $s !== false ) {
// Clear profile cache for user id that created 
poll
global $wgMemc;
-   $key = wfMemcKey( 'user', 'profile', 'polls', 
$s->poll_user_id );
+   $key = $wgMemc->makeKey( 'user', 'profile', 
'polls', $s->poll_user_id );
$wgMemc->delete( $key );
 
// Delete poll record
diff --git a/includes/specials/SpecialCreatePoll.php 
b/includes/specials/SpecialCreatePoll.php
index 02fed89..6ebb524 100644
--- a/includes/specials/SpecialCreatePoll.php
+++ b/includes/specials/SpecialCreatePoll.php
@@ -141,7 +141,7 @@
}
 
// Clear poll cache
-   $key = wfMemcKey( 'user', 'profile', 'polls', 
$user->getID() );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'polls', 
$user->getId() );
$wgMemc->delete( $key );
 
// Redirect to new poll page

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15f00e509f4c69028ef4c4846bf256dff39df890
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VoteNY[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403868 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I23499cc349687d9f1fab97f014afd35900531d21
---
M includes/Vote.class.php
M includes/VoteNY.hooks.php
M includes/specials/SpecialTopRatings.php
3 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/includes/Vote.class.php b/includes/Vote.class.php
index dcd6aaa..0c1e1d7 100644
--- a/includes/Vote.class.php
+++ b/includes/Vote.class.php
@@ -36,7 +36,7 @@
function count() {
global $wgMemc;
 
-   $key = wfMemcKey( 'vote', 'count', $this->PageID );
+   $key = $wgMemc->makeKey( 'vote', 'count', $this->PageID );
$data = $wgMemc->get( $key );
 
// Try cache
@@ -69,7 +69,8 @@
 */
function getAverageVote() {
global $wgMemc;
-   $key = wfMemcKey( 'vote', 'avg', $this->PageID );
+
+   $key = $wgMemc->makeKey( 'vote', 'avg', $this->PageID );
$data = $wgMemc->get( $key );
 
$voteAvg = 0;
@@ -101,8 +102,8 @@
global $wgUser, $wgMemc;
 
// Kill internal cache
-   $wgMemc->delete( wfMemcKey( 'vote', 'count', $this->PageID ) );
-   $wgMemc->delete( wfMemcKey( 'vote', 'avg', $this->PageID ) );
+   $wgMemc->delete( $wgMemc->makeKey( 'vote', 'count', 
$this->PageID ) );
+   $wgMemc->delete( $wgMemc->makeKey( 'vote', 'avg', $this->PageID 
) );
 
// Purge squid
$pageTitle = Title::newFromID( $this->PageID );
diff --git a/includes/VoteNY.hooks.php b/includes/VoteNY.hooks.php
index c6e3193..8c8994a 100644
--- a/includes/VoteNY.hooks.php
+++ b/includes/VoteNY.hooks.php
@@ -98,7 +98,7 @@
global $wgMemc;
 
if ( $magicWordId == 'NUMBEROFVOTES' ) {
-   $key = wfMemcKey( 'vote', 'magic-word' );
+   $key = $wgMemc->makeKey( 'vote', 'magic-word' );
$data = $wgMemc->get( $key );
if ( $data != '' ) {
// We have it in cache? Oh goody, let's just 
use the cached value!
@@ -142,7 +142,7 @@
 
$id = $title->getArticleID();
 
-   $key = wfMemcKey( 'vote', 'magic-word-page', $id );
+   $key = $wgMemc->makeKey( 'vote', 'magic-word-page', $id );
$data = $wgMemc->get( $key );
 
if ( $data ) {
diff --git a/includes/specials/SpecialTopRatings.php 
b/includes/specials/SpecialTopRatings.php
index 01dc14c..5d73c2e 100644
--- a/includes/specials/SpecialTopRatings.php
+++ b/includes/specials/SpecialTopRatings.php
@@ -9,7 +9,6 @@
  *
  * @file
  * @ingroup Extensions
- * @date 11 December 2011
  * @license To the extent that it is possible, this code is in the public 
domain
  */
 class SpecialTopRatings extends IncludableSpecialPage {
@@ -171,7 +170,7 @@
public static function getAverageRatingForPage( $pageId ) {
global $wgMemc;
 
-   $key = wfMemcKey( 'vote', 'avg', $pageId );
+   $key = $wgMemc->makeKey( 'vote', 'avg', $pageId );
$data = $wgMemc->get( $key );
$voteAvg = 0;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23499cc349687d9f1fab97f014afd35900531d21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...EditcountAdditions[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403873 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Ic46307e405b72087139c8eaf47f1b33e5474181e
---
M EditcountAdditions.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/EditcountAdditions.class.php b/EditcountAdditions.class.php
index ad72985..77c196c 100644
--- a/EditcountAdditions.class.php
+++ b/EditcountAdditions.class.php
@@ -37,7 +37,7 @@
global $wgMemc;
 
$uid = $user->getId();
-   $key = wfMemcKey( 'editcount', 'accurate', $uid );
+   $key = $wgMemc->makeKey( 'editcount', 'accurate', $uid );
$editCount = $wgMemc->get( $key );
 
if ( $editCount === false ) {
@@ -67,7 +67,7 @@
// No need to run this code for anons since anons don't have 
preferences
// nor does Special:Editcount work for them
if ( $user && $user->isLoggedIn() ) {
-   $key = wfMemcKey( 'editcount', 'accurate', 
$user->getId() );
+   $key = $wgMemc->makeKey( 'editcount', 'accurate', 
$user->getId() );
$wgMemc->incr( $key );
}
return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic46307e405b72087139c8eaf47f1b33e5474181e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EditcountAdditions
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UserStatus[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403866 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Ic32593c512e852e7875f1c48fd67e7a20f3244c7
---
M includes/UserStatus.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/UserStatus.class.php b/includes/UserStatus.class.php
index 15a9a99..a998db5 100644
--- a/includes/UserStatus.class.php
+++ b/includes/UserStatus.class.php
@@ -118,7 +118,7 @@
public function updateUserCache( $text, $sport_id, $team_id = 0 ) {
global $wgUser, $wgMemc;
 
-   $key = wfMemcKey( 'user', 'status-last-update', 
$wgUser->getID() );
+   $key = $wgMemc->makeKey( 'user', 'status-last-update', 
$wgUser->getId() );
 
$data['text'] = $this->formatMessage( $text );
$data['sport_id'] = $sport_id;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic32593c512e852e7875f1c48fd67e7a20f3244c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserStatus
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403864 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Icad1be17fc1426d0defbe8e65d2d127e3d7dc737
---
M SystemGifts/SystemGiftsClass.php
M SystemGifts/UserSystemGiftsClass.php
M UserActivity/SiteActivityHook.php
M UserBoard/UserBoardClass.php
M UserGifts/SpecialGiveGift.php
M UserGifts/SpecialRemoveGift.php
M UserGifts/UserGiftsClass.php
M UserProfile/AvatarClass.php
M UserProfile/SpecialRemoveAvatar.php
M UserProfile/SpecialToggleUserPageType.php
M UserProfile/SpecialUpdateProfile.php
M UserProfile/UploadAvatar.php
M UserProfile/UserProfilePage.php
M UserRelationship/UserRelationshipClass.php
14 files changed, 48 insertions(+), 48 deletions(-)

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



diff --git a/SystemGifts/SystemGiftsClass.php b/SystemGifts/SystemGiftsClass.php
index 646c7eb..141ee07 100644
--- a/SystemGifts/SystemGiftsClass.php
+++ b/SystemGifts/SystemGiftsClass.php
@@ -82,7 +82,7 @@
__METHOD__
);
 
-   $sg_key = wfMemcKey( 'user', 
'profile', 'system_gifts', "{$row2->stats_user_id}" );
+   $sg_key = $wgMemc->makeKey( 
'user', 'profile', 'system_gifts', "{$row2->stats_user_id}" );
$wgMemc->delete( $sg_key );
 
// Update counters 
(https://phabricator.wikimedia.org/T29981)
diff --git a/SystemGifts/UserSystemGiftsClass.php 
b/SystemGifts/UserSystemGiftsClass.php
index 9b0f269..1824918 100644
--- a/SystemGifts/UserSystemGiftsClass.php
+++ b/SystemGifts/UserSystemGiftsClass.php
@@ -70,7 +70,7 @@
) );
}
 
-   $wgMemc->delete( wfMemcKey( 'user', 'profile', 'system_gifts', 
$this->user_id ) );
+   $wgMemc->delete( $wgMemc->makeKey( 'user', 'profile', 
'system_gifts', $this->user_id ) );
 
return $sg_gift_id;
}
@@ -251,7 +251,7 @@
 */
public function incNewSystemGiftCount( $user_id ) {
global $wgMemc;
-   $key = wfMemcKey( 'system_gifts', 'new_count', $user_id );
+   $key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
$wgMemc->incr( $key );
}
 
@@ -263,7 +263,7 @@
 */
public function decNewSystemGiftCount( $user_id ) {
global $wgMemc;
-   $key = wfMemcKey( 'system_gifts', 'new_count', $user_id );
+   $key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
$wgMemc->decr( $key );
}
 
@@ -273,7 +273,7 @@
 */
public function clearNewSystemGiftCountCache() {
global $wgMemc;
-   $key = wfMemcKey( 'system_gifts', 'new_count', $user_id );
+   $key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
$wgMemc->set( $key, 0 );
}
 
@@ -287,7 +287,7 @@
 */
static function getNewSystemGiftCountCache( $user_id ) {
global $wgMemc;
-   $key = wfMemcKey( 'system_gifts', 'new_count', $user_id );
+   $key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
$data = $wgMemc->get( $key );
if ( $data != '' ) {
wfDebug( "Got new award count of $data for id $user_id 
from cache\n" );
@@ -329,7 +329,7 @@
wfDebug( "Got new award count for id $user_id from DB\n" );
 
global $wgMemc;
-   $key = wfMemcKey( 'system_gifts', 'new_count', $user_id );
+   $key = $wgMemc->makeKey( 'system_gifts', 'new_count', $user_id 
);
$dbr = wfGetDB( DB_REPLICA );
$new_gift_count = 0;
$s = $dbr->selectRow(
diff --git a/UserActivity/SiteActivityHook.php 
b/UserActivity/SiteActivityHook.php
index 049e6f2..65f7942 100644
--- a/UserActivity/SiteActivityHook.php
+++ b/UserActivity/SiteActivityHook.php
@@ -23,7 +23,7 @@
// so that  will return 5 items instead 
of 4...
$fixedLimit = $limit + 1;
 
-   $key = wfMemcKey( 'site_activity', 'all', $fixedLimit );
+   $key = $wgMemc->makeKey( 'site_activity', 'all', $fixedLimit );
$data = $wgMemc->get( $key );
if ( !$data ) {
wfDebug( "Got site activity from DB\n" );
diff --git a/UserBoard/UserBoardClass.php b/UserBoard/UserBoardClass.php
index a1dadc2..2b59a45 100644
--- a/UserBoard/UserBoardClass.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...RandomUsersWithAvatars[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403862 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I07affcff22ae1aef55f4e6fcf49fa00e61b1c0c5
---
M includes/RandomUsersWithAvatars.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/RandomUsersWithAvatars.class.php 
b/includes/RandomUsersWithAvatars.class.php
index ec1b7f3..e0619a2 100644
--- a/includes/RandomUsersWithAvatars.class.php
+++ b/includes/RandomUsersWithAvatars.class.php
@@ -35,7 +35,7 @@
}
 
// Try cache
-   $key = wfMemcKey( 'users', 'random', 'avatars', $count, 
$per_row, $size );
+   $key = $wgMemc->makeKey( 'users', 'random', 'avatars', $count, 
$per_row, $size );
$data = $wgMemc->get( $key );
if ( !$data ) {
$files = glob( $wgUploadDirectory . 
"/avatars/{$wgDBname}_*_{$size}.*" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07affcff22ae1aef55f4e6fcf49fa00e61b1c0c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomUsersWithAvatars
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SiteScout[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403863 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I55347dc192a089bbf6d0a34adcb788713fa0e7eb
---
M includes/SiteScout.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/SiteScout.class.php b/includes/SiteScout.class.php
index d4df4fe..a00c771 100644
--- a/includes/SiteScout.class.php
+++ b/includes/SiteScout.class.php
@@ -369,7 +369,7 @@
function populateItems() {
global $wgMemc;
 
-   $key = wfMemcKey( 'site_scout', $this->itemMax );
+   $key = $wgMemc->makeKey( 'site_scout', $this->itemMax );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebug( "Site scout loaded from cache\n" );
@@ -583,7 +583,7 @@
 
// Set cache
global $wgMemc;
-   $key = wfMemcKey( 'site_scout', $this->itemMax );
+   $key = $wgMemc->makeKey( 'site_scout', $this->itemMax );
$wgMemc->set( $key, $this->all_items, 30 );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55347dc192a089bbf6d0a34adcb788713fa0e7eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteScout
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SportsTeams[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403865 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Iecfd09bf5711c33dfc585e80f052762406fde83a
---
M includes/SportsTeams.class.php
M includes/specials/SpecialFanHome.php
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/SportsTeams.class.php b/includes/SportsTeams.class.php
index c371382..80d9f29 100644
--- a/includes/SportsTeams.class.php
+++ b/includes/SportsTeams.class.php
@@ -194,7 +194,7 @@
 
static function clearUserCache( $user_id ) {
global $wgMemc;
-   $key = wfMemcKey( 'user', 'teams', $user_id );
+   $key = $wgMemc->makeKey( 'user', 'teams', $user_id );
$data = $wgMemc->delete( $key );
}
 
@@ -202,7 +202,7 @@
global $wgMemc;
 
// Try cache first
-   $key = wfMemcKey( 'user', 'teams', $user_id );
+   $key = $wgMemc->makeKey( 'user', 'teams', $user_id );
$data = $wgMemc->get( $key );
 
if ( $data ) {
@@ -324,7 +324,7 @@
global $wgMemc;
 
// Try cache first
-   //$key = wfMemcKey( 'user', 'teams', $user_id );
+   //$key = $wgMemc->makeKey( 'user', 'teams', $user_id );
#$wgMemc->delete( $key );
//$data = $wgMemc->get( $key );
//if ( $data ) {
diff --git a/includes/specials/SpecialFanHome.php 
b/includes/specials/SpecialFanHome.php
index 3962f70..09d1f7c 100644
--- a/includes/specials/SpecialFanHome.php
+++ b/includes/specials/SpecialFanHome.php
@@ -518,7 +518,7 @@
global $wgMemc;
 
// Try cache first
-   $key = wfMemcKey( 'fanhome', 'network-articles', 'six' );
+   $key = $wgMemc->makeKey( 'fanhome', 'network-articles', 'six' );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
@@ -604,7 +604,7 @@
global $wgMemc;
 
// Try cache first
-   $key = wfMemcKey( 'fanhome', 'vote', 'count' );
+   $key = $wgMemc->makeKey( 'fanhome', 'vote', 'count' );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecfd09bf5711c33dfc585e80f052762406fde83a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SportsTeams
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomImageByCategory[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403861 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I9b470a6c27062bd273900e1cd81717228dac54f3
---
M RandomImageByCategory.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/RandomImageByCategory.class.php b/RandomImageByCategory.class.php
index fa25068..911ed7c 100644
--- a/RandomImageByCategory.class.php
+++ b/RandomImageByCategory.class.php
@@ -39,7 +39,7 @@
$width = 200;
}
 
-   $key = wfMemcKey( 'image', 'random', $limit, str_replace( ' ', 
'', $categories ) );
+   $key = $wgMemc->makeKey( 'image', 'random', $limit, 
str_replace( ' ', '', $categories ) );
$data = $wgMemc->get( $key );
$image_list = array();
if ( !$data ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b470a6c27062bd273900e1cd81717228dac54f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomImageByCategory
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomGameUnit[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403860 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I62960014189aa608465e1a0c858f3683525a94cb
---
M includes/RandomGameUnit.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/RandomGameUnit.class.php 
b/includes/RandomGameUnit.class.php
index f452ef5..ab445ee 100644
--- a/includes/RandomGameUnit.class.php
+++ b/includes/RandomGameUnit.class.php
@@ -73,7 +73,7 @@
case 'quiz':
$quiz = array();
// Try cache
-   $key = wfMemcKey( 'quiz', 'order', 'q_id', 
'count', $count );
+   $key = $wgMemc->makeKey( 'quiz', 'order', 
'q_id', 'count', $count );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebugLog( 'RandomGameUnit', "Got quiz 
list ($count) from cache" );
@@ -107,7 +107,7 @@
case 'picgame':
// Try cache
$pics = array();
-   $key = wfMemcKey( 'picgame', 'order', 'q_id', 
'count', $count );
+   $key = $wgMemc->makeKey( 'picgame', 'order', 
'q_id', 'count', $count );
$data = $wgMemc->get( $key );
if ( $data ) {
wfDebugLog( 'RandomGameUnit', "Got 
picture game list ($count) ordered by id from cache" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62960014189aa608465e1a0c858f3683525a94cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomGameUnit
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PictureGame[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403856 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I97c7b0aa498e6c328f1985878328dc53ad10b543
---
M includes/specials/SpecialPictureGameHome.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/specials/SpecialPictureGameHome.php 
b/includes/specials/SpecialPictureGameHome.php
index e46647d..7f64d05 100644
--- a/includes/specials/SpecialPictureGameHome.php
+++ b/includes/specials/SpecialPictureGameHome.php
@@ -175,7 +175,7 @@
$dbw->commit( __METHOD__ );
 
global $wgMemc;
-   $key = wfMemcKey( 'user', 'profile', 'picgame', $user->getID() 
);
+   $key = $wgMemc->makeKey( 'user', 'profile', 'picgame', 
$user->getID() );
$wgMemc->delete( $key );
 
/* Pop the images out of MediaWiki also */
@@ -1633,7 +1633,7 @@
 
// Purge memcached
global $wgMemc;
-   $key = wfMemcKey( 'user', 'profile', 'picgame', 
$user->getID() );
+   $key = $wgMemc->makeKey( 'user', 'profile', 
'picgame', $user->getID() );
$wgMemc->delete( $key );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97c7b0aa498e6c328f1985878328dc53ad10b543
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PictureGame
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ProtectSite[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403857 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I86dd85de392e2fc10e1516aa0abe784c932e4fb8
---
M ProtectSite.body.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/ProtectSite.body.php b/ProtectSite.body.php
index 78dd0f4..97fc86c 100644
--- a/ProtectSite.body.php
+++ b/ProtectSite.body.php
@@ -75,11 +75,11 @@
$persist_data = new SqlBagOStuff( array() );
 
/* Get data into the prot hash */
-   $prot = $wgMemc->get( wfMemcKey( 'protectsite' ) );
+   $prot = $wgMemc->get( $wgMemc->makeKey( 'protectsite' ) );
if ( !$prot ) {
$prot = $persist_data->get( 'protectsite' );
if ( !$prot ) {
-   $wgMemc->set( wfMemcKey( 'protectsite' ), 
'disabled' );
+   $wgMemc->set( $wgMemc->makeKey( 'protectsite' 
), 'disabled' );
}
}
 
@@ -145,7 +145,7 @@
$this->persist_data = new SqlBagOStuff( array() );
 
/* Get data into the value variable/array */
-   $prot = $wgMemc->get( wfMemcKey( 'protectsite' ) );
+   $prot = $wgMemc->get( $wgMemc->makeKey( 'protectsite' ) );
if ( !$prot ) {
$prot = $this->persist_data->get( 'protectsite' );
}
@@ -204,7 +204,7 @@
 
/* Write the array out to the database */
$this->persist_data->set( 'protectsite', $prot, 
$prot['until'] );
-   $wgMemc->set( wfMemcKey( 'protectsite' ), $prot, 
$prot['until'] );
+   $wgMemc->set( $wgMemc->makeKey( 'protectsite' ), $prot, 
$prot['until'] );
 
/* Create a log entry */
$log = new LogPage( 'protect' );
@@ -228,7 +228,7 @@
 
/* Remove the data from the database to disable extension. */
$this->persist_data->delete( 'protectsite' );
-   $wgMemc->delete( wfMemcKey( 'protectsite' ) );
+   $wgMemc->delete( $wgMemc->makeKey( 'protectsite' ) );
 
/* Create a log entry */
$log = new LogPage( 'protect' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86dd85de392e2fc10e1516aa0abe784c932e4fb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProtectSite
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomFeaturedUser[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403859 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Ia1359fc695984be6369651d99825e19dc8bb8ab5
---
M includes/RandomFeaturedUser.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/RandomFeaturedUser.php b/includes/RandomFeaturedUser.php
index e47df95..5571520 100644
--- a/includes/RandomFeaturedUser.php
+++ b/includes/RandomFeaturedUser.php
@@ -57,7 +57,7 @@
$realCount = 10;
 
// Try cache
-   $key = wfMemcKey( 'user_stats', 'top', 'points', 'weekly', 
$realCount );
+   $key = $wgMemc->makeKey( 'user_stats', 'top', 'points', 
'weekly', $realCount );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1359fc695984be6369651d99825e19dc8bb8ab5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomFeaturedUser
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...NumberOfWikis[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403855 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I5e90fe59907812ac24dd936a598e7878753bfc27
---
M NumberOfWikis.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/NumberOfWikis.class.php b/NumberOfWikis.class.php
index 81380ef..eec5943 100644
--- a/NumberOfWikis.class.php
+++ b/NumberOfWikis.class.php
@@ -15,7 +15,7 @@
global $wgMemc;
 
if ( $magicWordId == 'NUMBEROFWIKIS' ) {
-   $key = wfMemcKey( 'shoutwiki', 'numberofwikis' );
+   $key = $wgMemc->makeKey( 'shoutwiki', 'numberofwikis' );
$data = $wgMemc->get( $key );
if ( $data != '' ) {
// We have it in cache? Oh goody, let's just 
use the cached value!

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e90fe59907812ac24dd936a598e7878753bfc27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NumberOfWikis
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403858 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I6bf230c740a887f4eb629661cfee8c09e48004d5
---
M includes/api/ApiQuizGame.php
M includes/specials/SpecialQuizGameHome.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/api/ApiQuizGame.php b/includes/api/ApiQuizGame.php
index ca7044f..ae11b34 100644
--- a/includes/api/ApiQuizGame.php
+++ b/includes/api/ApiQuizGame.php
@@ -199,7 +199,7 @@
}
 
global $wgMemc;
-   $key = wfMemcKey( 'user', 'stats', 
$row->a_user_id );
+   $key = $wgMemc->makeKey( 'user', 
'stats', $row->a_user_id );
$wgMemc->delete( $key );
}
 
diff --git a/includes/specials/SpecialQuizGameHome.php 
b/includes/specials/SpecialQuizGameHome.php
index 616230d..bc15f91 100644
--- a/includes/specials/SpecialQuizGameHome.php
+++ b/includes/specials/SpecialQuizGameHome.php
@@ -881,7 +881,7 @@
if( $user->getName() != $question['user_name'] ) {
// check to see if the user already had viewed this 
question
global $wgMemc;
-   $key = wfMemcKey( 'quizgame-user-view', $user->getID(), 
$question['id'] );
+   $key = $wgMemc->makeKey( 'quizgame-user-view', 
$user->getID(), $question['id'] );
$data = $wgMemc->get( $key );
if( $data > 0 ) {
$timestampedViewed = $data;
@@ -1325,7 +1325,7 @@
}
 
// Delete memcached key
-   $key = wfMemcKey( 'user', 'profile', 'quiz', $user->getID() );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'quiz', 
$user->getID() );
$wgMemc->delete( $key );
 
// Redirect the user

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6bf230c740a887f4eb629661cfee8c09e48004d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuizGame
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...NewUsersList[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403853 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I141254787579f4130147d021ce1c3552b3664bca
---
M includes/NewUsersList.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/NewUsersList.class.php b/includes/NewUsersList.class.php
index b8af02a..87c4d80 100644
--- a/includes/NewUsersList.class.php
+++ b/includes/NewUsersList.class.php
@@ -53,7 +53,7 @@
}
 
// Try cache
-   $key = wfMemcKey( 'users', 'new', $count );
+   $key = $wgMemc->makeKey( 'users', 'new', $count );
$data = $wgMemc->get( $key );
 
if ( !$data ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I141254787579f4130147d021ce1c3552b3664bca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NewUsersList
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...LinkFilter[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403852 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I88a59efdcdfbf242aa38305abe9f473809a954ea
---
M includes/LinkFilter.hooks.php
M includes/LinkPage.class.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/LinkFilter.hooks.php b/includes/LinkFilter.hooks.php
index 196225a..ce8c29b 100644
--- a/includes/LinkFilter.hooks.php
+++ b/includes/LinkFilter.hooks.php
@@ -122,7 +122,7 @@
$count = 10;
}
 
-   $key = wfMemcKey( 'linkfilter', $count );
+   $key = $wgMemc->makeKey( 'linkfilter', $count );
$data = $wgMemc->get( $key );
 
if ( $data ) {
diff --git a/includes/LinkPage.class.php b/includes/LinkPage.class.php
index 74e66a6..654ca21 100644
--- a/includes/LinkPage.class.php
+++ b/includes/LinkPage.class.php
@@ -148,7 +148,7 @@
function getCreateDate( $pageId ) {
global $wgMemc;
 
-   $key = wfMemcKey( 'page', 'create_date', $pageId );
+   $key = $wgMemc->makeKey( 'page', 'create_date', $pageId );
$data = $wgMemc->get( $key );
 
if ( !$data ) {
@@ -347,7 +347,7 @@
$comments = array();
 
// Try cache first
-   $key = wfMemcKey( 'comments-link', 'plus', '24hours' );
+   $key = $wgMemc->makeKey( 'comments-link', 'plus', '24hours' );
$wgMemc->delete( $key );
$data = $wgMemc->get( $key );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88a59efdcdfbf242aa38305abe9f473809a954ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ImageRating[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403851 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I84eca971e057b14fa92823042805b3fab493cc59
---
M includes/FeaturedImage.class.php
M includes/specials/SpecialImageRating.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/FeaturedImage.class.php b/includes/FeaturedImage.class.php
index ffad583..01b8d52 100644
--- a/includes/FeaturedImage.class.php
+++ b/includes/FeaturedImage.class.php
@@ -26,7 +26,7 @@
$width = intval( $width );
 
// Set up memcached
-   $key = wfMemcKey( 'image', 'featured', $width );
+   $key = $wgMemc->makeKey( 'image', 'featured', $width );
$data = $wgMemc->get( $key );
$cache_expires = ( 60 * 30 );
 
diff --git a/includes/specials/SpecialImageRating.php 
b/includes/specials/SpecialImageRating.php
index 0d40ce9..7436da1 100644
--- a/includes/specials/SpecialImageRating.php
+++ b/includes/specials/SpecialImageRating.php
@@ -259,7 +259,7 @@
/*
// set up memcached
$width = 250;
-   $key = wfMemcKey( 'image', 'featured', 
"category:{$category}:width:{$width}" );
+   $key = $wgMemc->makeKey( 'image', 'featured', 
"category:{$category}:width:{$width}" );
$data = $wgMemc->get( $key );
$cache_expires = ( 60 * 30 );
 
@@ -353,7 +353,7 @@
 
$output .= '' . $this->msg( 'imagerating-ratetitle' 
)->plain() . '';
 
-   $key = wfMemcKey( 'image', 'list', 
"type:{$type}:category:{$category}:per:{$perPage}" );
+   $key = $wgMemc->makeKey( 'image', 'list', 
"type:{$type}:category:{$category}:per:{$perPage}" );
$data = $wgMemc->get( $key );
if ( $data && $page == 0 ) {
$imageList = $data;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84eca971e057b14fa92823042805b3fab493cc59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ImageRating
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...FanBoxes[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403849 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: I339c54648cf555f54226135793e7d478ff84d3a8
---
M includes/FanBox.class.php
M includes/UserBoxes.hooks.php
2 files changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/includes/FanBox.class.php b/includes/FanBox.class.php
index bfb4f02..b86fe60 100644
--- a/includes/FanBox.class.php
+++ b/includes/FanBox.class.php
@@ -206,7 +206,7 @@
array( 'fantag_pg_id' => intval( $fanboxId ) ),
__METHOD__
);
-   $key = wfMemcKey( 'fantag', 'page', $this->name );
+   $key = $wgMemc->makeKey( 'fantag', 'page', $this->name );
$wgMemc->delete( $key );
 
$categories_wiki = '';
@@ -279,10 +279,9 @@
private function loadFromCache() {
global $wgMemc;
 
-   wfProfileIn( __METHOD__ );
$this->dataLoaded = false;
 
-   $key = wfMemcKey( 'fantag', 'page', $this->name );
+   $key = $wgMemc->makeKey( 'fantag', 'page', $this->name );
$data = $wgMemc->get( $key );
 
if ( !empty( $data ) && is_array( $data ) ) {
@@ -310,7 +309,6 @@
wfIncrStats( 'fantag_cache_miss' );
}
 
-   wfProfileOut( __METHOD__ );
return $this->dataLoaded;
}
 
@@ -320,7 +318,7 @@
private function saveToCache() {
global $wgMemc;
 
-   $key = wfMemcKey( 'fantag', 'page', $this->name );
+   $key = $wgMemc->makeKey( 'fantag', 'page', $this->name );
if ( $this->exists() ) {
$cachedValues = array(
'id' => $this->id,
diff --git a/includes/UserBoxes.hooks.php b/includes/UserBoxes.hooks.php
index 64fe958..3da627b 100644
--- a/includes/UserBoxes.hooks.php
+++ b/includes/UserBoxes.hooks.php
@@ -45,7 +45,7 @@
$f = new UserFanBoxes( $user_name );
 
// Try cache
-   //$key = wfMemcKey( 'user', 'profile', 'fanboxes', $f->user_id 
);
+   //$key = $wgMemc->makeKey( 'user', 'profile', 'fanboxes', 
$f->user_id );
//$data = $wgMemc->get( $key );
 
//if ( !$data ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I339c54648cf555f54226135793e7d478ff84d3a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Comments[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403848 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Ibe93d353a0aa63d3a4b638ef7cf73bea8866c571
---
M includes/Comment.class.php
M includes/parser/CommentsOfTheDay.class.php
M includes/parser/NumberOfComments.class.php
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/Comment.class.php b/includes/Comment.class.php
index 2e473a8..cc3d315 100644
--- a/includes/Comment.class.php
+++ b/includes/Comment.class.php
@@ -429,7 +429,7 @@
 
// update cache for comment list
// should perform better than deleting cache completely since 
Votes happen more frequently
-   $key = wfMemcKey( 'comment', 'pagethreadlist', $this->page->id 
);
+   $key = $wgMemc->makeKey( 'comment', 'pagethreadlist', 
$this->page->id );
$comments = $wgMemc->get( $key );
if ( $comments ) {
foreach ( $comments as &$comment ) {
diff --git a/includes/parser/CommentsOfTheDay.class.php 
b/includes/parser/CommentsOfTheDay.class.php
index 9eecd12..ddc1d5a 100644
--- a/includes/parser/CommentsOfTheDay.class.php
+++ b/includes/parser/CommentsOfTheDay.class.php
@@ -45,7 +45,7 @@
global $wgMemc;
 
// Try memcached first
-   $key = wfMemcKey( 'comments-of-the-day', 'standalone-hook-new' 
);
+   $key = $wgMemc->makeKey( 'comments-of-the-day', 
'standalone-hook-new' );
$data = $wgMemc->get( $key );
 
if ( $data ) { // success, got it from memcached!
diff --git a/includes/parser/NumberOfComments.class.php 
b/includes/parser/NumberOfComments.class.php
index b34b454..9a2f43e 100644
--- a/includes/parser/NumberOfComments.class.php
+++ b/includes/parser/NumberOfComments.class.php
@@ -34,7 +34,7 @@
global $wgMemc;
 
if ( $magicWordId == 'NUMBEROFCOMMENTS' ) {
-   $key = wfMemcKey( 'comments', 'magic-word' );
+   $key = $wgMemc->makeKey( 'comments', 'magic-word' );
$data = $wgMemc->get( $key );
if ( $data != '' ) {
// We have it in cache? Oh goody, let's just 
use the cached value!
@@ -96,7 +96,7 @@
static function getNumberOfCommentsPage( $pageId ) {
global $wgMemc;
 
-   $key = wfMemcKey( 'comments', 'numberofcommentspage', $pageId );
+   $key = $wgMemc->makeKey( 'comments', 'numberofcommentspage', 
$pageId );
$cache = $wgMemc->get( $key );
 
if ( $cache ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe93d353a0aa63d3a4b638ef7cf73bea8866c571
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: UltrasonicNXT 
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...BlogPage[master]: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuf...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403847 )

Change subject: wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff 
instance
..


wfMemcKey (deprecated in MW 1.30) -> makeKey() on a BagOStuff instance

Change-Id: Ifb4607d329402f900b3106d0b6cb6ec53dcb3a27
---
M includes/BlogPage.class.php
M includes/BlogPage.hooks.php
M includes/specials/SpecialArticleLists.php
M includes/specials/SpecialArticlesHome.php
4 files changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/includes/BlogPage.class.php b/includes/BlogPage.class.php
index 817299e..0c31601 100644
--- a/includes/BlogPage.class.php
+++ b/includes/BlogPage.class.php
@@ -195,7 +195,7 @@
global $wgMemc;
 
// Try memcached first
-   $key = wfMemcKey( 'page', 'create_date', $pageId );
+   $key = $wgMemc->makeKey( 'page', 'create_date', $pageId );
$data = $wgMemc->get( $key );
 
if ( !$data ) {
@@ -397,7 +397,7 @@
$articles = array();
 
// Try cache first
-   $key = wfMemcKey( 'blog', 'author', 'articles', $user_id );
+   $key = $wgMemc->makeKey( 'blog', 'author', 'articles', $user_id 
);
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
@@ -503,7 +503,7 @@
 
$pageTitleId = $this->getId();
 
-   $key = wfMemcKey( 'recenteditors', 'list', $pageTitleId );
+   $key = $wgMemc->makeKey( 'recenteditors', 'list', $pageTitleId 
);
$data = $wgMemc->get( $key );
$editors = array();
 
@@ -596,7 +596,7 @@
// Gets the page ID for the query
$pageTitleId = $this->getId();
 
-   $key = wfMemcKey( 'recentvoters', 'list', $pageTitleId );
+   $key = $wgMemc->makeKey( 'recentvoters', 'list', $pageTitleId );
$data = $wgMemc->get( $key );
 
$voters = array();
@@ -716,7 +716,7 @@
}
 
// Try cache first
-   $key = wfMemcKey( 'blog', 'popular', 'five' );
+   $key = $wgMemc->makeKey( 'blog', 'popular', 'five' );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
@@ -804,7 +804,7 @@
}
 
// Try cache first
-   $key = wfMemcKey( 'blog', 'new', 'five' );
+   $key = $wgMemc->makeKey( 'blog', 'new', 'five' );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
@@ -950,7 +950,7 @@
global $wgMemc;
 
// Try cache first
-   $key = wfMemcKey( 'blog', 'comments', 'count', 'pageid-' . $id 
);
+   $key = $wgMemc->makeKey( 'blog', 'comments', 'count', 'pageid-' 
. $id );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
@@ -983,7 +983,7 @@
global $wgMemc;
 
// Try cache first
-   $key = wfMemcKey( 'blog', 'vote', 'count', 'pageid-' . $id );
+   $key = $wgMemc->makeKey( 'blog', 'vote', 'count', 'pageid-' . 
$id );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
@@ -1103,7 +1103,7 @@
public static function getPageImage( $pageId ) {
global $wgMemc;
 
-   $key = wfMemcKey( 'blog', 'page', 'image', $pageId );
+   $key = $wgMemc->makeKey( 'blog', 'page', 'image', $pageId );
$data = $wgMemc->get( $key );
 
if ( !$data ) {
diff --git a/includes/BlogPage.hooks.php b/includes/BlogPage.hooks.php
index da61042..a0ac3c6 100644
--- a/includes/BlogPage.hooks.php
+++ b/includes/BlogPage.hooks.php
@@ -190,7 +190,7 @@
$output = '';
 
// Try cache first
-   $key = wfMemcKey( 'user', 'profile', 'articles', 
$userProfile->user_id );
+   $key = $wgMemc->makeKey( 'user', 'profile', 'articles', 
$userProfile->user_id );
$data = $wgMemc->get( $key );
$articles = array();
 
diff --git a/includes/specials/SpecialArticleLists.php 
b/includes/specials/SpecialArticleLists.php
index 28f5917..63d2fad 100644
--- a/includes/specials/SpecialArticleLists.php
+++ b/includes/specials/SpecialArticleLists.php
@@ -50,7 +50,7 @@
}
 
// Try cache first
-   $key = wfMemcKey( 'blog', 'new', 'twentyfive' );
+   $key = $wgMemc->makeKey( 'blog', 'new', 'twentyfive' );
$data = $wgMemc->get( $key );
 
if ( $data != '' ) {
diff --git a/includes/specials/SpecialArticlesHome.php 
b/includes/specials/SpecialArticlesHome.php
index cf1c2ec..f18b9f9 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...ZeroPortal[master]: Only return info for enabled carriers from API type=carriers

2018-01-13 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404095 )

Change subject: Only return info for enabled carriers from API type=carriers
..

Only return info for enabled carriers from API type=carriers

Varnish obtains the set of carriers and IP ranges for which to perform
header enrichment from the zeroportal API module via the periodically-
run zerofetch.py script.[1] This API module currently returns information
on both enabled and disabled carriers, and varnish adds Zero-related
headers for requests from configured IP ranges for enabled and disabled
carriers alike.

This is currently causing trouble because we are blocking users with Zero
IPs from accessing uploaded files in Phabricator (e.g., all images). This
block is currently mistakenly affecting users on previously active but
currently disabled carriers.

This updates the API module to return info only for currently enabled
carriers for the relevant request.

[1] 
https://phabricator.wikimedia.org/source/operations-puppet/browse/production/modules/varnish/files/zerofetch.py

Bug: T173537
Change-Id: I26d14fcb807168cd5062f394d8d42ae2b2c9b116
---
M includes/ApiZeroPortal.php
1 file changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal 
refs/changes/95/404095/1

diff --git a/includes/ApiZeroPortal.php b/includes/ApiZeroPortal.php
index 674d451..f75ba95 100644
--- a/includes/ApiZeroPortal.php
+++ b/includes/ApiZeroPortal.php
@@ -72,12 +72,14 @@
case 'carriers':
$processor = function ( ZeroConfig $content, 
$title ) use ( $result, $moduleName ) {
foreach ( $content->getIpsets() as 
$name => $ipset ) {
-   $result->addValue(
-   $moduleName,
-   $name === 'default' ? 
$title : $title . '|' . $name,
-   $ipset,
-   ApiResult::NO_SIZE_CHECK
-   );
+   if ( $content->enabled() ) {
+   $result->addValue(
+   $moduleName,
+   $name === 
'default' ? $title : $title . '|' . $name,
+   $ipset,
+   
ApiResult::NO_SIZE_CHECK
+   );
+   }
}
};
break;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26d14fcb807168cd5062f394d8d42ae2b2c9b116
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Fix infobox styles to work well with multiple column infobox...

2018-01-13 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404094 )

Change subject: Fix infobox styles to work well with multiple column infobox 
rows
..

Fix infobox styles to work well with multiple column infobox rows

I used the fix provided by TheDJ and tested out locally
on Firefox 57 and Chrome latest, but I couldn't test out
any grade C browser as on Linux it's really hard to find
such an outdated browser like Internet Explorer on Windows.

Bug: T168716
Change-Id: I8e03610e4eb3c93b80bb757592c2fb3079a68412
---
M resources/skins.minerva.content.styles/hacks.less
M resources/skins.minerva.tablet.styles/hacks.less
2 files changed, 21 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/94/404094/1

diff --git a/resources/skins.minerva.content.styles/hacks.less 
b/resources/skins.minerva.content.styles/hacks.less
index ce7b225..bf4d098 100644
--- a/resources/skins.minerva.content.styles/hacks.less
+++ b/resources/skins.minerva.content.styles/hacks.less
@@ -43,28 +43,37 @@
margin-right: 0 !important;
 
&.infobox {
-   font-size: 90%;
position: relative;
+   font-size: 90%;
border: 1px solid @colorGray14;
margin-bottom: 2em;
text-align: left;
background-color: @colorGray15;
 
-   th, td {
-   vertical-align: top;
-   border: 0;
-   border-bottom: 1px solid @colorGray14;
-   padding: 7px 10px;
-   }
+   display: flex;
+   flex: 1 1 100%;
+   flex-flow: column nowrap;
 
-   td {
+   td:only-child,
+   th:only-child {
width: 100%;
}
+   }
 
-   tr:last-child th,
-   tr:last-child td {
-   border: 0;
-   }
+   &.infobox > tbody {
+   display: flex;
+   flex-flow: column nowrap;
+   }
+
+   &.infobox > tbody > tr {
+   min-width: 100%;
+   display:flex;
+   flex-flow: row nowrap;
+   }
+
+   &.infobox > tbody >tr > td,
+   &.infobox > tbody >tr > th {
+   flex: 1 0;
}
}
 }
diff --git a/resources/skins.minerva.tablet.styles/hacks.less 
b/resources/skins.minerva.tablet.styles/hacks.less
index c833a7b..102189a 100644
--- a/resources/skins.minerva.tablet.styles/hacks.less
+++ b/resources/skins.minerva.tablet.styles/hacks.less
@@ -22,11 +22,6 @@
width: auto !important;
float: right !important;
clear: right !important;
-
-   td {
-   width: auto;
-   }
-
}
// banners inserted by other extensions, i.e. Zero
#mw-mf-page-center .mw-mf-banner {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e03610e4eb3c93b80bb757592c2fb3079a68412
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Refreshed[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404091 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..


Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: I470d1f01b6ffb286880a12cd089cbb120f1c8164
---
M includes/RefreshedTemplate.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/RefreshedTemplate.php b/includes/RefreshedTemplate.php
index 602c3fe..b3bc202 100644
--- a/includes/RefreshedTemplate.php
+++ b/includes/RefreshedTemplate.php
@@ -128,7 +128,7 @@
$title = $titleBase->getSubjectPage();
$titleNamespace = $titleBase->getNamespace();
 
-   $key = wfMemcKey( 'refreshed', 'header' );
+   $key = $wgMemc->makeKey( 'refreshed', 'header' );
$headerNav = $wgMemc->get( $key );
if ( !$headerNav ) {
$headerNav = array();
@@ -136,7 +136,7 @@
$wgMemc->set( $key, $headerNav, 60 * 60 * 24 ); // 24 
hours
}
 
-   $dropdownCacheKey = wfMemcKey( 'refreshed', 'dropdownmenu' );
+   $dropdownCacheKey = $wgMemc->makeKey( 'refreshed', 
'dropdownmenu' );
$dropdownNav = $wgMemc->get( $dropdownCacheKey );
if ( !$dropdownNav ) {
$dropdownNav = $this->parseDropDownMenu( 
'Refreshed-wiki-dropdown' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I470d1f01b6ffb286880a12cd089cbb120f1c8164
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Refreshed
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...Gamepress[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404089 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..


Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: Ic0a04cad2f1d4ada4660f14b637b621494e0948a
---
M includes/GamepressSkinNavigationService.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/GamepressSkinNavigationService.php 
b/includes/GamepressSkinNavigationService.php
index 132218a..ea8a5ae 100644
--- a/includes/GamepressSkinNavigationService.php
+++ b/includes/GamepressSkinNavigationService.php
@@ -27,7 +27,7 @@
$useCache = $wgLang->getCode() == $wgContLang->getCode();
 
if ( $useCache || $this->forContent ) {
-   $cacheKey = wfMemcKey( $messageName, self::version );
+   $cacheKey = $wgMemc->makeKey( $messageName, 
self::version );
$nodes = $wgMemc->get( $cacheKey );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0a04cad2f1d4ada4660f14b637b621494e0948a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Gamepress
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...DeskMessMirrored[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404087 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..


Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: Iffbd6fcd5480052cb0d390418f695b845b675096
---
M includes/DeskMessMirroredSkinNavigationService.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/DeskMessMirroredSkinNavigationService.php 
b/includes/DeskMessMirroredSkinNavigationService.php
index 73e86b3..1d2601f 100644
--- a/includes/DeskMessMirroredSkinNavigationService.php
+++ b/includes/DeskMessMirroredSkinNavigationService.php
@@ -27,7 +27,7 @@
$useCache = $wgLang->getCode() == $wgContLang->getCode();
 
if ( $useCache || $this->forContent ) {
-   $cacheKey = wfMemcKey( $messageName, self::version );
+   $cacheKey = $wgMemc->makeKey( $messageName, 
self::version );
$nodes = $wgMemc->get( $cacheKey );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffbd6fcd5480052cb0d390418f695b845b675096
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DeskMessMirrored
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...Nimbus[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404090 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..


Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: I282ac03530ad0e584ca1ce3c14fee96e8d68ad45
---
M includes/NimbusTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/NimbusTemplate.php b/includes/NimbusTemplate.php
index 207505f..b5b4789 100644
--- a/includes/NimbusTemplate.php
+++ b/includes/NimbusTemplate.php
@@ -911,7 +911,7 @@
( $pageTitleId != $main_page->getArticleID() )
)
{
-   $key = wfMemcKey( 'recenteditors', 'list', $pageTitleId 
);
+   $key = $wgMemc->makeKey( 'recenteditors', 'list', 
$pageTitleId );
$data = $wgMemc->get( $key );
$editors = array();
if ( !$data ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I282ac03530ad0e584ca1ce3c14fee96e8d68ad45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nimbus
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...Bouquet[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404086 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..


Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: Ia466d156c38c8194b116e06aa66c443e6af7ab82
---
M includes/BouquetSkinNavigationService.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/BouquetSkinNavigationService.php 
b/includes/BouquetSkinNavigationService.php
index e677f96..bdbba5a 100644
--- a/includes/BouquetSkinNavigationService.php
+++ b/includes/BouquetSkinNavigationService.php
@@ -27,7 +27,7 @@
$useCache = $wgLang->getCode() == $wgContLang->getCode();
 
if ( $useCache || $this->forContent ) {
-   $cacheKey = wfMemcKey( $messageName, self::version );
+   $cacheKey = $wgMemc->makeKey( $messageName, 
self::version );
$nodes = $wgMemc->get( $cacheKey );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia466d156c38c8194b116e06aa66c443e6af7ab82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Bouquet
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...LinkedWiki[master]: - Fix errors messages - Upgrade sgvizler2 - prepare release

2018-01-13 Thread Karima Rafes (Code Review)
Karima Rafes has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404093 )

Change subject: - Fix errors messages - Upgrade sgvizler2 - prepare release
..


- Fix errors messages
- Upgrade sgvizler2
- prepare release

Change-Id: Id9211e26cdffddd80c219aa7b9cafe76313efb79
---
M README
M extension.json
M i18n/linkedwiki/en.json
M i18n/linkedwiki/fr.json
M i18n/sparqlquery/en.json
M i18n/sparqlquery/fr.json
M keys.js
M package.json
M parser/SparqlParser.php
9 files changed, 90 insertions(+), 57 deletions(-)

Approvals:
  Karima Rafes: Verified; Looks good to me, approved



diff --git a/README b/README
index 480c89e..6af8adc 100644
--- a/README
+++ b/README
@@ -33,7 +33,6 @@
 
 Optional extensions :
 * "Scribunto" in order to use the Lua class of Linkedwiki
-* "Widgets"  in order to use the parser WSparql with a Mediawiki widget
 
 == Tutorial and download ==
 
@@ -43,6 +42,7 @@
 
 * v3.1.1 Update Sgvizler2 and bootstrap by Karima Rafes 

  - Fix bugs in special page and parser
+ - Fix errors messages
 
 * v3.1.0 Use Sgvizler2, javascript wrapper for easy visualisation of SPARQL 
result sets. ( T143364 )
 - Update lib bordercloud/sparql
diff --git a/extension.json b/extension.json
index e0df00d..17f7f9f 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "LinkedWiki",
-   "version": "3.1.0 Beta",
+   "version": "3.1.1",
"author": [
"[https://www.mediawiki.org/wiki/User:Karima_Rafes Karima 
Rafes]"
],
diff --git a/i18n/linkedwiki/en.json b/i18n/linkedwiki/en.json
index 0ef82d7..990fd49 100644
--- a/i18n/linkedwiki/en.json
+++ b/i18n/linkedwiki/en.json
@@ -8,5 +8,9 @@
"linkedwiki-refresh": "Refresh",
"linkedwiki-duration": "Duration of query",
 
-   "specialpages-group-linkedwiki_group": "SPARQL and RDF tools"
+   "specialpages-group-linkedwiki_group": "SPARQL and RDF tools",
+
+   "linkedwiki-error-server": "Sorry, the sparql server sent an error. 
(see details with parameter log=2)",
+   "linkedwiki-error-endpoint-init": "Sorry, there is an error with your 
endpoint. (see details with parameter log=2)",
+   "linkedwiki-error-endpoint-empty": "Where is the Endpoint or the 
configuration ?"
 }
diff --git a/i18n/linkedwiki/fr.json b/i18n/linkedwiki/fr.json
index 827cb42..114ef7d 100644
--- a/i18n/linkedwiki/fr.json
+++ b/i18n/linkedwiki/fr.json
@@ -7,5 +7,9 @@
"linkedwiki-refresh": "Rafraîchir",
"linkedwiki-duration": "Durée du calcul",
 
-   "specialpages-group-linkedwiki_group": "Outils pour SPARQL et RDF"
+   "specialpages-group-linkedwiki_group": "Outils pour SPARQL et RDF",
+
+   "linkedwiki-error-server": "Désolé, le serveur SPARQL a envoyé une 
erreur. (voir les détails avec le paramètre log=2)",
+   "linkedwiki-error-endpoint-init": "Désolé, il y a un erreur à 
l'initialisation du endpoint SPARQL. (voir les détails avec le paramètre 
log=2)",
+   "linkedwiki-error-endpoint-empty": "Où est le paramètre endpoint ou 
configuration ?"
 }
diff --git a/i18n/sparqlquery/en.json b/i18n/sparqlquery/en.json
index c814563..6bf3bfd 100644
--- a/i18n/sparqlquery/en.json
+++ b/i18n/sparqlquery/en.json
@@ -5,7 +5,7 @@
"linkedwiki-specialsparqlquery": "SPARQL editor",
"linkedwiki-specialsparqlquery_categorysparqlquery": "SPARQL query",
"linkedwiki-specialsparqlquery_mainpage": "This page will be used to 
test, optimize and share your queries if you wish.\n\nPost your questions to: 
[https://www.mediawiki.org/wiki/Extension_talk:LinkedWiki Talk:linkedwiki]",
-   "linkedwiki-specialsparqlquery_sendquery": "Search",
+   "linkedwiki-specialsparqlquery_sendquery": "Execute query",
"linkedwiki-specialsparqlquery_usethisquery": "Howto use this query in 
this wiki",
"linkedwiki-specialsparqlquery_usethisquery_tutorial": "Copy and paste 
this line in a page of this wiki.\n\nSee more: 
[https://www.mediawiki.org/wiki/Extension:LinkedWiki Extension:LinkedWiki]",
"linkedwiki-specialsparqlquery_endpointsparql": "Endpoint SPARQL",
diff --git a/i18n/sparqlquery/fr.json b/i18n/sparqlquery/fr.json
index 2478d56..21196c1 100644
--- a/i18n/sparqlquery/fr.json
+++ b/i18n/sparqlquery/fr.json
@@ -5,7 +5,7 @@
"linkedwiki-specialsparqlquery": "Editeur SPARQL",
"linkedwiki-specialsparqlquery_categorysparqlquery": "Requête SPARQL",
"linkedwiki-specialsparqlquery_mainpage": "Cette page va vous servir à 
tester, optimiser et partager vos requêtes si vous le souhaitez.\n\nPostez vos 
questions à : [https://www.mediawiki.org/wiki/Extension_talk:LinkedWiki 
Discussion linkedwiki]",
-   "linkedwiki-specialsparqlquery_sendquery": "Envoyer",
+   "linkedwiki-specialsparqlquery_sendquery": "Exécuter la requête",
"linkedwiki-specialsparqlquery_usethisquery": "Utiliser cette 

[MediaWiki-commits] [Gerrit] mediawiki...LinkedWiki[master]: - Fix errors messages - Upgrade sgvizler2 - prepare release

2018-01-13 Thread Karima Rafes (Code Review)
Karima Rafes has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404093 )

Change subject: - Fix errors messages - Upgrade sgvizler2 - prepare release
..

- Fix errors messages
- Upgrade sgvizler2
- prepare release

Change-Id: Id9211e26cdffddd80c219aa7b9cafe76313efb79
---
M README
M extension.json
M i18n/linkedwiki/en.json
M i18n/linkedwiki/fr.json
M i18n/sparqlquery/en.json
M i18n/sparqlquery/fr.json
M keys.js
M package.json
M parser/SparqlParser.php
9 files changed, 90 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkedWiki 
refs/changes/93/404093/1

diff --git a/README b/README
index 480c89e..6af8adc 100644
--- a/README
+++ b/README
@@ -33,7 +33,6 @@
 
 Optional extensions :
 * "Scribunto" in order to use the Lua class of Linkedwiki
-* "Widgets"  in order to use the parser WSparql with a Mediawiki widget
 
 == Tutorial and download ==
 
@@ -43,6 +42,7 @@
 
 * v3.1.1 Update Sgvizler2 and bootstrap by Karima Rafes 

  - Fix bugs in special page and parser
+ - Fix errors messages
 
 * v3.1.0 Use Sgvizler2, javascript wrapper for easy visualisation of SPARQL 
result sets. ( T143364 )
 - Update lib bordercloud/sparql
diff --git a/extension.json b/extension.json
index e0df00d..17f7f9f 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "LinkedWiki",
-   "version": "3.1.0 Beta",
+   "version": "3.1.1",
"author": [
"[https://www.mediawiki.org/wiki/User:Karima_Rafes Karima 
Rafes]"
],
diff --git a/i18n/linkedwiki/en.json b/i18n/linkedwiki/en.json
index 0ef82d7..990fd49 100644
--- a/i18n/linkedwiki/en.json
+++ b/i18n/linkedwiki/en.json
@@ -8,5 +8,9 @@
"linkedwiki-refresh": "Refresh",
"linkedwiki-duration": "Duration of query",
 
-   "specialpages-group-linkedwiki_group": "SPARQL and RDF tools"
+   "specialpages-group-linkedwiki_group": "SPARQL and RDF tools",
+
+   "linkedwiki-error-server": "Sorry, the sparql server sent an error. 
(see details with parameter log=2)",
+   "linkedwiki-error-endpoint-init": "Sorry, there is an error with your 
endpoint. (see details with parameter log=2)",
+   "linkedwiki-error-endpoint-empty": "Where is the Endpoint or the 
configuration ?"
 }
diff --git a/i18n/linkedwiki/fr.json b/i18n/linkedwiki/fr.json
index 827cb42..114ef7d 100644
--- a/i18n/linkedwiki/fr.json
+++ b/i18n/linkedwiki/fr.json
@@ -7,5 +7,9 @@
"linkedwiki-refresh": "Rafraîchir",
"linkedwiki-duration": "Durée du calcul",
 
-   "specialpages-group-linkedwiki_group": "Outils pour SPARQL et RDF"
+   "specialpages-group-linkedwiki_group": "Outils pour SPARQL et RDF",
+
+   "linkedwiki-error-server": "Désolé, le serveur SPARQL a envoyé une 
erreur. (voir les détails avec le paramètre log=2)",
+   "linkedwiki-error-endpoint-init": "Désolé, il y a un erreur à 
l'initialisation du endpoint SPARQL. (voir les détails avec le paramètre 
log=2)",
+   "linkedwiki-error-endpoint-empty": "Où est le paramètre endpoint ou 
configuration ?"
 }
diff --git a/i18n/sparqlquery/en.json b/i18n/sparqlquery/en.json
index c814563..6bf3bfd 100644
--- a/i18n/sparqlquery/en.json
+++ b/i18n/sparqlquery/en.json
@@ -5,7 +5,7 @@
"linkedwiki-specialsparqlquery": "SPARQL editor",
"linkedwiki-specialsparqlquery_categorysparqlquery": "SPARQL query",
"linkedwiki-specialsparqlquery_mainpage": "This page will be used to 
test, optimize and share your queries if you wish.\n\nPost your questions to: 
[https://www.mediawiki.org/wiki/Extension_talk:LinkedWiki Talk:linkedwiki]",
-   "linkedwiki-specialsparqlquery_sendquery": "Search",
+   "linkedwiki-specialsparqlquery_sendquery": "Execute query",
"linkedwiki-specialsparqlquery_usethisquery": "Howto use this query in 
this wiki",
"linkedwiki-specialsparqlquery_usethisquery_tutorial": "Copy and paste 
this line in a page of this wiki.\n\nSee more: 
[https://www.mediawiki.org/wiki/Extension:LinkedWiki Extension:LinkedWiki]",
"linkedwiki-specialsparqlquery_endpointsparql": "Endpoint SPARQL",
diff --git a/i18n/sparqlquery/fr.json b/i18n/sparqlquery/fr.json
index 2478d56..21196c1 100644
--- a/i18n/sparqlquery/fr.json
+++ b/i18n/sparqlquery/fr.json
@@ -5,7 +5,7 @@
"linkedwiki-specialsparqlquery": "Editeur SPARQL",
"linkedwiki-specialsparqlquery_categorysparqlquery": "Requête SPARQL",
"linkedwiki-specialsparqlquery_mainpage": "Cette page va vous servir à 
tester, optimiser et partager vos requêtes si vous le souhaitez.\n\nPostez vos 
questions à : [https://www.mediawiki.org/wiki/Extension_talk:LinkedWiki 
Discussion linkedwiki]",
-   "linkedwiki-specialsparqlquery_sendquery": "Envoyer",
+   "linkedwiki-specialsparqlquery_sendquery": "Exécuter la requête",

[MediaWiki-commits] [Gerrit] labs...forrestbot[master]: Update for new make-wmf-branch logic

2018-01-13 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404092 )

Change subject: Update for new make-wmf-branch logic
..

Update for new make-wmf-branch logic

See-Change-Id: I550c8a880273df6fd901d57d56149f654d1d21fa
Change-Id: I550c8a880273df6fd901d57d56149f654d1d21fb
---
M forrestbot.py
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/forrestbot 
refs/changes/92/404092/1

diff --git a/forrestbot.py b/forrestbot.py
index 5066297..a935b0d 100644
--- a/forrestbot.py
+++ b/forrestbot.py
@@ -62,9 +62,7 @@
 conf = r.json()
 repos = ['mediawiki/core']
 for ext in conf['extensions']:
-repos.append('mediawiki/extensions/' + ext)
-for skin in conf['skins']:
-repos.append('mediawiki/skins/' + skin)
+repos.append('mediawiki/' + ext)
 # Intentionally ignore special_extensions because they're special
 return repos
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I550c8a880273df6fd901d57d56149f654d1d21fb
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/forrestbot
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Refreshed[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404091 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..

Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: I470d1f01b6ffb286880a12cd089cbb120f1c8164
---
M includes/RefreshedTemplate.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/RefreshedTemplate.php b/includes/RefreshedTemplate.php
index 602c3fe..b3bc202 100644
--- a/includes/RefreshedTemplate.php
+++ b/includes/RefreshedTemplate.php
@@ -128,7 +128,7 @@
$title = $titleBase->getSubjectPage();
$titleNamespace = $titleBase->getNamespace();
 
-   $key = wfMemcKey( 'refreshed', 'header' );
+   $key = $wgMemc->makeKey( 'refreshed', 'header' );
$headerNav = $wgMemc->get( $key );
if ( !$headerNav ) {
$headerNav = array();
@@ -136,7 +136,7 @@
$wgMemc->set( $key, $headerNav, 60 * 60 * 24 ); // 24 
hours
}
 
-   $dropdownCacheKey = wfMemcKey( 'refreshed', 'dropdownmenu' );
+   $dropdownCacheKey = $wgMemc->makeKey( 'refreshed', 
'dropdownmenu' );
$dropdownNav = $wgMemc->get( $dropdownCacheKey );
if ( !$dropdownNav ) {
$dropdownNav = $this->parseDropDownMenu( 
'Refreshed-wiki-dropdown' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Nimbus[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404090 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..

Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: I282ac03530ad0e584ca1ce3c14fee96e8d68ad45
---
M includes/NimbusTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Nimbus 
refs/changes/90/404090/1

diff --git a/includes/NimbusTemplate.php b/includes/NimbusTemplate.php
index 207505f..b5b4789 100644
--- a/includes/NimbusTemplate.php
+++ b/includes/NimbusTemplate.php
@@ -911,7 +911,7 @@
( $pageTitleId != $main_page->getArticleID() )
)
{
-   $key = wfMemcKey( 'recenteditors', 'list', $pageTitleId 
);
+   $key = $wgMemc->makeKey( 'recenteditors', 'list', 
$pageTitleId );
$data = $wgMemc->get( $key );
$editors = array();
if ( !$data ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Gamepress[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404089 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..

Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: Ic0a04cad2f1d4ada4660f14b637b621494e0948a
---
M includes/GamepressSkinNavigationService.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Gamepress 
refs/changes/89/404089/1

diff --git a/includes/GamepressSkinNavigationService.php 
b/includes/GamepressSkinNavigationService.php
index 132218a..ea8a5ae 100644
--- a/includes/GamepressSkinNavigationService.php
+++ b/includes/GamepressSkinNavigationService.php
@@ -27,7 +27,7 @@
$useCache = $wgLang->getCode() == $wgContLang->getCode();
 
if ( $useCache || $this->forContent ) {
-   $cacheKey = wfMemcKey( $messageName, self::version );
+   $cacheKey = $wgMemc->makeKey( $messageName, 
self::version );
$nodes = $wgMemc->get( $cacheKey );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Whitelist audiovis.nac.gov.pl

2018-01-13 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404088 )

Change subject: Whitelist audiovis.nac.gov.pl
..

Whitelist audiovis.nac.gov.pl

Bug: T184853
Change-Id: I878ec868f8fd0898735027ab612d6845bd100101
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a16e30c..6c4d809 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13298,7 +13298,8 @@
'aleph500.biblacad.ro', // Domain of the Romanian 
academy - T178753
'images.collection.cooperhewitt.org', // Cooper Hewitt - T180241
'*.nli.org.il', // National Library of 
Israel - T1881179
-   'studiezaal.nijmegen.nl'// Regionaal Archief 
Nijmegen, NL - T181713
+   'studiezaal.nijmegen.nl',   // Regionaal Archief 
Nijmegen, NL - T181713
+   'audiovis.nac.gov.pl',  // Zbiori, Poland goverment 
- T184853
],
 ],
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DeskMessMirrored[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404087 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..

Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: Iffbd6fcd5480052cb0d390418f695b845b675096
---
M includes/DeskMessMirroredSkinNavigationService.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DeskMessMirrored 
refs/changes/87/404087/1

diff --git a/includes/DeskMessMirroredSkinNavigationService.php 
b/includes/DeskMessMirroredSkinNavigationService.php
index 73e86b3..1d2601f 100644
--- a/includes/DeskMessMirroredSkinNavigationService.php
+++ b/includes/DeskMessMirroredSkinNavigationService.php
@@ -27,7 +27,7 @@
$useCache = $wgLang->getCode() == $wgContLang->getCode();
 
if ( $useCache || $this->forContent ) {
-   $cacheKey = wfMemcKey( $messageName, self::version );
+   $cacheKey = $wgMemc->makeKey( $messageName, 
self::version );
$nodes = $wgMemc->get( $cacheKey );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Bouquet[master]: Replace global wfMemcKey function - deprecated since 1.30.0

2018-01-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404086 )

Change subject: Replace global wfMemcKey function - deprecated since 1.30.0
..

Replace global wfMemcKey function - deprecated since 1.30.0

Change-Id: Ia466d156c38c8194b116e06aa66c443e6af7ab82
---
M includes/BouquetSkinNavigationService.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Bouquet 
refs/changes/86/404086/1

diff --git a/includes/BouquetSkinNavigationService.php 
b/includes/BouquetSkinNavigationService.php
index e677f96..bdbba5a 100644
--- a/includes/BouquetSkinNavigationService.php
+++ b/includes/BouquetSkinNavigationService.php
@@ -27,7 +27,7 @@
$useCache = $wgLang->getCode() == $wgContLang->getCode();
 
if ( $useCache || $this->forContent ) {
-   $cacheKey = wfMemcKey( $messageName, self::version );
+   $cacheKey = $wgMemc->makeKey( $messageName, 
self::version );
$nodes = $wgMemc->get( $cacheKey );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Replace assertRaises with assertRaisesRegex in isbn_tests.py

2018-01-13 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404085 )

Change subject: Replace assertRaises with assertRaisesRegex in isbn_tests.py
..

Replace assertRaises with assertRaisesRegex in isbn_tests.py

assertRaises is not as good of a test as asserRaisesRegex.
The latter has an extra parameter to match the exception message,
allowing more more precision when checking an error.

Bug: T154281
Change-Id: Iaab3472bbae926caf5d68239b3828b5691ee38b9
---
M tests/isbn_tests.py
1 file changed, 54 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/85/404085/1

diff --git a/tests/isbn_tests.py b/tests/isbn_tests.py
index df00417..216a1f8 100644
--- a/tests/isbn_tests.py
+++ b/tests/isbn_tests.py
@@ -39,6 +39,19 @@
 
 """Test CosmeticChanges ISBN fix."""
 
+ISBNINVALIDCHECKSUM_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) is not 13 digits long\. / "
+r"ISBN-10: The ISBN checksum of ([A-Z0-9]*) is incorrect\."
+)
+ISBNINVALIDLENGTH_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) is not 13 digits long\. / "
+r"ISBN-10: The ISBN ([A-Z0-9]*) is not 10 digits long\."
+)
+ISBNXINTHEMIDDLE_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) contains invalid characters\. / "
+r"ISBN-10: The ISBN ([A-Z0-9]*) is not 10 digits long\."
+)
+
 def test_valid_isbn(self):
 """Test ISBN."""
 cc = CosmeticChangesToolkit(self.site, namespace=0)
@@ -54,17 +67,17 @@
 cc = CosmeticChangesToolkit(self.site, namespace=0)
 
 # Invalid characters
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 0975229LOL')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNINVALIDLENGTH_RE,
+   cc.fix_ISBN, 'ISBN 0975229LOL')
 # Invalid checksum
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 0975229801')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNINVALIDCHECKSUM_RE,
+   cc.fix_ISBN, 'ISBN 0975229801')
 # Invalid length
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 09752298')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNINVALIDLENGTH_RE,
+   cc.fix_ISBN, 'ISBN 09752298')
 # X in the middle
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 09752X9801')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNXINTHEMIDDLE_RE,
+   cc.fix_ISBN, 'ISBN 09752X9801')
 
 def test_ignore_invalid_isbn(self):
 """Test fixing ISBN numbers with an invalid ISBN."""
@@ -77,6 +90,23 @@
 class TestIsbn(TestCase):
 
 """Test ISBN-related classes and helper functions."""
+
+ISBNINVALIDCHARACTERS_RE = (
+r"The ISBN ([A-Z0-9]*) contains invalid characters"
+)
+ISBNINVALIDCHECKSUM_RE = (
+r"The ISBN checksum of ([A-Z0-9]*) is incorrect"
+)
+ISBNINVALIDLENGTH_RE = (
+r"The ISBN ([A-Z0-9]*) is not (10|13) digits long"
+)
+ISBNBOTHINVALIDLENGTH_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) is not 13 digits long\. / "
+r"ISBN-10: The ISBN ([A-Z0-9]*) is not 10 digits long\."
+)
+ISBNXINTHEMIDDLE_RE = (
+r"ISBN ([A-Z0-9]*): X is only allowed at the end of the ISBN"
+)
 
 net = False
 
@@ -94,10 +124,14 @@
 self.assertEqual(isbn13.code, '978-0-9752298-0-4')
 
 # Errors
-self.assertRaises(IsbnExc, ISBN10, '0975229LOL')  # Invalid characters
-self.assertRaises(IsbnExc, ISBN10, '0975229801')  # Invalid checksum
-self.assertRaises(IsbnExc, ISBN10, '09752298')  # Invalid length
-self.assertRaises(IsbnExc, ISBN10, '09752X9801')  # X in the middle
+self.assertRaisesRegex(IsbnExc, self.ISBNINVALIDCHARACTERS_RE,
+   ISBN10, '0975229LOL')  # Invalid characters
+self.assertRaisesRegex(IsbnExc, self.ISBNINVALIDCHECKSUM_RE,
+   ISBN10, '0975229801')  # Invalid checksum
+self.assertRaisesRegex(IsbnExc, self.ISBNINVALIDLENGTH_RE,
+   ISBN10, '09752298')  # Invalid length
+self.assertRaisesRegex(IsbnExc, self.ISBNXINTHEMIDDLE_RE,
+   ISBN10, '09752X9801')  # X in the middle
 
 def test_isbn13(self):
 """Test ISBN13."""
@@ -111,19 +145,20 @@
 self.assertEqual(isbn.code, '9788090273412')
 
 # Errors
-self.assertRaises(IsbnExc, ISBN13, '9783161484LOL')  # Invalid chars
-self.assertRaises(IsbnExc, ISBN13, '9783161484105')  # Invalid checksum
-self.assertRaises(IsbnExc, ISBN13, '9783161484')  # Invalid length
+ 

[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix for https://github.com/commons-app/apps-android-commons/...

2018-01-13 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403889 )

Change subject: Fix for 
https://github.com/commons-app/apps-android-commons/issues/1059
..


Fix for https://github.com/commons-app/apps-android-commons/issues/1059

Change-Id: If9a052e947d72edf9398bb1887f36dc365a890ed
---
M groups/Wikimedia/CommonsAndroid.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/groups/Wikimedia/CommonsAndroid.yaml 
b/groups/Wikimedia/CommonsAndroid.yaml
index a376643..9608222 100644
--- a/groups/Wikimedia/CommonsAndroid.yaml
+++ b/groups/Wikimedia/CommonsAndroid.yaml
@@ -19,6 +19,7 @@
   qqq: qq
   roa-tara: b+roa+tara
   sr-ec: sr
+  sr-el: b+sr+Latn
   skr-arab: skr
   tg-cyrl: b+tg+Cyrl
   ug-arab: ug

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9a052e947d72edf9398bb1887f36dc365a890ed
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nicolas Raoul 
Gerrit-Reviewer: Divadsn 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...docker-pkg[master]: Add basic Dockerfile to run docker-pkg

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404084 )

Change subject: Add basic Dockerfile to run docker-pkg
..

Add basic Dockerfile to run docker-pkg

Make this easy to run by including a Dockerfile
that can be built.
This doesn't run easily on windows because of some deep
burried dependancy issue.
Running in docker works.

Change-Id: I571dda01917cbad7b577f7358c38d966a7d5f73e
---
A Dockerfile
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/docker-images/docker-pkg 
refs/changes/84/404084/1

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000..48193fc
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+FROM python:latest
+
+WORKDIR /usr/src/docker-pkg
+
+COPY ./ ./
+RUN pip install -e .
+
+WORKDIR /usr/src/app
+
+ENTRYPOINT [ "docker-pkg" ]
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I571dda01917cbad7b577f7358c38d966a7d5f73e
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/docker-pkg
Gerrit-Branch: master
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] mediawiki...DeletePagesForGood[master]: Use Hooks::runWithoutAbort

2018-01-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404083 )

Change subject: Use Hooks::runWithoutAbort
..

Use Hooks::runWithoutAbort

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie05b83f84235cfc493cd91330ec2a57e4db80d29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DeletePagesForGood
Gerrit-Branch: master
Gerrit-Owner: Paladox 
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]: WIP core browser tests on beta after update

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404082 )

Change subject: WIP core browser tests on beta after update
..

WIP core browser tests on beta after update

Change-Id: Ibdea057d6c3614339857a671759584c00b4016c2
---
M jjb/beta.yaml
1 file changed, 63 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/82/404082/1

diff --git a/jjb/beta.yaml b/jjb/beta.yaml
index b27d644..927a935 100644
--- a/jjb/beta.yaml
+++ b/jjb/beta.yaml
@@ -172,6 +172,68 @@
   aborted: true
   failure: true
   fixed: true
+#TODO actually trigger them after update
+#  - trigger:
+#  project: beta-core-browsertests
+
+- job-template:
+name: beta-core-browsertests-addshore-test
+defaults: beta
+node: ci-jessie-wikimedia
+
+# Do not run concurrently with upstream jobs
+#block-upstream: true#TODO uncomment
+
+properties:
+ - build-discarder:
+ days-to-keep: 15
+# Just get core, we dont need extensions, vendor or sql
+builders:
+ # get core (only)
+ - zuul-cloner:
+ projects: >
+ mediawiki/core
+ # npm install
+ - shell: |
+. /srv/deployment/integration/slave-scripts/bin/mw-set-env.sh
+cd $MW_INSTALL_PATH
+. /srv/deployment/integration/slave-scripts/bin/npm-setup.sh
+rm -rf node_modules
+npm install
+#./node_modules/.bin/grunt karma:main
+ # Ripped and altered from mw-wdio-nodepool
+ - shell: |
+. /srv/deployment/integration/slave-scripts/bin/mw-set-env.sh
+# TODO switch the server based on job name, allows triggering jobs for 
other beta sites..
+# TODO needs login details..
+
+export MW_SERVER="https://deployment.wikimedia.beta.wmflabs.org;
+export MW_SCRIPT_PATH="/w"
+
+cd $MW_INSTALL_PATH
+if [ -f ./tests/selenium/wdio.conf.js ]; then
+chromedriver --url-base=/wd/hub --port= &
+# Make sure it is killed to prevent file descriptors leak
+#TODO jjb wouldn't let me build the job with the kill commands...
+
+./node_modules/.bin/grunt webdriver:test
+fi
+ - assert-no-mediawiki-errors
+publishers:
+ #- castor-save
+ - archive-log-dir
+ - junit:
+results: 'log/junit*.xml,log/WDIO.xunit*.xml'
+# Qunit does not generate Junit file and we might skip selenium
+allow-empty-results: true
+ #- beta-irc#TODO uncomment
+ #- email-ext:#TODO uncomment
+ #recipients: qa-ale...@lists.wikimedia.org 
betacluster-ale...@lists.wikimedia.org
+ #content-type: 'html'
+ #attach-build-log: false
+ #aborted: true
+ #failure: true
+ #fixed: true
 
 # Also used in mediawiki-core-code-coverage
 - publisher:
@@ -197,3 +259,4 @@
  - beta-mediawiki-config-update-eqiad
  - beta-scap-eqiad
  - beta-update-databases-eqiad
+ - beta-core-browsertests-addshore-test

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Added monolingual code shy

2018-01-13 Thread Mbch331 (Code Review)
Mbch331 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404081 )

Change subject: Added monolingual code shy
..

Added monolingual code shy

Bug: T184783
Change-Id: I3e0a418698a5d3725e73966a43f152e51265af38
---
M repo/includes/WikibaseRepo.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 8697d04..681d0f1 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -1896,6 +1896,9 @@
 
// T181823
'fro', 'frm',
+
+   // T184783
+   'shy',
] )
),
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: selenium, user spec, add new message banner test

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404080 )

Change subject: selenium, user spec, add new message banner test
..

selenium, user spec, add new message banner test

Change-Id: I92dc612d215d1d3eb8dff02c2ff4d57da0105d69
---
M tests/selenium/pageobjects/page.js
M tests/selenium/specs/user.js
2 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/404080/1

diff --git a/tests/selenium/pageobjects/page.js 
b/tests/selenium/pageobjects/page.js
index 864bdae..c7f058c 100644
--- a/tests/selenium/pageobjects/page.js
+++ b/tests/selenium/pageobjects/page.js
@@ -1,6 +1,9 @@
 // From http://webdriver.io/guide/testrunner/pageobjects.html
 'use strict';
 class Page {
+
+   get usermessage() { return browser.element( 'div.usermessage' ); }
+
constructor() {
this.title = 'My Page';
}
diff --git a/tests/selenium/specs/user.js b/tests/selenium/specs/user.js
index 3f3872d..b11d85d 100644
--- a/tests/selenium/specs/user.js
+++ b/tests/selenium/specs/user.js
@@ -2,7 +2,8 @@
 const assert = require( 'assert' ),
CreateAccountPage = require( '../pageobjects/createaccount.page' ),
PreferencesPage = require( '../pageobjects/preferences.page' ),
-   UserLoginPage = require( '../pageobjects/userlogin.page' );
+   UserLoginPage = require( '../pageobjects/userlogin.page' ),
+   EditPage = require( '../pageobjects/edit.page' );
 
 describe( 'User', function () {
 
@@ -66,4 +67,24 @@
 
} );
 
+   it( 'should be able to view new message banner', function () {
+
+   // create user
+   browser.call( function () {
+   return CreateAccountPage.apiCreateAccount( username, 
password );
+   } );
+
+   // create talk page with content
+   browser.call( function () {
+   return EditPage.apiEdit( 'User_talk:' + username, 
Math.random().toString() );
+   } );
+
+   // log in
+   UserLoginPage.login( username, password );
+
+   // check
+   assert.equal( UserLoginPage.usermessage.getText(), 'You have a 
new message (last change).' );
+
+   } );
+
 } );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: selenium, page spec, add re-creatable

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404079 )

Change subject: selenium, page spec, add re-creatable
..

selenium, page spec, add re-creatable

Change-Id: I61c452246c29bd22000a06844901dfe8ca06fadd
---
M tests/selenium/specs/page.js
1 file changed, 22 insertions(+), 0 deletions(-)


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

diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js
index 130d6af..376dce5 100644
--- a/tests/selenium/specs/page.js
+++ b/tests/selenium/specs/page.js
@@ -38,6 +38,28 @@
 
} );
 
+   it( 'should be re-creatable', function () {
+   let initialContent = getTestString();
+
+   // create
+   browser.call( function () {
+   return EditPage.apiEdit( name, initialContent );
+   } );
+
+   // delete
+   browser.call( function () {
+   return DeletePage.apiDelete( name, 'delete prior to 
recreate' );
+   } );
+
+   // create
+   EditPage.edit( name, content );
+
+   // check
+   assert.equal( EditPage.heading.getText(), name );
+   assert.equal( EditPage.displayedContent.getText(), content );
+
+   } );
+
it( 'should be editable', function () {
 
// create

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: selenium, page spec, add restoration

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404078 )

Change subject: selenium, page spec, add restoration
..

selenium, page spec, add restoration

Change-Id: Ied06915f982e693b00edab14b8c29c978a5d6dff
---
M tests/selenium/pageobjects/delete.page.js
A tests/selenium/pageobjects/restore.page.js
M tests/selenium/specs/page.js
3 files changed, 75 insertions(+), 0 deletions(-)


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

diff --git a/tests/selenium/pageobjects/delete.page.js 
b/tests/selenium/pageobjects/delete.page.js
index 55d4659..cc755f4 100644
--- a/tests/selenium/pageobjects/delete.page.js
+++ b/tests/selenium/pageobjects/delete.page.js
@@ -18,5 +18,35 @@
this.submit.click();
}
 
+   apiDelete( name, reason ) {
+   const url = require( 'url' ), // 
https://nodejs.org/docs/latest/api/url.html
+   baseUrl = url.parse( browser.options.baseUrl ), // 
http://webdriver.io/guide/testrunner/browserobject.html
+   Bot = require( 'nodemw' ), // 
https://github.com/macbre/nodemw
+   client = new Bot( {
+   protocol: baseUrl.protocol,
+   server: baseUrl.hostname,
+   port: baseUrl.port,
+   path: baseUrl.path,
+   username: browser.options.username,
+   password: browser.options.password,
+   debug: false
+   } );
+
+   return new Promise( ( resolve, reject ) => {
+   client.logIn( function ( err ) {
+   if ( err ) {
+   console.log( err );
+   return reject( err );
+   }
+   client.delete( name, reason, function ( err ) {
+   if ( err ) {
+   return reject( err );
+   }
+   resolve();
+   } );
+   } );
+   } );
+   }
+
 }
 module.exports = new DeletePage();
diff --git a/tests/selenium/pageobjects/restore.page.js 
b/tests/selenium/pageobjects/restore.page.js
new file mode 100644
index 000..35b1b93
--- /dev/null
+++ b/tests/selenium/pageobjects/restore.page.js
@@ -0,0 +1,21 @@
+'use strict';
+const Page = require( './page' );
+
+class RestorePage extends Page {
+
+   get reason() { return browser.element( '#wpComment' ); }
+   get submit() { return browser.element( '#mw-undelete-submit' ); }
+   get displayedContent() { return browser.element( '#mw-content-text' ); }
+
+   openForRestoring( name ) {
+   browser.url( '/index.php?title=Special:Undelete/' + name );
+   }
+
+   restore( name, reason ) {
+   this.openForRestoring( name );
+   this.reason.setValue( reason );
+   this.submit.click();
+   }
+
+}
+module.exports = new RestorePage();
diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js
index 4ec94eb..130d6af 100644
--- a/tests/selenium/specs/page.js
+++ b/tests/selenium/specs/page.js
@@ -1,6 +1,7 @@
 'use strict';
 const assert = require( 'assert' ),
DeletePage = require( '../pageobjects/delete.page' ),
+   RestorePage = require( '../pageobjects/restore.page' ),
EditPage = require( '../pageobjects/edit.page' ),
HistoryPage = require( '../pageobjects/history.page' ),
UserLoginPage = require( '../pageobjects/userlogin.page' );
@@ -87,4 +88,27 @@
 
} );
 
+   it( 'should be restorable', function () {
+
+   // login
+   UserLoginPage.loginAdmin();
+
+   // create
+   browser.call( function () {
+   return EditPage.apiEdit( name, content );
+   } );
+
+   // delete
+   browser.call( function () {
+   return DeletePage.apiDelete( name, content + 
'-deletereason' );
+   } );
+
+   // restore
+   RestorePage.restore( name, content + '-restorereason' );
+
+   // check
+   assert.equal( RestorePage.displayedContent.getText(), name + ' 
has been restored\nConsult the deletion log for a record of recent deletions 
and restorations.' );
+
+   } );
+
 } );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied06915f982e693b00edab14b8c29c978a5d6dff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Create Module Tests

2018-01-13 Thread Eisenhaus335 (Code Review)
Eisenhaus335 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404076 )

Change subject: Create Module Tests
..

Create Module Tests

Change-Id: Ic756dc4f027287589f4b76d98319c321545ec97d
---
A tests/daemonize_tests.py
A tests/editor_tests.py
2 files changed, 74 insertions(+), 0 deletions(-)


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

diff --git a/tests/daemonize_tests.py b/tests/daemonize_tests.py
new file mode 100644
index 000..69c821e
--- /dev/null
+++ b/tests/daemonize_tests.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+"""Tests for BasePage subclasses."""
+
+from __future__ import absolute_import, unicode_literals
+
+import os
+
+import unitest
+
+from pywikibot import daemonize
+
+
+def test_daemonize_os_exit():
+os.fork()
+os.fork()
+daemonize.daemonize()
+daemonize.daemonize()
+
+
+def test_daemonize_closedstream_true():
+daemonize.daemonize(True, True, False, None)
+
+
+def test_daemonize_closedstream_false():
+daemonize.daemonize(False, True, False, None)
+
+
+def test_daemonize_changedirectory_true():
+daemonize.daemonize(True, True, False, None)
+
+
+def test_daemonize_changeddirectory_false():
+daemonize.daemonize(True, False, False, None)
+
+
+def test_redirectstd_true():
+daemonize.daemonize(True, True, False, 'Test')
+
+
+def test_daemonize_writepid_True():
+os.fork()
+# cannot be tested because spaghetti code
+
+
+if __name__ == '__main__':  # pragma: no cover
+try:
+unitest.main()
+except SystemExit:
+pass
diff --git a/tests/editor_tests.py b/tests/editor_tests.py
new file mode 100644
index 000..88fd8bb
--- /dev/null
+++ b/tests/editor_tests.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+"""Test Editor."""
+
+from __future__ import absolute_import, unicode_literals
+
+import os
+
+import tempfile
+
+from pywikibot import editor
+
+
+def test_editor_edituserconfigpy_same():
+editor.TextEditor.edit(text=None, jumpIndex=200, highlight='test1')
+
+
+def test_editor_edituserconfigpy():
+editor.TextEditor.edit(text='test1', jumpIndex=200, highlight='test1')
+
+
+def test_editor_command():
+tempfile.TemporaryFile(suffix='test', prefix='txt', dir=os.getcwd())
+editor.TextEditor.command(tempFilename=os.getcwd() + 'test.txt',
+  text='test')

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: selenium, update page spec to include more chars

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404075 )

Change subject: selenium, update page spec to include more chars
..

selenium, update page spec to include more chars

Change-Id: I3423011c467b0a6426cfa0dad522435618f24bd0
---
M tests/selenium/specs/page.js
1 file changed, 8 insertions(+), 6 deletions(-)


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

diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js
index 06d3d60..e59da78 100644
--- a/tests/selenium/specs/page.js
+++ b/tests/selenium/specs/page.js
@@ -9,6 +9,10 @@
var content,
name;
 
+   function getTestString() {
+   return Math.random().toString() + '-öäü-♠♣♥♦';
+   }
+
before( function () {
// disable VisualEditor welcome dialog
UserLoginPage.open();
@@ -17,8 +21,8 @@
 
beforeEach( function () {
browser.deleteCookie();
-   content = Math.random().toString();
-   name = Math.random().toString();
+   content = getTestString();
+   name = getTestString();
} );
 
it( 'should be creatable', function () {
@@ -34,19 +38,17 @@
 
it( 'should be editable', function () {
 
-   var content2 = Math.random().toString();
-
// create
browser.call( function () {
return EditPage.apiEdit( name, content );
} );
 
// edit
-   EditPage.edit( name, content2 );
+   EditPage.edit( name, content );
 
// check
assert.equal( EditPage.heading.getText(), name );
-   assert.equal( EditPage.displayedContent.getText(), content2 );
+   assert.equal( EditPage.displayedContent.getText(), content );
 
} );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Selenium README note about --url-base on Windows

2018-01-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404074 )

Change subject: Selenium README note about --url-base on Windows
..

Selenium README note about --url-base on Windows

For me /wd/hub doesnt work and wd/hub must be used

Change-Id: Ic61d516b53c95b0d1351bcda7308870f5fc5171c
---
M tests/selenium/README.md
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/74/404074/1

diff --git a/tests/selenium/README.md b/tests/selenium/README.md
index c895a42..a1a090d 100644
--- a/tests/selenium/README.md
+++ b/tests/selenium/README.md
@@ -24,6 +24,7 @@
 To run only one file (for example page.js), you first need to spawn the 
chromedriver:
 
 chromedriver --url-base=/wd/hub --port=
+Note: On Windows you may need to use "--url-base=wd/hub"
 
 Then in another terminal:
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Remove PHPDoc blocks that just repeat the method header

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403955 )

Change subject: Remove PHPDoc blocks that just repeat the method header
..


Remove PHPDoc blocks that just repeat the method header

Such comments do not add any new information.

Change-Id: Ib4e529310ef66d36b6909fff7d1b07afd53a3fe8
---
M src/DataModel/Lexeme.php
M src/Rdf/LexemeRdfBuilder.php
M tests/phpunit/composer/DataModel/Services/Diff/FormDifferPatcherTest.php
3 files changed, 1 insertion(+), 25 deletions(-)

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



diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 2b64c7d..cc173be 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -208,9 +208,6 @@
return $this->lemmas;
}
 
-   /**
-* @param TermList $lemmas
-*/
public function setLemmas( TermList $lemmas ) {
$this->lemmas = $lemmas;
}
@@ -228,9 +225,6 @@
return $this->lexicalCategory;
}
 
-   /**
-* @param ItemId $lexicalCategory
-*/
public function setLexicalCategory( ItemId $lexicalCategory ) {
$this->lexicalCategory = $lexicalCategory;
}
@@ -248,9 +242,6 @@
return $this->language;
}
 
-   /**
-* @param ItemId $language
-*/
public function setLanguage( ItemId $language ) {
$this->language = $language;
}
diff --git a/src/Rdf/LexemeRdfBuilder.php b/src/Rdf/LexemeRdfBuilder.php
index 476268e..bedb8c6 100644
--- a/src/Rdf/LexemeRdfBuilder.php
+++ b/src/Rdf/LexemeRdfBuilder.php
@@ -27,14 +27,7 @@
 */
private $writer;
 
-   /**
-* @param RdfVocabulary $vocabulary
-* @param RdfWriter $writer
-*/
-   public function __construct(
-   RdfVocabulary $vocabulary,
-   RdfWriter $writer
-   ) {
+   public function __construct( RdfVocabulary $vocabulary, RdfWriter 
$writer ) {
$this->vocabulary = $vocabulary;
$this->writer = $writer;
}
diff --git 
a/tests/phpunit/composer/DataModel/Services/Diff/FormDifferPatcherTest.php 
b/tests/phpunit/composer/DataModel/Services/Diff/FormDifferPatcherTest.php
index a6aba3c..5d4939e 100644
--- a/tests/phpunit/composer/DataModel/Services/Diff/FormDifferPatcherTest.php
+++ b/tests/phpunit/composer/DataModel/Services/Diff/FormDifferPatcherTest.php
@@ -163,10 +163,6 @@
$this->assertEquals( [], $form1->getGrammaticalFeatures() );
}
 
-   /**
-* @param ItemId $gf
-* @param Form $form
-*/
private function assertHasGrammaticalFeature( ItemId $gf, Form $form ) {
$this->assertContains(
$gf,
@@ -178,10 +174,6 @@
);
}
 
-   /**
-* @param ItemId $gf
-* @param Form $form
-*/
private function assertDoentHaveGrammaticalFeature( ItemId $gf, Form 
$form ) {
$this->assertNotContains(
$gf,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4e529310ef66d36b6909fff7d1b07afd53a3fe8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Catch timeout errors in screenshot scripts

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403710 )

Change subject: Catch timeout errors in screenshot scripts
..


Catch timeout errors in screenshot scripts

Bug: T184724
Change-Id: Ifbc03b1291c291dcfc862487766e3786f9bd437c
---
M Gruntfile.js
M build/screenshots.js
2 files changed, 29 insertions(+), 7 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index f25fad1..9436bfb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,7 +11,9 @@
var modules = grunt.file.readJSON( 'lib/ve/build/modules.json' ),
screenshotOptions = {
reporter: 'spec',
-   timeout: 4,
+   // TODO: Work out how to catch this timeout and 
continue.
+   // For now just make it very long.
+   timeout: 5 * 60 * 1000,
require: [
function () {
// eslint-disable-next-line no-undef, 
no-implicit-globals
@@ -21,7 +23,9 @@
},
screenshotOptionsAll = {
reporter: 'spec',
-   timeout: 4,
+   // TODO: Work out how to catch this timeout and 
continue.
+   // For now just make it very long.
+   timeout: 5 * 60 * 1000,
require: [
function () {
// eslint-disable-next-line no-undef, 
no-implicit-globals
diff --git a/build/screenshots.js b/build/screenshots.js
index d163a43..f7d6fee 100644
--- a/build/screenshots.js
+++ b/build/screenshots.js
@@ -1,5 +1,7 @@
 /* global seleniumUtils */
 
+/* eslint-disable no-console */
+
 ( function () {
'use strict';
var accessKey = process.env.SAUCE_ONDEMAND_ACCESS_KEY,
@@ -7,7 +9,8 @@
fs = require( 'fs' ),
Jimp = require( 'jimp' ),
username = process.env.SAUCE_ONDEMAND_USERNAME,
-   webdriver = require( 'selenium-webdriver' );
+   webdriver = require( 'selenium-webdriver' ),
+   TIMEOUT = 40 * 1000;
 
function createScreenshotEnvironment( test, beforeEach ) {
var clientSize, driver;
@@ -29,7 +32,7 @@
driver = new chrome.Driver();
}
 
-   driver.manage().timeouts().setScriptTimeout( 4 );
+   driver.manage().timeouts().setScriptTimeout( TIMEOUT );
driver.manage().window().setSize( 1200, 1000 );
 
driver.get( 
'https://en.wikipedia.org/wiki/Help:Sample_page?veaction=edit=' + lang 
);
@@ -132,10 +135,22 @@
}
).then( function ( cs ) {
clientSize = cs;
+   }, function ( e ) {
+   // Log error (timeout)
+   console.error( e.message );
} )
);
if ( beforeEach ) {
-   driver.wait( driver.executeAsyncScript( 
beforeEach ) );
+   driver.manage().timeouts().setScriptTimeout( 
TIMEOUT );
+   driver.wait(
+   driver.executeAsyncScript( beforeEach 
).then(
+   function () {},
+   function ( e ) {
+   // Log error (timeout)
+   console.error( 
e.message );
+   }
+   )
+   );
}
} );
 
@@ -165,6 +180,7 @@
function runScreenshotTest( name, lang, clientScript, padding ) 
{
var filename = './screenshots/' + name + '-' + lang + 
'.png';
 
+   driver.manage().timeouts().setScriptTimeout( TIMEOUT );
driver.wait(
driver.executeAsyncScript( clientScript ).then( 
function ( rect ) {
return driver.takeScreenshot().then( 
function ( base64Image ) {
@@ -176,8 +192,10 @@
fs.writeFile( filename, 
base64Image, 'base64' );
}
} );
-   } ),
-   4

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.util.test: Set wgFragmentMode before using getUrl

2018-01-13 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404073 )

Change subject: mediawiki.util.test: Set wgFragmentMode before using getUrl
..

mediawiki.util.test: Set wgFragmentMode before using getUrl

The result of mw.util.getUrl() depends on wgFragmentMode.
This change sets wgFragmentMode before testing mw.util.getUrl() and
tests the modes 'legacy' and 'html5'.

This change fixed errors on Special:JavaScriptTest when $wgFragmentMode
is set in LocalSettings.php.

Change-Id: Ifc65faacfcddb7d1bb4b298a0940c8f0208a23d7
---
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/404073/1

diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
index ef894a9..5e573e9 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
@@ -248,14 +248,23 @@
href = util.getUrl( '#Fragment', { action: 'edit' } );
assert.equal( href, '/w/index.php?action=edit#Fragment', 'empty 
title with query string and fragment' );
 
+   mw.config.set( 'wgFragmentMode', [ 'legacy' ] );
href = util.getUrl( 'Foo:Sandbox \xC4#Fragment \xC4', { action: 
'edit' } );
assert.equal( href, 
'/w/index.php?title=Foo:Sandbox_%C3%84=edit#Fragment_.C3.84', 'title 
with query string, fragment, and special characters' );
+   mw.config.set( 'wgFragmentMode', [ 'html5' ] );
+   href = util.getUrl( 'Foo:Sandbox \xC4#Fragment \xC4', { action: 
'edit' } );
+   assert.equal( href, 
'/w/index.php?title=Foo:Sandbox_%C3%84=edit#Fragment_Ä', 'title with 
query string, fragment, and special characters' );
 
href = util.getUrl( 'Foo:%23#Fragment', { action: 'edit' } );
assert.equal( href, 
'/w/index.php?title=Foo:%2523=edit#Fragment', 'title containing %23 (#), 
fragment, and a query string' );
 
+   mw.config.set( 'wgFragmentMode', [ 'legacy' ] );
href = util.getUrl( '#+&=:;@$-_.!*/[]<>\'§', { action: 'edit' } 
);
assert.equal( href, 
'/w/index.php?action=edit#.2B.26.3D:.3B.40.24-_..21.2A.2F.5B.5D.3C.3E.27.C2.A7',
 'fragment with various characters' );
+
+   mw.config.set( 'wgFragmentMode', [ 'html5' ] );
+   href = util.getUrl( '#+&=:;@$-_.!*/[]<>\'§', { action: 'edit' } 
);
+   assert.equal( href, 
'/w/index.php?action=edit#+&=:;@$-_.!*/[]<>\'§', 'fragment with various 
characters' );
} );
 
QUnit.test( 'wikiScript', function ( assert ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Blackout[master]: Bump version number for Blackout

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404071 )

Change subject: Bump version number for Blackout
..


Bump version number for Blackout

On Ie0279e93 was converted to extension registration but we forgot to
bump the version number there.

Change-Id: I226b0ab88c32134f4e128881df98bbaa2842030c
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 782d14f..7886bd4 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Blackout",
-   "version": "1.1.20120118",
+   "version": "1.2",
"author": [
"[https://www.mediawiki.org/wiki/User:Johnduhart John Du Hart]",
"[https://www.mediawiki.org/wiki/User:Varnent Gregory Varnum]"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I226b0ab88c32134f4e128881df98bbaa2842030c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Blackout
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Johnduhart 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: Varnent 
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/commit-message-validator[master]: Use forward slash as the path separator for git hook command...

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404069 )

Change subject: Use forward slash as the path separator for git hook command on 
Windows
..


Use forward slash as the path separator for git hook command on Windows

Bug: T184845
Change-Id: Iedcc4ab028f0f3d6a0d5e4f19151ba28cf536954
---
M commit_message_validator/__init__.py
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
index cf15256..8166fee 100644
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -280,6 +280,8 @@
 def install():
 """Install post-commit git hook."""
 cmd = sys.executable + ' ' + __file__
+if os.name == 'nt':  # T184845
+cmd = cmd.replace('\\', '/')
 print('Will install a git hook that runs: %s' % cmd)
 git_dir = check_output(['git', 'rev-parse', '--git-dir']).strip()
 path = os.path.join(git_dir, 'hooks', 'post-commit')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iedcc4ab028f0f3d6a0d5e4f19151ba28cf536954
Gerrit-PatchSet: 3
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Remove $user from Helpers::OresUiEnabled()

2018-01-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403959 )

Change subject: Remove $user from Helpers::OresUiEnabled()
..


Remove $user from Helpers::OresUiEnabled()

It's not needed anymore as we removed beta feature check altogether

Bug: T184554
Change-Id: Ied075ea942bc0ae94b9ec630711afffa9a37f049
---
M includes/Hooks.php
M includes/Hooks/ChangesListHooksHandler.php
M includes/Hooks/ContributionsHooksHandler.php
M includes/Hooks/Helpers.php
M includes/Hooks/PreferencesHookHandler.php
5 files changed, 15 insertions(+), 22 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index 73822a1..4601c82 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -118,7 +118,7 @@
 * @param Skin &$skin
 */
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
-   if ( !Helpers::oresUiEnabled( $out->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index f98b17d..1480931 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -36,7 +36,7 @@
public static function onChangesListSpecialPageStructuredFilters(
ChangesListSpecialPage $clsp
) {
-   if ( !Helpers::oresUiEnabled( $clsp->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -374,9 +374,9 @@
$name, array &$tables, array &$fields, array &$conds,
array &$query_options, array &$join_conds, FormOptions $opts
) {
-   global $wgUser, $wgRequest;
+   global $wgRequest;
 
-   if ( !Helpers::oresUiEnabled( $wgUser ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -410,7 +410,7 @@
RCCacheEntry $rcObj,
array &$classes
) {
-   if ( !Helpers::oresUiEnabled( $ecl->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -429,7 +429,7 @@
array &$data,
RCCacheEntry $rcObj
) {
-   if ( !Helpers::oresUiEnabled( $ecl->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -476,7 +476,7 @@
RecentChange $rc,
array &$classes = []
) {
-   if ( !Helpers::oresUiEnabled( $changesList->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
diff --git a/includes/Hooks/ContributionsHooksHandler.php 
b/includes/Hooks/ContributionsHooksHandler.php
index 3b1f989..dfad764 100644
--- a/includes/Hooks/ContributionsHooksHandler.php
+++ b/includes/Hooks/ContributionsHooksHandler.php
@@ -36,7 +36,7 @@
ContribsPager $pager,
&$query
) {
-   if ( !Helpers::oresUiEnabled( $pager->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -55,7 +55,7 @@
$row,
array &$flags
) {
-   if ( !Helpers::oresUiEnabled( $context->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -84,7 +84,7 @@
$row,
array &$classes
) {
-   if ( !Helpers::oresUiEnabled( $pager->getUser() ) ) {
+   if ( !Helpers::oresUiEnabled() ) {
return;
}
 
@@ -113,7 +113,7 @@
SpecialContributions $page,
array &$filters
) {
-   if ( !Helpers::oresUiEnabled( $page->getUser() ) || 
!Helpers::isModelEnabled( 'damaging' ) ) {
+   if ( !Helpers::oresUiEnabled() || !Helpers::isModelEnabled( 
'damaging' ) ) {
return;
}
 
diff --git a/includes/Hooks/Helpers.php b/includes/Hooks/Helpers.php
index fba1106..4a90337 100644
--- a/includes/Hooks/Helpers.php
+++ b/includes/Hooks/Helpers.php
@@ -109,7 +109,7 @@
public static function isDamagingFlagEnabled( IContextSource $context ) 
{
$user = $context->getUser();
 
-   if ( !self::oresUiEnabled( $user ) ) {
+   if ( !self::oresUiEnabled() ) {
return false;
}
 
@@ -148,19 +148,12 @@
/**
 * Check whether ores is enabled
 *
-* @param User $user
 * @return bool
 

[MediaWiki-commits] [Gerrit] mediawiki...Blackout[master]: Bump version number for Blackout

2018-01-13 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404071 )

Change subject: Bump version number for Blackout
..

Bump version number for Blackout

On Ie0279e93 was converted to extension registration but we forgot to
bump the version number there.

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I226b0ab88c32134f4e128881df98bbaa2842030c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Blackout
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
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...ContentTranslation[wmf/1.31.0-wmf.16]: CX1: Fix translation view UI overlaps

2018-01-13 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404070 )

Change subject: CX1: Fix translation view UI overlaps
..

CX1: Fix translation view UI overlaps

- Integrate infobar messages into main piece of content, matching the
width of header after Id77aa5be3e80.
- Fix inaccessible publish target namespace menu.

Bug: T184662
Bug: T184130
Change-Id: Ic391b24d880bbd314c8fd5dafb583ec98a25bbd2
(cherry picked from commit 4c082cc2819cc6fd1ca8e8654937508a12406e2d)
---
M modules/ui/legacy/styles/mw.cx.ui.Header.less
M modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less
M modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less
M modules/ui/styles/mw.cx.ui.Infobar.less
M modules/widgets/common/ext.cx.common.less
5 files changed, 16 insertions(+), 6 deletions(-)


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

diff --git a/modules/ui/legacy/styles/mw.cx.ui.Header.less 
b/modules/ui/legacy/styles/mw.cx.ui.Header.less
index 3502669..d2ad30c 100644
--- a/modules/ui/legacy/styles/mw.cx.ui.Header.less
+++ b/modules/ui/legacy/styles/mw.cx.ui.Header.less
@@ -16,7 +16,7 @@
 }
 
 .cx-header:not( .cx-header--dashboard ) > .cx-header__main {
-   padding: 10px;
+   padding: @personal-header-padding;
 }
 
 .cx-header__trademark {
@@ -106,7 +106,7 @@
 
 .cx-header__main,
 .cx-header__trademark {
-   min-height: 2.5em;
+   min-height: @personal-header-height;
 }
 
 .cx-header__main:after {
@@ -136,6 +136,10 @@
@media only screen and ( max-width: ( @very-narrow - 1px ) ) {
padding: 10px 12px 0;
}
+}
+
+.cx-header-infobar {
+   .mw-ui-two-thirds;
 }
 
 .cx-header__bar-container {
@@ -197,6 +201,7 @@
left: 0;
 
width: 66.666%;
+   height: @header-bar-height-legacy;
padding: 0;
.box-shadow( 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ) );
 
diff --git a/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less 
b/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less
index fa6ec82..0fcece6 100644
--- a/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less
+++ b/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less
@@ -2,15 +2,15 @@
 
 .cx-column--tools {
.mw-ui-one-whole(@palm);
+   .stick-to-side;
 
background-color: @colorGray14;
min-height: 100vh;
-   position: relative;
-   top: -@header-bar-height-legacy;
+   top: @personal-header-height + 2 * @personal-header-padding;
border-left: 1px solid @colorGray12;
 
&.sticky {
-   .stick-to-side;
+   top: 0;
 
@media @palm {
.stick-to-bottom;
diff --git a/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less 
b/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less
index 2c7b5e2..ea4d579 100644
--- a/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less
+++ b/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less
@@ -1,6 +1,10 @@
 @import '../../../widgets/common/ext.cx.common.less';
 @import '../../../widgets/common/ext.cx.highlight.less';
 
+.cx-column.cx-column--translation {
+   z-index: auto;
+}
+
 .cx-column--translation {
[contenteditable] {
outline: 0;
diff --git a/modules/ui/styles/mw.cx.ui.Infobar.less 
b/modules/ui/styles/mw.cx.ui.Infobar.less
index 516e57d..bba6d92 100644
--- a/modules/ui/styles/mw.cx.ui.Infobar.less
+++ b/modules/ui/styles/mw.cx.ui.Infobar.less
@@ -1,6 +1,5 @@
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-header-infobar {
-   .mw-ui-item;
.mw-ui-one-whole;
 }
diff --git a/modules/widgets/common/ext.cx.common.less 
b/modules/widgets/common/ext.cx.common.less
index b6b9bd3..884d81c 100644
--- a/modules/widgets/common/ext.cx.common.less
+++ b/modules/widgets/common/ext.cx.common.less
@@ -17,6 +17,8 @@
 @max-dashboard-width: 1500px;
 
 @header-bar-height-legacy: 40px;
+@personal-header-height: 2.5em;
+@personal-header-padding: 0.625em;
 
 .box-shadow-card() {
.box-shadow( 0 1px 1px rgba( 0, 0, 0, 0.15 ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic391b24d880bbd314c8fd5dafb583ec98a25bbd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: wmf/1.31.0-wmf.16
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Petar.petkovic 

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


[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Use forward slash as the path separator for git hook on Windows

2018-01-13 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404069 )

Change subject: Use forward slash as the path separator for git hook on Windows
..

Use forward slash as the path separator for git hook on Windows

Bug: T184845
Change-Id: Iedcc4ab028f0f3d6a0d5e4f19151ba28cf536954
---
M commit_message_validator/__init__.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/commit-message-validator 
refs/changes/69/404069/1

diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
index cf15256..6518c01 100644
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -280,6 +280,7 @@
 def install():
 """Install post-commit git hook."""
 cmd = sys.executable + ' ' + __file__
+cmd = cmd.replace('\\', '/')  # T184845
 print('Will install a git hook that runs: %s' % cmd)
 git_dir = check_output(['git', 'rev-parse', '--git-dir']).strip()
 path = os.path.join(git_dir, 'hooks', 'post-commit')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedcc4ab028f0f3d6a0d5e4f19151ba28cf536954
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: Dalba 

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