[MediaWiki-commits] [Gerrit] Revert "Auto-migrate matching accounts where no global accou... - change (mediawiki...CentralAuth)

2014-09-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Revert "Auto-migrate matching accounts where no global account 
exists"
..

Revert "Auto-migrate matching accounts where no global account exists"

This reverts commit b2e553e104d568c09f20b11fd976106f7874c8f3.

Bug: 71223
Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
---
M CentralAuthPlugin.php
M CentralAuthUser.php
2 files changed, 3 insertions(+), 20 deletions(-)


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

diff --git a/CentralAuthPlugin.php b/CentralAuthPlugin.php
index 94d634e..3495f4c 100644
--- a/CentralAuthPlugin.php
+++ b/CentralAuthPlugin.php
@@ -43,16 +43,6 @@
'CentralAuth',
"plugin: no global account for '$username'"
);
-   // See if all the unattached accounts match passwords
-   // and can be globalized. (bug 70392)
-   if ( $wgCentralAuthAutoMigrate ) {
-   $ok = $central->storeAndMigrate( array( 
$password ), /* $sendToRC = */ true, /* $safe = */ true );
-   if ( $ok ) {
-   wfDebugLog( 'CentralAuth',
-   "wgCentralAuthAutoMigrate 
successful in creating a global account for '$username''" );
-   return true;
-   }
-   }
return false;
}
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 2d5b013..0d4d395 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -635,14 +635,13 @@
/**
 * @param array $passwords
 * @param bool $sendToRC
-* @param bool $safe Only allow migration if all users can be migrated
 * @return bool
 */
-   public function storeAndMigrate( $passwords = array(), $sendToRC = 
true, $safe = false ) {
+   public function storeAndMigrate( $passwords = array(), $sendToRC = true 
) {
$dbw = self::getCentralDB();
$dbw->begin();
 
-   $ret = $this->attemptAutoMigration( $passwords, $sendToRC, 
$safe );
+   $ret = $this->attemptAutoMigration( $passwords, $sendToRC );
 
$dbw->commit();
return $ret;
@@ -824,10 +823,9 @@
 *
 * @param $passwords Array
 * @param $sendToRC bool
-* @param $safe bool Only migrate if all accounts can be merged
 * @return bool Whether full automatic migration completed successfully.
 */
-   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true, $safe = false ) {
+   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true ) {
$migrationSet = $this->queryUnattached();
if ( empty( $migrationSet ) ) {
wfDebugLog( 'CentralAuth', 'no accounts to merge, 
failed migration' );
@@ -850,11 +848,6 @@
 
// Pick all the local accounts matching the "master" home 
account
$attach = $this->prepareMigration( $migrationSet, $passwords );
-
-   if ( $safe && count( $attach ) !== count( $migrationSet ) ) {
-   wfDebugLog( 'CentralAuth', "Safe auto-migration for 
'$this->mName' failed" );
-   return false;
-   }
 
// storeGlobalData clears $this->mHomeWiki
$homeWiki = $this->mHomeWiki;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
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] Revert "Auto-migrate matching accounts where no global accou... - change (mediawiki...CentralAuth)

2014-09-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Revert "Auto-migrate matching accounts where no global account 
exists"
..

Revert "Auto-migrate matching accounts where no global account exists"

This reverts commit b2e553e104d568c09f20b11fd976106f7874c8f3.

Bug: 71223
Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
---
M CentralAuthPlugin.php
M CentralAuthUser.php
2 files changed, 3 insertions(+), 20 deletions(-)


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

diff --git a/CentralAuthPlugin.php b/CentralAuthPlugin.php
index 94d634e..3495f4c 100644
--- a/CentralAuthPlugin.php
+++ b/CentralAuthPlugin.php
@@ -43,16 +43,6 @@
'CentralAuth',
"plugin: no global account for '$username'"
);
-   // See if all the unattached accounts match passwords
-   // and can be globalized. (bug 70392)
-   if ( $wgCentralAuthAutoMigrate ) {
-   $ok = $central->storeAndMigrate( array( 
$password ), /* $sendToRC = */ true, /* $safe = */ true );
-   if ( $ok ) {
-   wfDebugLog( 'CentralAuth',
-   "wgCentralAuthAutoMigrate 
successful in creating a global account for '$username''" );
-   return true;
-   }
-   }
return false;
}
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index d8ccead..c0c1b35 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -656,14 +656,13 @@
/**
 * @param array $passwords
 * @param bool $sendToRC
-* @param bool $safe Only allow migration if all users can be migrated
 * @return bool
 */
-   public function storeAndMigrate( $passwords = array(), $sendToRC = 
true, $safe = false ) {
+   public function storeAndMigrate( $passwords = array(), $sendToRC = true 
) {
$dbw = self::getCentralDB();
$dbw->begin();
 
-   $ret = $this->attemptAutoMigration( $passwords, $sendToRC, 
$safe );
+   $ret = $this->attemptAutoMigration( $passwords, $sendToRC );
 
$dbw->commit();
return $ret;
@@ -845,10 +844,9 @@
 *
 * @param $passwords Array
 * @param $sendToRC bool
-* @param $safe bool Only migrate if all accounts can be merged
 * @return bool Whether full automatic migration completed successfully.
 */
-   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true, $safe = false ) {
+   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true ) {
$migrationSet = $this->queryUnattached();
if ( empty( $migrationSet ) ) {
wfDebugLog( 'CentralAuth', 'no accounts to merge, 
failed migration' );
@@ -871,11 +869,6 @@
 
// Pick all the local accounts matching the "master" home 
account
$attach = $this->prepareMigration( $migrationSet, $passwords );
-
-   if ( $safe && count( $attach ) !== count( $migrationSet ) ) {
-   wfDebugLog( 'CentralAuth', "Safe auto-migration for 
'$this->mName' failed" );
-   return false;
-   }
 
// storeGlobalData clears $this->mHomeWiki
$homeWiki = $this->mHomeWiki;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] [Parsoid] Remove custom directory structure - change (translatewiki)

2014-09-23 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: [Parsoid] Remove custom directory structure
..

[Parsoid] Remove custom directory structure

Changed in 9b986c9cb0169918d41e146096d4d73c3aca58f0
Spotted by Nikerabbit, https://bugzilla.wikimedia.org/70267#c4

Change-Id: I0bf1db4b8ca4f6e634bc6ce79ce298089767630f
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/48/162548/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index b975a68..1e05385 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1509,7 +1509,6 @@
 Parser Hooks
 
 Parsoid
-file = Parsoid/php/i18n/%CODE%.json
 
 Pdf Book
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bf1db4b8ca4f6e634bc6ce79ce298089767630f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 

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


[MediaWiki-commits] [Gerrit] Keep section alignment on window resize - change (mediawiki...ContentTranslation)

2014-09-23 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Keep section alignment on window resize
..

Keep section alignment on window resize

Change-Id: I76d670c0354f949c0101c1b405280186d092a4b2
---
M modules/translation/ext.cx.translation.aligner.js
1 file changed, 15 insertions(+), 0 deletions(-)


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

diff --git a/modules/translation/ext.cx.translation.aligner.js 
b/modules/translation/ext.cx.translation.aligner.js
index 493713c..32eeb01 100644
--- a/modules/translation/ext.cx.translation.aligner.js
+++ b/modules/translation/ext.cx.translation.aligner.js
@@ -68,6 +68,10 @@
sourceSectionHeight = $sourceSection.height();
sectionHeight = $section.height();
 
+   if ( !sourceSectionHeight ) {
+   return this;
+   }
+
if ( sourceSectionHeight < sectionHeight ) {
$sourceSection.css( 'min-height', sectionHeight );
sourceSectionHeight = $sourceSection.height();
@@ -95,4 +99,15 @@
 
return this;
};
+
+   $( function () {
+   // Window resize handler.
+   $( window ).resize( $.debounce( 250, function () {
+   $( '.cx-column--translation .cx-column__content' )
+   .find( mw.cx.getSectionSelector() )
+   .each( function () {
+   $( this ).keepAlignment();
+   } );
+   } ) );
+   } );
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76d670c0354f949c0101c1b405280186d092a4b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Add "viewdeletedfile" userright for global deleted image review - change (operations/mediawiki-config)

2014-09-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Add "viewdeletedfile" userright for global deleted image review
..

Add "viewdeletedfile" userright for global deleted image review

Bug: 14801
Change-Id: I20888e89f5c2f036b461c371851c9367e947157a
---
M wmf-config/CommonSettings.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6b987bb..1a0d8ed 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1571,6 +1571,12 @@
};
 }
 
+// Enable a "viewdeletedfile" userright for [[m:Global deleted image review] 
(bug 14801)
+$wgAvailableRights[] = 'viewdeletedfile';
+$wgHooks['TitleQuickPermissions'][] = function ( Title $title, User $user, 
$action, &$errors, $doExpensiveQueries, $short ) {
+   return ( !in_array( $action, array( 'deletedhistory', 'deletedtext' ) ) 
|| !$title->inNamespaces( NS_FILE, NS_FILE_TALK ) || !$user->isAllowed( 
'viewdeletedfile' ) );
+};
+
 if ( $wmgUseCollection ) {
// PediaPress / PDF generation
include "$IP/extensions/Collection/Collection.php";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20888e89f5c2f036b461c371851c9367e947157a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add force_render option to help page. - change (mediawiki...OfflineContentGenerator)

2014-09-23 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Add force_render option to help page.
..

Add force_render option to help page.

Change-Id: I82fd66709901314894302ac86e3c2e73fc0a84d8
---
M lib/threads/help.html
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator
 refs/changes/45/162545/1

diff --git a/lib/threads/help.html b/lib/threads/help.html
index 828ba76..fc0f056 100644
--- a/lib/threads/help.html
+++ b/lib/threads/help.html
@@ -21,6 +21,7 @@
 
 Collection Id: 
 Writer: 
+Bypass cache: 
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82fd66709901314894302ac86e3c2e73fc0a84d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] WIP: Add docs grunt task to build KSS styleguide - change (mediawiki/core)

2014-09-23 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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

Change subject: WIP: Add docs grunt task to build KSS styleguide
..

WIP: Add docs grunt task to build KSS styleguide

This extends tests/frontend's Gruntfile.
TODO: need to build the default CSS file, see docs/kss/Makefile

Compare with change If3f258e867819d9756 which adds to docs/kss

Bug:58620
Change-Id: I234cb87fb76baaaceeea59bf04048b156b6f5622
---
M tests/frontend/Gruntfile.js
M tests/frontend/package.json
2 files changed, 20 insertions(+), 1 deletion(-)


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

diff --git a/tests/frontend/Gruntfile.js b/tests/frontend/Gruntfile.js
index 59c18a8..22a9152 100644
--- a/tests/frontend/Gruntfile.js
+++ b/tests/frontend/Gruntfile.js
@@ -9,6 +9,7 @@
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-styleguide' );
 
grunt.file.setBase(  __dirname + '/../..' );
 
@@ -60,10 +61,26 @@
'.jshintrc'
],
tasks: 'test'
+   },
+   styleguide: {
+   options: {
+   template: {
+   src: 'docs/kss/styleguide-template',
+   },
+   framework: {
+   name: 'kss'
+   }
+   },
+   all: {
+   files: [{
+   'docs/kss/static': 
'resources/src/mediawiki.ui'
+   }]
+   }
}
} );
 
grunt.registerTask( 'lint', ['jshint', 'jscs', 'jsonlint', 'banana'] );
grunt.registerTask( 'test', ['lint'] );
+   grunt.registerTask( 'docs', ['styleguide'] );
grunt.registerTask( 'default', ['test'] );
 };
diff --git a/tests/frontend/package.json b/tests/frontend/package.json
index 7913363..21c0b45 100644
--- a/tests/frontend/package.json
+++ b/tests/frontend/package.json
@@ -10,6 +10,8 @@
 "grunt-contrib-watch": "0.6.1",
 "grunt-banana-checker": "0.2.0",
 "grunt-jscs": "0.6.1",
-"grunt-jsonlint": "1.0.4"
+"grunt-jsonlint": "1.0.4",
+"grunt-styleguide": "0.2.15",
+"kss": ">=0.3.7"
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Don't crash if PNG has bogus resolution information. - change (mediawiki...latex_renderer)

2014-09-23 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Don't crash if PNG has bogus resolution information.
..

Don't crash if PNG has bogus resolution information.

This is a crasher found in [[en:Late_18th_century]] which included
[[File:Frederick-II-of-Prussia-Coloured-drawing.png]] whose metadata
included:

$ identify -verbose foo.png
Image: foo.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 600x837+0+0
  Resolution: 11837.8x6.3
  Print size: 0.0506851x132.857
  Units: PixelsPerCentimeter
  Type: TrueColorAlpha
  Endianess: Undefined

The bogus "Resolution" data caused a "! Dimension too large." error from
XeLaTeX.

Change-Id: Ic2d48359a568cafa73be16d0ff728ca0a2e97b14
---
M lib/index.js
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/43/162543/1

diff --git a/lib/index.js b/lib/index.js
index c8ba4de..3880008 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1427,6 +1427,17 @@
return info;
});
 });
+// Ditto with bogus resolution information in PNGs
+// (for example [[File:Frederick-II-of-Prussia-Coloured-drawing.png]])
+var convertPng = Promise.guard(5, function(info) {
+return P.spawn('mogrify', [
+   '-density', '600',
+   path.join(info.imagedir, info.filename)
+]).then(function() {
+   // no change in filename (overwrite in place)
+   return info;
+});
+});
 
 // extract all the pages of the PDF as separate files
 var separatePdf = Promise.guard(5, function(info) {
@@ -1507,6 +1518,10 @@
if (val.mime === 'image/jpeg') {
pp = pp.then(convertJpg);
}
+   // strip resolution information from PNGs
+   if (val.mime === 'image/png') {
+   pp = pp.then(convertPng);
+   }
// separate pages of a PDF
if (val.mime === 'application/pdf') {
pp = pp.then(separatePdf);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2d48359a568cafa73be16d0ff728ca0a2e97b14
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Improve Metabook.fromArticles. - change (mediawiki...bundler)

2014-09-23 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Improve Metabook.fromArticles.
..

Improve Metabook.fromArticles.

Improve Metabook.fromArticles so that it's more appropriate for use in
the load testing tool: only fetch siteinfo once, and use sensible
defaults for the options parameter.

Change-Id: Ib150c4e484bdeb3de96f5552d20fc757ed9d1e3a
---
M lib/metabook.js
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler
 refs/changes/42/162542/1

diff --git a/lib/metabook.js b/lib/metabook.js
index 4039373..77ba15e 100644
--- a/lib/metabook.js
+++ b/lib/metabook.js
@@ -65,6 +65,8 @@
return JSON.parse(JSON.stringify(o));
 };
 
+var enSiteInfoP; // cache this value once fetched
+
 // Return a promise for a metabook object containing the given articles.
 var metabookFromArticles = function(articles, options) {
var metabook = clone(DEFAULT_METABOOK);
@@ -72,9 +74,10 @@
 
// fetch siteinfo from enwiki to get (approx of) interwiki prefix 
mapping
var interwikimap;
-   var p = Promise.resolve().then(function() {
-   return SiteInfo.fetch('http://en.wikipedia.org/w');
-   }).then(function(resp) {
+   if (!enSiteInfoP) {
+   enSiteInfoP = SiteInfo.fetch('http://en.wikipedia.org/w');
+   }
+   var p = enSiteInfoP.then(function(resp) {
interwikimap = resp.interwikimap;
});
 
@@ -111,11 +114,12 @@
metabook.wikis.push({
type: "wikiconf",
baseurl: baseurl,
-   imagesize: DEFAULT_IMAGESIZE,
+   imagesize: options.size || DEFAULT_IMAGESIZE,
keep_tmpfiles: false,
script_extension: ".php",
format: "nuwiki",
-   parsoid: options.parsoid,
+   parsoid: options.parsoid ||
+   "http://parsoid-lb.eqiad.wikimedia.org/";,
prefix: prefix,
titleurl: w.url // temp
});

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib150c4e484bdeb3de96f5552d20fc757ed9d1e3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] labs-vagrant: add git-update command - change (mediawiki/vagrant)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: labs-vagrant: add git-update command
..


labs-vagrant: add git-update command

S pointed out that this was missing in an email.

Change-Id: I30a3b776934e3aba5e4be43b95fc7435a1d12a80
---
M lib/labs-vagrant.rb
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/lib/labs-vagrant.rb b/lib/labs-vagrant.rb
index c63a07f..b147196 100755
--- a/lib/labs-vagrant.rb
+++ b/lib/labs-vagrant.rb
@@ -76,11 +76,15 @@
 --detailed-exitcodes \
 #{puppet_path}/manifests/site.pp"
 
+when 'git-update'
+exec 'sudo -u vagrant -- /usr/local/bin/run-git-update'
+
 else
 puts 'USAGE: labs-vagrant COMMAND ...'
 puts '  list-roles: list available roles'
 puts '  reset-roles   : disable all roles'
 puts '  enable-role ROLENAME  : enable a given role'
 puts '  disable-role ROLENAME : disable a given role'
+puts '  git-update: fetches new code from Gerrit'
 puts '  provision : run puppet'
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30a3b776934e3aba5e4be43b95fc7435a1d12a80
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make Mathoid role configurable via hiera - change (mediawiki/vagrant)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make Mathoid role configurable via hiera
..


Make Mathoid role configurable via hiera

Change-Id: I877efa2877843d60a43392da1a68e54991703000
---
M .gitignore
M puppet/hieradata/common.yaml
M puppet/modules/mathoid/manifests/init.pp
A puppet/modules/mathoid/manifests/install/git.pp
M puppet/modules/role/manifests/mathoid.pp
5 files changed, 36 insertions(+), 20 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index de45255..daf343b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@
 /vagrant.d/
 /support/packager/output
 /wikimetrics/
+/mathoid
diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index 43fefff..72f9385 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -18,6 +18,12 @@
 
 hhvm::logroot: /vagrant/logs
 
+mathoid::base_path: /vagrant/mathoid
+mathoid::node_path: /vagrant/mathoid/node_modules
+mathoid::conf_path: /vagrant/mathoid/mathoid.config.json
+mathoid::log_dir: /vagrant/logs
+mathoid::port: 10042
+
 mediawiki::wiki_name: devwiki
 mediawiki::dir: /vagrant/mediawiki
 mediawiki::cache_dir: /var/cache/mediawiki
diff --git a/puppet/modules/mathoid/manifests/init.pp 
b/puppet/modules/mathoid/manifests/init.pp
index 908ed17..35c544e 100644
--- a/puppet/modules/mathoid/manifests/init.pp
+++ b/puppet/modules/mathoid/manifests/init.pp
@@ -5,38 +5,40 @@
 # === Parameters
 #
 # [*base_path*]
-#   Path to the mathoid code.
+#   Path to the mathoid code. (e.g. /vagrant/mathoid)
+#
 # [*node_path*]
 #   Path to the node modules mathoid depends on.
+#   (e.g. /vagrant/mathoid/node_modules)
+#
 # [*conf_path*]
 #   Where to place the config file.
+#   (e.g. /vagrant/mathoid/mathoid.config.json)
+#
 # [*log_dir*]
 #   Place where mathoid can put log files. Assumed to be already existing and
-#   have write access to mathoid user.
+#   have write access to mathoid user. (e.g. /vagrant/logs)
+#
 # [*port*]
-#   Port where to run the mathoid service. Defaults to 10042.
-
+#   Port the mathoid service listens on for incoming connections. (e.g 10042)
 #
 class mathoid(
 $base_path,
 $node_path,
 $conf_path,
 $log_dir,
-$port=10042,
+$port,
 ) {
+
+$log_file = "${log_dir}/mathoid.log"
 
 # TODO Add dependency to node-jsdom once
 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742347
 # is fixed
 require_package('nodejs')
 
-$log_file = "${log_dir}/main.log"
-
 file { $conf_path:
 ensure  => present,
-owner   => mathoid,
-group   => mathoid,
-mode=> '0644',
 content => template('mathoid/config.erb'),
 }
 
@@ -54,7 +56,6 @@
 hasstatus  => true,
 hasrestart => true,
 provider   => 'upstart',
-require=> File[$log_dir],
 subscribe  => File['/etc/init/mathoid.conf'],
 }
 }
diff --git a/puppet/modules/mathoid/manifests/install/git.pp 
b/puppet/modules/mathoid/manifests/install/git.pp
new file mode 100644
index 000..4286353
--- /dev/null
+++ b/puppet/modules/mathoid/manifests/install/git.pp
@@ -0,0 +1,12 @@
+# == Class: mathoid::install::git
+#
+# Provision mathoid by cloning the git repository.
+#
+class mathoid::install::git {
+include ::mathoid
+
+git::clone{ 'mediawiki/services/mathoid':
+directory => $::mathoid::base_path,
+before=> Class['::mathoid'],
+}
+}
diff --git a/puppet/modules/role/manifests/mathoid.pp 
b/puppet/modules/role/manifests/mathoid.pp
index 27d4a17..07bc0f7 100644
--- a/puppet/modules/role/manifests/mathoid.pp
+++ b/puppet/modules/role/manifests/mathoid.pp
@@ -1,10 +1,6 @@
+# == Class: role::mathoid
+# This role installs the mathoid service for server side MathJax rendering.
+#
 class role::mathoid {
-
-class { '::mathoid':
-base_path => '/srv/mathoid',
-node_path => '/srv/mathoid/node_modules',
-conf_path => '/srv/mathoid/mathoid.config.json',
-log_dir   => '/vagrant/log/mathoid',
-require   => Git::Clone['mediawiki/services/mathoid'],
-}
-}
\ No newline at end of file
+require ::mathoid::install::git
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I877efa2877843d60a43392da1a68e54991703000
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Ori.livneh 
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] add OpenStackManager component to #wikimedia-labs - change (labs...pywikibugs)

2014-09-23 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: add OpenStackManager component to #wikimedia-labs
..


add OpenStackManager component to #wikimedia-labs

Change-Id: I026fe8a926548a1dec5b929ad0a0f29c1384306e
---
M channels.py
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/channels.py b/channels.py
index bda612e..ce1ccab 100644
--- a/channels.py
+++ b/channels.py
@@ -9,7 +9,11 @@
 "#mediawiki-i18n":
 lambda x: (x.get("X-Bugzilla-Component", None) in 
["ContentTranslation"]),
 "#wikimedia-labs":
-lambda x: x.get("X-Bugzilla-Product", None) in ["Tool Labs tools", 
"Wikimedia Labs"],
+lambda x: x.get("X-Bugzilla-Product", None) in ["Tool Labs tools", 
"Wikimedia Labs"] or \
+  (
+   (x.get("X-Bugzilla-Product", None) == "MediaWiki 
extensions") and \
+   (x.get("X-Bugzilla-Component", None) in 
["OpenStackManager"])
+  ),
 "#wikimedia-mobile":
 lambda x: x.get("X-Bugzilla-Product", None) in ["Wikimedia Mobile", 
"Commons App", "Wikipedia App", "MobileFrontend"],
 "#wikimedia-qa":

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I026fe8a926548a1dec5b929ad0a0f29c1384306e
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/pywikibugs
Gerrit-Branch: master
Gerrit-Owner: Jeremyb 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: coren 

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


[MediaWiki-commits] [Gerrit] import LogFormat s from apache2 package - change (operations/puppet)

2014-09-23 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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

Change subject: import LogFormat s from apache2 package
..

import LogFormat s from apache2 package

from apache2.conf as installed by the package on trusty

md5 gets google hits for debian BTS so must not have been
modified by Ubuntu

RT: 8419
Change-Id: Ida8c362340025d75f6947f13d85865c037e7d4d0
---
M modules/mediawiki/files/apache/apache2.conf
1 file changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/162541/1

diff --git a/modules/mediawiki/files/apache/apache2.conf 
b/modules/mediawiki/files/apache/apache2.conf
index 95f6337..b04b754 100644
--- a/modules/mediawiki/files/apache/apache2.conf
+++ b/modules/mediawiki/files/apache/apache2.conf
@@ -104,8 +104,21 @@
 #LogLevel warn
 LogLevel notice
 
-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
-LogFormat "%h %l %u %t \"%r\" %>s %b" common
+#
+# The following directives define some format nicknames for use with
+# a CustomLog directive.
+#
+# These deviate from the Common Log Format definitions in that they use %O
+# (the actual bytes sent including headers) instead of %b (the size of the
+# requested file), because the latter makes it impossible to detect partial
+# requests.
+#
+# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
+# Use mod_remoteip instead.
+#
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" 
vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
 LogFormat "%{Referer}i -> %U" referer
 LogFormat "%{User-agent}i" agent
 

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

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

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


[MediaWiki-commits] [Gerrit] Selections: Update MT Tool to use Selection class - change (mediawiki...ContentTranslation)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Selections: Update MT Tool to use Selection class
..


Selections: Update MT Tool to use Selection class

* Adds one line to preserve the selection when using the providers menu

Change-Id: I3158e33ad9b0a56508b44c042356075ceed6250b
---
M modules/tools/ext.cx.tools.mt.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.mt.js b/modules/tools/ext.cx.tools.mt.js
index 3e9939f..5a5cf3a 100644
--- a/modules/tools/ext.cx.tools.mt.js
+++ b/modules/tools/ext.cx.tools.mt.js
@@ -280,6 +280,9 @@
 
// Set the main label
this.$providerSelectorTrigger.text( this.getProviderTitle( 
providerId ) );
+
+   // Restore the selection in the translation
+   mw.cx.selection.restore( 'translation' );
};
 
MTControlCard.prototype.listen = function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3158e33ad9b0a56508b44c042356075ceed6250b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WIP: Resizer - change (mediawiki...latex_renderer)

2014-09-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: WIP: Resizer
..

WIP: Resizer

Change-Id: I964be76683318c825b45b30ea4313335d18d7e0d
---
M lib/p.js
A lib/resizer.js
A samples/Hubble.jpg
A test/resizer.js
4 files changed, 95 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/40/162540/1

diff --git a/lib/p.js b/lib/p.js
index f245e27..e6cbf2a 100644
--- a/lib/p.js
+++ b/lib/p.js
@@ -18,10 +18,11 @@
 // Returns a promise for completion after spawning `program`
 P.spawn = function(program, args, options) {
return new Promise(function(resolve, reject) {
+   var data = "";
spawn(program, args || [], options || {}).
on('exit', function(exitCode) {
if (exitCode === 0) {
-   resolve();
+   resolve(data || undefined);
} else {
reject(new Error(
program+' '+args.join(' ')+' 
exited with code '+exitCode
@@ -29,6 +30,8 @@
}
}).on('error', function(err) {
reject(err);
+   }).stdout.on('data', function(d) {
+   data += d;
});
});
 };
diff --git a/lib/resizer.js b/lib/resizer.js
new file mode 100644
index 000..8bda1ac
--- /dev/null
+++ b/lib/resizer.js
@@ -0,0 +1,54 @@
+/* Resize images */
+"use strict";
+
+require('es6-shim');
+require('prfun');
+
+var util = require('util'),
+   path = require('path'),
+   P = require('./p');
+
+var resize = function(opts) {
+
+   // Cleanup filename for imagemagick.
+   var file = opts.file.replace(/[*~?@\[\]]/g, '\\$&');
+
+   // Preserve the output extension.
+   var ext = path.extname(opts.file),
+   out = opts.out || ( opts.overwrite ? file : "out"+ext );
+
+   // Cleanup output for imagemagick.
+   out = out.replace(/%/g, '%%');
+
+   // Accept an x,y array or define a square.
+   var x = opts.size, y = opts.size;
+   if ( Array.isArray(opts.size) ) {
+   x = opts.size[0];
+   y = opts.size[1];
+   }
+
+   // Preserve the aspect ratio?
+   var a = opts.ignoreAspect ? "!" : "";
+
+   // Format the dimesions.
+   var dimensions = util.format("%sx%s%s", x, y, a);
+
+   return P.spawn('convert', [
+   file, '-resize', dimensions, out
+   ], { cwd: opts.dir || "/tmp" });
+
+};
+
+var identify = function(file) {
+   return P.spawn('identify', [ file ]).then(function(info) {
+   // Pop the dimensions.
+   var dimensions = info.split(" ")[2].split("x");
+   return Promise.resolve(dimensions);
+   });
+};
+
+
+module.exports = {
+   resize: resize,
+   identify: identify
+};
diff --git a/samples/Hubble.jpg b/samples/Hubble.jpg
new file mode 100644
index 000..59548ab
--- /dev/null
+++ b/samples/Hubble.jpg
Binary files differ
diff --git a/test/resizer.js b/test/resizer.js
new file mode 100644
index 000..6e7c521
--- /dev/null
+++ b/test/resizer.js
@@ -0,0 +1,37 @@
+/* global describe, it */
+"use strict";
+
+var assert = require('assert'),
+   path = require('path'),
+   fs = require('fs'),
+   resizer = require('../lib/resizer.js');
+
+describe.only("Resizer tests", function() {
+   
+   var file = path.join(__dirname, '../samples/Hubble.jpg'),
+   out = "/tmp/out.jpg";
+   
+   var clear = function() {
+   fs.unlinkSync(out);
+   };
+   
+   beforeEach(clear);
+   
+   it('should resize an image', function() {
+   var size = [800, 600];
+   return resizer.resize({
+   file: file,
+   out: out,
+   size: size,
+   ignoreAspect: true
+   }).then(function() {
+   return resizer.identify(out);
+   }).then(function(s) {
+   assert.ok(size[0] == s[0], "x");
+   assert.ok(size[1] == s[1], "y");
+   });
+   });
+   
+   after(clear);
+   
+});

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I964be76683318c825b45b30ea4313335d18d7e0d
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

___
MediaWiki-commi

[MediaWiki-commits] [Gerrit] Selections: Update LinkTool to use new Selection class - change (mediawiki...ContentTranslation)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Selections: Update LinkTool to use new Selection class
..


Selections: Update LinkTool to use new Selection class

* Removes old selection functions that are no longer needed
* Updates code to use Selection class methods.

Change-Id: I7292b2336f1d3a526f8f8c27027633253d557b4d
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 8 insertions(+), 90 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index c12e677..14a298d 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -234,48 +234,12 @@
};
 
/**
-* Save the selection while other screen elements are clicked.
-* See http://stackoverflow.com/a/3316483/337907
-*/
-   function saveSelection() {
-   var sel;
-
-   if ( window.getSelection ) {
-   sel = window.getSelection();
-   if ( sel.getRangeAt && sel.rangeCount ) {
-   return sel.getRangeAt( 0 );
-   }
-   } else if ( document.selection && 
document.selection.createRange ) {
-   return document.selection.createRange();
-   }
-   return null;
-   }
-
-   /**
 * Remove the leading ./ added by parsoid.
 * @param {string} href Link target
 * @return {string} Cleaned up href
 */
function cleanupLinkHref( href ) {
return href && href.replace( /^\.*\//, '' );
-   }
-
-   /**
-* Restore a saved selection
-* See http://stackoverflow.com/a/3316483/337907
-*/
-   function restoreSelection( range ) {
-   var sel;
-
-   if ( range ) {
-   if ( window.getSelection ) {
-   sel = window.getSelection();
-   sel.removeAllRanges();
-   sel.addRange( range );
-   } else if ( document.selection && range.select ) {
-   range.select();
-   }
-   }
}
 
/**
@@ -304,13 +268,12 @@
 
/**
 * Tests whether the current selection is in a target segment
-* @param {range} selection Selection range to test
+* @param {object} selection, the selection to test
 * @return {boolean}
 */
function isValidSelection( selection ) {
var $parent, $parentSection;
 
-   restoreSelection( selection );
if ( !selection || !selection.toString().length ) {
return false;
}
@@ -323,50 +286,6 @@
$parentSection = $parent.parents( '[contenteditable]' );
// Check if that section is editable
return $parentSection.prop( 'contenteditable' );
-   }
-
-   /**
-* Paste a given html string at the selection.
-* It replaces the selected text if any. Otherwise it insert
-* at caret position.
-* Tries to do it in a cross browser compatible way.
-* See http://stackoverflow.com/a/6691294/337907, Credits: Tim Down
-* @param {string} html The html string
-*/
-   function pasteHtmlAtSelection( html ) {
-   var sel, el, range, frag, node, lastNode;
-
-   if ( window.getSelection ) {
-   // IE9 and non-IE
-   sel = window.getSelection();
-   if ( sel.getRangeAt && sel.rangeCount ) {
-   range = sel.getRangeAt( 0 );
-   range.deleteContents();
-
-   // Range.createContextualFragment() would be 
useful here but is
-   // only relatively recently standardized and is 
not supported in
-   // some browsers (IE9, for one)
-   el = document.createElement( 'div' );
-   el.innerHTML = html;
-   frag = document.createDocumentFragment();
-   while ( ( node = el.firstChild ) ) {
-   lastNode = frag.appendChild( node );
-   }
-   range.insertNode( frag );
-
-   // Preserve the selection
-   if ( lastNode ) {
-   range = range.cloneRange();
-   range.setStartAfter( lastNode );
-   range.collapse( true );
-  

[MediaWiki-commits] [Gerrit] Selections: Change Selection class so it saves and restores ... - change (mediawiki...ContentTranslation)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Selections: Change Selection class so it saves and restores 
ranges
..


Selections: Change Selection class so it saves and restores ranges

Previous implementation of the Selection class saved selection
objects and selection objects change as the selection changes.
This implementation saves the ranges of selection objects which 
do not change.

Change-Id: Ib2ff110f072b59f860991280c25699b86a045697
---
M modules/util/ext.cx.util.selection.js
1 file changed, 31 insertions(+), 39 deletions(-)

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



diff --git a/modules/util/ext.cx.util.selection.js 
b/modules/util/ext.cx.util.selection.js
index f78d97a..c779b7e 100644
--- a/modules/util/ext.cx.util.selection.js
+++ b/modules/util/ext.cx.util.selection.js
@@ -17,7 +17,7 @@
 * @class
 */
function Selection() {
-   this.selections = {};
+   this.ranges = {};
}
 
/**
@@ -40,16 +40,6 @@
};
 
/**
-* Saves a selection for later retrieval
-*
-* @param {string} key, the key to use for storage
-* @param {object} selection, the selection to save
-*/
-   Selection.prototype.save = function ( key, selection ) {
-   this.selections[ key ] = selection;
-   };
-
-   /**
 * Returns the range of a selection.
 * Cross-browser
 *
@@ -69,6 +59,16 @@
return false;
}
}
+
+   /**
+* Saves a selection range for later retrieval
+*
+* @param {string} key, the key to use for storage
+* @param {object} selection, the selection save the range from
+*/
+   Selection.prototype.save = function ( key, selection ) {
+   this.ranges[ key ] = getRange( selection );
+   };
 
/**
 * Sets focus on parent element of range
@@ -100,24 +100,16 @@
}
 
/**
-* Restores a saved selection
+* Restores selection from a saved selection range
 * Cross-browser.
 *
-* @param {string} key, the key for the saved selection
+* @param {string} key, the key for the saved selection range
 */
Selection.prototype.restore = function ( key ) {
-   var currentSelection, savedSelection, range;
+   var currentSelection, range;
 
currentSelection = this.get();
-   savedSelection = this.selections[ key ];
-   if ( !savedSelection ) {
-   return;
-   }
-
-   range = getRange( savedSelection );
-   if ( !range ) {
-   return;
-   }
+   range = this.ranges[ key ];
 
setFocusOnParentBlock( range ); // for FireFox
 
@@ -135,40 +127,40 @@
 
/**
 * Pastes the specified html.
-* If selectionToRestore is passed, retrieves
-* and restores that selection before pasting.
+* If rangeToRestore is passed, retrieves
+* and restores that range before pasting.
 * If no selection is specified, the current selection is used.
 *
 * @param {string} html, the html to paste
-* @param {string} selectionToRestore, name of selection to restore
+* @param {string} rangeToRestore, key for the range to restore
 */
-   Selection.prototype.pasteHTML = function ( html, selectionToRestore ) {
-   var selection, el, frag, node, lastNode;
+   Selection.prototype.pasteHTML = function ( html, rangeToRestore ) {
+   var range, el, frag, node, lastNode;
 
-   if ( selectionToRestore ) {
-   this.restore( selectionToRestore );
+   if ( rangeToRestore ) {
+   range = this.ranges[ rangeToRestore ];
+   } else {
+   range = getRange( this.get() );
}
 
-   selection = this.get();
-
-   if ( selection && window.getSelection ) {
-   selection.deleteContents();
+   if ( window.getSelection ) {
+   range.deleteContents();
el = document.createElement( 'div' );
el.innerHTML = html;
frag = document.createDocumentFragment();
while ( ( node = el.firstChild ) ) {
lastNode = frag.appendChild( node );
}
-   selection.insertNode( frag );
+   range.insertNode( frag );
 
if ( lastNode ) {
-   selection.setStartAfter( lastNode );
-   selection.collapse( true

[MediaWiki-commits] [Gerrit] Provision MMV browser-test dependencies - change (mediawiki/vagrant)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Provision MMV browser-test dependencies
..


Provision MMV browser-test dependencies

Change-Id: Ia342b78cc8bb0b87540f823441f1b92fd8775b6f
---
M puppet/modules/role/manifests/multimediaviewer.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/puppet/modules/role/manifests/multimediaviewer.pp 
b/puppet/modules/role/manifests/multimediaviewer.pp
index 6b06ec0..43adc74 100644
--- a/puppet/modules/role/manifests/multimediaviewer.pp
+++ b/puppet/modules/role/manifests/multimediaviewer.pp
@@ -7,6 +7,7 @@
 include ::apache::mod::headers
 
 mediawiki::extension { 'MultimediaViewer':
+browser_tests => true,
 }
 
 apache::site_conf { 'Content-Disposition: attachment on ?download':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia342b78cc8bb0b87540f823441f1b92fd8775b6f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Dduvall 
Gerrit-Reviewer: BryanDavis 
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] Layout adjustments for page size - change (mediawiki...ContentTranslation)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Layout adjustments for page size
..


Layout adjustments for page size

- Page area is extended to the viewport size. That will avoid a jumping effect 
when scrolling short articles.
- Additional white space is added to the bottom of the page to avoid text to 
end at the bottom edge of the screen.

Change-Id: I73137c6d56d2533aa89c1b8fe7582c129ec2ee88
---
M modules/base/styles/ext.cx.base.less
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/base/styles/ext.cx.base.less 
b/modules/base/styles/ext.cx.base.less
index 2740dbf..264c09f 100644
--- a/modules/base/styles/ext.cx.base.less
+++ b/modules/base/styles/ext.cx.base.less
@@ -27,6 +27,7 @@
.mw-ui-grid;
color: @gray-darker;
background: white;
+   padding-bottom: 50px;
 }
 
 .cx-widget__header {
@@ -38,6 +39,7 @@
 
 .cx-widget__columns {
margin-top: 150px;
+   min-height: 100vh;
 }
 
 .cx-column__language-label {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73137c6d56d2533aa89c1b8fe7582c129ec2ee88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Pginer 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
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: 02a8567..f67989e - change (mediawiki/extensions)

2014-09-23 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 02a8567..f67989e
..


Syncronize VisualEditor: 02a8567..f67989e

Change-Id: I14bc115abb8ea8f1c4ced0e034657e1116e2050a
---
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 02a8567..f67989e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 02a85676b9c060ff2e84a28a1e64e04f17e1dfd0
+Subproject commit f67989eaa596123649b48284183cd2502ee2e94b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14bc115abb8ea8f1c4ced0e034657e1116e2050a
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: 02a8567..f67989e - change (mediawiki/extensions)

2014-09-23 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 02a8567..f67989e
..

Syncronize VisualEditor: 02a8567..f67989e

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


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

diff --git a/VisualEditor b/VisualEditor
index 02a8567..f67989e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 02a85676b9c060ff2e84a28a1e64e04f17e1dfd0
+Subproject commit f67989eaa596123649b48284183cd2502ee2e94b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14bc115abb8ea8f1c4ced0e034657e1116e2050a
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] Replace use of ve.isArray with native Array.isArray - change (mediawiki...VisualEditor)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace use of ve.isArray with native Array.isArray
..


Replace use of ve.isArray with native Array.isArray

Change-Id: Ibc45e0fd80db7da872f6ef934cef915be9366e06
---
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
index 85d3073..bb7b2bb 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
@@ -49,7 +49,7 @@
if ( data.description !== null ) {
this.description = data.description;
}
-   if ( ve.isArray( data.paramOrder ) ) {
+   if ( Array.isArray( data.paramOrder ) ) {
this.paramOrder = data.paramOrder.slice();
}
if ( ve.isPlainObject( data.params ) ) {
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index ed445ed..f56120c 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -97,7 +97,7 @@
data = { parts: [ { template: data } ] };
}
 
-   if ( ve.isArray( data.parts ) ) {
+   if ( Array.isArray( data.parts ) ) {
for ( i = 0, len = data.parts.length; i < len; i++ ) {
part = data.parts[i];
if ( part.template ) {
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 8710f6e..7ab993a 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -822,7 +822,7 @@
tools = JSON.parse( mw.message( 
'visualeditor-cite-tool-definition.json' ).plain() );
} catch ( e ) { }
 
-   if ( ve.isArray( tools ) ) {
+   if ( Array.isArray( tools ) ) {
for ( i = 0, len = Math.min( limit, tools.length ); i < len; 
i++ ) {
item = tools[i];
data = { template: item.template };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc45e0fd80db7da872f6ef934cef915be9366e06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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] Reduce file size of wikipedia favicon - change (operations/mediawiki-config)

2014-09-23 Thread Jhobs (Code Review)
Jhobs has uploaded a new change for review.

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

Change subject: Reduce file size of wikipedia favicon
..

Reduce file size of wikipedia favicon

Change-Id: Ic53199005afa02c56888135d40648ca9334a7232
---
M docroot/bits/favicon/wikipedia.ico
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/docroot/bits/favicon/wikipedia.ico 
b/docroot/bits/favicon/wikipedia.ico
index b23ff4e..e700218 100644
--- a/docroot/bits/favicon/wikipedia.ico
+++ b/docroot/bits/favicon/wikipedia.ico
Binary files differ

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Remove memcached" - change (mediawiki/vagrant)

2014-09-23 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Revert "Remove memcached"
..

Revert "Remove memcached"

This reverts commit e7e232988bdfa641a3c21ff9418326f77f739177.

Change-Id: I5f214dd9b80632fdd44384f44f5fd40e40d8684e
---
A puppet/modules/memcached/manifests/init.pp
A puppet/modules/memcached/templates/memcached.conf.erb
M puppet/modules/php/manifests/init.pp
3 files changed, 55 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/37/162537/1

diff --git a/puppet/modules/memcached/manifests/init.pp 
b/puppet/modules/memcached/manifests/init.pp
new file mode 100644
index 000..b4a26f9
--- /dev/null
+++ b/puppet/modules/memcached/manifests/init.pp
@@ -0,0 +1,42 @@
+# == Class: memcached
+#
+# Configures a memcached instance.
+#
+# === Parameters
+#
+# [*size_mb*]
+#   Size of memcached store, in megabytes (default: 200).
+#
+# [*port*]
+#   Memcached server will listen on this port (default: 11211).
+#
+# [*iface*]
+#   Interface memcached server will bind to (default: all interfaces).
+#
+# === Examples
+#
+#  class { 'memcached':
+#  size_mb => 500,
+#  }
+#
+class memcached(
+$size_mb = 200,
+$port= 11211,
+$iface   = '0.0.0.0',
+) {
+
+package { 'memcached':
+ensure  => present,
+}
+
+file { '/etc/memcached.conf':
+content => template('memcached/memcached.conf.erb'),
+notify  => Service['memcached'],
+}
+
+service { 'memcached':
+ensure=> running,
+enable=> true,
+require   => Package['memcached'],
+}
+}
diff --git a/puppet/modules/memcached/templates/memcached.conf.erb 
b/puppet/modules/memcached/templates/memcached.conf.erb
new file mode 100644
index 000..3994efd
--- /dev/null
+++ b/puppet/modules/memcached/templates/memcached.conf.erb
@@ -0,0 +1,12 @@
+# Configuration file for memcached.
+# This file is managed by Puppet.
+#
+-d
+-m <%= @size_mb %>
+-p <%= @port %>
+-u nobody
+-l <%= @iface %>
+-c 2
+-n 5
+-f 1.05
+logfile /var/log/memcached.log
diff --git a/puppet/modules/php/manifests/init.pp 
b/puppet/modules/php/manifests/init.pp
index 6317058..6994467 100644
--- a/puppet/modules/php/manifests/init.pp
+++ b/puppet/modules/php/manifests/init.pp
@@ -17,6 +17,7 @@
 'php5-gd',
 'php5-intl',
 'php5-mcrypt',
+'php5-memcached',
 'php5-mysql',
 'php5-xdebug'
 ]:

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

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

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


[MediaWiki-commits] [Gerrit] Add some Wikibase client settings - change (mediawiki/vagrant)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add some Wikibase client settings
..


Add some Wikibase client settings

Sets the client wiki to act as 'enwiki', when it comes to being
able to include interwiki links from the repo and accessing items.

Change-Id: Ie4328475fbcbf42001dc0be66e7b9acdd7b81123
---
M puppet/modules/role/manifests/wikidata.pp
M puppet/modules/role/templates/wikidata-shared.php.erb
2 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/puppet/modules/role/manifests/wikidata.pp 
b/puppet/modules/role/manifests/wikidata.pp
index 070f9dd..74085d3 100644
--- a/puppet/modules/role/manifests/wikidata.pp
+++ b/puppet/modules/role/manifests/wikidata.pp
@@ -4,6 +4,8 @@
 # github.
 #
 class role::wikidata {
+require ::role::mediawiki
+
 mediawiki::wiki { 'wikidata': }
 
 mediawiki::extension { 'WikidataBuildResources':
diff --git a/puppet/modules/role/templates/wikidata-shared.php.erb 
b/puppet/modules/role/templates/wikidata-shared.php.erb
index 1b3896d..e63169e 100644
--- a/puppet/modules/role/templates/wikidata-shared.php.erb
+++ b/puppet/modules/role/templates/wikidata-shared.php.erb
@@ -14,3 +14,11 @@
$wgWBNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
$wgExtraNamespaces = $wgWBNamespaces + $wgExtraNamespaces;
 }
+
+if ( !empty( $wmgUseWikibaseClient ) ) {
+   $wgWBClientSettings['siteGlobalID'] = 'enwiki';
+   $wgWBClientSettings['repoUrl'] = '//wikidata<%= 
scope['::mediawiki::multiwiki::base_domain'] %><%= scope['::port_fragment'] %>';
+
+   $wgWBClientSettings['changesDatabase'] = 'wikidatawiki';
+   $wgWBClientSettings['repoDatabase'] = 'wikidatawiki';
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4328475fbcbf42001dc0be66e7b9acdd7b81123
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: BryanDavis 
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] terbium - include misc::noc-wikimedia - change (operations/puppet)

2014-09-23 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: terbium - include misc::noc-wikimedia
..

terbium - include misc::noc-wikimedia

to move noc.wikimedia.org away from fenari
and over to terbium

Change-Id: I3939a435b8238f6e51168bc618c4d6ecb4082ccc
RT: 6145
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 897673e..8d48fb7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2826,6 +2826,7 @@
 include misc::monitoring::jobqueue
 include generic::wikidev-umask
 include misc::deployment::common_scripts
+include misc::noc-wikimedia
 
 $domain_search = [
 'wikimedia.org',

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

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

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


[MediaWiki-commits] [Gerrit] Fix role:commons duplicate definition - change (mediawiki/vagrant)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix role:commons duplicate definition
..


Fix role:commons duplicate definition

Regression introduced by I45def381a30c5c0719ab38ca627c7c91df91c5e3.

Change-Id: I4d6f9704ce0e931f5c9afe576a77a1e863e3762a
---
M puppet/modules/role/manifests/commons.pp
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/puppet/modules/role/manifests/commons.pp 
b/puppet/modules/role/manifests/commons.pp
index dc41e36..fe88a53 100644
--- a/puppet/modules/role/manifests/commons.pp
+++ b/puppet/modules/role/manifests/commons.pp
@@ -10,13 +10,6 @@
 mediawiki::wiki { 'commons': }
 role::thumb_on_404::multiwiki { 'commons': }
 
-file { '/srv/commonsimages':
-ensure => directory,
-owner  => 'vagrant',
-group  => 'www-data',
-mode   => '0775',
-}
-
 mediawiki::settings { 'commons:general':
 values => {
 wgUseInstantCommons=> false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d6f9704ce0e931f5c9afe576a77a1e863e3762a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix role:commons duplicate definition - change (mediawiki/vagrant)

2014-09-23 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Fix role:commons duplicate definition
..

Fix role:commons duplicate definition

Regression introduced by I45def381a30c5c0719ab38ca627c7c91df91c5e3.

Change-Id: I4d6f9704ce0e931f5c9afe576a77a1e863e3762a
---
M puppet/modules/role/manifests/commons.pp
1 file changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/35/162535/1

diff --git a/puppet/modules/role/manifests/commons.pp 
b/puppet/modules/role/manifests/commons.pp
index dc41e36..fe88a53 100644
--- a/puppet/modules/role/manifests/commons.pp
+++ b/puppet/modules/role/manifests/commons.pp
@@ -10,13 +10,6 @@
 mediawiki::wiki { 'commons': }
 role::thumb_on_404::multiwiki { 'commons': }
 
-file { '/srv/commonsimages':
-ensure => directory,
-owner  => 'vagrant',
-group  => 'www-data',
-mode   => '0775',
-}
-
 mediawiki::settings { 'commons:general':
 values => {
 wgUseInstantCommons=> false,

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

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

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


[MediaWiki-commits] [Gerrit] phabricator - redirect/enforce http->https - change (operations/puppet)

2014-09-23 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: phabricator - redirect/enforce http->https
..

phabricator - redirect/enforce http->https

as requested by Chase and used on other services
behind misc-web

Change-Id: I4d207a4d27d09716d535e3c24978e99665822dcd
---
M modules/phabricator/templates/phabricator-default.conf.erb
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/162534/1

diff --git a/modules/phabricator/templates/phabricator-default.conf.erb 
b/modules/phabricator/templates/phabricator-default.conf.erb
index 11221c1..f1d4d9f 100644
--- a/modules/phabricator/templates/phabricator-default.conf.erb
+++ b/modules/phabricator/templates/phabricator-default.conf.erb
@@ -16,6 +16,12 @@
 
   DocumentRoot <%= @docroot %>
 
+  # redirect/enforce http->https
+  RewriteEngine on
+  RewriteCond %{HTTP:X-Forwarded-Proto} !https
+  RewriteRule ^/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} 
[R=301,E=ProtoRedirect]
+  Header always merge Vary X-Forwarded-Proto env=ProtoRedirect
+
 <%# Apache 2.4 and Newer %>
 <% if @lsbdistcodename == 'trusty'%>
   ">
@@ -37,8 +43,8 @@
   CustomLog /var/log/apache2/<%= @name %>_access.log combined
   ServerSignature Off
 
-  RewriteEngine on
   RewriteRule ^/rsrc/(.*) -   [L,QSA]
   RewriteRule ^/favicon.ico   -   [L,QSA]
   RewriteRule ^(.*)$  /index.php?__path__=$1  [B,L,QSA]
+
 

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

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

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


[MediaWiki-commits] [Gerrit] Strip signatures for Flow and LQT - change (mediawiki...MassMessage)

2014-09-23 Thread Wctaiwan (Code Review)
Wctaiwan has uploaded a new change for review.

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

Change subject: Strip signatures for Flow and LQT
..

Strip signatures for Flow and LQT

Change-Id: I04689ba74f2c02b034be2665572d553fb99d2b21
---
M includes/job/MassMessageJob.php
1 file changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/33/162533/1

diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php
index f7ed124..bf91b30 100644
--- a/includes/job/MassMessageJob.php
+++ b/includes/job/MassMessageJob.php
@@ -167,7 +167,7 @@
'title' => $this->title->getPrefixedText(),
'section' => 'new',
'summary' => $this->params['subject'],
-   'text' => $this->makeText(),
+   'text' => $this->makeText( false ),
'notminor' => true,
'bot' => true,
'token' => $user->getEditToken()
@@ -183,7 +183,7 @@
'threadaction' => 'newthread',
'talkpage' => $this->title,
'subject' => $this->params['subject'],
-   'text' => $this->makeText(),
+   'text' => $this->makeText( true ),
'token' => $user->getEditToken()
); // LQT will automatically mark the edit as bot if we're a bot
 
@@ -197,7 +197,7 @@
'page' => $this->title->getPrefixedText(),
'submodule' => 'new-topic',
'nttopic' => $this->params['subject'],
-   'ntcontent' => $this->makeText(),
+   'ntcontent' => $this->makeText( true ),
'token' => $user->getEditToken(),
);
 
@@ -206,10 +206,17 @@
 
/**
 * Add some stuff to the end of the message
+* @param bool $stripTildes Whether to strip trailing ''
 * @return string
 */
-   protected function makeText() {
-   $text = $this->params['message'];
+   protected function makeText( $stripTildes ) {
+   $text = rtrim( $this->params['message'] );
+   if ( $stripTildes
+   && substr( $text, -4 ) === ''
+   && substr( $text, -5 ) !== '~'
+   ) {
+   $text = substr( $text, 0, -4 );
+   }
$text .= "\n" . wfMessage( 'massmessage-hidden-comment' 
)->params( $this->params['comment'] )->text();
return $text;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04689ba74f2c02b034be2665572d553fb99d2b21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Wctaiwan 

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


[MediaWiki-commits] [Gerrit] repool db1062 - change (operations/mediawiki-config)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: repool db1062
..


repool db1062

Change-Id: I88b171539b8f83bbdc628d1199295c5648fa3d57
---
M wmf-config/db-eqiad.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 2e0aade..dfbb35c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -90,9 +90,9 @@
's1' => array(
'db1052' => 0,   # 2.8TB  96GB
'db1055' => 0,   # 2.8TB  96GB, watchlist, recentchangeslinked, 
contributions, logpager
+   'db1062' => 0,   # 2.8TB 128GB, watchlist, recentchangeslinked, 
contributions, logpager
'db1051' => 0,   # 2.8TB  96GB, vslow, dump, api
'db1061' => 400, # 2.8TB 128GB, traffic sampling
-   # maintenance 'db1062' => 400, # 2.8TB 128GB
'db1065' => 500, # 2.8TB 160GB
'db1066' => 200, # 2.8TB 160GB, api
'db1072' => 500, # 2.8TB 160GB
@@ -302,15 +302,19 @@
'enwiki' => array(
'watchlist' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'recentchangeslinked' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'contributions' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'logpager' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'dump' => array(
'db1051' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] Only use the RSS proxy on foundationwiki - change (operations/mediawiki-config)

2014-09-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Only use the RSS proxy on foundationwiki
..

Only use the RSS proxy on foundationwiki

This is breaking the RSS feed on [[mw:HHVM]] from Bugzilla.

Change-Id: I95481df1db085ca209f3fb5a25ffb7142bd26037
---
M wmf-config/CommonSettings.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6b987bb..4c9c55d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1047,7 +1047,11 @@
 
 if ( $wmgUseRSSExtension ) {
include( "$IP/extensions/RSS/RSS.php" );
-   $wgRSSProxy = $wgCopyUploadProxy;
+   // Only enable the proxy on foundationwiki since the blog
+   // is now on an external host
+   if ( $wgDBname === 'foundationwiki' ) {
+   $wgRSSProxy = $wgCopyUploadProxy;
+   }
$wgRSSUrlWhitelist = $wmgRSSUrlWhitelist;
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Require mark_directory_done_workflow_file in partition addin... - change (analytics/refinery)

2014-09-23 Thread QChris (Code Review)
Hello Ottomata,

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

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

to review the following change.

Change subject: Require mark_directory_done_workflow_file in partition adding 
bundle
..

Require mark_directory_done_workflow_file in partition adding bundle

By making mark_directory_done_workflow_file a required property,
already the bundle (not only the coordinator) would fail to spawn, if
the property is not provided.

Change-Id: Iee8c1bc49afddec85e9942a6d3432d5c195af955
---
M oozie/webrequest/partition/add/bundle.xml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/30/162530/1

diff --git a/oozie/webrequest/partition/add/bundle.xml 
b/oozie/webrequest/partition/add/bundle.xml
index 9789319..69622fe 100644
--- a/oozie/webrequest/partition/add/bundle.xml
+++ b/oozie/webrequest/partition/add/bundle.xml
@@ -22,6 +22,7 @@
 table
 statistics_table
 faulty_hosts_directory
+mark_directory_done_workflow_file
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee8c1bc49afddec85e9942a6d3432d5c195af955
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] Tag property descriptions as description in worklow files - change (analytics/refinery)

2014-09-23 Thread QChris (Code Review)
Hello Ottomata,

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

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

to review the following change.

Change subject: Tag property descriptions as description in worklow files
..

Tag property descriptions as description in worklow files

Some have been tagged as 'value' before, hence being treated as
default values. This mis-tagging did not cause errors, as we
explicitly pass values for the corresponding properties. But we now
tag the descriptions as 'description' to reflect their intention.

Change-Id: I597fdd8ea474c801cd2adf618a3e4a9b2d6658a9
---
M oozie/webstats/generate_hourly_files/workflow.xml
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/31/162531/1

diff --git a/oozie/webstats/generate_hourly_files/workflow.xml 
b/oozie/webstats/generate_hourly_files/workflow.xml
index c442b97..71c2012 100644
--- a/oozie/webstats/generate_hourly_files/workflow.xml
+++ b/oozie/webstats/generate_hourly_files/workflow.xml
@@ -64,19 +64,19 @@
 
 
 webstats_archive_directory
-Directory for archive of webstats files
+Directory for archive of webstats files
 
 
 archive_job_output_workflow_file
-Workflow to move a data file to the archive
+Workflow to move a data file to the 
archive
 
 
 aspect_name
-Aspect to cover. Either "pagecounts" or 
"projectcounts".
+Aspect to cover. Either "pagecounts" or 
"projectcounts".
 
 
 aspect_compression_ending
-The filename ending for this aspect's file. Either ".gz" or 
"".
+The filename ending for this aspect's file. Either 
".gz" or "".
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I597fdd8ea474c801cd2adf618a3e4a9b2d6658a9
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] Make MassMessageJob methods protected - change (mediawiki...MassMessage)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make MassMessageJob methods protected
..


Make MassMessageJob methods protected

Add explicit access modifiers.

Change-Id: I58f225599a5c780ec6e2bce5ce782be42e8302a6
---
M includes/job/MassMessageJob.php
1 file changed, 27 insertions(+), 31 deletions(-)

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



diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php
index 1cee03b..f7ed124 100644
--- a/includes/job/MassMessageJob.php
+++ b/includes/job/MassMessageJob.php
@@ -30,33 +30,11 @@
 */
public function run() {
$status = $this->sendMessage();
-
if ( $status !== true ) {
$this->setLastError( $status );
-
return false;
}
-
return true;
-   }
-
-   /**
-* Normalizes the title according to $wgNamespacesToConvert and 
$wgNamespacesToPostIn
-* @param  Title $title
-* @return Title|null null if we shouldn't post on that title
-*/
-   function normalizeTitle( Title $title ) {
-   global $wgNamespacesToPostIn, $wgNamespacesToConvert;
-   if ( isset( $wgNamespacesToConvert[$title->getNamespace()] ) ) {
-   $title = Title::makeTitle( 
$wgNamespacesToConvert[$title->getNamespace()], $title->getText() );
-   }
-   $title = MassMessage::followRedirect( $title ) ?: $title; // 
Try to follow redirects
-   if ( !$title->isTalkPage() && !in_array( 
$title->getNamespace(), $wgNamespacesToPostIn ) ) {
-   $this->logLocalSkip( 'skipbadns');
-   $title = null;
-   }
-
-   return $title;
}
 
/**
@@ -78,11 +56,30 @@
}
 
/**
+* Normalizes the title according to $wgNamespacesToConvert and 
$wgNamespacesToPostIn
+* @param  Title $title
+* @return Title|null null if we shouldn't post on that title
+*/
+   protected function normalizeTitle( Title $title ) {
+   global $wgNamespacesToPostIn, $wgNamespacesToConvert;
+   if ( isset( $wgNamespacesToConvert[$title->getNamespace()] ) ) {
+   $title = Title::makeTitle( 
$wgNamespacesToConvert[$title->getNamespace()], $title->getText() );
+   }
+   $title = MassMessage::followRedirect( $title ) ?: $title; // 
Try to follow redirects
+   if ( !$title->isTalkPage() && !in_array( 
$title->getNamespace(), $wgNamespacesToPostIn ) ) {
+   $this->logLocalSkip( 'skipbadns');
+   $title = null;
+   }
+
+   return $title;
+   }
+
+   /**
 * Log any skips on the target site
 *
 * @param $reason string log subtype
 */
-   function logLocalSkip( $reason ) {
+   protected function logLocalSkip( $reason ) {
$logEntry = new ManualLogEntry( 'massmessage', $reason );
$logEntry->setPerformer( MassMessage::getMessengerUser() );
$logEntry->setTarget( $this->title );
@@ -100,7 +97,7 @@
 *
 * @param $reason string
 */
-   function logLocalFailure( $reason ) {
+   protected function logLocalFailure( $reason ) {
 
$logEntry = new ManualLogEntry( 'massmessage', 'failure' );
$logEntry->setPerformer( MassMessage::getMessengerUser() );
@@ -126,7 +123,7 @@
 *
 * @return bool
 */
-   function sendMessage() {
+   protected function sendMessage() {
$title = $this->normalizeTitle( $this->title );
if ( $title === null ) {
return true; // Skip it
@@ -163,7 +160,7 @@
return true;
}
 
-   function editPage() {
+   protected function editPage() {
$user = MassMessage::getMessengerUser();
$params = array(
'action' => 'edit',
@@ -179,7 +176,7 @@
$this->makeAPIRequest( $params );
}
 
-   function addLQTThread() {
+   protected function addLQTThread() {
$user = MassMessage::getMessengerUser();
$params = array(
'action' => 'threadaction',
@@ -193,7 +190,7 @@
$this->makeAPIRequest( $params );
}
 
-   function addFlowTopic() {
+   protected function addFlowTopic() {
$user = MassMessage::getMessengerUser();
$params = array(
'action' => 'flow',
@@ -211,13 +208,13 @@
 * Add some stuff to the end of the message
 * @return string
 */
-   function makeText() {
+   protected function makeText() {
   

[MediaWiki-commits] [Gerrit] mw.LinkCache: Clean up - change (mediawiki...VisualEditor)

2014-09-23 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: mw.LinkCache: Clean up
..

mw.LinkCache: Clean up

Pompidom.

Change-Id: Ia4e05d62845a7bce685cc9926101a238fe4bbce9
---
M modules/ve-mw/init/ve.init.mw.LinkCache.js
1 file changed, 43 insertions(+), 39 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.LinkCache.js 
b/modules/ve-mw/init/ve.init.mw.LinkCache.js
index 07bba48..ab5f06d 100644
--- a/modules/ve-mw/init/ve.init.mw.LinkCache.js
+++ b/modules/ve-mw/init/ve.init.mw.LinkCache.js
@@ -5,6 +5,17 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 ( function () {
+   var hasOwn = Object.prototype.hasOwnProperty;
+
+   // TODO should reuse ve.dm.MWInternalLinkAnnotation#getLookupTitle once 
factored out
+   function normalizeTitle( name ) {
+   var title = mw.Title.newFromText( name );
+   if ( !title ) {
+   return name;
+   }
+   return title.getPrefixedText();
+   }
+
/**
 * MediaWiki link status cache.
 *
@@ -18,8 +29,16 @@
// Mixin constructor
OO.EventEmitter.call( this );
 
-   this.cache = {}; // Keys are page names, values are deferreds
-   this.queue = []; // Array of page names queued to be looked up
+   // Keys are page names, values are deferreds
+   this.cache = {};
+
+   // Keys are page names, values are link data objects
+   // This is kept for synchronous retreival of cached values via 
#getCached
+   this.cacheValues = {};
+
+   // Array of page names queued to be looked up
+   this.queue = [];
+
this.schedule = ve.debounce( this.processQueue.bind( this ), 0 
);
};
 
@@ -43,7 +62,7 @@
 * @returns {jQuery.Promise} Promise that will be resolved with the 
data once it's available
 */
ve.init.mw.LinkCache.prototype.get = function ( name ) {
-   if ( !Object.prototype.hasOwnProperty.call( this.cache, name ) 
) {
+   if ( !hasOwn.call( this.cache, name ) ) {
this.cache[name] = $.Deferred();
this.queue.push( name );
this.schedule();
@@ -56,18 +75,11 @@
 * this returns that data. Otherwise, it returns undefined.
 *
 * @param {string} name Normalized page title
-* @returns {Object} Cache data for this name.
+* @returns {Object|undefined} Cache data for this name.
 */
ve.init.mw.LinkCache.prototype.getCached = function ( name ) {
-   var res;
-   if (
-   Object.prototype.hasOwnProperty.call( this.cache, name 
) &&
-   this.cache[name].state() === 'resolved'
-   ) {
-   this.cache[name].done( function ( data ) {
-   res = data;
-   } );
-   return res;
+   if ( hasOwn.call( this.cacheValues, name ) ) {
+   return this.cacheValues[name];
}
};
 
@@ -79,22 +91,14 @@
ve.init.mw.LinkCache.prototype.set = function ( entries ) {
var name;
for ( name in entries ) {
-   if ( !Object.prototype.hasOwnProperty.call( this.cache, 
name ) ) {
+   if ( !hasOwn.call( this.cache, name ) ) {
this.cache[name] = $.Deferred();
}
this.cache[name].resolve( entries[name] );
+   this.cacheValues[name] = entries[name];
}
this.emit( 'add', ve.getObjectKeys( entries ) );
};
-
-   // TODO should reuse ve.dm.MWInternalLinkAnnotation#getLookupTitle once 
factored out
-   function normalizeTitle( name ) {
-   var title = mw.Title.newFromText( name );
-   if ( !title ) {
-   return name;
-   }
-   return title.getPrefixedText();
-   }
 
/**
 * Perform any scheduled API requests.
@@ -102,7 +106,7 @@
 * @fires add
 */
ve.init.mw.LinkCache.prototype.processQueue = function () {
-   var subqueue, queue, queueCopy, linkCache = this;
+   var subqueue, queue, linkCache = this;
 
function rejectSubqueue() {
var i, len;
@@ -112,21 +116,23 @@
}
 
function processData( data ) {
-   var pageid, page, info, dfd,
-   pages = data.query && data.query.pages || {};
-  

[MediaWiki-commits] [Gerrit] Make MassMessageJob methods protected - change (mediawiki...MassMessage)

2014-09-23 Thread Wctaiwan (Code Review)
Wctaiwan has uploaded a new change for review.

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

Change subject: Make MassMessageJob methods protected
..

Make MassMessageJob methods protected

Add explicit access modifiers.

Change-Id: I58f225599a5c780ec6e2bce5ce782be42e8302a6
---
M includes/job/MassMessageJob.php
1 file changed, 27 insertions(+), 31 deletions(-)


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

diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php
index 1cee03b..f7ed124 100644
--- a/includes/job/MassMessageJob.php
+++ b/includes/job/MassMessageJob.php
@@ -30,33 +30,11 @@
 */
public function run() {
$status = $this->sendMessage();
-
if ( $status !== true ) {
$this->setLastError( $status );
-
return false;
}
-
return true;
-   }
-
-   /**
-* Normalizes the title according to $wgNamespacesToConvert and 
$wgNamespacesToPostIn
-* @param  Title $title
-* @return Title|null null if we shouldn't post on that title
-*/
-   function normalizeTitle( Title $title ) {
-   global $wgNamespacesToPostIn, $wgNamespacesToConvert;
-   if ( isset( $wgNamespacesToConvert[$title->getNamespace()] ) ) {
-   $title = Title::makeTitle( 
$wgNamespacesToConvert[$title->getNamespace()], $title->getText() );
-   }
-   $title = MassMessage::followRedirect( $title ) ?: $title; // 
Try to follow redirects
-   if ( !$title->isTalkPage() && !in_array( 
$title->getNamespace(), $wgNamespacesToPostIn ) ) {
-   $this->logLocalSkip( 'skipbadns');
-   $title = null;
-   }
-
-   return $title;
}
 
/**
@@ -78,11 +56,30 @@
}
 
/**
+* Normalizes the title according to $wgNamespacesToConvert and 
$wgNamespacesToPostIn
+* @param  Title $title
+* @return Title|null null if we shouldn't post on that title
+*/
+   protected function normalizeTitle( Title $title ) {
+   global $wgNamespacesToPostIn, $wgNamespacesToConvert;
+   if ( isset( $wgNamespacesToConvert[$title->getNamespace()] ) ) {
+   $title = Title::makeTitle( 
$wgNamespacesToConvert[$title->getNamespace()], $title->getText() );
+   }
+   $title = MassMessage::followRedirect( $title ) ?: $title; // 
Try to follow redirects
+   if ( !$title->isTalkPage() && !in_array( 
$title->getNamespace(), $wgNamespacesToPostIn ) ) {
+   $this->logLocalSkip( 'skipbadns');
+   $title = null;
+   }
+
+   return $title;
+   }
+
+   /**
 * Log any skips on the target site
 *
 * @param $reason string log subtype
 */
-   function logLocalSkip( $reason ) {
+   protected function logLocalSkip( $reason ) {
$logEntry = new ManualLogEntry( 'massmessage', $reason );
$logEntry->setPerformer( MassMessage::getMessengerUser() );
$logEntry->setTarget( $this->title );
@@ -100,7 +97,7 @@
 *
 * @param $reason string
 */
-   function logLocalFailure( $reason ) {
+   protected function logLocalFailure( $reason ) {
 
$logEntry = new ManualLogEntry( 'massmessage', 'failure' );
$logEntry->setPerformer( MassMessage::getMessengerUser() );
@@ -126,7 +123,7 @@
 *
 * @return bool
 */
-   function sendMessage() {
+   protected function sendMessage() {
$title = $this->normalizeTitle( $this->title );
if ( $title === null ) {
return true; // Skip it
@@ -163,7 +160,7 @@
return true;
}
 
-   function editPage() {
+   protected function editPage() {
$user = MassMessage::getMessengerUser();
$params = array(
'action' => 'edit',
@@ -179,7 +176,7 @@
$this->makeAPIRequest( $params );
}
 
-   function addLQTThread() {
+   protected function addLQTThread() {
$user = MassMessage::getMessengerUser();
$params = array(
'action' => 'threadaction',
@@ -193,7 +190,7 @@
$this->makeAPIRequest( $params );
}
 
-   function addFlowTopic() {
+   protected function addFlowTopic() {
$user = MassMessage::getMessengerUser();
$params = array(
'action' => 'flow',
@@ -211,13 +208,13 @@
 * Add some stuff to the end of the message
 * @return string
 */
-   function makeT

[MediaWiki-commits] [Gerrit] repool db1062 - change (operations/mediawiki-config)

2014-09-23 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: repool db1062
..

repool db1062

Change-Id: I88b171539b8f83bbdc628d1199295c5648fa3d57
---
M wmf-config/db-eqiad.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 2e0aade..dfbb35c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -90,9 +90,9 @@
's1' => array(
'db1052' => 0,   # 2.8TB  96GB
'db1055' => 0,   # 2.8TB  96GB, watchlist, recentchangeslinked, 
contributions, logpager
+   'db1062' => 0,   # 2.8TB 128GB, watchlist, recentchangeslinked, 
contributions, logpager
'db1051' => 0,   # 2.8TB  96GB, vslow, dump, api
'db1061' => 400, # 2.8TB 128GB, traffic sampling
-   # maintenance 'db1062' => 400, # 2.8TB 128GB
'db1065' => 500, # 2.8TB 160GB
'db1066' => 200, # 2.8TB 160GB, api
'db1072' => 500, # 2.8TB 160GB
@@ -302,15 +302,19 @@
'enwiki' => array(
'watchlist' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'recentchangeslinked' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'contributions' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'logpager' => array(
'db1055' => 1,
+   'db1062' => 1,
),
'dump' => array(
'db1051' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] decom - remove tridge - change (operations/dns)

2014-09-23 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: decom - remove tridge
..

decom - remove tridge

we already shut it down

Change-Id: I3f5c463b12397528f5b8dae6de09cc4d38cfe248
RT: 6170
---
M templates/10.in-addr.arpa
M templates/152.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/26/162526/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index db9491e..274589a 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2805,4 +2805,3 @@
 
 $ORIGIN 1.252.{{ zonename }}.
 
-170 1H IN PTR   tridge.mgmt.pmtpa.wmnet.
diff --git a/templates/152.80.208.in-addr.arpa 
b/templates/152.80.208.in-addr.arpa
index cd0cdd3..38bef7f 100644
--- a/templates/152.80.208.in-addr.arpa
+++ b/templates/152.80.208.in-addr.arpa
@@ -40,8 +40,6 @@
 165 1H IN PTR   fenari.wikimedia.org.
 167 1H IN PTR   linne.wikimedia.org.
 
-170 1H IN PTR   tridge.wikimedia.org.   ; Cold Backup Server
-
 173 1H IN PTR   dobson.wikimedia.org.
 
 181 1H IN PTR   pdf3.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 9209a12..88979c3 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -226,7 +226,6 @@
 1H  IN  2620:0:861:3:208:80:154:87
 thulium 1H  IN A208.80.155.12
 titanium1H  IN A208.80.154.154
-tridge  1H  IN A208.80.152.170 ; Cold Backup Server
 uranium 1H  IN A208.80.154.53
 virt0   1H  IN A208.80.152.32
 virt10001H  IN A208.80.154.18
diff --git a/templates/wmnet b/templates/wmnet
index 007ddde..4af9676 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -133,7 +133,6 @@
 sanger  1H  IN A10.1.230.241
 tarin   1H  IN A10.1.8.35
 wmf3930 1H  IN A10.1.8.25
-tridge  1H  IN A10.1.252.170
 ts-array4a  1H  IN A10.1.8.17
 ts-array4b  1H  IN A10.1.8.18
 virt0   1H  IN A10.1.8.28

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f5c463b12397528f5b8dae6de09cc4d38cfe248
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Add Flow support - change (mediawiki...MassMessage)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add Flow support
..


Add Flow support

Implements basic functionality, with some issues:
* Topic titles are not wikitext, so preview is misleading
* New posts are not marked as bot in RecentChanges
* Double signature (LQT also has this issue)

Bug: 71082
Change-Id: I7b27cca7c23ed7fa3796288602a50720240c
---
M includes/job/MassMessageJob.php
1 file changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php
index 7d54ed6..1cee03b 100644
--- a/includes/job/MassMessageJob.php
+++ b/includes/job/MassMessageJob.php
@@ -149,9 +149,13 @@
}
}
 
-   // See if we should use LiquidThreads
+   // If the page is using a different discussion system, handle 
it specially
if ( class_exists( 'LqtDispatch' ) && LqtDispatch::isLqtPage( 
$title ) ) { // This is the same check that LQT uses internally
$this->addLQTThread();
+   } elseif ( $title->hasContentModel( 'flow-board' )
+   // But it can't be a Topic: page, see bug 71196
+   && defined( 'NS_TOPIC' ) && !$title->inNamespace( 
NS_TOPIC ) ) {
+   $this->addFlowTopic();
} else {
$this->editPage();
}
@@ -189,6 +193,20 @@
$this->makeAPIRequest( $params );
}
 
+   function addFlowTopic() {
+   $user = MassMessage::getMessengerUser();
+   $params = array(
+   'action' => 'flow',
+   'page' => $this->title->getPrefixedText(),
+   'submodule' => 'new-topic',
+   'nttopic' => $this->params['subject'],
+   'ntcontent' => $this->makeText(),
+   'token' => $user->getEditToken(),
+   );
+
+   $this->makeAPIRequest( $params );
+   }
+
/**
 * Add some stuff to the end of the message
 * @return string

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b27cca7c23ed7fa3796288602a50720240c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: Wctaiwan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] MediaWikiTestCase: Centralise insertPage() logic from Search... - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: MediaWikiTestCase: Centralise insertPage() logic from 
SearchEngineTest
..


MediaWikiTestCase: Centralise insertPage() logic from SearchEngineTest

Make it re-usable for other tests and update SearchEngineTest to
use the addDBData (which is called automatically) instead of
manually keeping track of the state.

Change-Id: I75a6951545d9824e71e00f0f96936c53b400dce6
---
M tests/phpunit/MediaWikiTestCase.php
M tests/phpunit/includes/search/SearchEngineTest.php
2 files changed, 50 insertions(+), 52 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Manybubbles: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index 995853e..4abb4e5 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -429,6 +429,34 @@
}
 
/**
+* Insert a new page.
+*
+* Should be called from addDBData().
+*
+* @since 1.25
+* @param string $pageName Page name
+* @param string $text Page's content
+* @return array Title object and page id
+*/
+   protected function insertPage( $pageName, $text = 'Sample page for unit 
test.' ) {
+   $title = Title::newFromText( $pageName, 0 );
+
+   $user = User::newFromName( 'WikiSysop' );
+   $comment = __METHOD__ . ': Sample page for unit test.';
+
+   // Avoid memory leak...?
+   LinkCache::singleton()->clear();
+
+   $page = WikiPage::factory( $title );
+   $page->doEditContent( ContentHandler::makeContent( $text, 
$title ), $comment, 0, false, $user );
+
+   return array(
+   'title' => $title,
+   'id' => $page->getId(),
+   );
+   }
+
+   /**
 * Stub. If a test needs to add additional data to the database, it 
should
 * implement this method and do so
 *
@@ -464,7 +492,7 @@
 
User::resetIdByNameCache();
 
-   //Make sysop user
+   // Make sysop user
$user = User::newFromName( 'UTSysop' );
 
if ( $user->idForName() == 0 ) {
@@ -476,7 +504,7 @@
$user->saveSettings();
}
 
-   //Make 1 page with 1 revision
+   // Make 1 page with 1 revision
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
if ( $page->getId() == 0 ) {
$page->doEditContent(
@@ -484,7 +512,8 @@
'UTPageSummary',
EDIT_NEW,
false,
-   User::newFromName( 'UTSysop' ) );
+   User::newFromName( 'UTSysop' )
+   );
}
}
 
diff --git a/tests/phpunit/includes/search/SearchEngineTest.php 
b/tests/phpunit/includes/search/SearchEngineTest.php
index 3da1361..d0cbfa0 100644
--- a/tests/phpunit/includes/search/SearchEngineTest.php
+++ b/tests/phpunit/includes/search/SearchEngineTest.php
@@ -14,8 +14,6 @@
 */
protected $search;
 
-   protected $pageList;
-
/**
 * Checks for database type & version.
 * Will skip current test if DB does not support search.
@@ -37,10 +35,6 @@
'wgSearchType' => $searchType
) );
 
-   if ( !isset( self::$pageList ) ) {
-   $this->addPages();
-   }
-
$this->search = new $searchType( $this->db );
}
 
@@ -50,33 +44,32 @@
parent::tearDown();
}
 
-   protected function addPages() {
+   public function addDBData() {
if ( !$this->isWikitextNS( NS_MAIN ) ) {
// @todo cover the case of non-wikitext content in the 
main namespace
return;
}
 
-   $this->insertPage( "Not_Main_Page", "This is not a main page", 
0 );
+   $this->insertPage( 'Not_Main_Page', 'This is not a main page' );
$this->insertPage(
'Talk:Not_Main_Page',
-   'This is not a talk page to the main page, see 
[[smithee]]',
-   1
+   'This is not a talk page to the main page, see 
[[smithee]]'
);
-   $this->insertPage( 'Smithee', 'A smithee is one who smiths. See 
also [[Alan Smithee]]', 0 );
-   $this->insertPage( 'Talk:Smithee', 'This article sucks.', 1 );
-   $this->insertPage( 'Unrelated_page', 'Nothing in this page is 
about the S word.', 0 );
-   $this->insertPage( 

[MediaWiki-commits] [Gerrit] remove cron that rsynced nfs home - change (operations/puppet)

2014-09-23 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: remove cron that rsynced nfs home
..


remove cron that rsynced nfs home

remove the cron job that used to sync
the nfs home dirs and back them up on tridge

we don't want to use either anymore, tridge
is already being decom'ed as well

Change-Id: I13e6af0707c6a80de6bad6e5601cb981cb5d7498
---
M manifests/nfs.pp
1 file changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/manifests/nfs.pp b/manifests/nfs.pp
index c81b516..155d5fc 100644
--- a/manifests/nfs.pp
+++ b/manifests/nfs.pp
@@ -213,17 +213,8 @@
 system::role { 'misc::nfs-server::home': description => '/home NFS' }
 
 class backup {
-cron { 'home-rsync':
-ensure  => 'absent',
-require => File['/root/.ssh/home-rsync'],
-command => '[ -d /home/wikipedia ] && rsync --rsh="ssh -c 
blowfish-cbc -i /root/.ssh/home-rsync" -azu /home/* 
d...@tridge.wikimedia.org:~/home/',
-user=> 'root',
-hour=> 2,
-minute  => 35,
-weekday => 6,
-}
-
 file { '/root/.ssh/home-rsync':
+ensure => absent,
 owner  => 'root',
 group  => 'root',
 mode   => '0400',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13e6af0707c6a80de6bad6e5601cb981cb5d7498
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Matanya 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WIP: Fix DOMFragment wrapping to work with new P-wrapping algo. - change (mediawiki...parsoid)

2014-09-23 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: WIP: Fix DOMFragment wrapping to work with new P-wrapping algo.
..

WIP: Fix DOMFragment wrapping to work with new P-wrapping algo.

* The changes to wrapping seem to be improvements.
* Yet to look at this closely, but other eyes on it are welcome.

Fixes regressions seen in RT-testing with the  extension
Ex:  http://localhost:8000/_rt/iswiki/%C3%9E%C3%B3rir

Change-Id: I905c6393e9f6f1998edcbcc760723b29c146c01b
---
M lib/ext.core.ExtensionHandler.js
M lib/mediawiki.DOMUtils.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
4 files changed, 80 insertions(+), 80 deletions(-)


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

diff --git a/lib/ext.core.ExtensionHandler.js b/lib/ext.core.ExtensionHandler.js
index 02271c4..9704fed 100644
--- a/lib/ext.core.ExtensionHandler.js
+++ b/lib/ext.core.ExtensionHandler.js
@@ -60,11 +60,8 @@
 };
 
 /**
- * Parse the extension HTML content.
- *
- * TODO gwicke: Use DOMFragment instead of converting back to tokens for
- * template content. For this, we'll have to add the extension-specific
- * encapsulation directly on the DOM before wrapping it.
+ * Parse the extension HTML content and wrap it in a DOMFragment
+ * to be expanded back into the top-level DOM later.
  */
 ExtensionHandler.prototype.parseExtensionHTML = function(extToken, cb, err, 
html) {
// document -> html -> body -> children
@@ -151,9 +148,7 @@
// cache hit. Reuse extension expansion.
var toks = DU.encapsulateExpansionHTML(env, token, 
cachedExpansion, { setDSR: true} );
cb({ tokens: toks });
-   } else if ( env.conf.parsoid.expandExtensions &&
-   env.conf.parsoid.usePHPPreProcessor )
-   {
+   } else if ( env.conf.parsoid.expandExtensions && 
env.conf.parsoid.usePHPPreProcessor ) {
// Use MediaWiki's action=parse preprocessor
this.fetchExpandedExtension(
extensionName,
diff --git a/lib/mediawiki.DOMUtils.js b/lib/mediawiki.DOMUtils.js
index 28b78d4..1133e04 100644
--- a/lib/mediawiki.DOMUtils.js
+++ b/lib/mediawiki.DOMUtils.js
@@ -1539,16 +1539,23 @@
 */
getWrapperTokens: function ( nodes ) {
 
-   function makeWrapperForNode ( node ) {
-   var workNode;
-   if (DU.isElt(node) && node.childNodes.length) {
-   // Create a copy of the node without children
+   function makeWrapperForNode (node, needsBlockWrapper) {
+   var workNode, wrapperName;
+   if (needsBlockWrapper && !DU.isBlockNode(node)) {
+   wrapperName = 'DIV';
+   } else if (node.ndoeName === 'A') {
// Do not use 'A' as a wrapper node because it 
could
// end up getting nested inside another 'A' and 
the DOM
// structure can change where the wrapper 
tokens are no
// longer siblings.
// Ex: "[http://foo.com Bad nesting [[Here]]].
-   var wrapperName = (node.nodeName === 'A') ? 
'SPAN' : node.nodeName;
+   wrapperName = 'SPAN';
+   } else {
+   wrapperName = node.nodeName;
+   }
+
+   if (DU.isElt(node) && node.childNodes.length || 
wrapperName !== node.nodeName) {
+   // Create a copy of the node without children
workNode = 
node.ownerDocument.createElement(wrapperName);
// copy over attributes
for (var i = 0; i < node.attributes.length; 
i++) {
@@ -1563,44 +1570,50 @@
} else {
workNode = node;
}
+
var res = [];
// Now convert our node to tokens
DU.convertDOMtoTokens(res, workNode);
return res;
}
 
-   // XXX: not sure if we have to care about nested block-levels, 
as
-   // those that would break up higher-level inline elements would 
have
-   // broken things up already when building the DOM for the first 
time.
-   //var hasBlockElement = false;
-   //for (var i = 0; i < nodes.length; i++) {
-   //  if (DU.hasBlockElementDescendant(nodes[i])) {
-   //  hasBlockElement = true;
-   //  break;
-   //  }
-   //}
-
- 

[MediaWiki-commits] [Gerrit] Randomize the JobRunner slave lags checks a bit - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Randomize the JobRunner slave lags checks a bit
..


Randomize the JobRunner slave lags checks a bit

Change-Id: Iee777426776c12051761d29c90da80cea27619b1
---
M includes/jobqueue/JobRunner.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 8ccceda..cfcd466 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -87,8 +87,10 @@
$jobsRun = 0;
$timeMsTotal = 0;
$flags = JobQueueGroup::USE_CACHE;
+   $checkPeriod = 5.0; // seconds
+   $checkPhase = mt_rand( 0, 1000 * $checkPeriod ) / 1000; // 
avoid stampedes
$startTime = microtime( true ); // time since jobs started 
running
-   $lastTime = microtime( true ); // time since last slave check
+   $lastTime = microtime( true ) - $checkPhase; // time since last 
slave check
do {
// Sync the persistent backoffs with concurrent runners
$backoffs = $this->syncBackoffDeltas( $backoffs, 
$backoffDeltas, $wait );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee777426776c12051761d29c90da80cea27619b1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Calculate selected node on change and emit contextChange - change (VisualEditor/VisualEditor)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Calculate selected node on change and emit contextChange
..


Calculate selected node on change and emit contextChange

What we were calling 'selectedNodes' were actually the start and end
branch nodes. In addition to this we also care if the inner selected
node changes, so emit a contextChange for that, and in context check
that for a change before closing an inspector.

Bug: 71131
Change-Id: I1596bb98189f8233e5a36f96a119f6b052c59360
---
M src/dm/ve.dm.Surface.js
M src/ui/ve.ui.Context.js
2 files changed, 49 insertions(+), 25 deletions(-)

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



diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js
index b378a83..2fc4ccb 100644
--- a/src/dm/ve.dm.Surface.js
+++ b/src/dm/ve.dm.Surface.js
@@ -22,7 +22,8 @@
this.metaList = new ve.dm.MetaList( this );
this.selection = null;
this.selectionBefore = null;
-   this.selectedNodes = {};
+   this.branchNodes = {};
+   this.selectedNode = null;
this.newTransactions = [];
this.stagingStack = [];
this.undoStack = [];
@@ -524,7 +525,8 @@
  */
 ve.dm.Surface.prototype.setSelection = function ( selection ) {
var left, right, leftAnnotations, rightAnnotations, 
insertionAnnotations,
-   selectedNodes = {},
+   startNode, endNode, selectedNode,
+   branchNodes = {},
oldSelection = this.selection,
contextChange = false,
linearData = this.documentModel.data;
@@ -539,38 +541,44 @@
return;
}
 
-   // Detect if selected nodes changed
-   selectedNodes.start = selection ? this.documentModel.getNodeFromOffset( 
selection.start ) : null;
-   if ( selection && selection.getLength() ) {
-   selectedNodes.end = this.documentModel.getNodeFromOffset( 
selection.end );
-   }
-   if (
-   selectedNodes.start !== this.selectedNodes.start ||
-   selectedNodes.end !== this.selectedNodes.end
-   ) {
-   contextChange = true;
-   }
+   if ( selection ) {
+   // Update branch nodes
+   branchNodes.start = this.documentModel.getNodeFromOffset( 
selection.start );
+   if ( selection.getLength() ) {
+   branchNodes.end = this.documentModel.getNodeFromOffset( 
selection.end );
+   }
+   // Update selected node
+   if ( !selection.isCollapsed() ) {
+   startNode = 
this.documentModel.documentNode.getNodeFromOffset( selection.start + 1 );
+   if ( startNode ) {
+   endNode = 
this.documentModel.documentNode.getNodeFromOffset( selection.end - 1 );
+   if ( startNode === endNode ) {
+   selectedNode = startNode;
+   }
+   }
+   } else {
+   // Check if the range is inside a focusable node with a 
collapsed selection
+   startNode = 
this.documentModel.documentNode.getNodeFromOffset( selection.start );
+   if ( startNode ) {
+   selectedNode = startNode;
+   }
+   }
 
-   // Update state
-   this.selectedNodes = selectedNodes;
-   this.selection = selection;
-
-   if ( this.selection ) {
// Figure out which annotations to use for insertions
-   if ( this.selection.isCollapsed() ) {
+   if ( selection.isCollapsed() ) {
// Get annotations from either side of the cursor
-   left = Math.max( 0, this.selection.start - 1 );
+   left = Math.max( 0, selection.start - 1 );
if ( !linearData.isContentOffset( left ) ) {
left = -1;
}
-   right = Math.max( 0, this.selection.start );
+   right = Math.max( 0, selection.start );
if ( !linearData.isContentOffset( right ) ) {
right = -1;
}
} else {
// Get annotations from the first character of the 
selection
-   left = linearData.getNearestContentOffset( 
this.selection.start );
-   right = linearData.getNearestContentOffset( 
this.selection.end );
+   left = linearData.getNearestContentOffset( 
selection.start );
+   right = linearData.getNearestContentOffset( 
selection.end );
}
if ( left === -1 ) {
// No content offse

[MediaWiki-commits] [Gerrit] Fix LockedPage exception documentation - change (pywikibot/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix LockedPage exception documentation
..


Fix LockedPage exception documentation

The documentation for LockedPage places it in the
PageRelatedError part of the exception tree, when it belongs in
the PageSaveRelatedError part of the exception tree.

Change-Id: I6280a9a196a1e8ce6d3d0ba067258c9bc98742bc
---
M pywikibot/exceptions.py
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index 51880db..ed620e1 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -20,14 +20,14 @@
   - IsNotRedirectPage: Page is not a redirect page
   - CircularRedirect: Page is a circular redirect
   - SectionError: The section specified by # does not exist
-  - LockedPage: Page is locked
-  - LockedNoPage: Title is locked against creation
-  - CascadeLockedPage: Page is locked due to cascading protection
 
 PageSaveRelatedError: page exceptions within the save operation on a Page.
   (alias: PageNotSaved)
   - SpamfilterError: MediaWiki spam filter detected a blacklisted URL
   - OtherPageSaveError: misc. other save related exception.
+  - LockedPage: Page is locked
+  - LockedNoPage: Title is locked against creation
+  - CascadeLockedPage: Page is locked due to cascading protection
   - EditConflict: Edit conflict while uploading the page
   - PageDeletedConflict: Page was deleted since being retrieved
   - PageCreatedConflict: Page was created by another user

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6280a9a196a1e8ce6d3d0ba067258c9bc98742bc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Nullzero 
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 documentation in ve.Document - change (VisualEditor/VisualEditor)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix documentation in ve.Document
..


Fix documentation in ve.Document

Change-Id: I7660e86542b4df80252a1a3b3a2b523af99c1160
---
M src/ve.Document.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/ve.Document.js b/src/ve.Document.js
index 6244f65..44de9c8 100644
--- a/src/ve.Document.js
+++ b/src/ve.Document.js
@@ -11,7 +11,7 @@
  * @mixins OO.EventEmitter
  *
  * @constructor
- * @param {ve.Node} model Model to observe
+ * @param {ve.Node} documentNode Document node
  */
 ve.Document = function VeDocument( documentNode ) {
// Mixin constructors
@@ -53,7 +53,7 @@
  *   range is in a single node)
  * @returns {Array} List of objects describing nodes in the selection and the 
ranges therein:
  *
- * - `node`: Reference to a ve.dm.Node
+ * - `node`: Reference to a ve.Node
  * - `range`: ve.Range, missing if the entire node is covered
  * - `index`: Index of the node in its parent, missing if node has no parent
  * - `indexInNode`: If range is a zero-length range between two children of 
node,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7660e86542b4df80252a1a3b3a2b523af99c1160
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] grafana: correct the path to the document root - change (operations/puppet)

2014-09-23 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: grafana: correct the path to the document root
..


grafana: correct the path to the document root

It's ./dist, not ./src, and deployment rather than deploy.

Change-Id: I12101fb3df515d643b859acb3d89455ba2885493
---
M modules/grafana/templates/grafana.apache.erb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved
  Dzahn: Looks good to me, but someone else must approve



diff --git a/modules/grafana/templates/grafana.apache.erb 
b/modules/grafana/templates/grafana.apache.erb
index 2d892fc..4511d41 100644
--- a/modules/grafana/templates/grafana.apache.erb
+++ b/modules/grafana/templates/grafana.apache.erb
@@ -2,13 +2,13 @@
 # This file is managed by Puppet.
 >
   ServerName <%= @server_name %>
-  DocumentRoot /srv/deploy/grafana/grafana/src
+  DocumentRoot /srv/deployment/grafana/grafana/dist
 
   
 AllowOverride None
   
 
-  
+  
 AllowOverride None
 Order allow,deny
 allow from all

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12101fb3df515d643b859acb3d89455ba2885493
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Dzahn 
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] Syncronize VisualEditor: a5d8b63..02a8567 - change (mediawiki/extensions)

2014-09-23 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: a5d8b63..02a8567
..

Syncronize VisualEditor: a5d8b63..02a8567

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


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

diff --git a/VisualEditor b/VisualEditor
index a5d8b63..02a8567 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit a5d8b636eb499b2b5db013d0482d85dbed82d41e
+Subproject commit 02a85676b9c060ff2e84a28a1e64e04f17e1dfd0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I080d06e3792021f92a21fc494f323b425960801b
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] Syncronize VisualEditor: a5d8b63..02a8567 - change (mediawiki/extensions)

2014-09-23 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: a5d8b63..02a8567
..


Syncronize VisualEditor: a5d8b63..02a8567

Change-Id: I080d06e3792021f92a21fc494f323b425960801b
---
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 a5d8b63..02a8567 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit a5d8b636eb499b2b5db013d0482d85dbed82d41e
+Subproject commit 02a85676b9c060ff2e84a28a1e64e04f17e1dfd0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I080d06e3792021f92a21fc494f323b425960801b
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] Use LinkCache instead of an object in MWCategoryWidget to st... - change (mediawiki...VisualEditor)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use LinkCache instead of an object in MWCategoryWidget to store 
hidden status (to be shared with the input widget)
..


Use LinkCache instead of an object in MWCategoryWidget to store hidden status 
(to be shared with the input widget)

Change-Id: Icb62b9b27ea1d61097d059fa268cc4834d46fc9f
---
M modules/ve-mw/init/ve.init.mw.LinkCache.js
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
3 files changed, 45 insertions(+), 14 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.LinkCache.js 
b/modules/ve-mw/init/ve.init.mw.LinkCache.js
index 364ca6b..07bba48 100644
--- a/modules/ve-mw/init/ve.init.mw.LinkCache.js
+++ b/modules/ve-mw/init/ve.init.mw.LinkCache.js
@@ -52,6 +52,26 @@
};
 
/**
+* Look up data about a page in the cache. If the data about this page 
is already in the cache,
+* this returns that data. Otherwise, it returns undefined.
+*
+* @param {string} name Normalized page title
+* @returns {Object} Cache data for this name.
+*/
+   ve.init.mw.LinkCache.prototype.getCached = function ( name ) {
+   var res;
+   if (
+   Object.prototype.hasOwnProperty.call( this.cache, name 
) &&
+   this.cache[name].state() === 'resolved'
+   ) {
+   this.cache[name].done( function ( data ) {
+   res = data;
+   } );
+   return res;
+   }
+   };
+
+   /**
 * Add entries to the cache.
 * @param {Object} entries Object keyed by page title, with the values 
being data objects
 * @fires add
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
index 14af21b..623664f 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
@@ -69,13 +69,15 @@
  * @param {Mixed} data Response from server
  */
 ve.ui.MWCategoryInputWidget.prototype.getLookupCacheItemFromData = function ( 
data ) {
-   var result = [];
+   var result = [], linkCacheUpdate = {};
data.query = data.query || {};
 
$.each( data.query.allcategories || [], function ( index, category ) {
result.push( category['*'] );
-   this.categoryWidget.categoryHiddenStatus[category['*']] = 
category.hasOwnProperty( 'hidden' );
+   linkCacheUpdate['Category:' + category['*']] = { missing: 
false, hidden: category.hasOwnProperty( 'hidden' ) };
}.bind( this ) );
+
+   ve.init.platform.linkCache.set( linkCacheUpdate );
 
return result;
 };
@@ -91,7 +93,6 @@
itemWidgets = [],
existingCategoryItems = [], matchingCategoryItems = [],
hiddenCategoryItems = [], newCategoryItems = [],
-   category = this.getCategoryItemFromValue( this.value ),
existingCategories = this.categoryWidget.getCategories(),
linkCacheUpdate = {},
canonicalQueryValue = mw.Title.newFromText( this.value );
@@ -101,12 +102,18 @@
} // Invalid titles just end up with canonicalQueryValue being null.
 
$.each( data, function ( index, suggestedCategory ) {
+   var suggestedCacheEntry = ve.init.platform.linkCache.getCached( 
'Category:' + suggestedCategory );
if ( canonicalQueryValue === suggestedCategory ) {
exactMatch = true;
}
-   linkCacheUpdate['Category:' + suggestedCategory] = { missing: 
false };
-   if ( ve.indexOf( suggestedCategory, existingCategories ) === -1 
&& suggestedCategory.lastIndexOf( canonicalQueryValue, 0 ) === 0 ) {
-   if ( 
this.categoryWidget.categoryHiddenStatus[suggestedCategory] ) {
+   if ( !suggestedCacheEntry ) {
+   linkCacheUpdate['Category:' + suggestedCategory] = { 
missing: false };
+   }
+   if (
+   ve.indexOf( suggestedCategory, existingCategories ) === 
-1 &&
+   suggestedCategory.lastIndexOf( canonicalQueryValue, 0 ) 
=== 0
+   ) {
+   if ( suggestedCacheEntry && suggestedCacheEntry.hidden 
) {
hiddenCategoryItems.push( suggestedCategory );
} else {
matchingCategoryItems.push( suggestedCategory );
@@ -128,7 +135,7 @@
// New category
if ( !exactMatch ) {
newCategoryItems.push( canonicalQueryValue );
-   linkCacheUp

[MediaWiki-commits] [Gerrit] Slave lag check tweaks to JobRunner - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Slave lag check tweaks to JobRunner
..


Slave lag check tweaks to JobRunner

* Do not block forever, but wait up to 10 seconds. Likewise,
  check the lag times in memcached on startup. This at least
  lets runners avoid lagged wikis but still work on others.
* Made a few small related documentation and code cleanups.

Change-Id: Ic1339bab54cba6b6cbea7d97a80ff87c7c5c87af
---
M includes/GlobalFunctions.php
M includes/db/LoadBalancer.php
M includes/db/LoadMonitor.php
M includes/jobqueue/JobRunner.php
4 files changed, 27 insertions(+), 7 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Springle: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 490df24..3306acd 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3761,11 +3761,18 @@
  * @param float|null $ifWritesSince Only wait if writes were done since this 
UNIX timestamp
  * @param string|bool $wiki Wiki identifier accepted by wfGetLB
  * @param string|bool $cluster Cluster name accepted by LBFactory. Default: 
false.
+ * @param int|null $timeout Max wait time. Default: 1 day (cli), ~10 seconds 
(web)
  * @return bool Success (able to connect and no timeouts reached)
  */
-function wfWaitForSlaves( $ifWritesSince = false, $wiki = false, $cluster = 
false ) {
+function wfWaitForSlaves(
+   $ifWritesSince = null, $wiki = false, $cluster = false, $timeout = null
+) {
// B/C: first argument used to be "max seconds of lag"; ignore such 
values
-   $ifWritesSince = ( $ifWritesSince > 1e9 ) ? $ifWritesSince : false;
+   $ifWritesSince = ( $ifWritesSince > 1e9 ) ? $ifWritesSince : null;
+
+   if ( $timeout === null ) {
+   $timeout = ( PHP_SAPI === 'cli' ) ? 86400 : 10;
+   }
 
if ( $cluster !== false ) {
$lb = wfGetLBFactory()->getExternalLB( $cluster );
@@ -3787,7 +3794,7 @@
// The DBMS may not support getMasterPos() or the whole
// load balancer might be fake (e.g. $wgAllDBsAreLocalhost).
if ( $pos !== false ) {
-   return $lb->waitForAll( $pos, PHP_SAPI === 'cli' ? 
86400 : null );
+   return $lb->waitForAll( $pos, $timeout );
}
}
 
diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index e517a02..f79fde0 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -1128,7 +1128,7 @@
 * Results are cached for a short time in memcached, and indefinitely 
in the process cache
 *
 * @param string|bool $wiki
-* @return array
+* @return array Map of (server index => seconds)
 */
function getLagTimes( $wiki = false ) {
# Try process cache
diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php
index 7281485..b694a6f 100644
--- a/includes/db/LoadMonitor.php
+++ b/includes/db/LoadMonitor.php
@@ -48,7 +48,7 @@
 * @param array $serverIndexes
 * @param string $wiki
 *
-* @return array
+* @return array Map of (server index => seconds)
 */
public function getLagTimes( $serverIndexes, $wiki );
 }
diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 8ccceda..a256c43 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -76,6 +76,14 @@
$this->runJobsLog( "Executed $count periodic queue 
task(s)." );
}
 
+   // Bail out if there is too much DB lag
+   // @note: getLagTimes() has better caching than getMaxLag()
+   $maxLag = max( wfGetLBFactory()->getMainLB( wfWikiID() 
)->getLagTimes() );
+   if ( $maxLag >= 5 ) {
+   $response['reached'] = 'slave-lag-limit';
+   return $response;
+   }
+
// Flush any pending DB writes for sanity
wfGetLBFactory()->commitMasterChanges();
 
@@ -172,10 +180,15 @@
break;
}
 
-   // Don't let any of the main DB slaves get 
backed up
+   // Don't let any of the main DB slaves get 
backed up.
+   // This only waits for so long before exiting 
and letting
+   // other wikis in the farm (on different 
masters) get a chance.
$timePassed = microtime( true ) - $lastTime;
if ( $timePassed >= 5 || $timePassed < 0 ) {
-   wfWaitForSlaves( $lastTime );
+   if ( !wfWaitForS

[MediaWiki-commits] [Gerrit] grafana: correct the path to the document root - change (operations/puppet)

2014-09-23 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: grafana: correct the path to the document root
..

grafana: correct the path to the document root

It's ./dist, not ./src.

Change-Id: I12101fb3df515d643b859acb3d89455ba2885493
---
M modules/grafana/templates/grafana.apache.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/162523/1

diff --git a/modules/grafana/templates/grafana.apache.erb 
b/modules/grafana/templates/grafana.apache.erb
index 2d892fc..d285957 100644
--- a/modules/grafana/templates/grafana.apache.erb
+++ b/modules/grafana/templates/grafana.apache.erb
@@ -2,13 +2,13 @@
 # This file is managed by Puppet.
 >
   ServerName <%= @server_name %>
-  DocumentRoot /srv/deploy/grafana/grafana/src
+  DocumentRoot /srv/deployment/grafana/grafana/dist
 
   
 AllowOverride None
   
 
-  
+  
 AllowOverride None
 Order allow,deny
 allow from all

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12101fb3df515d643b859acb3d89455ba2885493
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] Move deletion part of handleDelete logic to surface fragment - change (VisualEditor/VisualEditor)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Move deletion part of handleDelete logic to surface fragment
..


Move deletion part of handleDelete logic to surface fragment

Bonus: Add range overriding via update method so we don't
have to call change([], range).

Change-Id: Id7c291b0fb9b7e517253d8b85b334a8be65756e1
---
M src/ce/ve.ce.Surface.js
M src/dm/ve.dm.SurfaceFragment.js
M tests/ce/ve.ce.Surface.test.js
M tests/dm/ve.dm.SurfaceFragment.test.js
4 files changed, 209 insertions(+), 115 deletions(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 5f132fd..1bbaf38 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -922,12 +922,12 @@
break;
case OO.ui.Keys.BACKSPACE:
e.preventDefault();
-   this.handleDelete( e, -1 );
+   this.handleDelete( e );
updateFromModel = true;
break;
case OO.ui.Keys.DELETE:
e.preventDefault();
-   this.handleDelete( e, 1 );
+   this.handleDelete( e );
updateFromModel = true;
break;
default:
@@ -1010,7 +1010,7 @@
 ve.ce.Surface.prototype.onCut = function ( e ) {
this.onCopy( e );
setTimeout( ve.bind( function () {
-   this.handleDelete( e, 0 );
+   this.getModel().getFragment().delete().select();
}, this ) );
 };
 
@@ -2115,7 +2115,7 @@
if ( this.hasSlugAtOffset( selection.from ) ) {
insertEmptyParagraph = true;
} else {
-   prevContentOffset = 
this.documentView.model.data.getNearestContentOffset(
+   prevContentOffset = 
documentModel.data.getNearestContentOffset(
cursor,
-1
);
@@ -2234,27 +2234,20 @@
  *
  * @method
  * @param {jQuery.Event} e Delete key down event
- * @param {number} direction Direction to delete in: 1, -1 or 0 for 
direction-less cut
  */
-ve.ce.Surface.prototype.handleDelete = function ( e, direction ) {
-   var rangeAfterRemove, internalListRange,
+ve.ce.Surface.prototype.handleDelete = function ( e ) {
+   var docLength, startNode,
+   direction = e.keyCode === OO.ui.Keys.DELETE ? 1 : -1,
+   unit = ( e.altKey === true || e.ctrlKey === true ) ? 'word' : 
'character',
offset = 0,
-   model = this.getModel(),
-   documentModel = model.getDocument(),
-   documentView = this.getDocument(),
-   data = documentModel.data,
-   rangeToRemove = model.getSelection(),
-   docLength, tx, startNode, endNode, endNodeData, nodeToDelete;
+   rangeToRemove = this.getModel().getSelection(),
+   documentModel = this.getModel().getDocument(),
+   data = documentModel.data;
 
-   if ( direction && rangeToRemove.isCollapsed() ) {
+   if ( rangeToRemove.isCollapsed() ) {
// In case when the range is collapsed use the same logic that 
is used for cursor left and
// right movement in order to figure out range to remove.
-   rangeToRemove = documentModel.getRelativeRange(
-   rangeToRemove,
-   direction,
-   ( e.altKey === true || e.ctrlKey === true ) ? 'word' : 
'character',
-   true
-   );
+   rangeToRemove = documentModel.getRelativeRange( rangeToRemove, 
direction, unit, true );
offset = rangeToRemove.start;
docLength = data.getLength();
if ( offset < docLength ) {
@@ -2265,7 +2258,7 @@
// just select the node and cancel the deletion.
startNode = 
documentModel.getDocumentNode().getNodeFromOffset( offset + 1 );
if ( startNode.isFocusable() ) {
-   model.setSelection( startNode.getOuterRange() );
+   this.getModel().setSelection( 
startNode.getOuterRange() );
return;
}
}
@@ -2274,79 +2267,11 @@
return;
}
}
-   // If selection spans entire document (e.g. CTRL+A in Firefox) then
-   // replace with an empty paragraph
-   internalListRange = 
documentModel.getInternalList().getListNode().getOuterRange();
-   if ( rangeToRemove.start === 0 && rangeToRemove.end >= 
internalListRange.start ) {
-   tx = ve.dm.Transaction.newFromRepla

[MediaWiki-commits] [Gerrit] Remove old i18n fallback. We don't support anything below 1.... - change (mediawiki...CirrusSearch)

2014-09-23 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Remove old i18n fallback. We don't support anything below 1.23 
anyway
..

Remove old i18n fallback. We don't support anything below 1.23 anyway

Change-Id: I90ad7b3ab993614105ee331e9664aceccf2edd77
---
D CirrusSearch.i18n.php
1 file changed, 0 insertions(+), 35 deletions(-)


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

diff --git a/CirrusSearch.i18n.php b/CirrusSearch.i18n.php
deleted file mode 100644
index 381f4c9..000
--- a/CirrusSearch.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim34282e8de801767e' ) ) {
-   function wfJsonI18nShim34282e8de801767e( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim34282e8de801767e';
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90ad7b3ab993614105ee331e9664aceccf2edd77
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
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] [BREAKING CHANGE] Remove ve.isArray and use Array.isArray in... - change (VisualEditor/VisualEditor)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [BREAKING CHANGE] Remove ve.isArray and use Array.isArray 
instead
..


[BREAKING CHANGE] Remove ve.isArray and use Array.isArray instead

Change-Id: I8069997548a3426cf3e71a6e87ec90716323e502
---
M src/ce/nodes/ve.ce.TextNode.js
M src/ce/ve.ce.ContentBranchNode.js
M src/dm/lineardata/ve.dm.ElementLinearData.js
M src/dm/ve.dm.BranchNode.js
M src/dm/ve.dm.Converter.js
M src/dm/ve.dm.Document.js
M src/dm/ve.dm.IndexValueStore.js
M src/dm/ve.dm.MetaList.js
M src/dm/ve.dm.Model.js
M src/dm/ve.dm.NodeFactory.js
M src/dm/ve.dm.SurfaceFragment.js
M src/ui/ve.ui.DebugBar.js
M src/ui/ve.ui.Surface.js
M src/ui/ve.ui.TriggerRegistry.js
M src/ve.BranchNode.js
M src/ve.EventSequencer.js
M src/ve.js
M tests/dm/ve.dm.MetaList.test.js
M tests/dm/ve.dm.Transaction.test.js
M tests/dm/ve.dm.example.js
M tests/ve.test.js
21 files changed, 40 insertions(+), 49 deletions(-)

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



diff --git a/src/ce/nodes/ve.ce.TextNode.js b/src/ce/nodes/ve.ce.TextNode.js
index fe8647c..c247ffc 100644
--- a/src/ce/nodes/ve.ce.TextNode.js
+++ b/src/ce/nodes/ve.ce.TextNode.js
@@ -48,7 +48,7 @@
significantWhitespace = 
this.getModel().getParent().hasSignificantWhitespace();
 
function setChar( chr, index, data ) {
-   if ( ve.isArray( data[index] ) ) {
+   if ( Array.isArray( data[index] ) ) {
// Don't modify the original array, clone it first
data[index] = data[index].slice( 0 );
data[index][0] = chr;
@@ -58,7 +58,7 @@
}
 
function getChar( index, data ) {
-   if ( ve.isArray( data[index] ) ) {
+   if ( Array.isArray( data[index] ) ) {
return data[index][0];
} else {
return data[index];
diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index 9357ca6..229fda4 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -160,7 +160,7 @@
 
// Render HTML with annotations
for ( i = 0, ilen = annotatedHtml.length; i < ilen; i++ ) {
-   if ( ve.isArray( annotatedHtml[i] ) ) {
+   if ( Array.isArray( annotatedHtml[i] ) ) {
item = annotatedHtml[i][0];
itemAnnotations = new ve.dm.AnnotationSet( store, 
annotatedHtml[i][1] );
} else {
diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js 
b/src/dm/lineardata/ve.dm.ElementLinearData.js
index 20c6369..88f9821 100644
--- a/src/dm/lineardata/ve.dm.ElementLinearData.js
+++ b/src/dm/lineardata/ve.dm.ElementLinearData.js
@@ -39,10 +39,10 @@
 
var aPlain = a, bPlain = b;
 
-   if ( ve.isArray( a ) ) {
+   if ( Array.isArray( a ) ) {
aPlain = a[0];
}
-   if ( ve.isArray( b ) ) {
+   if ( Array.isArray( b ) ) {
bPlain = b[0];
}
if ( a && a.type ) {
@@ -95,7 +95,7 @@
// |a|
( typeof left === 'string' || typeof right === 'string' 
) ||
// Same checks but for annotated characters - isArray 
is slower, try it next
-   ( ve.isArray( left ) || ve.isArray( right ) ) ||
+   ( Array.isArray( left ) || Array.isArray( right ) ) ||
// The most expensive test are last, these deal with 
elements
(
// Right of a leaf
@@ -361,7 +361,7 @@
 /** */
 ve.dm.ElementLinearData.prototype.getCharacterData = function ( offset ) {
var item = this.getData( offset );
-   return ve.isArray( item ) ? item[0] : item;
+   return Array.isArray( item ) ? item[0] : item;
 };
 
 /**
diff --git a/src/dm/ve.dm.BranchNode.js b/src/dm/ve.dm.BranchNode.js
index 1867390..fe3f8eb 100644
--- a/src/dm/ve.dm.BranchNode.js
+++ b/src/dm/ve.dm.BranchNode.js
@@ -28,7 +28,7 @@
this.slugPositions = {};
 
// TODO: children is only ever used in tests
-   if ( ve.isArray( children ) && children.length ) {
+   if ( Array.isArray( children ) && children.length ) {
this.splice.apply( this, [0, 0].concat( children ) );
}
 };
diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index e7919b1..4a173ba 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -348,7 +348,7 @@
  */
 ve.dm.Converter.prototype.getDomElementsFromDataElement = function ( 
dataElements, doc, childDomElements ) {
var domElements,
-   dataElement = ve.isArray( dataElements ) ? dataElements[0] : 
dataElements,
+   dataElement = Array.isArray( dataElements ) ? dataElements[0] : 
dataElements,
nodeCla

[MediaWiki-commits] [Gerrit] Convert i18n to json - change (mediawiki...Splash)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert i18n to json
..


Convert i18n to json

Change-Id: I9a13ce4854cbd8269554d7c983e722fc650d9e65
---
M Splash.i18n.php
M Splash.php
A i18n/en.json
A i18n/qqq.json
4 files changed, 48 insertions(+), 13 deletions(-)

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



diff --git a/Splash.i18n.php b/Splash.i18n.php
index 8cd9da5..db0c1c0 100755
--- a/Splash.i18n.php
+++ b/Splash.i18n.php
@@ -1,20 +1,35 @@
 https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
  *
- * @file
+ * Beginning with MediaWiki 1.23, translation strings are stored in json files,
+ * and the EXTENSION.i18n.php file only exists to provide compatibility with
+ * older releases of MediaWiki. For more information about this migration, see:
+ * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
+ *
+ * This shim maintains compatibility back to MediaWiki 1.17.
  */
-
 $messages = array();
+if ( !function_exists( 'wfJsonI18nShim417fe3896a9cdc6b' ) ) {
+   function wfJsonI18nShim417fe3896a9cdc6b( $cache, $code, &$cachedData ) {
+   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   foreach ( $codeSequence as $csCode ) {
+   $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
+   if ( is_readable( $fileName ) ) {
+   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
+   foreach ( array_keys( $data ) as $key ) {
+   if ( $key === '' || $key[0] === '@' ) {
+   unset( $data[$key] );
+   }
+   }
+   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
+   }
 
-/** English */
-$messages['en'] = array(
-   'splash-skin-desc' => 'Splash skin for MediaWiki, as designed for 
zaori.org',
-   'site-banner' => '{{SITENAME}}',
-);
+   $cachedData['deps'][] = new FileDependency( $fileName );
+   }
+   return true;
+   }
 
-/** Message documentation (Message documentation) */
-$messages['qqq'] = array(
-   'splash-skin-desc' => '{{desc|name=Splash}}',
-   'site-banner' => 'Used as the banner text for the site',
-);
+   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim417fe3896a9cdc6b';
+}
diff --git a/Splash.php b/Splash.php
index fcaac56..ad212f6 100755
--- a/Splash.php
+++ b/Splash.php
@@ -51,6 +51,7 @@
 $wgValidSkinNames[strtolower( $skinID )] = 'Splash';
 
 $wgAutoloadClasses['SkinSplash'] = $dir . 'Splash.skin.php';
+$wgMessagesDirs['SkinSplash'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['SkinSplash'] = $dir . 'Splash.i18n.php';
 $wgResourceModules['skins.splash'] = array(
'styles' => array(
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100755
index 000..b4cc60c
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,9 @@
+{
+   "@metadata": {
+   "authors": [
+   "Isarra"
+   ]
+   },
+   "splash-skin-desc": "Splash skin for MediaWiki, as designed for 
zaori.org",
+   "site-banner": "{{SITENAME}}"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100755
index 000..c9370b5
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,10 @@
+{
+   "@metadata": {
+   "authors": [
+
+   "Isarra"
+   ]
+   },
+   "splash-skin-desc": "{{desc|name=Splash}}",
+   "site-banner": "Used as the banner text for the site"
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a13ce4854cbd8269554d7c983e722fc650d9e65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Splash
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Replace use of ve.isArray with native Array.isArray - change (mediawiki...VisualEditor)

2014-09-23 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Replace use of ve.isArray with native Array.isArray
..

Replace use of ve.isArray with native Array.isArray

Change-Id: Ibc45e0fd80db7da872f6ef934cef915be9366e06
---
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
index 85d3073..bb7b2bb 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
@@ -49,7 +49,7 @@
if ( data.description !== null ) {
this.description = data.description;
}
-   if ( ve.isArray( data.paramOrder ) ) {
+   if ( Array.isArray( data.paramOrder ) ) {
this.paramOrder = data.paramOrder.slice();
}
if ( ve.isPlainObject( data.params ) ) {
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index ed445ed..f56120c 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -97,7 +97,7 @@
data = { parts: [ { template: data } ] };
}
 
-   if ( ve.isArray( data.parts ) ) {
+   if ( Array.isArray( data.parts ) ) {
for ( i = 0, len = data.parts.length; i < len; i++ ) {
part = data.parts[i];
if ( part.template ) {
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 8710f6e..7ab993a 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -822,7 +822,7 @@
tools = JSON.parse( mw.message( 
'visualeditor-cite-tool-definition.json' ).plain() );
} catch ( e ) { }
 
-   if ( ve.isArray( tools ) ) {
+   if ( Array.isArray( tools ) ) {
for ( i = 0, len = Math.min( limit, tools.length ); i < len; 
i++ ) {
item = tools[i];
data = { template: item.template };

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

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

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


[MediaWiki-commits] [Gerrit] Remove live-1.5 and skins-1.5 - change (operations/mediawiki-config)

2014-09-23 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Remove live-1.5 and skins-1.5
..

Remove live-1.5 and skins-1.5

Being 9 years old and deprecated, these serve no real purpose,
especially since skins restructurization should have broken most of
remaining links to skin resources.

Change-Id: Ic9a06af25ba698d3324ded1b64130900af9d19e9
---
D live-1.5
D w/skins-1.5
2 files changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/live-1.5 b/live-1.5
deleted file mode 12
index 6bf0c97..000
--- a/live-1.5
+++ /dev/null
@@ -1 +0,0 @@
-w
\ No newline at end of file
diff --git a/w/skins-1.5 b/w/skins-1.5
deleted file mode 12
index a1c467f..000
--- a/w/skins-1.5
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php/skins
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Convert i18n to json - change (mediawiki...Splash)

2014-09-23 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

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

Change subject: Convert i18n to json
..

Convert i18n to json

Change-Id: I9a13ce4854cbd8269554d7c983e722fc650d9e65
---
M Splash.i18n.php
M Splash.php
A i18n/en.json
A i18n/qqq.json
4 files changed, 48 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Splash 
refs/changes/19/162519/1

diff --git a/Splash.i18n.php b/Splash.i18n.php
index 8cd9da5..db0c1c0 100755
--- a/Splash.i18n.php
+++ b/Splash.i18n.php
@@ -1,20 +1,35 @@
 https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
  *
- * @file
+ * Beginning with MediaWiki 1.23, translation strings are stored in json files,
+ * and the EXTENSION.i18n.php file only exists to provide compatibility with
+ * older releases of MediaWiki. For more information about this migration, see:
+ * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
+ *
+ * This shim maintains compatibility back to MediaWiki 1.17.
  */
-
 $messages = array();
+if ( !function_exists( 'wfJsonI18nShim417fe3896a9cdc6b' ) ) {
+   function wfJsonI18nShim417fe3896a9cdc6b( $cache, $code, &$cachedData ) {
+   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   foreach ( $codeSequence as $csCode ) {
+   $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
+   if ( is_readable( $fileName ) ) {
+   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
+   foreach ( array_keys( $data ) as $key ) {
+   if ( $key === '' || $key[0] === '@' ) {
+   unset( $data[$key] );
+   }
+   }
+   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
+   }
 
-/** English */
-$messages['en'] = array(
-   'splash-skin-desc' => 'Splash skin for MediaWiki, as designed for 
zaori.org',
-   'site-banner' => '{{SITENAME}}',
-);
+   $cachedData['deps'][] = new FileDependency( $fileName );
+   }
+   return true;
+   }
 
-/** Message documentation (Message documentation) */
-$messages['qqq'] = array(
-   'splash-skin-desc' => '{{desc|name=Splash}}',
-   'site-banner' => 'Used as the banner text for the site',
-);
+   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim417fe3896a9cdc6b';
+}
diff --git a/Splash.php b/Splash.php
index fcaac56..ad212f6 100755
--- a/Splash.php
+++ b/Splash.php
@@ -51,6 +51,7 @@
 $wgValidSkinNames[strtolower( $skinID )] = 'Splash';
 
 $wgAutoloadClasses['SkinSplash'] = $dir . 'Splash.skin.php';
+$wgMessagesDirs['SkinSplash'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['SkinSplash'] = $dir . 'Splash.i18n.php';
 $wgResourceModules['skins.splash'] = array(
'styles' => array(
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100755
index 000..b4cc60c
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,9 @@
+{
+   "@metadata": {
+   "authors": [
+   "Isarra"
+   ]
+   },
+   "splash-skin-desc": "Splash skin for MediaWiki, as designed for 
zaori.org",
+   "site-banner": "{{SITENAME}}"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100755
index 000..c9370b5
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,10 @@
+{
+   "@metadata": {
+   "authors": [
+
+   "Isarra"
+   ]
+   },
+   "splash-skin-desc": "{{desc|name=Splash}}",
+   "site-banner": "Used as the banner text for the site"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a13ce4854cbd8269554d7c983e722fc650d9e65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Splash
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] Special:BookSources: Use getConfig instead of Global - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:BookSources: Use getConfig instead of Global
..


Special:BookSources: Use getConfig instead of Global

follow up to I00c4a00d4a2aeb7f6b39ede6fca1725991b68d7c

Change-Id: Ice8ec212e5a5fbb0e34ad02f4fffdcc4ce1424fc
---
M includes/specials/SpecialBooksources.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 0a92768..e6750e1 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -117,8 +117,6 @@
 * @return string
 */
private function makeForm() {
-   global $wgUseMediaWikiUIEverywhere;
-
$form = Html::openElement( 'fieldset' ) . "\n";
$form .= Html::element(
'legend',
@@ -136,7 +134,7 @@
array( 'autofocus' => true, 'class' => 
'mw-ui-input-inline' )
);
 
-   if ( $wgUseMediaWikiUIEverywhere ) {
+   if ( $this->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
$form .= ' ' . Xml::submitButton(
$this->msg( 'booksources-search' )->text(),
array( 'class' => 'mw-ui-button 
mw-ui-progressive' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice8ec212e5a5fbb0e34ad02f4fffdcc4ce1424fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
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] Fixed bug in BloomCacheRedis::getConnection - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixed bug in BloomCacheRedis::getConnection
..


Fixed bug in BloomCacheRedis::getConnection

* The array keys need to be re-indexed to avoid picking a deleted one

Change-Id: I3c22674a0194597598d66179bb5e3625da1dd38c
---
M includes/cache/bloom/BloomCacheRedis.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/cache/bloom/BloomCacheRedis.php 
b/includes/cache/bloom/BloomCacheRedis.php
index 212e5e8..583556f 100644
--- a/includes/cache/bloom/BloomCacheRedis.php
+++ b/includes/cache/bloom/BloomCacheRedis.php
@@ -328,7 +328,7 @@
}
 
/**
-* $param string $to (master/slave)
+* @param string $to (master/slave)
 * @return RedisConnRef|bool Returns false on failure
 */
protected function getConnection( $to ) {
@@ -354,6 +354,7 @@
return $conn;
}
unset( $servers[$index] ); // skip next time
+   $servers = array_values( $servers ); // reindex
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c22674a0194597598d66179bb5e3625da1dd38c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] Use inline-block rather than floating - change (mediawiki...MobileFrontend)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use inline-block rather than floating
..


Use inline-block rather than floating

Floating can cause two galleries side by side to render strangely
and can also cause issues where one photo in a gallery is on its
own and not centered.

Change-Id: Ib2aecaa8db28784bbe867a17f3706b99676cce41
---
M less/content/main.less
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/less/content/main.less b/less/content/main.less
index 78e7fc3..2c17055 100644
--- a/less/content/main.less
+++ b/less/content/main.less
@@ -255,8 +255,8 @@
max-width: 100%;
 
.gallerybox {
-   display: block;
-   float: left;
+   display: inline-block;
+   vertical-align: top;
max-width: 100%;
 
.thumb {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2aecaa8db28784bbe867a17f3706b99676cce41
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Special:BookSources: Use getConfig instead of Global - change (mediawiki/core)

2014-09-23 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Special:BookSources: Use getConfig instead of Global
..

Special:BookSources: Use getConfig instead of Global

follow up to I00c4a00d4a2aeb7f6b39ede6fca1725991b68d7c

Change-Id: Ice8ec212e5a5fbb0e34ad02f4fffdcc4ce1424fc
---
M includes/specials/SpecialBooksources.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/162518/1

diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 0a92768..e6750e1 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -117,8 +117,6 @@
 * @return string
 */
private function makeForm() {
-   global $wgUseMediaWikiUIEverywhere;
-
$form = Html::openElement( 'fieldset' ) . "\n";
$form .= Html::element(
'legend',
@@ -136,7 +134,7 @@
array( 'autofocus' => true, 'class' => 
'mw-ui-input-inline' )
);
 
-   if ( $wgUseMediaWikiUIEverywhere ) {
+   if ( $this->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
$form .= ' ' . Xml::submitButton(
$this->msg( 'booksources-search' )->text(),
array( 'class' => 'mw-ui-button 
mw-ui-progressive' )

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

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

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


[MediaWiki-commits] [Gerrit] Fixed bug in BloomCacheRedis::getConnection - change (mediawiki/core)

2014-09-23 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Fixed bug in BloomCacheRedis::getConnection
..

Fixed bug in BloomCacheRedis::getConnection

* The array keys need to be re-indexed to avoid picking a deleted one

Change-Id: I3c22674a0194597598d66179bb5e3625da1dd38c
---
M includes/cache/bloom/BloomCacheRedis.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/162516/1

diff --git a/includes/cache/bloom/BloomCacheRedis.php 
b/includes/cache/bloom/BloomCacheRedis.php
index 212e5e8..583556f 100644
--- a/includes/cache/bloom/BloomCacheRedis.php
+++ b/includes/cache/bloom/BloomCacheRedis.php
@@ -328,7 +328,7 @@
}
 
/**
-* $param string $to (master/slave)
+* @param string $to (master/slave)
 * @return RedisConnRef|bool Returns false on failure
 */
protected function getConnection( $to ) {
@@ -354,6 +354,7 @@
return $conn;
}
unset( $servers[$index] ); // skip next time
+   $servers = array_values( $servers ); // reindex
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c22674a0194597598d66179bb5e3625da1dd38c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Detect retina displays and load the image in the correct size. - change (mediawiki...MobileFrontend)

2014-09-23 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Detect retina displays and load the image in the correct size.
..

Detect retina displays and load the image in the correct size.

https://trello.com/c/4meh4lhV/45-2-detect-retina-display-support-for-mobile-picture-shower

Change-Id: Ie36ef975064fbcd43ec3320d9d78028d9d8d6e17
---
M javascripts/modules/mediaViewer/ImageApi.js
1 file changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/javascripts/modules/mediaViewer/ImageApi.js 
b/javascripts/modules/mediaViewer/ImageApi.js
index 7a6ad32..5d079a9 100644
--- a/javascripts/modules/mediaViewer/ImageApi.js
+++ b/javascripts/modules/mediaViewer/ImageApi.js
@@ -25,7 +25,8 @@
},
 
getThumb: function( title ) {
-   var result = this._cache[title];
+   var result = this._cache[title],
+   imageSizeMultiplier = (window.devicePixelRatio 
&& window.devicePixelRatio > 1) ? window.devicePixelRatio : 1;
 
if ( !result ) {
this._cache[title] = result = $.Deferred();
@@ -35,10 +36,10 @@
prop: 'imageinfo',
titles: title,
iiprop: ['url', 'extmetadata'],
-   // request an image two times bigger 
than the reported screen size
+   // request an image devicePxielRatio 
times bigger than the reported screen size
// for retina displays and zooming
-   iiurlwidth: findSizeBucket( $( window 
).width() * 2 ),
-   iiurlheight: findSizeBucket( $( window 
).height() * 2 )
+   iiurlwidth: findSizeBucket( $( window 
).width() * imageSizeMultiplier ),
+   iiurlheight: findSizeBucket( $( window 
).height() * imageSizeMultiplier )
} ).done( function( resp ) {
if ( resp.query && resp.query.pages ) {
// FIXME: API

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie36ef975064fbcd43ec3320d9d78028d9d8d6e17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 

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


[MediaWiki-commits] [Gerrit] Special:BookSources Add global - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:BookSources Add global
..


Special:BookSources Add global

Follow up to I00c4a00d4a2aeb7f6b39ede6fca1725991b68d7c

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

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



diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 8b4462a..0a92768 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -117,6 +117,8 @@
 * @return string
 */
private function makeForm() {
+   global $wgUseMediaWikiUIEverywhere;
+
$form = Html::openElement( 'fieldset' ) . "\n";
$form .= Html::element(
'legend',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d09d6b648ccd710c4e3147c0c2b33d6ecaca15a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] buttons: Update focus for quiet buttons - change (mediawiki/core)

2014-09-23 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: buttons: Update focus for quiet buttons
..

buttons: Update focus for quiet buttons

Bug: 62924
Change-Id: Ide6174c5da3a04b8e6c4370fbc191783e976f6ee
---
M resources/src/mediawiki.less/mediawiki.ui/mixins.less
1 file changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/162515/1

diff --git a/resources/src/mediawiki.less/mediawiki.ui/mixins.less 
b/resources/src/mediawiki.less/mediawiki.ui/mixins.less
index d3220cc..17fcc60 100644
--- a/resources/src/mediawiki.less/mediawiki.ui/mixins.less
+++ b/resources/src/mediawiki.less/mediawiki.ui/mixins.less
@@ -44,8 +44,8 @@
 
&:focus {
box-shadow:inset 0px 0px 0px 3px rgba(0, 0, 0, 20%);
-// box-shadow: 0 1px rgba(0, 0, 0, 10%), inset 0 -3px rgba(0, 0, 
0, 20%);
outline: none;
+
// remove outline in Firefox
&::-moz-focus-inner {
border-color: transparent;
@@ -107,13 +107,23 @@
// constructive/progressive/destructive color on hover and active.
color: @colorButtonText;
 
-   &:hover,
-   &:focus {
+   &:hover {
// lessphp doesn't implement tint, see above
// color: tint(@textColor, 20%);
color: mix(#fff, @textColor, 20%);
}
 
+   &:focus {
+   box-shadow:inset 0px 0px 0px 3px rgba(0, 0, 0, 20%);
+   outline: none;
+
+   // remove outline in Firefox
+   &::-moz-focus-inner {
+   border-color: transparent;
+   }
+
+   }
+
&:active,
&.mw-ui-checked {
// lessphp doesn't implement shade, see above

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

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

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


[MediaWiki-commits] [Gerrit] buttons: Update focus state - change (mediawiki/core)

2014-09-23 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: buttons: Update focus state
..

buttons: Update focus state

Bug: 62924
Change-Id: Ibd75f7caaf5f34d8bcc53381335a048cede26950
---
M resources/src/mediawiki.less/mediawiki.ui/mixins.less
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/162514/1

diff --git a/resources/src/mediawiki.less/mediawiki.ui/mixins.less 
b/resources/src/mediawiki.less/mediawiki.ui/mixins.less
index ec9888f..d3220cc 100644
--- a/resources/src/mediawiki.less/mediawiki.ui/mixins.less
+++ b/resources/src/mediawiki.less/mediawiki.ui/mixins.less
@@ -36,16 +36,21 @@
 .button-colors(@bgColor) {
background: @bgColor;
 
-   &:hover,
-   &:focus {
+   &:hover {
// The inner bottom bevel should match the active background 
color.
box-shadow: 0 1px rgba(0, 0, 0, 10%), inset 0 -3px rgba(0, 0, 
0, 20%);
border-bottom-color: mix(#000, @bgColor, 20%);
+   }
+
+   &:focus {
+   box-shadow:inset 0px 0px 0px 3px rgba(0, 0, 0, 20%);
+// box-shadow: 0 1px rgba(0, 0, 0, 10%), inset 0 -3px rgba(0, 0, 
0, 20%);
outline: none;
// remove outline in Firefox
&::-moz-focus-inner {
border-color: transparent;
}
+
}
 
&:active,

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

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

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


[MediaWiki-commits] [Gerrit] Use inline-block rather than floating - change (mediawiki...MobileFrontend)

2014-09-23 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Use inline-block rather than floating
..

Use inline-block rather than floating

Floating can cause two galleries side by side to render strangely
and can also cause issues where one photo in a gallery is on its
own and not centered.

Change-Id: Ib2aecaa8db28784bbe867a17f3706b99676cce41
---
M less/content/main.less
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/less/content/main.less b/less/content/main.less
index 78e7fc3..2720e31 100644
--- a/less/content/main.less
+++ b/less/content/main.less
@@ -255,8 +255,7 @@
max-width: 100%;
 
.gallerybox {
-   display: block;
-   float: left;
+   display: inline-block;
max-width: 100%;
 
.thumb {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2aecaa8db28784bbe867a17f3706b99676cce41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Special:BookSources: Follow up patch to add the global for $... - change (mediawiki/core)

2014-09-23 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Special:BookSources: Follow up patch to add the global for 
$wgUseMediaWikiUIEverywhere
..

Special:BookSources: Follow up patch to add the global for 
$wgUseMediaWikiUIEverywhere

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/162512/1

diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 8b4462a..0a92768 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -117,6 +117,8 @@
 * @return string
 */
private function makeForm() {
+   global $wgUseMediaWikiUIEverywhere;
+
$form = Html::openElement( 'fieldset' ) . "\n";
$form .= Html::element(
'legend',

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

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

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


[MediaWiki-commits] [Gerrit] TextInputWidget: Determine validity in onEdit rather than in... - change (oojs/ui)

2014-09-23 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: TextInputWidget: Determine validity in onEdit rather than in 
setValue
..

TextInputWidget: Determine validity in onEdit rather than in setValue

See Ieaf4c194, follows up I693a8bc9

Bug: 70957
Change-Id: I7e3a2a1618a37696537ee60dd58ebc3788530a7a
---
M src/widgets/TextInputWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/11/162511/1

diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 3cc615b..80793bd 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -145,6 +145,7 @@
  */
 OO.ui.TextInputWidget.prototype.onEdit = function () {
this.adjustSize();
+   this.setValidityFlag();
 
// Parent method
return OO.ui.TextInputWidget.super.prototype.onEdit.call( this );
@@ -157,7 +158,6 @@
// Parent method
OO.ui.TextInputWidget.super.prototype.setValue.call( this, value );
 
-   this.setValidityFlag();
this.adjustSize();
return this;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e3a2a1618a37696537ee60dd58ebc3788530a7a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Add 'truncated-text' class to image description - change (mediawiki...MobileFrontend)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add 'truncated-text' class to image description
..


Add 'truncated-text' class to image description

Bug: 69111
Change-Id: Id67f32436eb0537de1ba332ed871fa84a8ed672a
---
M templates/modules/ImageOverlay.hogan
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/templates/modules/ImageOverlay.hogan 
b/templates/modules/ImageOverlay.hogan
index 1454b02..ad6c0b4 100644
--- a/templates/modules/ImageOverlay.hogan
+++ b/templates/modules/ImageOverlay.hogan
@@ -7,7 +7,7 @@
{{closeMsg}}

{{detailsMsg}}
-   {{caption}}
+   {{caption}}
{{licenseLinkMsg}}

-
\ No newline at end of file
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id67f32436eb0537de1ba332ed871fa84a8ed672a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
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 MobileFrontend - change (mediawiki/core)

2014-09-23 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Update MobileFrontend
..


Update MobileFrontend

Change-Id: I2df6f29f1573b8aec4039357e2343c69520a0ed2
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 035af47..09e703d 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 035af47d9b1ee805421f83fc023ca63732072d96
+Subproject commit 09e703deb46cdc8c4fdf1c5b790c6a2e6f16f38b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2df6f29f1573b8aec4039357e2343c69520a0ed2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Tweak checkbox sizes to be relative depending on where used. - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Tweak checkbox sizes to be relative depending on where used.
..


Tweak checkbox sizes to be relative depending on where used.

Use ems rather than pixels.
Add margins

Bug: 70133
Change-Id: Ia6adc4bda000508f14acf4214e778118efa35be0
---
M resources/src/mediawiki.less/mediawiki.mixins.less
M resources/src/mediawiki.ui/components/checkbox.less
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki.less/mediawiki.mixins.less 
b/resources/src/mediawiki.less/mediawiki.mixins.less
index c360e1f..4a87b74 100644
--- a/resources/src/mediawiki.less/mediawiki.mixins.less
+++ b/resources/src/mediawiki.less/mediawiki.mixins.less
@@ -14,6 +14,15 @@
background-image: e('/* @embed */') url(@url);
 }
 
+.background-size(@width, @height) {
+   // Vendor prefix for certain older opera browsers e.g. nintendo ds
+   -o-background-size: @width @height;
+   // Vendor prefix is added to support Android 2
+   -webkit-background-size: @width @height;
+   background-size: @width @height;
+}
+
+
 .vertical-gradient(@startColor: gray, @endColor: white, @startPos: 0, @endPos: 
100%) {
background-color: @endColor;
background-image: -moz-linear-gradient( top, @startColor @startPos, 
@endColor @endPos ); // Firefox 3.6+
diff --git a/resources/src/mediawiki.ui/components/checkbox.less 
b/resources/src/mediawiki.ui/components/checkbox.less
index e39646b..1997c1b 100644
--- a/resources/src/mediawiki.ui/components/checkbox.less
+++ b/resources/src/mediawiki.ui/components/checkbox.less
@@ -23,7 +23,7 @@
vertical-align: middle;
 }
 
-@checkboxSize: 24px;
+@checkboxSize: 1.6em;
 
 // We use the not selector to cancel out styling on IE 8 and below
 .mw-ui-checkbox:not(#noop) {
@@ -46,6 +46,7 @@
// the pseudo before element of the label after the checkbox 
now looks like a checkbox
& + label {
cursor: pointer;
+   margin: 0 .4em;
 
&::before {
content: '';
@@ -66,6 +67,7 @@
+ label {
&::before {

.background-image-svg('images/checked.svg', 'images/checked.png');
+   .background-size( @checkboxSize, 
@checkboxSize );
background-repeat: no-repeat;
background-position: center top;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6adc4bda000508f14acf4214e778118efa35be0
Gerrit-PatchSet: 14
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jaredzimmerman 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Mattflaschen 
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 MobileFrontend - change (mediawiki/core)

2014-09-23 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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

Change subject: Update MobileFrontend
..

Update MobileFrontend

Change-Id: I2df6f29f1573b8aec4039357e2343c69520a0ed2
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/162510/1

diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 035af47..09e703d 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 035af47d9b1ee805421f83fc023ca63732072d96
+Subproject commit 09e703deb46cdc8c4fdf1c5b790c6a2e6f16f38b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2df6f29f1573b8aec4039357e2343c69520a0ed2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] HtmlForm: Use mw-ui-checkbox only if wgUseMediaWikiUIEverywh... - change (mediawiki/core)

2014-09-23 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: HtmlForm: Use mw-ui-checkbox only if wgUseMediaWikiUIEverywhere 
is enabled
..

HtmlForm: Use mw-ui-checkbox only if wgUseMediaWikiUIEverywhere is enabled

Change-Id: I5d8f1bbcea72253d71df8c9e13253ff5612be363
---
M includes/htmlform/HTMLMultiSelectField.php
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/162509/1

diff --git a/includes/htmlform/HTMLMultiSelectField.php 
b/includes/htmlform/HTMLMultiSelectField.php
index 30310a2..6519912 100644
--- a/includes/htmlform/HTMLMultiSelectField.php
+++ b/includes/htmlform/HTMLMultiSelectField.php
@@ -59,11 +59,13 @@
$label
);
 
-   $checkbox = Html::rawElement(
-   'div',
-   array( 'class' => 'mw-ui-checkbox' ),
-   $checkbox
-   );
+   if ( $wgUseMediaWikiUIEverywhere ) {
+   $checkbox = Html::rawElement(
+   'div',
+   array( 'class' => 
'mw-ui-checkbox' ),
+   $checkbox
+   );
+   }
 
$html .= ' ' . Html::rawElement(
'div',

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

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

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


[MediaWiki-commits] [Gerrit] Special:BlockList: Use mw-ui-progressive for search button - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:BlockList: Use mw-ui-progressive for search button
..


Special:BlockList: Use mw-ui-progressive for search button

Bug: 71144
Change-Id: I56969edb6651a26ff2579e1ed9f9da34a9536e46
---
M includes/htmlform/HTMLForm.php
M includes/specials/SpecialBlockList.php
2 files changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index d582da3..4b8b5a0 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -1052,6 +1052,14 @@
}
 
/**
+* Identify that the submit button in the form has a progressive action
+*
+*/
+   public function setSubmitProgressive() {
+   $this->mSubmitModifierClass = 'mw-ui-progressive';
+   }
+
+   /**
 * Set the text for the submit button to a message
 * @since 1.19
 *
diff --git a/includes/specials/SpecialBlockList.php 
b/includes/specials/SpecialBlockList.php
index 456f4ec..aefd99a 100644
--- a/includes/specials/SpecialBlockList.php
+++ b/includes/specials/SpecialBlockList.php
@@ -103,6 +103,7 @@
$form->setMethod( 'get' );
$form->setWrapperLegendMsg( 'ipblocklist-legend' );
$form->setSubmitTextMsg( 'ipblocklist-submit' );
+   $form->setSubmitProgressive();
$form->prepareForm();
 
$form->displayForm( '' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56969edb6651a26ff2579e1ed9f9da34a9536e46
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Jdlrobson 
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 ESCAPE identifier to MS SQL LIKE queries so that the esc... - change (mediawiki/core)

2014-09-23 Thread Emadelwany (Code Review)
Emadelwany has uploaded a new change for review.

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

Change subject: Add ESCAPE identifier to MS SQL LIKE queries so that the 
escaping would work as expected.
..

Add ESCAPE identifier to MS SQL LIKE queries so that the escaping would work as 
expected.

Bug: 71207
Change-Id: Idadf9d56cadc48cf47d000598d8a3214c684f9d5
---
M includes/db/DatabaseMssql.php
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/162508/1

diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index af3cc72..0927318 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -1165,6 +1165,24 @@
}
 
/**
+* MS SQL requires specifying the escape character used in a LIKE query
+* or using Square brackets to surround characters that are to be 
escaped
+* http://msdn.microsoft.com/en-us/library/ms179859.aspx
+* 
http://sqlserver2000.databases.aspfaq.com/how-do-i-search-for-special-characters-e-g-in-sql-server.html
+* Here we take the Specify-Escape-Character approach since it's less 
invasive, renders a query that
+* is closer to other DB's and better at handling square bracket 
escaping
+* 
+* @return string Fully built LIKE statement
+*/
+   public function buildLike() {
+   $args = func_get_args();
+   $s = parent::buildLike($args);
+   $s .= " ESCAPE '\'";
+
+   return $s;
+   }
+
+   /**
 * @param string $db
 * @return bool
 */

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

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

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


[MediaWiki-commits] [Gerrit] Special:EditWatchlist: Use destructive button and style chec... - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:EditWatchlist: Use destructive button and style 
checkboxes
..


Special:EditWatchlist: Use destructive button and style checkboxes

Bug: 71147
Change-Id: Icddec7a3b66ba1cc86459c2776a471391e92c8c7
---
M includes/htmlform/HTMLMultiSelectField.php
M includes/specials/SpecialEditWatchlist.php
2 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/includes/htmlform/HTMLMultiSelectField.php 
b/includes/htmlform/HTMLMultiSelectField.php
index 1b71ab9..30310a2 100644
--- a/includes/htmlform/HTMLMultiSelectField.php
+++ b/includes/htmlform/HTMLMultiSelectField.php
@@ -59,6 +59,12 @@
$label
);
 
+   $checkbox = Html::rawElement(
+   'div',
+   array( 'class' => 'mw-ui-checkbox' ),
+   $checkbox
+   );
+
$html .= ' ' . Html::rawElement(
'div',
array( 'class' => 
'mw-htmlform-flatlist-item' ),
diff --git a/includes/specials/SpecialEditWatchlist.php 
b/includes/specials/SpecialEditWatchlist.php
index 3656b9c..db83019 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -609,6 +609,7 @@
$context->setTitle( $this->getPageTitle() ); // Remove subpage
$form = new EditWatchlistNormalHTMLForm( $fields, $context );
$form->setSubmitTextMsg( 'watchlistedit-normal-submit' );
+   $form->setSubmitDestructive();
# Used message keys:
# 'accesskey-watchlistedit-normal-submit', 
'tooltip-watchlistedit-normal-submit'
$form->setSubmitTooltip( 'watchlistedit-normal-submit' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icddec7a3b66ba1cc86459c2776a471391e92c8c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Jdlrobson 
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 a larger alphabet for shortcodes - change (mediawiki...UrlShortener)

2014-09-23 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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

Change subject: Use a larger alphabet for shortcodes
..

Use a larger alphabet for shortcodes

Allow a customisable alphabet instead of using base_convert(). By
default, use one with 64 characters. The characters were selected to be
easy to transcribe by hand, with "1", "l" and "I" omitted.

If there are any existing installations of UrlShortener, backwards
compatibility with existing URLs can be achieved with

$wgUrlShortenerIdSet = '0123456789abcdefghijklmnopqrstuvwxyz';

Change-Id: I58b53715d0822be1bf67633bb156b24ce53ba26c
---
M UrlShortener.php
M UrlShortener.utils.php
2 files changed, 61 insertions(+), 2 deletions(-)


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

diff --git a/UrlShortener.php b/UrlShortener.php
index b3930f2..2fb6470 100644
--- a/UrlShortener.php
+++ b/UrlShortener.php
@@ -62,6 +62,13 @@
  */
 $wgUrlShortenerServer = false;
 
+/**
+ * A string giving the list of characters that is used as a symbol set for 
+ * base conversion of the shortcode IDs. If you change this, any existing short
+ * URLs will go to the wrong destination.
+ */
+$wgUrlShortenerIdSet = 
'023456789ABCDEFGHJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz$-_.!';
+
 // Extension credits that will show up on Special:Version
 $wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
diff --git a/UrlShortener.utils.php b/UrlShortener.utils.php
index 4d76df9..ff40e1d 100644
--- a/UrlShortener.utils.php
+++ b/UrlShortener.utils.php
@@ -14,6 +14,7 @@
 }
 
 class UrlShortenerUtils {
+   static $decodeMap;
 
/**
 * Gets the short code for the given URL.
@@ -59,7 +60,7 @@
}
$wgMemc->set( $memcKey, $id );
}
-   return base_convert( $id, 10, 36 );
+   return self::encodeId( $id );
}
 
/**
@@ -71,7 +72,10 @@
public static function getURL( $shortCode ) {
global $wgMemc;
 
-   $id = intval( base_convert( $shortCode, 36, 10 ) );
+   $id = self::decodeId( $shortCode );
+   if ( $id === false ) {
+   return false;
+   }
$memcKey = wfMemcKey( 'urlshortcode', 'id', $id );
$url = $wgMemc->get( $memcKey );
if ( !$url ) {
@@ -178,4 +182,52 @@
return wfMessage( 'urlshortener-error-disallowed-url' 
)->params( htmlentities( $domain ) );
}
}
+
+   /**
+* Encode an integer into a compact string representation. This is 
basically
+* a generalisation of base_convert().
+*
+* @param $x integer
+* @return string
+*/
+   public static function encodeId( $x ) {
+   global $wgUrlShortenerIdSet;
+   $s = '';
+   $x = intval( $x );
+   $n = strlen( $wgUrlShortenerIdSet );
+   while ( $x ) {
+   $remainder = $x % $n;
+   $x = ( $x - $remainder ) / $n;
+   $s = $wgUrlShortenerIdSet[$remainder] . $s;
+   }
+   return $s;
+   }
+
+   /**
+* Decode a compact string to produce an integer, or false if the input 
is invalid.
+*
+* @param $s string
+* @return integer|false
+*/
+   public static function decodeId( $s ) {
+   global $wgUrlShortenerIdSet;
+
+   $n = strlen( $wgUrlShortenerIdSet );
+   if ( self::$decodeMap === null ) {
+   self::$decodeMap = array();
+   for ( $i = 0; $i < $n; $i++ ) {
+   self::$decodeMap[$wgUrlShortenerIdSet[$i]] = $i;
+   }
+   }
+   $x = 0;
+   for ( $i = 0; $i < strlen( $s ); $i++ ) {
+   $x *= $n;
+   if ( isset( self::$decodeMap[$s[$i]] ) ) {
+   $x += self::$decodeMap[$s[$i]];
+   } else {
+   return false;
+   }
+   }
+   return $x;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58b53715d0822be1bf67633bb156b24ce53ba26c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] Make table_lines return tokens after each row. - change (mediawiki...parsoid)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make table_lines return tokens after each row.
..


Make table_lines return tokens after each row.

* This enables huwiki/Vegyületek_összegképlet-táblázata to get
  parsed since it dispatches table row tokens further down the
  pipeline and lets memory get freed in the tokenizer.

  When parsed with --trace html, you can verify that the HTML
  tree builder does get a stream of HTML tokens.

* There is a change to the html2html result of one test. This seems
  to be a result of bad html2wt parsing on the html for the test.
  Here is a snippet of the html2wt result for that test:
"...|Foo\n|Bar1|}"
  Clearly there is a missing newline before the "|}" which then
  breaks the wt2html parse.

  Till now, we accepted tables with a missing closing tag in
  link captions. But, with this patch, we no longer do. Hence
  the change in html2html result. This patch mimics behavior
  of the PHP parser more closely (which doesn't accept such
  broken tables in link captions either).

Change-Id: I84aab52a04269ce58c274ad3f279600b358e8e14
---
M lib/pegTokenizer.pegjs.txt
M tests/parserTests-blacklist.js
2 files changed, 88 insertions(+), 36 deletions(-)

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



diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index 5050572..c857da1 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -240,7 +240,7 @@
   = h
   / lists
   / st:optionalSpaceToken
-r:( & [{}|!] tl:table_lines { return tl; }
+r:( & [ <{}|!] tl:table_lines { return tl; }
   // tag-only lines should not trigger pre either
   / bts:(bt:block_tag stl:optionalSpaceToken { return bt.concat(stl); })+
 &eolf { return bts; }
@@ -858,14 +858,14 @@
 // This production is identical to the 'inline' fragment except
 // that tables are allowed inside image captions.
 link_text_fragment
-  = c:((sol table_lines) / urltext
-  / (!inline_breaks
-  !pre_start
-  r:( inline_element / '[' text_char+ ']' / . ) {
-  return r;
-  })
+  = c:((sol full_table_in_link_caption)
+   / urltext
+   / (!inline_breaks
+  !pre_start
+  r:( inline_element / '[' text_char+ ']' / . ) { return r; }
+ )
 )+ {
-  //console.warn('inline out:' + pp(c));
+  // console.warn('inline out:' + 
JSON.stringify(tu.flatten_stringlist(c)));
   return tu.flatten_stringlist( c );
   }
 
@@ -1520,14 +1520,14 @@
  * Fürstenberg.
  */
 hacky_dl_uses = bullets:":"+
-   c:table_lines
+   tbl:(table_lines (sol table_lines)*)
s:space* // Do we really need to RT this?
&comment_space_eolf
 {
 // Leave bullets as an array -- list handler expects this
 var li = new TagTk( 'listItem', [], { tsr: [peg$reportedPos, 
peg$reportedPos + bullets.length] }  );
 li.bullets = bullets;
-return tu.flattenIfArray([li, c || [], s || []]);
+return tu.flattenIfArray([li, tbl || [], s || []]);
 }
 
 dtdd
@@ -1562,9 +1562,9 @@
 
 
 
-/*
+/**
  * Tables
- *
+ * --
  * Table productions are geared to support independent parsing of fragments in
  * templates (the common table start / row / table end use case). The tokens
  * produced by these fragments then match up to a table while building the
@@ -1573,45 +1573,98 @@
  *
  * The separate table_lines production is faster than moving those productions
  * directly to block_lines.
- */
+ *
+ * Notes about the full_table_in_link_caption production
+ * -
+ * However, for link-tables, we have introduced a stricter parse wherein
+ * we require table-start and table-end tags to not come from a template.
+ * In addition, this new production doesn't accept fosterable-content in
+ * the table unlike the more lax (sol table_lines)+ production.
+ *
+ * This is the best we can do at this time since we cannot distinguish
+ * between table rows and image options entirely in the tokenizer.
+ *
+ * Consider the following examples:
+ *
+ * Example 1:
+ *
+ * [[Image:Foo.jpg|left|30px|Example 1
+ * {{This-template-returns-a-table-start-tag}}
+ * |foo
+ * {{This-template-returns-a-table-end-tag}}
+ * ]]
+ *
+ * Example 2:
+ *
+ * [[Image:Foo.jpg|left|30px|Example 1
+ * {{echo|a}}
+ * |foo
+ * {{echo|b}}
+ * ]]
+ *
+ * So, we cannot know a priori (without preprocessing or fully expanding
+ * all templates) if "|foo" in the two examples is a table cell or an image
+ * option. This is a limitation of our tokenizer-based approach compared to
+ * the preprocessing-based approach of the PHP parser.
+ 

[MediaWiki-commits] [Gerrit] phabricator add header module - change (operations/puppet)

2014-09-23 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: phabricator add header module
..


phabricator add header module

Change-Id: Ib9a6d9727aac0f31937455eab93e26dd5eae5157
---
M modules/phabricator/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/phabricator/manifests/init.pp 
b/modules/phabricator/manifests/init.pp
index 41488f3..1dcd458 100644
--- a/modules/phabricator/manifests/init.pp
+++ b/modules/phabricator/manifests/init.pp
@@ -125,6 +125,7 @@
 
 include apache::mod::php5
 include apache::mod::rewrite
+include apache::mod::headers
 
 $docroot = "${phabdir}/phabricator/webroot"
 $phab_servername = $phab_settings['phabricator.base-uri']

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9a6d9727aac0f31937455eab93e26dd5eae5157
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 
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] delete entire DolphinBrowser directory from bits - change (operations/mediawiki-config)

2014-09-23 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: delete entire DolphinBrowser directory from bits
..

delete entire DolphinBrowser directory from bits

Change-Id: Idc715be5bca39347199b8a05dc4c9ae3112d52b3
---
D docroot/bits/DolphinBrowser/404.html
D docroot/bits/DolphinBrowser/AUTHORS
D docroot/bits/DolphinBrowser/MobileFrontend
D docroot/bits/DolphinBrowser/android/cordova.dolphin.js
D docroot/bits/DolphinBrowser/android/phonegap-1.4.1.js
D docroot/bits/DolphinBrowser/android/platform.js
D docroot/bits/DolphinBrowser/android/plugins/cachemode/cachemode.js
D docroot/bits/DolphinBrowser/android/plugins/globalization/globalization.js
D docroot/bits/DolphinBrowser/android/plugins/menu/menu.android.js
D docroot/bits/DolphinBrowser/android/plugins/preferences/preferences.js
D docroot/bits/DolphinBrowser/android/plugins/share/share.js
D docroot/bits/DolphinBrowser/android/plugins/softkeyboard/softkeyboard.js
D docroot/bits/DolphinBrowser/android/plugins/toast/phonegap-toast.js
D docroot/bits/DolphinBrowser/android/plugins/urlcache/URLCache.js
D docroot/bits/DolphinBrowser/android/plugins/urlcache/URLCacheManager.js
D docroot/bits/DolphinBrowser/android/plugins/webintent/webintent.js
D docroot/bits/DolphinBrowser/app.css
D docroot/bits/DolphinBrowser/blackberry/phonegap-1.4.1.js
D docroot/bits/DolphinBrowser/dolphin
D docroot/bits/DolphinBrowser/error.html
D docroot/bits/DolphinBrowser/image/button-dark-back.png
D docroot/bits/DolphinBrowser/image/button-light-close.png
D docroot/bits/DolphinBrowser/image/button-light-wiki.png
D docroot/bits/DolphinBrowser/image/globe-bg.jpg
D docroot/bits/DolphinBrowser/image/icon.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-back.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-forward.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-language.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-nearby.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-output.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-settings.png
D docroot/bits/DolphinBrowser/image/ios/toolbar-sources.png
D docroot/bits/DolphinBrowser/image/logo.png
D docroot/bits/DolphinBrowser/image/select.png
D docroot/bits/DolphinBrowser/image/spinner.gif
D docroot/bits/DolphinBrowser/image/splash.png
D docroot/bits/DolphinBrowser/image/spr.png
D docroot/bits/DolphinBrowser/image/wmf.png
D docroot/bits/DolphinBrowser/img/hdpi/optionAddBookmark.png
D docroot/bits/DolphinBrowser/img/hdpi/optionBack.png
D docroot/bits/DolphinBrowser/img/hdpi/optionForward.png
D docroot/bits/DolphinBrowser/img/hdpi/optionLanguage.png
D docroot/bits/DolphinBrowser/img/hdpi/optionNearMe.png
D docroot/bits/DolphinBrowser/img/hdpi/optionReadLater.png
D docroot/bits/DolphinBrowser/img/hdpi/optionSettings.png
D docroot/bits/DolphinBrowser/img/hdpi/optionSharePage.png
D docroot/bits/DolphinBrowser/img/hdpi/optionViewHistory.png
D docroot/bits/DolphinBrowser/img/ldpi/optionAddBookmark.png
D docroot/bits/DolphinBrowser/img/ldpi/optionBack.png
D docroot/bits/DolphinBrowser/img/ldpi/optionForward.png
D docroot/bits/DolphinBrowser/img/ldpi/optionLanguage.png
D docroot/bits/DolphinBrowser/img/ldpi/optionNearMe.png
D docroot/bits/DolphinBrowser/img/ldpi/optionReadLater.png
D docroot/bits/DolphinBrowser/img/ldpi/optionSettings.png
D docroot/bits/DolphinBrowser/img/ldpi/optionSharePage.png
D docroot/bits/DolphinBrowser/img/ldpi/optionViewHistory.png
D docroot/bits/DolphinBrowser/img/mdpi/optionAddBookmark.png
D docroot/bits/DolphinBrowser/img/mdpi/optionBack.png
D docroot/bits/DolphinBrowser/img/mdpi/optionForward.png
D docroot/bits/DolphinBrowser/img/mdpi/optionLanguage.png
D docroot/bits/DolphinBrowser/img/mdpi/optionNearMe.png
D docroot/bits/DolphinBrowser/img/mdpi/optionReadLater.png
D docroot/bits/DolphinBrowser/img/mdpi/optionSettings.png
D docroot/bits/DolphinBrowser/img/mdpi/optionSharePage.png
D docroot/bits/DolphinBrowser/img/mdpi/optionViewHistory.png
D docroot/bits/DolphinBrowser/img/orig/optionAddBookmark.png
D docroot/bits/DolphinBrowser/img/orig/optionBack.png
D docroot/bits/DolphinBrowser/img/orig/optionForward.png
D docroot/bits/DolphinBrowser/img/orig/optionLanguage.png
D docroot/bits/DolphinBrowser/img/orig/optionNearMe.png
D docroot/bits/DolphinBrowser/img/orig/optionReadLater.png
D docroot/bits/DolphinBrowser/img/orig/optionSettings.png
D docroot/bits/DolphinBrowser/img/orig/optionViewHistory.png
D docroot/bits/DolphinBrowser/img/scale.sh
D docroot/bits/DolphinBrowser/img/xhdpi/optionAddBookmark.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionBack.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionForward.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionLanguage.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionNearMe.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionReadLater.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionSettings.png
D docroot/bits/DolphinBrowser/img/xhdpi/optionSharePage.png

[MediaWiki-commits] [Gerrit] phabricator add header module - change (operations/puppet)

2014-09-23 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: phabricator add header module
..

phabricator add header module

Change-Id: Ib9a6d9727aac0f31937455eab93e26dd5eae5157
---
M modules/phabricator/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/162506/1

diff --git a/modules/phabricator/manifests/init.pp 
b/modules/phabricator/manifests/init.pp
index 41488f3..1dcd458 100644
--- a/modules/phabricator/manifests/init.pp
+++ b/modules/phabricator/manifests/init.pp
@@ -125,6 +125,7 @@
 
 include apache::mod::php5
 include apache::mod::rewrite
+include apache::mod::headers
 
 $docroot = "${phabdir}/phabricator/webroot"
 $phab_servername = $phab_settings['phabricator.base-uri']

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

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

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


[MediaWiki-commits] [Gerrit] Added callback listener for checking response headers. - change (apps...java-mwapi)

2014-09-23 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Added callback listener for checking response headers.
..

Added callback listener for checking response headers.

Will allow a listener to check the headers from any Api response, useful
for management of Wikipedia Zero state.

Change-Id: If53cef6665611ad9604c60e1206c3aabd7e19d96
---
M src/main/java/org/mediawiki/api/json/Api.java
M src/main/java/org/mediawiki/api/json/ApiResult.java
A src/main/java/org/mediawiki/api/json/OnHeaderCheckListener.java
3 files changed, 26 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/java-mwapi 
refs/changes/03/162503/1

diff --git a/src/main/java/org/mediawiki/api/json/Api.java 
b/src/main/java/org/mediawiki/api/json/Api.java
index acaf635..18ac7f0 100644
--- a/src/main/java/org/mediawiki/api/json/Api.java
+++ b/src/main/java/org/mediawiki/api/json/Api.java
@@ -191,7 +191,7 @@
 if (method == METHOD_POST) {
 request.form(requestBuilder.getParams());
 }
-return new ApiResult(request);
+return new ApiResult(this, request);
 }
 
 private Map encodeParams(Map params) {
@@ -213,5 +213,18 @@
 public static void setConnectionFactory(HttpRequest.ConnectionFactory 
factory) {
 HttpRequest.setConnectionFactory(factory);
 }
+
+private OnHeaderCheckListener onHeaderCheckListener;
+
+public void setHeaderCheckListener(OnHeaderCheckListener listener) {
+onHeaderCheckListener = listener;
+}
+
+public void processHeaders(ApiResult result) {
+if (onHeaderCheckListener != null) {
+//give our listener a chance to look at the headers that we got 
back...
+onHeaderCheckListener.ohHeaderCheck(result);
+}
+}
 }
 
diff --git a/src/main/java/org/mediawiki/api/json/ApiResult.java 
b/src/main/java/org/mediawiki/api/json/ApiResult.java
index 80e4fd6..12a8821 100644
--- a/src/main/java/org/mediawiki/api/json/ApiResult.java
+++ b/src/main/java/org/mediawiki/api/json/ApiResult.java
@@ -19,6 +19,7 @@
  * Request for which this object holds the results.
  */
 private final HttpRequest request;
+private final Api api;
 private Map> headers;
 
 /**
@@ -26,7 +27,8 @@
  *
  * @param request {@link HttpRequest} object which can perform the query 
for which this object holds the results.
  */
-ApiResult(final HttpRequest request) {
+ApiResult(final Api api, final HttpRequest request) {
+this.api = api;
 this.request = request;
 }
 
@@ -86,6 +88,7 @@
 private void extractResponseHeaders() {
 try {
 headers = request.headers();
+api.processHeaders(this);
 } catch (HttpRequest.HttpRequestException e) {
 throw e;
 }
diff --git a/src/main/java/org/mediawiki/api/json/OnHeaderCheckListener.java 
b/src/main/java/org/mediawiki/api/json/OnHeaderCheckListener.java
new file mode 100644
index 000..30dc25c
--- /dev/null
+++ b/src/main/java/org/mediawiki/api/json/OnHeaderCheckListener.java
@@ -0,0 +1,8 @@
+package org.mediawiki.api.json;
+
+import java.util.List;
+import java.util.Map;
+
+public interface OnHeaderCheckListener {
+void ohHeaderCheck(ApiResult result);
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If53cef6665611ad9604c60e1206c3aabd7e19d96
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/java-mwapi
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] Factor out Wikipedia Zero code into its own module. - change (apps...wikipedia)

2014-09-23 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Factor out Wikipedia Zero code into its own module.
..

Factor out Wikipedia Zero code into its own module.

No more remembering to check for Zero headers on completion of every api
task.

Change-Id: I82a869f9df4dedf2d9bc37955644106bbc9138a6
NOTE: depends on the latest java-mwapi update.
---
M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
M wikipedia/src/main/java/org/wikipedia/Utils.java
M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java
M wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java
M wikipedia/src/main/java/org/wikipedia/editing/FetchSectionWikitextTask.java
M wikipedia/src/main/java/org/wikipedia/interlanguage/LangLinksFetchTask.java
M wikipedia/src/main/java/org/wikipedia/nearby/NearbyFetchTask.java
D wikipedia/src/main/java/org/wikipedia/networking/ConnectionChangeReceiver.java
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
M wikipedia/src/main/java/org/wikipedia/page/SectionsFetchTask.java
M wikipedia/src/main/java/org/wikipedia/random/RandomArticleIdTask.java
M wikipedia/src/main/java/org/wikipedia/search/FullSearchArticlesTask.java
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
A wikipedia/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
15 files changed, 202 insertions(+), 251 deletions(-)


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

diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java 
b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
index 039c31a..001d6d0 100644
--- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
@@ -108,8 +108,8 @@
 }
 
 // Show Wikipedia Zero if ON, otherwise hide it
-if (WikipediaApp.isWikipediaZeroDevmodeOn() && 
WikipediaApp.getWikipediaZeroDisposition()) {
-wikipediaZeroText.setText(WikipediaApp.getCarrierMessage());
+if (app.getWikipediaZeroHandler().isZeroEnabled()) {
+
wikipediaZeroText.setText(app.getWikipediaZeroHandler().getCarrierMessage());
 wikipediaZeroText.setVisibility(View.VISIBLE);
 } else {
 wikipediaZeroText.setVisibility(View.GONE);
diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java 
b/wikipedia/src/main/java/org/wikipedia/Utils.java
index 6a46e01..6beef20 100644
--- a/wikipedia/src/main/java/org/wikipedia/Utils.java
+++ b/wikipedia/src/main/java/org/wikipedia/Utils.java
@@ -11,9 +11,7 @@
 import android.net.NetworkInfo;
 import android.net.Uri;
 import android.os.Build;
-import android.os.Handler;
 import android.os.Looper;
-import android.os.Message;
 import android.os.Parcelable;
 import android.preference.PreferenceManager;
 import android.telephony.TelephonyManager;
@@ -21,7 +19,6 @@
 import android.text.format.DateUtils;
 import android.util.Base64;
 import android.util.DisplayMetrics;
-import android.util.Log;
 import android.util.TypedValue;
 import android.view.View;
 import android.view.Window;
@@ -30,16 +27,12 @@
 import android.widget.CompoundButton;
 import android.widget.EditText;
 import android.widget.Toast;
-import com.squareup.otto.Bus;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
-import org.mediawiki.api.json.ApiResult;
 import org.wikipedia.bridge.CommunicationBridge;
 import org.wikipedia.events.WikipediaZeroInterstitialEvent;
-import org.wikipedia.events.WikipediaZeroStateChangeEvent;
 import org.wikipedia.settings.PrefKeys;
-import org.wikipedia.zero.WikipediaZeroTask;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -225,80 +218,6 @@
 });
 }
 
- /* Inspect an API response, and fire an event to update the UI for 
Wikipedia Zero On/Off.
- *
- * @param app The application object
- * @param result An API result to inspect for Wikipedia Zero headers
- */
-public static void processHeadersForZero(final WikipediaApp app, final 
ApiResult result) {
-new Handler(Looper.getMainLooper()).post(new Runnable() {
-@Override
-public void run() {
-Map> headers = result.getHeaders();
-boolean responseZeroState = headers.containsKey("X-CS");
-if (responseZeroState) {
-String xcs = headers.get("X-CS").get(0);
-if (!xcs.equals(WikipediaApp.getXcs())) {
-identifyZeroCarrier(app, xcs);
-}
-} else if (WikipediaApp.getWikipediaZeroDisposition()) {
-WikipediaApp.setXcs("");
-WikipediaApp.setCarrierMessage("");
-
WikipediaApp.setWikipediaZeroD

[MediaWiki-commits] [Gerrit] Special:BookSources: Use appropriate mediawiki.ui classes an... - change (mediawiki/core)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:BookSources: Use appropriate mediawiki.ui classes and 
update strings
..


Special:BookSources: Use appropriate mediawiki.ui classes and update strings

Bug: 71145
Change-Id: I00c4a00d4a2aeb7f6b39ede6fca1725991b68d7c
---
M includes/specials/SpecialBooksources.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 15 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 72f4e46..8b4462a 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -131,9 +131,20 @@
'isbn',
20,
$this->isbn,
-   array( 'autofocus' => true )
+   array( 'autofocus' => true, 'class' => 
'mw-ui-input-inline' )
);
-   $form .= ' ' . Xml::submitButton( $this->msg( 
'booksources-go' )->text() ) . "\n";
+
+   if ( $wgUseMediaWikiUIEverywhere ) {
+   $form .= ' ' . Xml::submitButton(
+   $this->msg( 'booksources-search' )->text(),
+   array( 'class' => 'mw-ui-button 
mw-ui-progressive' )
+   ) . "\n";
+   } else {
+   $form .= ' ' . Xml::submitButton(
+   $this->msg( 'booksources-search' )->text()
+   ) . "\n";
+   }
+
$form .= Html::closeElement( 'form' ) . "\n";
$form .= Html::closeElement( 'fieldset' ) . "\n";
 
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 8b6e66b..c448fe5 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1683,7 +1683,7 @@
"booksources-summary": "",
"booksources-search-legend": "Search for book sources",
"booksources-isbn": "ISBN:",
-   "booksources-go": "Go",
+   "booksources-search": "Search",
"booksources-text": "Below is a list of links to other sites that sell 
new and used books, and may also have further information about books you are 
looking for:",
"booksources-invalid-isbn": "The given ISBN does not appear to be 
valid; check for errors copying from the original source.",
"rfcurl": "//tools.ietf.org/html/rfc$1",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 941bb91..54d2395 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1845,7 +1845,7 @@
"booksources-summary": "{{doc-specialpagesummary|booksources}}",
"booksources-search-legend": "Box heading on [[Special:BookSources|book 
sources]] special page. The box is for searching for places where a particular 
book can be bought or viewed.",
"booksources-isbn": "{{optional}}\nThis is a label that appears before 
a text input field on the Special:BookSources page.\n{{Identical|ISBN}}",
-   "booksources-go": "Name of button in 
[[Special:BookSources]]\n\n{{Identical|Go}}",
+   "booksources-search": "Search button in 
[[Special:BookSources]]\n\n{{Identical|Go}}",
"booksources-text": "Used in [[Special:BookSources/1]].\n\nThis message 
is followed by a list of links to other sites.\n\nSee also:\n* 
{{msg-mw|Booksources|title}}\n* {{msg-mw|Booksources-text|text}}",
"booksources-invalid-isbn": "This message is displayed after an invalid 
ISBN is entered on [[Special:Booksources]].",
"rfcurl": "{{notranslate}}\nParameters:\n* $1 - RFC number\nSee 
also:\n* {{msg-mw|Pubmedurl}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00c4a00d4a2aeb7f6b39ede6fca1725991b68d7c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Prtksxna 
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] First trim content, then truncate - change (mediawiki...Flow)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: First trim content, then truncate
..


First trim content, then truncate

Otherwise, we'd only get 150chars if the first 50 were whitespace.
Additionally switch trim -> $.trim to support non-es5 browsers.

Change-Id: I5cf62ac67dc5660af6ea6267704e2abe2c8dca98
---
M modules/new/components/flow-board.js
M modules/new/flow-handlebars.js
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/new/components/flow-board.js 
b/modules/new/components/flow-board.js
index 9aed6e0..f3293c0 100644
--- a/modules/new/components/flow-board.js
+++ b/modules/new/components/flow-board.js
@@ -1632,7 +1632,7 @@
},
// text for 
flow-reply-topic-title-placeholder placeholder
properties: {
-   'topic-of-post': 
replyToContent.substr( 0, 200 ).trim()
+   'topic-of-post': $.trim( 
replyToContent ).substr( 0, 200 )
}
}
) ).children();
diff --git a/modules/new/flow-handlebars.js b/modules/new/flow-handlebars.js
index 93bc7f1..b2e5c54 100644
--- a/modules/new/flow-handlebars.js
+++ b/modules/new/flow-handlebars.js
@@ -666,7 +666,7 @@
retval = content;
}
 
-   return retval ? retval.trim().substr( 0, 200 ) : '';
+   return retval ? $.trim( retval ).substr( 0, 200 ) : '';
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5cf62ac67dc5660af6ea6267704e2abe2c8dca98
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: SG 
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 documentation in ve.Document - change (VisualEditor/VisualEditor)

2014-09-23 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Fix documentation in ve.Document
..

Fix documentation in ve.Document

Change-Id: I7660e86542b4df80252a1a3b3a2b523af99c1160
---
M src/ve.Document.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/02/162502/1

diff --git a/src/ve.Document.js b/src/ve.Document.js
index 6244f65..44de9c8 100644
--- a/src/ve.Document.js
+++ b/src/ve.Document.js
@@ -11,7 +11,7 @@
  * @mixins OO.EventEmitter
  *
  * @constructor
- * @param {ve.Node} model Model to observe
+ * @param {ve.Node} documentNode Document node
  */
 ve.Document = function VeDocument( documentNode ) {
// Mixin constructors
@@ -53,7 +53,7 @@
  *   range is in a single node)
  * @returns {Array} List of objects describing nodes in the selection and the 
ranges therein:
  *
- * - `node`: Reference to a ve.dm.Node
+ * - `node`: Reference to a ve.Node
  * - `range`: ve.Range, missing if the entire node is covered
  * - `index`: Index of the node in its parent, missing if node has no parent
  * - `indexInNode`: If range is a zero-length range between two children of 
node,

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Experiment: disable gadgets caching" - change (operations/mediawiki-config)

2014-09-23 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Revert "Experiment: disable gadgets caching"
..

Revert "Experiment: disable gadgets caching"

This reverts commit 3ce421672d0ae8ef8249b3272f25653e4431982a.

Change-Id: I0b2e8a76129f1f77b634856c7adb63166e314bb3
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b5f4954..adb8f11 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -680,7 +680,6 @@
 
 if ( $wmgUseGadgets ) {
include( "$IP/extensions/Gadgets/Gadgets.php" );
-   $wgGadgetsCaching = false;
 }
 
 if ( $wmgUseMwEmbedSupport ) {

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Experiment: disable gadgets caching" - change (operations/mediawiki-config)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Experiment: disable gadgets caching"
..


Revert "Experiment: disable gadgets caching"

This reverts commit 3ce421672d0ae8ef8249b3272f25653e4431982a.

Change-Id: I0b2e8a76129f1f77b634856c7adb63166e314bb3
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b5f4954..adb8f11 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -680,7 +680,6 @@
 
 if ( $wmgUseGadgets ) {
include( "$IP/extensions/Gadgets/Gadgets.php" );
-   $wgGadgetsCaching = false;
 }
 
 if ( $wmgUseMwEmbedSupport ) {

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

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

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


[MediaWiki-commits] [Gerrit] Fix LockedPage exception documentation - change (pywikibot/core)

2014-09-23 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Fix LockedPage exception documentation
..

Fix LockedPage exception documentation

The documentation for LockedPage places it in the
PageRelatedError part of the exception tree, when it belongs in
the PageSaveRelatedError part of the exception tree.

Change-Id: I6280a9a196a1e8ce6d3d0ba067258c9bc98742bc
---
M pywikibot/exceptions.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/00/162500/1

diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index 51880db..ed620e1 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -20,14 +20,14 @@
   - IsNotRedirectPage: Page is not a redirect page
   - CircularRedirect: Page is a circular redirect
   - SectionError: The section specified by # does not exist
-  - LockedPage: Page is locked
-  - LockedNoPage: Title is locked against creation
-  - CascadeLockedPage: Page is locked due to cascading protection
 
 PageSaveRelatedError: page exceptions within the save operation on a Page.
   (alias: PageNotSaved)
   - SpamfilterError: MediaWiki spam filter detected a blacklisted URL
   - OtherPageSaveError: misc. other save related exception.
+  - LockedPage: Page is locked
+  - LockedNoPage: Title is locked against creation
+  - CascadeLockedPage: Page is locked due to cascading protection
   - EditConflict: Edit conflict while uploading the page
   - PageDeletedConflict: Page was deleted since being retrieved
   - PageCreatedConflict: Page was created by another user

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6280a9a196a1e8ce6d3d0ba067258c9bc98742bc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Placeholder should only contain text of exactly the topic be... - change (mediawiki...Flow)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Placeholder should only contain text of exactly the topic being 
replied to
..


Placeholder should only contain text of exactly the topic being replied to

When replying to a higher-level post, it would include the contents
of all lower-level posts as well. It should only fetch text of the
first post, no children.

Change-Id: I978736bb2ae194389709a7ad0029d14400eae30a
---
M modules/new/components/flow-board.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/new/components/flow-board.js 
b/modules/new/components/flow-board.js
index 611290b..9aed6e0 100644
--- a/modules/new/components/flow-board.js
+++ b/modules/new/components/flow-board.js
@@ -1607,7 +1607,7 @@
$targetPost = $( this ).closest( 
'.flow-post:not([data-flow-post-max-depth])' ),
postId = $targetPost.data( 'flow-id' ),
topicTitle = $post.closest( '.flow-topic' 
).find( '.flow-topic-title' ).text(),
-   replyToContent = $post.find( 
'.flow-post-content' ).text() || topicTitle,
+   replyToContent = $post.find( 
'.flow-post-content:first' ).text() || topicTitle,
author = $.trim( $post.find( 
'.flow-author:first .mw-userlink' ).text() );
 
// Check if reply form has already been opened

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I978736bb2ae194389709a7ad0029d14400eae30a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: SG 
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 [Object object] placeholder text in topic reply field - change (mediawiki...Flow)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix [Object object] placeholder text in topic reply field
..


Fix [Object object] placeholder text in topic reply field

Change-Id: I51e4c8586be8995f5fbb32970f23fe9eec596186
---
M modules/new/flow-handlebars.js
1 file changed, 18 insertions(+), 3 deletions(-)

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



diff --git a/modules/new/flow-handlebars.js b/modules/new/flow-handlebars.js
index eb4be15..93bc7f1 100644
--- a/modules/new/flow-handlebars.js
+++ b/modules/new/flow-handlebars.js
@@ -165,6 +165,21 @@
} );
};
 
+   /**
+* Parameters could be Message::rawParam (in PHP) object, which will
+* translate into a { raw: "string" } object in JS.
+* @todo: this does not exactly match the behavior in PHP yet (no parse,
+* no escape), but at least it won't print an [Object object] param.
+*
+* @param {Array} parameters
+* @return {Array}
+*/
+   function flowNormalizeL10nParameters( parameters ) {
+   return $.map( parameters, function ( arg ) {
+   return arg ? arg.raw || arg : '';
+   } );
+   }
+
// @todo remove and replace with mw.message || $.noop
/**
 * Checks for a helper function based on a key.
@@ -179,7 +194,7 @@
 *   parameters
 */
function flowMessages( str ) {
-   var parameters = Array.prototype.slice.call( arguments, 1 ),
+   var parameters = flowNormalizeL10nParameters( 
Array.prototype.slice.call( arguments, 1 ) ),
strings = ( {
"post_moderation_state": function( type, 
replyToId, name ) {
var str;
@@ -222,7 +237,7 @@
return mw.message( str ).params( parameters );
}
 
-   if ( Object.prototype.toString.call( result ) === '[object 
Function]' ) {
+   if ( $.isFunction( result ) ) {
// Callable; return the result of callback(arguments)
result = result.apply( strings, parameters );
}
@@ -257,7 +272,7 @@
 */
FlowHandlebars.prototype.l10nParse = function ( str, args, options ) {
return FlowHandlebars.prototype.html(
-   mw.message( str ).params( args ).parse()
+   mw.message( str ).params( flowNormalizeL10nParameters( 
args ) ).parse()
);
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51e4c8586be8995f5fbb32970f23fe9eec596186
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: SG 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Experiment: disable gadgets caching - change (operations/mediawiki-config)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Experiment: disable gadgets caching
..


Experiment: disable gadgets caching

Change-Id: I548385bd66865e88800ed88e5c33e92b82c205d8
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index adb8f11..b5f4954 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -680,6 +680,7 @@
 
 if ( $wmgUseGadgets ) {
include( "$IP/extensions/Gadgets/Gadgets.php" );
+   $wgGadgetsCaching = false;
 }
 
 if ( $wmgUseMwEmbedSupport ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I548385bd66865e88800ed88e5c33e92b82c205d8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
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] Fix missing tutorial steps in the funnel logging - change (mediawiki...UploadWizard)

2014-09-23 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Fix missing tutorial steps in the funnel logging
..

Fix missing tutorial steps in the funnel logging

The funnel logging code logged a 'virtual' tutorial step whenever
someone started the wizard and skipped that step, but did not do
that when someone restarted it (by clicking "upload more files" on
the thanks screen).

Change-Id: Ibf4970c1c9d5ebcdf34042f368fa1e19be21dec2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/862
---
M resources/mw.UploadWizard.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/99/162499/1

diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 2784030..28b5cdb 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -382,7 +382,7 @@
 
$( 'html, body' ).animate( { scrollTop: headScroll.top, 
scrollLeft: headScroll.left }, 'slow' );
 
-   if ( selectedStepName === 'file' && 
!this.currentStepName ) { // tutorial was skipped
+   if ( selectedStepName === 'file' && 
!this.currentStepName || this.currentStepName === 'thanks' ) { // tutorial was 
skipped
uw.eventFlowLogger.logSkippedStep( 'tutorial' );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf4970c1c9d5ebcdf34042f368fa1e19be21dec2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] Check for renamed user on login - change (mediawiki...CentralAuth)

2014-09-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Check for renamed user on login
..


Check for renamed user on login

If a user logs in with the pre-finalization username, but their old
name doesn't exist as a global account anymore (winner renamed
themselves), then show a message on the login page with the user's
new name.

Relies on core change If48d59afa63ace68c147eca952f1d4f43acc105f

Bug: 67995
Change-Id: I06b9b6322e408868f516aeabd61c6580f304e009
---
M CentralAuthHooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 34 insertions(+), 2 deletions(-)

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



diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index f27842f..2ee2bf8 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -76,6 +76,11 @@
'remoteExtPath' => 'CentralAuth/modules',
);
}
+
+   if ( $wgCentralAuthCheckSULMigration ) {
+   $wgHooks['LoginUserMigrated'][] =
+   'CentralAuthHooks::onLoginUserMigrated';
+   }
}
 
/**
@@ -436,6 +441,31 @@
}
 
/**
+* Inform a user that their username was renamed as part of SUL
+* Finalization, if their previous username doesn't exist any more 
(winner
+* was renamed).
+* @param User $user
+* @param string &$msg return error key, or return an array with key 
and params
+* @return bool
+*/
+   public static function onLoginUserMigrated( $user, &$msg ) {
+   if ( $wgCentralAuthCheckSULMigration ) {
+   $centralUser = CentralAuthUser::getInstance( $user );
+   if ( $user->getID() === 0 && !$centralUser->exists() ) {
+   // If the local and global accounts don't exist,
+   // otherwise wgAuth will handle those.
+   $testName = $user->getName() . '~' . wfWikiID();
+   $test = new CentralAuthUser( $testName );
+   if ( $test->exists() && $test->isAttached() ) {
+   $msg = array( 
'centralauth-abortlogin-renamed', $testName );
+   return false;
+   }
+   }
+   }
+   return true;
+   }
+
+   /**
 * Show a nicer error when the user account does not exist on the local 
wiki, but
 * does exist globally
 * @param $users Array
diff --git a/i18n/en.json b/i18n/en.json
index 7db9bca..ee08584 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -409,5 +409,6 @@
"globalrenamerequest-submit-text": "Request name change",
"globalrenamerequest-save-error": "Failed to save request, Please try 
again.",
"globalrenamerequest-status-title": "Rename request pending approval",
-   "globalrenamerequest-status-text": "Your username change request is 
current in progress and awaiting approval by a steward. You will be notified 
via email when the request is processed.\n\n;Current username:\n:$1\n;Requested 
username:\n:$2"
+   "globalrenamerequest-status-text": "Your username change request is 
current in progress and awaiting approval by a steward. You will be notified 
via email when the request is processed.\n\n;Current username:\n:$1\n;Requested 
username:\n:$2",
+   "centralauth-abortlogin-renamed": "Your account was renamed to \"$1\". 
Please use that username instead."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 29f8f02..fe3792e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -441,5 +441,6 @@
"globalrenamerequest-submit-text": "Form button text.",
"globalrenamerequest-save-error": "Used as error message.",
"globalrenamerequest-status-title": "Page title when request is 
pending.",
-   "globalrenamerequest-status-text": "Pending request description.\n\n* 
$1 is the user's current name\n* $2 is the user's requested name"
+   "globalrenamerequest-status-text": "Pending request description.\n\n* 
$1 is the user's current name\n* $2 is the user's requested name",
+   "centralauth-abortlogin-renamed": "Error message shown when the user's 
account was renamed, and they need to login with their new name\n\n* $1 is the 
new username they should use."
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06b9b6322e408868f516aeabd61c6580f304e009
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: CSteipp 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

__

[MediaWiki-commits] [Gerrit] Add 'truncated-text' class to image description - change (mediawiki...MobileFrontend)

2014-09-23 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Add 'truncated-text' class to image description
..

Add 'truncated-text' class to image description

Bug: 69111
Change-Id: Id67f32436eb0537de1ba332ed871fa84a8ed672a
---
M javascripts/modules/mediaViewer/ImageOverlay.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/javascripts/modules/mediaViewer/ImageOverlay.js 
b/javascripts/modules/mediaViewer/ImageOverlay.js
index 59f2d25..86143c5 100644
--- a/javascripts/modules/mediaViewer/ImageOverlay.js
+++ b/javascripts/modules/mediaViewer/ImageOverlay.js
@@ -49,6 +49,7 @@
}
self._positionImage();
self.$( '.details a' ).attr( 'href', url );
+   self.$( '.details p' ).addClass( 
'truncated-text' );
if ( data.extmetadata ) {
// Add license information
if ( data.extmetadata.LicenseShortName 
) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id67f32436eb0537de1ba332ed871fa84a8ed672a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 

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


[MediaWiki-commits] [Gerrit] MassMessage: grab https://gerrit.wikimedia.org/r/#/c/161002/ - change (mediawiki/core)

2014-09-23 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: MassMessage: grab https://gerrit.wikimedia.org/r/#/c/161002/
..


MassMessage: grab https://gerrit.wikimedia.org/r/#/c/161002/

Change-Id: I9f9f5d489134ee4057784b521897aa8ff75e4917
---
M extensions/MassMessage
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/MassMessage b/extensions/MassMessage
index 1f35ed3..e6b4cb7 16
--- a/extensions/MassMessage
+++ b/extensions/MassMessage
-Subproject commit 1f35ed32d0aa3431f639abf1b01e6049686367da
+Subproject commit e6b4cb753978c55eca6f5dbb541bb2738f9103a1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f9f5d489134ee4057784b521897aa8ff75e4917
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf21
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   5   >