[MediaWiki-commits] [Gerrit] bump mediawiki_selenium to 0.2.22 - change (mediawiki...UniversalLanguageSelector)

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

Change subject: bump mediawiki_selenium to 0.2.22
..


bump mediawiki_selenium to 0.2.22

Change-Id: I468fbb840f37b0ecb720e8a529e5bff2e864338b
---
M tests/browser/Gemfile.lock
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock
index 532bdd1..74cd7e9 100644
--- a/tests/browser/Gemfile.lock
+++ b/tests/browser/Gemfile.lock
@@ -22,7 +22,7 @@
 headless (1.0.1)
 i18n (0.6.9)
 json (1.8.1)
-mediawiki_selenium (0.2.21)
+mediawiki_selenium (0.2.22)
   cucumber (~> 1.3, >= 1.3.10)
   headless (~> 1.0, >= 1.0.1)
   json (~> 1.8, >= 1.8.1)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I468fbb840f37b0ecb720e8a529e5bff2e864338b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] OmegaWikiRecordSets.php - change (mediawiki...WikiLexicalData)

2014-04-25 Thread Hiong3-eng5 (Code Review)
Hiong3-eng5 has uploaded a new change for review.

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

Change subject: OmegaWikiRecordSets.php
..

OmegaWikiRecordSets.php

replaced database query function with select, and creating the class with
static functions replacing regular functions involved. added some
documentation and cleaned the file from trailing spaces.

Change-Id: I42ffcf2d7fe5328395553d2da735deaedddb2d76
---
M OmegaWiki/OmegaWikiRecordSets.php
1 file changed, 106 insertions(+), 101 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData 
refs/changes/79/129879/1

diff --git a/OmegaWiki/OmegaWikiRecordSets.php 
b/OmegaWiki/OmegaWikiRecordSets.php
index 154c824..388f6eb 100644
--- a/OmegaWiki/OmegaWikiRecordSets.php
+++ b/OmegaWiki/OmegaWikiRecordSets.php
@@ -1,5 +1,6 @@
 selectSQLText(
-   array(
+   $sql['table'] = array(
'synt' => "{$dc}_syntrans",
'exp' => "{$dc}_expression"
-   ), array( /* fields to select */
+   );
+   $sql['vars'] = array(
'defined_meaning_id' => 'synt.defined_meaning_id',
'label' => 'exp.spelling'
-   ), array( /* where */
+   );
+   $sql['conds'] = array(
'synt.defined_meaning_id' => $definedMeaningIds,
'exp.language_id' => $languageId,
'synt.identical_meaning' => 1,
'synt.remove_transaction_id' => null,
'exp.remove_transaction_id' => null,
'exp.expression_id = synt.expression_id',
-   ), __METHOD__
-   );
+   );
 
-   return $sqlQuery;
-}
+   return $sql;
 
-function getSynonymSQLForAnyLanguage( array &$definedMeaningIds ) {
-   $dc = wdGetDataSetContext();
-   $dbr = wfGetDB( DB_SLAVE );
+   }
 
-   $sqlQuery = $dbr->selectSQLText(
-   array(
+   static function getSynonymForAnyLanguage( array &$definedMeaningIds ) {
+   $dc = wdGetDataSetContext();
+
+   $sql['table'] = array(
'synt' => "{$dc}_syntrans",
'exp' => "{$dc}_expression"
-   ), array( /* fields to select */
+   );
+   $sql['vars'] = array(
'defined_meaning_id' => 'synt.defined_meaning_id',
'label' => 'exp.spelling'
-   ), array( /* where */
+   );
+   $sql['conds'] = array(
'synt.defined_meaning_id' => $definedMeaningIds,
'synt.identical_meaning' => 1,
'synt.remove_transaction_id' => null,
'exp.remove_transaction_id' => null,
'exp.expression_id = synt.expression_id',
-   ), __METHOD__
-   );
+   );
 
-   return $sqlQuery;
+   return $sql;
+
+   }
+
+   static function fetchDefinedMeaningReferenceRecords( $sql, array 
&$definedMeaningIds, array &$definedMeaningReferenceRecords, $usedAs = '' ) {
+   if ( $usedAs == '' ) $usedAs = WLD_DEFINED_MEANING ;
+   $dc = wdGetDataSetContext();
+   $o = OmegaWikiAttributes::getInstance();
+
+   $foundDefinedMeaningIds = array();
+
+   $dbr = wfGetDB( DB_SLAVE );
+   $queryResult = $dbr->select(
+   $sql['table'], $sql['vars'], $sql['conds'], __METHOD__
+   );
+
+   foreach ( $queryResult as $row ) {
+   $definedMeaningId = $row->defined_meaning_id;
+
+   $specificStructure = clone 
$o->definedMeaningReferenceStructure;
+   $specificStructure->setStructureType( $usedAs );
+   $record = new ArrayRecord( $specificStructure );
+   $record->definedMeaningId = $definedMeaningId;
+   $record->definedMeaningLabel = $row->label;
+
+   $definedMeaningReferenceRecords[$definedMeaningId] = 
$record;
+   $foundDefinedMeaningIds[] = $definedMeaningId;
+   }
+
+   $definedMeaningIds = array_diff( $definedMeaningIds, 
$foundDefinedMeaningIds );
+   }
+
 }
 
 /**
  * returns the id and spelling of the "Defining expression"s,
  * corresponding to the dm_id in $definedMeaningIds
  * the defining expression is {$dc}_defined_meaning.expression_id
+ * @note Unused.
  */
 function getDefiningSQLForLanguage( $languageId, array &$definedMeaningIds ) {
$dc = wdGetDataSetContext();
@@ -85,34 +118,6 @@
 
return $sqlQuery;
 }
-
-
-function fetchDefinedMeaningReferenceRecords( $sql, array &$definedMeaningIds, 
array &$define

[MediaWiki-commits] [Gerrit] Fixed hidden "Log out" option in the navbar. - change (apps...wikipedia)

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

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

Change subject: Fixed hidden "Log out" option in the navbar.
..

Fixed hidden "Log out" option in the navbar.

Also fixes annoying intermittent scrollbar.

Change-Id: Ia216498876915343275cdab8bc84fe898e66cfa1
---
M wikipedia/res/layout/fragment_navdrawer.xml
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia/res/layout/fragment_navdrawer.xml 
b/wikipedia/res/layout/fragment_navdrawer.xml
index d698485..c53fbe6 100644
--- a/wikipedia/res/layout/fragment_navdrawer.xml
+++ b/wikipedia/res/layout/fragment_navdrawer.xml
@@ -5,13 +5,16 @@
   android:layout_height="match_parent"
   android:fillViewport="true"
   android:background="#00af89">
-
+
 
+
+
+
+
 https://gerrit.wikimedia.org/r/129878
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] i18n: Fix typo - change (mediawiki...OdbcDatabase)

2014-04-25 Thread Shirayuki (Code Review)
Shirayuki has uploaded a new change for review.

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

Change subject: i18n: Fix typo
..

i18n: Fix typo

- Replace "odbcdatacase" by "odbcdatabase"

Spotted by 86.147.132.22
https://www.mediawiki.org/wiki/Thread:Extension_talk:OdbcDatabase/JSON_string_keys

Change-Id: Ie6bdf809383994ff7ed1588dec75b109e2b29105
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OdbcDatabase 
refs/changes/77/129877/1

diff --git a/i18n/en.json b/i18n/en.json
index ab0007e..3a79d39 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,8 +9,8 @@
 "odbcdatabase-odbc-missing": "ODBC functions missing. Ensure PHP:ODBC is 
installed.",
 "odbcdatabase-connection-error": "Error connecting to server [{{1}}]: 
{{2}}",
 "odbcdatabase-free-error": "Unable to free ODBC result",
-"odbcdatacase-fetch-object-error": "Error while fetching object: [{{1}}] 
{{2}}",
-"odbcdatacase-fetch-row-error": "Error while fetching row: [{{1}}] {{2}}",
+"odbcdatabase-fetch-object-error": "Error while fetching object: [{{1}}] 
{{2}}",
+"odbcdatabase-fetch-row-error": "Error while fetching row: [{{1}}] {{2}}",
 "odbcdatabase-insert-id-unsupported": "Function insertId() is 
unsupported.",
 "odbcdatabase-unknown-server-version": "Unknown ODBC server version."
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6bdf809383994ff7ed1588dec75b109e2b29105
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OdbcDatabase
Gerrit-Branch: master
Gerrit-Owner: Shirayuki 

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


[MediaWiki-commits] [Gerrit] API list=flow: Don't set _element directly - change (mediawiki...Flow)

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

Change subject: API list=flow: Don't set _element directly
..


API list=flow: Don't set _element directly

Change-Id: I851223f26cacd165edbadf51e08a64b4fe460d82
---
M includes/api/ApiQueryFlow.php
M maintenance/convertToText.php
M modules/base/ext.flow.base.js
3 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/includes/api/ApiQueryFlow.php b/includes/api/ApiQueryFlow.php
index 7c43017..9f09c1e 100644
--- a/includes/api/ApiQueryFlow.php
+++ b/includes/api/ApiQueryFlow.php
@@ -44,9 +44,10 @@
}
 
$result = array(
-   '_element' => 'block',
+   'element' => 'block',
'workflow-id' => 
$this->loader->getWorkflow()->getId()->getAlphadecimal(),
) + $blockOutput;
+   $this->getResult()->setIndexedTagName( $result, 'block' );
 
$this->getResult()->addValue( 'query', $this->getModuleName(), 
$result );
}
diff --git a/maintenance/convertToText.php b/maintenance/convertToText.php
index 4e9a19a..55ee472 100644
--- a/maintenance/convertToText.php
+++ b/maintenance/convertToText.php
@@ -53,7 +53,7 @@
 
$flowData = $apiResponse['query']['flow'];
 
-   if( $flowData["_element"] !== "block" ) {
+   if( $flowData["element"] !== "block" ) {
throw new MWException( "No block data in API 
response" );
}
 
diff --git a/modules/base/ext.flow.base.js b/modules/base/ext.flow.base.js
index 7ee06a4..a2ace71 100644
--- a/modules/base/ext.flow.base.js
+++ b/modules/base/ext.flow.base.js
@@ -116,7 +116,7 @@
if (
!output.query ||
!output.query.flow ||
-   output.query.flow._element !== 
'block'
+   output.query.flow.element !== 
'block'
) {
deferredObject.reject( 
'invalid-result', 'Unable to understand the API result' );
return;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I851223f26cacd165edbadf51e08a64b4fe460d82
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Bsitu 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Werdna 
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 getTemplate() method to block - change (mediawiki...Flow)

2014-04-25 Thread Bsitu (Code Review)
Bsitu has uploaded a new change for review.

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

Change subject: Add getTemplate() method to block
..

Add getTemplate() method to block

* Each block view action will be assigned a template

* We can use this for server side rendering.  For client side, we can
  push all the template mapping to javascript via ResourceLoader

Change-Id: Id6052fb11aa7de2df5e48af5a04060d090a18fe6
---
M FlowActions.php
M includes/Block/Block.php
M includes/Block/BoardHistory.php
M includes/Block/Header.php
M includes/Block/Topic.php
M includes/Block/TopicList.php
M includes/Block/TopicSummary.php
M includes/TemplateHelper.php
M includes/View.php
9 files changed, 66 insertions(+), 2 deletions(-)


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

diff --git a/FlowActions.php b/FlowActions.php
index a40665b..e2b2a6d 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -353,6 +353,7 @@
),
'button-method' => 'GET',
'links' => array( 'topic', 'topic-history' ),
+   'actions' => array(),
'history' => array(
'i18n-message' => 'flow-rev-message-closed-topic',
'i18n-params' => array(
diff --git a/includes/Block/Block.php b/includes/Block/Block.php
index 0a84906..1158896 100644
--- a/includes/Block/Block.php
+++ b/includes/Block/Block.php
@@ -83,6 +83,12 @@
 */
protected $supportedGetActions = array();
 
+   /**
+* Templates for each view actions
+* @var array
+*/
+   protected $templates = array();
+
protected $notificationController;
 
public function __construct( Workflow $workflow, ManagerGroup $storage, 
NotificationController $notificationController ) {
@@ -126,6 +132,23 @@
return in_array( $this->getActionName( $action ), 
$this->supportedGetActions );
}
 
+   /**
+* Get the template name for a specific action or an array of template
+* for all possible view actions in this block
+* 
+* @param string|null
+* @return string|array
+*/
+   public function getTemplate( $action = null ) {
+   if ( $action === null ) {
+   return $this->templates;
+   }
+   if ( !isset( $this->templates[$action] ) ) {
+   throw new InvalidInputException( 'Template is not 
defined for action: ' . $action, 'invalid-input' );
+   }
+   return $this->templates[$action];   
+   }
+
public function onSubmit( $action, User $user, array $data ) {
/** @noinspection PhpUnusedLocalVariableInspection */
$section = new \ProfileSection( __METHOD__ );
diff --git a/includes/Block/BoardHistory.php b/includes/Block/BoardHistory.php
index 23a64fb..58d3fcd 100644
--- a/includes/Block/BoardHistory.php
+++ b/includes/Block/BoardHistory.php
@@ -16,6 +16,11 @@
 
protected $supportedGetActions = array( 'history' );
 
+   // @Todo - fill in the template names
+   protected $templates = array(
+   'history' => '',
+   );
+
public function init( $action, $user ) {
parent::init( $action, $user );
$this->permissions = new RevisionActionPermissions( 
Container::get( 'flow_actions' ), $user );
diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index e745303..9d11d6f 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -33,6 +33,14 @@
 */
protected $supportedGetActions = array( 'view', 
'compare-header-revisions', 'edit-header', 'header-view' );
 
+   // @Todo - fill in the template names
+   protected $templates = array(
+   'view' => '',
+   'compare-header-revisions' => '',
+   'edit-header' => '',
+   'header-view' => '',
+   );
+
/**
 * @var RevisionActionPermissions Allows or denies actions to be 
performed
 */
diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index 9e95a1d..27d1270 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -70,6 +70,15 @@
'view', 'history', 'edit-post', 'edit-title', 
'compare-post-revisions',
);
 
+   // @Todo - fill in the template names
+   protected $templates = array(
+   'view' => '',
+   'history' => '',
+   'edit-post' => '', 
+   'edit-title' => '',
+   'compare-post-revisions' => '',
+   );
+
/**
 * @var RevisionActionPermissions $permissions Allows or denies actions 
to be performed
 */
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index 4055409..0fe4da7 100644
--- a/includes/Block/TopicList.php
++

[MediaWiki-commits] [Gerrit] Mention duplicated placeholder CSS from core - change (mediawiki...Flow)

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

Change subject: Mention duplicated placeholder CSS from core
..


Mention duplicated placeholder CSS from core

Comment-only patch.
Followup to bug 59933.

Change-Id: Idd0c920d6edba2bf17e1883ddc411712dff76f8c
---
M modules/mediawiki.ui/styles/agora-override-forms.less
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/mediawiki.ui/styles/agora-override-forms.less 
b/modules/mediawiki.ui/styles/agora-override-forms.less
index 51f0830..d23db76 100644
--- a/modules/mediawiki.ui/styles/agora-override-forms.less
+++ b/modules/mediawiki.ui/styles/agora-override-forms.less
@@ -1,5 +1,10 @@
 // .flow-container ensures greater specificity than core rules
 .flow-container {
+   /*
+* @todo Promote this function to mediawiki.less mixin in core.
+* @todo #999 matches skins/vector/components/search.less in core, both
+* should use @colorPlaceholder: @colorGray9 in gerrit 117105.
+*/
.field-placeholder-styling(@color: #999) {
font-style: italic;
font-weight: normal;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd0c920d6edba2bf17e1883ddc411712dff76f8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage 
Gerrit-Reviewer: Bsitu 
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] Refactor progressbar & blur handling - change (mediawiki...MultimediaViewer)

2014-04-25 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Refactor progressbar & blur handling
..

Refactor progressbar & blur handling

This tries to fix a number of related issues:
* the blurred thumbnail was visible for a split-second sometimes
  when switching back to an already-loaded image. (Presumably when
  JS was sluggish enough to take more than 10 ms to execute.) We
  now check whether the promise is pending before showing a placeholder.
  (More generally, a lot of unnecessary logic was executed when paging
  through already loaded images, like displaying the placeholder, so
  this might make the UI a bit more responsive.)
* the blur could get stuck sometimes - I have seen this a few times,
  but have never been able to reproduce it, so I'm only guessing, but
  maybe the timing was really unfortunate, and we switched back less
  than 10 ms before loading finished. We now remove the blur on every
  branch, just to be sure.
* adding a progress handler to a promise might not have any immediate
  effect, so when switching to an image which was loading, the progress
  bar reacted too late. We now store the progress state per thumbnail
  so it is always available immediately.
* the progress would animate from 0 to its actual state whenever we
  navigated to the image. The change on paging is now instant; the
  progress bar only animates when we are looking at it.
* switching quickly back and forthe between a loaded and a loading
  image resulted in the loading image becoming unblurred. This seems
  fixed now, I'm not sure why. Maybe the "skip on non-pending promise"
  logic affects it somehow.

Also removes some unused things / renames some things which were
confusing.

Change-Id: I580becff246f197ec1bc65e82acd422620e35578
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/489
---
M resources/mmv/mmv.js
M resources/mmv/provider/mmv.provider.Image.js
M resources/mmv/ui/mmv.ui.canvas.js
M resources/mmv/ui/mmv.ui.progressBar.js
M tests/qunit/mmv/mmv.test.js
M tests/qunit/mmv/ui/mmv.ui.progressBar.test.js
6 files changed, 290 insertions(+), 123 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/75/129875/1

diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js
index 8457789..386e8f9 100755
--- a/resources/mmv/mmv.js
+++ b/resources/mmv/mmv.js
@@ -220,11 +220,11 @@
 * Loads and sets the specified image. It also updates the controls.
 * @param {mw.mmv.LightboxInterface} ui image container
 * @param {mw.mmv.model.Thumbnail} thumbnail thumbnail information
-* @param {HTMLImageElement} image
+* @param {HTMLImageElement} imageElement
 * @param {mw.mmv.model.ThumbnailWidth} imageWidths
 */
-   MMVP.setImage = function ( ui, thumbnail, image, imageWidths ) {
-   ui.canvas.setImageAndMaxDimensions( thumbnail, image, 
imageWidths );
+   MMVP.setImage = function ( ui, thumbnail, imageElement, imageWidths ) {
+   ui.canvas.setImageAndMaxDimensions( thumbnail, imageElement, 
imageWidths );
this.updateControls();
};
 
@@ -243,7 +243,6 @@
 
this.currentIndex = image.index;
 
-   this.currentImageFilename = 
image.filePageTitle.getPrefixedText();
this.currentImageFileTitle = image.filePageTitle;
 
if ( !this.isOpen ) {
@@ -267,15 +266,17 @@
 
imageWidths = this.ui.canvas.getCurrentImageWidths();
 
-   this.resetBlurredThumbnailStates();
 
start = $.now();
 
imagePromise = this.fetchThumbnailForLightboxImage( image, 
imageWidths.real );
 
-   viewer.displayPlaceholderThumbnail( image, $initialImage, 
imageWidths );
+   this.resetBlurredThumbnailStates();
+   if ( imagePromise.state() === 'pending' ) {
+   this.displayPlaceholderThumbnail( image, $initialImage, 
imageWidths );
+   }
 
-   this.setupProgressBar( image, imagePromise );
+   this.setupProgressBar( image, imagePromise, imageWidths.real );
 
imagePromise.done( function ( thumbnail, imageElement ) {
if ( viewer.currentIndex !== image.index ) {
@@ -338,30 +339,53 @@
};
 
/**
-* Resets the cross-request states needed to handle the blurred 
thumbnail logic
+* @private
+* Image loading progress. Keyed by image (database) name + '|' + 
thumbnail width in pixels,
+* value is undefined, 'blurred' or 'real' (meaning respectively that 
no thumbnail is shown
+* yet / the thumbnail that existed on the page is shown, enlarged and 
blurred / the real,
+* correct-size thumbnail is shown).
+* @property {Object.}
+*/
+   MMVP.thumbnailSt

[MediaWiki-commits] [Gerrit] more pointless cleanup - change (wikimedia...tools)

2014-04-25 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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

Change subject: more pointless cleanup
..

more pointless cleanup

Change-Id: I33c9de46ef473284c5d5d493ea8e34d3382ad03d
---
M audit/paypal/history.py
M audit/paypal/paypal_api.py
M dedupe/tests/test_autoreview.py
M queue/stomp_wrap.py
4 files changed, 32 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/74/129874/1

diff --git a/audit/paypal/history.py b/audit/paypal/history.py
index 8857675..9420999 100755
--- a/audit/paypal/history.py
+++ b/audit/paypal/history.py
@@ -16,6 +16,7 @@
 messaging = None
 options = None
 civi = None
+log_file = None
 
 def main():
 global config, messaging, options, civi
@@ -176,7 +177,6 @@
 
 return msg
 
-log_file = None
 
 def log(msg):
 global options, log_file
diff --git a/audit/paypal/paypal_api.py b/audit/paypal/paypal_api.py
index 0c3efa2..dba55f9 100644
--- a/audit/paypal/paypal_api.py
+++ b/audit/paypal/paypal_api.py
@@ -5,8 +5,10 @@
 import urllib2
 import urlparse
 
+
 class PaypalApiClassic(object):
-VERSION = '98.0' # pseudo-random guess
+# pseudo-random guess
+VERSION = '98.0'
 
 def call(self, cmd, **kw):
 params = {
diff --git a/dedupe/tests/test_autoreview.py b/dedupe/tests/test_autoreview.py
index eda9daa..24d393c 100644
--- a/dedupe/tests/test_autoreview.py
+++ b/dedupe/tests/test_autoreview.py
@@ -16,30 +16,30 @@
 self.assertEqual(Autoreview.UNRELATED, 
Autoreview.compareEmails('elem@ant', 'foo@bar'))
 
 def test_compareAddresses(self):
-   oldAddress = {
-   'street_address': '1701 Flightless Bird',
-   'postal_code': '112233 BFF',
-   'city': 'Dent',
-   'country': 'UK',
-   'state': 'Eastside',
-   }
-   nearAddress = {
-   'street_address': '1710 F. Bd.',
-   'postal_code': '112233 BFF',
-   'city': 'Dent',
-   'country': 'UK',
-   'state': 'Eastside',
-   }
-   otherAddress = {
-   'street_address': '1 Uptown',
-   'postal_code': '323232',
-   'city': 'Dent',
-   'country': 'UK',
-   'state': 'Eastside',
-   }
-   self.assertEqual(Autoreview.IDENTICAL, 
Autoreview.compareAddresses(oldAddress, oldAddress))
-   self.assertEqual(Autoreview.SIMILAR, 
Autoreview.compareAddresses(nearAddress, oldAddress))
-   self.assertEqual(Autoreview.UNRELATED, 
Autoreview.compareAddresses(otherAddress, oldAddress))
+oldAddress = {
+'street_address': '1701 Flightless Bird',
+'postal_code': '112233 BFF',
+'city': 'Dent',
+'country': 'UK',
+'state': 'Eastside',
+}
+nearAddress = {
+'street_address': '1710 F. Bd.',
+'postal_code': '112233 BFF',
+'city': 'Dent',
+'country': 'UK',
+'state': 'Eastside',
+}
+otherAddress = {
+'street_address': '1 Uptown',
+'postal_code': '323232',
+'city': 'Dent',
+'country': 'UK',
+'state': 'Eastside',
+}
+self.assertEqual(Autoreview.IDENTICAL, 
Autoreview.compareAddresses(oldAddress, oldAddress))
+self.assertEqual(Autoreview.SIMILAR, 
Autoreview.compareAddresses(nearAddress, oldAddress))
+self.assertEqual(Autoreview.UNRELATED, 
Autoreview.compareAddresses(otherAddress, oldAddress))
 
 if __name__ == '__main__':
-   unittest.main()
+unittest.main()
diff --git a/queue/stomp_wrap.py b/queue/stomp_wrap.py
index 1b603f6..d972a58 100644
--- a/queue/stomp_wrap.py
+++ b/queue/stomp_wrap.py
@@ -2,13 +2,15 @@
 from process.logging import Logger as log
 import process.version_stamp
 
-import os, os.path
+import os
+import os.path
 import sys
 import json
 import socket
 import time
 from stompy import Stomp as DistStomp
 
+
 class Stomp(object):
 conn = None
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33c9de46ef473284c5d5d493ea8e34d3382ad03d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 

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


[MediaWiki-commits] [Gerrit] Take advantage of BagOStuff::setMulti if available - change (mediawiki...StopForumSpam)

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

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

Change subject: Take advantage of BagOStuff::setMulti if available
..

Take advantage of BagOStuff::setMulti if available

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


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

diff --git a/BlacklistUpdate.php b/BlacklistUpdate.php
index 68f112c..4915a9b 100644
--- a/BlacklistUpdate.php
+++ b/BlacklistUpdate.php
@@ -57,8 +57,17 @@
$this->data[$bucket] |= ( 1 << $offset );
}
 
-   foreach ( $this->data as $bucket => $bitfield ) {
-   $wgMemc->set( StopForumSpam::getIPBlacklistKey( $bucket 
), $bitfield, $wgSFSBlacklistCacheDuration );
+   $data = array();
+   foreach( $this->data as $bucket => $bitfield ) {
+   $data[StopForumSpam::getIPBlacklistKey( $bucket )] = 
$bitfield;
+   }
+   if ( is_callable( array( $wgMemc, 'setMulti' ) ) ) {
+   // Available since 1.24
+   $wgMemc->setMulti( $data, $wgSFSBlacklistCacheDuration 
);
+   } else {
+   foreach ( $data as $key => $val ) {
+   $wgMemc->set( $key, $val, 
$wgSFSBlacklistCacheDuration );
+   }
}
 
fclose( $fh );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e34979f3fedfbc98d1cbf1d99e3a7b99b606908
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/StopForumSpam
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] satisfy some pyflakes errors - change (wikimedia...tools)

2014-04-25 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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

Change subject: satisfy some pyflakes errors
..

satisfy some pyflakes errors

Change-Id: I225820df4f48f50c447ac6548787a5acabac6634
---
M AmazonAudit/amazon-csv-audit.py
M FundraiserStatisticsGen/countrygen.py
M FundraiserStatisticsGen/mediumgen.py
M FundraiserStatisticsGen/methodgen.py
M audit/globalcollect/history.py
M audit/paypal/history.py
M dedupe/autoreview.py
M dedupe/contact_cache.py
M dedupe/quick_autoreview.py
M fundraising_ab_tests/confidence.py
M fundraising_ab_tests/results.py
M mediawiki/centralnotice/contributions.py
M process/globals.py
M queue/stomp_wrap.py
14 files changed, 16 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/72/129872/1

diff --git a/AmazonAudit/amazon-csv-audit.py b/AmazonAudit/amazon-csv-audit.py
index b44bfb5..14d01de 100644
--- a/AmazonAudit/amazon-csv-audit.py
+++ b/AmazonAudit/amazon-csv-audit.py
@@ -4,7 +4,6 @@
 
 import csv
 import sys
-from dateutil.parser import parse as dparse
 import MySQLdb as MySQL
 
 if len(sys.argv) != 5:
diff --git a/FundraiserStatisticsGen/countrygen.py 
b/FundraiserStatisticsGen/countrygen.py
index e7dc55e..ab66121 100644
--- a/FundraiserStatisticsGen/countrygen.py
+++ b/FundraiserStatisticsGen/countrygen.py
@@ -1,11 +1,9 @@
 #!/usr/bin/python
 
-import sys
 import MySQLdb as db
 import csv
 from optparse import OptionParser
 from ConfigParser import SafeConfigParser
-from operator import itemgetter
 
 def main():
 # Extract any command line options
diff --git a/FundraiserStatisticsGen/mediumgen.py 
b/FundraiserStatisticsGen/mediumgen.py
index 29dabe9..e860c1d 100644
--- a/FundraiserStatisticsGen/mediumgen.py
+++ b/FundraiserStatisticsGen/mediumgen.py
@@ -1,11 +1,9 @@
 #!/usr/bin/python
 
-import sys
 import MySQLdb as db
 import csv
 from optparse import OptionParser
 from ConfigParser import SafeConfigParser
-from operator import itemgetter
 
 def main():
 # Extract any command line options
diff --git a/FundraiserStatisticsGen/methodgen.py 
b/FundraiserStatisticsGen/methodgen.py
index c79637b..5d86788 100644
--- a/FundraiserStatisticsGen/methodgen.py
+++ b/FundraiserStatisticsGen/methodgen.py
@@ -1,11 +1,9 @@
 #!/usr/bin/python
 
-import sys
 import MySQLdb as db
 import csv
 from optparse import OptionParser
 from ConfigParser import SafeConfigParser
-from operator import itemgetter
 
 def main():
 # Extract any command line options
diff --git a/audit/globalcollect/history.py b/audit/globalcollect/history.py
index b4f53fe..931d8b5 100755
--- a/audit/globalcollect/history.py
+++ b/audit/globalcollect/history.py
@@ -7,12 +7,15 @@
 
 from ConfigParser import SafeConfigParser
 from optparse import OptionParser
-import json
 import csv
 import atexit
 
 from database.db import Connection as DbConnection
 
+config = None
+options = None
+args = None
+
 def main():
 global config, options, db
 parser = OptionParser(usage="usage: %prog [options]")
diff --git a/audit/paypal/history.py b/audit/paypal/history.py
index 3c4a6a2..8857675 100755
--- a/audit/paypal/history.py
+++ b/audit/paypal/history.py
@@ -3,7 +3,6 @@
 from ConfigParser import SafeConfigParser
 from optparse import OptionParser
 from queue.stomp_wrap import Stomp
-import time
 import json
 import csv
 import atexit
@@ -13,6 +12,11 @@
 import dateutil.parser
 from civicrm.civicrm import Civicrm
 
+config = None
+messaging = None
+options = None
+civi = None
+
 def main():
 global config, messaging, options, civi
 parser = OptionParser(usage="usage: %prog [options]")
diff --git a/dedupe/autoreview.py b/dedupe/autoreview.py
index c1a3765..2c9293e 100644
--- a/dedupe/autoreview.py
+++ b/dedupe/autoreview.py
@@ -61,8 +61,7 @@
 result['name'] = Autoreview.compareNames(contact['name'], 
other['name'])
 result['email'] = Autoreview.compareEmails(contact['email'], 
other['email'])
 result['address'] = 
Autoreview.compareAddresses(contact['address'], other['address'])
-action = self.determineAction(result)
-#XXX
+#TODO action = self.determineAction(result)
 
 @staticmethod
 def compareNames(a, b):
@@ -130,7 +129,7 @@
 tag = Autoreview.REC_KEEP
 else:
 queue = Autoreview.REVIEW
-tag = Autoreview.actionLookup[concat]
+tag = Autoreview.actionLookup[concatKey]
 
 return {
 'queue': queue,
diff --git a/dedupe/contact_cache.py b/dedupe/contact_cache.py
index 4e255ca..cf8a520 100644
--- a/dedupe/contact_cache.py
+++ b/dedupe/contact_cache.py
@@ -86,8 +86,10 @@
 return query
 
 def next(self):
-query.offset += self.pagesize
-self.fetch()
+#TODO:
+#query.offset += self.pagesize
+#self.fetch()
+throw Exception("unimplemented")
 
 class Tag

[MediaWiki-commits] [Gerrit] Append redirect=no to RecentChanges/Watchlist redirect entries - change (mediawiki/core)

2014-04-25 Thread Withoutaname (Code Review)
Withoutaname has uploaded a new change for review.

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

Change subject: Append redirect=no to RecentChanges/Watchlist redirect entries
..

Append redirect=no to RecentChanges/Watchlist redirect entries

This change adds redirect=no in the URL of redirect entries in the 
RecentChanges or in the Watchlist.
Entries which are not redirects will not be affected.
Some typos in documentation were also fixed.

Bug: 890
Change-Id: I79593811d92b2f57abd742c8ba9e66769d8bc9b7
---
M includes/Feed.php
M includes/changes/ChangesList.php
M includes/specials/SpecialRecentchanges.php
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/129871/1

diff --git a/includes/Feed.php b/includes/Feed.php
index 1b99519..7089c92 100644
--- a/includes/Feed.php
+++ b/includes/Feed.php
@@ -93,7 +93,7 @@
}
 
/**
-* set the unique id of an item
+* Set the unique id of an item
 *
 * @param string $uniqueId Unique id for the item
 * @param bool $rssIsPermalink Set to true if the guid (unique id) is a 
permalink (RSS feeds only)
@@ -141,7 +141,7 @@
}
 
/**
-* Get the title of this item
+* Get the date of this item
 *
 * @return string
 */
diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php
index 69e1e9e..246f95d 100644
--- a/includes/changes/ChangesList.php
+++ b/includes/changes/ChangesList.php
@@ -344,6 +344,9 @@
 */
public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
$params = array();
+   if ( $rc->getTitle()->isRedirect() ) {
+   $params = array( 'redirect' => 'no' );
+   }
 
$articlelink = Linker::linkKnown(
$rc->getTitle(),
diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index f1a31a5..f770307 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -527,7 +527,7 @@
}
 
/**
-* Create a input to filter changes by categories
+* Create an input to filter changes by categories
 *
 * @param FormOptions $opts
 * @return array

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

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

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


[MediaWiki-commits] [Gerrit] Mention duplicated placeholder CSS from core - change (mediawiki...Flow)

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

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

Change subject: Mention duplicated placeholder CSS from core
..

Mention duplicated placeholder CSS from core

Comment-only patch.
Followup to bug 59933.

Change-Id: Idd0c920d6edba2bf17e1883ddc411712dff76f8c
---
M modules/mediawiki.ui/styles/agora-override-forms.less
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/modules/mediawiki.ui/styles/agora-override-forms.less 
b/modules/mediawiki.ui/styles/agora-override-forms.less
index 51f0830..d23db76 100644
--- a/modules/mediawiki.ui/styles/agora-override-forms.less
+++ b/modules/mediawiki.ui/styles/agora-override-forms.less
@@ -1,5 +1,10 @@
 // .flow-container ensures greater specificity than core rules
 .flow-container {
+   /*
+* @todo Promote this function to mediawiki.less mixin in core.
+* @todo #999 matches skins/vector/components/search.less in core, both
+* should use @colorPlaceholder: @colorGray9 in gerrit 117105.
+*/
.field-placeholder-styling(@color: #999) {
font-style: italic;
font-weight: normal;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd0c920d6edba2bf17e1883ddc411712dff76f8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] build: Update jscs config and phase out deprecated jshint co... - change (oojs/ui)

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

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

Change subject: build: Update jscs config and phase out deprecated jshint config
..

build: Update jscs config and phase out deprecated jshint config

* Coding style options are deprecated in jshint and scheduled
  for removal in JSHint v3 (onevar, camelcase, nomen etc.)

  Remove these from our config and use jscs equivalents instead.
  - camelcase -> requireCamelCaseOrUpperCaseIdentifiers
  - curly -> requireCurlyBraces
  - immed -> requireParenthesesAroundIIFE
  - newcap -> requireCapitalizedConstructors
  - noempty -> disallowEmptyBlocks
  - quotmark -> validateQuoteMarks
  - trailing -> disallowTrailingWhitespace
  - onevar -> requireMultipleVarDecl
  - nomen -> camelcase -> requireCamelCaseOrUpperCaseIdentifiers

* Remove duplicative jscs rules.
  - When using requireSpaceBeforeBinaryOperators you don't need
disallowLeftStickedOperators rule for the same operators.
https://github.com/mdevils/node-jscs/issues/89

Also:
* Use tabs instead of 8 spaces in .jscsrc.
* Make use of jshint's built-in config parser instead of reading
  and regex-ing out the comments manually.
* Make use of jshint's built-in config file finder instead of
  overriding it for all files at once. This way it will also
  automatically support having more than one (e.g. a more
  specific config file inside /test or /src would work naturally,
  just like it would when you run jshint from shell or in a
  text editor).
* Separate dev and dist files so that linter does not complain
  twice about the same error (once in dist/, once in src/).

Change-Id: Ibf5356fcb6df3deb2c4462d6003dd5654513895f
---
M .jscsrc
M .jshintrc
M Gruntfile.js
3 files changed, 37 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/69/129869/1

diff --git a/.jscsrc b/.jscsrc
index 231b958..e8e1763 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -1,23 +1,30 @@
 {
-"requireCurlyBraces": ["if", "else", "for", "while", "do"],
-"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", 
"switch", "return", "function"],
-"requireSpacesInFunctionExpression": {
-"beforeOpeningCurlyBrace": true
-},
-"requireMultipleVarDecl": true,
-"requireSpacesInsideObjectBrackets": "all",
-"disallowSpaceAfterObjectKeys": true,
-"disallowLeftStickedOperators": ["?", "+", "/", "*", "-", "=", "==", 
"===", "!=", "!==", ">", ">=", "<", "<="],
-"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", 
"===", "!=", "!==", ">", ">=", "<", "<="],
-"requireRightStickedOperators": ["!"],
-"requireLeftStickedOperators": [","],
-"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
-"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
-"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", 
"===", "!=", "!=="],
-"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", 
"===", "!=", "!=="],
-"disallowKeywords": [ "with" ],
-"disallowMultipleLineBreaks": true,
-"validateLineBreaks": "LF",
-"disallowKeywordsOnNewLine": ["else"],
-"requireLineFeedAtFileEnd": true
+   "requireCurlyBraces": ["if", "else", "for", "while", "do"],
+   "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", 
"switch", "return", "function"],
+   "requireParenthesesAroundIIFE": true,
+   "requireSpacesInFunctionExpression": {
+   "beforeOpeningCurlyBrace": true
+   },
+   "requireMultipleVarDecl": true,
+   "requireSpacesInsideObjectBrackets": "all",
+   "disallowSpaceAfterObjectKeys": true,
+   "requireCommaBeforeLineBreak": true,
+   "disallowLeftStickedOperators": ["?", ">", ">=", "<", "<="],
+   "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", 
"!=", "!==", ">", ">=", "<", "<="],
+   "requireRightStickedOperators": ["!"],
+   "requireLeftStickedOperators": [","],
+   "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
+   "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+   "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", 
"===", "!=", "!=="],
+   "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", 
"===", "!=", "!=="],
+   "requireCamelCaseOrUpperCaseIdentifiers": true,
+   "disallowKeywords": [ "with" ],
+   "disallowMultipleLineBreaks": true,
+   "validateLineBreaks": "LF",
+   "disallowKeywordsOnNewLine": ["else"],
+   "validateQuoteMarks": "'",
+   "disallowTrailingWhitespace": true,
+   "requireLineFeedAtFileEnd": true,
+   "requireCapitalizedConstructors": true,
+   "requireDotNotation": true
 }
diff --git a/.jshintrc b/.jshintrc
index cb37ce8..0d85438 100644
--- a/.jshintrc

[MediaWiki-commits] [Gerrit] Hygiene: Remove code from February that no longer applicable - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Remove code from February that no longer applicable
..


Hygiene: Remove code from February that no longer applicable

Change-Id: I1341958a9b59914753b41f3aad9850aa8ccee91d
---
M javascripts/modules/languages/languages.js
1 file changed, 1 insertion(+), 12 deletions(-)

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



diff --git a/javascripts/modules/languages/languages.js 
b/javascripts/modules/languages/languages.js
index 408ea8d..6723d26 100644
--- a/javascripts/modules/languages/languages.js
+++ b/javascripts/modules/languages/languages.js
@@ -1,17 +1,6 @@
 ( function( M, $ ) {
 
-   var LanguageOverlay = M.require( 'languages/LanguageOverlay' ),
-   $cachedHeading = $( '#section_language' ), label;
-   // FIXME: Remove after 30 days.
-   if ( $cachedHeading.length > 0 ) {
-   label = $cachedHeading.text();
-   $( '' ).
-   text( label ).
-   appendTo(
-   $( '' 
).insertBefore( '#mw-mf-language-section' )
-   );
-   $( '#mw-mf-language-section' ).remove();
-   }
+   var LanguageOverlay = M.require( 'languages/LanguageOverlay' );
 
M.overlayManager.add( /^\/languages$/, function() {
var LoadingOverlay = M.require( 'LoadingOverlayNew' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1341958a9b59914753b41f3aad9850aa8ccee91d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: 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] Adding two new queues/messages. - change (mediawiki...DonationInterface)

2014-04-25 Thread Katie Horn (Code Review)
Katie Horn has uploaded a new change for review.

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

Change subject: Adding two new queues/messages.
..

Adding two new queues/messages.

These will be the first messages to be shoveled into the new
"fredge" database:  Basically mirroring the data we currently
stash in the payments-initial and payments-fraud syslog buckets.

Change-Id: I748e6b3db77a9663c0e4b90d9b8985d08709a162
---
M DonationInterface.php
M activemq_stomp/activemq_stomp.php
M extras/custom_filters/custom_filters.body.php
M gateway_common/gateway.adapter.php
4 files changed, 110 insertions(+), 3 deletions(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index 613c7b4..e4e8788 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -543,7 +543,9 @@
$wgStompQueueNames = array(
'default' => 'test-default',// Previously known as 
$wgStompQueueName
'pending' => 'test-pending',// Previously known as 
$wgPendingStompQueueName
-   'limbo' => 'test-limbo',// Previously known as 
$wgLimboStompQueueName
+   'limbo' => 'test-limbo', // Previously known as 
$wgLimboStompQueueName
+   'payments-antifraud' => 'payments-antifraud', //noncritical: 
Basically shoving the fraud log into a database.
+   'payments-init' => 'payments-init', //noncritical: same as 
above with the payments-initial log
);
 }
 
@@ -840,6 +842,7 @@
$wgHooks['gwStomp'][] = 'sendSTOMP';
$wgHooks['gwPendingStomp'][] = 'sendPendingSTOMP';
$wgHooks['gwLimboStomp'][] = 'sendLimboSTOMP';
+   $wgHooks['gwFreeformStomp'][] = 'sendFreeformSTOMP';
 }
 
 //Custom Filters hooks
diff --git a/activemq_stomp/activemq_stomp.php 
b/activemq_stomp/activemq_stomp.php
index 798e874..bcfec52 100644
--- a/activemq_stomp/activemq_stomp.php
+++ b/activemq_stomp/activemq_stomp.php
@@ -100,7 +100,13 @@
$message = '';
$properties['antimessage'] = 'true';
} else {
-   $message = json_encode( createQueueMessage( $transaction ) );
+   if ( array_key_exists( 'freeform', $transaction ) ) {
+   $message = $transaction;
+   unset( $message['freeform'] );
+   } else {
+   $message = createQueueMessage( $transaction );
+   }
+   $message = json_encode( $message );
}
 
if ( array_key_exists( 'correlation-id', $transaction ) ) {
@@ -148,6 +154,19 @@
 }
 
 /**
+ * Hook to send transaction information to ActiveMQ server
+ * @deprecated Use sendSTOMP with $queue = 'limbo' instead
+ *
+ * @param array $transaction Key-value array of staged and ready donation data.
+ * @return bool Just returns true all the time. Presumably an indication that
+ * nothing exploded big enough to kill the whole thing.
+ */
+function sendFreeformSTOMP( $transaction, $queue ) {
+   $transaction['freeform'] = true;
+   return sendSTOMP( $transaction, $queue );
+}
+
+/**
  * Assign correct values to the array of data to be sent to the ActiveMQ server
  * TODO: Probably something else. I don't like the way this works and neither 
do you.
  *
diff --git a/extras/custom_filters/custom_filters.body.php 
b/extras/custom_filters/custom_filters.body.php
index 5427c26..fee005b 100644
--- a/extras/custom_filters/custom_filters.body.php
+++ b/extras/custom_filters/custom_filters.body.php
@@ -113,6 +113,25 @@
);
$log_message = '"' . addslashes( json_encode( $utm ) ) . '"';
$this->gateway_adapter->log( '"utm" ' . $log_message, LOG_INFO, 
'_fraud' );
+
+   //add a message to the fraud stats queue, so we can shovel it 
into the fredge.
+   $stomp_msg = array (
+   'filter_action' => $localAction,
+   'risk_score' => $this->getRiskScore(),
+   'score_breakdown' => $this->risk_score,
+   'php-message-class' => 
'SmashPig\CrmLink\Messages\DonationInterfaceAntifraud',
+   );
+   //frankly, everything else we need, we can get from 
contribution_tracking.
+   //...probably.
+
+   $stomp_msg = 
$this->gateway_adapter->makeFreeformStompTransaction( $stomp_msg );
+
+   try {
+   wfRunHooks( 'gwFreeformStomp', array ( $stomp_msg, 
'payments-antifraud' ) );
+   } catch ( Exception $e ) {
+   $this->log( 'Unable to send payments-antifraud 
message', LOG_ERR );
+   }
+
return TRUE;
}
 
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 784f502..8c8f279 100644
--- a/gateway_common/gateway.

[MediaWiki-commits] [Gerrit] WIP: Fix pipeline caching - change (mediawiki...parsoid)

2014-04-25 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: WIP: Fix pipeline caching
..

WIP: Fix pipeline caching

Change-Id: If8d9cc4f4c27f921bc00ce65ed848b9674af7312
---
M lib/mediawiki.parser.js
1 file changed, 26 insertions(+), 22 deletions(-)


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

diff --git a/lib/mediawiki.parser.js b/lib/mediawiki.parser.js
index 28b6915..7b3618f 100644
--- a/lib/mediawiki.parser.js
+++ b/lib/mediawiki.parser.js
@@ -40,6 +40,7 @@
DOMPostProcessor = 
require('./mediawiki.DOMPostProcessor.js').DOMPostProcessor;
 
 var ParserPipeline; // forward declaration
+var globalPipelineId = 0;
 
 function ParserPipelineFactory ( env ) {
this.pipelineCache = {};
@@ -264,7 +265,6 @@
return new ParserPipeline(
type,
stages,
-   options.cacheKey ? this.returnPipeline.bind( this, 
options.cacheKey ) : null,
this.env
);
 };
@@ -312,16 +312,23 @@
}
var pipe;
if ( this.pipelineCache[cacheKey].length ) {
-   //console.warn( JSON.stringify( this.pipelineCache[cacheKey] ));
pipe = this.pipelineCache[cacheKey].pop();
+   //console.log('got cached pipe', cacheKey, pipe.id);
} else {
+   //console.log('making new pipe', cacheKey);
options.cacheKey = cacheKey;
pipe = this.makePipeline( type, options );
}
+   pipe.removeAllListeners('end');
+   pipe.removeAllListeners('chunk');
+   pipe.removeAllListeners('document');
// add a cache callback
-   if ( this.returnToCacheCB ) {
-   pipe.last.addListener( 'end', this.returnToCacheCB );
-   }
+   pipe.last.addListener( 'end', this.returnPipeline.bind(this, cacheKey, 
pipe) );
+   pipe.last.addListener( 'document', this.returnPipeline.bind(this, 
cacheKey, pipe) );
+
+   // Debugging aid: Assign unique id to the pipeline
+   pipe.setPipelineIds(globalPipelineId++);
+
return pipe;
 };
 
@@ -329,12 +336,15 @@
  * Callback called by a pipeline at the end of its processing. Returns the
  * pipeline to the cache.
  */
-ParserPipelineFactory.prototype.returnPipeline = function ( type, pipe ) {
+ParserPipelineFactory.prototype.returnPipeline = function ( cacheKey, pipe ) {
// Clear all listeners, but do so after all other handlers have fired
//pipe.on('end', function() { pipe.removeAllListeners( ) });
-   pipe.removeAllListeners( );
-   var cache = this.pipelineCache[type];
-   if ( cache.length < 8 ) {
+   //console.log('ret pipe', pipe.id);
+   var cache = this.pipelineCache[cacheKey];
+   if (!cache) {
+   cache = this.pipelineCache[cacheKey] = [];
+   }
+   if ( cache.length < 200 ) {
cache.push( pipe );
}
 };
@@ -347,25 +357,19 @@
  * supposed to emit events, while the first is supposed to support a process()
  * method that sets the pipeline in motion.
  */
-var globalPipelineId = 0;
-ParserPipeline = function( type, stages, returnToCacheCB, env ) {
-   this.uid = globalPipelineId++;
+ParserPipeline = function( type, stages, env ) {
this.pipeLineType = type;
this.stages = stages;
this.first = stages[0];
this.last = stages.last();
this.env = env;
+};
 
-   // Debugging aid
-   var id = this.uid;
-   this.stages.forEach(function(stage) { stage.pipelineId = id; });
-
-   if ( returnToCacheCB ) {
-   var self = this;
-   this.returnToCacheCB = function () {
-   returnToCacheCB( self );
-   };
-   }
+ParserPipeline.prototype.setPipelineIds = function (id) {
+   this.id = id;
+   this.stages.forEach(function(stage) {
+   stage.pipelineId = id;
+   });
 };
 
 /*

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8d9cc4f4c27f921bc00ce65ed848b9674af7312
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] Element: Make onDOMEvent fix focusout in addition to focusin - change (oojs/ui)

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

Change subject: Element: Make onDOMEvent fix focusout in addition to focusin
..


Element: Make onDOMEvent fix focusout in addition to focusin

Using the exactly same approach, but listening to blur instead of focus.

Parameterized the event handling code so all that was needed to support
focusout was to create a separate instance parameterized with
'focusout' instead of 'focusin' and 'blur' instead of 'focus'.

Change-Id: Iee53b526aa7c6c1a20fda33872132e3014e0d290
---
M src/Element.js
1 file changed, 55 insertions(+), 41 deletions(-)

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



diff --git a/src/Element.js b/src/Element.js
index a6505ed..7294742 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -451,32 +451,52 @@
 
 ( function () {
// Static
-   var specialFocusin;
 
-   function handler( e ) {
-   jQuery.event.simulate( 'focusin', e.target, jQuery.event.fix( e 
), /* bubble = */ true );
+   // jQuery 1.8.3 has a bug with handling focusin/focusout events inside 
iframes.
+   // Firefox doesn't support focusin/focusout at all, so we listen for 
'focus'/'blur' on the
+   // document, and simulate a 'focusin'/'focusout' event on the target 
element and make
+   // it bubble from there.
+   //
+   // - http://jsfiddle.net/sw3hr/
+   // - http://bugs.jquery.com/ticket/14180
+   // - https://github.com/jquery/jquery/commit/1cecf64e5aa4153
+   function specialEvent( simulatedName, realName ) {
+   function handler( e ) {
+   jQuery.event.simulate(
+   simulatedName,
+   e.target,
+   jQuery.event.fix( e ),
+   /* bubble = */ true
+   );
+   }
+
+   return {
+   setup: function () {
+   var doc = this.ownerDocument || this,
+   attaches = $.data( doc, 'ooui-' + 
simulatedName + '-attaches' );
+   if ( !attaches ) {
+   doc.addEventListener( realName, 
handler, true );
+   }
+   $.data( doc, 'ooui-' + simulatedName + 
'-attaches', ( attaches || 0 ) + 1 );
+   },
+   teardown: function () {
+   var doc = this.ownerDocument || this,
+   attaches = $.data( doc, 'ooui-' + 
simulatedName + '-attaches' ) - 1;
+   if ( !attaches ) {
+   doc.removeEventListener( realName, 
handler, true );
+   $.removeData( doc, 'ooui-' + 
simulatedName + '-attaches' );
+   } else {
+   $.data( doc, 'ooui-' + simulatedName + 
'-attaches', attaches );
+   }
+   }
+   };
}
 
-   specialFocusin = {
-   setup: function () {
-   var doc = this.ownerDocument || this,
-   attaches = $.data( doc, 'ooui-focusin-attaches' 
);
-   if ( !attaches ) {
-   doc.addEventListener( 'focus', handler, true );
-   }
-   $.data( doc, 'ooui-focusin-attaches', ( attaches || 0 ) 
+ 1 );
-   },
-   teardown: function () {
-   var doc = this.ownerDocument || this,
-   attaches = $.data( doc, 'ooui-focusin-attaches' 
) - 1;
-   if ( !attaches ) {
-   doc.removeEventListener( 'focus', handler, true 
);
-   $.removeData( doc, 'ooui-focusin-attaches' );
-   } else {
-   $.data( doc, 'ooui-focusin-attaches', attaches 
);
-   }
-   }
-   };
+   var hasOwn = Object.prototype.hasOwnProperty,
+   specialEvents = {
+   focusin: specialEvent( 'focusin', 'focus' ),
+   focusout: specialEvent( 'focusout', 'blur' )
+   };
 
/**
 * Bind a handler for an event on a DOM element.
@@ -493,25 +513,15 @@
OO.ui.Element.onDOMEvent = function ( el, event, callback ) {
var orig;
 
-   if ( event === 'focusin' ) {
-   // jQuery 1.8.3 has a bug with handling focusin events 
inside iframes.
-   // Firefox doesn't support focusin at all, so we listen 
for 'focus' on the
-   // document, and simulate a 'focusi

[MediaWiki-commits] [Gerrit] Preview and screenshot links are valid - change (wikimedia...tools)

2014-04-25 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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

Change subject: Preview and screenshot links are valid
..

Preview and screenshot links are valid

Change-Id: I2932a604cee858924ae144b149efc6a021572694
---
M fundraising_ab_tests/fundraising_test.py
M fundraising_ab_tests/results.py
M fundraising_ab_tests/spec.py
3 files changed, 39 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/66/129866/1

diff --git a/fundraising_ab_tests/fundraising_test.py 
b/fundraising_ab_tests/fundraising_test.py
index 5255da8..a200024 100644
--- a/fundraising_ab_tests/fundraising_test.py
+++ b/fundraising_ab_tests/fundraising_test.py
@@ -4,6 +4,10 @@
 from results import get_banner_results
 
 class FrTest(object):
+"""Single N-way test
+
+Currently, only banner tests are supported."""
+
 def __init__(self, label=None, type="", campaign=None, banners=None, 
start=None, end=None, disabled=False, **ignore):
 for key in config.ignored_columns:
 if key in ignore:
@@ -51,7 +55,9 @@
 for name in self.banners:
 test_case = self.get_case(
 campaign=self.campaign['name'],
-banner=name
+banner=name,
+languages=self.campaign['languages'],
+countries=self.campaign['countries'],
 )
 cases.append(test_case)
 
diff --git a/fundraising_ab_tests/results.py b/fundraising_ab_tests/results.py
index d9704da..00a2008 100644
--- a/fundraising_ab_tests/results.py
+++ b/fundraising_ab_tests/results.py
@@ -7,6 +7,9 @@
 from fundraising_ab_tests.confidence import add_confidence
 
 class TestResult(object):
+"""Container for a test's results
+
+TODO: fix single-responsibility issue with criteria"""
 def __init__(self, criteria=None, results={}):
 self.criteria = criteria
 self.results = results
@@ -28,27 +31,34 @@
 return results
 
 def banner_results(criteria):
+"""Helper which retrieves performance statistics for the given test 
criteria"""
 results = get_totals(**criteria)
 impressions = get_impressions(**criteria)
 
+# FIXME: refactor to a variations hook
+#match = re.match(config.fr_banner_naming, criteria['banner'])
+#if match:
+#results.update({
+#'label': match.group("testname"),
+#'language': match.group("language"),
+#'variation': match.group("variation"),
+#'dropdown': match.group("dropdown") is "dr",
+#'country': match.group("country"),
+
+#})
+
+# Get example locales, to help generate valid links
+language = criteria['languages'][0]
+if criteria['countries']:
+country = criteria['countries'][0]
+else:
+country = 'US'
+
 results.update({
-'preview': 
"http://en.wikipedia.org/wiki/Special:Random?banner=%s&reset=1"; % 
criteria['banner'],
-'screenshot': "http://fundraising-archive.wmflabs.org/banner/%s.png"; % 
criteria['banner'],
+'preview': config.preview_format.format(banner=criteria['banner'], 
language=language, country=country),
+'screenshot': 
config.screenshot_format.format(banner=criteria['banner'], language=language),
 
 'impressions': str(impressions),
 })
-
-# FIXME: refactor to a variations hook
-match = re.match(config.fr_banner_naming, criteria['banner'])
-if match:
-results.update({
-'label': match.group("testname"),
-'language': match.group("language"),
-'variation': match.group("variation"),
-'dropdown': match.group("dropdown") is "dr",
-'country': match.group("country"),
-
-'preview': 
"http://en.wikipedia.org/wiki/Special:Random?banner=%s&country=%s&uselang=%s&reset=1";
 % (criteria['banner'], match.group("country"), match.group("language")),
-})
 
 return TestResult(criteria, results)
diff --git a/fundraising_ab_tests/spec.py b/fundraising_ab_tests/spec.py
index d2487ea..7e77536 100644
--- a/fundraising_ab_tests/spec.py
+++ b/fundraising_ab_tests/spec.py
@@ -1,8 +1,10 @@
-'''
+"""
+Specification for a list of tests
+
 TODO:
 * lots of refinement and clarification around test vs spec
 * match start_time to discriminate between mutations of an otherwise identical 
test...
-'''
+"""
 
 import re
 
@@ -12,10 +14,12 @@
 from process.logging import Logger as log
 
 def parse_spec(spec):
+"""Turn each row of a specification source into test objects"""
 for row in spec:
 yield FrTest(**row)
 
 def compare_test_fuzzy(a, b):
+"""Check whether the tests match closely enough to be considered 
identical."""
 if a.campaign['name'] == b.campaign['name'] and a.banners == b.banners:
 return True
 
@@ -47,6 +51,7 @@
 self.spe

[MediaWiki-commits] [Gerrit] Hygiene: PhpDoc, unused variables, etc - change (mediawiki...MobileFrontend)

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

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

Change subject: Hygiene: PhpDoc, unused variables, etc
..

Hygiene: PhpDoc, unused variables, etc

Change-Id: Idde8c07ebbb5563ba1245f3f77b3cb3f4ba97659
---
M includes/MobileContext.php
M includes/MobileFrontend.body.php
M includes/MobilePage.php
M includes/specials/MobileSpecialPage.php
M includes/specials/MobileSpecialPageFeed.php
M includes/specials/SpecialMobileContributions.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileHistory.php
M includes/specials/SpecialMobileLanguages.php
M includes/specials/SpecialMobileWatchlist.php
M includes/specials/SpecialUploads.php
11 files changed, 26 insertions(+), 27 deletions(-)


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

diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 34f2259..9c74c01 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -588,7 +588,6 @@
 
$parsedUrl = wfParseUrl( $url );
$this->updateMobileUrlHost( $parsedUrl );
-   $this->updateMobileUrlQueryString( $parsedUrl );
if ( $forceHttps ) {
$parsedUrl['scheme'] = 'https';
$parsedUrl['delimiter'] = '://';
@@ -703,15 +702,6 @@
// the "+ 1" removes the preceding "/" from the path sans 
$wgScriptPath
$pathSansScriptPath = substr( $parsedUrl[ 'path' ], 
$scriptPathLength + 1 );
$parsedUrl[ 'path' ] = $wgScriptPath . $templatePathSansToken . 
$pathSansScriptPath;
-   }
-
-   /**
-* Placeholder for potential future use of query string handling
-* FIXME: Is this function needed?
-* @param array $parsedUrl
-*/
-   protected function updateMobileUrlQueryString( &$parsedUrl ) {
-   return;
}
 
/**
diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index f8c339d..510e1be 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -9,8 +9,8 @@
 * @param array $data The data to be recorded against the schema
 */
public static function eventLog( $schema, $revision, $data ) {
-   if ( function_exists( 'efLogServerSideEvent' ) ) {
-   efLogServerSideEvent( $schema, $revision, $data );
+   if ( is_callable( 'EventLogging::logEvent' ) ) {
+   EventLogging::logEvent( $schema, $revision, $data );
}
}
 
diff --git a/includes/MobilePage.php b/includes/MobilePage.php
index 7323609..90249b0 100644
--- a/includes/MobilePage.php
+++ b/includes/MobilePage.php
@@ -14,10 +14,17 @@
 * @var Title: Title for page
 */
private $title;
+   /**
+* @var File
+*/
private $file;
private $content;
private $usePageImages;
 
+   /**
+* @param Title $title
+* @param File|bool $file
+*/
public function __construct( Title $title, $file = false ) {
$this->title = $title;
// @todo FIXME: check existence
diff --git a/includes/specials/MobileSpecialPage.php 
b/includes/specials/MobileSpecialPage.php
index feeb0d2..1f94852 100644
--- a/includes/specials/MobileSpecialPage.php
+++ b/includes/specials/MobileSpecialPage.php
@@ -12,7 +12,9 @@
 */
protected $unstyledContent = true;
 
-   /* Executes the page when available in the current $mode */
+   /**
+* Executes the page when available in the current $mode
+*/
public function executeWhenAvailable( $subPage ) {
}
 
diff --git a/includes/specials/MobileSpecialPageFeed.php 
b/includes/specials/MobileSpecialPageFeed.php
index 0654fd8..477a549 100644
--- a/includes/specials/MobileSpecialPageFeed.php
+++ b/includes/specials/MobileSpecialPageFeed.php
@@ -22,7 +22,7 @@
 * @param Title $title The title of the page that was edited
 * @fixme: Duplication with SpecialMobileWatchlist
 *
-* @return string: HTML code
+* @return string HTML code
 */
protected function formatComment( $comment, $title ) {
if ( $comment === '' ) {
@@ -38,7 +38,7 @@
/**
 * Renders a date header when necessary.
 * FIXME: Juliusz won't like this function.
-* @param MWTimestamp date The date of the current item
+* @param string $date The date of the current item
 */
protected function renderListHeaderWhereNeeded( $date ) {
if ( !isset( $this->lastDate ) || $date !== $this->lastDate ) {
@@ -63,7 +63,7 @@
 * @param string $diffLink url to the diff for the edit
 * @param string $username The username of the user that m

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 4dc8d28..a8ab447 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 4dc8d28..a8ab447
..

Syncronize VisualEditor: 4dc8d28..a8ab447

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/64/129864/1

diff --git a/VisualEditor b/VisualEditor
index 4dc8d28..a8ab447 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 4dc8d28ac37068a6b30741d07a096a863555aab1
+Subproject commit a8ab44772beaafdeab11b5a333164098bb7becfb

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I736d682c02e4ddf198b1a92464b6cfa443b5639b
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] Delete extensions nodes which have been made empty - change (mediawiki...VisualEditor)

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

Change subject: Delete extensions nodes which have been made empty
..


Delete extensions nodes which have been made empty

If they have allowedEmpty=false.

Also remove unnecessary instanceof check.

Change-Id: I388202c9da5673534486b1d9d345296feeec53c3
---
M modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
index dc0a5e2..fd22b0b 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
@@ -122,7 +122,7 @@
surfaceModel = this.getFragment().getSurface();
 
if ( this.constructor.static.allowedEmpty || this.input.getValue() !== 
'' ) {
-   if ( this.node instanceof this.constructor.static.nodeModel ) {
+   if ( this.node ) {
mwData = ve.copy( this.node.getAttribute( 'mw' ) );
this.updateMwData( mwData );
surfaceModel.change(
@@ -147,6 +147,10 @@
{ 'type': '/' + 
this.constructor.static.nodeModel.static.name }
] );
}
+   } else if ( this.node && !this.constructor.static.allowedEmpty ) {
+   // Content has been emptied on a node which isn't allowed to
+   // be empty, so delete it.
+   surfaceModel.getFragment().removeContent();
}
 
// Parent method

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I388202c9da5673534486b1d9d345296feeec53c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/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] Syncronize VisualEditor: 4dc8d28..a8ab447 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 4dc8d28..a8ab447
..


Syncronize VisualEditor: 4dc8d28..a8ab447

Change-Id: I736d682c02e4ddf198b1a92464b6cfa443b5639b
---
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 4dc8d28..a8ab447 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 4dc8d28ac37068a6b30741d07a096a863555aab1
+Subproject commit a8ab44772beaafdeab11b5a333164098bb7becfb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I736d682c02e4ddf198b1a92464b6cfa443b5639b
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] Only focus the surface on inspector close if range is not null - change (VisualEditor/VisualEditor)

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

Change subject: Only focus the surface on inspector close if range is not null
..


Only focus the surface on inspector close if range is not null

Change-Id: Ibdaac8dfb44bd5d1159237f52ef2aab0c9b26eb3
---
M modules/ve/ui/ve.ui.DesktopContext.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/ui/ve.ui.DesktopContext.js 
b/modules/ve/ui/ve.ui.DesktopContext.js
index 7d86af3..e6f4adf 100644
--- a/modules/ve/ui/ve.ui.DesktopContext.js
+++ b/modules/ve/ui/ve.ui.DesktopContext.js
@@ -260,7 +260,9 @@
 ve.ui.DesktopContext.prototype.onInspectorClose = function () {
this.inspectorClosing = false;
this.update();
-   this.getSurface().getView().focus();
+   if ( this.getSurface().getModel().getSelection() ) {
+   this.getSurface().getView().focus();
+   }
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdaac8dfb44bd5d1159237f52ef2aab0c9b26eb3
Gerrit-PatchSet: 2
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] Check for focus change on global mousedown - change (VisualEditor/VisualEditor)

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

Change subject: Check for focus change on global mousedown
..


Check for focus change on global mousedown

If the document is blurred (but still has a selection) it is
possible to clear the selection by clicking elsewhere without
triggering a focus or blur event, so listen to mousedown globally.

As we always check for a valid selection to trigger documentFocus/Blur
events it doesn't matter than many of these mousedowns aren't required.

Change-Id: Ic44e0f8efdca72a0ba4c5140d26cac909acaecaf
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 52f316d..e1ac30c 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -89,6 +89,13 @@
'focusout',
ve.bind( this.onFocusChange, this )
);
+   // It is possible for a mousedown to clear the selection
+   // without triggering a focus change event (e.g. if the
+   // document has been programmatically blurred) so trigger
+   // a focus change to check if we still have a selection
+   this.$document.on( {
+   'mousedown': ve.bind( this.onFocusChange, this )
+   } );
 
this.$pasteTarget.on( {
'cut': ve.bind( this.onCut, this ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic44e0f8efdca72a0ba4c5140d26cac909acaecaf
Gerrit-PatchSet: 2
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] Prevent focussing of the pasteTarget with tabIndex=-1 - change (VisualEditor/VisualEditor)

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

Change subject: Prevent focussing of the pasteTarget with tabIndex=-1
..


Prevent focussing of the pasteTarget with tabIndex=-1

We don't want people ending up in the hidden pasteTarget by
tabbing off the end of the document.

Change-Id: Ie38ce6a6f4604ddb036a1ffa35d24f6f0d0026f6
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 6c250ee..15f1cb9 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -123,7 +123,9 @@
this.$element.addClass( 've-ce-surface' );
this.$phantoms.addClass( 've-ce-surface-phantoms' );
this.$highlights.addClass( 've-ce-surface-highlights' );
-   this.$pasteTarget.addClass( 've-ce-surface-paste' ).prop( 
'contentEditable', 'true' );
+   this.$pasteTarget.addClass( 've-ce-surface-paste' )
+   .attr( 'tabIndex', -1 )
+   .prop( 'contentEditable', 'true' );
 
// Add elements to the DOM
this.$element.append( this.documentView.getDocumentNode().$element, 
this.$pasteTarget );

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

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

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


[MediaWiki-commits] [Gerrit] [BREAKING CHANGE] Simplify updateState params - change (VisualEditor/VisualEditor)

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

Change subject: [BREAKING CHANGE] Simplify updateState params
..


[BREAKING CHANGE] Simplify updateState params

Replace full/partial annotations and nodes with fragment and
let the tool compute them as needed.

Add caching to SurfaceFragment#getLeafNodes now that it may
be called multiple times as selectNodes is expensive.

Also pass through directionality in case the tool wants to know.

Marked as breaking change for the API change to updateState but
shouldn't break MW.

Change-Id: I8ac9802f776d914c78c36b41a0f000484e9fabf0
---
M modules/ve/dm/ve.dm.SurfaceFragment.js
M modules/ve/ui/tools/ve.ui.AnnotationTool.js
M modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js
M modules/ve/ui/tools/ve.ui.FormatTool.js
M modules/ve/ui/tools/ve.ui.IndentationTool.js
M modules/ve/ui/tools/ve.ui.InspectorTool.js
M modules/ve/ui/tools/ve.ui.ListTool.js
M modules/ve/ui/ve.ui.Tool.js
M modules/ve/ui/ve.ui.Toolbar.js
9 files changed, 47 insertions(+), 32 deletions(-)

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



diff --git a/modules/ve/dm/ve.dm.SurfaceFragment.js 
b/modules/ve/dm/ve.dm.SurfaceFragment.js
index 89cbac3..334acb6 100644
--- a/modules/ve/dm/ve.dm.SurfaceFragment.js
+++ b/modules/ve/dm/ve.dm.SurfaceFragment.js
@@ -28,6 +28,7 @@
this.excludeInsertions = !!excludeInsertions;
this.surface = surface;
this.range = range && range instanceof ve.Range ? range : 
surface.getSelection();
+   this.leafNodes = null;
 
// Short-circuit for invalid range null fragment
if ( !this.range ) {
@@ -94,6 +95,7 @@
txs = this.document.getCompleteHistorySince( 
this.historyPointer );
this.range = this.getTranslatedRange( txs, true );
this.historyPointer += txs.length;
+   this.leafNodes = null;
}
 };
 
@@ -445,7 +447,30 @@
if ( this.isNull() ) {
return [];
}
-   return this.document.selectNodes( this.getRange(), 'leaves' );
+
+   // Update in case the cache needs invalidating
+   this.update();
+   // Cache leafNodes because it's expensive to compute
+   if ( !this.leafNodes ) {
+   this.leafNodes = this.document.selectNodes( this.getRange( true 
), 'leaves' );
+   }
+   return this.leafNodes;
+};
+
+/**
+ * Get all leaf nodes excluding nodes where the selection is empty.
+ *
+ * @method
+ * @returns {Array} List of nodes and related information
+ */
+ve.dm.SurfaceFragment.prototype.getSelectedLeafNodes = function () {
+   var i, len, selectedLeafNodes = [], leafNodes = this.getLeafNodes();
+   for ( i = 0, len = leafNodes.length; i < len; i++ ) {
+   if ( len === 1 || !leafNodes[i].range || 
leafNodes[i].range.getLength() ) {
+   selectedLeafNodes.push( leafNodes[i].node );
+   }
+   }
+   return selectedLeafNodes;
 };
 
 /**
diff --git a/modules/ve/ui/tools/ve.ui.AnnotationTool.js 
b/modules/ve/ui/tools/ve.ui.AnnotationTool.js
index 2692cfa..25793a2 100644
--- a/modules/ve/ui/tools/ve.ui.AnnotationTool.js
+++ b/modules/ve/ui/tools/ve.ui.AnnotationTool.js
@@ -45,11 +45,11 @@
 /**
  * @inheritdoc
  */
-ve.ui.AnnotationTool.prototype.onUpdateState = function ( nodes, full ) {
+ve.ui.AnnotationTool.prototype.onUpdateState = function ( fragment ) {
// Parent method
ve.ui.Tool.prototype.onUpdateState.apply( this, arguments );
 
-   this.setActive( full.hasAnnotationWithName( 
this.constructor.static.annotation.name ) );
+   this.setActive( fragment.getAnnotations().hasAnnotationWithName( 
this.constructor.static.annotation.name ) );
 };
 
 /**
diff --git a/modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js 
b/modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js
index 5df6357..a733f2a 100644
--- a/modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js
+++ b/modules/ve/ui/tools/ve.ui.ClearAnnotationTool.js
@@ -46,12 +46,12 @@
 /**
  * @inheritdoc
  */
-ve.ui.ClearAnnotationTool.prototype.onUpdateState = function ( nodes, full, 
partial ) {
+ve.ui.ClearAnnotationTool.prototype.onUpdateState = function ( fragment ) {
// Parent method
ve.ui.Tool.prototype.onUpdateState.apply( this, arguments );
 
if ( !this.isDisabled() ) {
-   this.setDisabled( partial.isEmpty() );
+   this.setDisabled( fragment.getAnnotations( true ).isEmpty() );
}
 };
 
diff --git a/modules/ve/ui/tools/ve.ui.FormatTool.js 
b/modules/ve/ui/tools/ve.ui.FormatTool.js
index 0b75ee5..fc70bf7 100644
--- a/modules/ve/ui/tools/ve.ui.FormatTool.js
+++ b/modules/ve/ui/tools/ve.ui.FormatTool.js
@@ -48,11 +48,12 @@
 /**
  * @inheritdoc
  */
-ve.ui.FormatTool.prototype.onUpdateState = function ( nodes ) {
+ve.ui.FormatTool.prototype.onUpdateState = function ( fragment ) {
// Parent method
ve.ui.Tool.prototype.onUp

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2b99b8a..4dc8d28 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 2b99b8a..4dc8d28
..

Syncronize VisualEditor: 2b99b8a..4dc8d28

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/62/129862/1

diff --git a/VisualEditor b/VisualEditor
index 2b99b8a..4dc8d28 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2b99b8a1986bf2020a117aac716a6389d8f5c048
+Subproject commit 4dc8d28ac37068a6b30741d07a096a863555aab1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11d25e506b941401c3e89dd75c9c812460e9d38a
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: 2b99b8a..4dc8d28 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 2b99b8a..4dc8d28
..


Syncronize VisualEditor: 2b99b8a..4dc8d28

Change-Id: I11d25e506b941401c3e89dd75c9c812460e9d38a
---
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 2b99b8a..4dc8d28 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2b99b8a1986bf2020a117aac716a6389d8f5c048
+Subproject commit 4dc8d28ac37068a6b30741d07a096a863555aab1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11d25e506b941401c3e89dd75c9c812460e9d38a
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] Move toolbar updateState code into separate method - change (VisualEditor/VisualEditor)

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

Change subject: Move toolbar updateState code into separate method
..


Move toolbar updateState code into separate method

So that it can be called on intialize without a contextChange.

Change-Id: I2a3fa78b07dadd31963ff716339da5f7b75ff157
---
M modules/ve/ui/ve.ui.Toolbar.js
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/ui/ve.ui.Toolbar.js b/modules/ve/ui/ve.ui.Toolbar.js
index 8d99a8e..d904ad9 100644
--- a/modules/ve/ui/ve.ui.Toolbar.js
+++ b/modules/ve/ui/ve.ui.Toolbar.js
@@ -156,6 +156,13 @@
  * @fires updateState
  */
 ve.ui.Toolbar.prototype.onContextChange = function () {
+   this.updateToolState();
+};
+
+/**
+ * Update the state of the tools
+ */
+ve.ui.Toolbar.prototype.updateToolState = function () {
var i, len, leafNodes, dirInline, dirBlock, fragmentAnnotation,
fragment = this.surface.getModel().getFragment( null, false ),
nodes = [];
@@ -166,8 +173,8 @@
nodes.push( leafNodes[i].node );
}
}
-   // Update context direction for button icons UI
 
+   // Update context direction for button icons UI
// by default, inline and block directions are the same
if ( !fragment.isNull() ) {
dirInline = dirBlock = 
this.surface.getView().documentView.getDirectionFromRange( fragment.getRange() 
);
@@ -254,6 +261,8 @@
'floating': false,
'offset': this.elementOffset
} );
+   // Initial state
+   this.updateToolState();
 
if ( this.floatable ) {
this.$window.on( this.windowEvents );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a3fa78b07dadd31963ff716339da5f7b75ff157
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] Hygiene: Remove code from February that no longer applicable - change (mediawiki...MobileFrontend)

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

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

Change subject: Hygiene: Remove code from February that no longer applicable
..

Hygiene: Remove code from February that no longer applicable

Change-Id: I1341958a9b59914753b41f3aad9850aa8ccee91d
---
M javascripts/modules/languages/languages.js
1 file changed, 1 insertion(+), 12 deletions(-)


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

diff --git a/javascripts/modules/languages/languages.js 
b/javascripts/modules/languages/languages.js
index 408ea8d..6723d26 100644
--- a/javascripts/modules/languages/languages.js
+++ b/javascripts/modules/languages/languages.js
@@ -1,17 +1,6 @@
 ( function( M, $ ) {
 
-   var LanguageOverlay = M.require( 'languages/LanguageOverlay' ),
-   $cachedHeading = $( '#section_language' ), label;
-   // FIXME: Remove after 30 days.
-   if ( $cachedHeading.length > 0 ) {
-   label = $cachedHeading.text();
-   $( '' ).
-   text( label ).
-   appendTo(
-   $( '' 
).insertBefore( '#mw-mf-language-section' )
-   );
-   $( '#mw-mf-language-section' ).remove();
-   }
+   var LanguageOverlay = M.require( 'languages/LanguageOverlay' );
 
M.overlayManager.add( /^\/languages$/, function() {
var LoadingOverlay = M.require( 'LoadingOverlayNew' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1341958a9b59914753b41f3aad9850aa8ccee91d
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] Export showtoc and hidetoc messages - change (mediawiki...VisualEditor)

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

Change subject: Export showtoc and hidetoc messages
..


Export showtoc and hidetoc messages

Used by MWTocWidget.

Bug: 64464
Change-Id: Icbb98fec6960b6abf7ce6558ed6d6e090341f56b
---
M VisualEditor.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/VisualEditor.php b/VisualEditor.php
index f17a545..659b437 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -700,6 +700,8 @@
'visualeditor-wikitext-warning-title',
'visualeditor-window-title',
'toc',
+   'showtoc',
+   'hidetoc',
 
'captcha-edit',
// Only used if FancyCaptcha is installed and triggered 
on save

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbb98fec6960b6abf7ce6558ed6d6e090341f56b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Esanders 
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 public_results - change (wikimedia...tools)

2014-04-25 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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

Change subject: fix public_results
..

fix public_results

Change-Id: I86299df246f443ea6a72083437f2464f8bd0d35d
---
M live_analysis/publish_results
M mediawiki/centralnotice/contributions.py
M mediawiki/centralnotice/impressions.py
3 files changed, 7 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/61/129861/1

diff --git a/live_analysis/publish_results b/live_analysis/publish_results
index 71e09fd..5933f0e 100755
--- a/live_analysis/publish_results
+++ b/live_analysis/publish_results
@@ -12,8 +12,8 @@
 
 begin()
 
-log.info("Reading test specifications from 
{url}".format(url=config.test_spec_url))
-tests = read_gdoc_spec(doc=config.test_spec_url)
+log.info("Reading test specifications from 
{url}".format(url=config.spec_db.spec.url))
+tests = read_gdoc_spec(doc=config.spec_db.spec.url)
 
 # Compile statistics from the database
 results = []
@@ -21,12 +21,12 @@
 if not test.enabled:
 continue
 test.load_results()
-log.debug(test.results)
+#log.debug(test.results)
 # Flatten results into a list
 results.extend([r.__dict__ for r in test.results])
 #results.extend(test.results)
 
 # store in gdocs spreadsheet
-update_gdoc_results(doc=config.test_results_url, results=results)
+update_gdoc_results(doc=config.spec_db.results.url, results=results)
 
 end()
diff --git a/mediawiki/centralnotice/contributions.py 
b/mediawiki/centralnotice/contributions.py
index 1c8e47d..790f417 100644
--- a/mediawiki/centralnotice/contributions.py
+++ b/mediawiki/centralnotice/contributions.py
@@ -48,7 +48,7 @@
 query.columns.append('COUNT(cc.id) AS donations')
 
 query.tables.append(config.contribution_tracking_prefix + 
'contribution_tracking ct')
-query.tables.append("LEFT JOIN civicrm_contribution cc ON cc.id = 
ct.contribution_id")
+query.tables.append("civicrm_contribution cc ON cc.id = 
ct.contribution_id")
 
 if wheres:
 query.where.extend(wheres)
diff --git a/mediawiki/centralnotice/impressions.py 
b/mediawiki/centralnotice/impressions.py
index 3d54392..217030c 100644
--- a/mediawiki/centralnotice/impressions.py
+++ b/mediawiki/centralnotice/impressions.py
@@ -1,9 +1,10 @@
 from database import db
+from process.globals import config
 
 def get_impressions(campaign=None, banner=None, **ignore):
 query = db.Query()
 query.columns.append("SUM(count) AS count")
-query.tables.append("pgehres.bannerimpressions")
+
query.tables.append("{impressions_db}bannerimpressions".format(impressions_db=config.impressions_prefix))
 if campaign:
 query.where.append("campaign = %(campaign)s")
 query.params['campaign'] = campaign

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86299df246f443ea6a72083437f2464f8bd0d35d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 

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


[MediaWiki-commits] [Gerrit] Only focus the surface on inspector close if range is not null - change (VisualEditor/VisualEditor)

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

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

Change subject: Only focus the surface on inspector close if range is not null
..

Only focus the surface on inspector close if range is not null

Change-Id: Ibdaac8dfb44bd5d1159237f52ef2aab0c9b26eb3
---
M modules/ve/ui/ve.ui.DesktopContext.js
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/60/129860/1

diff --git a/modules/ve/ui/ve.ui.DesktopContext.js 
b/modules/ve/ui/ve.ui.DesktopContext.js
index 7d86af3..e6f4adf 100644
--- a/modules/ve/ui/ve.ui.DesktopContext.js
+++ b/modules/ve/ui/ve.ui.DesktopContext.js
@@ -260,7 +260,9 @@
 ve.ui.DesktopContext.prototype.onInspectorClose = function () {
this.inspectorClosing = false;
this.update();
-   this.getSurface().getView().focus();
+   if ( this.getSurface().getModel().getSelection() ) {
+   this.getSurface().getView().focus();
+   }
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdaac8dfb44bd5d1159237f52ef2aab0c9b26eb3
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] Check for focus change on global mousedown - change (VisualEditor/VisualEditor)

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

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

Change subject: Check for focus change on global mousedown
..

Check for focus change on global mousedown

If the document is blurred (but still has a selection) it is
possible to clear the selection by clicking elsewhere without
trigger a focus or blur event, so listen to mousedown globally.

As we always check for a valid selection to trigger documentFocus/Blur
events it doesn't matter than many of these mousedowns aren't required.

Change-Id: Ic44e0f8efdca72a0ba4c5140d26cac909acaecaf
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/59/129859/1

diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 52f316d..e1ac30c 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -89,6 +89,13 @@
'focusout',
ve.bind( this.onFocusChange, this )
);
+   // It is possible for a mousedown to clear the selection
+   // without triggering a focus change event (e.g. if the
+   // document has been programmatically blurred) so trigger
+   // a focus change to check if we still have a selection
+   this.$document.on( {
+   'mousedown': ve.bind( this.onFocusChange, this )
+   } );
 
this.$pasteTarget.on( {
'cut': ve.bind( this.onCut, this ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic44e0f8efdca72a0ba4c5140d26cac909acaecaf
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] [WIP] Add ability to global query a user's wikis - change (analytics/wikimetrics)

2014-04-25 Thread Terrrydactyl (Code Review)
Terrrydactyl has uploaded a new change for review.

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

Change subject: [WIP] Add ability to global query a user's wikis
..

[WIP] Add ability to global query a user's wikis

Work in progress.

Change-Id: I57f9103eac662ca1a85627dacba829e780c795e5
---
M wikimetrics/controllers/forms/cohort_upload.py
M wikimetrics/templates/csv_upload.html
M wikimetrics/templates/forms/csv_upload.html
3 files changed, 70 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/58/129858/1

diff --git a/wikimetrics/controllers/forms/cohort_upload.py 
b/wikimetrics/controllers/forms/cohort_upload.py
index bc0e471..5197f8c 100644
--- a/wikimetrics/controllers/forms/cohort_upload.py
+++ b/wikimetrics/controllers/forms/cohort_upload.py
@@ -1,7 +1,9 @@
 import csv
+import requests
 from wtforms import StringField, FileField, TextAreaField, RadioField
 from wtforms.validators import Required
 from wikimetrics.metrics.form_fields import RequiredIfNot
+
 
 from secure_form import WikimetricsSecureForm
 
@@ -19,6 +21,7 @@
 ('True', 'User Ids (Numbers found in the user_id column of the user 
table)'),
 ('False', 'User Names (Names found in the user_name column of the user 
table)')
 ])
+global_cohort= True
 
 @classmethod
 def from_request(cls, request):
@@ -39,6 +42,9 @@
 Returns
 nothing, but sets self.records to the parsed lines of the csv
 """
+
+if self.global_cohort is False:
+print "hiho"
 
 if self.csv.data:
 csv_file = normalize_newlines(self.csv.data.stream)
@@ -86,6 +92,28 @@
 return records
 
 
+def parse_global_records(unparsed):
+records = []
+for username in unparsed:
+parameters = {
+'action': 'query',
+'format': 'json',
+'meta'  : 'globaluserinfo',
+'guiprop'   : 'groups|merged|unattached'
+}
+parameters['guiuser'] = username
+r = requests.get('https://www.mediawiki.org/w/api.php', 
params=parameters)
+if "missing" in r.json()['query']['globaluserinfo']:
+pass
+parsed_username = parse_username(username)
+for accounts in r.json()['query']['globaluserinfo']['merged']:
+records.append({
+'username'  : parsed_username,
+'project'   : accounts['wiki'],
+})
+return records
+
+
 def parse_username(username):
 """
 parses uncapitalized, whitespace-padded, and weird-charactered mediawiki
diff --git a/wikimetrics/templates/csv_upload.html 
b/wikimetrics/templates/csv_upload.html
index abcf7fb..bca6521 100644
--- a/wikimetrics/templates/csv_upload.html
+++ b/wikimetrics/templates/csv_upload.html
@@ -1,25 +1,53 @@
 {% extends "layout.html" %}
 {% block body %}
-{% include "forms/csv_upload.html" %}
-
-Format
-Wikimetrics expects either a file or pasted text in comma separated 
format, as shown below. Project is the langauge or project code in which that 
username or userid exists.  Project is optional and will default to the 
cohort's default project.
-user_name,project
-user_id,project
-
-
-
-For Example
-Specify EITHER user names:
+
+
+Create a Cohort
+
+
+
+ 
+
+Project 
Specific
+Global
+
+
+
+{% include "forms/csv_upload.html" %}
+
+Format
+Wikimetrics expects either a file or pasted text in comma 
separated format, as shown below. Project is the langauge or project code in 
which that username or userid exists.  Project is optional and will default to 
the cohort's default project. You can have different projects within one cohort.
+user_name,project
+user_id,project
+
+
+
+For Example
+Specify EITHER user names:
 Evan (WMF),en
 Milimetric,en
 Without project is ok too
 User Names can even contain commas, but these need a project at the 
end,en
-OR User Ids:
+OR User Ids:
 123,en
 234,en
 456
+
+
+
+{% include "forms/global_upload.html" %}
+
+Format
+Wikimetrics expects either a file or pasted text in comma 
separated format, as shown below. With the global option, wikimetrics will look 
for all known accounts tied to the given usernames and automatically add them 
to the cohort.
+user_name
+
+
+
+
 
+
+
+
 {% endblock %}
 
 {% block scripts %}
diff --git a/wikimetrics/templates/forms/csv_upload.html 
b/wikimetrics/templates/forms/csv_upload.html
index 9f0a469..8e3fa69 100644
--- a/wikimetrics/templates/forms/csv_upload.html
+++ b/wikimetrics/templates/forms/cs

[MediaWiki-commits] [Gerrit] dm.MWTemplateSpecModel: Remove broken deprecation descriptio... - change (mediawiki...VisualEditor)

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

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

Change subject: dm.MWTemplateSpecModel: Remove broken deprecation description 
method
..

dm.MWTemplateSpecModel: Remove broken deprecation description method

This method is unused, and it's semantic intent is awkward (getting
the description if its deprecated an an empty string to indicate
not-deprecated).

Both because that as an API isn't very usable, and because it
can't be done as deprecated can also be "true" without a string
description (so we'd need a generic fallback string first).

Should probably be changed so that callers call isDeprecated()
first, and then use a method like this to get the deprecation
caption unconditionally (or with null as fallback if wrongly
called), but not an empty string.

Anyway, since we aren't using it right now, let's come up with
a better method at the time.

Change-Id: I9ef0368ba58daf1c7dc92d083ae79c108cc27638
---
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
1 file changed, 0 insertions(+), 10 deletions(-)


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

diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
index 1ee46c0..cd2834a 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
@@ -267,16 +267,6 @@
 };
 
 /**
- * Get parameter deprecation description.
- *
- * @param {string} name Parameter name
- * @returns {string} Explaining of why parameter is deprecated, empty if 
parameter is not deprecated
- */
-ve.dm.MWTemplateSpecModel.prototype.getParameterDeprecationDescription = 
function ( name ) {
-   return this.params[name].deprecated || '';
-};
-
-/**
  * Get all primary parameter names.
  *
  * @returns {string[]} Parameter names

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ef0368ba58daf1c7dc92d083ae79c108cc27638
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] Clear the focusedNode when the document is blurred - change (VisualEditor/VisualEditor)

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

Change subject: Clear the focusedNode when the document is blurred
..


Clear the focusedNode when the document is blurred

Bug: 64451
Change-Id: I648b5364778f38e242268bdca8135836e19b07ba
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 6c250ee..52f316d 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -428,6 +428,10 @@
this.surfaceObserver.stopTimerLoop();
this.surfaceObserver.pollOnce();
this.surfaceObserver.clear();
+   if ( this.focusedNode ) {
+   this.focusedNode.setFocused( false );
+   this.focusedNode = null;
+   }
this.dragging = false;
this.focused = false;
this.getModel().setSelection( null );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I648b5364778f38e242268bdca8135836e19b07ba
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] Restyle parameter pages - change (mediawiki...VisualEditor)

2014-04-25 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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

Change subject: Restyle parameter pages
..

Restyle parameter pages

* Move description to a popup behind a little info icon button
* Make required indicator generic status indicator (required/deprecated) and 
move to left of the field
* Move param name and actions to above the field
* Show deprecated status and description

Bonus:

* Use auto-focus on CitationDialog (whoops!)
* Make pages that aren't meant to scroll not scroll (whoops again!?)

Depends on I59211b2 in OOUI

Bug: 53612
Change-Id: I3b968ad14aa6c43b6484e2565a9367d2ebc72fc5
---
M VisualEditor.php
M modules/ve-mw/dm/models/ve.dm.MWParameterModel.js
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
M modules/ve-mw/ui/pages/ve.ui.MWParameterPlaceholderPage.js
M modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js
M modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js
M modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
M modules/ve-mw/ui/styles/pages/ve.ui.MWParameterPage.css
A modules/ve-mw/ui/themes/apex/ve.ui.MWFormatTool.css
M modules/ve-mw/ui/themes/apex/ve.ui.MWLinkTargetInputWidget.css
15 files changed, 228 insertions(+), 105 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index f17a545..7ec54ba 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -1039,17 +1039,22 @@
'visualeditor-dialog-transclusion-add-param',
'visualeditor-dialog-transclusion-add-template',
'visualeditor-dialog-transclusion-content',
+   'visualeditor-dialog-transclusion-deprecated-parameter',
+   
'visualeditor-dialog-transclusion-deprecated-parameter-description',
'visualeditor-dialog-transclusion-insert-template',
'visualeditor-dialog-transclusion-insert-transclusion',
'visualeditor-dialog-transclusion-loading',
'visualeditor-dialog-transclusion-multiple-mode',

'visualeditor-dialog-transclusion-no-template-description',
'visualeditor-dialog-transclusion-options',
+   'visualeditor-dialog-transclusion-param-info',
+   'visualeditor-dialog-transclusion-param-info-missing',
'visualeditor-dialog-transclusion-placeholder',
'visualeditor-dialog-transclusion-remove-content',
'visualeditor-dialog-transclusion-remove-param',
'visualeditor-dialog-transclusion-remove-template',
'visualeditor-dialog-transclusion-required-parameter',
+   
'visualeditor-dialog-transclusion-required-parameter-description',
'visualeditor-dialog-transclusion-single-mode',
'visualeditor-dialog-transclusion-title',
'visualeditor-dialog-transclusion-wikitext-label',
diff --git a/modules/ve-mw/dm/models/ve.dm.MWParameterModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWParameterModel.js
index e5d532a..f96f0d4 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWParameterModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWParameterModel.js
@@ -44,7 +44,6 @@
  * Check if parameter is required.
  *
  * @method
- * @param {string} name Parameter name
  * @returns {boolean} Parameter is required
  */
 ve.dm.MWParameterModel.prototype.isRequired = function () {
@@ -52,6 +51,16 @@
 };
 
 /**
+ * Check if parameter is deprecated.
+ *
+ * @method
+ * @returns {boolean} Parameter is deprecated
+ */
+ve.dm.MWParameterModel.prototype.isDeprecated = function () {
+   return this.template.getSpec().isParameterDeprecated( this.name );
+};
+
+/**
  * Get template parameter is part of.
  *
  * @returns {ve.dm.MWTemplateModel} Template
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
index 1ee46c0..5f63db1 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
@@ -270,10 +270,12 @@
  * Get parameter deprecation description.
  *
  * @param {string} name Parameter name
- * @returns {string} Explaining of why parameter is deprecated, empty if 
parameter is not deprecated
+ * @returns {string} Explaining of why parameter is deprecated, empty if 
parameter is either not
+ *   deprecated or no description has been specified
  */
 ve.dm.MWTemplateSpecModel.prototype.getParameterDeprecationDescrip

[MediaWiki-commits] [Gerrit] WIP: WorldPay Multiple Accounts - change (mediawiki...DonationInterface)

2014-04-25 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: WIP: WorldPay Multiple Accounts
..

WIP: WorldPay Multiple Accounts

Change-Id: I20d614164bbf234886abdc926c5111614e4a6d3a
---
M worldpay_gateway/worldpay.adapter.php
1 file changed, 30 insertions(+), 2 deletions(-)


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

diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 57e1c6a..0d84160 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -191,6 +191,8 @@
'payment_submethod',
'zip',
'street',
+   'username',
+   'user_password',
);
}
 
@@ -198,8 +200,8 @@
$this->accountInfo = array(
'IsTest' => $this->account_config[ 'Test' ],
'MerchantId' => $this->account_config[ 'MerchantId' ],
-   'UserName' => $this->account_config[ 'Username' ],
-   'UserPassword' => $this->account_config[ 'Password' ],
+   //'UserName' => $this->account_config[ 'Username' ],
+   //'UserPassword' => $this->account_config[ 'Password' ],
 
'StoreIDs' => $this->account_config[ 'StoreIDs' ],
);
@@ -757,6 +759,8 @@
'AcctName'  => 'wp_acctname',
'CVN'   => 'cvv',
'PTTID' => 'wp_pttid',
+   'UserName'  => 'username',
+   'UserPassword'  => 'user_password',
);
}
 
@@ -940,6 +944,30 @@
}
}
 
+   protected function pre_process_generatetoken() {
+   $this->staged_data['username'] = 
$this->account_config['Username'];
+   $this->staged_data['user_password'] = 
$this->account_config['Password'];
+   }
+
+   protected function pre_process_querytokendata() {
+   $this->pre_process_generatetoken();
+   }
+
+   protected function pre_process_queryauthorizedeposit() {
+   $submethod = $this->getData_Unstaged_Escaped( 
'payment_submethod' );
+   if ( array_key_exists( $submethod, 
$this->account_config['CardAccounts'] ) ) {
+   $this->staged_data['username'] = 
$this->account_config['CardAccounts'][$submethod]['Username'];
+   $this->staged_data['user_password'] = 
$this->account_config['CardAccounts'][$submethod]['Password'];
+   } else {
+   $this->staged_data['username'] = 
$this->account_config['Username'];
+   $this->staged_data['user_password'] = 
$this->account_config['Password'];
+   }
+   }
+
+   protected function pre_process_authorizepaymentforfraud() {
+   $this->pre_process_queryauthorizedeposit();
+   }
+
public function session_addDonorData() {
parent::session_addDonorData();
// XXX: We might end up moving this into a STOMP required field,

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

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

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


[MediaWiki-commits] [Gerrit] Obey specified behaviour and allow Param#deprecated to be bo... - change (mediawiki...TemplateData)

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

Change subject: Obey specified behaviour and allow Param#deprecated to be 
boolean true
..


Obey specified behaviour and allow Param#deprecated to be boolean true

Specified as {boolean|InterfaceText}, which means both false and true
must be valid values.

Bug: 53412
Change-Id: I0272c7acc85caed0b73a427e86f851792964214f
---
M TemplateDataBlob.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 0ce1cfb..6af8e5e 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -211,7 +211,7 @@
 
// Param.deprecated
if ( isset( $paramObj->deprecated ) ) {
-   if ( $paramObj->deprecated !== false && 
!is_string( $paramObj->deprecated ) ) {
+   if ( !is_bool( $paramObj->deprecated ) && 
!is_string( $paramObj->deprecated ) ) {
return Status::newFatal(
'templatedata-invalid-type',

"params.{$paramName}.deprecated",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0272c7acc85caed0b73a427e86f851792964214f
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Comment onDOMEvent hack - change (VisualEditor/VisualEditor)

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

Change subject: Comment onDOMEvent hack
..


Comment onDOMEvent hack

Change-Id: I3e247858d6c6436d8ec775b20b48d20f8fe70fb1
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 6c250ee..26bdd09 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -79,6 +79,7 @@
'copy': ve.bind( this.onCopy, this )
} );
 
+   // Use onDOMEvent to get jQuery focusin/focusout events to work in 
iframes
OO.ui.Element.onDOMEvent(
this.getElementDocument(),
'focusin',

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

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

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


[MediaWiki-commits] [Gerrit] Add info icon and alert indicator - change (oojs/ui)

2014-04-25 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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

Change subject: Add info icon and alert indicator
..

Add info icon and alert indicator

Change-Id: I59211b2af219f1f0bd1fda7555c090046f716197
---
M src/styles/Icons-raster.less
M src/styles/Icons-vector.less
A src/styles/images/icons/info.png
A src/styles/images/icons/info.svg
A src/styles/images/indicators/alert.png
A src/styles/images/indicators/alert.svg
6 files changed, 35 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/54/129854/1

diff --git a/src/styles/Icons-raster.less b/src/styles/Icons-raster.less
index 93a9367..c1a2e0b 100644
--- a/src/styles/Icons-raster.less
+++ b/src/styles/Icons-raster.less
@@ -47,6 +47,10 @@
.oo-ui-background-image('images/icons/help.png');
}
 
+   &-info {
+   .oo-ui-background-image('images/icons/info.png');
+   }
+
&-link {
.oo-ui-background-image('images/icons/link.png');
}
@@ -99,6 +103,10 @@
 /* Indicators */
 
 .oo-ui-indicator {
+   &-alert {
+   .oo-ui-background-image('images/indicators/alert.png');
+   }
+
&-down {
.oo-ui-background-image('images/indicators/down.png');
}
diff --git a/src/styles/Icons-vector.less b/src/styles/Icons-vector.less
index b6c00ce..ea0d5a9 100644
--- a/src/styles/Icons-vector.less
+++ b/src/styles/Icons-vector.less
@@ -47,6 +47,10 @@
.oo-ui-background-image('images/icons/help.svg');
}
 
+   &-info {
+   .oo-ui-background-image('images/icons/info.svg');
+   }
+
&-link {
.oo-ui-background-image('images/icons/link.svg');
}
@@ -100,6 +104,10 @@
 /* Indicators */
 
 .oo-ui-indicator {
+   &-alert {
+   .oo-ui-background-image('images/indicators/alert.svg');
+   }
+
&-down {
.oo-ui-background-image('images/indicators/down.svg');
}
diff --git a/src/styles/images/icons/info.png b/src/styles/images/icons/info.png
new file mode 100644
index 000..fb5cb5d
--- /dev/null
+++ b/src/styles/images/icons/info.png
Binary files differ
diff --git a/src/styles/images/icons/info.svg b/src/styles/images/icons/info.svg
new file mode 100644
index 000..e892c2a
--- /dev/null
+++ b/src/styles/images/icons/info.svg
@@ -0,0 +1,10 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="24" 
height="24" viewBox="0, 0, 24, 24">
+  
+
+
+
+  
+  
+
diff --git a/src/styles/images/indicators/alert.png 
b/src/styles/images/indicators/alert.png
new file mode 100644
index 000..132410f
--- /dev/null
+++ b/src/styles/images/indicators/alert.png
Binary files differ
diff --git a/src/styles/images/indicators/alert.svg 
b/src/styles/images/indicators/alert.svg
new file mode 100644
index 000..8c5d451
--- /dev/null
+++ b/src/styles/images/indicators/alert.svg
@@ -0,0 +1,9 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="12" 
height="12" viewBox="0, 0, 12, 12">
+  
+
+
+  
+  
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59211b2af219f1f0bd1fda7555c090046f716197
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal 

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


[MediaWiki-commits] [Gerrit] Fix timestamp position in topic container - change (mediawiki...Flow)

2014-04-25 Thread Spage (Code Review)
Spage has submitted this change and it was merged.

Change subject: Fix timestamp position in topic container
..


Fix timestamp position in topic container

It overlaps with other elements when you do things like:
Open edit title form, preview title

Bug: 64378
Change-Id: Icef13d22d446fc81cf93c98884762572fd3d296b
---
M modules/discussion/styles/topic.less
M templates/topic.html.php
2 files changed, 11 insertions(+), 6 deletions(-)

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



diff --git a/modules/discussion/styles/topic.less 
b/modules/discussion/styles/topic.less
index aa4b4ca..b59843f 100644
--- a/modules/discussion/styles/topic.less
+++ b/modules/discussion/styles/topic.less
@@ -223,6 +223,10 @@
text-decoration: underline;
}
}
+
+   .flow-topic-comments {
+   position: relative;
+   }
}
 
.flow-datestamp {
@@ -230,8 +234,8 @@
color: #898989 !important;
 
position: absolute;
-   right: 22px;
-   top: 40px;
+   right: 10px;
+   bottom: -10px;
 
a {
color: inherit;
diff --git a/templates/topic.html.php b/templates/topic.html.php
index 1baf92f..0f639a3 100644
--- a/templates/topic.html.php
+++ b/templates/topic.html.php
@@ -193,10 +193,6 @@

render( 'flow:timestamp.html.php', array(
-   'timestamp' => $topic->getLastModifiedObj(),
-   ), true );
?>
 
escaped();
?>

+   render( 
'flow:timestamp.html.php', array(
+   'timestamp' => 
$topic->getLastModifiedObj(),
+   ), true );
+   ?>




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icef13d22d446fc81cf93c98884762572fd3d296b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu 
Gerrit-Reviewer: Jdlrobson 
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] Pass a Title for context to Linker::makeExternalLink() - change (mediawiki/core)

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

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

Change subject: Pass a Title for context to Linker::makeExternalLink()
..

Pass a Title for context to Linker::makeExternalLink()

Only two usages without a title left in core:
- Skin::getCopyright()
- WikiMap::makeForeignLink()

Change-Id: I461310ab2d5b1661fc7916156c43b66df96bdeea
---
M includes/Article.php
M includes/ImagePage.php
M includes/parser/Parser.php
M includes/specials/SpecialAllmessages.php
M includes/specials/SpecialLinkSearch.php
M includes/specials/SpecialVersion.php
M skins/CologneBlue.php
7 files changed, 43 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/129853/1

diff --git a/includes/Article.php b/includes/Article.php
index e73fe9d..34ff480 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -1013,7 +1013,7 @@
// This is an externally redirected view, from some 
other wiki.
// If it was reported from a trusted site, supply a 
backlink.
if ( $wgRedirectSources && preg_match( 
$wgRedirectSources, $rdfrom ) ) {
-   $redir = Linker::makeExternalLink( $rdfrom, 
$rdfrom );
+   $redir = Linker::makeExternalLink( $rdfrom, 
$rdfrom, true, '', array(), $this->getContext()->getTitle() );
$outputPage->addSubtitle( wfMessage( 
'redirectedfrom' )->rawParams( $redir ) );
 
return true;
diff --git a/includes/ImagePage.php b/includes/ImagePage.php
index 8444223..60deeaa 100644
--- a/includes/ImagePage.php
+++ b/includes/ImagePage.php
@@ -691,7 +691,14 @@
# "Upload a new version of this file" link
$canUpload = $this->getTitle()->userCan( 'upload', 
$this->getContext()->getUser() );
if ( $canUpload && UploadBase::userCanReUpload( 
$this->getContext()->getUser(), $this->mPage->getFile()->name ) ) {
-   $ulink = Linker::makeExternalLink( 
$this->getUploadUrl(), wfMessage( 'uploadnewversion-linktext' )->text() );
+   $ulink = Linker::makeExternalLink(
+   $this->getUploadUrl(),
+   wfMessage( 'uploadnewversion-linktext' )->text()
+   true,
+   '',
+   array(),
+   $this->getContext()->getTitle()
+   );
$out->addHTML( "{$ulink}\n" );
} else {
$out->addHTML( "" . $this->getContext()->msg( 
'upload-disallowed-here' )->escaped() . "\n" );
@@ -889,8 +896,14 @@
if ( $file->isLocal() ) {
$link = Linker::linkKnown( $file->getTitle() );
} else {
-   $link = Linker::makeExternalLink( 
$file->getDescriptionUrl(),
-   $file->getTitle()->getPrefixedText() );
+   $link = Linker::makeExternalLink(
+   $file->getDescriptionUrl(),
+   $file->getTitle()->getPrefixedText()
+   true,
+   '',
+   array(),
+   $file->getTitle()
+   );
$fromSrc = wfMessage( 'shared-repo-from', 
$file->getRepo()->getDisplayName() )->text();
}
$out->addHTML( "{$link} {$fromSrc}\n" );
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 7423006..3b127f7 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1315,7 +1315,7 @@
substr( $m[0], 0, 20 ) . '"' );
}
$url = wfMessage( $urlmsg, $id 
)->inContentLanguage()->text();
-   return Linker::makeExternalLink( $url, "{$keyword} 
{$id}", true, $cssClass );
+   return Linker::makeExternalLink( $url, "{$keyword} 
{$id}", true, $cssClass, array(), $this->getTitle() );
} elseif ( isset( $m[5] ) && $m[5] !== '' ) {
# ISBN
$isbn = $m[5];
@@ -1377,7 +1377,8 @@
$text = Linker::makeExternalLink( $url,

$this->getConverterLanguage()->markNoConversion( $url, true ),
true, 'free',
-   $this->getExternalLinkAttribs( $url ) );
+   $this->getExternalLinkAttribs( $url ),
+   $this->getTitl

[MediaWiki-commits] [Gerrit] Export showtoc and hidetoc messages - change (mediawiki...VisualEditor)

2014-04-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Export showtoc and hidetoc messages
..

Export showtoc and hidetoc messages

Used by MWTocWidget.

Bug: 64464
Change-Id: Icbb98fec6960b6abf7ce6558ed6d6e090341f56b
---
M VisualEditor.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index f17a545..659b437 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -700,6 +700,8 @@
'visualeditor-wikitext-warning-title',
'visualeditor-window-title',
'toc',
+   'showtoc',
+   'hidetoc',
 
'captcha-edit',
// Only used if FancyCaptcha is installed and triggered 
on save

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

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

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


[MediaWiki-commits] [Gerrit] Clear the focusedNode when the document is blurred - change (VisualEditor/VisualEditor)

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

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

Change subject: Clear the focusedNode when the document is blurred
..

Clear the focusedNode when the document is blurred

Bug: 64451
Change-Id: I648b5364778f38e242268bdca8135836e19b07ba
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/51/129851/1

diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 6c250ee..52f316d 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -428,6 +428,10 @@
this.surfaceObserver.stopTimerLoop();
this.surfaceObserver.pollOnce();
this.surfaceObserver.clear();
+   if ( this.focusedNode ) {
+   this.focusedNode.setFocused( false );
+   this.focusedNode = null;
+   }
this.dragging = false;
this.focused = false;
this.getModel().setSelection( null );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I648b5364778f38e242268bdca8135836e19b07ba
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] Use link title as fallback for caption - change (mediawiki...MultimediaViewer)

2014-04-25 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Use link title as fallback for caption
..

Use link title as fallback for caption

This works because the title doesn't exist if there's no caption and we
won't get to this logic branch if the thumbnail is an explicit |thumb|
with a caption already.

Change-Id: If84c890e7b71880db640a0993f8e3d6cd59951b8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/513
---
M resources/mmv/mmv.bootstrap.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 007617f..9eb72f2 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -168,6 +168,8 @@
$thumbCaption = $thumbContain.closest( 
'.gallerybox' ).find( '.gallerytext' ).clone();
}
caption = this.htmlUtils.htmlToTextWithLinks( 
$thumbCaption.html() || '' );
+   } else if ( $link.prop( 'title' ) ) {
+   caption = $link.prop( 'title' );
}
 
if ( $thumb.closest( '#file' ).length > 0 ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If84c890e7b71880db640a0993f8e3d6cd59951b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur 

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


[MediaWiki-commits] [Gerrit] Delete extensions nodes which have been made empty - change (mediawiki...VisualEditor)

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

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

Change subject: Delete extensions nodes which have been made empty
..

Delete extensions nodes which have been made empty

If they have allowedEmpty=false.

Also remove unnecessary instanceof check.

Change-Id: I388202c9da5673534486b1d9d345296feeec53c3
---
M modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
index dc0a5e2..fd22b0b 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js
@@ -122,7 +122,7 @@
surfaceModel = this.getFragment().getSurface();
 
if ( this.constructor.static.allowedEmpty || this.input.getValue() !== 
'' ) {
-   if ( this.node instanceof this.constructor.static.nodeModel ) {
+   if ( this.node ) {
mwData = ve.copy( this.node.getAttribute( 'mw' ) );
this.updateMwData( mwData );
surfaceModel.change(
@@ -147,6 +147,10 @@
{ 'type': '/' + 
this.constructor.static.nodeModel.static.name }
] );
}
+   } else if ( this.node && !this.constructor.static.allowedEmpty ) {
+   // Content has been emptied on a node which isn't allowed to
+   // be empty, so delete it.
+   surfaceModel.getFragment().removeContent();
}
 
// Parent method

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I388202c9da5673534486b1d9d345296feeec53c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/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] Align topic form fields - change (mediawiki...Flow)

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

Change subject: Align topic form fields
..


Align topic form fields

Change-Id: I1638ff60c565d4143416b7221991b67c88d490ad
---
M modules/new/styles/forms.less
1 file changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/modules/new/styles/forms.less b/modules/new/styles/forms.less
index 025c77a..19132cc 100644
--- a/modules/new/styles/forms.less
+++ b/modules/new/styles/forms.less
@@ -56,24 +56,24 @@
}
 }
 
-// Make the new topic input mimic new topic text
-.flow-newtopic-form input.mw-ui-input {
-   padding-left: .75em;
-   font-size: 1.75em;
-   font-weight: bold;
-   line-height: 1.25em;
-}
-
-// Attach these two inputs together to make them seem like one congruous input
 .flow-newtopic-form {
-   .mw-ui-input,
-   textarea {
+   // Attach these two inputs together to make them seem like one 
congruous input
+   input.mw-ui-input,
+   textarea.mw-ui-input {
margin-top: 0;
margin-bottom: 0;
}
-   textarea {
+   textarea.mw-ui-input {
+   padding-left: 1.5em;
border-top-width: 0;
}
+   // Make the new topic input mimic new topic text
+   input.mw-ui-input {
+   padding-left: .75em;
+   font-size: 1.75em;
+   font-weight: bold;
+   line-height: 1.25em;
+   }
 }
 
 // Align reply textarea to make it mimic comment text styling

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1638ff60c565d4143416b7221991b67c88d490ad
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: SG 
Gerrit-Reviewer: EBernhardson 
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] Corrected wikicon classes, returned to old padding, increase... - change (mediawiki...Flow)

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

Change subject: Corrected wikicon classes, returned to old padding, increased 
font-size of topic field to match topic title
..


Corrected wikicon classes, returned to old padding, increased font-size of 
topic field to match topic title

Change-Id: Icf0bbf85a7ef8b1a792ab34606331cae62d45494
---
R modules/new/fonts/wikifont.eot
R modules/new/fonts/wikifont.svg
R modules/new/fonts/wikifont.ttf
R modules/new/fonts/wikifont.woff
M modules/new/styles/forms.less
M modules/new/styles/interactive.less
M modules/new/styles/layout.less
M modules/new/styles/settings/colors.less
8 files changed, 85 insertions(+), 107 deletions(-)

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



diff --git a/modules/new/fonts/WikiFont.eot b/modules/new/fonts/wikifont.eot
similarity index 100%
rename from modules/new/fonts/WikiFont.eot
rename to modules/new/fonts/wikifont.eot
Binary files differ
diff --git a/modules/new/fonts/WikiFont.svg b/modules/new/fonts/wikifont.svg
similarity index 100%
rename from modules/new/fonts/WikiFont.svg
rename to modules/new/fonts/wikifont.svg
diff --git a/modules/new/fonts/WikiFont.ttf b/modules/new/fonts/wikifont.ttf
similarity index 100%
rename from modules/new/fonts/WikiFont.ttf
rename to modules/new/fonts/wikifont.ttf
Binary files differ
diff --git a/modules/new/fonts/WikiFont.woff b/modules/new/fonts/wikifont.woff
similarity index 100%
rename from modules/new/fonts/WikiFont.woff
rename to modules/new/fonts/wikifont.woff
Binary files differ
diff --git a/modules/new/styles/forms.less b/modules/new/styles/forms.less
index ac20140..025c77a 100644
--- a/modules/new/styles/forms.less
+++ b/modules/new/styles/forms.less
@@ -19,7 +19,8 @@
textarea {
.boxSizing(border-box);
width: 100%;
-   padding: .8em .3em .8em 1.3em;
+   padding: .3em .3em .3em .6em;
+   display: block;
color: inherit;
font-family: inherit;
font-size: inherit;
@@ -57,7 +58,10 @@
 
 // Make the new topic input mimic new topic text
 .flow-newtopic-form input.mw-ui-input {
+   padding-left: .75em;
+   font-size: 1.75em;
font-weight: bold;
+   line-height: 1.25em;
 }
 
 // Attach these two inputs together to make them seem like one congruous input
diff --git a/modules/new/styles/interactive.less 
b/modules/new/styles/interactive.less
index b371b19..5b1c4d1 100644
--- a/modules/new/styles/interactive.less
+++ b/modules/new/styles/interactive.less
@@ -2,9 +2,9 @@
 @import 'mixins/helpers.less';
 
 @font-face {
-  font-family: 'WikiFont-Regular';
-  src: url('../fonts/WikiFont.eot');
-  src: url('../fonts/WikiFont.eot?#iefix') format('embedded-opentype'), 
url('../fonts/WikiFont.woff') format('woff'), url('../fonts/WikiFont.ttf')  
format('truetype'), 
url('../fonts/WikiFont.svg#b618f6c47120d6564c09540516f52967') format('svg');
+  font-family: 'Wikicon-Regular';
+  src: url('../fonts/wikifont.eot');
+  src: url('../fonts/wikifont.eot?#iefix') format('embedded-opentype'), 
url('../fonts/wikifont.woff') format('woff'), url('../fonts/wikifont.ttf')  
format('truetype'), 
url('../fonts/wikifont.svg#b618f6c47120d6564c09540516f52967') format('svg');
 }
 
 .flow-menu {
@@ -66,6 +66,7 @@
 
li {
display: block;
+   cursor: default;
}
 
.flow-menu-js-drop {
@@ -216,38 +217,17 @@
 
 // Show that the topic titlebar is clickable
 .flow-topic-titlebar {
-   cursor: pointer;
outline: none;
+
+   // ...but only in JS mode
+   .client-js & {
+   cursor: pointer;
+   }
 
// Render a shadow
&:hover,
&:focus {
.box-shadow( ~"inset 0 -1px 0px 1px @{colorGrayLighter}, 0 1px 
1px @{colorGrayLightest}" );
-
-   &:after {
-   display: inline-block;
-   font-family: 'WikiFont-Regular';
-   position: absolute;
-   font-size: 1em;
-   bottom: 0;
-   right: .5em;
-   color: @colorTextLight;
-
-   // Set icon
-   content: "\e040"; // compact
-   .flow-topic-collapsed-invert & {
-   content: "\e042"; // expanded
-   }
-   // Concept is inverted with compact styles
-   .flow-board-collapsed-compact &,
-   .flow-board-collapsed-topics & {
-   content: "\e042"; // expanded
-   }
-   .flow-board-collapsed-compact 
.flow-topic-collapsed-invert &,
-   .flow-board-collapsed-topics 
.flow-topic-collapsed-invert & {
-   content: "\e

[MediaWiki-commits] [Gerrit] Adjust light text down to 696969 to bring AA-compliant contr... - change (mediawiki...Flow)

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

Change subject: Adjust light text down to 696969 to bring AA-compliant contrast 
on EEE
..


Adjust light text down to 696969 to bring AA-compliant contrast on EEE

Change-Id: I4409cd963d6609b7d9c1ca65725a080954b05df9
---
M modules/new/styles/settings/colors.less
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/new/styles/settings/colors.less 
b/modules/new/styles/settings/colors.less
index ba3f019..852a7b2 100644
--- a/modules/new/styles/settings/colors.less
+++ b/modules/new/styles/settings/colors.less
@@ -11,10 +11,10 @@
 // Lightest gray; for non-text use
 @colorGrayLightest: #eee;
 
-// Dark gray; for body text
+// Dark gray; for body text (needed for WCAG 2 AA on #8b8b8b, AAA on #b0b0b0)
 @colorText: #252525;
-// Light gray; for less important body text and links
-@colorTextLight: #777;
+// Light gray; for less important body text and links (needed for WCAG 2 AA on 
#eee)
+@colorTextLight: #696969;
 
 // Blue; for contextual use of a continuing action
 @colorProgressive: #347bff;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4409cd963d6609b7d9c1ca65725a080954b05df9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: SG 
Gerrit-Reviewer: EBernhardson 
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 Vagrant plugin to perform reload action - change (mediawiki/vagrant)

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

Change subject: Add Vagrant plugin to perform reload action
..


Add Vagrant plugin to perform reload action

When the Vagrantfile receives changes such as additional port forwards
or changes to memory settings `vagrant reload` must be called to change
the settings of the Virtualbox virtual machine. Recently I689f7c1 added
tooling to make managing such changes with Puppet easier, but stopped
short of automating the application changes. This patch introduces
a Vagrant provisioner plugin that can be signaled to reload the virtual
machine and updates the vagrant::settings Puppet class to raise the
signal when Puppet managed configuration changes.

Bug: 64114
Change-Id: I30a1c5d4702e9d166d8bee3eb0fc843b319ae799
---
M Vagrantfile
M lib/mediawiki-vagrant.rb
A lib/mediawiki-vagrant/reload.rb
D puppet/modules/shout/lib/puppet/type/shout.rb
M puppet/modules/vagrant/manifests/settings.pp
5 files changed, 39 insertions(+), 66 deletions(-)

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



diff --git a/Vagrantfile b/Vagrantfile
index 1672e89..69dd278 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -167,6 +167,8 @@
 'shared_apt_cache'   => '/vagrant/apt-cache/',
 }
 end
+
+config.vm.provision :mediawiki_reload
 end
 
 
diff --git a/lib/mediawiki-vagrant.rb b/lib/mediawiki-vagrant.rb
index b986da6..e5aad5d 100644
--- a/lib/mediawiki-vagrant.rb
+++ b/lib/mediawiki-vagrant.rb
@@ -44,5 +44,10 @@
 hook.before(Vagrant::Action::Builtin::Provision, Middleware)
 end
 
+provisioner 'mediawiki_reload' do
+require 'mediawiki-vagrant/reload'
+MediaWikiVagrant::Reload
+end
+
 end
 end
diff --git a/lib/mediawiki-vagrant/reload.rb b/lib/mediawiki-vagrant/reload.rb
new file mode 100644
index 000..5006133
--- /dev/null
+++ b/lib/mediawiki-vagrant/reload.rb
@@ -0,0 +1,27 @@
+module MediaWikiVagrant
+class Reload < Vagrant.plugin('2', :provisioner)
+def initialize(machine, config)
+super(machine, config)
+end
+def configure(root_config)
+super(root_config)
+end
+def provision
+vagrant_home = File.expand_path @machine.env.root_path
+settings_dir = File.join(vagrant_home, 'vagrant.d')
+reload_trigger = File.join(settings_dir, 'RELOAD')
+if File.exists?(reload_trigger)
+@machine.ui.warn 'Reloading vagrant...'
+File.delete(reload_trigger)
+@machine.action(:reload, {})
+until @machine.communicate.ready? do
+sleep 0.5
+end
+@machine.ui.success 'Vagrant reloaded.'
+end
+end
+def cleanup
+super
+end
+end
+end
diff --git a/puppet/modules/shout/lib/puppet/type/shout.rb 
b/puppet/modules/shout/lib/puppet/type/shout.rb
deleted file mode 100644
index 9631dee..000
--- a/puppet/modules/shout/lib/puppet/type/shout.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# coding: UTF-8
-# puppet-shout - Shout at the user
-#
-require 'puppet/type'
-
-Puppet::Type.newtype(:shout) do
-@doc = "Tell the user about something important.
-
-Example:
-
-shout {'at the devil':
-message => 'Mötley Crüe rulz! \m/',
-}
-"
-
-newproperty(:message) do
-desc "The message to shout."
-
-def sync
-banner = '!' * 78
-pad = ' ' * 4
-msg = self.should.split("\n").map! {|m| m.strip}
-msg = msg.join("\n#{pad}")
-Puppet.send('alert',
-"\n#{banner}\n#{pad}#{msg}\n#{banner}")
-return
-end
-
-def retrieve
-:absent
-end
-
-def insync?(is)
-# Shout unless we are only fired on refresh
-sync unless @resource[:refreshonly] == :true
-
-# Horrible hack! We always return true from insync? so that puppet
-# doesn't log a notice of the value change in addition to the
-# announcement we may make.
-true
-end
-
-defaultto { @resource[:name] }
-end
-
-newparam(:refreshonly) do
-desc "Whether or not to repeatedly call this resource. If true, this
-resource will only be executed when another resource tells it to
-do so. If set to false, it will execute at each run."
-defaultto :true
-newvalues(:true, :false)
-end
-
-newparam(:name) do
-desc "The name of the shout resource"
-isnamevar
-end
-
-def refresh
-self.property(:message).sync
-end
-end
diff --git a/puppet/modules/vagrant/manifests/settings.pp 
b/puppet/modules/vagrant/manifests/settings.pp
index 766c4db..f224607 100644
--- a/puppet/modules/vagrant

[MediaWiki-commits] [Gerrit] Improved deep-click handling of topic collapser toggle - change (mediawiki...Flow)

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

Change subject: Improved deep-click handling of topic collapser toggle
..


Improved deep-click handling of topic collapser toggle

Change-Id: I69a69bf7e358ae344bf1a7009de8760b0919580b
---
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 9f00ed1..d9a8494 100644
--- a/modules/new/components/flow-board.js
+++ b/modules/new/components/flow-board.js
@@ -189,7 +189,7 @@
 * @param {Event} event
 */

FlowBoardComponent.UI.events.interactiveHandlers.topicCollapserToggle = 
function ( event ) {
-   if ( !$( event.target ).closest( 'a, button, input, 
textarea, select' ).length ) {
+   if ( !$( event.target ).closest( 'a, button, input, 
textarea, select, ul, ol' ).length ) {
$( this ).closest( '.flow-topic' ).toggleClass( 
'flow-topic-collapsed-invert' );
event.preventDefault();
this.blur();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69a69bf7e358ae344bf1a7009de8760b0919580b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: SG 
Gerrit-Reviewer: EBernhardson 
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] Obey documented behavior and allow deprecated: true - change (mediawiki...TemplateData)

2014-04-25 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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

Change subject: Obey documented behavior and allow deprecated: true
..

Obey documented behavior and allow deprecated: true

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/44/129844/1

diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 0ce1cfb..6af8e5e 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -211,7 +211,7 @@
 
// Param.deprecated
if ( isset( $paramObj->deprecated ) ) {
-   if ( $paramObj->deprecated !== false && 
!is_string( $paramObj->deprecated ) ) {
+   if ( !is_bool( $paramObj->deprecated ) && 
!is_string( $paramObj->deprecated ) ) {
return Status::newFatal(
'templatedata-invalid-type',

"params.{$paramName}.deprecated",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0272c7acc85caed0b73a427e86f851792964214f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal 

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


[MediaWiki-commits] [Gerrit] Fix broken test for LoginTask - change (apps...wikipedia)

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

Change subject: Fix broken test for LoginTask
..


Fix broken test for LoginTask

Still broken, but at least it ocmpiles

Change-Id: Ia9219766335afbee54a3cccae90633bfbb48f2a3
---
M wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
M wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
2 files changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
index 62a4e17..7ebaf15 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
@@ -3,7 +3,7 @@
 
 import android.content.*;
 import android.test.*;
-import org.wikimedia.wikipedia.test.R;
+import android.util.*;
 import org.wikipedia.*;
 import org.wikipedia.editing.*;
 import org.wikipedia.login.*;
@@ -34,9 +34,10 @@
 public void run() {
 new LoginTask(getInstrumentation().getTargetContext(), 
testWiki, username, password) {
 @Override
-public void onFinish(String result) {
+public void onFinish(LoginResult result) {
+super.onFinish(result);
 assertNotNull(result);
-assertEquals(result, "Success");
+assertEquals(result.getCode(), "Success");
 app.getEditTokenStorage().get(testWiki, new 
EditTokenStorage.TokenRetreivedCallback() {
 @Override
 public void onTokenRetreived(String token) {
diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java 
b/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
index 1feb7f6..b0391ff 100644
--- a/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
@@ -55,6 +55,3 @@
 return new LoginResult(result.optString("result"), user);
 }
 }
-
-
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9219766335afbee54a3cccae90633bfbb48f2a3
Gerrit-PatchSet: 4
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] More GET not POST fixes. - change (apps...wikipedia)

2014-04-25 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

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

Change subject: More GET not POST fixes.
..

More GET not POST fixes.

Change-Id: Ie31f2c8538567560b7364226a2d48ff3e6b055b0
---
M wikipedia/Data/Operations/DownloadLangLinksOp.m
M wikipedia/Data/Operations/DownloadSectionWikiTextOp.m
M wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m
M wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m
M wikipedia/Data/Operations/PageHistoryOp.m
M wikipedia/Data/Operations/PreviewWikiTextOp.m
M wikipedia/Data/Operations/SearchOp.m
M wikipedia/Data/Operations/SearchThumbUrlsOp.m
8 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/43/129843/1

diff --git a/wikipedia/Data/Operations/DownloadLangLinksOp.m 
b/wikipedia/Data/Operations/DownloadLangLinksOp.m
index 4946b03..0d44e4b 100644
--- a/wikipedia/Data/Operations/DownloadLangLinksOp.m
+++ b/wikipedia/Data/Operations/DownloadLangLinksOp.m
@@ -17,7 +17,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": @"query",
@"prop": 
@"langlinks",
diff --git a/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m 
b/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m
index 2fbaf82..3acf185 100644
--- a/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m
+++ b/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m
@@ -18,7 +18,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": @"query",
@"prop": 
@"revisions",
diff --git a/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m 
b/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m
index 732dd08..dd0a89b 100644
--- a/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m
+++ b/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m
@@ -18,7 +18,7 @@
 if (self) {
 // FUTURE FEATURE: Get multiple titles, and cache them so they're 
readily available
 // Will need to consider things like article language changes, though.
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": @"query",
@"list": @"random",
diff --git a/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m 
b/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m
index 801938a..6d3da92 100644
--- a/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m
+++ b/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m
@@ -16,7 +16,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": 
@"zeroconfig",
@"type": @"message",
diff --git a/wikipedia/Data/Operations/PageHistoryOp.m 
b/wikipedia/Data/Operations/PageHistoryOp.m
index 796c6bb..7ae44f2 100644
--- a/wikipedia/Data/Operations/PageHistoryOp.m
+++ b/wikipedia/Data/Operations/PageHistoryOp.m
@@ -38,7 +38,7 @@
 
 //NSLog(@"parameters = %@", parameters);
 
-weakSelf.request = [NSURLRequest postRequestWithURL: [NSURL 
URLWithString:[SessionSingleton sharedInstance].searchApiUrl]
+weakSelf.request = [NSURLRequest getRequestWithURL: [NSURL 
URLWithString:[SessionSingleton sharedInstance].searchApiUrl]
  parameters: parameters
 ];
 };
diff --git a/wikipedia/Data/Operations/PreviewWikiTextOp.m 
b/wikipedia/Data/Operations/PreviewWikiTextOp.m

[MediaWiki-commits] [Gerrit] Align topic form fields - change (mediawiki...Flow)

2014-04-25 Thread SG (Code Review)
SG has uploaded a new change for review.

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

Change subject: Align topic form fields
..

Align topic form fields

Change-Id: I1638ff60c565d4143416b7221991b67c88d490ad
---
M modules/new/styles/forms.less
1 file changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/modules/new/styles/forms.less b/modules/new/styles/forms.less
index 025c77a..19132cc 100644
--- a/modules/new/styles/forms.less
+++ b/modules/new/styles/forms.less
@@ -56,24 +56,24 @@
}
 }
 
-// Make the new topic input mimic new topic text
-.flow-newtopic-form input.mw-ui-input {
-   padding-left: .75em;
-   font-size: 1.75em;
-   font-weight: bold;
-   line-height: 1.25em;
-}
-
-// Attach these two inputs together to make them seem like one congruous input
 .flow-newtopic-form {
-   .mw-ui-input,
-   textarea {
+   // Attach these two inputs together to make them seem like one 
congruous input
+   input.mw-ui-input,
+   textarea.mw-ui-input {
margin-top: 0;
margin-bottom: 0;
}
-   textarea {
+   textarea.mw-ui-input {
+   padding-left: 1.5em;
border-top-width: 0;
}
+   // Make the new topic input mimic new topic text
+   input.mw-ui-input {
+   padding-left: .75em;
+   font-size: 1.75em;
+   font-weight: bold;
+   line-height: 1.25em;
+   }
 }
 
 // Align reply textarea to make it mimic comment text styling

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1638ff60c565d4143416b7221991b67c88d490ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: SG 

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


[MediaWiki-commits] [Gerrit] Adjust light text down to 696969 to bring AA-compliant contr... - change (mediawiki...Flow)

2014-04-25 Thread SG (Code Review)
SG has uploaded a new change for review.

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

Change subject: Adjust light text down to 696969 to bring AA-compliant contrast 
on EEE
..

Adjust light text down to 696969 to bring AA-compliant contrast on EEE

Change-Id: I4409cd963d6609b7d9c1ca65725a080954b05df9
---
M modules/new/styles/settings/colors.less
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/new/styles/settings/colors.less 
b/modules/new/styles/settings/colors.less
index ba3f019..852a7b2 100644
--- a/modules/new/styles/settings/colors.less
+++ b/modules/new/styles/settings/colors.less
@@ -11,10 +11,10 @@
 // Lightest gray; for non-text use
 @colorGrayLightest: #eee;
 
-// Dark gray; for body text
+// Dark gray; for body text (needed for WCAG 2 AA on #8b8b8b, AAA on #b0b0b0)
 @colorText: #252525;
-// Light gray; for less important body text and links
-@colorTextLight: #777;
+// Light gray; for less important body text and links (needed for WCAG 2 AA on 
#eee)
+@colorTextLight: #696969;
 
 // Blue; for contextual use of a continuing action
 @colorProgressive: #347bff;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4409cd963d6609b7d9c1ca65725a080954b05df9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: SG 

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


[MediaWiki-commits] [Gerrit] Improved deep-click handling of topic collapser toggle - change (mediawiki...Flow)

2014-04-25 Thread SG (Code Review)
SG has uploaded a new change for review.

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

Change subject: Improved deep-click handling of topic collapser toggle
..

Improved deep-click handling of topic collapser toggle

Change-Id: I69a69bf7e358ae344bf1a7009de8760b0919580b
---
M modules/new/components/flow-board.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/new/components/flow-board.js 
b/modules/new/components/flow-board.js
index 9f00ed1..d9a8494 100644
--- a/modules/new/components/flow-board.js
+++ b/modules/new/components/flow-board.js
@@ -189,7 +189,7 @@
 * @param {Event} event
 */

FlowBoardComponent.UI.events.interactiveHandlers.topicCollapserToggle = 
function ( event ) {
-   if ( !$( event.target ).closest( 'a, button, input, 
textarea, select' ).length ) {
+   if ( !$( event.target ).closest( 'a, button, input, 
textarea, select, ul, ol' ).length ) {
$( this ).closest( '.flow-topic' ).toggleClass( 
'flow-topic-collapsed-invert' );
event.preventDefault();
this.blur();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69a69bf7e358ae344bf1a7009de8760b0919580b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: SG 

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


[MediaWiki-commits] [Gerrit] Various rendering fixes - change (mediawiki...Flow)

2014-04-25 Thread SG (Code Review)
SG has uploaded a new change for review.

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

Change subject: Various rendering fixes
..

Various rendering fixes

Added no_header message when header revision missing entirely
Corrected progressiveEnhancement helper
Added temporary is_dev check to see if we are running under vagrant
Improved some phpdocs
Fixed small topic view disappearing username
Fixed small topic view padding and margin
Allow tooltip to break-word
Corrected 1px offset issue with tooltip

Change-Id: I40beb175ceaecb385268c1a634c6d4678fcb76e0
---
M handlebars/flow_block_header.html.handlebars
M handlebars/flow_block_header.html.handlebars.php
M handlebars/flow_block_topic.html.handlebars
M handlebars/flow_block_topiclist.html.handlebars
M handlebars/flow_block_topiclist.html.handlebars.php
M handlebars/flow_board.html.handlebars
M handlebars/flow_board.html.handlebars.php
M handlebars/flow_board_collapsers_subcomponent.html.handlebars
A handlebars/flow_board_collapsers_subcomponent.html.handlebars.php
M handlebars/flow_board_navigation.html.handlebars
M handlebars/flow_newtopic_form.html.handlebars
M handlebars/flow_post.html.handlebars
M handlebars/flow_post.html.handlebars.php
M handlebars/flow_reply_form.html.handlebars
M handlebars/flow_topic.html.handlebars
M handlebars/flow_topic_navigation.html.handlebars
M handlebars/form_element.html.handlebars
M handlebars/timestamp.html.handlebars
M handlebars/timestamp.html.handlebars.php
M includes/TemplateHelper.php
M modules/new/components/flow-board.js
M modules/new/styles/interactive.less
M modules/new/styles/layout.less
M modules/new/styles/mw-ui-flow.less
24 files changed, 104 insertions(+), 37 deletions(-)


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

diff --git a/handlebars/flow_block_header.html.handlebars 
b/handlebars/flow_block_header.html.handlebars
old mode 100644
new mode 100755
index e5560fe..dddc03c
--- a/handlebars/flow_block_header.html.handlebars
+++ b/handlebars/flow_block_header.html.handlebars
@@ -1,12 +1,16 @@
 
-   {{#with revision}}
-   {{#if content}}
-   {{html content}}
-   {{else}}
-   {{l10n "No_header"}}
-   {{/if}}
-   {{/with}}
+   {{#unless revision}}
+   {{l10n "No_header"}}
+   {{else}}
+   {{#with revision}}
+   {{#if content}}
+   {{html content}}
+   {{else}}
+   {{l10n "No_header"}}
+   {{/if}}
+   {{/with}}
+   {{/unless}}



-
\ No newline at end of file
+
diff --git a/handlebars/flow_block_header.html.handlebars.php 
b/handlebars/flow_block_header.html.handlebars.php
index a88576f..5eec655 100644
--- a/handlebars/flow_block_header.html.handlebars.php
+++ b/handlebars/flow_block_header.html.handlebars.php
@@ -15,16 +15,21 @@
 
 );
 return '
-   '.LCRun2::wi(((is_array($in) && isset($in['revision'])) ? 
$in['revision'] : null), $cx, $in, function($cx, $in) {return '
-   '.((LCRun2::ifvar(((is_array($in) && isset($in['content'])) ? 
$in['content'] : null))) ? '
-   '.LCRun2::ch('html', Array(((is_array($in) && 
isset($in['content'])) ? $in['content'] : null)), 'enc', $cx).'
-   ' : '
-   '.LCRun2::ch('l10n', Array('No_header'), 'enc', 
$cx).'
-   ').'
-   ';}).'
+   '.((!LCRun2::ifvar(((is_array($in) && isset($in['revision'])) ? 
$in['revision'] : null))) ? '
+   '.LCRun2::ch('l10n', Array('No_header'), 'enc', $cx).'
+   ' : '
+   '.LCRun2::wi(((is_array($in) && isset($in['revision'])) ? 
$in['revision'] : null), $cx, $in, function($cx, $in) {return '
+   '.((LCRun2::ifvar(((is_array($in) && 
isset($in['content'])) ? $in['content'] : null))) ? '
+   '.LCRun2::ch('html', Array(((is_array($in) && 
isset($in['content'])) ? $in['content'] : null)), 'enc', $cx).'
+   ' : '
+   '.LCRun2::ch('l10n', Array('No_header'), 
'enc', $cx).'
+   ').'
+   ';}).'
+   ').'



-';
+
+';
 }
 ?>
\ No newline at end of file
diff --git a/handlebars/flow_block_topic.html.handlebars 
b/handlebars/flow_block_topic.html.handlebars
old mode 100644
new mode 100755
diff --git a/handlebars/flow_block_topiclist.html.handlebars 
b/handlebars/flow_block_topiclist.html.handlebars
old mode 100644
new mode 100755
diff --git a/handlebars/flow_block_topiclist.html.handlebars.php 
b/handlebars/flow_block_topiclist.html.handlebars.php
index 3b90e28..6e00969 100644
--- a/handlebars/flow_block_topiclist.html.handlebars.php
+++ b/handlebars/flow_block_topiclist.html.handlebars.php
@@

[MediaWiki-commits] [Gerrit] Corrected wikicon classes, returned to old padding, increase... - change (mediawiki...Flow)

2014-04-25 Thread SG (Code Review)
SG has uploaded a new change for review.

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

Change subject: Corrected wikicon classes, returned to old padding, increased 
font-size of topic field to match topic title
..

Corrected wikicon classes, returned to old padding, increased font-size of 
topic field to match topic title

Change-Id: Icf0bbf85a7ef8b1a792ab34606331cae62d45494
---
M modules/new/styles/forms.less
M modules/new/styles/interactive.less
M modules/new/styles/layout.less
M modules/new/styles/settings/colors.less
4 files changed, 85 insertions(+), 107 deletions(-)


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

diff --git a/modules/new/styles/forms.less b/modules/new/styles/forms.less
index ac20140..025c77a 100644
--- a/modules/new/styles/forms.less
+++ b/modules/new/styles/forms.less
@@ -19,7 +19,8 @@
textarea {
.boxSizing(border-box);
width: 100%;
-   padding: .8em .3em .8em 1.3em;
+   padding: .3em .3em .3em .6em;
+   display: block;
color: inherit;
font-family: inherit;
font-size: inherit;
@@ -57,7 +58,10 @@
 
 // Make the new topic input mimic new topic text
 .flow-newtopic-form input.mw-ui-input {
+   padding-left: .75em;
+   font-size: 1.75em;
font-weight: bold;
+   line-height: 1.25em;
 }
 
 // Attach these two inputs together to make them seem like one congruous input
diff --git a/modules/new/styles/interactive.less 
b/modules/new/styles/interactive.less
index b371b19..5b1c4d1 100644
--- a/modules/new/styles/interactive.less
+++ b/modules/new/styles/interactive.less
@@ -2,9 +2,9 @@
 @import 'mixins/helpers.less';
 
 @font-face {
-  font-family: 'WikiFont-Regular';
-  src: url('../fonts/WikiFont.eot');
-  src: url('../fonts/WikiFont.eot?#iefix') format('embedded-opentype'), 
url('../fonts/WikiFont.woff') format('woff'), url('../fonts/WikiFont.ttf')  
format('truetype'), 
url('../fonts/WikiFont.svg#b618f6c47120d6564c09540516f52967') format('svg');
+  font-family: 'Wikicon-Regular';
+  src: url('../fonts/wikifont.eot');
+  src: url('../fonts/wikifont.eot?#iefix') format('embedded-opentype'), 
url('../fonts/wikifont.woff') format('woff'), url('../fonts/wikifont.ttf')  
format('truetype'), 
url('../fonts/wikifont.svg#b618f6c47120d6564c09540516f52967') format('svg');
 }
 
 .flow-menu {
@@ -66,6 +66,7 @@
 
li {
display: block;
+   cursor: default;
}
 
.flow-menu-js-drop {
@@ -216,38 +217,17 @@
 
 // Show that the topic titlebar is clickable
 .flow-topic-titlebar {
-   cursor: pointer;
outline: none;
+
+   // ...but only in JS mode
+   .client-js & {
+   cursor: pointer;
+   }
 
// Render a shadow
&:hover,
&:focus {
.box-shadow( ~"inset 0 -1px 0px 1px @{colorGrayLighter}, 0 1px 
1px @{colorGrayLightest}" );
-
-   &:after {
-   display: inline-block;
-   font-family: 'WikiFont-Regular';
-   position: absolute;
-   font-size: 1em;
-   bottom: 0;
-   right: .5em;
-   color: @colorTextLight;
-
-   // Set icon
-   content: "\e040"; // compact
-   .flow-topic-collapsed-invert & {
-   content: "\e042"; // expanded
-   }
-   // Concept is inverted with compact styles
-   .flow-board-collapsed-compact &,
-   .flow-board-collapsed-topics & {
-   content: "\e042"; // expanded
-   }
-   .flow-board-collapsed-compact 
.flow-topic-collapsed-invert &,
-   .flow-board-collapsed-topics 
.flow-topic-collapsed-invert & {
-   content: "\e040"; // compact
-   }
-   }
}
 
// Fade out the posts to show they will disappear
@@ -257,10 +237,10 @@
 }
 
 // Wikicons (glyphs)
-.WikiFont {
+.wikicon {
display: inline-block;
height: .8em;
-   font-family: 'WikiFont-Regular';
+   font-family: 'Wikicon-Regular';
-webkit-font-smoothing: antialiased;
font-size: 1.8em;
font-style: normal;
@@ -269,95 +249,95 @@
overflow: visible;
vertical-align: text-bottom;
 }
-.WikiFont:before {
+.wikicon:before {
//margin-left: -.25em;
 }
 
 /* UI ELEMENTS e000-023
 */
-.WikiFont-magnifying-glass:before {
+.wikicon-magnifying-glass:before {
   content: "\e000";
 }
-.WikiFont-arrow-left:before {
+.wikicon-arrow-left:before {
   content: "\e001";
 }
-.WikiFont-tick:before {
+.wikicon-tick:before {
   content: "\e002";
 }
-.

[MediaWiki-commits] [Gerrit] Add BagOStuff::setMulti for batch insertions - change (mediawiki/core)

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

Change subject: Add BagOStuff::setMulti for batch insertions
..


Add BagOStuff::setMulti for batch insertions

Includes implementions for Redis, Sql and MemcachedPecl,
other types will fallback to using $this->set repeatedly.

Change-Id: I0924a197b28ee69e883128ccd672343e5c041929
---
M includes/objectcache/BagOStuff.php
M includes/objectcache/MemcachedPeclBagOStuff.php
M includes/objectcache/RedisBagOStuff.php
M includes/objectcache/SqlBagOStuff.php
4 files changed, 161 insertions(+), 0 deletions(-)

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



diff --git a/includes/objectcache/BagOStuff.php 
b/includes/objectcache/BagOStuff.php
index 74af7a4..56f1be2 100644
--- a/includes/objectcache/BagOStuff.php
+++ b/includes/objectcache/BagOStuff.php
@@ -248,6 +248,23 @@
}
 
/**
+* Batch insertion
+* @param array $data $key => $value assoc array
+* @param int $exptime Either an interval in seconds or a unix 
timestamp for expiry
+* @return bool success
+* @since 1.24
+*/
+   public function setMulti( array $data, $exptime = 0 ) {
+   $res = true;
+   foreach ( $data as $key => $value ) {
+   if ( !$this->set( $key, $value, $exptime ) ) {
+   $res = false;
+   }
+   }
+   return $res;
+   }
+
+   /**
 * @param string $key
 * @param mixed $value
 * @param int $exptime
diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php 
b/includes/objectcache/MemcachedPeclBagOStuff.php
index 5a96f7b..f7dfe46 100644
--- a/includes/objectcache/MemcachedPeclBagOStuff.php
+++ b/includes/objectcache/MemcachedPeclBagOStuff.php
@@ -250,6 +250,27 @@
return $this->checkResult( false, $result );
}
 
+   /**
+* @param array $data
+* @param int $exptime
+* @return bool
+*/
+   public function setMulti( array $data, $exptime = 0 ) {
+   wfProfileIn( __METHOD__ );
+   foreach ( $data as $key => $value ) {
+   $encKey = $this->encodeKey( $key );
+   if ( $encKey !== $key ) {
+   $data[$encKey] = $value;
+   unset( $data[$key] );
+   }
+   }
+   $this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data 
) ) . ')' );
+   $result = $this->client->setMulti( $data, $this->fixExpiry( 
$exptime ) );
+   wfProfileOut( __METHOD__ );
+   return $this->checkResult( false, $result );
+   }
+
+
/* NOTE: there is no cas() method here because it is currently not 
supported
 * by the BagOStuff interface and other BagOStuff subclasses, such as
 * SqlBagOStuff.
diff --git a/includes/objectcache/RedisBagOStuff.php 
b/includes/objectcache/RedisBagOStuff.php
index d6d49ae..e770b73 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -211,6 +211,59 @@
return $result;
}
 
+   /**
+* @param array $data
+* @param int $expiry
+* @return bool
+*/
+   public function setMulti( array $data, $expiry = 0 ) {
+   $section = new ProfileSection( __METHOD__ );
+
+   $batches = array();
+   $conns = array();
+   foreach ( $data as $key => $value ) {
+   list( $server, $conn ) = $this->getConnection( $key );
+   if ( !$conn ) {
+   continue;
+   }
+   $conns[$server] = $conn;
+   $batches[$server][] = $key;
+   }
+
+   $expiry = $this->convertToRelative( $expiry );
+   $result = true;
+   foreach ( $batches as $server => $batchKeys ) {
+   $conn = $conns[$server];
+   try {
+   $conn->multi( Redis::PIPELINE );
+   foreach ( $batchKeys as $key ) {
+   if ( $expiry ) {
+   $conn->setex( $key, $expiry, 
$this->serialize( $data[$key] ) );
+   } else {
+   $conn->set( $key, 
$this->serialize( $data[$key] ) );
+   }
+   }
+   $batchResult = $conn->exec();
+   if ( $batchResult === false ) {
+   $this->debug( "setMulti request to 
$server failed" );
+  

[MediaWiki-commits] [Gerrit] contint: extract android SDK dependencies to a module - change (operations/puppet)

2014-04-25 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: contint: extract android SDK dependencies to a module
..


contint: extract android SDK dependencies to a module

The Android SDK requires a few specific packages and ant 1.8+.  It is
being used by other projects than contint (ex: on Tools Labs) so this is
factoring out the code to a new androidsdk module.

* creates module androidsdk
* get rid of contint::android-sdk, moved to androidsdk::dependencies
* Tools Labs might want the packages to be ensure => latest, so have the
  dependency class to accept a different ensure value for packages it
  defines.
* be paranoid and only define Package['ant'] when it is not there already.
* remove obsolete ant18 class since Ubuntu Precise ship ant 1.8 by
  default
* Move out android SDK include from gallium in favor of an include in
  contint::packages (one less line in site.pp).

Change-Id: Ic37af0fd68fbabe0c8defbdc865364e142118290
---
M manifests/site.pp
A modules/androidsdk/manifests/dependencies.pp
D modules/contint/manifests/android-sdk.pp
M modules/contint/manifests/packages.pp
4 files changed, 32 insertions(+), 55 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index bf83983..998ac52 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1024,7 +1024,6 @@
 
 include standard
 include contint::firewall
-include contint::android-sdk
 include role::ci::master
 include role::ci::slave
 include role::ci::testswarm
diff --git a/modules/androidsdk/manifests/dependencies.pp 
b/modules/androidsdk/manifests/dependencies.pp
new file mode 100644
index 000..a364a29
--- /dev/null
+++ b/modules/androidsdk/manifests/dependencies.pp
@@ -0,0 +1,31 @@
+# == Class androidsdk::dependencies
+#
+# Class installing prerequisites to the Android SDK.
+#
+# The SDK itself need to be installed manually for now.
+#
+# Help link: http://developer.android.com/sdk/installing.html
+#
+# == Parameters
+#
+# [*ensure*] puppet stanza passed to package definitions. Default: 'present'
+class androidsdk::dependencies( $ensure = 'present' ) {
+
+if ! defined(Package['ant']) {
+package { 'ant':
+ensure => $ensure,
+}
+}
+
+# 32bit libs needed by Android SDK
+# ..but NOT just all of ia32-libs ..
+package { [
+'libgcc1:i386',
+'libncurses5:i386',
+'libsdl1.2debian:i386',
+'libstdc++6:i386',
+'zlib1g:i386',
+]: ensure => $ensure;
+}
+
+}
diff --git a/modules/contint/manifests/android-sdk.pp 
b/modules/contint/manifests/android-sdk.pp
deleted file mode 100644
index 681dde3..000
--- a/modules/contint/manifests/android-sdk.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-# vim: set ts=2 sw=2 et :
-# continuous integration (CI)
-
-class contint::android-sdk {
-# Class installing prerequisites to the Android SDK
-# The SDK itself need to be installed manually for now.
-#
-# Help link: http://developer.android.com/sdk/installing.html
-
-include contint::packages::ant18
-
-# 32bit libs needed by Android SDK
-# ..but NOT just all of ia32-libs ..
-package { [
-'libstdc++6:i386',
-'libgcc1:i386',
-'zlib1g:i386',
-'libncurses5:i386',
-'libsdl1.2debian:i386',
-'libswt-gtk-3.5-java'
-]: ensure => installed;
-}
-}
diff --git a/modules/contint/manifests/packages.pp 
b/modules/contint/manifests/packages.pp
index 32b16c5..aed42ad 100644
--- a/modules/contint/manifests/packages.pp
+++ b/modules/contint/manifests/packages.pp
@@ -5,9 +5,7 @@
 #
 class contint::packages {
 
-# Make sure we use ant version 1.8 or we will have a conflict
-# with android
-include contint::packages::ant18
+include androidsdk::dependencies
 
 # Get several OpenJDK packages including the jdk to build mobile
 # applications.
@@ -189,33 +187,5 @@
 'ocaml-nox',
 ]:
 ensure => present;
-}
-}
-
-
-class contint::packages::ant18 {
-
-if ($::lsbdistcodename == 'lucid') {
-# When specifying 'latest' for package 'ant' on Lucid it will actually
-# install ant1.7 which might not be the version we want. This is 
similar to
-# the various gcc version packaged in Debian, albeit ant1.7 and ant1.8 
are
-# conflicting with each others.
-# Thus, this let us explicitly install ant version 1.8
-package { [
-'ant1.8'
-]:
-ensure => installed,
-}
-package { [
-'ant',
-'ant1.7'
-]:
-ensure => absent,
-}
-} else {
-# Ubuntu post Lucid ship by default with ant 1.8 or later
-package { ['ant']:
-ensure => installed,
-}
 }
 }

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

[MediaWiki-commits] [Gerrit] Hygiene: Introduce border-box class - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Introduce border-box class
..


Hygiene: Introduce border-box class

Apply to
* Carousel for first time uploaders
* Overlays and inputs inside them
* Inputs on login form
* Left navigation drawer and main content drawer
* Upload Progress bar
* Secondary page action links to languages and geonotahack
* Main search input form
* toast
* Textarea in photo upload overlay
* User info box in diff page
* profile page captions
Change-Id: Ifd377b2310f806d002ac2d3e9846765aea59eb9f
---
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMinerva.php
M includes/skins/UserLoginMobileTemplate.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialUserProfile.php
M javascripts/common/Overlay.js
M javascripts/common/toast.js
M javascripts/modules/editor/EditorOverlayBase.js
M javascripts/modules/editor/VisualEditorOverlay.js
M javascripts/modules/nearbypages.js
M javascripts/modules/notifications/NotificationsOverlay.js
M javascripts/modules/uploads/PhotoUploadOverlay.js
M javascripts/modules/uploads/UploadTutorial.js
M javascripts/widgets/progress-bar.js
M less/common/OverlayNew.less
M less/common/common-js.less
M less/common/common.less
M less/common/mainmenu.less
M less/common/secondaryPageActions.less
M less/common/toast.less
M less/common/ui.less
M less/modules/uploads/PhotoUploadOverlay.less
M less/modules/uploads/UploadTutorial.less
M less/specials/mobilediff.less
M less/specials/userprofile.less
M templates/OverlayNew.html
M templates/modules/editor/EditorOverlay.html
M templates/modules/editor/EditorOverlayBase.html
M templates/modules/search/SearchOverlay.html
M templates/overlays/talkSectionAdd.html
M templates/page.html
M templates/talkSection.html
M templates/uploads/PhotoUploadOverlay.html
M templates/uploads/PhotoUploadProgress.html
34 files changed, 49 insertions(+), 61 deletions(-)

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



diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index bc29a4d..9e01047 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -122,7 +122,7 @@
$languageLabel = wfMessage( 
'mobile-frontend-language-article-heading' )->text();
 
echo Html::element( 'a', array(
-   'class' => 'mw-ui-button mw-ui-progressive 
button languageSelector',
+   'class' => 'mw-ui-button mw-ui-progressive 
button languageSelector border-box',
'href' => $languageUrl
), $languageLabel );
}
@@ -224,12 +224,12 @@
echo $data[ 'headelement' ];
?>

-   
+   
renderMainMenu( $data );
?>

-   
+   
data['banners'] as 
$banner ):
echo $banner;
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 4102a41..830badf 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -466,6 +466,7 @@
return $link;
}
 
+   // FIXME: Move to MinervaTemplate
protected function getSearchPlaceHolderText() {
return wfMessage( 'mobile-frontend-placeholder' )->text();
}
@@ -514,10 +515,11 @@
}
}
 
+   // FIXME: Move to MinervaTemplate
protected function prepareSearch( BaseTemplate $tpl ) {
$searchBox = array(
'id' => 'searchInput',
-   'class' => 'search',
+   'class' => 'search border-box',
'autocomplete' => 'off',
// The placeholder gets fed to HTML::element later 
which escapes all
// attribute values, so no need to escape the string 
here.
diff --git a/includes/skins/UserLoginMobileTemplate.php 
b/includes/skins/UserLoginMobileTemplate.php
index 49102b5..4a3d0ce 100644
--- a/includes/skins/UserLoginMobileTemplate.php
+++ b/includes/skins/UserLoginMobileTemplate.php
@@ -62,14 +62,14 @@
'class' => 'inputs-box',
) ) .
Html::input( 'wpName', $username, 'text',
-   array( 'class' => 'loginText',
+   array( 'class' => 'loginText border-box',
'placeholder' => wfMessage( 
'mobile-frontend-username-placeholder' )->text(),
'id' => 'wpName1',
'tabindex' => '1',

[MediaWiki-commits] [Gerrit] Removes 'segmentCount' variable. - change (mediawiki...cxserver)

2014-04-25 Thread Zilch (Code Review)
Zilch has uploaded a new change for review.

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

Change subject: Removes 'segmentCount' variable.
..

Removes 'segmentCount' variable.

- Along with the variable, respective getter method was also removed.

Bug: 62204
Change-Id: I29f1529e4007f75112d7a91b10a26b2f919f6c26
---
M segmentation/CXSegmenter.js
1 file changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/segmentation/CXSegmenter.js b/segmentation/CXSegmenter.js
index 7591432..3ba9e5e 100644
--- a/segmentation/CXSegmenter.js
+++ b/segmentation/CXSegmenter.js
@@ -14,7 +14,6 @@
 
 function CXSegmenter( content, language ) {
this.content = content;
-   this.segmentCount = 0;
this.segments = {};
this.segmentedContent = null;
this.links = {};
@@ -48,10 +47,6 @@
source: $section.html()
};
} );
-};
-
-CXSegmenter.prototype.getSegmentCount = function () {
-   return this.segmentCount;
 };
 
 CXSegmenter.prototype.getSegments = function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29f1529e4007f75112d7a91b10a26b2f919f6c26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Zilch 

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


[MediaWiki-commits] [Gerrit] debian packaging directory with our details - change (operations...ircd-ratbox)

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

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

Change subject: debian packaging directory with our details
..

debian packaging directory with our details

Change-Id: I8410345c8327f42129deb3bbcb8a0c029892e458
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/emacsen-install.ex
A debian/emacsen-remove.ex
A debian/emacsen-startup.ex
A debian/ircd-ratbox.cron.d.ex
A debian/ircd-ratbox.default.ex
A debian/ircd-ratbox.doc-base.EX
A debian/manpage.1.ex
A debian/manpage.sgml.ex
A debian/manpage.xml.ex
A debian/menu.ex
A debian/postinst.ex
A debian/postrm.ex
A debian/preinst.ex
A debian/prerm.ex
A debian/rules
A debian/source/format
A debian/watch.ex
22 files changed, 859 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/ircd-ratbox 
refs/changes/35/129835/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..ab4e896
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+ircd-ratbox (2.2.9-1) unstable; urgency=low
+
+* Initial release of Wikimedia broadcast only ircd
+
+ -- Chase Pettet   Tue, 15 Apr 2014 10:21:17 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..2602c3e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: ircd-ratbox
+Section: unknown
+Priority: extra
+Maintainer: Chase Pettet 
+Build-Depends: debhelper (>= 8.0.0), autotools-dev
+Standards-Version: 3.9.2
+Homepage: http://ratbox.org
+
+Package: ircd-ratbox
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: ircd-ratbox is an advanced, stable and fast ircd.
+ Wikimedia user read-only irc for edit events broadcasting.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..fcd4100
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,25 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: ircd-ratbox
+Source: ratbox.com
+
+Files: debian/*
+Copyright: 2014 Chase Pettet 
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see 
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/emacsen-install.ex b/debian/emacsen-install.ex
new file mode 100644
index 000..5441ef0
--- /dev/null
+++ b/debian/emacsen-install.ex
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/ircd-ratbox
+
+# Written by Jim Van Zandt , borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+#  and octave by Dirk Eddelbuettel .
+
+FLAVOR=$1
+PACKAGE=ircd-ratbox
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+#SITEFLAG="-no-site-file"
+#else
+#SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+echo install/${PACKAGE}: install Info links for ${FLAVOR}
+install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} 
/usr/share/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff --git a/debian/emacsen-remove.ex b/debian/emacsen-remove.ex
new file mode 100644
index 000..cc5ff21
--- /dev/null
+++ b/debian/emacsen-remove.ex
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/ircd-ratbox
+
+FLAVOR=$1
+PACKAGE=ircd-ratbox
+
+if [ ${FLAVOR} != 

[MediaWiki-commits] [Gerrit] Removed maximumPeriodicTaskSeconds hack; now unused - change (mediawiki/core)

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

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

Change subject: Removed maximumPeriodicTaskSeconds hack; now unused
..

Removed maximumPeriodicTaskSeconds hack; now unused

Change-Id: Ib4308990c21b0118f00fde72412868993c5ce056
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 1 insertion(+), 16 deletions(-)


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

diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index f5a266e..d81a292 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -72,12 +72,6 @@
protected $key;
 
/**
-* @var null|int maximum seconds between execution of periodic tasks.  
Used to speed up
-* testing but should otherwise be left unset.
-*/
-   protected $maximumPeriodicTaskSeconds;
-
-   /**
 * @params include:
 *   - redisConfig : An array of parameters to 
RedisConnectionPool::__construct().
 *   Note that the serializer option is ignored as 
"none" is always used.
@@ -85,10 +79,6 @@
 *   If a hostname is specified but no port, the 
standard port number
 *   6379 will be used. Required.
 *   - compression : The type of compression to use; one of (none,gzip).
-*   - maximumPeriodicTaskSeconds : Maximum seconds between check 
periodic tasks.  Set to
-*   force faster execution of periodic tasks for 
inegration tests that
-*   rely on checkDelay.  Without this the integration 
tests are very very
-*   slow.  This really shouldn't be set in production.
 * @param array $params
 */
public function __construct( array $params ) {
@@ -97,8 +87,6 @@
$this->server = $params['redisServer'];
$this->compression = isset( $params['compression'] ) ? 
$params['compression'] : 'none';
$this->redisPool = RedisConnectionPool::singleton( 
$params['redisConfig'] );
-   $this->maximumPeriodicTaskSeconds = isset( 
$params['maximumPeriodicTaskSeconds'] ) ?
-   $params['maximumPeriodicTaskSeconds'] : null;
}
 
protected function supportedOrders() {
@@ -738,10 +726,7 @@
}
$period = min( $periods );
$period = max( $period, 30 ); // sanity
-   // Support override for faster testing
-   if ( $this->maximumPeriodicTaskSeconds !== null ) {
-   $period = min( $period, 
$this->maximumPeriodicTaskSeconds );
-   }
+
return array(
'recyclePruneAndUndelayJobs' => array(
'callback' => array( $this, 
'recyclePruneAndUndelayJobs' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4308990c21b0118f00fde72412868993c5ce056
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] gerrit .gitreview file - change (operations...ircd-ratbox)

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

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

Change subject: gerrit .gitreview file
..

gerrit .gitreview file

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/ircd-ratbox 
refs/changes/33/129833/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..4a1fb49
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/debs/ircd-ratbox
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab9084c0909b6f4b3df26dc101c876728734f887
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/ircd-ratbox
Gerrit-Branch: master
Gerrit-Owner: Rush 

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


[MediaWiki-commits] [Gerrit] Imported Upstream version 2.2.9 - change (operations...ircd-ratbox)

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

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

Change subject: Imported Upstream version 2.2.9
..

Imported Upstream version 2.2.9

Change-Id: Idd1555b43e096cfc4f9bd6e0d645665e7111b94e
---
A .cvsignore
A .indent.pro
A CREDITS
A ChangeLog
A INSTALL
A LICENSE
A Makefile
A Makefile.in
A README
A RELNOTES
A SVN-Access
A aclocal.m4
A adns/.cvsignore
A adns/COPYING
A adns/GPL-vs-LGPL
A adns/Makefile
A adns/Makefile.in
A adns/README
A adns/README.ircd
A adns/adns.h
A adns/check.c
A adns/check.o
A adns/dlist.h
A adns/event.c
A adns/event.o
A adns/general.c
A adns/general.o
A adns/internal.h
A adns/libadns.a
A adns/parse.c
A adns/parse.o
A adns/query.c
A adns/query.o
A adns/reply.c
A adns/reply.o
A adns/setup.c
A adns/setup.o
A adns/transmit.c
A adns/transmit.o
A adns/tvarith.h
A adns/types.c
A adns/types.o
A config.log
A config.status
A configure
A configure.ac
A contrib/.cvsignore
A contrib/.indent.pro
A contrib/Makefile
A contrib/Makefile.in
A contrib/README
A contrib/example_module.c
A contrib/ircd-shortcut.pl
A contrib/m_42.c
A contrib/m_clearchan.c
A contrib/m_flags.c
A contrib/m_force.c
A contrib/m_mkpasswd.c
A contrib/m_ojoin.c
A contrib/m_okick.c
A contrib/m_olist.c
A contrib/m_opme.c
A contrib/m_webirc.c
A contrib/spy_admin_notice.c
A contrib/spy_info_notice.c
A contrib/spy_links_notice.c
A contrib/spy_motd_notice.c
A contrib/spy_stats_notice.c
A contrib/spy_stats_p_notice.c
A contrib/spy_trace_notice.c
A contrib/spy_whois_notice.c
A contrib/spy_whois_notice_global.c
A doc/.cvsignore
A doc/CIDR.txt
A doc/Hybrid-team
A doc/Makefile
A doc/Makefile.in
A doc/README.cidr_bans
A doc/Tao-of-IRC.940110
A doc/challenge.txt
A doc/collision_fnc.txt
A doc/example.conf
A doc/example.efnet.conf
A doc/hooks.txt
A doc/index.txt
A doc/ircd.8
A doc/ircd.motd
A doc/logfiles.txt
A doc/modeg.txt
A doc/modes.txt
A doc/monitor.txt
A doc/old/Authors
A doc/operguide.txt
A doc/opermyth.txt
A doc/server-version-info
A doc/services.txt
A doc/technical/README.TSora
A doc/technical/cluster.txt
A doc/technical/event.txt
A doc/technical/fd-management.txt
A doc/technical/file-management.txt
A doc/technical/hostmask.txt
A doc/technical/index.txt
A doc/technical/linebuf.txt
A doc/technical/network.txt
A doc/technical/rfc1459.txt
A doc/technical/send.txt
A doc/technical/ts5.txt
A doc/technical/ts6.txt
A doc/tgchange.txt
A doc/whats-new-2.0.txt
A doc/whats-new-2.1.txt
A doc/whats-new-2.2.txt
A help/.cvsignore
A help/Makefile
A help/Makefile.in
A help/opers/accept
A help/opers/admin
A help/opers/away
A help/opers/capab
A help/opers/challenge
A help/opers/chantrace
A help/opers/close
A help/opers/cmode
A help/opers/cnotice
A help/opers/connect
A help/opers/cprivmsg
A help/opers/credits
A help/opers/die
A help/opers/dline
A help/opers/error
A help/opers/etrace
A help/opers/gline
A help/opers/help
A help/opers/index
A help/opers/info
A help/opers/invite
A help/opers/ison
A help/opers/join
A help/opers/kick
A help/opers/kill
A help/opers/kline
A help/opers/knock
A help/opers/links
A help/opers/list
A help/opers/locops
A help/opers/lusers
A help/opers/map
A help/opers/masktrace
A help/opers/modlist
A help/opers/modload
A help/opers/modrestart
A help/opers/modunload
A help/opers/motd
A help/opers/names
A help/opers/nick
A help/opers/notice
A help/opers/oper
A help/opers/operspy
A help/opers/operwall
A help/opers/part
A help/opers/pass
A help/opers/ping
A help/opers/pong
A help/opers/post
A help/opers/privmsg
A help/opers/quit
A help/opers/rehash
A help/opers/restart
A help/opers/resv
A help/opers/server
A help/opers/set
A help/opers/sjoin
A help/opers/squit
A help/opers/stats
A help/opers/svinfo
A help/opers/testgecos
A help/opers/testline
A help/opers/testmask
A help/opers/time
A help/opers/topic
A help/opers/trace
A help/opers/uhelp
A help/opers/umode
A help/opers/undline
A help/opers/ungline
A help/opers/unkline
A help/opers/unreject
A help/opers/unresv
A help/opers/unxline
A help/opers/user
A help/opers/userhost
A help/opers/users
A help/opers/version
A help/opers/wallops
A help/opers/who
A help/opers/whois
A help/opers/whowas
A help/opers/xline
A help/users/index
A help/users/info
A help/users/notice
A help/users/privmsg
A help/users/stats
A help/users/umode
A include/.cvsignore
A include/.indent.pro
A include/_stdint.h
A include/balloc.h
A include/cache.h
A include/channel.h
A include/class.h
A include/client.h
A include/commio.h
A include/common.h
A include/config.h
A include/config.h.dist
A include/defaults.h
A include/event.h
A include/hash.h
A include/hook.h
A include/hostmask.h
A include/irc_string.h
A include/ircd.h
A include/ircd_defs.h
A include/ircd_getopt.h
A include/ircd_signal.h
A include/linebuf.h
A include/listener.h
A include/m_info.h
A include/memory.h
A include/modules.h
A include/monitor.h
A include/msg.h
A include/newconf.h
A include/numeric.h
A include/packet.h
A include/parse.h
A include/patchlevel.h
A include/patrici

[MediaWiki-commits] [Gerrit] Make action=mobileview GET, not POST. - change (apps...wikipedia)

2014-04-25 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Make action=mobileview GET, not POST.
..


Make action=mobileview GET, not POST.

* Android uses GET for action=mobileview. So too shall iOS.
* GET will make the traffic eligible for pageview counting.
* Future work: if necessary, make parameter order and signatures consistent 
across platforms.
* Future work: if necessary, make one of lead/remaining sections calls a POST 
to shield against double counting.
* Note: the pageview calculation may be mutable to (not) count certain 
action=mobileview signatures.

Change-Id: Ibf62c451f93eb00360f122ae1e1dcd8308f7d617
---
M wikipedia/Categories/NSURLRequest+DictionaryRequest.m
M wikipedia/Data/Operations/DownloadLeadSectionOp.m
M wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
3 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m 
b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
index ccde940..ae17b7e 100644
--- a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
+++ b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
@@ -43,6 +43,7 @@
 [request setHTTPMethod:@"GET"];
 [request addValue:@"" forHTTPHeaderField:@"Accept-Encoding"];
 [request addValue:[WikipediaAppUtils versionedUserAgent] 
forHTTPHeaderField:@"User-Agent"];
+// NSLog(@"%@", [WikipediaAppUtils versionedUserAgent]);
 [request addValue:@"application/x-www-form-urlencoded" 
forHTTPHeaderField:@"Content-Type"];
 return request;
 }
diff --git a/wikipedia/Data/Operations/DownloadLeadSectionOp.m 
b/wikipedia/Data/Operations/DownloadLeadSectionOp.m
index feadd29..0ab9c85 100644
--- a/wikipedia/Data/Operations/DownloadLeadSectionOp.m
+++ b/wikipedia/Data/Operations/DownloadLeadSectionOp.m
@@ -18,7 +18,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": 
@"mobileview",
@"prop": 
@"sections|text|lastmodified|lastmodifiedby|languagecount",
diff --git a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m 
b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
index 86c3703..73f08d5 100644
--- a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
+++ b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
@@ -16,7 +16,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": 
@"mobileview",
@"prop": 
@"sections|text",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf62c451f93eb00360f122ae1e1dcd8308f7d617
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Object for bulk importation of saved pages records. - change (apps...wikipedia)

2014-04-25 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

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

Change subject: Object for bulk importation of saved pages records.
..

Object for bulk importation of saved pages records.

Change-Id: Iacca068c51be43e6e8f547dff6ba99921e750713
---
M Wikipedia.xcodeproj/project.pbxproj
A wikipedia/Importer/ArticleImporter.h
A wikipedia/Importer/ArticleImporter.m
M wikipedia/Session/SessionSingleton.h
M wikipedia/Session/SessionSingleton.m
5 files changed, 141 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/31/129831/1

diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 29e3f0c..ec4de91 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -105,6 +105,7 @@
04A97E8718B81D5D0046B166 /* AccountCreationViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04A97E8618B81D5D0046B166 /* 
AccountCreationViewController.m */; };
04AE1C701891B302002D5487 /* NSObject+Extras.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04AE1C6F1891B302002D5487 /* NSObject+Extras.m 
*/; };
04AE1C741891BB32002D5487 /* Article.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04AE1C731891BB32002D5487 /* Article.m */; };
+   04B0EA45190AFDD8007458AF /* ArticleImporter.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04B0EA44190AFDD8007458AF /* ArticleImporter.m 
*/; };
04B6925018E77B2A00F88D8A /* UIWebView+HideScrollGradient.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04B6924F18E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m */; };
04B78A5318A580AF0050EBF5 /* LoginOp.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04B78A5218A580AF0050EBF5 /* LoginOp.m */; };
04B7B9BD18B5570E00A63551 /* CaptchaViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04B7B9BC18B5570E00A63551 /* 
CaptchaViewController.m */; };
@@ -339,6 +340,8 @@
04AE1C6F1891B302002D5487 /* NSObject+Extras.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= "NSObject+Extras.m"; sourceTree = ""; };
04AE1C721891BB32002D5487 /* Article.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
Article.h; sourceTree = ""; };
04AE1C731891BB32002D5487 /* Article.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= Article.m; sourceTree = ""; };
+   04B0EA43190AFDD8007458AF /* ArticleImporter.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ArticleImporter.h; sourceTree = ""; };
+   04B0EA44190AFDD8007458AF /* ArticleImporter.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= ArticleImporter.m; sourceTree = ""; };
04B6924E18E77B2A00F88D8A /* UIWebView+HideScrollGradient.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = "UIWebView+HideScrollGradient.h"; sourceTree = ""; };
04B6924F18E77B2A00F88D8A /* UIWebView+HideScrollGradient.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = "UIWebView+HideScrollGradient.m"; sourceTree = 
""; };
04B78A5118A580AF0050EBF5 /* LoginOp.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LoginOp.h; sourceTree = ""; };
@@ -867,6 +870,15 @@
path = AccountCreation;
sourceTree = "";
};
+   04B0EA42190AFDBA007458AF /* Importer */ = {
+   isa = PBXGroup;
+   children = (
+   04B0EA43190AFDD8007458AF /* ArticleImporter.h 
*/,
+   04B0EA44190AFDD8007458AF /* ArticleImporter.m 
*/,
+   );
+   path = Importer;
+   sourceTree = "";
+   };
04B7B9BA18B5569600A63551 /* Captcha */ = {
isa = PBXGroup;
children = (
@@ -1225,6 +1237,7 @@
0442F57C1900718600F55DF9 /* Fonts */,
04D34DA31863D2D600610A87 /* HTML Parsing */,
0466F44C183A30CC00EA1FD7 /* Images */,
+   04B0EA42190AFDBA007458AF /* Importer */,
0463639518A844380049EE4F /* Keychain */,
04CF1CB5187C8F4400E9516F /* Languages */,
048A26741906268100395F53 /* PaddedLabel */,
@@ -1578,6 +1591,7 @@
04C43AC0183442FC006C643B /* NSString+Extras.

[MediaWiki-commits] [Gerrit] Call clearAllMessages in setup instead of swapPanel on the s... - change (mediawiki...VisualEditor)

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

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

Change subject: Call clearAllMessages in setup instead of swapPanel on the save 
dialog
..

Call clearAllMessages in setup instead of swapPanel on the save dialog

Was clearing things like captchas when swapping panels. It still makes
sense to clear these when opening up the dialog though.

Bug: 62766
Change-Id: I37ceeebc672e2866b805631b189108d8363bdc9f
---
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index 14fda4a..f2c83ab 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -112,9 +112,6 @@
// Update the window title
this.setTitle( ve.msg( 'visualeditor-savedialog-title-' + panel ) );
 
-   // Old messages should not persist after panel changes
-   this.clearAllMessages();
-
// Reset save button if we disabled it for e.g. unrecoverable spam error
this.saveButton.setDisabled( false );
 
@@ -428,6 +425,9 @@
  * @inheritdoc
  */
 ve.ui.MWSaveDialog.prototype.setup = function () {
+   // Old messages should not persist after panel changes
+   this.clearAllMessages();
+
this.swapPanel( 'save' );
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37ceeebc672e2866b805631b189108d8363bdc9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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] Set up app frameworks - change (wikimedia...dash)

2014-04-25 Thread Ssmith (Code Review)
Ssmith has uploaded a new change for review.

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

Change subject: Set up app frameworks
..

Set up app frameworks

Use require.js, jquery, underscore, backbone, and jade.

Change-Id: I050a8aedb934c62eafe0e54a94093d47f28d81c0
---
M package.json
A public/javascripts/app.build.js
A public/javascripts/app.js
A public/javascripts/libs/backbone.js
A public/javascripts/libs/underscore.js
A public/javascripts/main.js
A public/javascripts/models/model.js
A public/javascripts/order.js
A public/javascripts/require-jquery.js
A public/javascripts/routers/home.js
A public/javascripts/templates/main.html
A public/javascripts/text.js
A public/javascripts/views/view.js
A public/stylesheets/style.css
A routes/index.js
M server.js
A views/index.jade
A views/layout.jade
18 files changed, 13,532 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/29/129829/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I050a8aedb934c62eafe0e54a94093d47f28d81c0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ssmith 

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


[MediaWiki-commits] [Gerrit] FUTURE: Sixth batch of pilot sites for Media Viewer - change (operations/mediawiki-config)

2014-04-25 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: FUTURE: Sixth batch of pilot sites for Media Viewer
..

FUTURE: Sixth batch of pilot sites for Media Viewer

* English Wikipedia
* German Wikipedia
* Italian Wikipedia
* Russian Wikipedia

https://www.mediawiki.org/wiki/Multimedia/Media_Viewer/Release_Plan#Large_Wikis

Change-Id: Icba8b102100c9ce1d05ec3f083aea24259667a59
---
M mediaviewer.dblist
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/mediaviewer.dblist b/mediaviewer.dblist
index 82282e7..cebc838 100644
--- a/mediaviewer.dblist
+++ b/mediaviewer.dblist
@@ -2,18 +2,22 @@
 commonswiki
 cawiki
 cswiki
+dewiki
+enwiki
 eswiki
 etwiki
 fiwiki
 frwiki
 hewiki
 huwiki
+itwiki
 jawiki
 kowiki
 nlwiki
 plwiki
 ptwiki
 rowiki
+ruwiki
 skwiki
 svwiki
 tewiki

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

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

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


[MediaWiki-commits] [Gerrit] Add the Parsoid PHP extension as a dependency for VisualEdit... - change (integration/jenkins-job-builder-config)

2014-04-25 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Add the Parsoid PHP extension as a dependency for 
VisualEditor's qunit test
..

Add the Parsoid PHP extension as a dependency for VisualEditor's qunit test

Change-Id: I2cb59cbda6bf9444f03013a11199c9ab25ce4450
---
M mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/27/129827/1

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 7fc6554..f1ad607 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -691,6 +691,7 @@
  - '{name}-{ext-name}-qunit':
 name: mwext
 ext-name: VisualEditor
+dependencies: 'Parsoid'
 
  - '{name}-{ext-name}-csslint':
 ext-name: VisualEditor

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cb59cbda6bf9444f03013a11199c9ab25ce4450
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] [WIP] Generic banana linter job template - change (integration/jenkins-job-builder-config)

2014-04-25 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: [WIP] Generic banana linter job template
..

[WIP] Generic banana linter job template

Change-Id: Ib78eeb5b68736d13da7267ee51f44d11f3065f66
---
M job-templates.yaml
M mediawiki.yaml
2 files changed, 11 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/26/129826/1

diff --git a/job-templates.yaml b/job-templates.yaml
index 52674cf..cb5f90b 100644
--- a/job-templates.yaml
+++ b/job-templates.yaml
@@ -10,7 +10,6 @@
 builders:
  - erblint-HEAD
 
-# Generic job to run JSHint
 - job-template:
 name: '{name}-jslint'
 node: hasSlaveScripts
@@ -33,6 +32,16 @@
  - csslint
 
 - job-template:
+name: '{name}-banana'
+node: hasSlaveScripts
+defaults: use-remote-zuul-no-submodules
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - banana
+
+- job-template:
 name: '{name}-npm'
 node: contintLabsSlave
 defaults: use-remoteonly-zuul
diff --git a/mediawiki.yaml b/mediawiki.yaml
index d3be947..ae473a0 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -216,6 +216,7 @@
 jobs:
   - '{name}-lint'
   - 'mediawiki-core-jslint'
+  - '{name}-banana'
   - '{name}-qunit'
   - '{name}-jsduck'
   - 'mediawiki-core-npm'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib78eeb5b68736d13da7267ee51f44d11f3065f66
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] correct example in EditEntity API module - change (mediawiki...Wikibase)

2014-04-25 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: correct example in EditEntity API module
..

correct example in EditEntity API module

'site' was used as key for the 'descriptions' dictionary
instead of 'language'

the glitch was introduced in Ice9e210139796956c5ad17e30b2345c179ce9a6c

first reported on Wikidata:
https://www.wikidata.org/wiki/?oldid=122735390#Error_in_documentation

Change-Id: Idd232762400843a6be5c1b456256bd004a9ba604
---
M repo/includes/api/EditEntity.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index 4fe1e66..79e9e85 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -787,7 +787,7 @@
// Setting stuff

'api.php?action=wbeditentity&id=Q42&data={"sitelinks":{"nowiki":{"site":"nowiki","title":"København"}}}'
=> 'Sets sitelink for nowiki, overwriting it if it 
already exists',
-   
'api.php?action=wbeditentity&id=Q42&data={"descriptions":{"no":{"site":"no","title":"no
 Description Here"}}}'
+   
'api.php?action=wbeditentity&id=Q42&data={"descriptions":{"no":{"language":"no","title":"no
 Description Here"}}}'
=> 'Sets description for no, overwriting it if it 
already exists',

'api.php?action=wbeditentity&id=Q42&data={"claims":[{"mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ExampleString","type":"string"}},"type":"statement","rank":"normal"}]}'
=> 'Creates a new claim on the item for the property 
P56 and a value of "ExampleString"',

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

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

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


[MediaWiki-commits] [Gerrit] Fix load test script to be a bit more life like - change (mediawiki...CirrusSearch)

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

Change subject: Fix load test script to be a bit more life like
..


Fix load test script to be a bit more life like

Change-Id: Ieed84807c83a23955189964799393d6b1b6bc846
---
M tests/load/send_some.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/tests/load/send_some.py b/tests/load/send_some.py
index 2cc959b..9570fcc 100644
--- a/tests/load/send_some.py
+++ b/tests/load/send_some.py
@@ -12,6 +12,9 @@
 
 
 def send_line(search, destination):
+# Since requests come in with timestamp resolution we assume they came in
+# at some random point in the second
+time.sleep(random.uniform(0, 1))
 params = "fulltext=Search&srbackend=CirrusSearch"
 url = "%s/%s?%s" % (destination, search, params)
 urllib2.urlopen(url)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieed84807c83a23955189964799393d6b1b6bc846
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles 
Gerrit-Reviewer: Chad 
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 broken test for loginFix broken test for loginFix broken... - change (apps...wikipedia)

2014-04-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Fix broken test for loginFix broken test for loginFix broken 
test for loginFix broken test for loginFix broken test for loginFix broken test 
for loginFix broken test for loginFix broken test for login
..

Fix broken test for loginFix broken test for loginFix broken test for
loginFix broken test for loginFix broken test for loginFix broken
test for loginFix broken test for loginFix broken test for login

Change-Id: Ia9219766335afbee54a3cccae90633bfbb48f2a3
---
M wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
index 62a4e17..8f4fd4c 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/LoginTaskTest.java
@@ -34,9 +34,9 @@
 public void run() {
 new LoginTask(getInstrumentation().getTargetContext(), 
testWiki, username, password) {
 @Override
-public void onFinish(String result) {
+public void onFinish(LoginResult result) {
 assertNotNull(result);
-assertEquals(result, "Success");
+assertEquals(result.getCode(), "Success");
 app.getEditTokenStorage().get(testWiki, new 
EditTokenStorage.TokenRetreivedCallback() {
 @Override
 public void onTokenRetreived(String token) {

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

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

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


[MediaWiki-commits] [Gerrit] Make action=mobileview GET, not POST. - change (apps...wikipedia)

2014-04-25 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has uploaded a new change for review.

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

Change subject: Make action=mobileview GET, not POST.
..

Make action=mobileview GET, not POST.

* Android uses GET for action=mobileview. So too shall iOS.
* GET will make the traffic eligible for pageview counting.
* Future work: if necessary, make parameter order and signatures consistent 
across platforms.
* Future work: if necessary, make one of lead/remaining sections calls a POST 
to shield against double counting.
* Note: the pageview calculation may be mutable to (not) count certain 
action=mobileview signatures.

Change-Id: Ibf62c451f93eb00360f122ae1e1dcd8308f7d617
---
M wikipedia/Categories/NSURLRequest+DictionaryRequest.m
M wikipedia/Data/Operations/DownloadLeadSectionOp.m
M wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
3 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/23/129823/1

diff --git a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m 
b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
index ccde940..ae17b7e 100644
--- a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
+++ b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m
@@ -43,6 +43,7 @@
 [request setHTTPMethod:@"GET"];
 [request addValue:@"" forHTTPHeaderField:@"Accept-Encoding"];
 [request addValue:[WikipediaAppUtils versionedUserAgent] 
forHTTPHeaderField:@"User-Agent"];
+// NSLog(@"%@", [WikipediaAppUtils versionedUserAgent]);
 [request addValue:@"application/x-www-form-urlencoded" 
forHTTPHeaderField:@"Content-Type"];
 return request;
 }
diff --git a/wikipedia/Data/Operations/DownloadLeadSectionOp.m 
b/wikipedia/Data/Operations/DownloadLeadSectionOp.m
index feadd29..0ab9c85 100644
--- a/wikipedia/Data/Operations/DownloadLeadSectionOp.m
+++ b/wikipedia/Data/Operations/DownloadLeadSectionOp.m
@@ -18,7 +18,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": 
@"mobileview",
@"prop": 
@"sections|text|lastmodified|lastmodifiedby|languagecount",
diff --git a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m 
b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
index 86c3703..73f08d5 100644
--- a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
+++ b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m
@@ -16,7 +16,7 @@
 {
 self = [super init];
 if (self) {
-self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
+self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton 
sharedInstance] urlForDomain:domain]
  parameters: @{
@"action": 
@"mobileview",
@"prop": 
@"sections|text",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf62c451f93eb00360f122ae1e1dcd8308f7d617
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt 

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


[MediaWiki-commits] [Gerrit] Hide My Contributions list for MVP - change (apps...wikipedia)

2014-04-25 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Hide My Contributions list for MVP
..


Hide My Contributions list for MVP

- Is not complete, not on product roadmap
- Needs diff view to be useful
- Needs network resilence
- Should also have a way to view page history

Leaving the code in to prevent us from being in rebase hell
later on.

Change-Id: I17df264249098c3f6c185009c5ece99acdb3285f
---
M wikipedia/res/layout/fragment_navdrawer.xml
M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
2 files changed, 0 insertions(+), 27 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git a/wikipedia/res/layout/fragment_navdrawer.xml 
b/wikipedia/res/layout/fragment_navdrawer.xml
index d698485..0955775 100644
--- a/wikipedia/res/layout/fragment_navdrawer.xml
+++ b/wikipedia/res/layout/fragment_navdrawer.xml
@@ -80,26 +80,6 @@
 
-
-
-
-
-
diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java 
b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
index 94875ab..6a05df7 100644
--- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
@@ -9,7 +9,6 @@
 import org.wikipedia.analytics.*;
 import org.wikipedia.history.*;
 import org.wikipedia.login.*;
-import org.wikipedia.pagehistory.usercontributions.*;
 import org.wikipedia.random.*;
 import org.wikipedia.savedpages.*;
 import org.wikipedia.settings.*;
@@ -20,7 +19,6 @@
 R.id.nav_item_saved_pages,
 R.id.nav_item_settings,
 R.id.nav_item_login,
-R.id.nav_item_my_contributions,
 R.id.nav_item_random,
 R.id.nav_item_send_feedback,
 R.id.nav_item_logout
@@ -29,7 +27,6 @@
 };
 
 private static final int[] ACTION_ITEMS_LOGGED_IN_ONLY = {
-R.id.nav_item_my_contributions,
 R.id.nav_item_username,
 R.id.nav_item_logout
 };
@@ -137,10 +134,6 @@
 break;
 case R.id.nav_item_random:
 randomHandler.doVistRandomArticle();
-break;
-case R.id.nav_item_my_contributions:
-intent.setClass(this.getActivity(), 
UserContribsActivity.class);
-startActivity(intent);
 break;
 case R.id.nav_item_send_feedback:
 // Will be stripped out in prod builds

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17df264249098c3f6c185009c5ece99acdb3285f
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Dbrant 
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 trigger publisher instead of trigger-builds builder - change (integration/jenkins-job-builder-config)

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

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

Change subject: Use trigger publisher instead of trigger-builds builder
..

Use trigger publisher instead of trigger-builds builder

Using the trigger-builds builder to fire the beta-scap job as a sub-step
of the beta-mediawiki-config-update and beta-code-update jobs seemed to
be the cause of a deadlock that would occasionally leave the jenkins
reporting that the beta-scap job was blocked waiting for an available
executor while simultaneously reporting that there were multiple free
executors available. The deadlock has not been seen since I manually
edited the jobs to use the post-build trigger publisher.

Change-Id: I5a810554fd33d57ddc95c1a4667f2e0a0f252636
---
M beta.yaml
1 file changed, 13 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/22/129822/1

diff --git a/beta.yaml b/beta.yaml
index bd3f030..6276340 100644
--- a/beta.yaml
+++ b/beta.yaml
@@ -141,9 +141,6 @@
 
 builders:
  - shell: /usr/local/bin/wmf-beta-mwconfig-update
- - trigger-builds:
-   - project: "beta-scap-{datacenter}"
- block: true
 
 logrotate:
 daysToKeep: 15
@@ -156,6 +153,8 @@
   aborted: true
   failure: false
   fixed: true
+  - trigger:
+project: beta-scap-{datacenter}
 
 # Job updating MediaWiki core+extensions code and refreshing the message
 #
@@ -174,9 +173,6 @@
   # mwdeploy home, that is done by passing -H to sudo
   - shell: |
   sudo -H -u mwdeploy /usr/local/bin/wmf-beta-autoupdate.py --verbose
-  - trigger-builds:
-- project: "beta-scap-{datacenter}"
-  block: true
 
 logrotate:
 daysToKeep: 7
@@ -193,6 +189,8 @@
   aborted: true
   failure: false
   fixed: true
+  - trigger:
+project: beta-scap-{datacenter}
 
 - job-template:
 name: beta-scap-{datacenter}
@@ -209,6 +207,15 @@
 logrotate:
 daysToKeep: 7
 
+publishers:
+  - email-ext:
+  recipients: q...@lists.wikimedia.org
+  attach-build-log: true
+  first-failure: true
+  aborted: true
+  failure: false
+  fixed: true
+
 - job-template:
 name: beta-parsoid-update-{datacenter}
 defaults: beta

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a810554fd33d57ddc95c1a4667f2e0a0f252636
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
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] Fix crash when links are clicked in preview pane - change (apps...wikipedia)

2014-04-25 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Fix crash when links are clicked in preview pane
..


Fix crash when links are clicked in preview pane

Bug: 64418
Change-Id: If7201bd3cfb458c788b9ce907a0325bc83125a51
---
M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
M wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
3 files changed, 29 insertions(+), 10 deletions(-)

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



diff --git 
a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
index c83aa32..8e032f7 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
@@ -1,13 +1,16 @@
 package org.wikipedia.editing;
 
 import android.app.*;
+import android.content.*;
 import android.os.*;
 import android.support.v4.app.Fragment;
-import android.support.v7.app.ActionBarActivity;
+import android.support.v7.app.*;
 import android.view.*;
 import org.json.*;
 import org.wikipedia.*;
 import org.wikipedia.editing.summaries.*;
+import org.wikipedia.history.*;
+import org.wikipedia.page.*;
 
 import java.util.*;
 
@@ -72,6 +75,17 @@
 isDirectionSetup = true;
 }
 
+new LinkHandler(getActivity(), bridge, title.getSite()) {
+@Override
+public void onInternalLinkClicked(PageTitle title) {
+Intent intent = new Intent(getActivity(), PageActivity.class);
+intent.setAction(PageActivity.ACTION_PAGE_FOR_TITLE);
+intent.putExtra(PageActivity.EXTRA_PAGETITLE, title);
+intent.putExtra(PageActivity.EXTRA_HISTORYENTRY, new 
HistoryEntry(title, HistoryEntry.SOURCE_INTERNAL_LINK));
+startActivity(intent);
+}
+};
+
 new EditPreviewTask(getActivity(), wikiText, title) {
 @Override
 public void onBeforeExecute() {
diff --git a/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java 
b/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
index b926813..5bb2cda 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
@@ -2,19 +2,17 @@
 
 import android.content.*;
 import android.net.*;
+import android.preference.*;
 import android.util.*;
 import com.squareup.otto.*;
 import org.json.*;
 import org.wikipedia.*;
 import org.wikipedia.events.*;
-import org.wikipedia.history.*;
-
-import android.preference.PreferenceManager;
 
 /**
  * Handles any html links coming from a {@link 
org.wikipedia.page.PageViewFragment}
  */
-public class LinkHandler implements CommunicationBridge.JSEventListener {
+public abstract class LinkHandler implements 
CommunicationBridge.JSEventListener {
 private final Context context;
 private final CommunicationBridge bridge;
 private final Bus bus;
@@ -51,6 +49,8 @@
 context.startActivity(intent);
 }
 
+public abstract void onInternalLinkClicked(PageTitle title);
+
 @Override
 public void onMessage(String messageType, JSONObject messagePayload) {
 try {
@@ -62,9 +62,9 @@
 Log.d("Wikipedia", "Link clicked was " + href);
 if (href.startsWith("/wiki/")) {
 // TODO: Handle fragments
+
 PageTitle title = currentSite.titleForInternalLink(href);
-HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
-bus.post(new NewWikiPageNavigationEvent(title, historyEntry));
+onInternalLinkClicked(title);
 } else {
 Uri uri = Uri.parse(href);
 String authority = uri.getAuthority();
@@ -74,8 +74,7 @@
 Site site = new Site(authority);
 //TODO: Handle fragments
 PageTitle title = site.titleForInternalLink(uri.getPath());
-HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
-bus.post(new NewWikiPageNavigationEvent(title, 
historyEntry));
+onInternalLinkClicked(title);
 } else {
 handleExternalLink(uri);
 }
diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
index a1f5426..9e88a76 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
@@ -152,7 +152,13 @@
 setupMessageHandlers();
 Utils.addUtilityMethodsToBridge(getActivity(), bridge);
 

[MediaWiki-commits] [Gerrit] Use user's normalized name everywhere - change (apps...wikipedia)

2014-04-25 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Use user's normalized name everywhere
..


Use user's normalized name everywhere

Bug: 64412
Change-Id: Ifbe3526c1b1d141f3d1f6c56ba285c191a587ff9
---
M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java
A wikipedia/src/main/java/org/wikipedia/login/LoginResult.java
M wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
4 files changed, 37 insertions(+), 14 deletions(-)

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



diff --git 
a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
index e8ad235..3405dbb 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
@@ -200,8 +200,8 @@
 User user = app.getUserInfoStorage().getUser();
 new LoginTask(app, app.getPrimarySite(), 
user.getUsername(), user.getPassword()) {
 @Override
-public void onFinish(String result) {
-if (result.equals("Success")) {
+public void onFinish(LoginResult result) {
+if 
(result.getCode().equals("Success")) {
 doSave();
 } else {
 progressDialog.dismiss();
diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java 
b/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java
index 1e7cbcf..6fd18ac 100644
--- a/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java
@@ -132,21 +132,20 @@
 }
 
 @Override
-public void onFinish(String result) {
+public void onFinish(LoginResult result) {
 super.onFinish(result);
 progressDialog.dismiss();
-if (result.equals("Success")) {
+if (result.getCode().equals("Success")) {
 funnel.logSuccess();
 Toast.makeText(LoginActivity.this, 
R.string.login_success_toast, Toast.LENGTH_LONG).show();
 
 Utils.hideSoftKeyboard(LoginActivity.this);
 setResult(RESULT_LOGIN_SUCCESS);
 
-
 finish();
 } else {
-funnel.logError(result);
-handleError(result);
+funnel.logError(result.getCode());
+handleError(result.getCode());
 }
 }
 }.execute();
diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginResult.java 
b/wikipedia/src/main/java/org/wikipedia/login/LoginResult.java
new file mode 100644
index 000..8fbecc7
--- /dev/null
+++ b/wikipedia/src/main/java/org/wikipedia/login/LoginResult.java
@@ -0,0 +1,19 @@
+package org.wikipedia.login;
+
+public class LoginResult {
+private final String code;
+private final User user;
+
+public LoginResult(String code, User user) {
+this.code = code;
+this.user = user;
+}
+
+public String getCode() {
+return code;
+}
+
+public User getUser() {
+return user;
+}
+}
diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java 
b/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
index f76d9f7..1feb7f6 100644
--- a/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java
@@ -6,7 +6,7 @@
 import org.wikipedia.*;
 import org.wikipedia.concurrency.*;
 
-public class LoginTask extends SaneAsyncTask {
+public class LoginTask extends SaneAsyncTask {
 private final String username;
 private final String password;
 private final Api api;
@@ -21,18 +21,18 @@
 }
 
 @Override
-public void onFinish(String result) {
-if (result.equals("Success")) {
+public void onFinish(LoginResult result) {
+if (result.getCode().equals("Success")) {
 // Clear the edit tokens - clears out any anon tokens we might 
have had
 app.getEditTokenStorage().clearAllTokens();
 
 // Set userinfo
-app.getUserInfoStorage().setUser(new User(username, password));
+app.getUserInfoStorage().setUser(result.getUser());
 }
 }
 
 @Override
-public String performTask() throws Throwable {
+public LoginResult performTask() throws Throwable {
 ApiResult preReq = api.action("login")
 .par

[MediaWiki-commits] [Gerrit] OK button is now disabled if no language is selected. - change (apps...wikipedia)

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

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

Change subject: OK button is now disabled if no language is selected.
..

OK button is now disabled if no language is selected.

Bug: 64422
Change-Id: Ic1b4d10329212d43262be555a4a739ebcfff992a
---
M wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
1 file changed, 40 insertions(+), 3 deletions(-)


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

diff --git 
a/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java 
b/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
index 20f90b6..0da6948 100644
--- a/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
+++ b/wikipedia/src/main/java/org/wikipedia/settings/LanguagePreference.java
@@ -1,6 +1,8 @@
 package org.wikipedia.settings;
 
+import android.app.AlertDialog;
 import android.content.*;
+import android.os.Bundle;
 import android.preference.*;
 import android.text.*;
 import android.util.*;
@@ -13,9 +15,12 @@
 public class LanguagePreference extends DialogPreference {
 private ListView languagesList;
 private EditText languagesFilter;
+private Button okButton;
 
 private final String[] languages;
 private final WikipediaApp app;
+
+private int selectedLangIndex;
 
 public LanguagePreference(Context context, AttributeSet attrs) {
 super(context, attrs);
@@ -33,9 +38,17 @@
 languagesFilter = (EditText) 
view.findViewById(R.id.preference_languages_filter);
 languagesList = (ListView) 
view.findViewById(R.id.preference_languages_list);
 
+languagesList.setOnItemClickListener(new 
AdapterView.OnItemClickListener() {
+@Override
+public void onItemClick(AdapterView adapterView, View view, int 
i, long l) {
+selectedLangIndex = 
Arrays.asList(languages).indexOf(languagesList.getAdapter().getItem(i));
+okButton.setEnabled(true);
+}
+});
+
 languagesList.setAdapter(new LanguagesAdapter(languages, app));
 
-int selectedLangIndex = 
Arrays.asList(languages).indexOf(app.getPrimaryLanguage());
+selectedLangIndex = 
Arrays.asList(languages).indexOf(app.getPrimaryLanguage());
 languagesList.setItemChecked(selectedLangIndex, true);
 languagesList.setSelection(selectedLangIndex - 1);
 
@@ -50,10 +63,23 @@
 
 @Override
 public void afterTextChanged(Editable s) {
-((LanguagesAdapter) 
languagesList.getAdapter()).setFilterText(s.toString());
+int newPos = ((LanguagesAdapter) 
languagesList.getAdapter()).setFilterText(s.toString(), 
languages[selectedLangIndex]);
+// disable the OK button if no language is selected
+okButton.setEnabled(newPos != -1);
+// highlight the previously selected language
+
languagesList.setItemChecked(languagesList.getCheckedItemPosition(), false);
+if (newPos != -1)
+languagesList.setItemChecked(newPos, true);
 }
 });
 
+}
+
+@Override
+protected void showDialog(Bundle state) {
+super.showDialog(state);
+// the OK button can only be acquired here (not in onBindDialogView)
+okButton = 
((AlertDialog)getDialog()).getButton(AlertDialog.BUTTON_POSITIVE);
 }
 
 @Override
@@ -83,9 +109,16 @@
 this.app = app;
 }
 
-public void setFilterText(String filter) {
+/**
+ * Filters the language list based on a user search string
+ * @param filter Search term entered by the user
+ * @param currentSelection Language previously selected
+ * @return Index of the item in the new list that matches the current 
language, or -1 if no match.
+ */
+public int setFilterText(String filter, String currentSelection) {
 this.languages.clear();
 filter = filter.toLowerCase();
+int posInList = -1;
 for (String s: originalLanguages) {
 int langIndex = app.findWikiIndex(s);
 String canonicalLang = app.canonicalNameFor(langIndex);
@@ -94,9 +127,13 @@
 || canonicalLang.toLowerCase().contains(filter)
 || localLang.toLowerCase().contains(filter)) {
 this.languages.add(s);
+
+if(s.equals(currentSelection))
+posInList = this.languages.size() - 1;
 }
 }
 notifyDataSetInvalidated();
+return posInList;
 }
 
 @Override

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1b4d1032921

[MediaWiki-commits] [Gerrit] Add dependency for python-software-properties - change (mediawiki/vagrant)

2014-04-25 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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

Change subject: Add dependency for python-software-properties
..

Add dependency for python-software-properties

Change-Id: If211db2427973da6bc79e9019a5253918754799f
apt::ppa can fail without it.
---
M puppet/modules/apt/manifests/init.pp
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/20/129820/1

diff --git a/puppet/modules/apt/manifests/init.pp 
b/puppet/modules/apt/manifests/init.pp
index feba6f4..022dbdd 100644
--- a/puppet/modules/apt/manifests/init.pp
+++ b/puppet/modules/apt/manifests/init.pp
@@ -9,6 +9,10 @@
 refreshonly => true,
 }
 
+package { 'python-software-properties':
+ensure  => present,
+}
+
 exec { 'add ubuntu git maintainers apt key':
 command => 'apt-key add 
/vagrant/puppet/modules/apt/files/ubuntu-git-maintainers.key',
 unless  => 'apt-key list | grep -q "Launchpad PPA for Ubuntu Git 
Maintainers"',

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

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

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


[MediaWiki-commits] [Gerrit] Hygiene: Merge Overlay and OverlayNew - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Merge Overlay and OverlayNew
..


Hygiene: Merge Overlay and OverlayNew

Deprecate 'parent' usage

Change-Id: I1fdbe8c7bdcc6afd97d879694b5667ba513736fe
---
M i18n/en.json
M includes/Resources.php
M javascripts/common/Drawer.js
M javascripts/common/Overlay.js
D javascripts/common/OverlayNew.js
M javascripts/common/application.js
M javascripts/modules/talk/TalkOverlay.js
M less/common/common.less
D less/common/overlays.less
D templates/overlay.html
M tests/javascripts/common/test_Overlay.js
11 files changed, 65 insertions(+), 241 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 9c6f89a..97bf0c0 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -188,7 +188,6 @@
 "mobile-frontend-opt-in-explain": "By joining the beta, you will get 
access to experimental features, at the risk of encountering bugs and issues.",
 "mobile-frontend-overlay-close": "Close",
 "mobile-frontend-overlay-continue": "Continue",
-"mobile-frontend-overlay-escape": "Go back",
 "mobile-frontend-page-menu-contents": "contents",
 "mobile-frontend-page-menu-history": "History",
 "mobile-frontend-page-menu-language-current": 
"{{#language:{{CONTENTLANG",
diff --git a/includes/Resources.php b/includes/Resources.php
index 421675e..3e6ee0f 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -682,28 +682,19 @@
'mobile.startup',
),
'scripts' => array(
-   // @todo FIXME: remove when all new overlays moved to 
stable
'javascripts/common/Overlay.js',
-
-   'javascripts/common/OverlayNew.js',
'javascripts/common/LoadingOverlayNew.js',
),
'messages' => array(
'mobile-frontend-overlay-close',
'mobile-frontend-overlay-continue',
-   // @todo FIXME: remove when all new overlays moved to 
stable
-   'mobile-frontend-overlay-escape',
),
'templates' => array(
'OverlayNew',
'LoadingOverlay',
-   // @todo FIXME: remove when all new overlays moved to 
stable
-   'overlay',
),
'styles' => array(
'less/common/OverlayNew.less',
-   // @todo FIXME: remove when all new overlays moved to 
stable
-   'less/common/overlays.less',
)
),
 
diff --git a/javascripts/common/Drawer.js b/javascripts/common/Drawer.js
index 6ecae73..1456cce 100644
--- a/javascripts/common/Drawer.js
+++ b/javascripts/common/Drawer.js
@@ -49,7 +49,7 @@
// FIXME change when 
micro.tap.js in stable
// can't use 'body' 
because the drawer will be closed when
// tapping on it and 
clicks will be prevented
-   $( '#mw-mf-page-center, 
.mw-mf-overlay' ).one( M.tapEvent( 'click' ) + '.drawer', $.proxy( self, 'hide' 
) );
+   $( '#mw-mf-page-center' 
).one( M.tapEvent( 'click' ) + '.drawer', $.proxy( self, 'hide' ) );
}, self.minHideDelay );
}
}, 10 );
@@ -68,7 +68,7 @@
// .one() registers one callback for scroll and 
click independently
// if one fired, get rid of the other one
$( window ).off( '.drawer' );
-   $( '#mw-mf-page-center, .mw-mf-overlay' ).off( 
'.drawer' );
+   $( '#mw-mf-page-center' ).off( '.drawer' );
}, 10 );
},
 
diff --git a/javascripts/common/Overlay.js b/javascripts/common/Overlay.js
index 12496c6..dd03df0 100644
--- a/javascripts/common/Overlay.js
+++ b/javascripts/common/Overlay.js
@@ -1,25 +1,12 @@
 /*jshint unused:vars */
 ( function( M, $ ) {
 
-var View = M.require( 'View' ),
-   Overlay;
-
+   var View = M.require( 'View' ), Overlay;
/**
 * @class Overlay
 * @extends View
 */
Overlay = View.extend( {
-   defaults: {
-   closeMsg: mw.msg( 'mobile-frontend-overlay-escape' )
-   },
-   /**
-* @type {Hogan.Template}
-*/
-   template: M.template.get( '

[MediaWiki-commits] [Gerrit] Fix Chrome bug where popstate could still reset scroll position - change (mediawiki...MultimediaViewer)

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

Change subject: Fix Chrome bug where popstate could still reset scroll position
..


Fix Chrome bug where popstate could still reset scroll position

Change-Id: I3418b2e446a210a406daacc1321103df1f09caa1
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/486
---
M resources/mmv/mmv.bootstrap.js
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 293600e..9e5448a 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -373,6 +373,8 @@
 * Cleans up the overlay
 */
MMVB.cleanupOverlay = function () {
+   var bootstrap = this;
+
$( document.body ).removeClass( 'mw-mmv-lightbox-open' );
 
if ( this.$overlay ) {
@@ -380,8 +382,8 @@
}
 
if ( this.savedScroll ) {
-   $.scrollTo( this.savedScroll, 0 );
-   this.savedScroll = undefined;
+   // setTimeout because otherwise Chrome will scroll back 
to top after the popstate event handlers run
+   setTimeout( function() { $.scrollTo( 
bootstrap.savedScroll, 0 ); bootstrap.savedScroll = undefined; }, 0 );
}
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3418b2e446a210a406daacc1321103df1f09caa1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Tools: Install package libxml2-utils for xmllint - change (operations/puppet)

2014-04-25 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tools: Install package libxml2-utils for xmllint
..


Tools: Install package libxml2-utils for xmllint

Bug: 62944
Change-Id: I68939699832b9e35e9e9d7b780b12101736bf4bd
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index cd8dfb7..f0a5014 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -234,6 +234,7 @@
 'libsvn1',
 'libvips-tools',
 'libvips15',
+'libxml2-utils',   # Bug 62944.
 'libzbar0',# Bug 56996
 'mariadb-client',  # For /usr/bin/mysql.
 'mdbtools',# Bug #48805.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68939699832b9e35e9e9d7b780b12101736bf4bd
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Calak 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Petrb 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] QA: Stop copyvio test running in Chrome - change (mediawiki...MobileFrontend)

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

Change subject: QA: Stop copyvio test running in Chrome
..


QA: Stop copyvio test running in Chrome

It fails on this browser

Change-Id: I7fe7ba2b33f8fdc71ff8617674333fa2ce4625a8
---
M tests/browser/features/uploads_copyvio.feature
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/tests/browser/features/uploads_copyvio.feature 
b/tests/browser/features/uploads_copyvio.feature
index bb3d6dd..591c8cf 100644
--- a/tests/browser/features/uploads_copyvio.feature
+++ b/tests/browser/features/uploads_copyvio.feature
@@ -1,4 +1,5 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @login @test2.m.wikipedia.org
+# FIXME: Get this working on Chrome (bug 64397)
+@en.m.wikipedia.beta.wmflabs.org @firefox @login @test2.m.wikipedia.org
 Feature: Image uploads copyvio notice
 
   Background:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fe7ba2b33f8fdc71ff8617674333fa2ce4625a8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
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] Add beta.m to Wikiversity DNS - change (operations/dns)

2014-04-25 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Add beta.m to Wikiversity DNS
..


Add beta.m to Wikiversity DNS

Add beta.m to list of wikis under Wikiversity's DNS to allow the mobile
site to function.

Bug: 63991
Change-Id: Ibd7a121c5bacc14828f4394fec4c8ffc1472ea87
---
M templates/wikiversity.org
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  PiRSquared17: Looks good to me, but someone else must approve
  Aldnonymous: Looks good to me, but someone else must approve
  coren: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/wikiversity.org b/templates/wikiversity.org
index 1ac900b..3a79756 100644
--- a/templates/wikiversity.org
+++ b/templates/wikiversity.org
@@ -33,6 +33,7 @@
 ; Wikis (alphabetic order)
 
 beta   1H  IN CNAMEwikiversity-lb.wikimedia.org.
+beta.m 1H  IN CNAMEmobile-lb.eqiad.wikimedia.org.
 www1H  IN CNAMEwikiversity-lb.wikimedia.org.
 
 ; All languages will automatically be included here

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd7a121c5bacc14828f4394fec4c8ffc1472ea87
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: John F. Lewis 
Gerrit-Reviewer: Aldnonymous 
Gerrit-Reviewer: PiRSquared17 
Gerrit-Reviewer: coren 
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: WTS: Handle tag fixup that floats inside . - change (mediawiki...parsoid)

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

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

Change subject: WIP: WTS: Handle tag fixup that floats inside .
..

WIP: WTS: Handle tag fixup that floats inside .

Bug: 63642
Change-Id: I71f3e92f6e32b46ab2f9fdf6ac5fd49eabef7dce
---
M tests/parserTests.txt
1 file changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 1430701..fac63aa 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -20865,6 +20865,27 @@
 
 !! end
 
+# The HTML5 parsing algorithm will float the  tag inside the
+#  tag; we need to be aware of this and shift it inside the
+#  where it is safe.
+!! test
+Incorrectly nested  should be fixed up
+by  parser. (bug 63642)
+!! options
+parsoid=html2wt
+!! html/parsoid
+This is bold, but my b tag is not closed!
+
+
+Caption text
+
+This is also bold, but now I'm going to close my tag:
+!! wikitext
+'''This is bold, but my b tag is not closed!'''
+[[File:Foobar.jpg|right|'''Caption text''']]
+'''This is also bold, but now I'm going to close my tag:'''
+!! end
+
 # -
 # End of section for Parsoid-only html2wt tests for serialization
 # of new content

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71f3e92f6e32b46ab2f9fdf6ac5fd49eabef7dce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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] Rewrite MediaViewer as OverlayNew - change (mediawiki...MobileFrontend)

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

Change subject: Rewrite MediaViewer as OverlayNew
..


Rewrite MediaViewer as OverlayNew

Bug: 64269
Bug: 64271
Change-Id: Ic8e206b454ccd0a005d717faf623eb958b16eed2
---
M includes/Resources.php
D javascripts/modules/mediaViewer.js
A javascripts/modules/mediaViewer/ImageApi.js
A javascripts/modules/mediaViewer/ImageOverlay.js
A javascripts/modules/mediaViewer/init.js
M less/modules/mediaViewer.less
M templates/modules/ImageOverlay.html
R tests/javascripts/modules/mediaViewer/test_ImageApi.js
8 files changed, 222 insertions(+), 184 deletions(-)

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



diff --git a/includes/Resources.php b/includes/Resources.php
index 5c57931..421675e 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -525,25 +525,16 @@
'mobile.overlays',
),
'styles' => array(
-   'less/modules/mediaViewer.less',
'less/common/mainmenuAnimation.less',
),
'scripts' => array(
'javascripts/externals/micro.tap.js',
'javascripts/modules/mf-toggle-dynamic.js',
-   'javascripts/modules/mediaViewer.js',
+   'javascripts/modules/mediaViewer/init.js',
'javascripts/modules/keepgoing/keepgoing.js',
'javascripts/modules/languages/preferred.js',
),
-   'templates' => array(
-   'modules/ImageOverlay',
-   ),
'position' => 'bottom',
-   'messages' => array(
-   // mediaViewer.js
-   'mobile-frontend-media-details',
-   'mobile-frontend-media-license-link',
-   ),
),
 
'mobile.search' => $wgMFMobileResourceBoilerplate + array(
@@ -627,6 +618,30 @@
),
),
 
+   'mobile.mediaViewer' => $wgMFMobileResourceBoilerplate + array(
+   'dependencies' => array(
+   'mobile.overlays',
+   // for Api.js
+   'mobile.startup',
+   'mobile.templates',
+   ),
+   'styles' => array(
+   'less/modules/mediaViewer.less',
+   ),
+   'scripts' => array(
+   'javascripts/modules/mediaViewer/ImageApi.js',
+   'javascripts/modules/mediaViewer/ImageOverlay.js',
+   ),
+   'templates' => array(
+   'modules/ImageOverlay',
+   ),
+   'messages' => array(
+   // mediaViewer.js
+   'mobile-frontend-media-details',
+   'mobile-frontend-media-license-link',
+   ),
+   ),
+
'mobile.alpha' => $wgMFMobileResourceBoilerplate + array(
'dependencies' => array(
'mobile.beta',
diff --git a/javascripts/modules/mediaViewer.js 
b/javascripts/modules/mediaViewer.js
deleted file mode 100644
index 4fe0f5a..000
--- a/javascripts/modules/mediaViewer.js
+++ /dev/null
@@ -1,167 +0,0 @@
-( function( M, $ ) {
-   M.assertMode( [ 'alpha', 'beta', 'app' ] );
-
-   var Overlay = M.require( 'Overlay' ),
-   // use predefined buckets so that we don't pollute cache with 
random
-   // size images
-   sizeBuckets = [320, 640, 800, 1024, 1280, 1920, 2560, 2880],
-   Api = M.require( 'api' ).Api,
-   ImageApi, ImageOverlay, api;
-
-   /**
-* Gets the first size larger than or equal to the provided size.
-*/
-   function findSizeBucket( size ) {
-   var i = 0;
-   while ( size > sizeBuckets[i] && i < sizeBuckets.length - 1 ) {
-   ++i;
-   }
-   return sizeBuckets[i];
-   }
-
-   /**
-* @class ImageApi
-* @extends Api
-*/
-   ImageApi = Api.extend( {
-   initialize: function() {
-   this._super();
-   this._cache = {};
-   },
-
-   getThumb: function( title ) {
-   var result = this._cache[title];
-
-   if ( !result ) {
-   this._cache[title] = result = $.Deferred();
-
-   api.get( {
-   action: 'query',
-   prop: 'imageinfo',
-   titles: title,
-   iiprop: ['url', 'extmetadata'],
-   // request an image two times bigger 

[MediaWiki-commits] [Gerrit] Hygiene: Rewrite things as Overlaynew - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Rewrite things as Overlaynew
..


Hygiene: Rewrite things as Overlaynew

Make UploadTutorial an OverlayNew
ContentOverlay as child of OverlayNew
Kill LoadingOverlay
Remove use of dead code in nearby.less for .message - this
is not used anywhere from the look of it (looks like it
was previously used by PagePreviewOverlay which already
uses new overlay code so this rule doesn't apply)

This begins deprecation of the old Overlay class.

Change-Id: Icfdbdfde4ee831261d57013b4b790400d7426044
---
M includes/Resources.php
D javascripts/common/LoadingOverlay.js
M javascripts/modules/nearby/Nearby.js
M javascripts/modules/tutorials/ContentOverlay.js
M javascripts/modules/uploads/UploadTutorial.js
M less/common/OverlayNew.less
M less/modules/tutorials.less
M less/specials/nearby.less
8 files changed, 14 insertions(+), 37 deletions(-)

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



diff --git a/includes/Resources.php b/includes/Resources.php
index 31f68e2..5c57931 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -669,7 +669,6 @@
'scripts' => array(
// @todo FIXME: remove when all new overlays moved to 
stable
'javascripts/common/Overlay.js',
-   'javascripts/common/LoadingOverlay.js',
 
'javascripts/common/OverlayNew.js',
'javascripts/common/LoadingOverlayNew.js',
diff --git a/javascripts/common/LoadingOverlay.js 
b/javascripts/common/LoadingOverlay.js
deleted file mode 100644
index cc40a21..000
--- a/javascripts/common/LoadingOverlay.js
+++ /dev/null
@@ -1,15 +0,0 @@
-( function( M ) {
-   var Overlay = M.require( 'Overlay' ), LoadingOverlay;
-
-   /**
-* @class LoadingOverlay
-* @extends Overlay
-*/
-   LoadingOverlay = Overlay.extend( {
-   templatePartials: {
-   content: M.template.get( 'LoadingOverlay' )
-   }
-   } );
-
-   M.define( 'LoadingOverlay', LoadingOverlay );
-}( mw.mobileFrontend ) );
diff --git a/javascripts/modules/nearby/Nearby.js 
b/javascripts/modules/nearby/Nearby.js
index 8926a87..86f20e0 100644
--- a/javascripts/modules/nearby/Nearby.js
+++ b/javascripts/modules/nearby/Nearby.js
@@ -2,7 +2,7 @@
var NearbyApi = M.require( 'modules/nearby/NearbyApi' ),
View = M.require( 'View' ),
MobileWebClickTracking = M.require( 
'loggingSchemas/MobileWebClickTracking' ),
-   LoadingOverlay = M.require( 'LoadingOverlay' ),
+   LoadingOverlay = M.require( 'LoadingOverlayNew' ),
loader = new LoadingOverlay(),
Nearby;
 
diff --git a/javascripts/modules/tutorials/ContentOverlay.js 
b/javascripts/modules/tutorials/ContentOverlay.js
index 82730ce..ce5ee7a 100644
--- a/javascripts/modules/tutorials/ContentOverlay.js
+++ b/javascripts/modules/tutorials/ContentOverlay.js
@@ -1,6 +1,6 @@
 ( function( M, $ ) {
 
-   var Overlay = M.require( 'Overlay' ), ContentOverlay;
+   var Overlay = M.require( 'OverlayNew' ), ContentOverlay;
 
/**
 * An {@link Overlay} that points at an element on the page.
@@ -8,7 +8,7 @@
 * @extends Overlay
 */
ContentOverlay = Overlay.extend( {
-   className: 'content-overlay',
+   className: 'overlay content-overlay',
/**
 * @type Boolean
 */
diff --git a/javascripts/modules/uploads/UploadTutorial.js 
b/javascripts/modules/uploads/UploadTutorial.js
index 63a7170..88a99c0 100644
--- a/javascripts/modules/uploads/UploadTutorial.js
+++ b/javascripts/modules/uploads/UploadTutorial.js
@@ -1,14 +1,14 @@
 ( function( M, $ ) {
 
var
-   Overlay = M.require( 'Overlay' ),
+   Overlay = M.require( 'OverlayNew' ),
LeadPhotoUploaderButton = M.require( 
'modules/uploads/PhotoUploaderButton' ),
buttonMsg = mw.msg( 
'mobile-frontend-first-upload-wizard-new-page-3-ok' ),
UploadTutorial;
 
UploadTutorial = Overlay.extend( {
template: M.template.get( 'uploads/UploadTutorial' ),
-   className: 'mw-mf-overlay carousel tutorial',
+   className: 'overlay carousel tutorial',
 
defaults: {
pages: [
diff --git a/less/common/OverlayNew.less b/less/common/OverlayNew.less
index d5cf0c5..a295a9d 100644
--- a/less/common/OverlayNew.less
+++ b/less/common/OverlayNew.less
@@ -309,6 +309,14 @@
color: #0645ad;
}
}
+
+   // PagePreviewOverlay
+   .listThumb {
+   width: 100px;
+   height: 100px;
+

[MediaWiki-commits] [Gerrit] Hide My Contributions list for MVP - change (apps...wikipedia)

2014-04-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Hide My Contributions list for MVP
..

Hide My Contributions list for MVP

- Is not complete, not on product roadmap
- Needs diff view to be useful
- Needs network resilence
- Should also have a way to view page history

Leaving the code in to prevent us from being in rebase hell
later on. If not worked on immediately after MVP, do remove.

Change-Id: I17df264249098c3f6c185009c5ece99acdb3285f
---
M wikipedia/res/layout/fragment_navdrawer.xml
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/wikipedia/res/layout/fragment_navdrawer.xml 
b/wikipedia/res/layout/fragment_navdrawer.xml
index d698485..7ce17b6 100644
--- a/wikipedia/res/layout/fragment_navdrawer.xml
+++ b/wikipedia/res/layout/fragment_navdrawer.xml
@@ -82,7 +82,8 @@
   android:orientation="horizontal"
   android:id="@+id/nav_item_my_contributions"
   android:background="@drawable/item_background_holo_light"
->
+  android:visibility="gone"
+> 
 https://gerrit.wikimedia.org/r/129817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] Generate dashboards for additional pilot sites - change (analytics...config)

2014-04-25 Thread MarkTraceur (Code Review)
MarkTraceur has submitted this change and it was merged.

Change subject: Generate dashboards for additional pilot sites
..


Generate dashboards for additional pilot sites

Also moves to the standard wmf wiki label, to allow for
non-wikipedia sites to be added as well.

Change-Id: I3e23a732f364cd554948860f1e8a3d8902fd3017
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/476
---
A dashboards/mmv_cawiki.json
D dashboards/mmv_commons.json
A dashboards/mmv_commonswiki.json
A dashboards/mmv_czwiki.json
A dashboards/mmv_dewiki.json
D dashboards/mmv_en.json
A dashboards/mmv_enwiki.json
A dashboards/mmv_enwikivoyage.json
A dashboards/mmv_etwiki.json
A dashboards/mmv_fiwki.json
D dashboards/mmv_fr.json
A dashboards/mmv_frwiki.json
A dashboards/mmv_hewiki.json
D dashboards/mmv_hu.json
A dashboards/mmv_huwiki.json
A dashboards/mmv_kowiki.json
D dashboards/mmv_mediawiki.json
A dashboards/mmv_mediawikiwiki.json
A dashboards/mmv_plwiki.json
A dashboards/mmv_ptwiki.json
A dashboards/mmv_rowiki.json
A dashboards/mmv_skwiki.json
A dashboards/mmv_thwiki.json
A dashboards/mmv_viwiki.json
A datasources/mmv_actions_cawiki.json
D datasources/mmv_actions_commons.json
A datasources/mmv_actions_commonswiki.json
A datasources/mmv_actions_czwiki.json
A datasources/mmv_actions_dewiki.json
D datasources/mmv_actions_en.json
A datasources/mmv_actions_enwiki.json
A datasources/mmv_actions_enwikivoyage.json
A datasources/mmv_actions_etwiki.json
A datasources/mmv_actions_fiwki.json
D datasources/mmv_actions_fr.json
A datasources/mmv_actions_frwiki.json
A datasources/mmv_actions_hewiki.json
D datasources/mmv_actions_hu.json
A datasources/mmv_actions_huwiki.json
A datasources/mmv_actions_kowiki.json
D datasources/mmv_actions_mediawiki.json
A datasources/mmv_actions_mediawikiwiki.json
A datasources/mmv_actions_plwiki.json
A datasources/mmv_actions_ptwiki.json
A datasources/mmv_actions_rowiki.json
A datasources/mmv_actions_skwiki.json
A datasources/mmv_actions_thwiki.json
A datasources/mmv_actions_viwiki.json
A datasources/mmv_performance_filerepoinfo_cawiki.json
D datasources/mmv_performance_filerepoinfo_commons.json
A datasources/mmv_performance_filerepoinfo_commonswiki.json
A datasources/mmv_performance_filerepoinfo_czwiki.json
A datasources/mmv_performance_filerepoinfo_dewiki.json
D datasources/mmv_performance_filerepoinfo_en.json
A datasources/mmv_performance_filerepoinfo_enwiki.json
A datasources/mmv_performance_filerepoinfo_enwikivoyage.json
A datasources/mmv_performance_filerepoinfo_etwiki.json
A datasources/mmv_performance_filerepoinfo_fiwki.json
D datasources/mmv_performance_filerepoinfo_fr.json
A datasources/mmv_performance_filerepoinfo_frwiki.json
A datasources/mmv_performance_filerepoinfo_hewiki.json
D datasources/mmv_performance_filerepoinfo_hu.json
A datasources/mmv_performance_filerepoinfo_huwiki.json
A datasources/mmv_performance_filerepoinfo_kowiki.json
D datasources/mmv_performance_filerepoinfo_mediawiki.json
A datasources/mmv_performance_filerepoinfo_mediawikiwiki.json
A datasources/mmv_performance_filerepoinfo_plwiki.json
A datasources/mmv_performance_filerepoinfo_ptwiki.json
A datasources/mmv_performance_filerepoinfo_rowiki.json
A datasources/mmv_performance_filerepoinfo_skwiki.json
A datasources/mmv_performance_filerepoinfo_thwiki.json
A datasources/mmv_performance_filerepoinfo_viwiki.json
A datasources/mmv_performance_globalusage_cawiki.json
D datasources/mmv_performance_globalusage_commons.json
A datasources/mmv_performance_globalusage_commonswiki.json
A datasources/mmv_performance_globalusage_czwiki.json
A datasources/mmv_performance_globalusage_dewiki.json
D datasources/mmv_performance_globalusage_en.json
A datasources/mmv_performance_globalusage_enwiki.json
A datasources/mmv_performance_globalusage_enwikivoyage.json
A datasources/mmv_performance_globalusage_etwiki.json
A datasources/mmv_performance_globalusage_fiwki.json
D datasources/mmv_performance_globalusage_fr.json
A datasources/mmv_performance_globalusage_frwiki.json
A datasources/mmv_performance_globalusage_hewiki.json
D datasources/mmv_performance_globalusage_hu.json
A datasources/mmv_performance_globalusage_huwiki.json
A datasources/mmv_performance_globalusage_kowiki.json
D datasources/mmv_performance_globalusage_mediawiki.json
A datasources/mmv_performance_globalusage_mediawikiwiki.json
A datasources/mmv_performance_globalusage_plwiki.json
A datasources/mmv_performance_globalusage_ptwiki.json
A datasources/mmv_performance_globalusage_rowiki.json
A datasources/mmv_performance_globalusage_skwiki.json
A datasources/mmv_performance_globalusage_thwiki.json
A datasources/mmv_performance_globalusage_viwiki.json
A datasources/mmv_performance_image_cawiki.json
D datasources/mmv_performance_image_commons.json
A datasources/mmv_performance_image_commonswiki.json
A datasources/mmv_performance_image_czwiki.json
A datasources/mmv_performance_image_dewiki.json
D datasources/mm

[MediaWiki-commits] [Gerrit] Fix crash when links are clicked in preview pane - change (apps...wikipedia)

2014-04-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Fix crash when links are clicked in preview pane
..

Fix crash when links are clicked in preview pane

Bug: 64418
Change-Id: If7201bd3cfb458c788b9ce907a0325bc83125a51
---
M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
M wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
3 files changed, 29 insertions(+), 10 deletions(-)


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

diff --git 
a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
index c83aa32..8e032f7 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
@@ -1,13 +1,16 @@
 package org.wikipedia.editing;
 
 import android.app.*;
+import android.content.*;
 import android.os.*;
 import android.support.v4.app.Fragment;
-import android.support.v7.app.ActionBarActivity;
+import android.support.v7.app.*;
 import android.view.*;
 import org.json.*;
 import org.wikipedia.*;
 import org.wikipedia.editing.summaries.*;
+import org.wikipedia.history.*;
+import org.wikipedia.page.*;
 
 import java.util.*;
 
@@ -72,6 +75,17 @@
 isDirectionSetup = true;
 }
 
+new LinkHandler(getActivity(), bridge, title.getSite()) {
+@Override
+public void onInternalLinkClicked(PageTitle title) {
+Intent intent = new Intent(getActivity(), PageActivity.class);
+intent.setAction(PageActivity.ACTION_PAGE_FOR_TITLE);
+intent.putExtra(PageActivity.EXTRA_PAGETITLE, title);
+intent.putExtra(PageActivity.EXTRA_HISTORYENTRY, new 
HistoryEntry(title, HistoryEntry.SOURCE_INTERNAL_LINK));
+startActivity(intent);
+}
+};
+
 new EditPreviewTask(getActivity(), wikiText, title) {
 @Override
 public void onBeforeExecute() {
diff --git a/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java 
b/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
index b926813..5bb2cda 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java
@@ -2,19 +2,17 @@
 
 import android.content.*;
 import android.net.*;
+import android.preference.*;
 import android.util.*;
 import com.squareup.otto.*;
 import org.json.*;
 import org.wikipedia.*;
 import org.wikipedia.events.*;
-import org.wikipedia.history.*;
-
-import android.preference.PreferenceManager;
 
 /**
  * Handles any html links coming from a {@link 
org.wikipedia.page.PageViewFragment}
  */
-public class LinkHandler implements CommunicationBridge.JSEventListener {
+public abstract class LinkHandler implements 
CommunicationBridge.JSEventListener {
 private final Context context;
 private final CommunicationBridge bridge;
 private final Bus bus;
@@ -51,6 +49,8 @@
 context.startActivity(intent);
 }
 
+public abstract void onInternalLinkClicked(PageTitle title);
+
 @Override
 public void onMessage(String messageType, JSONObject messagePayload) {
 try {
@@ -62,9 +62,9 @@
 Log.d("Wikipedia", "Link clicked was " + href);
 if (href.startsWith("/wiki/")) {
 // TODO: Handle fragments
+
 PageTitle title = currentSite.titleForInternalLink(href);
-HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
-bus.post(new NewWikiPageNavigationEvent(title, historyEntry));
+onInternalLinkClicked(title);
 } else {
 Uri uri = Uri.parse(href);
 String authority = uri.getAuthority();
@@ -74,8 +74,7 @@
 Site site = new Site(authority);
 //TODO: Handle fragments
 PageTitle title = site.titleForInternalLink(uri.getPath());
-HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_INTERNAL_LINK);
-bus.post(new NewWikiPageNavigationEvent(title, 
historyEntry));
+onInternalLinkClicked(title);
 } else {
 handleExternalLink(uri);
 }
diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
index a1f5426..9e88a76 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
@@ -152,7 +152,13 @@
 setupMessageHandlers();
 U

[MediaWiki-commits] [Gerrit] Generate metrics for additional pilot sites - change (analytics/multimedia)

2014-04-25 Thread MarkTraceur (Code Review)
MarkTraceur has submitted this change and it was merged.

Change subject: Generate metrics for additional pilot sites
..


Generate metrics for additional pilot sites

Change-Id: I8b49ad4e8ab8261788eacc6d0da8dcb67263a5ae
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/476
---
A actions/cawiki.sql
A actions/czwiki.sql
A actions/dewiki.sql
A actions/enwikivoyage.sql
A actions/etwiki.sql
A actions/fiwki.sql
A actions/hewiki.sql
A actions/kowiki.sql
A actions/plwiki.sql
A actions/ptwiki.sql
A actions/rowiki.sql
A actions/skwiki.sql
A actions/thwiki.sql
A actions/viwiki.sql
M generate.php
A perf/cawiki-filerepoinfo.sql
A perf/cawiki-globalusage.sql
A perf/cawiki-image.sql
A perf/cawiki-imagehit.sql
A perf/cawiki-imageinfo.sql
A perf/cawiki-imagemiss.sql
A perf/cawiki-imageusage.sql
A perf/cawiki-thumbnailinfo.sql
A perf/cawiki-userinfo.sql
A perf/czwiki-filerepoinfo.sql
A perf/czwiki-globalusage.sql
A perf/czwiki-image.sql
A perf/czwiki-imagehit.sql
A perf/czwiki-imageinfo.sql
A perf/czwiki-imagemiss.sql
A perf/czwiki-imageusage.sql
A perf/czwiki-thumbnailinfo.sql
A perf/czwiki-userinfo.sql
A perf/dewiki-filerepoinfo.sql
A perf/dewiki-globalusage.sql
A perf/dewiki-image.sql
A perf/dewiki-imagehit.sql
A perf/dewiki-imageinfo.sql
A perf/dewiki-imagemiss.sql
A perf/dewiki-imageusage.sql
A perf/dewiki-thumbnailinfo.sql
A perf/dewiki-userinfo.sql
A perf/enwikivoyage-filerepoinfo.sql
A perf/enwikivoyage-globalusage.sql
A perf/enwikivoyage-image.sql
A perf/enwikivoyage-imagehit.sql
A perf/enwikivoyage-imageinfo.sql
A perf/enwikivoyage-imagemiss.sql
A perf/enwikivoyage-imageusage.sql
A perf/enwikivoyage-thumbnailinfo.sql
A perf/enwikivoyage-userinfo.sql
A perf/etwiki-filerepoinfo.sql
A perf/etwiki-globalusage.sql
A perf/etwiki-image.sql
A perf/etwiki-imagehit.sql
A perf/etwiki-imageinfo.sql
A perf/etwiki-imagemiss.sql
A perf/etwiki-imageusage.sql
A perf/etwiki-thumbnailinfo.sql
A perf/etwiki-userinfo.sql
A perf/fiwki-filerepoinfo.sql
A perf/fiwki-globalusage.sql
A perf/fiwki-image.sql
A perf/fiwki-imagehit.sql
A perf/fiwki-imageinfo.sql
A perf/fiwki-imagemiss.sql
A perf/fiwki-imageusage.sql
A perf/fiwki-thumbnailinfo.sql
A perf/fiwki-userinfo.sql
A perf/hewiki-filerepoinfo.sql
A perf/hewiki-globalusage.sql
A perf/hewiki-image.sql
A perf/hewiki-imagehit.sql
A perf/hewiki-imageinfo.sql
A perf/hewiki-imagemiss.sql
A perf/hewiki-imageusage.sql
A perf/hewiki-thumbnailinfo.sql
A perf/hewiki-userinfo.sql
A perf/kowiki-filerepoinfo.sql
A perf/kowiki-globalusage.sql
A perf/kowiki-image.sql
A perf/kowiki-imagehit.sql
A perf/kowiki-imageinfo.sql
A perf/kowiki-imagemiss.sql
A perf/kowiki-imageusage.sql
A perf/kowiki-thumbnailinfo.sql
A perf/kowiki-userinfo.sql
A perf/plwiki-filerepoinfo.sql
A perf/plwiki-globalusage.sql
A perf/plwiki-image.sql
A perf/plwiki-imagehit.sql
A perf/plwiki-imageinfo.sql
A perf/plwiki-imagemiss.sql
A perf/plwiki-imageusage.sql
A perf/plwiki-thumbnailinfo.sql
A perf/plwiki-userinfo.sql
A perf/ptwiki-filerepoinfo.sql
A perf/ptwiki-globalusage.sql
A perf/ptwiki-image.sql
A perf/ptwiki-imagehit.sql
A perf/ptwiki-imageinfo.sql
A perf/ptwiki-imagemiss.sql
A perf/ptwiki-imageusage.sql
A perf/ptwiki-thumbnailinfo.sql
A perf/ptwiki-userinfo.sql
A perf/rowiki-filerepoinfo.sql
A perf/rowiki-globalusage.sql
A perf/rowiki-image.sql
A perf/rowiki-imagehit.sql
A perf/rowiki-imageinfo.sql
A perf/rowiki-imagemiss.sql
A perf/rowiki-imageusage.sql
A perf/rowiki-thumbnailinfo.sql
A perf/rowiki-userinfo.sql
A perf/skwiki-filerepoinfo.sql
A perf/skwiki-globalusage.sql
A perf/skwiki-image.sql
A perf/skwiki-imagehit.sql
A perf/skwiki-imageinfo.sql
A perf/skwiki-imagemiss.sql
A perf/skwiki-imageusage.sql
A perf/skwiki-thumbnailinfo.sql
A perf/skwiki-userinfo.sql
A perf/thwiki-filerepoinfo.sql
A perf/thwiki-globalusage.sql
A perf/thwiki-image.sql
A perf/thwiki-imagehit.sql
A perf/thwiki-imageinfo.sql
A perf/thwiki-imagemiss.sql
A perf/thwiki-imageusage.sql
A perf/thwiki-thumbnailinfo.sql
A perf/thwiki-userinfo.sql
A perf/viwiki-filerepoinfo.sql
A perf/viwiki-globalusage.sql
A perf/viwiki-image.sql
A perf/viwiki-imagehit.sql
A perf/viwiki-imageinfo.sql
A perf/viwiki-imagemiss.sql
A perf/viwiki-imageusage.sql
A perf/viwiki-thumbnailinfo.sql
A perf/viwiki-userinfo.sql
141 files changed, 4,726 insertions(+), 1 deletion(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b49ad4e8ab8261788eacc6d0da8dcb67263a5ae
Gerrit-PatchSet: 4
Gerrit-Project: analytics/multimedia
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: MarkTraceur 

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


[MediaWiki-commits] [Gerrit] FormatJson: Remove speculative comment - change (mediawiki/core)

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

Change subject: FormatJson: Remove speculative comment
..


FormatJson: Remove speculative comment

Follows-up bec7e8287c69. The comment "Can be removed once we require
PHP >= 5.4.28, 5.5.12, 5.6.0" relies on some assumptions that might
later prove to be incorrect:

* That the fix won't be reverted from any of those PHP versions
  (e.g. if deemed to break BC)

* That the bug will be fixed in PECL jsonc and jsond, as well as in
  HHVM

* That we don't need to support older versions of those once we
  require one of the mentioned PHP versions

Change-Id: I67034c561d54d37dee961ada8c9cf5ccfd113da1
---
M includes/json/FormatJson.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php
index eb5e632..e45dd3a 100644
--- a/includes/json/FormatJson.php
+++ b/includes/json/FormatJson.php
@@ -155,7 +155,6 @@
 
if ( $pretty !== false ) {
// Workaround for 

-   // Can be removed once we require PHP >= 5.4.28, 
5.5.12, 5.6.0
if ( $bug66021 ) {
$json = preg_replace( self::WS_CLEANUP_REGEX, 
'', $json );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67034c561d54d37dee961ada8c9cf5ccfd113da1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nikerabbit 
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


  1   2   3   >