[MediaWiki-commits] [Gerrit] Flexiskin not working with WikiFarming - change (mediawiki...BlueSpiceExtensions)

2016-01-06 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: Flexiskin not working with WikiFarming
..


Flexiskin not working with WikiFarming

Built in some checks for WikiFarming. If WikiFarming is active, Flexiskin will 
use the right paths, now.

Change-Id: I6534be8ddf6205c1cb916f5bf9db8e8f8e9c1dcb
---
M Flexiskin/Flexiskin.class.php
M Flexiskin/Flexiskin.setup.php
2 files changed, 40 insertions(+), 26 deletions(-)

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



diff --git a/Flexiskin/Flexiskin.class.php b/Flexiskin/Flexiskin.class.php
old mode 100644
new mode 100755
index e4f8912..dcde1d7
--- a/Flexiskin/Flexiskin.class.php
+++ b/Flexiskin/Flexiskin.class.php
@@ -95,7 +95,7 @@
if ( $bIsTemp ) {
$this->getRequest()->setSessionData( 
"sPreviewSkin", $sFlexiskin );
$sPreviewSkin = $sFlexiskin;
-   //or just unset it
+   //or just unset it
} else {
$this->getRequest()->setSessionData( 
"sPreviewSkin", NULL );
$sPreviewSkin = false;
@@ -139,10 +139,14 @@
 
$sFilePath = BsFileSystemHelper::getDataPath("flexiskin/" . 
$sFlexiskinId);
$sFilePath .= "/screen" . ($bIsTemp ? '.' . $sPreviewTimestamp 
. '.tmp' : '') . ".less";
-   $sFilePath = str_replace($wgScriptPath, "..", $sFilePath);
+   if(defined('WIKI_FARMING')) {
+   $sFilePath = '../..' . $sFilePath;
+   } else {
+   $sFilePath = str_replace($wgScriptPath, "..", 
$sFilePath);
+   }
 
if ( !isset( $wgResourceModules['skins.bluespiceskin'] ) ||
-   !isset( 
$wgResourceModules['skins.bluespiceskin']['styles'] ) ) {
+   !isset( 
$wgResourceModules['skins.bluespiceskin']['styles'] ) ) {
return false;
}
foreach ( $wgResourceModules['skins.bluespiceskin']['styles'] 
as $iIndex => $sStylePath ) {
@@ -168,18 +172,18 @@
}
 
$api = new ApiMain(
-   new DerivativeRequest(
+   new DerivativeRequest(
$this->getRequest(), array(
-   'action' => 'flexiskin',
-   'type' => 'get'
-   ), false
-   ), true
+   'action' => 'flexiskin',
+   'type' => 'get'
+   ), false
+   ), true
);
$oResult = $api->execute();
$aData = $api->getResultData();
$aResult = array( 'options' => array(
-   wfMessage( 'bs-flexiskin-defaultname' 
)->plain() => 'default',
-   ) );
+   wfMessage( 'bs-flexiskin-defaultname' )->plain() => 
'default',
+   ) );
if ( isset( $aData['flexiskin'] ) && count( $aData['flexiskin'] 
) > 0 ) {
foreach ( $aData['flexiskin'] as $aConf ) {
$aResult['options'][$aConf['flexiskin_name']] = 
$aConf['flexiskin_id'];
@@ -219,10 +223,15 @@
public static function generateScreenFile($bIsTmp = false){
$sPreviewTimestamp = 
RequestContext::getMain()->getRequest()->getSessionData( 'PreviewTimestamp' );
$aScreenFile = array();
-   $aScreenFile[] = "@import 
'../../../../skins/BlueSpiceSkin/resources/variables.less';";
+   if(defined('WIKI_FARMING')) {
+   $sPathPrefix = '../../../../..';
+   } else {
+   $sPathPrefix = '../../../..';
+   }
+   $aScreenFile[] = "@import 
'{$sPathPrefix}/skins/BlueSpiceSkin/resources/variables.less';";
$aScreenFile[] = "@import 'variables.".($bIsTmp ? 
$sPreviewTimestamp . ".tmp." : "")."less';";
-   $aScreenFile[] = "@import 
'../../../../skins/BlueSpiceSkin/resources/screen.layout.less';";
-   $aScreenFile[] = "@import 
'../../../../skins/BlueSpiceSkin/resources/components.less';";
+   $aScreenFile[] = "@import 
'{$sPathPrefix}/skins/BlueSpiceSkin/resources/screen.layout.less';";
+   $aScreenFile[] = "@import 
'{$sPathPrefix}/skins/BlueSpiceSkin/resources/components.less';";
return implode("\n", $aScreenFile);
}
 
@@ -231,7 +240,12 @@
if ( !is_array( $aConfigs ) ) {
$aConfigs = FormatJson::decode( $aConfigs );
}
-   $aFile[] = '@bs-skin-path: 
"../../../../skins/BlueSpiceSkin/

[MediaWiki-commits] [Gerrit] Integration into Special:Upload - change (mediawiki...NSFileRepo)

2016-01-06 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: Integration into Special:Upload
..


Integration into Special:Upload

Added input fields on Special:Upload to allow a more easy upload to a
namespace (no need to type in namespace prefix manually)

Change-Id: I5d256d23ed352562b0bd24d5512cc6a8365eb579
---
M NSFileRepo.hooks.php
M NSFileRepo.php
M i18n/nsfilerepo/en.json
M i18n/nsfilerepo/qqq.json
A resources/ext.nsfilerepo.special.upload.js
5 files changed, 188 insertions(+), 24 deletions(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  Raimond Spekking: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/NSFileRepo.hooks.php b/NSFileRepo.hooks.php
index cc71060..2e4b40e 100644
--- a/NSFileRepo.hooks.php
+++ b/NSFileRepo.hooks.php
@@ -3,17 +3,36 @@
 class NSFileRepoHooks {
 
/**
-   * Initial setup, add .i18n. messages from 
$IP/extensions/DiscussionThreading/DiscussionThreading.i18n.php
+   * Initial setup
 * @global array $wgLocalFileRepo
 */
public static function setup() {
global $wgLocalFileRepo;
+
+   if ( !function_exists('lockdownUserPermissionsErrors') ) {
+   die('You MUST load Extension Lockdown before NSFileRepo 
(http://www.mediawiki.org/wiki/Extension:Lockdown).');
+   }
+
$wgLocalFileRepo['class'] = "NSLocalRepo";
RepoGroup::destroySingleton();
}
 
/**
-* Check for Namespace in Title Line
+* Add JavaScript
+* @param OutputPage $out
+* @param Skin $skin
+* @return boolean true
+*/
+   public static function onBeforePageDisplay( &$out, &$skin ) {
+   if( $out->getTitle()->isSpecial( 'Upload' ) ) {
+   $out->addModules( 'ext.nsfilerepo.special.upload' );
+   }
+
+   return true;
+   }
+
+   /**
+* Check for Namespace in Title line
 * @param UploadForm $uploadForm
 * @return boolean
 */
@@ -67,21 +86,128 @@
 * @return boolean
 */
public static function onImgAuthBeforeStream( &$title, &$path, &$name, 
&$result ) {
-   global $wgContLang;
+   global $wgContLang;
 
-   # See if stored in a NS path
-   $subdirs = explode('/',$path);
-   $x = (!is_numeric($subdirs[1]) && ($subdirs[1] == "archive" || 
$subdirs[1] == "deleted" || $subdirs[1] == "thumb")) ? 2 : 1;
-   $x = ($x == 2 && $subdirs[1] == "thumb" && $subdirs[2] == "archive") ? 
3 : $x;
-   if ( strlen( $subdirs[$x] ) >= 3 && is_numeric( $subdirs[$x] )
-   && $subdirs[$x] >= 100 )
-   {
-   $title = Title::makeTitleSafe( NS_FILE, $wgContLang->getNsText( 
$subdirs[$x] ) . ":" . $name );
-   if( !$title instanceof Title ) {
-   $result = array( 'img-auth-accessdenied', 
'img-auth-badtitle', $name );
-   return false;
+   # See if stored in a NS path
+   $subdirs = explode('/',$path);
+   $x = (!is_numeric($subdirs[1]) && ($subdirs[1] == "archive" || 
$subdirs[1] == "deleted" || $subdirs[1] == "thumb")) ? 2 : 1;
+   $x = ($x == 2 && $subdirs[1] == "thumb" && $subdirs[2] == 
"archive") ? 3 : $x;
+   if ( strlen( $subdirs[$x] ) >= 3 && is_numeric( $subdirs[$x] )
+   && $subdirs[$x] >= 100 )
+   {
+   $title = Title::makeTitleSafe( NS_FILE, 
$wgContLang->getNsText( $subdirs[$x] ) . ":" . $name );
+   if( !$title instanceof Title ) {
+   $result = array( 'img-auth-accessdenied', 
'img-auth-badtitle', $name );
+   return false;
+   }
}
+   return true;
}
-   return true;
-}
+
+   /**
+* Add fields to Special:Upload
+* @param array $descriptor
+* @return boolean
+*/
+   public static function onUploadFormInitDescriptor( &$descriptor ) {
+   $sSelectedNamespace = '';
+   //wpDestFile is set on query string. e.g after click on redlink 
or on re-upload
+   if( !empty( $descriptor['DestFile']['default'] ) ) {
+   $oTarget = Title::newFromText( 
$descriptor['DestFile']['default'] );
+   $descriptor['DestFile']['default'] = 
$oTarget->getText();
+   $sSelectedNamespace = $oTarget->getNsText();
+   }
+
+   $aNamespaces = self::getPossibleNamespaces();
+   $aOptions = array(
+   wfMessage('nsfilerepo-nsmain')->plain() => ''
+   );
+   foreach($aNamespaces as $iNsId => $sNsText ) {
+   if( $iNsId === NS_MAIN ) {
+  

[MediaWiki-commits] [Gerrit] Stop using $wgTitle, no need to be the global - change (mediawiki...BlueSpiceFoundation)

2016-01-06 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: Stop using $wgTitle, no need to be the global
..


Stop using $wgTitle, no need to be the global

Change-Id: I17d31515187c6a88f85ed9c16ecf8e9a9f2c3014
---
M maintenance/RenameCategories.php
M maintenance/massedit.php
2 files changed, 39 insertions(+), 39 deletions(-)

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



diff --git a/maintenance/RenameCategories.php b/maintenance/RenameCategories.php
index 9d30a8a..dffa543 100644
--- a/maintenance/RenameCategories.php
+++ b/maintenance/RenameCategories.php
@@ -78,12 +78,12 @@
 # The following part is copied from hw_massedit.php
 # -- snip -
 
-/* 
-This script is used to do mass edits on Mediawiki articles. Articles are 
selected via 
+/*
+This script is used to do mass edits on Mediawiki articles. Articles are 
selected via
 - namespace
 - content via exclusion or inclusion regex
 - title via regex
-( 
+(
   - category
 )
 Article text can be appended or replaced based on regular expressions.
@@ -115,14 +115,14 @@
 $autoSummary = false;
 $noRC = true;
 
-//$text_exclude = array(   
-// '/\[\[Kategorie:Englisch\]\]/', 
+//$text_exclude = array(
+// '/\[\[Kategorie:Englisch\]\]/',
 // '/\[\[Category:Translation\]\]/'
 //  );
 //$text_include = array(
 // '/test test/'
 // );
-//$namespace_include = array( 10 ); 
+//$namespace_include = array( 10 );
 //$namespace_exclude = array( NS_IMAGE, NS_IMAGE_TALK, NS_MEDIAWIKI, 
NS_MEDIAWIKI_TALK );
 //$title_include = array( '/Datev/', '/Hauptseite/' );
 //$title_include = array( '|NZ/.*?|' );
@@ -181,7 +181,7 @@
 $namespace = array();
 if (isset($namespace_include)) { $token = 'IN '; $namespace = 
$namespace_include; }
 if (isset($namespace_exclude)) { $token = 'NOT IN '; $namespace = 
$namespace_exclude; }
-if ($token) $qry_ns = 'page_namespace '.$token.' ("'.implode('","', 
$namespace).'")'; 
+if ($token) $qry_ns = 'page_namespace '.$token.' ("'.implode('","', 
$namespace).'")';
 
 $dbw =& wfGetDB( DB_MASTER );
 $res = $dbw->select('page', 'page_title, page_namespace, page_id', $qry_ns, 
'Database::select', array('order by' => 'page_title'));
@@ -195,34 +195,34 @@
 
 while ($row = mysql_fetch_array($res->result))
 {
-   
+
$cur_title = $row['page_title'];
$cur_title_ns = MWNamespace::getCanonicalName($row['page_namespace']);
-   $cur_title_ns = ($cur_title_ns) ? "$cur_title_ns:" : ""; 
+   $cur_title_ns = ($cur_title_ns) ? "$cur_title_ns:" : "";
print 
"$cur_title_ns$cur_title\n===\n";
 
// Title conditions
$title_conds = array();
if (isset($title_include)) { $title_conds = $title_include; $match = 
true; }
-   if (isset($title_exclude)) { $title_conds = $title_exclude; $match = 
false; }   
+   if (isset($title_exclude)) { $title_conds = $title_exclude; $match = 
false; }
$skip = true;
foreach ($title_conds as $cond)
if (preg_match($cond, $cur_title)==$match) $skip = false;
if ((isset($title_include) || isset($title_exclude)) && ($skip))
{
print "Skipped based on title exclude condition.\n";
-   continue;   
+   continue;
}
-   
+
// Check title for validity
-   $wgTitle = Title::makeTitle( $row['page_namespace'], $cur_title );
-   if ( !$wgTitle ) {
+   $title = Title::makeTitle( $row['page_namespace'], $cur_title );
+   if ( !$title ) {
print "Invalid title\n";
continue;
}
-   
+
// Fetch text
-   $article = new Article( $wgTitle );
+   $article = new Article( $title );
$article->fetchContent();
$text = $article->getContent() ;
if ($text == '') echo 'empty!';
@@ -241,14 +241,14 @@
}
 
// this part is for text modification only (append, prefix, delete, 
replace)
-   if (in_array($mode, array('append','prefix','delete','replace'))) 
+   if (in_array($mode, array('append','prefix','delete','replace')))
{
# Modify the text
$old_text = $text;
-   
-   if ($mode == 'append') 
+
+   if ($mode == 'append')
$text .= $append_text;
-   else if ($mode == 'prefix') 
+   else if ($mode == 'prefix')
$text = $prefix_text.$text;
else if ($mode == 'delete')
{
@@ -258,7 +258,7 @@
{
$text = preg_replace($replace_sear

[MediaWiki-commits] [Gerrit] Add tests for "missing-language" errors from EditEntity - change (mediawiki...Wikibase)

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

Change subject: Add tests for "missing-language" errors from EditEntity
..


Add tests for "missing-language" errors from EditEntity

As asked for by the todo

Change-Id: Id62ae64cf1b1c6be8b4af56d04e69fb80be90c0a
---
M repo/tests/phpunit/includes/api/EditEntityTest.php
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/repo/tests/phpunit/includes/api/EditEntityTest.php 
b/repo/tests/phpunit/includes/api/EditEntityTest.php
index b22cad3..0a3417d 100644
--- a/repo/tests/phpunit/includes/api/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/api/EditEntityTest.php
@@ -519,7 +519,18 @@
. 
TermTestHelper::makeOverlyLongString() . '"}}}'
),
'e' => array( 'exception' => array( 'type' => 
'UsageException' ) ) ),
-   //@todo add check for bug T54731 once fixed
+   'missing language in labels (T54731)' => array(
+   'p' => array(
+   'site' => 'enwiki',
+   'title' => 'Berlin',
+   'data' => 
'{"labels":{"de":{"site":"pt","title":"TestString"}}}'
+   ),
+   'e' => array( 'exception' => array(
+   'type' => 'UsageException',
+   'code' => 'missing-language',
+   'message' => '\'language\' was not 
found in the label or description json for de'
+   ) )
+   ),
'removing invalid claim fails' => array(
'p' => array(
'site' => 'enwiki',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id62ae64cf1b1c6be8b4af56d04e69fb80be90c0a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Whitelist Mr. Stradivarius - change (integration/config)

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

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

Change subject: Whitelist Mr. Stradivarius
..

Whitelist Mr. Stradivarius

Change-Id: I524e8bf9d0e01902bdc27089326f5ddde31c4ecc
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/68/262868/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a3cf952..476bbca 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -132,6 +132,7 @@
 | matanya\.moses@gmail\.com
 | matma\.rex@gmail\.com
 | maxsem\.wiki@gmail\.com
+| misterstrad@gmail\.com
 | mjbmri@gmail\.com
 | mlazowik@gmail\.com
 | moriel@gmail\.com
@@ -364,6 +365,7 @@
- ^matanya\.moses@gmail\.com$
- ^matanya@foss\.co\.il$
- ^matma\.rex@gmail\.com$
+   - ^misterstrad@gmail\.com$ # Mr. Stradivarius
- ^mjbmri@gmail\.com$
- ^mlazowik@gmail\.com$
- ^nilesh@nileshc\.com$

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

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

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


[MediaWiki-commits] [Gerrit] Make base engine more robust and send debugging info through... - change (thumbor/base-engine)

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

Change subject: Make base engine more robust and send debugging info through 
exception
..


Make base engine more robust and send debugging info through exception

In case of an earlier failure, the temp files might not exist
and there's no reason to error on the attempt to delete them.
Sending the command and its outputs through the exception
helps debugging because those then show up in Sentry.

Change-Id: I7d5d1b8f6e720a461135b313809b597c7e3adf66
---
M wikimedia_thumbor_base_engine/__init__.py
1 file changed, 19 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikimedia_thumbor_base_engine/__init__.py 
b/wikimedia_thumbor_base_engine/__init__.py
index 508c3d4..5f43ba5 100644
--- a/wikimedia_thumbor_base_engine/__init__.py
+++ b/wikimedia_thumbor_base_engine/__init__.py
@@ -11,12 +11,22 @@
 
 # Base engine, not to be used directly, has to be extended
 
+import errno
 import os
 import subprocess
 from tempfile import NamedTemporaryFile
 
 from thumbor.engines.pil import Engine as PilEngine
 from thumbor.utils import logger
+
+
+def rm_f(path):
+"""Remove a file if it exists."""
+try:
+os.unlink(path)
+except OSError as e:
+if e.errno != errno.ENOENT:
+raise
 
 
 class BaseWikimediaEngine(PilEngine):
@@ -45,8 +55,8 @@
 self.source.close()
 
 def cleanup_temp_files(self):
-os.remove(self.source.name)
-os.remove(self.destination.name)
+rm_f(self.source.name)
+rm_f(self.destination.name)
 
 def exec_command(self, command):
 self.command(command)
@@ -96,6 +106,12 @@
 
 if p.returncode != 0:
 self.cleanup_temp_files()
-raise Exception('CommandError')
+raise Exception(
+'CommandError',
+wrapped_command,
+stdout,
+stderr,
+p.returncode
+)
 
 return stdout

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d5d1b8f6e720a461135b313809b597c7e3adf66
Gerrit-PatchSet: 8
Gerrit-Project: thumbor/base-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Reuse Language objects - change (mediawiki...Translate)

2016-01-06 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Reuse Language objects
..

Reuse Language objects

* Generate anyway needed Language objects earlier.
* Use getHtmlCode() instead of wfBCP47() where possible.
* Avoid wfGetLangObj for Language objects.

Change-Id: I0c4177cb029e16fd6357914096a66c4b50c8ec14
---
M specials/SpecialSearchTranslations.php
M utils/MessageWebImporter.php
M utils/TranslationHelpers.php
3 files changed, 11 insertions(+), 9 deletions(-)


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

diff --git a/specials/SpecialSearchTranslations.php 
b/specials/SpecialSearchTranslations.php
index eac869d..bfd4c74 100644
--- a/specials/SpecialSearchTranslations.php
+++ b/specials/SpecialSearchTranslations.php
@@ -218,10 +218,11 @@
'dir' => 'ltr',
);
 
+   $language = Language::factory( $document['language'] );
$textAttribs = array(
'class' => 'row tux-text',
-   'lang' => wfBCP47( $document['language'] ),
-   'dir' => Language::factory( 
$document['language'] )->getDir(),
+   'lang' => $language->getHtmlCode(),
+   'dir' => $language->getDir(),
);
 
$resultsHtml = $resultsHtml
diff --git a/utils/MessageWebImporter.php b/utils/MessageWebImporter.php
index ec9c968..5005008 100644
--- a/utils/MessageWebImporter.php
+++ b/utils/MessageWebImporter.php
@@ -526,8 +526,8 @@
$legendParams = array( 'class' => 'mw-tpt-sp-legend' );
$contentParams = array( 'class' => 'mw-tpt-sp-content' );
if ( $lang ) {
-   $contentParams['dir'] = wfGetLangObj( $lang )->getDir();
-   $contentParams['lang'] = wfGetLangObj( $lang 
)->getCode();
+   $contentParams['dir'] = $lang->getDir();
+   $contentParams['lang'] = $lang->getCode();
}
 
$output = Html::rawElement( 'div', $containerParams,
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index a690f29..1a1d19d 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -367,10 +367,11 @@
continue;
}
 
+   $fbLanguage = Language::factory( $fbcode );
$context = RequestContext::getMain();
$label = TranslateUtils::getLanguageName( $fbcode, 
$context->getLanguage()->getCode() ) .
$context->msg( 'word-separator' )->text() .
-   $context->msg( 'parentheses', wfBCP47( $fbcode 
) )->text();
+   $context->msg( 'parentheses', 
$fbLanguage->getHtmlCode() )->text();
 
$target = Title::makeTitleSafe( $ns, "$page/$fbcode" );
if ( $target ) {
@@ -385,11 +386,11 @@
$display = TranslateUtils::convertWhiteSpaceToHTML( 
$text );
$display = Html::rawElement( 'div', array(
'lang' => $fbcode,
-   'dir' => Language::factory( $fbcode 
)->getDir() ),
+   'dir' => $fbLanguage->getDir() ),
$display
);
 
-   $contents = self::legend( $label ) . "\n" . 
$this->adder( $id, $fbcode ) .
+   $contents = self::legend( $label ) . "\n" . 
$this->adder( $id, $fbLanguage ) .
$display . self::clear();
 
$boxes[] = Html::rawElement( 'div', $params, $contents 
) .
@@ -583,7 +584,7 @@
 
/**
 * @param string $source jQuery selector for element containing the 
source
-* @param string|Language $lang Language code or object
+* @param Language $lang Language object
 * @return string
 */
public function adder( $source, $lang ) {
@@ -592,7 +593,7 @@
}
$target = self::jQueryPathId( $this->getTextareaId() );
$source = self::jQueryPathId( $source );
-   $dir = wfGetLangObj( $lang )->getDir();
+   $dir = $lang->getDir();
$params = array(
'onclick' => 
"jQuery($target).val(jQuery($source).text()).focus(); return false;",
'href' => '#',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c4177

[MediaWiki-commits] [Gerrit] Fix various ordering issues - change (mediawiki/vagrant)

2016-01-06 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Fix various ordering issues
..

Fix various ordering issues

* Add a mechanism for certain wikis to run first in foreachwiki
  I was seeing an issue where cirrustestwiki ran before commonswiki
  on the initial update.php.  It failed because it depended on a
  global table that commonswiki creates in its first update.php run.

* Add a couple additional dependencies to control ordering.
  E.g. make sure all settings are in place before update.php is run.

* Fix foreachwiki call for AntiSpoof (pre-existing issue shown
  by the foreachwiki error handling fix in parent commit)

Change-Id: I719ae21c27de410cf477eeafb20c86e278e7525a
---
M puppet/hieradata/common.yaml
M puppet/manifests/site.pp
A puppet/modules/mediawiki/files/multiwiki/priority-empty/README
M puppet/modules/mediawiki/manifests/import/text.pp
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/multiwiki.pp
M puppet/modules/mediawiki/manifests/wiki.pp
M puppet/modules/mediawiki/templates/docroot/w/dblist.php.erb
M puppet/modules/role/manifests/antispoof.pp
M puppet/modules/role/manifests/commons.pp
10 files changed, 55 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/66/262866/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index af91aa7..c25e9b1 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -217,6 +217,7 @@
 
 mediawiki::multiwiki::base_domain: '.wiki.local.wmftest.net'
 mediawiki::multiwiki::script_dir: "%{hiera('mediawiki::apache::docroot')}/w"
+mediawiki::multiwiki::wiki_priority_dir: 
"%{hiera('mediawiki::settings_dir')}/priority"
 mediawiki::multiwiki::settings_root: 
"%{hiera('mediawiki::settings_dir')}/wikis"
 
 mediawiki::parsoid::dir: "%{hiera('mwv::services_dir')}/parsoid"
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index fe6ae67..e67bd18 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -16,7 +16,7 @@
 
 # Human-readable constants which may be used in lieu of literal numbers
 # for specifying loading priority of resource types which support this
-# notion (like mediawiki::extension and mediawiki::settings).
+# notion (like mediawiki::extension, mediawiki::settings, and mediawiki::wiki).
 $LOAD_FIRST  = 0
 $LOAD_EARLY  = 5
 $LOAD_NORMAL = 10
diff --git a/puppet/modules/mediawiki/files/multiwiki/priority-empty/README 
b/puppet/modules/mediawiki/files/multiwiki/priority-empty/README
new file mode 100644
index 000..14ab691
--- /dev/null
+++ b/puppet/modules/mediawiki/files/multiwiki/priority-empty/README
@@ -0,0 +1,4 @@
+This directory is managed by Puppet.
+
+The purpose is to control the ordering of the various wikis for scripts that
+act on all of them.
diff --git a/puppet/modules/mediawiki/manifests/import/text.pp 
b/puppet/modules/mediawiki/manifests/import/text.pp
index 240949f..3583eb3 100644
--- a/puppet/modules/mediawiki/manifests/import/text.pp
+++ b/puppet/modules/mediawiki/manifests/import/text.pp
@@ -64,11 +64,13 @@
 require => [
 Mediawiki::Wiki[$wiki],
 Exec["${db_name}_copy_LocalSettings"],
+Exec['update_all_databases'],
 ],
 }
 
 # Add extensions before importing text (bug T92036)
 MediaWiki::Extension <| |> -> Mediawiki::Import::Text <| |>
+
 # Run sql before importing text
 Mysql::Sql <| |> -> Mediawiki::Import::Text <| |>
 }
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 7501e8b..b7f2d95 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -190,6 +190,13 @@
 refreshonly => true,
 }
 
+# Make sure settings which will affect update_all_databases are
+# in place before it runs.
+Mediawiki::Settings <| |> -> Exec['update_all_databases']
+
+# Make sure all wikis are defined before it runs.
+Mediawiki::Wiki <| |> -> Exec['update_all_databases']
+
 php::composer::install { $dir:
 require => Git::Clone['mediawiki/core'],
 }
diff --git a/puppet/modules/mediawiki/manifests/multiwiki.pp 
b/puppet/modules/mediawiki/manifests/multiwiki.pp
index 1afcacd..d810fb1 100644
--- a/puppet/modules/mediawiki/manifests/multiwiki.pp
+++ b/puppet/modules/mediawiki/manifests/multiwiki.pp
@@ -16,12 +16,18 @@
 # [*script_dir*]
 #   Apache vhost document root.
 #
+# [*wiki_priority_dir*]
+#   The directory used to control wiki priority.  This is primarily
+#   intended for update_all_databases, but affects alldbs and all uses
+#   of foreachwiki
+#
 # [*settings_root*]
 #   Location of settings files.
 #
 class mediawiki::multiwiki(
 $base_domain,
 $script_dir,
+$wiki_priority_dir,
 $settings_root,
 ) {
 
@@ -151,6 +157,16 @@
  

[MediaWiki-commits] [Gerrit] Add gitreview - change (secrets/wikimetrics)

2016-01-06 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Add gitreview
..

Add gitreview

Change-Id: I9aa91bcc09fcd01f74c9d0be90b91395b01e9f0b
---
A .gitreview
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/secrets/wikimetrics 
refs/changes/65/262865/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..88b9bb7
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=secrets/wikimetrics.git

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aa91bcc09fcd01f74c9d0be90b91395b01e9f0b
Gerrit-PatchSet: 1
Gerrit-Project: secrets/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Fix parserTests after f66ff602447c - change (mediawiki/core)

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

Change subject: Fix parserTests after f66ff602447c
..


Fix parserTests after f66ff602447c

Change-Id: If3691cb022211e78093e1cbd36dbb76b6d5f674b
---
M tests/parser/parserTest.inc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Cscott: Looks good to me, approved
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index b91a5bc..6a6d447 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -962,7 +962,7 @@
'protected_titles', 'revision', 'text', 'pagelinks', 
'imagelinks',
'categorylinks', 'templatelinks', 'externallinks', 
'langlinks', 'iwlinks',
'site_stats', 'ipblocks', 'image', 'oldimage',
-   'recentchanges', 'watchlist', 'interwiki', 'logging',
+   'recentchanges', 'watchlist', 'interwiki', 'logging', 
'log_search',
'querycache', 'objectcache', 'job', 'l10n_cache', 
'redirect', 'querycachetwo',
'archive', 'user_groups', 'page_props', 'category'
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3691cb022211e78093e1cbd36dbb76b6d5f674b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TTO 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Cache engine selection for a given buffer - change (thumbor/proxy-engine)

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

Change subject: Cache engine selection for a given buffer
..


Cache engine selection for a given buffer

Change-Id: Ie265478f38b29b9af9a14577600399fc55cf569e
---
M wikimedia_thumbor_proxy_engine/__init__.py
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikimedia_thumbor_proxy_engine/__init__.py 
b/wikimedia_thumbor_proxy_engine/__init__.py
index dc52da4..938305b 100644
--- a/wikimedia_thumbor_proxy_engine/__init__.py
+++ b/wikimedia_thumbor_proxy_engine/__init__.py
@@ -40,6 +40,9 @@
 self.lcl[module] = klass(context)
 
 def select_engine(self):
+if self.lcl['selected_engine'] is not None:
+return self.lcl['selected_engine']
+
 for enginename in self.lcl['engines']:
 engine = self.lcl[enginename]
 try:
@@ -47,6 +50,7 @@
 self.lcl['extension'],
 self.lcl['buffer']
 ):
+self.lcl['selected_engine'] = enginename
 return enginename
 
 # Not implementing should_run means that the engine
@@ -54,6 +58,7 @@
 # This is required for the stock PIL engine to act as a
 # fallback.
 except AttributeError:
+self.lcl['selected_engine'] = enginename
 return enginename
 
 raise Exception(
@@ -67,6 +72,7 @@
 # buffer and extension are needed by select_engine
 self.lcl['extension'] = extension
 self.lcl['buffer'] = buffer
+self.lcl['selected_engine'] = None
 
 # Now that we'll select the right engine, let's initialize it
 self.lcl['context'].request_handler.set_header(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie265478f38b29b9af9a14577600399fc55cf569e
Gerrit-PatchSet: 2
Gerrit-Project: thumbor/proxy-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] OO.ui.Element: unsupport Internet Explorer 8 - change (oojs/ui)

2016-01-06 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: OO.ui.Element: unsupport Internet Explorer 8
..

OO.ui.Element: unsupport Internet Explorer 8

Courtesy of df1019c49d30b8c87b144ecfeea200684c5b4a73

Change-Id: Ia80fbb37d99d4f1c85d4264ab66175b22106c853
---
M src/Element.js
1 file changed, 4 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/64/262864/1

diff --git a/src/Element.js b/src/Element.js
index 9f5e015..6b770a5 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -317,9 +317,7 @@
  */
 OO.ui.Element.static.getWindow = function ( obj ) {
var doc = this.getDocument( obj );
-   // Support: IE 8
-   // Standard Document.defaultView is IE9+
-   return doc.parentWindow || doc.defaultView;
+   return doc.defaultView;
 };
 
 /**
@@ -434,14 +432,8 @@
  */
 OO.ui.Element.static.getBorders = function ( el ) {
var doc = el.ownerDocument,
-   // Support: IE 8
-   // Standard Document.defaultView is IE9+
-   win = doc.parentWindow || doc.defaultView,
-   style = win && win.getComputedStyle ?
-   win.getComputedStyle( el, null ) :
-   // Support: IE 8
-   // Standard getComputedStyle() is IE9+
-   el.currentStyle,
+   win = doc.defaultView,
+   style = win.getComputedStyle( el, null ),
$el = $( el ),
top = parseFloat( style ? style.borderTopWidth : $el.css( 
'borderTopWidth' ) ) || 0,
left = parseFloat( style ? style.borderLeftWidth : $el.css( 
'borderLeftWidth' ) ) || 0,
@@ -466,9 +458,7 @@
 OO.ui.Element.static.getDimensions = function ( el ) {
var $el, $win,
doc = el.ownerDocument || el.document,
-   // Support: IE 8
-   // Standard Document.defaultView is IE9+
-   win = doc.parentWindow || doc.defaultView;
+   win = doc.defaultView;
 
if ( win === el || el === doc.documentElement ) {
$win = $( win );

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

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

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


[MediaWiki-commits] [Gerrit] Fix parserTests after f66ff602447c - change (mediawiki/core)

2016-01-06 Thread TTO (Code Review)
TTO has uploaded a new change for review.

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

Change subject: Fix parserTests after f66ff602447c
..

Fix parserTests after f66ff602447c

Change-Id: If3691cb022211e78093e1cbd36dbb76b6d5f674b
---
M tests/parser/parserTest.inc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/262863/1

diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index b91a5bc..6a6d447 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -962,7 +962,7 @@
'protected_titles', 'revision', 'text', 'pagelinks', 
'imagelinks',
'categorylinks', 'templatelinks', 'externallinks', 
'langlinks', 'iwlinks',
'site_stats', 'ipblocks', 'image', 'oldimage',
-   'recentchanges', 'watchlist', 'interwiki', 'logging',
+   'recentchanges', 'watchlist', 'interwiki', 'logging', 
'log_search',
'querycache', 'objectcache', 'job', 'l10n_cache', 
'redirect', 'querycachetwo',
'archive', 'user_groups', 'page_props', 'category'
);

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

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

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


[MediaWiki-commits] [Gerrit] Revert "LogEntry: Make associated rev id persistent (store i... - change (mediawiki/core)

2016-01-06 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Revert "LogEntry: Make associated rev id persistent (store in 
logging and log_search)"
..

Revert "LogEntry: Make associated rev id persistent (store in logging and 
log_search)"

This reverts commit f66ff602447c200eef76cad55f195ff6c11954aa, which breaks 
parserTests.

Change-Id: I107036b9486d049638d4c93aab19aaafcf1d66b6
---
M includes/filerepo/file/LocalFile.php
M includes/logging/LogEntry.php
2 files changed, 10 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/262862/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index b7d6f98..5a6a8b2 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1399,7 +1399,6 @@
# Update memcache after the commit
$that->invalidateCache();
 
-   $updateLogPage = false;
if ( $newPageContent ) {
# New file page; create the description page.
# There's already a log entry, so don't make a 
second RC entry
@@ -1421,7 +1420,12 @@
if ( isset( $status->value['revision'] ) ) {
/** @var $rev Revision */
$rev = $status->value['revision'];
-   $updateLogPage = $rev->getPage();
+   $that->getRepo()->getMasterDB()->update(
+   'logging',
+   array( 'log_page' => 
$rev->getPage() ),
+   array( 'log_id' => $logId ),
+   __METHOD__
+   );
}
} else {
# Existing file page: invalidate description 
page cache
@@ -1431,32 +1435,7 @@
Article::purgePatrolFooterCache( $descId );
}
 
-   # Update associated rev id. This should be done by 
$logEntry->insert() earlier,
-   # but setAssociatedRevId() wasn't called at that point 
yet...
-   $logParams = $logEntry->getParameters();
-   $logParams['associated_rev_id'] = 
$logEntry->getAssociatedRevId();
-   $update = array( 'log_params' => 
LogEntryBase::makeParamBlob( $logParams ) );
-   if ( $updateLogPage ) {
-   # Also log page, in case where we just created 
it above
-   $update['log_page'] = $updateLogPage;
-   }
-   $that->getRepo()->getMasterDB()->update(
-   'logging',
-   $update,
-   array( 'log_id' => $logId ),
-   __METHOD__
-   );
-   $that->getRepo()->getMasterDB()->insert(
-   'log_search',
-   array(
-   'ls_field' => 'associated_rev_id',
-   'ls_value' => 
$logEntry->getAssociatedRevId(),
-   'ls_log_id' => $logId,
-   ),
-   __METHOD__
-   );
-
-   # Now that the log entry is up-to-date, make an RC 
entry.
+   # Now that the page exists, make an RC entry.
$logEntry->publish( $logId );
# Run hook for other updates (typically more cache 
purging)
Hooks::run( 'FileUpload', array( $that, $reupload, 
!$newPageContent ) );
diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php
index db588fd..773af27 100644
--- a/includes/logging/LogEntry.php
+++ b/includes/logging/LogEntry.php
@@ -213,12 +213,6 @@
/** @var User */
protected $performer;
 
-   /** @var array Parameters for log entry */
-   protected $params;
-
-   /** @var int A rev id associated to the log entry */
-   protected $revId = null;
-
/** @var bool Whether the parameters for this log entry are stored in 
new or old format. */
protected $legacy;
 
@@ -245,7 +239,7 @@
}
 
public function isLegacy() {
-   // This extracts the property
+   // This does the check
$this->getParameters();
return $this->legacy;
}
@@ -271,20 +265,9 @@

[MediaWiki-commits] [Gerrit] Remove unused $wgTitle global - change (mediawiki...GeoGebra)

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

Change subject: Remove unused $wgTitle global
..


Remove unused $wgTitle global

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

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



diff --git a/GeoGebra.body.php b/GeoGebra.body.php
index 247918a..0414528 100644
--- a/GeoGebra.body.php
+++ b/GeoGebra.body.php
@@ -49,7 +49,7 @@

 if(!count(self::$divs)) return true;
 
-global $wgTitle, $wgJsMimeType;
+global $wgJsMimeType;
 $out->addScript("\n");
 $scriptBody = "for(var key in window.ggbParams){
var c=window.ggbParams[key];
@@ -58,4 +58,4 @@
 $out->addScript("$scriptBody\n");
 return true;
   }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I072991df029b5aa41bb58426ca88915cc26aa1ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoGebra
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't call a hook parameter $wgTitle, it isn't - change (mediawiki...Favorites)

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

Change subject: Don't call a hook parameter $wgTitle, it isn't
..


Don't call a hook parameter $wgTitle, it isn't

Change-Id: I7f1b1277318e91121113aa34af3f77958532
---
M FavoritesHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/FavoritesHooks.php b/FavoritesHooks.php
index 7f0e138..d03f9db 100644
--- a/FavoritesHooks.php
+++ b/FavoritesHooks.php
@@ -89,7 +89,7 @@
return true;
}

-   public static function onPersonalUrls( &$personal_urls, &$wgTitle ) {
+   public static function onPersonalUrls( &$personal_urls, &$title ) {
global $wgFavoritesPersonalURL, $wgUser;

if ( $wgFavoritesPersonalURL && $wgUser->isLoggedIn() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f1b1277318e91121113aa34af3f77958532
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Favorites
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Stop using $wgTitle, EditPage already provides one - change (mediawiki...MsCatSelect)

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

Change subject: Stop using $wgTitle, EditPage already provides one
..


Stop using $wgTitle, EditPage already provides one

Also fix weird line endings while we're here

Change-Id: Ib8d59215efc45fd27ef3f314f8bd182c6a517f8d
---
M MsCatSelect.body.php
1 file changed, 79 insertions(+), 79 deletions(-)

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



diff --git a/MsCatSelect.body.php b/MsCatSelect.body.php
index 30a1070..940cf4b 100755
--- a/MsCatSelect.body.php
+++ b/MsCatSelect.body.php
@@ -1,79 +1,79 @@
-addModules( 'ext.MsCatSelect' );
-
-   // Make the configuration variables available to JavaScript
-   $mscsVars = array(
-   'MainCategories' => $wgMSCS_MainCategories,
-   'UseNiceDropdown' => $wgMSCS_UseNiceDropdown,
-   'WarnNoCategories' => $wgMSCS_WarnNoCategories,
-   'WarnNoCategoriesException' => str_replace( ' ', '_', 
$wgMSCS_WarnNoCategoriesException ),
-   );
-   $mscsVars = json_encode( $mscsVars, true );
-   $wgOut->addScript( "var mscsVars = $mscsVars;" 
);
-   return true;
-   }
-
-   // Entry point for the hook and main worker function for editing the 
page:
-   static function showHook( EditPage $editPage, OutputPage $output ) {
-   self::cleanTextbox( $editPage );
-   return true;
-   }
-
-   // Entry point for the hook and main worker function for saving the 
page:
-   static function saveHook( $editPage ) {
-   global $wgContLang, $wgTitle;
-
-   // Get localised namespace string
-   $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
-
-   // Default sort key is page name with stripped namespace name, 
otherwise sorting is ugly
-   if ( $wgTitle->getNamespace() == NS_MAIN ) {
-   $default_sortkey = "";
-   } else {
-   $default_sortkey = "|{{PAGENAME}}";
-   }
-
-   // Iterate through all selected category entries:
-   $text = "\n";
-   if ( array_key_exists( 'SelectCategoryList', $_POST ) ) {
-   foreach ( $_POST['SelectCategoryList'] as $category ) {
-   $text .= "\n[[" . $categoryNamespace . ":" . 
$category . "]]";
-   }
-   }
-   $editPage->textbox1 .= $text;
-
-   return true;
-   }
-
-   // Removes the old category tag from the text the user views in the 
editbox.
-   static function cleanTextbox( $editPage ) {
-   global $wgContLang;
-
-   $editText = $editPage->textbox1;
-
-   $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
-
-   // The regular expression to find the category links:
-   $pattern = 
"\[\[({$categoryNamespace}):([^\|\]]*)(\|[^\|\]]*)?\]\]";
-
-   // The container to store the processed text:
-   $cleanText = '';
-
-   // Check linewise for category links:
-   foreach ( explode( "\n", $editText ) as $textLine ) {
-   // Filter line through pattern and store the result:
-   $cleanText .= preg_replace( "/{$pattern}/i", "", 
$textLine ) . "\n";
-   }
-   // Place the cleaned text into the text box:
-   $editPage->textbox1 = trim( $cleanText );
-
-   return true;
-   }
-}
\ No newline at end of file
+addModules( 'ext.MsCatSelect' );
+
+   // Make the configuration variables available to JavaScript
+   $mscsVars = array(
+   'MainCategories' => $wgMSCS_MainCategories,
+   'UseNiceDropdown' => $wgMSCS_UseNiceDropdown,
+   'WarnNoCategories' => $wgMSCS_WarnNoCategories,
+   'WarnNoCategoriesException' => str_replace( ' ', '_', 
$wgMSCS_WarnNoCategoriesException ),
+   );
+   $mscsVars = json_encode( $mscsVars, true );
+   $wgOut->addScript( "var mscsVars = $mscsVars;" 
);
+   return true;
+   }
+
+   // Entry point for the hook and main worker function for editing the 
page:
+   static function showHook( EditPage $editPage, OutputPage $output ) {
+   self::cleanTextbox( $editPage );
+   return true;
+   }
+
+   // Entry point for the hook and main worker function for saving the 
page:
+   static function saveHook( $editPage ) {
+   global $wgContLang;
+
+   // Get localised namespace string
+   $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
+
+   // Default sort key is page name 

[MediaWiki-commits] [Gerrit] Generate a gitinfo.json to be included in tarballs - change (labs...extdist)

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

Change subject: Generate a gitinfo.json to be included in tarballs
..


Generate a gitinfo.json to be included in tarballs

Bug: T122769
Change-Id: I4573f6c9ce3f0e95bfe447c6396d0aa59a0d3ee3
---
M nightly.py
1 file changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/nightly.py b/nightly.py
index 072b16e..84b128f 100644
--- a/nightly.py
+++ b/nightly.py
@@ -183,6 +183,26 @@
 except subprocess.CalledProcessError:
 logging.error(traceback.format_exc())
 logging.error('composer install failed')
+# Create gitinfo.json to be read/displayed by Special:Version
+git_info = {}
+with open('.git/HEAD') as f_head:
+head = f_head.read()
+if head.startswith('ref:'):
+head = head[5:]  # Strip 'ref :'
+git_info['head'] = head
+# Get the SHA-1
+git_info['headSHA1'] = self.shell_exec(['git', 'rev-parse', 
'HEAD'])
+git_info['headCommitDate'] = self.shell_exec(['git', 'show', '-s', 
'--format=format:%ct', 'HEAD'])
+if head.startswith('refs/heads'):
+branch = head.split('/')[-1]
+else:
+branch = head
+git_info['branch'] = branch
+git_info['remoteURL'] = self.GIT_URL % ext
+with open('gitinfo.json', 'w') as f:
+json.dump(git_info, f)
+
+# TODO: Stop writing this file now that we have gitinfo.json
 # Create a 'version' file with basic info about the tarball
 with open('version', 'w') as f:
 f.write('%s: %s\n' % (ext, branch))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4573f6c9ce3f0e95bfe447c6396d0aa59a0d3ee3
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/extdist
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix Vector's Logo Link for Assistive Technology - change (mediawiki...Vector)

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

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

Change subject: Fix Vector's Logo Link for Assistive Technology
..

Fix Vector's Logo Link for Assistive Technology

Adding link's existing tooltip title as text for screen readers by
implementing an extra span that is just accessible for screen readers.

Bug: T39515
Change-Id: I7db2d7e5387f1a4392d587764598dbd82dd0a5cd
Depends-On: Ie9bce512804385578361eb77579106c799d5ff57
---
M VectorTemplate.php
M components/common.less
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/61/262861/1

diff --git a/VectorTemplate.php b/VectorTemplate.php
index ec2c87a..46f9767 100644
--- a/VectorTemplate.php
+++ b/VectorTemplate.php
@@ -191,7 +191,7 @@
echo htmlspecialchars( 
$this->data['nav_urls']['mainpage']['href'] )
?>" >
+   ?>>msg( 'tooltip-p-logo' ) 
?>
renderPortals( 
$this->data['sidebar'] ); ?>


diff --git a/components/common.less b/components/common.less
index 16e2622..cca4088 100644
--- a/components/common.less
+++ b/components/common.less
@@ -10,6 +10,7 @@
  * "IGNORED BY IE6" comments.
  */
 @import "mediawiki.mixins";
+@import "mediawiki.stateful-classes";
 
 /* Framework */
 html {
@@ -26,6 +27,10 @@
background-color: @menu-background-color;
 }
 
+.mw-wiki-logo-title {
+   &:extend( .is-aural );
+}
+
 /* Content */
 .mw-body {
margin-left: 10em;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7db2d7e5387f1a4392d587764598dbd82dd0a5cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
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] Convert WikibaseQuality to use new extension registration - change (mediawiki...WikibaseQuality)

2016-01-06 Thread MtDu (Code Review)
MtDu has uploaded a new change for review.

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

Change subject: Convert WikibaseQuality to use new extension registration
..

Convert WikibaseQuality to use new extension registration

Bug: T106104
Change-Id: Icb28ea35428d3bdb6a20bbfcaaac43d1e0023666
---
M WikibaseQuality.php
A extension.json
2 files changed, 44 insertions(+), 29 deletions(-)


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

diff --git a/WikibaseQuality.php b/WikibaseQuality.php
index 83dc870..1356aa8 100644
--- a/WikibaseQuality.php
+++ b/WikibaseQuality.php
@@ -1,31 +1,14 @@
 https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );*/
+   return;
+} else {
+   die( 'This version of the WikibaseQuality extension requires MediaWiki 
1.25+' );
 }
-
-call_user_func( function () {
-   // Set credits
-   $GLOBALS['wgExtensionCredits']['wikibase'][] = array(
-   'path' => __FILE__,
-   'name' => 'WikibaseQuality',
-   'author' => 'BP2014N1',
-   'url' => 
'https://www.mediawiki.org/wiki/Extension:WikibaseQuality',
-   'descriptionmsg' => 'wbq-desc',
-   'version' => '1.0.0'
-   );
-
-   // Initialize localization and aliases
-   $GLOBALS['wgMessagesDirs']['WikibaseQuality'] = __DIR__ . '/i18n';
-   $GLOBALS['wgExtensionMessagesFiles']['WikibaseQualityAlias'] = __DIR__ 
. '/WikibaseQuality.alias.php';
-
-   // Register hooks for Unit Tests
-   $GLOBALS['wgHooks']['UnitTestsList'][] = 
'WikibaseQualityHooks::onUnitTestsList';
-
-   // Define modules
-   $GLOBALS['wgResourceModules']['SpecialCheckResultPage'] = array(
-   'styles' => '/modules/SpecialCheckResultPage.css',
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'WikibaseQuality'
-   );
-} );
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..1aa6a04
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,32 @@
+{
+   "load_composer_autoloader": {
+   "type": "boolean",
+   "description": "If set to true, extension registration 
will try to load composer's autoloader of this extension, if present."
+   },
+   "name": "WikibaseQuality",
+   "author": "BP2014N1",
+   "url": "https://www.mediawiki.org/wiki/Extension:WikibaseQuality";,
+   "descriptionmsg": "wbq-desc",
+   "version": "1.0.0",
+   "type": "wikibase",
+   "MessageDirs": {
+   "WikibaseQuality": [
+   "i18n"
+   ]
+   },
+   "ExtensionMessagesFile": {
+   "WikibaseQualityAlias": "WikibaseQuality.alias.php"
+   },
+   "Hooks": {
+   "UnitTestsList": [
+   "WikibaseQualityHooks::onUnitTestsList"
+   ]
+   },
+   "ResourceModules": {
+   "SpecialCheckResultPage": {
+   "styles": "/modules/SpecialCheckResultPage.css",
+   "localBasePath": "__DIR__",
+   "remoteExtPath": "WikibaseQuality"
+   }
+   } 
+}
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Added marker coutners (integer and alpha) - change (mediawiki...Kartographer)

2016-01-06 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Added marker coutners (integer and alpha)
..


Added marker coutners (integer and alpha)

GeoJSON can now contain 'counter' and 'letter' properties,
with the value being any group name.  This allows
for markers to be auto-numbered with integers (1-99) and letters (A-Z),
and have multiple marker counters at the same time.

Change-Id: I228162bbd73d8779a54e0f15e0cc5de8872533af
---
M Kartographer.hooks.php
1 file changed, 88 insertions(+), 2 deletions(-)

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



diff --git a/Kartographer.hooks.php b/Kartographer.hooks.php
index 0719dec..28ad587 100644
--- a/Kartographer.hooks.php
+++ b/Kartographer.hooks.php
@@ -107,12 +107,14 @@
}
 
// Merge existing data with the new tag's data under the same 
group name
+   $counter = false;
if ( $value ) {
if ( !$group ) {
// If it's not mode=data, the tag's data is 
private for this tag only
$group = '_' . sha1( FormatJson::encode( 
$value, false, FormatJson::ALL_OK ) );
}
$data = $output->getExtensionData( 'kartographer_data' 
) ?: new stdClass();
+   $counter = self::processCounters( $value, $data );
if ( isset( $data->$group ) ) {
$data->$group = array_merge( $data->$group, 
$value );
} else {
@@ -173,6 +175,10 @@
}
$output->setExtensionData( 
'kartographer_interact', true );
$html = Html::rawElement( 'div', $attrs );
+   break;
+
+   case 'data':
+   $html = $counter === false ? '' : $counter;
break;
}
$output->setExtensionData( 'kartographer_valid', true );
@@ -251,8 +257,10 @@
private static function validateContent( $status ) {
$value = $status->getValue();
 
-   // The content must be a non-associative array of values
-   if ( !is_array( $value ) && !( $value instanceof stdClass ) ) {
+   // The content must be a non-associative array of values or an 
object
+   if ( $value instanceof stdClass ) {
+   $value = array ( $value );
+   } elseif ( !is_array( $value ) ) {
$status->fatal( 'kartographer-error-bad_data' );
return false;
}
@@ -272,4 +280,82 @@
}
return true;
}
+
+   /**
+*
+* @param mixed $values
+* @param stdClass $data
+* @return bool|int|string
+*/
+   private static function processCounters( $values, $data ) {
+   if ( !property_exists( $data, 'counters' ) ) {
+   $numCounters = new stdClass();
+   $alphaCounters = new stdClass();
+   $data->counters = (object) array( 'numeric' => 
$numCounters, 'alpha' => $alphaCounters );
+   } else {
+   $numCounters = $data->counters->numeric;
+   $alphaCounters = $data->counters->alpha;
+   }
+   return self::processItemList( $values, $numCounters, 
$alphaCounters );
+   }
+
+   /**
+* @param $values
+* @param $numCounters
+* @param $alphaCounters
+* @return bool|string
+*/
+   private static function processItemList( $values, $numCounters, 
$alphaCounters ) {
+   $firstMarker = false;
+   if ( !is_array( $values ) ) {
+   return $firstMarker;
+   }
+   foreach ( $values as $item ) {
+   if ( property_exists( $item, 'properties' ) ) {
+   $props = $item->properties;
+   if ( property_exists( $props, 'counter' ) ) {
+   $grp = $props->counter;
+   unset( $props->counter );
+   $count =
+   property_exists( $numCounters, 
$grp ) ? min( $numCounters->$grp + 1, 99 )
+   : 1;
+   $marker = strval( $count );
+   $numCounters->$grp = $count;
+   } elseif ( property_exists( $props, 'letter' ) 
) {
+   $grp = $props->letter;
+   unset( 

[MediaWiki-commits] [Gerrit] Added marker coutners (integer and alpha) - change (mediawiki...Kartographer)

2016-01-06 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Added marker coutners (integer and alpha)
..

Added marker coutners (integer and alpha)

GeoJSON can now contain 'counter' and 'letter' properties,
with the value being any group name.  This allows
for markers to be auto-numbered with integers (1-99) and letters (A-Z),
and have multiple marker counters at the same time.

Change-Id: I228162bbd73d8779a54e0f15e0cc5de8872533af
---
M Kartographer.hooks.php
1 file changed, 88 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/59/262859/1

diff --git a/Kartographer.hooks.php b/Kartographer.hooks.php
index 0719dec..28ad587 100644
--- a/Kartographer.hooks.php
+++ b/Kartographer.hooks.php
@@ -107,12 +107,14 @@
}
 
// Merge existing data with the new tag's data under the same 
group name
+   $counter = false;
if ( $value ) {
if ( !$group ) {
// If it's not mode=data, the tag's data is 
private for this tag only
$group = '_' . sha1( FormatJson::encode( 
$value, false, FormatJson::ALL_OK ) );
}
$data = $output->getExtensionData( 'kartographer_data' 
) ?: new stdClass();
+   $counter = self::processCounters( $value, $data );
if ( isset( $data->$group ) ) {
$data->$group = array_merge( $data->$group, 
$value );
} else {
@@ -173,6 +175,10 @@
}
$output->setExtensionData( 
'kartographer_interact', true );
$html = Html::rawElement( 'div', $attrs );
+   break;
+
+   case 'data':
+   $html = $counter === false ? '' : $counter;
break;
}
$output->setExtensionData( 'kartographer_valid', true );
@@ -251,8 +257,10 @@
private static function validateContent( $status ) {
$value = $status->getValue();
 
-   // The content must be a non-associative array of values
-   if ( !is_array( $value ) && !( $value instanceof stdClass ) ) {
+   // The content must be a non-associative array of values or an 
object
+   if ( $value instanceof stdClass ) {
+   $value = array ( $value );
+   } elseif ( !is_array( $value ) ) {
$status->fatal( 'kartographer-error-bad_data' );
return false;
}
@@ -272,4 +280,82 @@
}
return true;
}
+
+   /**
+*
+* @param mixed $values
+* @param stdClass $data
+* @return bool|int|string
+*/
+   private static function processCounters( $values, $data ) {
+   if ( !property_exists( $data, 'counters' ) ) {
+   $numCounters = new stdClass();
+   $alphaCounters = new stdClass();
+   $data->counters = (object) array( 'numeric' => 
$numCounters, 'alpha' => $alphaCounters );
+   } else {
+   $numCounters = $data->counters->numeric;
+   $alphaCounters = $data->counters->alpha;
+   }
+   return self::processItemList( $values, $numCounters, 
$alphaCounters );
+   }
+
+   /**
+* @param $values
+* @param $numCounters
+* @param $alphaCounters
+* @return bool|string
+*/
+   private static function processItemList( $values, $numCounters, 
$alphaCounters ) {
+   $firstMarker = false;
+   if ( !is_array( $values ) ) {
+   return $firstMarker;
+   }
+   foreach ( $values as $item ) {
+   if ( property_exists( $item, 'properties' ) ) {
+   $props = $item->properties;
+   if ( property_exists( $props, 'counter' ) ) {
+   $grp = $props->counter;
+   unset( $props->counter );
+   $count =
+   property_exists( $numCounters, 
$grp ) ? min( $numCounters->$grp + 1, 99 )
+   : 1;
+   $marker = strval( $count );
+   $numCounters->$grp = $count;
+   } elseif ( property_exists( $props, 'letter' ) 
) {
+   $grp = $props->

[MediaWiki-commits] [Gerrit] ChangeTags: Teach updateTags() to derive log_id from rev_id ... - change (mediawiki/core)

2016-01-06 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: ChangeTags: Teach updateTags() to derive log_id from rev_id 
(and the other way)
..

ChangeTags: Teach updateTags() to derive log_id from rev_id (and the other way)

This means that, for example, the tags for a file upload's log entry
and the associated page revision should finally be in sync.

Bug: T122090
Change-Id: I3537278ff728d160bbdcf149d0f99fe9621c02e6
---
M includes/changetags/ChangeTags.php
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/262858/1

diff --git a/includes/changetags/ChangeTags.php 
b/includes/changetags/ChangeTags.php
index 5aac495..a8c9f7b 100644
--- a/includes/changetags/ChangeTags.php
+++ b/includes/changetags/ChangeTags.php
@@ -212,6 +212,22 @@
);
}
 
+   if ( $log_id && !$rev_id ) {
+   $rev_id = $dbw->selectField(
+   'log_search',
+   'ls_value',
+   array( 'ls_field' => 'associated_rev_id', 
'ls_log_id' => $log_id ),
+   __METHOD__
+   );
+   } elseif ( !$log_id && $rev_id ) {
+   $log_id = $dbw->selectField(
+   'log_search',
+   'ls_log_id',
+   array( 'ls_field' => 'associated_rev_id', 
'ls_value' => $rev_id ),
+   __METHOD__
+   );
+   }
+
// update the tag_summary row
$prevTags = array();
if ( !self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, 
$rc_id, $rev_id,

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

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

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


[MediaWiki-commits] [Gerrit] GitInfo: Allow cache to be in the extension directory itself - change (mediawiki/core)

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

Change subject: GitInfo: Allow cache to be in the extension directory itself
..


GitInfo: Allow cache to be in the extension directory itself

For ExtensionDistributor to provide git metadata, we need to be able to
store the cache file inside the extension directory itself. The GitInfo
class will now first check if the $wgGitInfoCacheDirectory is populated,
otherwise it will fallback to "$extensionDir/gitinfo.json".

Bug: T122769
Change-Id: Ib3457589ca6899925ae4610cfcdae22af8eaaaeb
---
M includes/GitInfo.php
A tests/phpunit/data/gitinfo/extension/gitinfo.json
M tests/phpunit/includes/GitInfoTest.php
3 files changed, 29 insertions(+), 13 deletions(-)

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



diff --git a/includes/GitInfo.php b/includes/GitInfo.php
index 7f05bb0..14f3cc1 100644
--- a/includes/GitInfo.php
+++ b/includes/GitInfo.php
@@ -96,7 +96,7 @@
 *
 * @param string $repoDir The root directory of the repo where .git can 
be found
 * @return string Path to GitInfo cache file in 
$wgGitInfoCacheDirectory or
-* null if $wgGitInfoCacheDirectory is false (cache disabled).
+* fallback in the extension directory itself
 * @since 1.24
 */
protected static function getCacheFilePath( $repoDir ) {
@@ -119,9 +119,13 @@
// a filename
$repoName = strtr( $repoName, DIRECTORY_SEPARATOR, '-' 
);
$fileName = 'info' . $repoName . '.json';
-   return "{$wgGitInfoCacheDirectory}/{$fileName}";
+   $cachePath = "{$wgGitInfoCacheDirectory}/{$fileName}";
+   if ( is_readable( $cachePath ) ) {
+   return $cachePath;
+   }
}
-   return null;
+
+   return "$repoDir/gitinfo.json";
}
 
/**
diff --git a/tests/phpunit/data/gitinfo/extension/gitinfo.json 
b/tests/phpunit/data/gitinfo/extension/gitinfo.json
new file mode 100644
index 000..8cf21bd
--- /dev/null
+++ b/tests/phpunit/data/gitinfo/extension/gitinfo.json
@@ -0,0 +1,7 @@
+{
+"head": "refs/heads/master",
+"headSHA1": "0123456789abcdef0123456789abcdef01234567",
+"headCommitDate": "1070884800",
+"branch": "master",
+"remoteURL": "https://gerrit.wikimedia.org/r/mediawiki/core";
+}
diff --git a/tests/phpunit/includes/GitInfoTest.php 
b/tests/phpunit/includes/GitInfoTest.php
index c3539d0..9f4a01c 100644
--- a/tests/phpunit/includes/GitInfoTest.php
+++ b/tests/phpunit/includes/GitInfoTest.php
@@ -9,18 +9,23 @@
$this->setMwGlobals( 'wgGitInfoCacheDirectory', __DIR__ . 
'/../data/gitinfo' );
}
 
-   public function testValidJsonData() {
-   $dir = $GLOBALS['IP'] . DIRECTORY_SEPARATOR . 
'testValidJsonData';
-   $fixture = new GitInfo( $dir );
-
-   $this->assertTrue( $fixture->cacheIsComplete() );
-   $this->assertEquals( 'refs/heads/master', $fixture->getHead() );
+   protected function assertValidGitInfo( GitInfo $gitInfo ) {
+   $this->assertTrue( $gitInfo->cacheIsComplete() );
+   $this->assertEquals( 'refs/heads/master', $gitInfo->getHead() );
$this->assertEquals( '0123456789abcdef0123456789abcdef01234567',
-   $fixture->getHeadSHA1() );
-   $this->assertEquals( '1070884800', 
$fixture->getHeadCommitDate() );
-   $this->assertEquals( 'master', $fixture->getCurrentBranch() );
+   $gitInfo->getHeadSHA1() );
+   $this->assertEquals( '1070884800', 
$gitInfo->getHeadCommitDate() );
+   $this->assertEquals( 'master', $gitInfo->getCurrentBranch() );
$this->assertContains( 
'0123456789abcdef0123456789abcdef01234567',
-   $fixture->getHeadViewUrl() );
+   $gitInfo->getHeadViewUrl() );
+
+   }
+
+   public function testValidJsonData() {
+   global $IP;
+
+   $this->assertValidGitInfo( new GitInfo( 
"$IP/testValidJsonData") );
+   $this->assertValidGitInfo( new GitInfo( __DIR__ . 
"/../data/gitinfo/extension" ) );
}
 
public function testMissingJsonData() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3457589ca6899925ae4610cfcdae22af8eaaaeb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki

[MediaWiki-commits] [Gerrit] Add maintenance script importTextFiles.php - change (mediawiki/core)

2016-01-06 Thread Unicornisaurous (Code Review)
Unicornisaurous has uploaded a new change for review.

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

Change subject: Add maintenance script importTextFiles.php
..

Add maintenance script importTextFiles.php

importTextFiles.php can be used to import pages from text files
containing wikitext.

Also, added $userObj to WikiRevision so that it can accept a User
object instead of just a username.

This is a GCI task.

Change-Id: I20eaf2005bdd3d041f55d8c0b108f001c064d638
---
M includes/import/WikiRevision.php
1 file changed, 22 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/262857/1

diff --git a/includes/import/WikiRevision.php b/includes/import/WikiRevision.php
index 8705bb0..49a422c 100644
--- a/includes/import/WikiRevision.php
+++ b/includes/import/WikiRevision.php
@@ -51,6 +51,9 @@
/** @var string */
public $user_text = "";
 
+   /** @var User */
+   public $userObj = null;
+
/** @var string */
public $model = null;
 
@@ -152,6 +155,13 @@
 */
function setUsername( $user ) {
$this->user_text = $user;
+   }
+
+   /**
+*
+*/
+   function setUserObj( $user ) {
+   $this->userObj = $user;
}
 
/**
@@ -294,6 +304,13 @@
 */
function getUser() {
return $this->user_text;
+   }
+
+   /**
+* @return User
+*/
+   function getUserObj() {
+   return $this->userObj;
}
 
/**
@@ -446,15 +463,14 @@
$dbw = wfGetDB( DB_MASTER );
 
# Sneak a single revision into place
-   $user = User::newFromName( $this->getUser() );
+   $user = $this->getUserObj() ?: User::newFromName( 
$this->getUser() );
if ( $user ) {
$userId = intval( $user->getId() );
$userText = $user->getName();
-   $userObj = $user;
} else {
$userId = 0;
$userText = $this->getUser();
-   $userObj = new User;
+   $user = new User;
}
 
// avoid memory leak...?
@@ -534,7 +550,7 @@
// countable/oldcountable stuff is handled in 
WikiImporter::finishImportPage
$page->doEditUpdates(
$revision,
-   $userObj,
+   $user,
array( 'created' => $created, 'oldcountable' => 
'no-change' )
);
}
@@ -545,7 +561,7 @@
function importLogItem() {
$dbw = wfGetDB( DB_MASTER );
 
-   $user = User::newFromName( $this->getUser() );
+   $user = $this->getUserObj ?: User::newFromName( 
$this->getUser() );
if ( $user ) {
$userId = intval( $user->getId() );
$userText = $user->getName();
@@ -644,7 +660,7 @@
return false;
}
 
-   $user = User::newFromName( $this->user_text );
+   $user = $this->getUserObj ?: User::newFromName( 
$this->getUser() );
 
# Do the actual upload
if ( $archiveName ) {

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

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

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


[MediaWiki-commits] [Gerrit] WIP: Send email to project admins when puppet fails. - change (operations/puppet)

2016-01-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: WIP:  Send email to project admins when puppet fails.
..

WIP:  Send email to project admins when puppet fails.

Bug: T121773
Change-Id: I20c60008cfc46842cc1b91a2087ccb4b77c7173a
---
A modules/base/files/labs/puppetalert.py
1 file changed, 108 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/262856/1

diff --git a/modules/base/files/labs/puppetalert.py 
b/modules/base/files/labs/puppetalert.py
new file mode 100755
index 000..fcdb1a2
--- /dev/null
+++ b/modules/base/files/labs/puppetalert.py
@@ -0,0 +1,108 @@
+#!/usr/bin/python
+# Copyright 2016 Andrew Bogott  and Yuvi Panda 

+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""
+Send an alert email to project admins about a puppet failure.  This is
+meant to be run on the affected instance.
+"""
+import argparse
+import ldap
+import socket
+import yaml
+import subprocess
+
+with open('/etc/wmflabs-project') as f:
+PROJECT_NAME = f.read().strip()
+
+
+def connect(server, username, password):
+conn = ldap.initialize('ldap://%s:389' % server)
+conn.protocol_version = ldap.VERSION3
+conn.start_tls_s()
+conn.simple_bind_s(username, password)
+return conn
+
+
+def get_user_keys(conn, user):
+response = conn.search_s(
+user,
+ldap.SCOPE_BASE
+)
+for _, user in response:
+return user['sshPublicKey']
+
+
+def get_group_keys(conn, groupname):
+response = conn.search_s(
+groupname,
+ldap.SCOPE_BASE
+)
+# only one service group can have that name
+assert len(response) <= 1
+if response:
+sg = response[0][1]
+keys = []
+for member in sg['member']:
+keys += get_user_keys(conn, member)
+return keys
+else:
+return []
+
+
+def main():
+with open('/etc/ldap.yaml') as f:
+config = yaml.safe_load(f)
+
+conn = connect(config['servers'][0], config['user'], config['password'])
+roledn = "cn=projectadmin,cn=%s,ou=projects,%s" % (PROJECT_NAME, 
config['basedn'])
+
+hostname = socket.gethostname()
+
+body = "Puppet is failing to run on the %s instance in the "\
+   "Wikimedia Labs project %s."\
+   "\n\n"\
+   "Working puppet runs are needed to maintain instance security and "\
+   "logins.  As long as puppet\ncontinues to fail, this system is in "\
+   "danger of becoming unreachable."\
+   "\n\n"\
+   "You are receiving this email because you are listed as an "\
+   "administrator for the project that\ncontains this instance. "\
+   " Please take steps to repair this instance or contact a Labs "\
+   "admin\nfor assistance."\
+  "\n\n"\
+   "For further support, visit #wikimedia-labs on freenode or visit "\
+   "http://www.wikitech.org"\
+   % (hostname, PROJECT_NAME)
+   
+subject = "Alert:  puppet failed on %s.%s.eqiad.wmflabs" % (hostname, 
PROJECT_NAME)
+
+adminrec = conn.search_s(
+roledn,
+ldap.SCOPE_BASE
+)
+admins = adminrec[0][1]['roleOccupant']
+
+for admin in admins:
+userrec = conn.search_s(admin, ldap.SCOPE_BASE)
+email = userrec[0][1]['mail'][0]
+
+args = ['/usr/bin/mail', '-s', subject, email]
+
+p = subprocess.Popen(args, stdout=subprocess.PIPE,
+ stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
+p.communicate(input=body)[0]
+
+
+if __name__ == '__main__':
+main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20c60008cfc46842cc1b91a2087ccb4b77c7173a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] LogEntry: Make associated rev id persistent (store in loggin... - change (mediawiki/core)

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

Change subject: LogEntry: Make associated rev id persistent (store in logging 
and log_search)
..


LogEntry: Make associated rev id persistent (store in logging and log_search)

The implementation from 0160b410bd514681b1637ccab2b7c79158fbfb29 only
stored the associated rev id in the `recentchanges` table, which was
sufficient for its purpose of allowing patrol of these log entries and
provided some change tagging improvements, but ephemeral.

Now we also store it in `logging` and `log_search` tables, which makes
it possible to find a revision for the log entry and vice versa.

* For `log_search` we just add a row with 'associated_rev_id' as key,
  it was designed for exactly this purpose.
* For `logging` we store it in log_params field in ManualLogEntry, and
  transparently remove it from there when building a DatabaseLogEntry.

Bug: T122089
Change-Id: I559587ff77b3c94b31a6c5951287b6f9c1e167ce
---
M includes/filerepo/file/LocalFile.php
M includes/logging/LogEntry.php
2 files changed, 62 insertions(+), 10 deletions(-)

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



diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 5a6a8b2..b7d6f98 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1399,6 +1399,7 @@
# Update memcache after the commit
$that->invalidateCache();
 
+   $updateLogPage = false;
if ( $newPageContent ) {
# New file page; create the description page.
# There's already a log entry, so don't make a 
second RC entry
@@ -1420,12 +1421,7 @@
if ( isset( $status->value['revision'] ) ) {
/** @var $rev Revision */
$rev = $status->value['revision'];
-   $that->getRepo()->getMasterDB()->update(
-   'logging',
-   array( 'log_page' => 
$rev->getPage() ),
-   array( 'log_id' => $logId ),
-   __METHOD__
-   );
+   $updateLogPage = $rev->getPage();
}
} else {
# Existing file page: invalidate description 
page cache
@@ -1435,7 +1431,32 @@
Article::purgePatrolFooterCache( $descId );
}
 
-   # Now that the page exists, make an RC entry.
+   # Update associated rev id. This should be done by 
$logEntry->insert() earlier,
+   # but setAssociatedRevId() wasn't called at that point 
yet...
+   $logParams = $logEntry->getParameters();
+   $logParams['associated_rev_id'] = 
$logEntry->getAssociatedRevId();
+   $update = array( 'log_params' => 
LogEntryBase::makeParamBlob( $logParams ) );
+   if ( $updateLogPage ) {
+   # Also log page, in case where we just created 
it above
+   $update['log_page'] = $updateLogPage;
+   }
+   $that->getRepo()->getMasterDB()->update(
+   'logging',
+   $update,
+   array( 'log_id' => $logId ),
+   __METHOD__
+   );
+   $that->getRepo()->getMasterDB()->insert(
+   'log_search',
+   array(
+   'ls_field' => 'associated_rev_id',
+   'ls_value' => 
$logEntry->getAssociatedRevId(),
+   'ls_log_id' => $logId,
+   ),
+   __METHOD__
+   );
+
+   # Now that the log entry is up-to-date, make an RC 
entry.
$logEntry->publish( $logId );
# Run hook for other updates (typically more cache 
purging)
Hooks::run( 'FileUpload', array( $that, $reupload, 
!$newPageContent ) );
diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php
index 773af27..db588fd 100644
--- a/includes/logging/LogEntry.php
+++ b/includes/logging/LogEntry.php
@@ -213,6 +213,12 @@
/** @var User */
protected $performer;
 
+   /** @var array Parameters for log entry */
+ 

[MediaWiki-commits] [Gerrit] LogEntry: Boring whitespace and comment changes, some docume... - change (mediawiki/core)

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

Change subject: LogEntry: Boring whitespace and comment changes, some 
documentation too
..


LogEntry: Boring whitespace and comment changes, some documentation too

Change-Id: If501a3c276c3dc341ef73d5ffdb255f68cbe0ab7
---
M includes/logging/LogEntry.php
1 file changed, 54 insertions(+), 46 deletions(-)

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



diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php
index 993f3de..773af27 100644
--- a/includes/logging/LogEntry.php
+++ b/includes/logging/LogEntry.php
@@ -30,59 +30,70 @@
 
 /**
  * Interface for log entries. Every log entry has these methods.
+ *
  * @since 1.19
  */
 interface LogEntry {
+
/**
 * The main log type.
+*
 * @return string
 */
public function getType();
 
/**
 * The log subtype.
+*
 * @return string
 */
public function getSubtype();
 
/**
 * The full logtype in format maintype/subtype.
+*
 * @return string
 */
public function getFullType();
 
/**
 * Get the extra parameters stored for this message.
+*
 * @return array
 */
public function getParameters();
 
/**
 * Get the user for performed this action.
+*
 * @return User
 */
public function getPerformer();
 
/**
 * Get the target page of this action.
+*
 * @return Title
 */
public function getTarget();
 
/**
 * Get the timestamp when the action was executed.
+*
 * @return string
 */
public function getTimestamp();
 
/**
 * Get the user provided comment.
+*
 * @return string
 */
public function getComment();
 
/**
 * Get the access restriction.
+*
 * @return string
 */
public function getDeleted();
@@ -96,9 +107,11 @@
 
 /**
  * Extends the LogEntryInterface with some basic functionality
+ *
  * @since 1.19
  */
 abstract class LogEntryBase implements LogEntry {
+
public function getFullType() {
return $this->getType() . '/' . $this->getSubtype();
}
@@ -110,6 +123,7 @@
/**
 * Whether the parameters for this log are stored in new or
 * old format.
+*
 * @return bool
 */
public function isLegacy() {
@@ -119,9 +133,9 @@
/**
 * Create a blob from a parameter array
 *
+* @since 1.26
 * @param array $params
 * @return string
-* @since 1.26
 */
public static function makeParamBlob( $params ) {
return serialize( (array)$params );
@@ -130,9 +144,9 @@
/**
 * Extract a parameter array from a blob
 *
+* @since 1.26
 * @param string $blob
 * @return array
-* @since 1.26
 */
public static function extractParams( $blob ) {
return unserialize( $blob );
@@ -141,15 +155,16 @@
 
 /**
  * This class wraps around database result row.
+ *
  * @since 1.19
  */
 class DatabaseLogEntry extends LogEntryBase {
-   // Static->
 
/**
 * Returns array of information that is needed for querying
 * log entries. Array contains the following keys:
 * tables, fields, conds, options and join_conds
+*
 * @return array
 */
public static function getSelectQueryData() {
@@ -163,7 +178,7 @@
);
 
$joins = array(
-   // IP's don't have an entry in user table
+   // IPs don't have an entry in user table
'user' => array( 'LEFT JOIN', 'log_user=user_id' ),
);
 
@@ -179,6 +194,7 @@
/**
 * Constructs new LogEntry from database result row.
 * Supports rows from both logging and recentchanges table.
+*
 * @param stdClass|array $row
 * @return DatabaseLogEntry
 */
@@ -191,17 +207,13 @@
}
}
 
-   // Non-static->
-
/** @var stdClass Database result row. */
protected $row;
 
/** @var User */
protected $performer;
 
-   /** @var bool Whether the parameters for this log entry are stored in 
new
-*or old format.
-*/
+   /** @var bool Whether the parameters for this log entry are stored in 
new or old format. */
protected $legacy;
 
protected function __construct( $row ) {
@@ -210,6 +222,7 @@
 
/**
 * Returns the unique database id.
+*
 * @return int
 */
public function getId() {
@@ -218,22 +231,18 @@
 

[MediaWiki-commits] [Gerrit] Speed up - change (mediawiki...Translate)

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

Change subject: Speed up 
..


Speed up 

Due to various hooks it ended up loading message cache for
all languages in which the page is available. At translatewiki.net
these usually times out after a handful because the queries are slow
due to the volume (even with the fix to no load all of them). Even
if caches are populated, causes increased memory use for the request.

Since we only need autonyms, use the special "null" value supported
by core. Needed some simple code changes in other places to support
it in Translate.

Continuation of my removal of copyright annotations for which I am
too lazy to update the year.

Change-Id: Ica729b115a148c878a8e71aed6986edbcbe7acb7
---
M TranslateHooks.php
M TranslateUtils.php
M tag/PageTranslationHooks.php
3 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/TranslateHooks.php b/TranslateHooks.php
index 2b032fc..e442c61 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -4,7 +4,6 @@
  *
  * @file
  * @author Niklas Laxström
- * @copyright Copyright © 2011-2013, Niklas Laxström
  * @license GPL-2.0+
  */
 
@@ -361,8 +360,11 @@
public static function translateMessageDocumentationLanguage( &$names, 
$code ) {
global $wgTranslateDocumentationLanguageCode;
if ( $wgTranslateDocumentationLanguageCode ) {
-   // Special case the native name, assuming it is given 
as a string
-   if ( $wgTranslateDocumentationLanguageCode === $code ) {
+   // Special case the autonyms
+   if (
+   $wgTranslateDocumentationLanguageCode === $code 
||
+   $code === null
+   ) {
$code = 'en';
}
 
diff --git a/TranslateUtils.php b/TranslateUtils.php
index cfb39a9..635626b 100644
--- a/TranslateUtils.php
+++ b/TranslateUtils.php
@@ -4,7 +4,6 @@
  *
  * @file
  * @author Niklas Laxström
- * @copyright Copyright © 2007-2013 Niklas Laxström
  * @license GPL-2.0+
  */
 
@@ -145,7 +144,7 @@
/**
 * Returns a localised language name.
 * @param string $code Language code.
-* @param string $language Language code of language the the name 
should be in.
+* @param null|string $language Language code of language the the name 
should be in.
 * @return string Best-effort localisation of wanted language name.
 */
public static function getLanguageName( $code, $language = 'en' ) {
@@ -199,10 +198,10 @@
 * Get translated language names for the languages generally supported 
for
 * translation in the current wiki. Message groups can have further
 * exclusions.
-* @param string $code
+* @param null|string $code
 * @return array ( language code => language name )
 */
-   public static function getLanguageNames( /*string */$code ) {
+   public static function getLanguageNames( $code ) {
$languageNames = Language::fetchLanguageNames( $code );
 
// Remove languages with deprecated codes (bug T37475)
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index f4c265d..a9e988f 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -4,7 +4,6 @@
  *
  * @file
  * @author Niklas Laxström
- * @copyright Copyright © 2008-2013, Niklas Laxström
  * @license GPL-2.0+
  */
 
@@ -236,8 +235,8 @@
 
$languages = array();
foreach ( $status as $code => $percent ) {
-   // Get autonyms
-   $name = TranslateUtils::getLanguageName( $code, $code );
+   // Get autonyms (null)
+   $name = TranslateUtils::getLanguageName( $code, null );
$name = htmlspecialchars( $name ); // Unlikely, but 
better safe
 
// Add links to other languages

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica729b115a148c878a8e71aed6986edbcbe7acb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add jobs for WikiPinger extension - change (integration/config)

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

Change subject: Add jobs for WikiPinger extension
..


Add jobs for WikiPinger extension

Change-Id: I183d2f736c95c56e44a8a23a48df7ccab56a8380
---
M zuul/layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index f5c93e8..a3cf952 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5901,6 +5901,12 @@
   - name: extension-jslint
   - name: extension-unittests-generic
 
+  - name: mediawiki/extensions/WikiPinger
+template:
+  - name: npm
+  - name: extension-unittests-generic
+  - name: composer-test
+
   - name: mediawiki/extensions/WikiTextLoggedInOut
 template:
   - name: extension-unittests-generic

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I183d2f736c95c56e44a8a23a48df7ccab56a8380
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add jobs for WikiPinger extension - change (integration/config)

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

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

Change subject: Add jobs for WikiPinger extension
..

Add jobs for WikiPinger extension

Change-Id: I183d2f736c95c56e44a8a23a48df7ccab56a8380
---
M zuul/layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/55/262855/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index f5c93e8..a3cf952 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5901,6 +5901,12 @@
   - name: extension-jslint
   - name: extension-unittests-generic
 
+  - name: mediawiki/extensions/WikiPinger
+template:
+  - name: npm
+  - name: extension-unittests-generic
+  - name: composer-test
+
   - name: mediawiki/extensions/WikiTextLoggedInOut
 template:
   - name: extension-unittests-generic

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

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

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


[MediaWiki-commits] [Gerrit] Fix null authors bug - change (mediawiki...citoid)

2016-01-06 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Fix null authors bug
..


Fix null authors bug

Fixes bug where replaceCreators was sometimes
adding null authors to the mediawiki format.
Instead of adding "null" when the field name
doesn't exist, now just skips them.

Now accepts 'name' parameter and places it
in the lastName field.

Bug: T121355
Change-Id: I703463b220c7db3a3f0cc9586869e4936171ec81
---
M lib/Exporter.js
M test/features/scraping/export.js
M test/features/scraping/index.js
M test/features/scraping/lang.js
M test/features/unit/exporter.js
5 files changed, 130 insertions(+), 27 deletions(-)

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



diff --git a/lib/Exporter.js b/lib/Exporter.js
index bccf161..f7696a3 100644
--- a/lib/Exporter.js
+++ b/lib/Exporter.js
@@ -9,13 +9,14 @@
 /* Import Modules */
 var BBPromise = require('bluebird');
 var crypto = require('crypto');
-var util = require('util');
-var urlParse = require('url');
+var extend = require('extend');
 var stripTags = require('striptags');
+var urlParse = require('url');
+var util = require('util');
 
 /* Local Modules */
-var pubMedRequest = require('./pubMedRequest.js');
 var CachedTypes = require('./zotero/cachedTypes.js');
+var pubMedRequest = require('./pubMedRequest.js');
 
 //TODO: Remove
 var defaultLogger;
@@ -125,9 +126,8 @@
  */
 Exporter.prototype.convertToMediawiki = 
BBPromise.method(function(citationPointer, cr){
 // Don't directly modify cr.response.citation, this should remain in 
zotero format only.
-var citation = Object.assign({}, citationPointer);
+var citation = extend(true, {}, citationPointer);
 var self = this;
-
 citation = replaceCreators(citation);
 citation = fixISBN(citation);
 citation = fixISSN(citation);
@@ -151,7 +151,7 @@
  */
 Exporter.prototype.convertToMWDeprecated = 
BBPromise.method(function(citationPointer, cr){
 // Don't directly modify cr.response.citation, this should remain in 
zotero format only.
-var citation = Object.assign({}, citationPointer);
+var citation = extend(true, {}, citationPointer);
 var creatorTypeCount = {};
 
 var zotCreators;
@@ -160,8 +160,7 @@
 function fixCreatorsMW(citation) {
 if (citation.creators) {
 zotCreators = citation.creators;
-
-for (var z in zotCreators){
+for (var z in zotCreators) {
 creatorFieldName = zotCreators[z].creatorType;
 if (creatorTypeCount[creatorFieldName]){
 creatorTypeCount[creatorFieldName] += 1;
@@ -170,9 +169,14 @@
 }
 //Appends number to name, i.e. author -> author1
 creatorFieldName += 
(parseInt(creatorTypeCount[creatorFieldName]));
-
-citation[creatorFieldName + "-first"] = 
zotCreators[z].firstName;
-citation[creatorFieldName + "-last"] = zotCreators[z].lastName;
+if (zotCreators[z].firstName){
+citation[creatorFieldName + "-first"] = 
zotCreators[z].firstName;
+}
+if (zotCreators[z].firstName){
+citation[creatorFieldName + "-last"] = 
zotCreators[z].lastName;
+} else if (zotCreators[z].name){
+citation[creatorFieldName + "-last"] = zotCreators[z].name;
+}
 }
 delete citation.creators; //remove creators field
 }
@@ -217,18 +221,36 @@
  */
  function replaceCreators(citation){
 if (citation.creators) {
-var creatorArray, creatorFieldName,
-zotCreators = citation.creators;
+var creator;
+var creatorFieldName;
+var zotCreators = citation.creators;
 
-for (var z in zotCreators){
+for (var z = 0; z < zotCreators.length; z++) {
 creatorFieldName = zotCreators[z].creatorType;
 
-if (!citation[creatorFieldName]){
-creatorArray = [];
-citation[creatorFieldName]= creatorArray;
-}
+// Only add the creator to the list if either a firstName, 
lastName, or name is present
+if (zotCreators[z].firstName || zotCreators[z].lastName || 
zotCreators[z].name){
+creator = []; // List containing [firstName, lastName]
 
-citation[creatorFieldName].push([zotCreators[z].firstName, 
zotCreators[z].lastName]);
+if (zotCreators[z].firstName){
+creator[0] = zotCreators[z].firstName; // Set first 
element of creator list to firstName
+} else {
+creator[0] = ''; // Otherwise, empty string
+}
+
+if (zotCreators[z].lastName){
+creator[1] = zotCreators[z].lastName; // Set second 
element of creator list to lastName
+} else if (zotCreators[z

[MediaWiki-commits] [Gerrit] installer: Choose CACHE_ACCEL as the default if available - change (mediawiki/core)

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

Change subject: installer: Choose CACHE_ACCEL as the default if available
..


installer: Choose CACHE_ACCEL as the default if available

Bug: T49162
Change-Id: I57c8887c00cb3b73367e6733af1bf93dbab0c639
---
M RELEASE-NOTES-1.27
M includes/installer/WebInstallerPage.php
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index f674d59..2b95255 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -99,6 +99,8 @@
 * Added a new hook, 'TitleMoveCompleting', which runs before a page move is 
committed.
 * $wgCdnReboundPurgeDelay was added to provide secondary delayed purges of URLs
   from CDN to mitigate DB replication lag and WAN cache purge lag.
+* (T49162) Installer will default to setting CACHE_ACCEL as the main cache type
+  if it is available.
 
 === External library changes in 1.27 ===
  Upgraded external libraries 
diff --git a/includes/installer/WebInstallerPage.php 
b/includes/installer/WebInstallerPage.php
index 0fcda7d..2ad2e11 100644
--- a/includes/installer/WebInstallerPage.php
+++ b/includes/installer/WebInstallerPage.php
@@ -1134,8 +1134,12 @@
);
 
$caches = array( 'none' );
+   $cachevalDefault = 'none';
+
if ( count( $this->getVar( '_Caches' ) ) ) {
+   // A CACHE_ACCEL implementation is available
$caches[] = 'accel';
+   $cachevalDefault = 'accel';
}
$caches[] = 'memcached';
 
@@ -1145,7 +1149,7 @@
// We need to set a default here; but don't hardcode it
// or we lose it every time we reload the page for 
validation
// or going back!
-   $cacheval = 'none';
+   $cacheval = $cachevalDefault;
}
$hidden = ( $cacheval == 'memcached' ) ? '' : 'display: none';
$this->addHTML(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57c8887c00cb3b73367e6733af1bf93dbab0c639
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: saper 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix typo in amire80's new key - change (operations/puppet)

2016-01-06 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Fix typo in amire80's new key
..


Fix typo in amire80's new key

missing an s

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

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index a17541e..177faa2 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1091,7 +1091,7 @@
 gid: 500
 name: amire80
 realname: Amir Aharoni
-ssh_keys: [sh-rsa 
B3NzaC1yc2EDAQABAAACAQDNENRIzkpsjf/EZjx1r8RGZ8OLVO5GG64RBuURLPHaD2Ple56UcdpNnoLeWn219s4VSjyQHb9rBY1kmMKIB7KOhqEUy0Gw3xC++MB6aoXQI1yV62ycjrQf18i+xTG9LiJ6bbFQXoXx9hUg0bI+R1rVhz8/iHiZMd0U+EUDozct5VAQvCHX4hh02b3DDCHklVIak+3s/8Urw7rPxiO5oU9Fxbrc3bkcTdpKWdKakLWffjrmLwiHkVEEKSnxru1qvhf7YG74YwHAaKOY/G5og79mDor2kNKgVnj/pLbGrseD/Ul+ntrQ38iFXQzw4ysXq+Fc9iRNmP1EJEAYreUxG3oAwGmlSdLS+w1QXtBYzTDUXj0fuRr9/jHEu6i6zotCu7viP4+l1+0O4jeQp7cfOLwPb8gcz//ms8GwL4FQvLEQK0AWnCYsVZCxf9NARWoLlVQY4pFdFxcLZOiifbJk4QYoSwnc9oizqt6PkzwJVbn7+2HnyGpDRZZzS8sEBMGoFBdyE7ABqKwjf2fxNEEA0CwPtiFL1yhD/nTUPzrGmFAXNMWYNr1dbY+tYTfY3QwgbPYFs+jyMkkkaJCxnDv1M49ZeMJ2jpz/kXBBB6I/Xma27nn6fDxSTqJfAjeVam7PB9n9oQG0j/tdVQ4aI13YCdC0N0jrvBtY87ktvzwPlc5F9w==
 aahar...@wikimedia.org]
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAACAQDNENRIzkpsjf/EZjx1r8RGZ8OLVO5GG64RBuURLPHaD2Ple56UcdpNnoLeWn219s4VSjyQHb9rBY1kmMKIB7KOhqEUy0Gw3xC++MB6aoXQI1yV62ycjrQf18i+xTG9LiJ6bbFQXoXx9hUg0bI+R1rVhz8/iHiZMd0U+EUDozct5VAQvCHX4hh02b3DDCHklVIak+3s/8Urw7rPxiO5oU9Fxbrc3bkcTdpKWdKakLWffjrmLwiHkVEEKSnxru1qvhf7YG74YwHAaKOY/G5og79mDor2kNKgVnj/pLbGrseD/Ul+ntrQ38iFXQzw4ysXq+Fc9iRNmP1EJEAYreUxG3oAwGmlSdLS+w1QXtBYzTDUXj0fuRr9/jHEu6i6zotCu7viP4+l1+0O4jeQp7cfOLwPb8gcz//ms8GwL4FQvLEQK0AWnCYsVZCxf9NARWoLlVQY4pFdFxcLZOiifbJk4QYoSwnc9oizqt6PkzwJVbn7+2HnyGpDRZZzS8sEBMGoFBdyE7ABqKwjf2fxNEEA0CwPtiFL1yhD/nTUPzrGmFAXNMWYNr1dbY+tYTfY3QwgbPYFs+jyMkkkaJCxnDv1M49ZeMJ2jpz/kXBBB6I/Xma27nn6fDxSTqJfAjeVam7PB9n9oQG0j/tdVQ4aI13YCdC0N0jrvBtY87ktvzwPlc5F9w==
 aahar...@wikimedia.org]
 uid: 2076
   legoktm:
 ensure: present

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I848a0f338baa252241e27d1cf27323111843ae3a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] Fix typo in amire80's new key - change (operations/puppet)

2016-01-06 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Fix typo in amire80's new key
..

Fix typo in amire80's new key

missing an s

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/262854/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index a17541e..177faa2 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1091,7 +1091,7 @@
 gid: 500
 name: amire80
 realname: Amir Aharoni
-ssh_keys: [sh-rsa 
B3NzaC1yc2EDAQABAAACAQDNENRIzkpsjf/EZjx1r8RGZ8OLVO5GG64RBuURLPHaD2Ple56UcdpNnoLeWn219s4VSjyQHb9rBY1kmMKIB7KOhqEUy0Gw3xC++MB6aoXQI1yV62ycjrQf18i+xTG9LiJ6bbFQXoXx9hUg0bI+R1rVhz8/iHiZMd0U+EUDozct5VAQvCHX4hh02b3DDCHklVIak+3s/8Urw7rPxiO5oU9Fxbrc3bkcTdpKWdKakLWffjrmLwiHkVEEKSnxru1qvhf7YG74YwHAaKOY/G5og79mDor2kNKgVnj/pLbGrseD/Ul+ntrQ38iFXQzw4ysXq+Fc9iRNmP1EJEAYreUxG3oAwGmlSdLS+w1QXtBYzTDUXj0fuRr9/jHEu6i6zotCu7viP4+l1+0O4jeQp7cfOLwPb8gcz//ms8GwL4FQvLEQK0AWnCYsVZCxf9NARWoLlVQY4pFdFxcLZOiifbJk4QYoSwnc9oizqt6PkzwJVbn7+2HnyGpDRZZzS8sEBMGoFBdyE7ABqKwjf2fxNEEA0CwPtiFL1yhD/nTUPzrGmFAXNMWYNr1dbY+tYTfY3QwgbPYFs+jyMkkkaJCxnDv1M49ZeMJ2jpz/kXBBB6I/Xma27nn6fDxSTqJfAjeVam7PB9n9oQG0j/tdVQ4aI13YCdC0N0jrvBtY87ktvzwPlc5F9w==
 aahar...@wikimedia.org]
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAACAQDNENRIzkpsjf/EZjx1r8RGZ8OLVO5GG64RBuURLPHaD2Ple56UcdpNnoLeWn219s4VSjyQHb9rBY1kmMKIB7KOhqEUy0Gw3xC++MB6aoXQI1yV62ycjrQf18i+xTG9LiJ6bbFQXoXx9hUg0bI+R1rVhz8/iHiZMd0U+EUDozct5VAQvCHX4hh02b3DDCHklVIak+3s/8Urw7rPxiO5oU9Fxbrc3bkcTdpKWdKakLWffjrmLwiHkVEEKSnxru1qvhf7YG74YwHAaKOY/G5og79mDor2kNKgVnj/pLbGrseD/Ul+ntrQ38iFXQzw4ysXq+Fc9iRNmP1EJEAYreUxG3oAwGmlSdLS+w1QXtBYzTDUXj0fuRr9/jHEu6i6zotCu7viP4+l1+0O4jeQp7cfOLwPb8gcz//ms8GwL4FQvLEQK0AWnCYsVZCxf9NARWoLlVQY4pFdFxcLZOiifbJk4QYoSwnc9oizqt6PkzwJVbn7+2HnyGpDRZZzS8sEBMGoFBdyE7ABqKwjf2fxNEEA0CwPtiFL1yhD/nTUPzrGmFAXNMWYNr1dbY+tYTfY3QwgbPYFs+jyMkkkaJCxnDv1M49ZeMJ2jpz/kXBBB6I/Xma27nn6fDxSTqJfAjeVam7PB9n9oQG0j/tdVQ4aI13YCdC0N0jrvBtY87ktvzwPlc5F9w==
 aahar...@wikimedia.org]
 uid: 2076
   legoktm:
 ensure: present

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I848a0f338baa252241e27d1cf27323111843ae3a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] Update the ssh key for amire80 - change (operations/puppet)

2016-01-06 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Update the ssh key for amire80
..


Update the ssh key for amire80

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

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 4cd22bf..a17541e 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1091,8 +1091,7 @@
 gid: 500
 name: amire80
 realname: Amir Aharoni
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC7njjWSs4MH87cSwBb7IreKEaftiWemChkpeI4bPODhFmziTwvv1PPpsdGHbew5OM/8Oj9YlKSpiHG2tRaOK3kObolwKXX9vC7cFa9wQ6UU2ZN9RZNb73H8ZmFNwEzIqAKoFuF2V7d1x68Oxf2fQXzCHzhG3Zx3qEowRkQY+8MFpSHlDfO7ZcYr01W2pD92xyH6HVt4fr1mFOpqRSp0aMR5mifgC2ugf6kFkWkNEoYHuTsyK3qWaLjnd9FfegEX6wEhS4RwPWg1gqUY+1wJcKnSqUBV04swqhGOz6YzM/HTekboC0kJtMj8D35lepak9Z9I4MHTQpeBxnqaUq9c2cB
-amire80@theodor]
+ssh_keys: [sh-rsa 
B3NzaC1yc2EDAQABAAACAQDNENRIzkpsjf/EZjx1r8RGZ8OLVO5GG64RBuURLPHaD2Ple56UcdpNnoLeWn219s4VSjyQHb9rBY1kmMKIB7KOhqEUy0Gw3xC++MB6aoXQI1yV62ycjrQf18i+xTG9LiJ6bbFQXoXx9hUg0bI+R1rVhz8/iHiZMd0U+EUDozct5VAQvCHX4hh02b3DDCHklVIak+3s/8Urw7rPxiO5oU9Fxbrc3bkcTdpKWdKakLWffjrmLwiHkVEEKSnxru1qvhf7YG74YwHAaKOY/G5og79mDor2kNKgVnj/pLbGrseD/Ul+ntrQ38iFXQzw4ysXq+Fc9iRNmP1EJEAYreUxG3oAwGmlSdLS+w1QXtBYzTDUXj0fuRr9/jHEu6i6zotCu7viP4+l1+0O4jeQp7cfOLwPb8gcz//ms8GwL4FQvLEQK0AWnCYsVZCxf9NARWoLlVQY4pFdFxcLZOiifbJk4QYoSwnc9oizqt6PkzwJVbn7+2HnyGpDRZZzS8sEBMGoFBdyE7ABqKwjf2fxNEEA0CwPtiFL1yhD/nTUPzrGmFAXNMWYNr1dbY+tYTfY3QwgbPYFs+jyMkkkaJCxnDv1M49ZeMJ2jpz/kXBBB6I/Xma27nn6fDxSTqJfAjeVam7PB9n9oQG0j/tdVQ4aI13YCdC0N0jrvBtY87ktvzwPlc5F9w==
 aahar...@wikimedia.org]
 uid: 2076
   legoktm:
 ensure: present

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25f27d65c37d2e47133d845116c8013e3c02994c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] Add tests for "missing-language" errors from EditEntity - change (mediawiki...Wikibase)

2016-01-06 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Add tests for "missing-language" errors from EditEntity
..

Add tests for "missing-language" errors from EditEntity

As asked for by the todo

Change-Id: Id62ae64cf1b1c6be8b4af56d04e69fb80be90c0a
---
M repo/tests/phpunit/includes/api/EditEntityTest.php
1 file changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/repo/tests/phpunit/includes/api/EditEntityTest.php 
b/repo/tests/phpunit/includes/api/EditEntityTest.php
index b22cad3..0a3417d 100644
--- a/repo/tests/phpunit/includes/api/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/api/EditEntityTest.php
@@ -519,7 +519,18 @@
. 
TermTestHelper::makeOverlyLongString() . '"}}}'
),
'e' => array( 'exception' => array( 'type' => 
'UsageException' ) ) ),
-   //@todo add check for bug T54731 once fixed
+   'missing language in labels (T54731)' => array(
+   'p' => array(
+   'site' => 'enwiki',
+   'title' => 'Berlin',
+   'data' => 
'{"labels":{"de":{"site":"pt","title":"TestString"}}}'
+   ),
+   'e' => array( 'exception' => array(
+   'type' => 'UsageException',
+   'code' => 'missing-language',
+   'message' => '\'language\' was not 
found in the label or description json for de'
+   ) )
+   ),
'removing invalid claim fails' => array(
'p' => array(
'site' => 'enwiki',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id62ae64cf1b1c6be8b4af56d04e69fb80be90c0a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] Update the ssh key for amire80 - change (operations/puppet)

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

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

Change subject: Update the ssh key for amire80
..

Update the ssh key for amire80

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/262852/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 4cd22bf..a17541e 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1091,8 +1091,7 @@
 gid: 500
 name: amire80
 realname: Amir Aharoni
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC7njjWSs4MH87cSwBb7IreKEaftiWemChkpeI4bPODhFmziTwvv1PPpsdGHbew5OM/8Oj9YlKSpiHG2tRaOK3kObolwKXX9vC7cFa9wQ6UU2ZN9RZNb73H8ZmFNwEzIqAKoFuF2V7d1x68Oxf2fQXzCHzhG3Zx3qEowRkQY+8MFpSHlDfO7ZcYr01W2pD92xyH6HVt4fr1mFOpqRSp0aMR5mifgC2ugf6kFkWkNEoYHuTsyK3qWaLjnd9FfegEX6wEhS4RwPWg1gqUY+1wJcKnSqUBV04swqhGOz6YzM/HTekboC0kJtMj8D35lepak9Z9I4MHTQpeBxnqaUq9c2cB
-amire80@theodor]
+ssh_keys: [sh-rsa 
B3NzaC1yc2EDAQABAAACAQDNENRIzkpsjf/EZjx1r8RGZ8OLVO5GG64RBuURLPHaD2Ple56UcdpNnoLeWn219s4VSjyQHb9rBY1kmMKIB7KOhqEUy0Gw3xC++MB6aoXQI1yV62ycjrQf18i+xTG9LiJ6bbFQXoXx9hUg0bI+R1rVhz8/iHiZMd0U+EUDozct5VAQvCHX4hh02b3DDCHklVIak+3s/8Urw7rPxiO5oU9Fxbrc3bkcTdpKWdKakLWffjrmLwiHkVEEKSnxru1qvhf7YG74YwHAaKOY/G5og79mDor2kNKgVnj/pLbGrseD/Ul+ntrQ38iFXQzw4ysXq+Fc9iRNmP1EJEAYreUxG3oAwGmlSdLS+w1QXtBYzTDUXj0fuRr9/jHEu6i6zotCu7viP4+l1+0O4jeQp7cfOLwPb8gcz//ms8GwL4FQvLEQK0AWnCYsVZCxf9NARWoLlVQY4pFdFxcLZOiifbJk4QYoSwnc9oizqt6PkzwJVbn7+2HnyGpDRZZzS8sEBMGoFBdyE7ABqKwjf2fxNEEA0CwPtiFL1yhD/nTUPzrGmFAXNMWYNr1dbY+tYTfY3QwgbPYFs+jyMkkkaJCxnDv1M49ZeMJ2jpz/kXBBB6I/Xma27nn6fDxSTqJfAjeVam7PB9n9oQG0j/tdVQ4aI13YCdC0N0jrvBtY87ktvzwPlc5F9w==
 aahar...@wikimedia.org]
 uid: 2076
   legoktm:
 ensure: present

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

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

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


[MediaWiki-commits] [Gerrit] Directly reference static field in persistence helpers witho... - change (apps...wikipedia)

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

Change subject: Directly reference static field in persistence helpers without 
instances
..


Directly reference static field in persistence helpers without instances

I'm unsure whether or not this will improve performance, but I think it
improves code readability since it's more clear at a glance what it is
actually happening.

Change-Id: I1285205fb00803492375740dd6a69ff088b7d65e
---
M app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
M app/src/main/java/org/wikipedia/history/SaveHistoryTask.java
M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
M app/src/main/java/org/wikipedia/savedpages/DeleteSavedPageTask.java
M app/src/main/java/org/wikipedia/savedpages/SavePageTask.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
7 files changed, 9 insertions(+), 7 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java 
b/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
index 9c4156f..28dbadd 100644
--- a/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
+++ b/app/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
@@ -69,7 +69,7 @@
 public void persistSummary() {
 WikipediaApp app = 
(WikipediaApp)container.getContext().getApplicationContext();
 EditSummary summary = new 
EditSummary(summaryEdit.getText().toString(), new Date());
-app.getPersister(EditSummary.class).upsert(summary, 
EditSummary.PERSISTENCE_HELPER.SELECTION_KEYS);
+app.getPersister(EditSummary.class).upsert(summary, 
EditSummaryPersistenceHelper.SELECTION_KEYS);
 }
 
 public boolean handleBackPressed() {
diff --git a/app/src/main/java/org/wikipedia/history/HistoryFragment.java 
b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
index d2a30ea..8b140c3 100644
--- a/app/src/main/java/org/wikipedia/history/HistoryFragment.java
+++ b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
@@ -149,7 +149,7 @@
 if (checkedItems.valueAt(i)) {
 
app.getPersister(HistoryEntry.class).delete(
 
HistoryEntry.PERSISTENCE_HELPER.fromCursor((Cursor) 
adapter.getItem(checkedItems.keyAt(i))),
-
HistoryEntry.PERSISTENCE_HELPER.SELECTION_KEYS);
+
HistoryEntryPersistenceHelper.SELECTION_KEYS);
 }
 }
 if (checkedItems.size() == 
historyEntryList.getAdapter().getCount()) {
diff --git a/app/src/main/java/org/wikipedia/history/SaveHistoryTask.java 
b/app/src/main/java/org/wikipedia/history/SaveHistoryTask.java
index b165125..76b65cb 100644
--- a/app/src/main/java/org/wikipedia/history/SaveHistoryTask.java
+++ b/app/src/main/java/org/wikipedia/history/SaveHistoryTask.java
@@ -26,7 +26,7 @@
 // that all previous instances will be deleted, and then only the most 
recent instance
 // will be placed at the top.
 final ContentPersister persister = 
app.getPersister(HistoryEntry.class);
-persister.delete(entry, 
HistoryEntry.PERSISTENCE_HELPER.SELECTION_KEYS);
+persister.delete(entry, HistoryEntryPersistenceHelper.SELECTION_KEYS);
 persister.persist(entry);
 return null;
 }
diff --git a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java 
b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
index 86f735b..4b92f64 100644
--- a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
+++ b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
@@ -11,6 +11,7 @@
 import org.wikipedia.page.bottomcontent.BottomContentHandler;
 import org.wikipedia.page.bottomcontent.BottomContentInterface;
 import org.wikipedia.page.leadimages.LeadImagesHandler;
+import org.wikipedia.pageimages.PageImagePersistenceHelper;
 import org.wikipedia.server.PageLead;
 import org.wikipedia.server.PageRemaining;
 import org.wikipedia.server.ServiceError;
@@ -786,7 +787,7 @@
 public void onFinish(Map result) {
 if (result.containsKey(model.getTitle())) {
 PageImage pi = new PageImage(model.getTitle(), 
result.get(model.getTitle()));
-app.getPersister(PageImage.class).upsert(pi, 
PageImage.PERSISTENCE_HELPER.SELECTION_KEYS);
+app.getPersister(PageImage.class).upsert(pi, 
PageImagePersistenceHelper.SELECTION_KEYS);
 updateThumbnail(result.get(model.getTit

[MediaWiki-commits] [Gerrit] testreduce: declare log directory - change (operations/puppet)

2016-01-06 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: testreduce: declare log directory
..


testreduce: declare log directory

Change-Id: I46db1be95e3dfb17c791ab18fcd270b14032ecd6
---
M modules/testreduce/manifests/init.pp
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/testreduce/manifests/init.pp 
b/modules/testreduce/manifests/init.pp
index f045fdb..a8bb0f0 100644
--- a/modules/testreduce/manifests/init.pp
+++ b/modules/testreduce/manifests/init.pp
@@ -47,6 +47,13 @@
 system => true,
 }
 
+file { '/var/log/testreduce':
+ensure => directory,
+owner  => 'testreduce',
+group  => 'testreduce',
+mode   => '0755',
+}
+
 file { '/etc/testreduce':
 ensure => directory,
 owner  => 'root',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46db1be95e3dfb17c791ab18fcd270b14032ecd6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] testreduce: declare log directory - change (operations/puppet)

2016-01-06 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: testreduce: declare log directory
..

testreduce: declare log directory

Change-Id: I46db1be95e3dfb17c791ab18fcd270b14032ecd6
---
M modules/testreduce/manifests/init.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/262851/1

diff --git a/modules/testreduce/manifests/init.pp 
b/modules/testreduce/manifests/init.pp
index f045fdb..a8bb0f0 100644
--- a/modules/testreduce/manifests/init.pp
+++ b/modules/testreduce/manifests/init.pp
@@ -47,6 +47,13 @@
 system => true,
 }
 
+file { '/var/log/testreduce':
+ensure => directory,
+owner  => 'testreduce',
+group  => 'testreduce',
+mode   => '0755',
+}
+
 file { '/etc/testreduce':
 ensure => directory,
 owner  => 'root',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46db1be95e3dfb17c791ab18fcd270b14032ecd6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Stop using broken image links in tests - change (mediawiki...VisualEditor)

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

Change subject: Stop using broken image links in tests
..


Stop using broken image links in tests

They make it a little bit more cluttered to hunt down problems when
testing. So, use the minimum image instead of just "Foo" or similar.

Bug: T121636
Change-Id: I3209c377ad870f669cac7d40d991968cff52c39e
---
M modules/ve-mw/tests/dm/ve.dm.mwExample.js
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/modules/ve-mw/tests/dm/ve.dm.mwExample.js 
b/modules/ve-mw/tests/dm/ve.dm.mwExample.js
index cc968ad..b82283a 100644
--- a/modules/ve-mw/tests/dm/ve.dm.mwExample.js
+++ b/modules/ve-mw/tests/dm/ve.dm.mwExample.js
@@ -256,7 +256,7 @@
 ve.dm.mwExample.MWBlockImage = {
html:
'' +
-   '' +
+   '' +
'abc' +
'',
data: [
@@ -266,7 +266,7 @@
type: 'thumb',
align: 'right',
href: 'Foo',
-   src: 'Bar',
+   src: ve.ce.minImgDataUri,
width: 1,
height: 2,
resource: 'FooBar',
@@ -1171,7 +1171,7 @@
'mw:AlienInlineExtension': {
body:
'' +
-   '' +
'',
@@ -1179,7 +1179,7 @@
'' +
'' +
+   ' src="' + ve.ce.minImgDataUri + '" 
width="100" height="20" alt="Bar" data-parsoid="1" about="#mwt1" />' +
'',
data: [
{ type: 'paragraph' },
@@ -1195,7 +1195,7 @@
},
originalMw: 
'{"name":"score","attrs":{},"body":{"extsrc":"relative c\' { e d c d e e e 
}"}}'
},
-   originalDomElements: $( '' 
).toArray()
+   originalDomElements: $( '' ).toArray()
},
{ type: '/mwAlienInlineExtension' },
{ type: '/paragraph' },
@@ -1913,7 +1913,7 @@
body:
'' +
'' +
-   '' +
+   '' +
'' +
'' +
' foo bar baz' +
@@ -1922,7 +1922,7 @@
fromDataBody:
'' +
'' +
-   '' +
+   '' +
'' +
'' +
' foo bar 
baz' +
@@ -1936,7 +1936,7 @@
type: 'thumb',
align: 'default',
href: 'Foo',
-   src: 'Bar',
+   src: ve.ce.minImgDataUri,
width: 1,
height: 2,
resource: 'FooBar'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3209c377ad870f669cac7d40d991968cff52c39e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 96677fb..7a39be3 - change (mediawiki/extensions)

2016-01-06 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 96677fb..7a39be3
..


Syncronize VisualEditor: 96677fb..7a39be3

Change-Id: Ie31114d3e00ad0a2866930330af14c4b6191de15
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 96677fb..7a39be3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 96677fb74ace87a4d752e450c1f5b7e372a73fe2
+Subproject commit 7a39be3798c01f05c8b5a450e014624178b8a23c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie31114d3e00ad0a2866930330af14c4b6191de15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 96677fb..7a39be3 - change (mediawiki/extensions)

2016-01-06 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 96677fb..7a39be3
..

Syncronize VisualEditor: 96677fb..7a39be3

Change-Id: Ie31114d3e00ad0a2866930330af14c4b6191de15
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor b/VisualEditor
index 96677fb..7a39be3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 96677fb74ace87a4d752e450c1f5b7e372a73fe2
+Subproject commit 7a39be3798c01f05c8b5a450e014624178b8a23c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie31114d3e00ad0a2866930330af14c4b6191de15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Update annotations to be more sane - change (mediawiki...CirrusSearch)

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

Change subject: Update annotations to be more sane
..


Update annotations to be more sane

A wide variety of annotations were either missing, or using incorrect
syntax like @var where it should have been @param, or @param  
instead of @param  . This tries to clean up a wide variety
of them.

Change-Id: I2b46aac3484e8f02a5ef3031bc5dab8646e6134e
---
M includes/BuildDocument/SuggestScoring.php
M includes/CirrusSearch.php
M includes/ClusterSettings.php
M includes/Connection.php
M includes/DataSender.php
M includes/Dump.php
M includes/ElasticsearchIntermediary.php
M includes/Hooks.php
M includes/InterwikiSearcher.php
M includes/Maintenance/ChunkBuilder.php
M includes/Maintenance/StreamingForkController.php
M includes/Maintenance/Validators/Validator.php
M includes/NearMatchPicker.php
M includes/OtherIndexes.php
M includes/Search/Result.php
M includes/Search/ResultSet.php
M includes/SearchConfig.php
M includes/Searcher.php
M includes/Updater.php
M includes/UserTesting.php
M includes/Util.php
M includes/Version.php
M maintenance/checkIndexes.php
M maintenance/copySearchIndex.php
M maintenance/dumpIndex.php
M maintenance/forceSearchIndex.php
M maintenance/runSearch.php
M maintenance/saneitize.php
M maintenance/updateOneSearchIndexConfig.php
M maintenance/updateSuggesterIndex.php
M maintenance/updateVersionIndex.php
31 files changed, 479 insertions(+), 105 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  DCausse: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/BuildDocument/SuggestScoring.php 
b/includes/BuildDocument/SuggestScoring.php
index 7cd1abc..b42342d 100644
--- a/includes/BuildDocument/SuggestScoring.php
+++ b/includes/BuildDocument/SuggestScoring.php
@@ -27,7 +27,7 @@
 
 class SuggestScoringMethodFactory {
/**
-* @param $scoringMethods string the name of the scoring method
+* @param string $scoringMethods the name of the scoring method
 * @return SuggestScoringMethod
 */
public static function getScoringMethod( $scoringMethod, $maxDocs ) {
@@ -43,7 +43,7 @@
 
 interface SuggestScoringMethod {
/**
-* @param $doc array A document from the PAGE type
+* @param array $doc A document from the PAGE type
 * @return int the weight of the document
 */
public function score( $doc );
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index 3bd501b..18ce04b 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -159,7 +159,7 @@
}
 
/**
-* @var string $lang Language code to find wiki for
+* @param string $lang Language code to find wiki for
 * @return string|null The wiki related to specified language code
 */
private function wikiForLanguage( $lang ) {
@@ -180,10 +180,19 @@
return array( $interwiki, $interWikiId );
}
 
+   /**
+* @param string $feature
+* @return bool
+*/
private function isFeatureEnabled( $feature ) {
return isset( $this->features[$feature] ) && 
$this->features[$feature];
}
 
+   /**
+* @param string $term
+* @param ResultSet $oldResult
+* @return ResultSet
+*/
private function searchTextSecondTry( $term, ResultSet $oldResult ) {
// TODO: figure out who goes first - language or suggestion?
if ( $oldResult->numRows() == 0 && $oldResult->hasSuggestion() 
) {
@@ -235,7 +244,7 @@
 * Do the hard part of the searching - actual Searcher invocation
 * @param string $term
 * @param SearchConfig $config
-* @return NULL|Status|ResultSet
+* @return null|Status|ResultSet
 */
private function searchTextReal( $term, SearchConfig $config = null ) {
global $wgCirrusSearchInterwikiSources;
@@ -471,6 +480,12 @@
return SearchSuggestionSet::fromTitles( $titles );
}
 
+   /**
+* @param string $term
+* @param Searcher $searcher
+* @param array $options
+* @return Status
+*/
private function moreLikeThis( $term, $searcher, $options ) {
// Expand titles chasing through redirects
$titles = array();
@@ -506,9 +521,10 @@
}
return Status::newGood( new SearchResultSet( true ) /* empty */ 
);
}
+
/**
 * Merge the prefix into the query (if any).
-* @var string $term search term
+* @param string $term search term
 * @return string possibly with a prefix appended
 */
public function transformSearchTerm( $term ) {
@@ -519,6 +535,10 @@
return $term;
}
 
+   /**
+* @param string $qu

[MediaWiki-commits] [Gerrit] Use wikimedia debian mirror - change (operations...debian)

2016-01-06 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Use wikimedia debian mirror
..


Use wikimedia debian mirror

Change-Id: Ibafd3fbff3f10aa55af3a2b14236ca38d43dca66
---
M mirror
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/mirror b/mirror
index 7f41354..1a4b744 100644
--- a/mirror
+++ b/mirror
@@ -1 +1 @@
-http://httpredir.debian.org/debian
+http://mirrors.wikimedia.org/debian

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibafd3fbff3f10aa55af3a2b14236ca38d43dca66
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/debian
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 739b4c7..96677fb - change (mediawiki/extensions)

2016-01-06 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 739b4c7..96677fb
..

Syncronize VisualEditor: 739b4c7..96677fb

Change-Id: I85ccfb0aa583dda5e95124777395d9bb6ba3cc0e
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor b/VisualEditor
index 739b4c7..96677fb 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 739b4c796d6bf4651006cc1e1305eb869ab024e8
+Subproject commit 96677fb74ace87a4d752e450c1f5b7e372a73fe2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85ccfb0aa583dda5e95124777395d9bb6ba3cc0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] [BrowserTest] Experimenting with JS object references - change (mediawiki...VisualEditor)

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

Change subject: [BrowserTest] Experimenting with JS object references
..


[BrowserTest] Experimenting with JS object references

References to JS objects for VE elements can determined by referencing
the VE and OOUI API documentation[1][2] and interrogating the objects in
a browser console. Errors should be closer to what developers understand
but testers should pair with developers to better understand how to
define new page elements and where to go for documentation/help.

The VE entrypoint for the singleton reference is `ve.init.target` (if
there's only one instance of VE target; there may be multiple in some
cases like Flow).

[1] https://doc.wikimedia.org/VisualEditor/master/
[2] https://doc.wikimedia.org/oojs-ui/master/js/

Change-Id: I1f642807cdd3059d8e7e885a8b239ac01b9b3024
---
M Gemfile.lock
M modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
3 files changed, 20 insertions(+), 8 deletions(-)

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



diff --git a/Gemfile.lock b/Gemfile.lock
index 40f5127..9f9a1da 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,11 +1,11 @@
 GEM
   remote: https://rubygems.org/
   specs:
-ast (2.1.0)
+ast (2.2.0)
 astrolabe (1.3.1)
   parser (~> 2.2)
 builder (3.2.2)
-childprocess (0.5.8)
+childprocess (0.5.9)
   ffi (~> 1.0, >= 1.0.11)
 chunky_png (1.3.5)
 commons_upload (0.0.4)
@@ -97,7 +97,7 @@
 watir-webdriver (0.9.1)
   selenium-webdriver (>= 2.46.2)
 websocket (1.2.2)
-yml_reader (0.6)
+yml_reader (0.7)
 
 PLATFORMS
   ruby
@@ -108,3 +108,6 @@
   rake (~> 10.4, >= 10.4.2)
   rubocop (~> 0.32.1)
   screenshot (~> 0.0.7)
+
+BUNDLED WITH
+   1.10.6
diff --git 
a/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb 
b/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
index e191ef1..c5117d6 100644
--- 
a/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
+++ 
b/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
@@ -1,5 +1,5 @@
 When(/^I click the Bold menu option$/) do
-  on(VisualEditorPage).ve_bold_text_element.when_present(15).click
+  on(VisualEditorPage).ve_bold_text_element.when_present.click
 end
 
 When(/^I click the Computer Code menu option$/) do
@@ -7,7 +7,7 @@
 end
 
 When(/^I click the Italics menu option$/) do
-  on(VisualEditorPage).ve_italics_element.when_present(15).click
+  on(VisualEditorPage).ve_italics_element.when_present.click
 end
 
 When(/^I click the More option$/) do
diff --git 
a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 
b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
index d77b87a..cb7bea6 100644
--- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
+++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
@@ -56,7 +56,6 @@
   span(:confirm_switch_cancel_on_switch, text: 'Cancel')
   span(:confirm_switch_discard, text: 'Discard changes')
   span(:option_to_always_show_TOC, css: 
'div.oo-ui-fieldLayout-align-top:nth-child(4) > div:nth-child(2) > 
div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > 
span:nth-child(2)')
-  div(:content, class: 've-ce-branchNode')
   span(:decrease_indentation, class: 'oo-ui-iconElement-icon 
oo-ui-icon-outdent')
   text_area(:describe_change, index: 0)
   div(:diff_view, class: 've-ui-mwSaveDialog-viewer')
@@ -177,11 +176,9 @@
   div(:toolbar_actions, class: 'oo-ui-toolbar-actions')
   a(:transclusion, css: 
'span.oo-ui-widget.oo-ui-iconElement.oo-ui-tool.oo-ui-tool-name-transclusion.oo-ui-widget-enabled
 > a')
   text_field(:transclusion_description, css: '.oo-ui-inputWidget > 
input:nth-child(1)')
-  span(:ve_bold_text, class: 'oo-ui-iconElement-icon oo-ui-icon-bold')
   span(:ve_bullets, css: '.oo-ui-clippableElement-clippable 
.oo-ui-iconElement-icon.oo-ui-icon-listBullet')
   span(:ve_computer_code, class: 'oo-ui-iconElement-icon oo-ui-icon-code')
   div(:ve_heading_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-down')
-  span(:ve_italics, class: 'oo-ui-iconElement-icon oo-ui-icon-italic')
   span(:ve_link_icon, class: 'oo-ui-iconElement-icon oo-ui-icon-link')
   span(:ve_link_ui, class: 'oo-ui-widget oo-ui-widget-enabled 
oo-ui-labelElement-label oo-ui-labelWidget oo-ui-processDialog-title 
oo-ui-labelElement', text: 'Link')
   span(:ve_media_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-picture')
@@ -203,6 +200,18 @@
   div(:media_alternative_block, class: 'oo-ui-layout oo-ui-iconElement 
oo-ui-labelElement oo-ui-fieldsetLayout', index: 2)
   div(:media_advanced_settings, class: 'oo-ui-outlineOptionWidget-level-0', 
index: 1)
 
+  def ve_bold_text_element
+@

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 739b4c7..96677fb - change (mediawiki/extensions)

2016-01-06 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 739b4c7..96677fb
..


Syncronize VisualEditor: 739b4c7..96677fb

Change-Id: I85ccfb0aa583dda5e95124777395d9bb6ba3cc0e
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 739b4c7..96677fb 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 739b4c796d6bf4651006cc1e1305eb869ab024e8
+Subproject commit 96677fb74ace87a4d752e450c1f5b7e372a73fe2

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85ccfb0aa583dda5e95124777395d9bb6ba3cc0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Add dependency from Math tests to Wikidata - change (integration/config)

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

Change subject: Add dependency from Math tests to Wikidata
..


Add dependency from Math tests to Wikidata

Bug: T122656
Change-Id: Id5307c94ca1b9bd02ebe2317a16ae1ff9090f05b
---
M zuul/ext_dependencies.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/zuul/ext_dependencies.py b/zuul/ext_dependencies.py
index 52b0adb..1149f24 100755
--- a/zuul/ext_dependencies.py
+++ b/zuul/ext_dependencies.py
@@ -27,7 +27,7 @@
 'LanguageTool': ['VisualEditor'],
 'LifeWeb': ['LifeWebCore'],
 'MassMessage': ['LiquidThreads'],
-'Math': ['VisualEditor'],
+'Math': ['VisualEditor', 'Wikidata'],
 'MathSearch': ['Math'],
 'MobileFrontend': ['Echo', 'VisualEditor'],
 'NavigationTiming': ['EventLogging'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5307c94ca1b9bd02ebe2317a16ae1ff9090f05b
Gerrit-PatchSet: 5
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use wikimedia debian mirror - change (operations...debian)

2016-01-06 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Use wikimedia debian mirror
..

Use wikimedia debian mirror

Change-Id: Ibafd3fbff3f10aa55af3a2b14236ca38d43dca66
---
M mirror
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/docker-images/debian 
refs/changes/48/262848/1

diff --git a/mirror b/mirror
index 7f41354..1a4b744 100644
--- a/mirror
+++ b/mirror
@@ -1 +1 @@
-http://httpredir.debian.org/debian
+http://mirrors.wikimedia.org/debian

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibafd3fbff3f10aa55af3a2b14236ca38d43dca66
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/debian
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Fix link to PNG fallback for IE 8 and older - change (mediawiki...Math)

2016-01-06 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Fix link to PNG fallback for IE 8 and older
..


Fix link to PNG fallback for IE 8 and older

Change-Id: Iffb65af756a8fc53fcc9f484c783f69f8d908690
---
M modules/ext.math.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ext.math.js b/modules/ext.math.js
index 085260d..b50b889 100644
--- a/modules/ext.math.js
+++ b/modules/ext.math.js
@@ -16,7 +16,7 @@
// Create a new PNG image to use as the fallback.
img = document.createElement( 'img' );
url = this.style.backgroundImage.match( 
/url\('?([^']*)'?\)/ )[ 1 ];
-   img.setAttribute( 'src', url.replace( 'mode=' + 
'mathml', 'mode=' + 'png' ) );
+   img.setAttribute( 'src', url.replace( 
'media/math/render/svg/', 'media/math/render/png/' ) );
img.setAttribute( 'class', 'tex 
mwe-math-fallback-image-' + ( $( this ).hasClass( 
'mwe-math-fallback-image-inline' ) ? 'inline' : 'display' ) );
img.setAttribute( 'aria-hidden', 'true' );
this.parentNode.insertBefore( img, this );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffb65af756a8fc53fcc9f484c783f69f8d908690
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Stop using broken image links in tests - change (mediawiki...VisualEditor)

2016-01-06 Thread DLynch (Code Review)
DLynch has uploaded a new change for review.

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

Change subject: Stop using broken image links in tests
..

Stop using broken image links in tests

They make it a little bit more cluttered to hunt down problems when
testing. So, use the minimum image instead of just "Foo" or similar.

Bug: T121636
Change-Id: I3209c377ad870f669cac7d40d991968cff52c39e
---
M lib/ve
M modules/ve-mw/tests/dm/ve.dm.mwExample.js
2 files changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/lib/ve b/lib/ve
index a909501..ca1750e 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit a9095015107f9a32ae597b962de1e29d5e7a886a
+Subproject commit ca1750e991198b0c5d9e2a3b95ceff4acd77446c
diff --git a/modules/ve-mw/tests/dm/ve.dm.mwExample.js 
b/modules/ve-mw/tests/dm/ve.dm.mwExample.js
index cc968ad..b82283a 100644
--- a/modules/ve-mw/tests/dm/ve.dm.mwExample.js
+++ b/modules/ve-mw/tests/dm/ve.dm.mwExample.js
@@ -256,7 +256,7 @@
 ve.dm.mwExample.MWBlockImage = {
html:
'' +
-   '' +
+   '' +
'abc' +
'',
data: [
@@ -266,7 +266,7 @@
type: 'thumb',
align: 'right',
href: 'Foo',
-   src: 'Bar',
+   src: ve.ce.minImgDataUri,
width: 1,
height: 2,
resource: 'FooBar',
@@ -1171,7 +1171,7 @@
'mw:AlienInlineExtension': {
body:
'' +
-   '' +
'',
@@ -1179,7 +1179,7 @@
'' +
'' +
+   ' src="' + ve.ce.minImgDataUri + '" 
width="100" height="20" alt="Bar" data-parsoid="1" about="#mwt1" />' +
'',
data: [
{ type: 'paragraph' },
@@ -1195,7 +1195,7 @@
},
originalMw: 
'{"name":"score","attrs":{},"body":{"extsrc":"relative c\' { e d c d e e e 
}"}}'
},
-   originalDomElements: $( '' 
).toArray()
+   originalDomElements: $( '' ).toArray()
},
{ type: '/mwAlienInlineExtension' },
{ type: '/paragraph' },
@@ -1913,7 +1913,7 @@
body:
'' +
'' +
-   '' +
+   '' +
'' +
'' +
' foo bar baz' +
@@ -1922,7 +1922,7 @@
fromDataBody:
'' +
'' +
-   '' +
+   '' +
'' +
'' +
' foo bar 
baz' +
@@ -1936,7 +1936,7 @@
type: 'thumb',
align: 'default',
href: 'Foo',
-   src: 'Bar',
+   src: ve.ce.minImgDataUri,
width: 1,
height: 2,
resource: 'FooBar'

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

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

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


[MediaWiki-commits] [Gerrit] Fix CONTENT-LENGTH header in WebRequestUpload - change (mediawiki/core)

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

Change subject: Fix CONTENT-LENGTH header in WebRequestUpload
..


Fix CONTENT-LENGTH header in WebRequestUpload

Bug: T118673
Change-Id: I30263f552efe3fea9471841c0a535123c119efe1
---
M includes/WebRequestUpload.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/WebRequestUpload.php b/includes/WebRequestUpload.php
index c99b0e3..0881a16 100644
--- a/includes/WebRequestUpload.php
+++ b/includes/WebRequestUpload.php
@@ -126,7 +126,7 @@
return true;
}
 
-   $contentLength = $this->request->getHeader( 'CONTENT_LENGTH' );
+   $contentLength = $this->request->getHeader( 'CONTENT-LENGTH' );
$maxPostSize = wfShorthandToInteger(
ini_get( 'post_max_size' ) ?: ini_get( 
'hhvm.server.max_post_size' ),
0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30263f552efe3fea9471841c0a535123c119efe1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow patrol of uploads - change (mediawiki/core)

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

Change subject: Allow patrol of uploads
..


Allow patrol of uploads

This allows to patrol file uploads, both new files and new file
versions, from the description page, provided $wgUseFilePatrol
is set to true. Special:NewFiles can be filtered to hide patrolled
files.

Bug: T11501
Change-Id: If71af58719a4461f12d125455b7bef07164525ca
---
M includes/DefaultSettings.php
M includes/changes/ChangesList.php
M includes/changes/RecentChange.php
M includes/filerepo/file/LocalFile.php
M includes/page/Article.php
M includes/specials/SpecialNewimages.php
M includes/user/User.php
M languages/i18n/en.json
M languages/i18n/qqq.json
9 files changed, 145 insertions(+), 12 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 54216fd..7415528 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6164,7 +6164,8 @@
 $wgRCWatchCategoryMembership = false;
 
 /**
- * Use RC Patrolling to check for vandalism
+ * Use RC Patrolling to check for vandalism (from recent changes and 
watchlists)
+ * New pages and new files are included.
  */
 $wgUseRCPatrol = true;
 
@@ -6174,6 +6175,13 @@
 $wgUseNPPatrol = true;
 
 /**
+ * Use file patrolling to check new files on Special:Newfiles
+ *
+ * @since 1.27
+ */
+$wgUseFilePatrol = true;
+
+/**
  * Log autopatrol actions to the log table
  */
 $wgLogAutopatrol = true;
diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php
index 2494ef1..6081a17 100644
--- a/includes/changes/ChangesList.php
+++ b/includes/changes/ChangesList.php
@@ -638,9 +638,11 @@
if ( $rc instanceof RecentChange ) {
$isPatrolled = $rc->mAttribs['rc_patrolled'];
$rcType = $rc->mAttribs['rc_type'];
+   $rcLogType = $rc->mAttribs['rc_log_type'];
} else {
$isPatrolled = $rc->rc_patrolled;
$rcType = $rc->rc_type;
+   $rcLogType = $rc->rc_log_type;
}
 
if ( !$isPatrolled ) {
@@ -650,6 +652,9 @@
if ( $user->useNPPatrol() && $rcType == RC_NEW ) {
return true;
}
+   if ( $user->useFilePatrol() && $rcLogType == 'upload' ) 
{
+   return true;
+   }
}
 
return false;
diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index b0b88d3..df3b5bc 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -456,11 +456,13 @@
 * @return array Array of permissions errors, see 
Title::getUserPermissionsErrors()
 */
public function doMarkPatrolled( User $user, $auto = false ) {
-   global $wgUseRCPatrol, $wgUseNPPatrol;
+   global $wgUseRCPatrol, $wgUseNPPatrol, $wgUseFilePatrol;
$errors = array();
-   // If recentchanges patrol is disabled, only new pages
-   // can be patrolled
-   if ( !$wgUseRCPatrol && ( !$wgUseNPPatrol || 
$this->getAttribute( 'rc_type' ) != RC_NEW ) ) {
+   // If recentchanges patrol is disabled, only new pages or new 
file versions
+   // can be patrolled, provided the appropriate config variable 
is set
+   if ( !$wgUseRCPatrol && ( !$wgUseNPPatrol || 
$this->getAttribute( 'rc_type' ) != RC_NEW ) &&
+   ( !$wgUseFilePatrol || !( $this->getAttribute( 
'rc_type' ) == RC_LOG &&
+   $this->getAttribute( 'rc_log_type' ) == 'upload' ) ) ) {
$errors[] = array( 'rcpatroldisabled' );
}
// Automatic patrol needs "autopatrol", ordinary patrol needs 
"patrol"
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 0da1ae8..5a6a8b2 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1330,6 +1330,7 @@
}
 
$descTitle = $this->getTitle();
+   $descId = $descTitle->getArticleID();
$wikiPage = new WikiFilePage( $descTitle );
$wikiPage->setFile( $this );
 
@@ -1362,7 +1363,7 @@
 
$nullRevision = Revision::newNullRevision(
$dbw,
-   $descTitle->getArticleID(),
+   $descId,
$editSummary,
false,
$user
@@ -1374,6 +1375,8 @@
 

[MediaWiki-commits] [Gerrit] Add testreduce module and role - change (operations/puppet)

2016-01-06 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Add testreduce module and role
..


Add testreduce module and role

testreduce is Parsoid's round-trip test result aggregator and web UI. It
comprises a test coordination server that hands out test requests to
testing clients, accepts test results from them, and records the results
in a database, as well as a web interface for examining the test
results.

This patch adds a testreduce module and a minimal role. It hews closely
to how testreduce is currently configured on ruthenium.

Bug: T118778
Change-Id: Icd39e880ea4d0fec3e68c45d39521fb07f9dff7e
---
A manifests/role/testreduce.pp
M manifests/site.pp
A modules/testreduce/files/testreduce.upstart.conf
A modules/testreduce/manifests/init.pp
A modules/testreduce/templates/settings.js.erb
5 files changed, 198 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/testreduce.pp b/manifests/role/testreduce.pp
new file mode 100644
index 000..05c7be3
--- /dev/null
+++ b/manifests/role/testreduce.pp
@@ -0,0 +1,11 @@
+# == Class: role::testreduce
+#
+# Parsoid round-trip test result aggregator.
+#
+class role::testreduce {
+class { '::testreduce':
+db_name => 'testreduce_0715',
+db_user => 'testreduce',
+db_pass => '',  # FIXME
+}
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index b90dc46..ef4cc32 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2317,7 +2317,7 @@
 # ruthenium is a parsoid regression test server
 # https://www.mediawiki.org/wiki/Parsoid/Round-trip_testing
 node 'ruthenium.eqiad.wmnet' {
-role testsystem
+role testsystem, testreduce
 }
 
 # T95046 install/deploy scandium as zuul merger (ci) server
diff --git a/modules/testreduce/files/testreduce.upstart.conf 
b/modules/testreduce/files/testreduce.upstart.conf
new file mode 100644
index 000..543788b
--- /dev/null
+++ b/modules/testreduce/files/testreduce.upstart.conf
@@ -0,0 +1,34 @@
+# vim: set ft=upstart:
+
+description "testreduce HTTP service"
+
+start on (local-filesystem and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
+
+# up ulimit -n a bit
+limit nofile 1 1
+
+setuid "testreduce"
+setgid "testreduce"
+
+env DEFAULTFILE=/etc/default/testreduce
+
+# Basic built-in defaults. Overridden by whatever
+# is defined in the DEFAULTFILE defined above.
+env NODE_PATH="/srv/testreduce/node_modules"
+env BASE_PATH="/srv/testreduce/server"
+env LOG_FILE="/dev/null"
+env SETTINGS_FILE="/etc/testreduce/settings.js"
+env DAEMON_ARGS="--config $SETTINGS_FILE"
+env PORT="8001"
+
+respawn
+
+script
+if [ -f "$DEFAULTFILE" ] ; then
+. "$DEFAULTFILE"
+fi
+chdir "$BASE_PATH"
+   echo "Starting testreduce on port $PORT"
+exec /usr/bin/nodejs server.js $DAEMON_ARGS < /dev/null >> "$LOG_FILE" 2>&1
+end script
diff --git a/modules/testreduce/manifests/init.pp 
b/modules/testreduce/manifests/init.pp
new file mode 100644
index 000..f045fdb
--- /dev/null
+++ b/modules/testreduce/manifests/init.pp
@@ -0,0 +1,85 @@
+# == Class: testreduce
+#
+# Parsoid round-trip test result aggregator.
+#
+# === Parameters
+#
+# [*db_name*]
+#   Database name for storing results.
+#
+# [*db_user*]
+#   Database user.
+#
+# [*db_host*]
+#   MySQL host. Default: 'localhost'.
+#
+# [*db_port*]
+#   MySQL port. Default: 3306.
+#
+# [*coord_port*]
+#   The result aggregator will listen on this port. Default: 8002.
+#
+# [*webapp_port*]
+#   The user-facing webapp that displays test results will listen on
+#   this port. Default: 8003.
+#
+class testreduce(
+$db_name,
+$db_user,
+$db_pass,
+$db_host = 'localhost',
+$db_port = 3306,
+$coord_port  = 8002,
+$webapp_port = 8003,
+) {
+require_package('nodejs')
+require_package('npm')
+
+group { 'testreduce':
+ensure => present,
+system => true,
+}
+
+user { 'testreduce':
+gid=> 'testreduce',
+home   => '/srv/testreduce',
+managehome => false,
+system => true,
+}
+
+file { '/etc/testreduce':
+ensure => directory,
+owner  => 'root',
+group  => 'root',
+mode   => '0755',
+}
+
+file { '/etc/testreduce/settings.js':
+content => template('testreduce/settings.js.erb'),
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+notify  => Service['testreduce'],
+}
+
+file { '/etc/init/testreduce.conf':
+source => 'puppet:///modules/testreduce/testreduce.upstart.conf',
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+notify => Service['testreduce'],
+}
+
+git::clone { 'mediawiki/services/parsoid/testreduce':
+ensure=> latest,
+owner => 'root',
+group => 'wikidev',
+d

[MediaWiki-commits] [Gerrit] Use "origin-not-empty" as error code if "fromid" is not empty - change (mediawiki...Wikibase)

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

Change subject: Use "origin-not-empty" as error code if "fromid" is not empty
..


Use "origin-not-empty" as error code if "fromid" is not empty

"target-not-empty" is a pretty obvious mistake
here as this is about the item that is going to
hold a redirect, not about the target of that
redirect.

DEPLOY: Consider writing a short note about this
to the wikidata mailing list.

Bug: T112238
Change-Id: I9e75b1d20f2081d45189889c2e906eda577a62a5
---
M repo/includes/Interactors/RedirectCreationInteractor.php
M repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
M repo/tests/phpunit/includes/api/CreateRedirectTest.php
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/repo/includes/Interactors/RedirectCreationInteractor.php 
b/repo/includes/Interactors/RedirectCreationInteractor.php
index e6d0ac4..5c0e4de 100644
--- a/repo/includes/Interactors/RedirectCreationInteractor.php
+++ b/repo/includes/Interactors/RedirectCreationInteractor.php
@@ -176,7 +176,7 @@
if ( !$entity->isEmpty() ) {
throw new RedirectCreationException(
"Entity $entityId is not empty",
-   'target-not-empty'
+   'origin-not-empty'
);
}
} catch ( RevisionedUnresolvedRedirectException $ex ) {
diff --git 
a/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php 
b/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
index fa9ae15..fa886b0 100644
--- a/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
+++ b/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
@@ -177,7 +177,7 @@
'target is a redirect' => array( new ItemId( 'Q11' ), 
new ItemId( 'Q22' ), 'target-is-redirect' ),
'target is incompatible' => array( new ItemId( 'Q11' ), 
new PropertyId( 'P11' ), 'target-is-incompatible' ),
 
-   'source not empty' => array( new ItemId( 'Q12' ), new 
ItemId( 'Q11' ), 'target-not-empty' ),
+   'source not empty' => array( new ItemId( 'Q12' ), new 
ItemId( 'Q11' ), 'origin-not-empty' ),
'can\'t redirect' => array( new PropertyId( 'P11' ), 
new PropertyId( 'P12' ), 'cant-redirect' ),
'can\'t redirect EditFilter' => array( new ItemId( 
'Q11' ), new ItemId( 'Q12' ), 'cant-redirect', Status::newFatal( 'EF' ) ),
);
diff --git a/repo/tests/phpunit/includes/api/CreateRedirectTest.php 
b/repo/tests/phpunit/includes/api/CreateRedirectTest.php
index b6ecc06..aa6f6c3 100644
--- a/repo/tests/phpunit/includes/api/CreateRedirectTest.php
+++ b/repo/tests/phpunit/includes/api/CreateRedirectTest.php
@@ -191,7 +191,7 @@
'target is a redirect' => array( 'Q11', 'Q22', 
'target-is-redirect' ),
'target is incompatible' => array( 'Q11', 'P11', 
'target-is-incompatible' ),
 
-   'source not empty' => array( 'Q12', 'Q11', 
'target-not-empty' ),
+   'source not empty' => array( 'Q12', 'Q11', 
'origin-not-empty' ),
'can\'t redirect' => array( 'P11', 'P12', 
'cant-redirect' ),
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e75b1d20f2081d45189889c2e906eda577a62a5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update usage of GeoData classes (which are being put in name... - change (mediawiki...Wikibase)

2016-01-06 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Update usage of GeoData classes (which are being put in 
namespace)
..

Update usage of GeoData classes (which are being put in namespace)

Bug: T122339
Change-Id: Iaf4fd69ab2ad6171003b22f588badb5a970099cc
Depends-On: I2a52a7f44f747cd13c34edd1ef19c96f66d548f0
---
M repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
M repo/includes/ParserOutput/GeoDataDataUpdater.php
M repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php
3 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php 
b/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
index d86123b..67cca21 100644
--- a/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
@@ -179,7 +179,7 @@
$updaters[] = new PageImagesDataUpdater( 
$this->preferredPageImagesProperties );
}
 
-   if ( class_exists( 'GeoData' ) ) {
+   if ( class_exists( 'GeoData\GeoData' ) ) {
$updaters[] = new GeoDataDataUpdater(
$propertyDataTypeMatcher,
$this->preferredGeoDataProperties,
diff --git a/repo/includes/ParserOutput/GeoDataDataUpdater.php 
b/repo/includes/ParserOutput/GeoDataDataUpdater.php
index 47a89fb..e4cc9e0 100644
--- a/repo/includes/ParserOutput/GeoDataDataUpdater.php
+++ b/repo/includes/ParserOutput/GeoDataDataUpdater.php
@@ -2,9 +2,9 @@
 
 namespace Wikibase\Repo\ParserOutput;
 
-use Coord;
-use CoordinatesOutput;
 use DataValues\Geo\Values\GlobeCoordinateValue;
+use GeoData\Coord;
+use GeoData\CoordinatesOutput;
 use ParserOutput;
 use RuntimeException;
 use Wikibase\DataModel\Services\Entity\PropertyDataTypeMatcher;
@@ -60,7 +60,7 @@
array $preferredPropertiesIds,
array $globeUris
) {
-   if ( !class_exists( 'GeoData' ) ) {
+   if ( !class_exists( 'GeoData\GeoData' ) ) {
throw new RuntimeException( 'GeoDataDataUpdater 
requires the GeoData extension '
. 'to be enabled' );
}
diff --git 
a/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php 
b/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php
index 5abd396..09ec66d 100644
--- a/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php
+++ b/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php
@@ -2,12 +2,12 @@
 
 namespace Wikibase\Repo\Tests\ParserOutput;
 
-use Coord;
-use CoordinatesOutput;
 use DataValues\DataValue;
 use DataValues\Geo\Values\GlobeCoordinateValue;
 use DataValues\Geo\Values\LatLongValue;
 use DataValues\StringValue;
+use GeoData\Coord;
+use GeoData\CoordinatesOutput;
 use ParserOutput;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
@@ -33,7 +33,7 @@
 class GeoDataDataUpdaterTest extends \MediaWikiTestCase {
 
private function willSkipTests() {
-   if ( !class_exists( 'GeoData' ) ) {
+   if ( !class_exists( 'GeoData\GeoData' ) ) {
return true;
}
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf4fd69ab2ad6171003b22f588badb5a970099cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add testreduce module and role - change (operations/puppet)

2016-01-06 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Add testreduce module and role
..

Add testreduce module and role

testreduce is Parsoid's round-trip test result aggregator and web UI. It
comprises a test coordination server that hands out test requests to
testing clients, accepts test results from them, and records the results
in a database, as well as a web interface for examining the test
results.

This patch adds a testreduce module and a minimal role. It hews closely
to how testreduce is currently configured on ruthenium.

Bug: T118778
Change-Id: Icd39e880ea4d0fec3e68c45d39521fb07f9dff7e
---
A manifests/role/testreduce.pp
M manifests/site.pp
A modules/testreduce/files/testreduce.upstart.conf
A modules/testreduce/manifests/init.pp
A modules/testreduce/templates/settings.js.erb
5 files changed, 197 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/262846/1

diff --git a/manifests/role/testreduce.pp b/manifests/role/testreduce.pp
new file mode 100644
index 000..12974c6
--- /dev/null
+++ b/manifests/role/testreduce.pp
@@ -0,0 +1,11 @@
+# == Class: role::testreduce
+#
+# Parsoid round-trip test result aggregator.
+#
+class role::testreduce {
+class { 'testreduce':
+db_name => 'testreduce_0715',
+db_user => 'testreduce',
+db_pass => '',  # FIXME
+}
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index b90dc46..ef4cc32 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2317,7 +2317,7 @@
 # ruthenium is a parsoid regression test server
 # https://www.mediawiki.org/wiki/Parsoid/Round-trip_testing
 node 'ruthenium.eqiad.wmnet' {
-role testsystem
+role testsystem, testreduce
 }
 
 # T95046 install/deploy scandium as zuul merger (ci) server
diff --git a/modules/testreduce/files/testreduce.upstart.conf 
b/modules/testreduce/files/testreduce.upstart.conf
new file mode 100644
index 000..543788b
--- /dev/null
+++ b/modules/testreduce/files/testreduce.upstart.conf
@@ -0,0 +1,34 @@
+# vim: set ft=upstart:
+
+description "testreduce HTTP service"
+
+start on (local-filesystem and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
+
+# up ulimit -n a bit
+limit nofile 1 1
+
+setuid "testreduce"
+setgid "testreduce"
+
+env DEFAULTFILE=/etc/default/testreduce
+
+# Basic built-in defaults. Overridden by whatever
+# is defined in the DEFAULTFILE defined above.
+env NODE_PATH="/srv/testreduce/node_modules"
+env BASE_PATH="/srv/testreduce/server"
+env LOG_FILE="/dev/null"
+env SETTINGS_FILE="/etc/testreduce/settings.js"
+env DAEMON_ARGS="--config $SETTINGS_FILE"
+env PORT="8001"
+
+respawn
+
+script
+if [ -f "$DEFAULTFILE" ] ; then
+. "$DEFAULTFILE"
+fi
+chdir "$BASE_PATH"
+   echo "Starting testreduce on port $PORT"
+exec /usr/bin/nodejs server.js $DAEMON_ARGS < /dev/null >> "$LOG_FILE" 2>&1
+end script
diff --git a/modules/testreduce/manifests/init.pp 
b/modules/testreduce/manifests/init.pp
new file mode 100644
index 000..a645d2d
--- /dev/null
+++ b/modules/testreduce/manifests/init.pp
@@ -0,0 +1,84 @@
+# == Class: testreduce
+#
+# Parsoid round-trip test result aggregator.
+#
+# === Parameters
+#
+# [*db_name*]
+#   Database name for storing results.
+#
+# [*db_user*]
+#   Database user.
+#
+# [*db_host*]
+#   MySQL host. Default: 'localhost'.
+#
+# [*db_port*]
+#   MySQL port. Default: 3306.
+#
+# [*coord_port*]
+#   The result aggregator will listen on this port. Default: 8002.
+#
+# [*webapp_port*]
+#   The user-facing webapp that displays test results will listen on
+#   this port. Default: 8003.
+#
+class testreduce(
+$db_name,
+$db_user,
+$db_pass,
+$db_host = 'localhost',
+$db_port = 3306,
+$coord_port  = 8002,
+$webapp_port = 8003,
+) {
+require_package('nodejs')
+require_package('npm')
+
+group { 'testreduce':
+ensure => present,
+system => true,
+}
+
+user { 'testreduce':
+gid=> 'testreduce',
+home   => '/srv/testreduce',
+managehome => false,
+system => true,
+}
+
+file { '/etc/testreduce':
+ensure => directory,
+owner  => 'root',
+group  => 'root',
+mode   => '0755',
+}
+
+file { '/etc/testreduce/settings.js':
+content => template('testreduce/settings.js.erb'),
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+notify  => Service['testreduce'],
+}
+
+file { '/etc/init/testreduce.conf':
+source => 'puppet:///modules/testreduce/testreduce.upstart.conf',
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+notify => Service['testreduce'],
+}
+
+service { 'testreduce':
+ensure   => running,
+provider => upstart,
+}
+
+git::clone { 'med

[MediaWiki-commits] [Gerrit] Add optional $name-summary message for Special:GlobalRenameQ... - change (mediawiki...CentralAuth)

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

Change subject: Add optional $name-summary message for Special:GlobalRenameQueue
..


Add optional $name-summary message for Special:GlobalRenameQueue

So people can add customizations to it via system messages instead of JS
user scripts.

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

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



diff --git a/includes/specials/SpecialGlobalRenameQueue.php 
b/includes/specials/SpecialGlobalRenameQueue.php
index dcc35eb..e6fe146 100644
--- a/includes/specials/SpecialGlobalRenameQueue.php
+++ b/includes/specials/SpecialGlobalRenameQueue.php
@@ -53,6 +53,8 @@
$navigation = explode( '/', $par );
$action = array_shift( $navigation );
 
+   $this->outputHeader();
+
switch ( $action ) {
case self::PAGE_OPEN_QUEUE:
$this->handleOpenQueue();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d1e9aed711986069cd29b2ce1224adfd54b1cb8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Glaisher 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Steinsplitter 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add my new key. Verified with Jaime in person - change (operations/puppet)

2016-01-06 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged.

Change subject: Add my new key. Verified with Jaime in person
..


Add my new key. Verified with Jaime in person

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

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f60a467..4cd22bf 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -801,7 +801,7 @@
 gid: 500
 name: maxsem
 realname: Max Semenik
-ssh_keys: []
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC0RSjUA2eFmB3RhqVdR3ILlHbp3lhQRUdjAQgqtFJMh2N9qQgK7OPB/z+on9SlWawOI57Ld5wcIV5UjnNJRLLX30I+A+OrtV4QosVW5sT7EjJ7Joj3APB3RUxAUcuoObmIHljhvPFTAxQ4IIuyNF777greJt3H2hPlXVKN6rKtH3J6fnebjuSphmEc3VZbRiHS7Bjo6GMBl/+R3hAK079B2DvDkkc+f7LFfKGrsBrbHmcfYgXC/SwjekPuPvHyRDj5KFaI7DBqIh24aaWncvIyJIaeaPy6szDl76FreAVev8Cg3N/b7sihX5lRhQSFStcq+izMVMVH6gU7gcsTFtK1
 mseme...@maxsem.corp.wikimedia.org]
 uid: 1220
   mattflaschen:
 ensure: present

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fe09254ca90ff5bc56d10e336f4c98614ed5a6d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [elasticsearch] Record per-node fetch timing - change (operations/puppet)

2016-01-06 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: [elasticsearch] Record per-node fetch timing
..


[elasticsearch] Record per-node fetch timing

This will allow us to determine average fetch latency for es nodes.
In general within es a search is both a query and a fetch phase, so
whatever information we store about the query phase we should also
store about the fetch phase.

I think we can get away with only the per-node fetch timing, rather
than collecting per query group. The fetch phase is pretty similar
regardless of the query time whereas the query phase varies greatly.

Change-Id: Ice6e8660f452ebe8398f49e6cdbbebd5c75fa82a
---
M modules/elasticsearch/files/monitor/wmfelastic.py
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/elasticsearch/files/monitor/wmfelastic.py 
b/modules/elasticsearch/files/monitor/wmfelastic.py
index 2eb8887..462094a 100644
--- a/modules/elasticsearch/files/monitor/wmfelastic.py
+++ b/modules/elasticsearch/files/monitor/wmfelastic.py
@@ -103,6 +103,8 @@
 'indices.search.query_time_in_millis',
 'indices.search.query_current',
 'indices.search.fetch_total',
+'indices.search.fetch_time_in_millis',
+'indices.search.fetch_current',
 'indices.search.groups.more_like.query_total',
 'indices.search.groups.more_like.query_time_in_millis',
 'indices.search.groups.prefix.query_total',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice6e8660f452ebe8398f49e6cdbbebd5c75fa82a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix memory issues when switching between different Fragments. - change (apps...wikipedia)

2016-01-06 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fix memory issues when switching between different Fragments.
..

Fix memory issues when switching between different Fragments.

...In which I slightly modify (simplify?) the way we place and exchange our 
various
fragments inside the container view in our Activity.

This seems to stabilize memory usage when changing back and forth between 
PageFragment
and other fragments, which is the leading cause of OOM errors at the moment.

This shouldn't change any UX behavior (e.g. back button logic, etc).

Bug: T121759
Change-Id: I745a31f23030b60575cd1b071eabc49c092a1b30
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
1 file changed, 12 insertions(+), 28 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 71cd53b..1cdebad 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -505,18 +505,8 @@
 drawerLayout.closeDrawer(GravityCompat.START);
 }
 
-/**
- * Reset our fragment structure to the default, which is simply one 
PageViewFragment
- * on the fragment stack.
- * @param allowStateLoss Whether to allow state loss.
- */
-private void resetFragments(boolean allowStateLoss) {
-while (getTopFragment() != null && !(getTopFragment() instanceof 
PageFragment)) {
-getSupportFragmentManager().popBackStackImmediate();
-}
-if (getTopFragment() == null) {
-pushFragment(new PageFragment(), allowStateLoss);
-}
+private void removeAllFragments() {
+getSupportFragmentManager().popBackStackImmediate(null, 
FragmentManager.POP_BACK_STACK_INCLUSIVE);
 }
 
 /**
@@ -544,15 +534,10 @@
 if (getTopFragment() != null && (getTopFragment().getClass() == 
f.getClass())) {
 return;
 }
-int totalFragments = 
getSupportFragmentManager().getBackStackEntryCount();
-if (totalFragments > 0) {
-resetFragments(allowStateLoss);
-}
-FragmentTransaction trans = 
getSupportFragmentManager().beginTransaction();
 
-// do an animation on the new fragment, but only if there was a 
previous one before it.
-trans.setCustomAnimations(R.anim.abc_fade_in, R.anim.abc_fade_out, 0, 
0);
-trans.replace(R.id.content_fragment_container, f, "fragment_" + 
Integer.toString(totalFragments));
+removeAllFragments();
+FragmentTransaction trans = 
getSupportFragmentManager().beginTransaction();
+trans.add(R.id.content_fragment_container, f);
 trans.addToBackStack(null);
 if (allowStateLoss) {
 trans.commitAllowingStateLoss();
@@ -581,8 +566,7 @@
 }
 
 public void resetAfterClearHistory() {
-// remove all current fragments from the backstack
-getSupportFragmentManager().popBackStackImmediate(null, 
FragmentManager.POP_BACK_STACK_INCLUSIVE);
+removeAllFragments();
 Prefs.clearTabs();
 loadMainPageIfNoTabs();
 }
@@ -635,7 +619,8 @@
 visitInExternalBrowser(this, Uri.parse(title.getMobileUri()));
 return;
 }
-resetFragments(allowStateLoss);
+
+pushFragment(new PageFragment(), allowStateLoss);
 
 fragmentContainerView.post(new Runnable() {
 @Override
@@ -749,12 +734,11 @@
 if (getTopFragment() instanceof BackPressedHandler
 && ((BackPressedHandler) getTopFragment()).onBackPressed()) {
 return;
+} else if (!(getTopFragment() instanceof PageFragment)) {
+pushFragment(new PageFragment(), false);
+return;
 }
-if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
-popFragment();
-} else {
-finish();
-}
+finish();
 }
 
 /*package*/ void showPageSavedMessage(@NonNull String title, boolean 
success) {

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

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

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


[MediaWiki-commits] [Gerrit] Add my new key. Verified with Jaime in person - change (operations/puppet)

2016-01-06 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Add my new key. Verified with Jaime in person
..

Add my new key. Verified with Jaime in person

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


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f60a467..4cd22bf 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -801,7 +801,7 @@
 gid: 500
 name: maxsem
 realname: Max Semenik
-ssh_keys: []
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC0RSjUA2eFmB3RhqVdR3ILlHbp3lhQRUdjAQgqtFJMh2N9qQgK7OPB/z+on9SlWawOI57Ld5wcIV5UjnNJRLLX30I+A+OrtV4QosVW5sT7EjJ7Joj3APB3RUxAUcuoObmIHljhvPFTAxQ4IIuyNF777greJt3H2hPlXVKN6rKtH3J6fnebjuSphmEc3VZbRiHS7Bjo6GMBl/+R3hAK079B2DvDkkc+f7LFfKGrsBrbHmcfYgXC/SwjekPuPvHyRDj5KFaI7DBqIh24aaWncvIyJIaeaPy6szDl76FreAVev8Cg3N/b7sihX5lRhQSFStcq+izMVMVH6gU7gcsTFtK1
 mseme...@maxsem.corp.wikimedia.org]
 uid: 1220
   mattflaschen:
 ensure: present

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

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

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


[MediaWiki-commits] [Gerrit] WIP Experimenting with JS object references in browser tests - change (mediawiki...VisualEditor)

2016-01-06 Thread Dduvall (Code Review)
Dduvall has uploaded a new change for review.

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

Change subject: WIP Experimenting with JS object references in browser tests
..

WIP Experimenting with JS object references in browser tests

References to JS objects for VE elements can determined by referencing
the VE and OOUI API documentation[1][2] and interrogating the objects in
a browser console. Errors should be closer to what developers understand
but testers should pair with developers to better understand how to
define new page elements and where to go for documentation/help.

The VE entrypoint for the singleton reference is `ve.init.target` (if
there's only one instance of VE target; there may be multiple in some
cases like Flow).

[1] https://doc.wikimedia.org/VisualEditor/master/
[2] https://doc.wikimedia.org/oojs-ui/master/js/

Change-Id: I1f642807cdd3059d8e7e885a8b239ac01b9b3024
---
M Gemfile.lock
M modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
3 files changed, 17 insertions(+), 7 deletions(-)


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

diff --git a/Gemfile.lock b/Gemfile.lock
index 40f5127..9f9a1da 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,11 +1,11 @@
 GEM
   remote: https://rubygems.org/
   specs:
-ast (2.1.0)
+ast (2.2.0)
 astrolabe (1.3.1)
   parser (~> 2.2)
 builder (3.2.2)
-childprocess (0.5.8)
+childprocess (0.5.9)
   ffi (~> 1.0, >= 1.0.11)
 chunky_png (1.3.5)
 commons_upload (0.0.4)
@@ -97,7 +97,7 @@
 watir-webdriver (0.9.1)
   selenium-webdriver (>= 2.46.2)
 websocket (1.2.2)
-yml_reader (0.6)
+yml_reader (0.7)
 
 PLATFORMS
   ruby
@@ -108,3 +108,6 @@
   rake (~> 10.4, >= 10.4.2)
   rubocop (~> 0.32.1)
   screenshot (~> 0.0.7)
+
+BUNDLED WITH
+   1.10.6
diff --git 
a/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb 
b/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
index e191ef1..c5117d6 100644
--- 
a/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
+++ 
b/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb
@@ -1,5 +1,5 @@
 When(/^I click the Bold menu option$/) do
-  on(VisualEditorPage).ve_bold_text_element.when_present(15).click
+  on(VisualEditorPage).ve_bold_text_element.when_present.click
 end
 
 When(/^I click the Computer Code menu option$/) do
@@ -7,7 +7,7 @@
 end
 
 When(/^I click the Italics menu option$/) do
-  on(VisualEditorPage).ve_italics_element.when_present(15).click
+  on(VisualEditorPage).ve_italics_element.when_present.click
 end
 
 When(/^I click the More option$/) do
diff --git 
a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 
b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
index d77b87a..4617192 100644
--- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
+++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
@@ -177,11 +177,10 @@
   div(:toolbar_actions, class: 'oo-ui-toolbar-actions')
   a(:transclusion, css: 
'span.oo-ui-widget.oo-ui-iconElement.oo-ui-tool.oo-ui-tool-name-transclusion.oo-ui-widget-enabled
 > a')
   text_field(:transclusion_description, css: '.oo-ui-inputWidget > 
input:nth-child(1)')
-  span(:ve_bold_text, class: 'oo-ui-iconElement-icon oo-ui-icon-bold')
   span(:ve_bullets, css: '.oo-ui-clippableElement-clippable 
.oo-ui-iconElement-icon.oo-ui-icon-listBullet')
   span(:ve_computer_code, class: 'oo-ui-iconElement-icon oo-ui-icon-code')
   div(:ve_heading_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-down')
-  span(:ve_italics, class: 'oo-ui-iconElement-icon oo-ui-icon-italic')
+  span(:ve_italics, object: 
've.init.target.getToolbar().items[2].tools.italic.$link[0]')
   span(:ve_link_icon, class: 'oo-ui-iconElement-icon oo-ui-icon-link')
   span(:ve_link_ui, class: 'oo-ui-widget oo-ui-widget-enabled 
oo-ui-labelElement-label oo-ui-labelWidget oo-ui-processDialog-title 
oo-ui-labelElement', text: 'Link')
   span(:ve_media_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-picture')
@@ -203,6 +202,14 @@
   div(:media_alternative_block, class: 'oo-ui-layout oo-ui-iconElement 
oo-ui-labelElement oo-ui-fieldsetLayout', index: 2)
   div(:media_advanced_settings, class: 'oo-ui-outlineOptionWidget-level-0', 
index: 1)
 
+  def ve_bold_text_element
+@browser.execute_script('return 
ve.init.target.getToolbar().items[2].tools.bold.$link[0]')
+  end
+
+  def ve_italics_element
+@browser.execute_script('return 
ve.init.target.getToolbar().items[2].tools.italic.$link[0]')
+  end
+
   def tools_menu_element
 if browser_name == :chrome
   div(class: 'oo-ui-widget oo-ui-widget-enabled oo-ui-toolGroup 
oo-ui-iconElement oo-ui-popupToolGro

[MediaWiki-commits] [Gerrit] Use ParserOutput's extension data to store geotags - change (mediawiki...GeoData)

2016-01-06 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Use ParserOutput's extension data to store geotags
..

Use ParserOutput's extension data to store geotags

This is a breaking change, requires corresponding tweaks in Wikibase

Change-Id: I230fd71b82160d498f39982d910ef468bcc0e951
---
M includes/CoordinatesOutput.php
M includes/CoordinatesParserFunction.php
M includes/Hooks.php
M tests/MiscGeoDataTest.php
M tests/TagTest.php
5 files changed, 78 insertions(+), 22 deletions(-)


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

diff --git a/includes/CoordinatesOutput.php b/includes/CoordinatesOutput.php
index d1a0d10..129f883 100644
--- a/includes/CoordinatesOutput.php
+++ b/includes/CoordinatesOutput.php
@@ -3,6 +3,7 @@
 namespace GeoData;
 
 use MWException;
+use ParserOutput;
 
 /**
  * Class that holds output of a parse opertion
@@ -12,6 +13,52 @@
private $primary = false,
$secondary = array();
 
+   /**
+* Returns CoordinatesOutput for a given ParserOutput
+*
+* @param ParserOutput $parserOutput
+* @return CoordinatesOutput
+*/
+   public static function fromParserOutput( ParserOutput $parserOutput ) {
+   /** @var CoordinatesOutput $result */
+   $result = $parserOutput->getExtensionData( 'geoData' );
+   if ( !$result ) {
+   // @fixme: remove this b/c support code in summer 2016
+   $result = isset( $parserOutput->geoData ) ? 
$parserOutput->geoData : null;
+   if ( $result ) {
+   $result->saveTo( $parserOutput );
+   unset( $parserOutput->geoData );
+   }
+   }
+
+   return $result;
+   }
+
+   /**
+*
+*
+* @param ParserOutput $parserOutput
+* @return CoordinatesOutput
+*/
+   public static function initFor( ParserOutput $parserOutput ) {
+   $result = self::fromParserOutput( $parserOutput );
+   if ( !$result ) {
+   $result = new self;
+   $result->saveTo( $parserOutput );
+   }
+
+   return $result;
+   }
+
+   /**
+* Saves this object in ParserOutput
+*
+* @param ParserOutput $po
+*/
+   public function saveTo( ParserOutput $po ) {
+   $po->setExtensionData( 'geoData', $this );
+   }
+
public function getCount() {
return count( $this->secondary ) + ( $this->primary ? 1 : 0 );
}
diff --git a/includes/CoordinatesParserFunction.php 
b/includes/CoordinatesParserFunction.php
index 458d143..146f5d1 100644
--- a/includes/CoordinatesParserFunction.php
+++ b/includes/CoordinatesParserFunction.php
@@ -19,11 +19,6 @@
 */
private $parser;
 
-   /**
-* @var ParserOutput
-*/
-   private $output;
-
private $named = array(),
$unnamed = array(),
$info;
@@ -46,10 +41,6 @@
 */
public function coordinates( $parser, $frame, $args ) {
$this->parser = $parser;
-   $this->output = $parser->getOutput();
-   if ( !isset( $this->output->geoData ) ) {
-   $this->output->geoData = new CoordinatesOutput();
-   }
 
$this->unnamed = array();
$this->named = array();
@@ -120,8 +111,10 @@
private function applyCoord( Coord $coord ) {
global $wgMaxCoordinatesPerPage, $wgContLang;
 
+   $parserOutput = $this->parser->getOutput();
/** @var CoordinatesOutput $geoData */
-   $geoData = $this->output->geoData;
+   $geoData = CoordinatesOutput::initFor( $parserOutput );
+
if ( $wgMaxCoordinatesPerPage >= 0 && $geoData->getCount() >= 
$wgMaxCoordinatesPerPage ) {
if ( $geoData->limitExceeded ) {
return Status::newFatal( '' );
diff --git a/includes/Hooks.php b/includes/Hooks.php
index a876712..8be1c9c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -122,9 +122,9 @@
$out = $linksUpdate->getParserOutput();
$data = array();
$coordFromMetadata = self::getCoordinatesIfFile( 
$linksUpdate->getTitle() );
-   if ( isset( $out->geoData ) ) {
-   /** @var CoordinatesOutput $geoData */
-   $geoData = $out->geoData;
+
+   $geoData = CoordinatesOutput::fromParserOutput( $out );
+   if ( $geoData ) {
// Use coordinates from file metadata unless overridden 
on description page
 

[MediaWiki-commits] [Gerrit] startup.js: Move IE8 down from Grade A to Grade C - change (mediawiki/core)

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

Change subject: startup.js: Move IE8 down from Grade A to Grade C
..


startup.js: Move IE8 down from Grade A to Grade C

Bug: T118303
Change-Id: Icdb2d1dbcfd3ddaa98656b2b4a2ac92ddb29197d
---
M resources/src/startup.js
M tests/qunit/suites/resources/startup.test.js
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/resources/src/startup.js b/resources/src/startup.js
index 1a10f83..0f51a35 100644
--- a/resources/src/startup.js
+++ b/resources/src/startup.js
@@ -31,8 +31,8 @@
 
// Browsers with outdated or limited JavaScript engines get the no-JS 
experience
return !(
-   // Internet Explorer < 8
-   ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' 
)[ 1 ] ) < 8 ) ||
+   // Internet Explorer < 9
+   ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' 
)[ 1 ] ) < 9 ) ||
// Firefox < 3
( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 
'Firefox/' )[ 1 ] ) < 3 ) ||
// Opera < 12
diff --git a/tests/qunit/suites/resources/startup.test.js 
b/tests/qunit/suites/resources/startup.test.js
index d3c4748..d3f528c 100644
--- a/tests/qunit/suites/resources/startup.test.js
+++ b/tests/qunit/suites/resources/startup.test.js
@@ -21,8 +21,7 @@
'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 OPR/15.0.1147.153',
'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 OPR/16.0.1196.62',
'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 OPR/23.0.1522.75',
-   // Internet Explorer 8+
-   'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; 
Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)',
+   // Internet Explorer 9+
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; 
Trident/5.0)',
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; 
WOW64; Trident/6.0)',
'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) 
like Gecko',
@@ -47,13 +46,14 @@
'Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One 
Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile 
Safari/530.17'
],
gradeC: [
-   // Internet Explorer < 8
+   // Internet Explorer < 9
'Mozilla/2.0 (compatible; MSIE 3.03; Windows 3.1)',
'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)',
'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98;)',
'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)',
'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; 
en-US)',
+   'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; 
Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)',
// Firefox < 3
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2',
'Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.8.1.1) 
Gecko/20070311 Firefox/2.0.0.1',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icdb2d1dbcfd3ddaa98656b2b4a2ac92ddb29197d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Labs Jessie: Run puppet twice on new instance creation, with... - change (operations/puppet)

2016-01-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Labs Jessie: Run puppet twice on new instance creation, with 
apt-get in between.
..


Labs Jessie: Run puppet twice on new instance creation, with apt-get in between.

Instances haven't really been truly up and settled until after the
first cron-based puppet run.  I'm just making that explicit on the
first go.

Change-Id: Iaec2b1c7458c78f0a764d79e2f8f5fe8a6c874a3
---
M modules/labs_bootstrapvz/files/firstboot.sh
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 08fefa0..22baa2a 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -131,5 +131,9 @@
 systemctl restart salt-minion.service
 
 puppet agent --enable
-# Force initial puppet run
+# Run puppet, twice.  The second time is just to pick up packages
+#  that may have been unavailable in apt before the first puppet run
+#  updated sources.list
 puppet agent --onetime --verbose --no-daemonize --no-splay --show_diff 
--waitforcert=10 --certname=${fqdn} --server=${master}
+apt-get update
+puppet agent -t

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaec2b1c7458c78f0a764d79e2f8f5fe8a6c874a3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] DSR unit tests for heading wikitext - change (mediawiki...parsoid)

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

Change subject: DSR unit tests for heading wikitext
..


DSR unit tests for heading wikitext

Change-Id: If8a2e8a767865a1958bc60b75dbf52c3625d7e3c
---
M tests/mocha/dsr.js
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/tests/mocha/dsr.js b/tests/mocha/dsr.js
index 325ca47..55ad818 100644
--- a/tests/mocha/dsr.js
+++ b/tests/mocha/dsr.js
@@ -94,6 +94,22 @@
 runTests('Lists', listTests);
 
 var headingTests = [
+   {
+   wt: '=A=\n==B==\n===C===\nD',
+   specs: [
+   { selector: 'body > h1', dsrContent: ['=A=', '=', '='] 
},
+   { selector: 'body > h2', dsrContent: ['==B==', '==', 
'=='] },
+   { selector: 'body > h3', dsrContent: ['===C===', '===', 
'==='] },
+   { selector: 'body > h4', dsrContent: ['D', 
'', ''] },
+   ],
+   },
+   {
+   wt: '=A New Use for the = Sign=\n==The == Operator==',
+   specs: [
+   { selector: 'body > h1', dsrContent: ['=A New Use for 
the = Sign=', '=', '='] },
+   { selector: 'body > h2', dsrContent: ['==The == 
Operator==', '==', '=='] },
+   ],
+   },
 ];
 runTests('Headings', headingTests);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8a2e8a767865a1958bc60b75dbf52c3625d7e3c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Sn1per 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WebRequest::appendQuery*() functions no longer take $onlyquery - change (mediawiki/core)

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

Change subject: WebRequest::appendQuery*() functions no longer take $onlyquery
..


WebRequest::appendQuery*() functions no longer take $onlyquery

Deprecated since 1.25, unused anywhere

Change-Id: I52224635cfeaf4748abeaa07b0c92e7f452fa93f
---
M includes/WebRequest.php
M includes/diff/DifferenceEngine.php
M includes/skins/SkinTemplate.php
3 files changed, 6 insertions(+), 15 deletions(-)

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



diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 7e22404..7b76592 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -729,33 +729,24 @@
/**
 * @param string $key
 * @param string $value
-* @param bool $onlyquery [deprecated]
 * @return string
 */
-   public function appendQueryValue( $key, $value, $onlyquery = true ) {
-   return $this->appendQueryArray( array( $key => $value ), 
$onlyquery );
+   public function appendQueryValue( $key, $value ) {
+   return $this->appendQueryArray( array( $key => $value ) );
}
 
/**
 * Appends or replaces value of query variables.
 *
 * @param array $array Array of values to replace/add to query
-* @param bool $onlyquery Whether to only return the query string
-*  and not the complete URL [deprecated]
 * @return string
 */
-   public function appendQueryArray( $array, $onlyquery = true ) {
-   global $wgTitle;
+   public function appendQueryArray( $array ) {
$newquery = $this->getQueryValues();
unset( $newquery['title'] );
$newquery = array_merge( $newquery, $array );
-   $query = wfArrayToCgi( $newquery );
-   if ( !$onlyquery ) {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $wgTitle->getLocalURL( $query );
-   }
 
-   return $query;
+   return wfArrayToCgi( $newquery );
}
 
/**
diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 5e37663..d588d51 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -433,7 +433,7 @@
array( $msg ) );
} else {
# Give explanation and add a link to view the 
diff...
-   $query = $this->getRequest()->appendQueryValue( 
'unhide', '1', true );
+   $query = $this->getRequest()->appendQueryValue( 
'unhide', '1' );
$link = $this->getTitle()->getFullURL( $query );
$msg = $suppressed ? 
'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff';
$out->wrapWikiMsg(
diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index c0e5556..2ecbafb 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -1204,7 +1204,7 @@
$nav_urls['print'] = array(
'text' => $this->msg( 'printableversion' 
)->text(),
'href' => $this->getTitle()->getLocalURL(
-   $request->appendQueryValue( 
'printable', 'yes', true ) )
+   $request->appendQueryValue( 
'printable', 'yes' ) )
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52224635cfeaf4748abeaa07b0c92e7f452fa93f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove WebRequest::appendQuery() - change (mediawiki/core)

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

Change subject: Remove WebRequest::appendQuery()
..


Remove WebRequest::appendQuery()

Deprecated in 1.25, nothing uses it. You should use appendQueryValue()
or appendQueryArray()

Change-Id: Ia2347a1eaf6d9c6cfc600947e577c08cd482a5ac
---
M includes/WebRequest.php
1 file changed, 0 insertions(+), 11 deletions(-)

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



diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 6cb39d8..7e22404 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -727,17 +727,6 @@
}
 
/**
-* Take an arbitrary query and rewrite the present URL to include it
-* @deprecated Use appendQueryValue/appendQueryArray instead
-* @param string $query Query string fragment; do not include initial 
'?'
-* @return string
-*/
-   public function appendQuery( $query ) {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $this->appendQueryArray( wfCgiToArray( $query ) );
-   }
-
-   /**
 * @param string $key
 * @param string $value
 * @param bool $onlyquery [deprecated]

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

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

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


[MediaWiki-commits] [Gerrit] Fix maintenance form display - change (mediawiki...DonationInterface)

2016-01-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix maintenance form display
..

Fix maintenance form display

Make Mustache forms default, show maintenance forms.

Bug: T86248
Change-Id: Ib96697f3c7c7d9bbdec4b63d6a2b5f6b4db4eaed
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M astropay_gateway/astropay.adapter.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/globalcollect.adapter.php
M paypal_gateway/paypal.adapter.php
6 files changed, 15 insertions(+), 21 deletions(-)


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

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index a31e253..bbbdc63 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -30,10 +30,6 @@
return 'namevalue';
}
 
-   public function getFormClass() {
-   return 'Gateway_Form_Mustache';
-   }
-
public function getRequiredFields() {
$fields = parent::getRequiredFields();
$fields[] = 'address';
diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 1742d4b..3edc64c 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -64,14 +64,6 @@
$this->session_addDonorData();
}
 
-   public function getFormClass() {
-   if ( strpos( $this->dataObj->getVal_Escaped( 'ffname' ), 
'error' ) === 0 ) {
-   // TODO: make a mustache error form
-   return parent::getFormClass();
-   }
-   return 'Gateway_Form_Mustache';
-   }
-
public function getCommunicationType() {
return 'xml';
}
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 117a362..f9e3faf 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -26,14 +26,6 @@
const IDENTIFIER = 'astropay';
const GLOBAL_PREFIX = 'wgAstropayGateway';
 
-   public function getFormClass() {
-   if ( strpos( $this->dataObj->getVal_Escaped( 'ffname' ), 
'error') === 0 ) {
-   // TODO: make a mustache error form
-   return parent::getFormClass();
-   }
-   return 'Gateway_Form_Mustache';
-   }
-
public function getCommunicationType() {
return 'namevalue';
}
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index f013038..618dae8 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2389,7 +2389,13 @@
}
 
public function getFormClass() {
-   return 'Gateway_Form_RapidHtml';
+   $ffname = $this->dataObj->getVal_Escaped( 'ffname' );
+   if ( strpos( $ffname, 'error') === 0
+   || strpos( $ffname, 'maintenance') === 0 ) {
+   // TODO: make a mustache error form
+   return 'Gateway_Form_RapidHtml';
+   }
+   return 'Gateway_Form_Mustache';
}
 
public function getGatewayAdapterClass() {
diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index dda4e8f..897115b 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -31,6 +31,10 @@
return 'xml';
}
 
+   public function getFormClass() {
+   return 'Gateway_Form_RapidHtml';
+   }
+
/**
 * Add a key to the transaction INSERT_ORDERWITHPAYMENT.
 *
diff --git a/paypal_gateway/paypal.adapter.php 
b/paypal_gateway/paypal.adapter.php
index 5c5981b..689fec4 100644
--- a/paypal_gateway/paypal.adapter.php
+++ b/paypal_gateway/paypal.adapter.php
@@ -25,6 +25,10 @@
return 'redirect';
}
 
+   public function getFormClass() {
+   return 'Gateway_Form_RapidHtml';
+   }
+
function __construct( $options = array() ) {
parent::__construct( $options );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib96697f3c7c7d9bbdec4b63d6a2b5f6b4db4eaed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Enable memory cgroups for labs debian instances - change (operations/puppet)

2016-01-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Enable memory cgroups for labs debian instances
..

Enable memory cgroups for labs debian instances

This won't take effect until reboot, but a followup patch will
apply it to the base image as well.

Bug: T122734
Change-Id: I13f1989070e24127a75addeb538c2be58633dd2a
---
M modules/base/manifests/labs.pp
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/262838/1

diff --git a/modules/base/manifests/labs.pp b/modules/base/manifests/labs.pp
index f910e82..feb7835 100644
--- a/modules/base/manifests/labs.pp
+++ b/modules/base/manifests/labs.pp
@@ -21,5 +21,16 @@
 mode   => '0444',
 source => 'puppet:///modules/base/labs/nfs-common.default',
 }
+
+# enable memory cgroups
+augeas { 'grub2':
+incl=> '/etc/default/grub',
+lens=> 'Shellvars_list.lns',
+changes => [
+'set GRUB_CMDLINE_LINUX/value[. = "cgroup_enable=memory"] 
cgroup_enable=memory',
+'set GRUB_CMDLINE_LINUX/value[. = "swapaccount=1"] 
swapaccount=1',
+],
+notify  => Exec['update-grub'],
+}
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13f1989070e24127a75addeb538c2be58633dd2a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Labs jessie image: override the debian grub with a copy of ... - change (operations/puppet)

2016-01-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Labs jessie image:  override the debian grub with a copy of our 
current puppetized grub defaults.
..

Labs jessie image:  override the debian grub with a copy of our current 
puppetized grub defaults.

Bug: T122734
Change-Id: Ia1aa07610c8dbc2c83271e05da304ce88cc21c08
---
M modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml 
b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
index 9603776..24fe76c 100644
--- a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
+++ b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
@@ -174,6 +174,9 @@
 src: /etc/apt/sources.list.d/wikimedia.list
 dst: /etc/apt/sources.list.d/wikimedia.list
   -
+src: /etc/default/grub
+dst: /etc/default/grub
+  -
 src: /etc/apt/preferences.d/wikimedia.pref
 dst: /etc/apt/preferences.d/wikimedia.pref
   -

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1aa07610c8dbc2c83271e05da304ce88cc21c08
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] jquery.accessKeyLabel: make modifier info public - change (mediawiki/core)

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

Change subject: jquery.accessKeyLabel: make modifier info public
..


jquery.accessKeyLabel: make modifier info public

Rewrite of getAccessKeyPrefix into getAccessKeyModifiers. This is my
alternate suggestion for change If953441

Change-Id: I0f77de396b7e79b7c74274df316f62df5220ce27
---
M resources/src/jquery/jquery.accessKeyLabel.js
1 file changed, 43 insertions(+), 23 deletions(-)

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



diff --git a/resources/src/jquery/jquery.accessKeyLabel.js 
b/resources/src/jquery/jquery.accessKeyLabel.js
index afa7201..519e39b 100644
--- a/resources/src/jquery/jquery.accessKeyLabel.js
+++ b/resources/src/jquery/jquery.accessKeyLabel.js
@@ -5,8 +5,8 @@
  */
 ( function ( $, mw ) {
 
-// Cached access key prefix for used browser
-var cachedAccessKeyPrefix,
+// Cached access key modifiers for used browser
+var cachedAccessKeyModifiers,
 
// Whether to use 'test-' instead of correct prefix (used for testing)
useTestPrefix = false,
@@ -16,37 +16,39 @@
labelable = 'button, input, textarea, keygen, meter, output, progress, 
select';
 
 /**
- * Get the prefix for the access key for browsers that don't support 
accessKeyLabel.
+ * Find the modifier keys that need to be pressed together with the accesskey 
to trigger the input.
  *
+ * The result is dependant on the ua paramater or the current platform.
  * For browsers that support accessKeyLabel, #getAccessKeyLabel never calls 
here.
+ * Valid key values that are returned can be: ctrl, alt, option, shift, esc
  *
  * @private
  * @param {Object} [ua] An object with a 'userAgent' and 'platform' property.
- * @return {string} Access key prefix
+ * @return {Array} Array with 0 or more of the string values: ctrl, option, 
alt, shift, esc
  */
-function getAccessKeyPrefix( ua ) {
+function getAccessKeyModifiers( ua ) {
// use cached prefix if possible
-   if ( !ua && cachedAccessKeyPrefix ) {
-   return cachedAccessKeyPrefix;
+   if ( !ua && cachedAccessKeyModifiers ) {
+   return cachedAccessKeyModifiers;
}
 
var profile = $.client.profile( ua ),
-   accessKeyPrefix = 'alt-';
+   accessKeyModifiers = [ 'alt' ];
 
// Classic Opera on any platform
if ( profile.name === 'opera' && profile.versionNumber < 15 ) {
-   accessKeyPrefix = 'shift-esc-';
+   accessKeyModifiers = [ 'shift', 'esc' ];
 
// Chrome and modern Opera on any platform
} else if ( profile.name === 'chrome' || profile.name === 'opera' ) {
-   accessKeyPrefix = (
+   accessKeyModifiers = (
profile.platform === 'mac'
// Chrome on Mac
-   ? 'ctrl-option-'
+   ? [ 'ctrl', 'option' ]
// Chrome on Windows or Linux
// (both alt- and alt-shift work, but alt with 
E, D, F etc does not
// work since they are browser shortcuts)
-   : 'alt-shift-'
+   : [ 'alt', 'shift' ]
);
 
// Non-Windows Safari with webkit_version > 526
@@ -54,7 +56,7 @@
&& profile.name === 'safari'
&& profile.layoutVersion > 526
) {
-   accessKeyPrefix = 'ctrl-alt-';
+   accessKeyModifiers = [ 'ctrl', 'alt' ];
 
// Safari/Konqueror on any platform, or any browser on Mac
// (but not Safari on Windows)
@@ -63,27 +65,27 @@
|| profile.platform === 'mac'
|| profile.name === 'konqueror' )
) {
-   accessKeyPrefix = 'ctrl-';
+   accessKeyModifiers = [ 'ctrl' ];
 
// Firefox/Iceweasel 2.x and later
} else if ( ( profile.name === 'firefox' || profile.name === 
'iceweasel' )
&& profile.versionBase > '1'
) {
-   accessKeyPrefix = 'alt-shift-';
+   accessKeyModifiers = [ 'alt', 'shift' ];
}
 
-   // cache prefix
+   // cache modifiers
if ( !ua ) {
-   cachedAccessKeyPrefix = accessKeyPrefix;
+   cachedAccessKeyModifiers = accessKeyModifiers;
}
-   return accessKeyPrefix;
+   return accessKeyModifiers;
 }
 
 /**
  * Get the access key label for an element.
  *
  * Will use native accessKeyLabel if available (currently only in Firefox 8+),
- * falls back to #getAccessKeyPrefix.
+ * falls back to #getAccessKeyModifiers.
  *
  * @private
  * @param {HTMLElement} element Element to get the label for
@@ -99,7 +101,7 @@
if ( !useTestPrefix && element.accessKeyLabel ) {
return element.accessKeyLabel;
}
-   return ( useTe

[MediaWiki-commits] [Gerrit] [elastic] Fix bad method call in diamond collection - change (operations/puppet)

2016-01-06 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: [elastic] Fix bad method call in diamond collection
..


[elastic] Fix bad method call in diamond collection

Change-Id: I6715d982491225265a4f8c114e8dff8a60b3e266
---
M modules/elasticsearch/files/monitor/wmfelastic.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/elasticsearch/files/monitor/wmfelastic.py 
b/modules/elasticsearch/files/monitor/wmfelastic.py
index 2001438..2eb8887 100644
--- a/modules/elasticsearch/files/monitor/wmfelastic.py
+++ b/modules/elasticsearch/files/monitor/wmfelastic.py
@@ -260,7 +260,7 @@
 cluster_stats = self.cluster_stats()
 for metric, value in cluster_stats.iteritems():
 self.publish(metric, value)
-health_stats = self.health_stats()
+health_stats = self.cluster_health()
 for metric, value in health_stats.iteritems():
 self.publish(metric, value)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6715d982491225265a4f8c114e8dff8a60b3e266
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add links and examples for api modules - change (mediawiki...CirrusSearch)

2016-01-06 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Add links and examples for api modules
..

Add links and examples for api modules

so one can click the link from the apihelp pages

Change-Id: I34c2d675f4f8a1bc63ebac24fc4333c324d1a75d
---
M i18n/en.json
M i18n/qqq.json
M includes/Api/ConfigDump.php
M includes/Api/MappingDump.php
M includes/Api/SettingsDump.php
5 files changed, 40 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/32/262732/2

diff --git a/i18n/en.json b/i18n/en.json
index 7e6ba48..976aea7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,8 +17,11 @@
"cirrussearch-pref-label": "New search",
"cirrussearch-pref-desc": "Try our new search which supports a greater 
number of languages, provides more up-to-date results, and can even find text 
inside of templates.",
"apihelp-cirrus-config-dump-description": "Dump of CirrusSearch 
configuration.",
+   "apihelp-cirrus-config-dump-example": "Get a dump of CirrusSearch 
configuration.",
"apihelp-cirrus-mapping-dump-description": "Dump of CirrusSearch 
mapping for this wiki.",
+   "apihelp-cirrus-mapping-dump-example": "Get a dump of the CirrusSearch 
mapping for this wiki.",
"apihelp-cirrus-settings-dump-description": "Dump of CirrusSearch 
settings for this wiki.",
+   "apihelp-cirrus-settings-dump-example": "Get a dump of CirrusSearch 
settings for this wiki.",
"apihelp-cirrus-suggest-description": "Suggest completions for search 
term.",
"apihelp-cirrus-suggest-param-text": "Search term to provide 
completions for.",
"apihelp-cirrus-suggest-param-limit": "How many results to return.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 738e85c..9892d27 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -25,8 +25,11 @@
"cirrussearch-pref-label": "Preference label for option to enable 
CirrusSearch by default",
"cirrussearch-pref-desc": "Description for option to enable 
CirrusSearch by default",
"apihelp-cirrus-config-dump-description": 
"{{doc-apihelp-description|cirrus-config-dump}}",
+   "apihelp-cirrus-config-dump-example": 
"{{doc-apihelp-example|cirrus-config-dump}}",
"apihelp-cirrus-mapping-dump-description": 
"{{doc-apihelp-description|cirrus-mapping-dump}}",
+   "apihelp-cirrus-mapping-dump-example": 
"{{doc-apihelp-example|cirrus-mapping-dump}}",
"apihelp-cirrus-settings-dump-description": 
"{{doc-apihelp-description|cirrus-settings-dump}}",
+   "apihelp-cirrus-settings-dump-example": 
"{{doc-apihelp-example|cirrus-settings-dump}}",
"apihelp-cirrus-suggest-description": 
"{{doc-apihelp-description|cirrus-suggest}}",
"apihelp-cirrus-suggest-param-text": 
"{{doc-apihelp-param|cirrus-suggest|text}}",
"apihelp-cirrus-suggest-param-limit": 
"{{doc-apihelp-param|cirrus-suggest|limit}}",
diff --git a/includes/Api/ConfigDump.php b/includes/Api/ConfigDump.php
index cf99198..f741ad5 100644
--- a/includes/Api/ConfigDump.php
+++ b/includes/Api/ConfigDump.php
@@ -48,4 +48,15 @@
public function getDescription() {
return 'Dump of CirrusSearch configuration.';
}
+
+   /**
+* @see ApiBase::getExamplesMessages
+*/
+   protected function getExamplesMessages() {
+   return array(
+   'action=cirrus-config-dump' =>
+   'apihelp-cirrus-config-dump-example'
+   );
+   }
+
 }
diff --git a/includes/Api/MappingDump.php b/includes/Api/MappingDump.php
index 4877f6c..3b38c32 100644
--- a/includes/Api/MappingDump.php
+++ b/includes/Api/MappingDump.php
@@ -40,4 +40,15 @@
public function getDescription() {
return 'Dump of CirrusSearch mapping for this wiki.';
}
+
+   /**
+* @see ApiBase::getExamplesMessages
+*/
+   protected function getExamplesMessages() {
+   return array(
+   'action=cirrus-mapping-dump' =>
+   'apihelp-cirrus-mapping-dump-example'
+   );
+   }
+
 }
diff --git a/includes/Api/SettingsDump.php b/includes/Api/SettingsDump.php
index 856c07a..67f8357 100644
--- a/includes/Api/SettingsDump.php
+++ b/includes/Api/SettingsDump.php
@@ -37,6 +37,17 @@
 * @deprecated since MediaWiki core 1.25
 */
public function getDescription() {
-   return 'Dump of CirrusSearch mapping for this wiki.';
+   return 'Dump of CirrusSearch settings for this wiki.';
}
+
+   /**
+* @see ApiBase::getExamplesMessages
+*/
+   protected function getExamplesMessages() {
+   return array(
+   'action=cirrus-settings-dump' =>
+   'apihelp-cirrus-settings-du

[MediaWiki-commits] [Gerrit] Removed deprecated tags from SF - change (mediawiki...SemanticForms)

2016-01-06 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Removed deprecated  tags from SF
..


Removed deprecated  tags from SF

Commit removes deprecated  tag which is in HTML 4 that has
been removed in HTML 5 and used just as CSS. This fixes the bug.

Bug: T121911
Change-Id: Ia01fe0ce38230345260a3b1ca3ad4a29f853868a
---
M specials/SF_CreateForm.php
M specials/SF_CreateTemplate.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/specials/SF_CreateForm.php b/specials/SF_CreateForm.php
index 8000d6f..afce2a4 100644
--- a/specials/SF_CreateForm.php
+++ b/specials/SF_CreateForm.php
@@ -70,7 +70,7 @@
}
 
$out->addModules( 'ext.semanticforms.collapsible' );
-   $section_name_error_str = '' . wfMessage( 'sf_blank_error' )->escaped() . '';
+   $section_name_error_str = '' . wfMessage( 'sf_blank_error' )->escaped() . '';
 
$out->addScript("

[MediaWiki-commits] [Gerrit] Re enable extension registration - change (mediawiki...Cargo)

2016-01-06 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Re enable extension registration
..


Re enable extension registration

This sorts out the global config issue.

Requires MediaWiki 1.25.3 or later for extension.json.

Change-Id: I965c8055718ace90ca1797aa41a9dc79892d12b3
---
M Cargo.php
M extension.json
2 files changed, 18 insertions(+), 17 deletions(-)

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



diff --git a/Cargo.php b/Cargo.php
index 57a21c6..7013255 100644
--- a/Cargo.php
+++ b/Cargo.php
@@ -15,22 +15,19 @@
 // makes it unusable for Cargo - don't load extensions unless we're at
 // version 1.25.3 or higher.
 // (See https://phabricator.wikimedia.org/T109243)
-//if ( function_exists( 'wfLoadExtension' ) ) {
-
-// Actually, for now, don't ever load it - the setting of global
-// variables in extension.json needs to be fixed.
-//if ( version_compare( $wgVersion, '1.25.3', '>=' ) ) {
-
-if ( false ) {
-   wfLoadExtension( 'Cargo' );
-   // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['Cargo'] = __DIR__ . '/i18n';
-   $wgExtensionMessagesFiles['CargoMagic'] = __DIR__ . 
'/Cargo.i18n.magic.php';
-   /* wfWarn(
-   'Deprecated PHP entry point used for Cargo extension. Please 
use wfLoadExtension instead, ' .
-   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
-   return;
+if ( version_compare( $GLOBALS['wgVersion'], '1.25.3c', '>' ) ) {
+   if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'Cargo' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['Cargo'] = __DIR__ . '/i18n';
+   $wgExtensionMessagesFiles['CargoMagic'] = __DIR__ . 
'/Cargo.i18n.magic.php';
+   $wgExtensionMessagesFiles['CargoAlias'] = __DIR__ . 
'/Cargo.alias.php';
+   /* wfWarn(
+   'Deprecated PHP entry point used for Cargo extension. 
Please use wfLoadExtension instead, ' .
+   'see 
https://www.mediawiki.org/wiki/Extension_registration for more details.'
+   ); */
+   return;
+   }
 }
 
 // All the rest is for backward compatibility, for MW 1.25 and lower.
diff --git a/extension.json b/extension.json
index 7eddd3b..4e44cea 100644
--- a/extension.json
+++ b/extension.json
@@ -6,6 +6,9 @@
"url": "https://www.mediawiki.org/wiki/Extension:Cargo";,
"descriptionmsg": "cargo-desc",
"type": "parserhook",
+   "requires": {
+   "MediaWiki": ">= 1.25.3"
+   },
"callback": "CargoHooks::registerExtension",
"AvailableRights": [
"recreatecargodata",
@@ -33,7 +36,8 @@
]
},
"ExtensionMessagesFiles": {
-   "CargoMagic": "Cargo.i18n.magic.php"
+   "CargoMagic": "Cargo.i18n.magic.php",
+   "CargoAlias": "Cargo.alias.php"
},
"AutoloadClasses": {
"CargoHooks": "Cargo.hooks.php",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I965c8055718ace90ca1797aa41a9dc79892d12b3
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] grant aude access to analytics-privatedata-users - change (operations/puppet)

2016-01-06 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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

Change subject: grant aude access to analytics-privatedata-users
..

grant aude access to analytics-privatedata-users

Katie (aude) will be working with the CirrusSearchRequestSet data along
with the webrequest data currently stored in hive to analyse and improve
the search relevancy on wikidata.

This cannot merge until after the three day wait has passed and no
objections are noted on the task.  (An Opsen should review and merge
this, as there can be hidden blockers.)

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/262836/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f60a467..4201d26 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -229,7 +229,7 @@
  This will grant shell access on Hadoop client nodes 
(stat1002) and on
  Hadoop NameNodes.  Some files in HDFS have sensitive data in 
them.
  Those files are group readable by the 
analytics-privatedata-users group.
-members: [dartar, milimetric, yurik, dfoy,
+members: [dartar, milimetric, yurik, dfoy, aude,
   halfak, dr0ptp4kt, tnegrin, ironholds, bearloga, cwdent,
   kleduc, nuria, haithams, otto, deskana, zhousquared,
   bsitzmann, dbrant, declerambaul, ellery, nettrom, leila,

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

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

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


[MediaWiki-commits] [Gerrit] WebRequest::appendQuery*() functions no longer take $onlyquery - change (mediawiki/core)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: WebRequest::appendQuery*() functions no longer take $onlyquery
..

WebRequest::appendQuery*() functions no longer take $onlyquery

Deprecated since 1.25, unused anywhere

Change-Id: I52224635cfeaf4748abeaa07b0c92e7f452fa93f
---
M includes/WebRequest.php
M includes/diff/DifferenceEngine.php
M includes/skins/SkinTemplate.php
3 files changed, 6 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/262837/1

diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 7e22404..7b76592 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -729,33 +729,24 @@
/**
 * @param string $key
 * @param string $value
-* @param bool $onlyquery [deprecated]
 * @return string
 */
-   public function appendQueryValue( $key, $value, $onlyquery = true ) {
-   return $this->appendQueryArray( array( $key => $value ), 
$onlyquery );
+   public function appendQueryValue( $key, $value ) {
+   return $this->appendQueryArray( array( $key => $value ) );
}
 
/**
 * Appends or replaces value of query variables.
 *
 * @param array $array Array of values to replace/add to query
-* @param bool $onlyquery Whether to only return the query string
-*  and not the complete URL [deprecated]
 * @return string
 */
-   public function appendQueryArray( $array, $onlyquery = true ) {
-   global $wgTitle;
+   public function appendQueryArray( $array ) {
$newquery = $this->getQueryValues();
unset( $newquery['title'] );
$newquery = array_merge( $newquery, $array );
-   $query = wfArrayToCgi( $newquery );
-   if ( !$onlyquery ) {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $wgTitle->getLocalURL( $query );
-   }
 
-   return $query;
+   return wfArrayToCgi( $newquery );
}
 
/**
diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 5e37663..d588d51 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -433,7 +433,7 @@
array( $msg ) );
} else {
# Give explanation and add a link to view the 
diff...
-   $query = $this->getRequest()->appendQueryValue( 
'unhide', '1', true );
+   $query = $this->getRequest()->appendQueryValue( 
'unhide', '1' );
$link = $this->getTitle()->getFullURL( $query );
$msg = $suppressed ? 
'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff';
$out->wrapWikiMsg(
diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index c0e5556..2ecbafb 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -1204,7 +1204,7 @@
$nav_urls['print'] = array(
'text' => $this->msg( 'printableversion' 
)->text(),
'href' => $this->getTitle()->getLocalURL(
-   $request->appendQueryValue( 
'printable', 'yes', true ) )
+   $request->appendQueryValue( 
'printable', 'yes' ) )
);
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Remove WebRequest::appendQuery() - change (mediawiki/core)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Remove WebRequest::appendQuery()
..

Remove WebRequest::appendQuery()

Deprecated in 1.25, nothing uses it. You should use appendQueryValue()
or appendQueryArray()

Change-Id: Ia2347a1eaf6d9c6cfc600947e577c08cd482a5ac
---
M includes/WebRequest.php
1 file changed, 0 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/262834/1

diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 6cb39d8..7e22404 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -727,17 +727,6 @@
}
 
/**
-* Take an arbitrary query and rewrite the present URL to include it
-* @deprecated Use appendQueryValue/appendQueryArray instead
-* @param string $query Query string fragment; do not include initial 
'?'
-* @return string
-*/
-   public function appendQuery( $query ) {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $this->appendQueryArray( wfCgiToArray( $query ) );
-   }
-
-   /**
 * @param string $key
 * @param string $value
 * @param bool $onlyquery [deprecated]

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

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

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


[MediaWiki-commits] [Gerrit] Clean up AudioUrlSpan class - change (apps...wikipedia)

2016-01-06 Thread Deskana (Code Review)
Deskana has uploaded a new change for review.

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

Change subject: Clean up AudioUrlSpan class
..

Clean up AudioUrlSpan class

This patch removes some redundant code from the class, such as unreachable
statements and overridden methods that only call their super.

Change-Id: I5d9a98668ea288cad1b46071b73ad8ab0b6956fb
---
M app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
1 file changed, 0 insertions(+), 12 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java 
b/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
index 35c0972..f6d0446 100644
--- a/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
+++ b/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
@@ -81,13 +81,6 @@
 return getIconShown() == PLAY_ICON_LEVEL;
 }
 
-@NonNull
-@Override
-public Drawable getDrawable() {
-//noinspection ConstantConditions
-return super.getDrawable();
-}
-
 @Override
 @SuppressWarnings("checkstyle:parameternumber")
 public void draw(Canvas canvas,
@@ -103,11 +96,6 @@
 
 clickSpan.setOriginX(x + getDrawable().getBounds().centerX());
 clickSpan.setOriginY(drawY(y, bottom) + 
getDrawable().getBounds().centerY());
-
-final boolean debugClickBounds = false;
-if (debugClickBounds) {
-clickSpan.draw(canvas);
-}
 }
 
 private void showIcon(int level) {

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

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

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


[MediaWiki-commits] [Gerrit] Use ve.ui.Surface#setDisabled - change (mediawiki...Flow)

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

Change subject: Use ve.ui.Surface#setDisabled
..


Use ve.ui.Surface#setDisabled

Depends on Id53c98ba in VisualEditor core.

Change-Id: I8a77342447ed402478ea692f9033cc9f61f28c8d
---
M modules/editor/editors/visualeditor/mw.flow.ve.Target.js
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target.js 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target.js
index 16b8339..b828f11 100644
--- a/modules/editor/editors/visualeditor/mw.flow.ve.Target.js
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target.js
@@ -67,11 +67,9 @@
};
 
mw.flow.ve.Target.prototype.setDisabled = function ( disabled ) {
-   // TODO upstream this to ve.init.Target
var i, len;
for ( i = 0, len = this.surfaces.length; i < len; i++ ) {
-   // T106908: ve.ui.Surface doesn't support setDisabled()
-   this.surfaces[ i ][ disabled ? 'disable' : 'enable' ]();
+   this.surfaces[ i ].setDisabled( disabled );
}
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a77342447ed402478ea692f9033cc9f61f28c8d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] added Semantic MediaWiki role - change (mediawiki/vagrant)

2016-01-06 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review.

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

Change subject: added Semantic MediaWiki role
..

added Semantic MediaWiki role

Bug:T99858
Change-Id: I777c9763991ae06c7d8caced909b443ce68e6330
---
A puppet/modules/role/manifests/semantic_mediawiki.pp
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/33/262833/1

diff --git a/puppet/modules/role/manifests/semantic_mediawiki.pp 
b/puppet/modules/role/manifests/semantic_mediawiki.pp
new file mode 100644
index 000..01b1661
--- /dev/null
+++ b/puppet/modules/role/manifests/semantic_mediawiki.pp
@@ -0,0 +1,14 @@
+# == Class: role::semantic_mediawiki
+# The Semantic MediaWiki extension lets you store and query structured data 
within wiki pages
+class role::semantic_mediawiki {
+
+require ::role::mediawiki
+
+mediawiki::extension { 'SemanticMediaWiki':
+composer => true,
+needs_update => true,
+settings => [
+   'enableSemantics($wgSitename)',
+   ]
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I777c9763991ae06c7d8caced909b443ce68e6330
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] Stop using $wgTitle, EditPage already provides one - change (mediawiki...MsCatSelect)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Stop using $wgTitle, EditPage already provides one
..

Stop using $wgTitle, EditPage already provides one

Also fix weird line endings while we're here

Change-Id: Ib8d59215efc45fd27ef3f314f8bd182c6a517f8d
---
M MsCatSelect.body.php
1 file changed, 79 insertions(+), 79 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MsCatSelect 
refs/changes/32/262832/1

diff --git a/MsCatSelect.body.php b/MsCatSelect.body.php
index 30a1070..940cf4b 100755
--- a/MsCatSelect.body.php
+++ b/MsCatSelect.body.php
@@ -1,79 +1,79 @@
-addModules( 'ext.MsCatSelect' );
-
-   // Make the configuration variables available to JavaScript
-   $mscsVars = array(
-   'MainCategories' => $wgMSCS_MainCategories,
-   'UseNiceDropdown' => $wgMSCS_UseNiceDropdown,
-   'WarnNoCategories' => $wgMSCS_WarnNoCategories,
-   'WarnNoCategoriesException' => str_replace( ' ', '_', 
$wgMSCS_WarnNoCategoriesException ),
-   );
-   $mscsVars = json_encode( $mscsVars, true );
-   $wgOut->addScript( "var mscsVars = $mscsVars;" 
);
-   return true;
-   }
-
-   // Entry point for the hook and main worker function for editing the 
page:
-   static function showHook( EditPage $editPage, OutputPage $output ) {
-   self::cleanTextbox( $editPage );
-   return true;
-   }
-
-   // Entry point for the hook and main worker function for saving the 
page:
-   static function saveHook( $editPage ) {
-   global $wgContLang, $wgTitle;
-
-   // Get localised namespace string
-   $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
-
-   // Default sort key is page name with stripped namespace name, 
otherwise sorting is ugly
-   if ( $wgTitle->getNamespace() == NS_MAIN ) {
-   $default_sortkey = "";
-   } else {
-   $default_sortkey = "|{{PAGENAME}}";
-   }
-
-   // Iterate through all selected category entries:
-   $text = "\n";
-   if ( array_key_exists( 'SelectCategoryList', $_POST ) ) {
-   foreach ( $_POST['SelectCategoryList'] as $category ) {
-   $text .= "\n[[" . $categoryNamespace . ":" . 
$category . "]]";
-   }
-   }
-   $editPage->textbox1 .= $text;
-
-   return true;
-   }
-
-   // Removes the old category tag from the text the user views in the 
editbox.
-   static function cleanTextbox( $editPage ) {
-   global $wgContLang;
-
-   $editText = $editPage->textbox1;
-
-   $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
-
-   // The regular expression to find the category links:
-   $pattern = 
"\[\[({$categoryNamespace}):([^\|\]]*)(\|[^\|\]]*)?\]\]";
-
-   // The container to store the processed text:
-   $cleanText = '';
-
-   // Check linewise for category links:
-   foreach ( explode( "\n", $editText ) as $textLine ) {
-   // Filter line through pattern and store the result:
-   $cleanText .= preg_replace( "/{$pattern}/i", "", 
$textLine ) . "\n";
-   }
-   // Place the cleaned text into the text box:
-   $editPage->textbox1 = trim( $cleanText );
-
-   return true;
-   }
-}
\ No newline at end of file
+addModules( 'ext.MsCatSelect' );
+
+   // Make the configuration variables available to JavaScript
+   $mscsVars = array(
+   'MainCategories' => $wgMSCS_MainCategories,
+   'UseNiceDropdown' => $wgMSCS_UseNiceDropdown,
+   'WarnNoCategories' => $wgMSCS_WarnNoCategories,
+   'WarnNoCategoriesException' => str_replace( ' ', '_', 
$wgMSCS_WarnNoCategoriesException ),
+   );
+   $mscsVars = json_encode( $mscsVars, true );
+   $wgOut->addScript( "var mscsVars = $mscsVars;" 
);
+   return true;
+   }
+
+   // Entry point for the hook and main worker function for editing the 
page:
+   static function showHook( EditPage $editPage, OutputPage $output ) {
+   self::cleanTextbox( $editPage );
+   return true;
+   }
+
+   // Entry point for the hook and main worker function for saving the 
page:
+   static function saveHook( $editPage ) {
+   global $wgContLang;
+
+   // Get localised namespace string
+   $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY

[MediaWiki-commits] [Gerrit] Stop using $wgTitle, we already have a $target title on hand - change (mediawiki...RPED)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Stop using $wgTitle, we already have a $target title on hand
..

Stop using $wgTitle, we already have a $target title on hand

Change-Id: Iee3739d242720ee3486b55a97f9c0cb7989fc709
---
M RPED.hooks.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/RPED.hooks.php b/RPED.hooks.php
index 13ce73c..0686781 100644
--- a/RPED.hooks.php
+++ b/RPED.hooks.php
@@ -18,10 +18,10 @@
public static function wikipediaLink( $skin, $target, &$text,
&$customAttribs, &$query, &$options, &$ret
) {
-   global $wgLocalStyle, $wgRemoteStyle, 
$wgPureWikiDeletionInEffect
-   , $wgTitle, $wgRequest, $wgRPEDBrokenLinkStyle, 
$wgRPEDExcludeNamespaced;
-   
-   if ( $wgTitle->getNamespace () == -1 ) {
+   global $wgLocalStyle, $wgRemoteStyle, 
$wgPureWikiDeletionInEffect,
+   $wgRequest, $wgRPEDBrokenLinkStyle, 
$wgRPEDExcludeNamespaced;
+
+   if ( $target->getNamespace () == -1 ) {
return true;
}
 
@@ -41,11 +41,11 @@
$interwikiURL = $skin->msg( 
'rped-wikipedia-url','parsemag')->text();
$dbr = wfGetDB( DB_SLAVE );
$title = $target->getDBkey ();
-   
+
if ( strpos ( $title, ':' ) && $wgRPEDExcludeNamespaced 
) {
return true;
}
-   
+
$interwikiPrefix = $target->getInterwiki ();
$result = $dbr->selectRow(
'interwiki',
@@ -53,11 +53,11 @@
array( "iw_url" => $interwikiURL
  , "iw_prefix" => $interwikiPrefix )
);
-   
+
if ( !$result ) {
return true;
}
-   
+
$result = $dbr->selectRow(
'rped_page',
'rped_page_id',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee3739d242720ee3486b55a97f9c0cb7989fc709
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RPED
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] Stop using $wgTitle, no need to be the global - change (mediawiki...BlueSpiceFoundation)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Stop using $wgTitle, no need to be the global
..

Stop using $wgTitle, no need to be the global

Change-Id: I17d31515187c6a88f85ed9c16ecf8e9a9f2c3014
---
M maintenance/RenameCategories.php
M maintenance/massedit.php
2 files changed, 39 insertions(+), 39 deletions(-)


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

diff --git a/maintenance/RenameCategories.php b/maintenance/RenameCategories.php
index 9d30a8a..dffa543 100644
--- a/maintenance/RenameCategories.php
+++ b/maintenance/RenameCategories.php
@@ -78,12 +78,12 @@
 # The following part is copied from hw_massedit.php
 # -- snip -
 
-/* 
-This script is used to do mass edits on Mediawiki articles. Articles are 
selected via 
+/*
+This script is used to do mass edits on Mediawiki articles. Articles are 
selected via
 - namespace
 - content via exclusion or inclusion regex
 - title via regex
-( 
+(
   - category
 )
 Article text can be appended or replaced based on regular expressions.
@@ -115,14 +115,14 @@
 $autoSummary = false;
 $noRC = true;
 
-//$text_exclude = array(   
-// '/\[\[Kategorie:Englisch\]\]/', 
+//$text_exclude = array(
+// '/\[\[Kategorie:Englisch\]\]/',
 // '/\[\[Category:Translation\]\]/'
 //  );
 //$text_include = array(
 // '/test test/'
 // );
-//$namespace_include = array( 10 ); 
+//$namespace_include = array( 10 );
 //$namespace_exclude = array( NS_IMAGE, NS_IMAGE_TALK, NS_MEDIAWIKI, 
NS_MEDIAWIKI_TALK );
 //$title_include = array( '/Datev/', '/Hauptseite/' );
 //$title_include = array( '|NZ/.*?|' );
@@ -181,7 +181,7 @@
 $namespace = array();
 if (isset($namespace_include)) { $token = 'IN '; $namespace = 
$namespace_include; }
 if (isset($namespace_exclude)) { $token = 'NOT IN '; $namespace = 
$namespace_exclude; }
-if ($token) $qry_ns = 'page_namespace '.$token.' ("'.implode('","', 
$namespace).'")'; 
+if ($token) $qry_ns = 'page_namespace '.$token.' ("'.implode('","', 
$namespace).'")';
 
 $dbw =& wfGetDB( DB_MASTER );
 $res = $dbw->select('page', 'page_title, page_namespace, page_id', $qry_ns, 
'Database::select', array('order by' => 'page_title'));
@@ -195,34 +195,34 @@
 
 while ($row = mysql_fetch_array($res->result))
 {
-   
+
$cur_title = $row['page_title'];
$cur_title_ns = MWNamespace::getCanonicalName($row['page_namespace']);
-   $cur_title_ns = ($cur_title_ns) ? "$cur_title_ns:" : ""; 
+   $cur_title_ns = ($cur_title_ns) ? "$cur_title_ns:" : "";
print 
"$cur_title_ns$cur_title\n===\n";
 
// Title conditions
$title_conds = array();
if (isset($title_include)) { $title_conds = $title_include; $match = 
true; }
-   if (isset($title_exclude)) { $title_conds = $title_exclude; $match = 
false; }   
+   if (isset($title_exclude)) { $title_conds = $title_exclude; $match = 
false; }
$skip = true;
foreach ($title_conds as $cond)
if (preg_match($cond, $cur_title)==$match) $skip = false;
if ((isset($title_include) || isset($title_exclude)) && ($skip))
{
print "Skipped based on title exclude condition.\n";
-   continue;   
+   continue;
}
-   
+
// Check title for validity
-   $wgTitle = Title::makeTitle( $row['page_namespace'], $cur_title );
-   if ( !$wgTitle ) {
+   $title = Title::makeTitle( $row['page_namespace'], $cur_title );
+   if ( !$title ) {
print "Invalid title\n";
continue;
}
-   
+
// Fetch text
-   $article = new Article( $wgTitle );
+   $article = new Article( $title );
$article->fetchContent();
$text = $article->getContent() ;
if ($text == '') echo 'empty!';
@@ -241,14 +241,14 @@
}
 
// this part is for text modification only (append, prefix, delete, 
replace)
-   if (in_array($mode, array('append','prefix','delete','replace'))) 
+   if (in_array($mode, array('append','prefix','delete','replace')))
{
# Modify the text
$old_text = $text;
-   
-   if ($mode == 'append') 
+
+   if ($mode == 'append')
$text .= $append_text;
-   else if ($mode == 'prefix') 
+   else if ($mode == 'prefix')
$text = $prefix_text.$text;
else if ($mode == 'delete')
{
@@ -258,7 +258,7 @@
{

[MediaWiki-commits] [Gerrit] Update forecast dashboard - change (wikimedia...experimental)

2016-01-06 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Update forecast dashboard
..


Update forecast dashboard

Change-Id: Id8d775ea1a24032909e5291abb9e52936c4aee68
---
M shiny-server/forecast
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/shiny-server/forecast b/shiny-server/forecast
index fe50f28..186bdaa 16
--- a/shiny-server/forecast
+++ b/shiny-server/forecast
-Subproject commit fe50f2896a1b71fc3de7ee1c9c3e062f2f1f434f
+Subproject commit 186bdaacef0ba1b5c27b4c43589ac408036c2877

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

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

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


[MediaWiki-commits] [Gerrit] Update forecast dashboard - change (wikimedia...experimental)

2016-01-06 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Update forecast dashboard
..

Update forecast dashboard

Change-Id: Id8d775ea1a24032909e5291abb9e52936c4aee68
---
M shiny-server/forecast
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/experimental 
refs/changes/29/262829/1

diff --git a/shiny-server/forecast b/shiny-server/forecast
index fe50f28..186bdaa 16
--- a/shiny-server/forecast
+++ b/shiny-server/forecast
-Subproject commit fe50f2896a1b71fc3de7ee1c9c3e062f2f1f434f
+Subproject commit 186bdaacef0ba1b5c27b4c43589ac408036c2877

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

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

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


[MediaWiki-commits] [Gerrit] [elasticsearch] Record per-node fetch timing - change (operations/puppet)

2016-01-06 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: [elasticsearch] Record per-node fetch timing
..

[elasticsearch] Record per-node fetch timing

This will allow us to determine average fetch latency for es nodes.
In general within es a search is both a query and a fetch phase, so
whatever information we store about the query phase we should also
store about the fetch phase.

I think we can get away with only the per-node fetch timing, rather
than collecting per query group. The fetch phase is pretty similar
regardless of the query time whereas the query phase varies greatly.

Change-Id: Ice6e8660f452ebe8398f49e6cdbbebd5c75fa82a
---
M modules/elasticsearch/files/monitor/wmfelastic.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/262828/1

diff --git a/modules/elasticsearch/files/monitor/wmfelastic.py 
b/modules/elasticsearch/files/monitor/wmfelastic.py
index 2001438..e80cb9e 100644
--- a/modules/elasticsearch/files/monitor/wmfelastic.py
+++ b/modules/elasticsearch/files/monitor/wmfelastic.py
@@ -103,6 +103,8 @@
 'indices.search.query_time_in_millis',
 'indices.search.query_current',
 'indices.search.fetch_total',
+'indices.search.fetch_time_in_millis',
+'indices.search.fetch_current',
 'indices.search.groups.more_like.query_total',
 'indices.search.groups.more_like.query_time_in_millis',
 'indices.search.groups.prefix.query_total',

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

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

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


[MediaWiki-commits] [Gerrit] Make compatible with Open badges specification v. 1.1 - change (mediawiki...OpenBadges)

2016-01-06 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Make compatible with Open badges specification v. 1.1
..

Make compatible with Open badges specification v. 1.1

Changes the API assertion output to be compatible with the new
specification. In doing so also refactors the api url generating
calls.

Additionally clean up some whitespace issues and add some missing
docstrings.

Bug: T122991
Change-Id: I72190d1338daf8dc714716d39d5f30c0e7fa4e87
---
M ApiOpenBadges.php
M ApiOpenBadgesAssertions.php
M ApiOpenBadgesIssue.php
3 files changed, 169 insertions(+), 67 deletions(-)


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

diff --git a/ApiOpenBadges.php b/ApiOpenBadges.php
index aa4dfc7..685ff1c 100644
--- a/ApiOpenBadges.php
+++ b/ApiOpenBadges.php
@@ -17,6 +17,7 @@
 * Given an image filename this returns the file url if a png
 * or a thumb-file url if an svg
 *
+* @param string $filename
 * @return string
 */
public function imageUrl( $filename ) {
@@ -47,6 +48,8 @@
 
/**
 * Verify that the badge exists
+*
+* @param int $badgeID
 */
public function dieOnBadBadge( $badgeID ) {
$res = $this->queryBadge( $badgeID );
@@ -57,6 +60,8 @@
 
/**
 * Verify that the recipient is suitable
+*
+* @param User $recipient
 */
public function dieOnBadRecipient( User $recipient ) {
global $wgOpenBadgesRequireEmail;
@@ -74,6 +79,7 @@
/**
 * Run SQL query to get all info about a badge
 *
+* @param int $badgeID
 * @return ResultWrapper|bool
 */
public function queryBadge( $badgeID ) {
@@ -89,6 +95,8 @@
/**
 * Run SQL query to get all relevant info for an issued badge
 *
+* @param int $badgeID
+* @param User $recipient
 * @return ResultWrapper|bool
 */
public function queryIssuedBadge( $badgeID, User $recipient ) {
diff --git a/ApiOpenBadgesAssertions.php b/ApiOpenBadgesAssertions.php
index a0035bf..41fa011 100644
--- a/ApiOpenBadgesAssertions.php
+++ b/ApiOpenBadgesAssertions.php
@@ -22,7 +22,7 @@
),
'obl_badge_id' => array(
ApiBase::PARAM_TYPE => 'integer',
-   ApiBase::PARAM_REQUIRED => true
+   ApiBase::PARAM_REQUIRED => false
),
'obl_receiver' => array(
ApiBase::PARAM_TYPE => 'integer',
@@ -36,6 +36,12 @@
$requestType = $params['type'];
$badgeID = $params['obl_badge_id'];
 
+   // obl_badge_id is only optional for issuer
+   if ( !$badgeID and $requestType != 'issuer' ) {
+   $this->dieUsage( 'The obl_badge_id parameter must be ' .
+   'set for any type other than issuer', 
'noobl_badge_id' );
+   }
+
if ( $requestType == 'assertion' ) {
if ( !$params['obl_receiver'] ) {
$this->dieUsage( 'The obl_receiver parameter 
must be ' .
@@ -47,11 +53,11 @@
elseif ( $requestType == 'badge' ) {
$this::returnBadgeClass( $badgeID );
}
-   elseif ( $requestType == 'issuer' ) {
-   $this::returnIssuer( $badgeID );
-   }
elseif ( $requestType == 'criteria' ) {
$this::returnCriteria( $badgeID );
+   }
+   elseif ( $requestType == 'issuer' ) {
+   $this::returnIssuer();
}
// else case is handled automatically by API
 
@@ -63,15 +69,20 @@
public function returnIssuer() {
global $wgSitename;
global $wgCanonicalServer;
-   $this->getResult()->addValue( null, 'issuer', array(
-   'name' => $wgSitename,
-   'url' => $wgCanonicalServer,
-   )
-   );
+
+   // Required for v. 1.1
+   $this->getResult()->addValue( null, '@context', 
'https://w3id.org/openbadges/v1' );
+   $this->getResult()->addValue( null, 'type', 'Issuer' );
+   $this->getResult()->addValue( null, 'id', $this->issuerUrl() );
+
+   $this->getResult()->addValue( null, 'name', $wgSitename );
+   $this->getResult()->addValue( null, 'url', $wgCanonicalServer );
}
 
/**
 * Returns the criteria for a certain badge
+*
+* @param int $badgeID
 */
p

[MediaWiki-commits] [Gerrit] Remove unused $wgTitle global - change (mediawiki...GeoGebra)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Remove unused $wgTitle global
..

Remove unused $wgTitle global

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


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

diff --git a/GeoGebra.body.php b/GeoGebra.body.php
index 247918a..0414528 100644
--- a/GeoGebra.body.php
+++ b/GeoGebra.body.php
@@ -49,7 +49,7 @@

 if(!count(self::$divs)) return true;
 
-global $wgTitle, $wgJsMimeType;
+global $wgJsMimeType;
 $out->addScript("\n");
 $scriptBody = "for(var key in window.ggbParams){
var c=window.ggbParams[key];
@@ -58,4 +58,4 @@
 $out->addScript("$scriptBody\n");
 return true;
   }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I072991df029b5aa41bb58426ca88915cc26aa1ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoGebra
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] Don't call a hook parameter $wgTitle, it isn't - change (mediawiki...Favorites)

2016-01-06 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Don't call a hook parameter $wgTitle, it isn't
..

Don't call a hook parameter $wgTitle, it isn't

Change-Id: I7f1b1277318e91121113aa34af3f77958532
---
M FavoritesHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/FavoritesHooks.php b/FavoritesHooks.php
index 7f0e138..d03f9db 100644
--- a/FavoritesHooks.php
+++ b/FavoritesHooks.php
@@ -89,7 +89,7 @@
return true;
}

-   public static function onPersonalUrls( &$personal_urls, &$wgTitle ) {
+   public static function onPersonalUrls( &$personal_urls, &$title ) {
global $wgFavoritesPersonalURL, $wgUser;

if ( $wgFavoritesPersonalURL && $wgUser->isLoggedIn() ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f1b1277318e91121113aa34af3f77958532
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Favorites
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] Add lang to the firstheading - change (mediawiki...Example)

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

Change subject: Add lang to the firstheading
..


Add lang to the firstheading

Change-Id: I63a8c02322edeb8b9ab3a26297f817e46ba5d808
---
M ExampleTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 9231a16..cd01b69 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -30,7 +30,7 @@
echo $this->getIndicators();
?>
 
-   
+   
html( 'title' ) ?>

getMsg( 
'tagline' )->parse() ?>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63a8c02322edeb8b9ab3a26297f817e46ba5d808
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add lang to the firstheading - change (mediawiki...Example)

2016-01-06 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

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

Change subject: Add lang to the firstheading
..

Add lang to the firstheading

Change-Id: I63a8c02322edeb8b9ab3a26297f817e46ba5d808
---
M ExampleTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/24/262824/1

diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 9231a16..cd01b69 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -30,7 +30,7 @@
echo $this->getIndicators();
?>
 
-   
+   
html( 'title' ) ?>

getMsg( 
'tagline' )->parse() ?>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63a8c02322edeb8b9ab3a26297f817e46ba5d808
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Isarra 

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


[MediaWiki-commits] [Gerrit] Setup.php: Ensure that defaults for 'rcdays' and 'watchlistd... - change (mediawiki/core)

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

Change subject: Setup.php: Ensure that defaults for 'rcdays' and 
'watchlistdays' are not invalid
..


Setup.php: Ensure that defaults for 'rcdays' and 'watchlistdays' are not invalid

I ran into this when I set $wgRCMaxAge = 3600*24 (1 day) when testing
recent changes stuff.

Change-Id: Ib618f0e47f30ebe1ad44f4c70fee5789bfa8c095
---
M includes/Setup.php
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/includes/Setup.php b/includes/Setup.php
index c863722..9e4d2a3 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -264,6 +264,7 @@
 }
 unset( $repo ); // no global pollution; destroy reference
 
+$rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 );
 if ( $wgRCFilterByAge ) {
// Trim down $wgRCLinkDays so that it only lists links which are valid
// as determined by $wgRCMaxAge.
@@ -273,12 +274,22 @@
// @codingStandardsIgnoreStart 
Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
for ( $i = 0; $i < count( $wgRCLinkDays ); $i++ ) {
// @codingStandardsIgnoreEnd
-   if ( $wgRCLinkDays[$i] >= $wgRCMaxAge / ( 3600 * 24 ) ) {
+   if ( $wgRCLinkDays[$i] >= $rcMaxAgeDays ) {
$wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i + 1, 
false );
break;
}
}
 }
+// Ensure that default user options are not invalid, since that breaks 
Special:Preferences
+$wgDefaultUserOptions['rcdays'] = min(
+   $wgDefaultUserOptions['rcdays'],
+   ceil( $rcMaxAgeDays )
+);
+$wgDefaultUserOptions['watchlistdays'] = min(
+   $wgDefaultUserOptions['watchlistdays'],
+   ceil( $rcMaxAgeDays )
+);
+unset( $rcMaxAgeDays );
 
 if ( $wgSkipSkin ) {
$wgSkipSkins[] = $wgSkipSkin;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib618f0e47f30ebe1ad44f4c70fee5789bfa8c095
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki.Upload: Add #getApi method, use it instead of undo... - change (mediawiki/core)

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

Change subject: mediawiki.Upload: Add #getApi method, use it instead of 
undocumented properties
..


mediawiki.Upload: Add #getApi method, use it instead of undocumented properties

Change-Id: I4bbc5b5f371ce20e67de3b21ba761d28f194541e
---
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
M resources/src/mediawiki/mediawiki.ForeignUpload.js
M resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
M resources/src/mediawiki/mediawiki.Upload.js
4 files changed, 20 insertions(+), 4 deletions(-)

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



diff --git 
a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js 
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
index aa2998b..ee00cea 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
@@ -43,7 +43,7 @@

mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this 
)
.done( function () {
// Point the CategorySelector to the right wiki
-   this.upload.apiPromise.done( function ( api ) {
+   this.upload.getApi().done( function ( api ) {
// If this is a ForeignApi, it will 
have a apiUrl, otherwise we don't need to do anything
if ( api.apiUrl ) {
// Can't reuse the same object, 
CategorySelector calls #abort on its mw.Api instance
diff --git a/resources/src/mediawiki/mediawiki.ForeignUpload.js 
b/resources/src/mediawiki/mediawiki.ForeignUpload.js
index 61fb59f..aa08b6c 100644
--- a/resources/src/mediawiki/mediawiki.ForeignUpload.js
+++ b/resources/src/mediawiki/mediawiki.ForeignUpload.js
@@ -110,6 +110,13 @@
 */
 
/**
+* @inheritdoc
+*/
+   ForeignUpload.prototype.getApi = function () {
+   return this.apiPromise;
+   };
+
+   /**
 * Override from mw.Upload to make sure the API info is found and 
allowed
 */
ForeignUpload.prototype.upload = function () {
diff --git a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js 
b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
index 54f3ab6..9377054 100644
--- a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
+++ b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
@@ -152,7 +152,6 @@
 */
mw.Upload.BookletLayout.prototype.initialize = function () {
var
-   apiPromise,
booklet = this,
deferred = $.Deferred();
 
@@ -160,8 +159,7 @@
this.upload = this.createUpload();
this.setPage( 'upload' );
 
-   apiPromise = this.upload.apiPromise || $.Deferred().resolve( 
this.upload.api );
-   apiPromise.done( function ( api ) {
+   this.upload.getApi().done( function ( api ) {
// If the user can't upload anything, don't give them 
the option to.
api.getUserInfo().done( function ( userInfo ) {
if ( userInfo.rights.indexOf( 'upload' ) === -1 
) {
diff --git a/resources/src/mediawiki/mediawiki.Upload.js 
b/resources/src/mediawiki/mediawiki.Upload.js
index d80b4eb..8a74ffc 100644
--- a/resources/src/mediawiki/mediawiki.Upload.js
+++ b/resources/src/mediawiki/mediawiki.Upload.js
@@ -63,6 +63,17 @@
UP = Upload.prototype;
 
/**
+* Get the mw.Api instance used by this Upload object.
+*
+* @return {jQuery.Promise}
+* @return {Function} return.done
+* @return {mw.Api} return.done.api
+*/
+   UP.getApi = function () {
+   return $.Deferred().resolve( this.api ).promise();
+   };
+
+   /**
 * Set the text of the file page, to be created on file upload.
 *
 * @param {string} text

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bbc5b5f371ce20e67de3b21ba761d28f194541e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update packages to do with karma - change (mediawiki/core)

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

Change subject: Update packages to do with karma
..


Update packages to do with karma

Packages updated are:

karma-chrome-launcher updated to 0.2.0

karma-firefox-launcher updated to 0.1.7

Change-Id: I542436bf8f0d782fc2af57a170faf936271b2bf9
---
M package.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/package.json b/package.json
index 19cd461..74eaac5 100644
--- a/package.json
+++ b/package.json
@@ -16,8 +16,8 @@
 "grunt-jsonlint": "1.0.7",
 "grunt-karma": "0.12.1",
 "karma": "0.13.19",
-"karma-chrome-launcher": "0.2.0",
-"karma-firefox-launcher": "0.1.6",
+"karma-chrome-launcher": "0.2.2",
+"karma-firefox-launcher": "0.1.7",
 "karma-qunit": "0.1.5",
 "qunitjs": "1.18.0"
   }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I542436bf8f0d782fc2af57a170faf936271b2bf9
Gerrit-PatchSet: 15
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: Unicornisaurous 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] DSR unit tests for heading wikitext - change (mediawiki...parsoid)

2016-01-06 Thread Sn1per (Code Review)
Sn1per has uploaded a new change for review.

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

Change subject: DSR unit tests for heading wikitext
..

DSR unit tests for heading wikitext

Change-Id: If8a2e8a767865a1958bc60b75dbf52c3625d7e3c
---
M tests/mocha/dsr.js
1 file changed, 15 insertions(+), 0 deletions(-)


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

diff --git a/tests/mocha/dsr.js b/tests/mocha/dsr.js
index 325ca47..05ee420 100644
--- a/tests/mocha/dsr.js
+++ b/tests/mocha/dsr.js
@@ -94,6 +94,21 @@
 runTests('Lists', listTests);
 
 var headingTests = [
+   {
+   wt: '=A=\n==B==\n===C===\nD',
+   specs: [
+   { selector: 'body > h1', dsrContent: ['=A=', '=', '='] 
},
+   { selector: 'body > h2', dsrContent: ['==B==', '==', 
'=='] },
+   { selector: 'body > h3', dsrContent: ['===C===', '===', 
'==='] },
+   { selector: 'body > h4', dsrContent: ['D', 
'', ''] },
+   ],
+   },
+   {
+   wt: '==A New Use for the = Sign==',
+   specs: [
+   { selector: 'body > h2', dsrContent: ['==A New Use for 
the = Sign==', '==', '=='] },
+   ],
+   },
 ];
 runTests('Headings', headingTests);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8a2e8a767865a1958bc60b75dbf52c3625d7e3c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Sn1per 

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


  1   2   3   >