[MediaWiki-commits] [Gerrit] doc: Add missing @static to static ve.Element methods - change (mediawiki...VisualEditor)

2013-08-01 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: doc: Add missing @static to static ve.Element methods
..

doc: Add missing @static to static ve.Element methods

They were incorrectly showing up in generated documentation
as instance methods.

Change-Id: I3668311d9e6bc25d63a1f49cc7a1abe4f6f350aa
---
M modules/ve/ve.Element.js
1 file changed, 5 insertions(+), 7 deletions(-)


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

diff --git a/modules/ve/ve.Element.js b/modules/ve/ve.Element.js
index e8dd29d..314242d 100644
--- a/modules/ve/ve.Element.js
+++ b/modules/ve/ve.Element.js
@@ -48,7 +48,7 @@
 /**
  * Gets a jQuery function within a specific document.
  *
- * @method
+ * @static
  * @param {jQuery|HTMLElement|HTMLDocument|Window} context Context to bind the 
function to
  * @param {ve.ui.Frame} [frame] Frame of the document context
  * @returns {Function} Bound jQuery function
@@ -70,7 +70,7 @@
 /**
  * Get the document of an element.
  *
- * @method
+ * @static
  * @param {jQuery|HTMLElement|HTMLDocument|Window} context Context to bind the 
function to
  * @returns {HTMLDocument} Document object
  * @throws {Error} If context is invalid
@@ -98,7 +98,7 @@
 /**
  * Get the window of an element or document.
  *
- * @method
+ * @static
  * @param {jQuery|HTMLElement|HTMLDocument|Window} context Context to bind the 
function to
  * @returns {Window} Window object
  */
@@ -113,7 +113,7 @@
  *
  * TODO: Make this function not use recursion.
  *
- * @method
+ * @static
  * @param {Window} from Window of the child frame
  * @param {Window} [to=window] Window of the parent frame
  * @param {Object} [offset] Offset to start with, used internally
@@ -156,6 +156,7 @@
 /**
  * Get the offset between two elements.
  *
+ * @static
  * @param {jQuery} $from
  * @param {jQuery} $to
  * @returns {Object} Translated position coordinates, containing top and left 
properties
@@ -173,7 +174,6 @@
  *
  * Override this method to base the result on instance information.
  *
- * @method
  * @returns {string} HTML tag name
  */
 ve.Element.prototype.getTagName = function () {
@@ -183,7 +183,6 @@
 /**
  * Get the DOM document.
  *
- * @method
  * @returns {HTMLDocument} Document object
  */
 ve.Element.prototype.getElementDocument = function () {
@@ -193,7 +192,6 @@
 /**
  * Get the DOM window.
  *
- * @method
  * @returns {Window} Window object
  */
 ve.Element.prototype.getElementWindow = function () {

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

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

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


[MediaWiki-commits] [Gerrit] Remove configuration variable for remote account's password - change (mediawiki...MassMessage)

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

Change subject: Remove configuration variable for remote account's password
..


Remove configuration variable for remote account's password

Since we're editing server-side, even for remote messages, we don't need
to store any passwords.

Change-Id: I15d2425513b4a55af829562a9e36d88a59137c11
---
M MassMessage.php
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/MassMessage.php b/MassMessage.php
index 52c43d8..7dd4946 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -34,13 +34,6 @@
  */
 $wgNamespacesToConvert = array( NS_USER => NS_USER_TALK );
 
-/*
- * Remote account's password
- *
- * Only required for global messages.
- */
-$wgMassMessageAccountPassword = '';
-
 
 $wgExtensionCredits[ 'specialpage' ][] = array(
'path' => __FILE__,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15d2425513b4a55af829562a9e36d88a59137c11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: MZMcBride 
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 unit tests for getParserFunctionTargets and getBaseUrl - change (mediawiki...MassMessage)

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

Change subject: Add unit tests for getParserFunctionTargets and getBaseUrl
..


Add unit tests for getParserFunctionTargets and getBaseUrl

Change-Id: Iccfd2b511098a1686de52cd570e9f00aa26e3f62
---
M MassMessage.hooks.php
M MassMessage.php
A tests/MassMessageTest.php
3 files changed, 80 insertions(+), 0 deletions(-)

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



diff --git a/MassMessage.hooks.php b/MassMessage.hooks.php
index c943498..122a551 100644
--- a/MassMessage.hooks.php
+++ b/MassMessage.hooks.php
@@ -68,4 +68,11 @@
$extraStats['massmessage-queued-count'] = $queued;
return true;
}
+   /**
+* Load our unit tests
+*/
+   public static function onUnitTestsList( &$files ) {
+   $files += glob( __DIR__ . '/tests/*Test.php' );
+   return true;
+   }
 }
diff --git a/MassMessage.php b/MassMessage.php
index 52c43d8..2c6cb8b 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -64,6 +64,7 @@
 
 $wgHooks['ParserFirstCallInit'][] = 'MassMessageHooks::onParserFirstCallInit';
 $wgHooks['SpecialStatsAddExtra'][] = 
'MassMessageHooks::onSpecialStatsAddExtra';
+$wgHooks['UnitTestsList'][] = 'MassMessageHooks::onUnitTestsList';
 
 $wgResourceModules['ext.MassMessage.special'] = array(
'scripts' => 'ext.MassMessage.special.js',
diff --git a/tests/MassMessageTest.php b/tests/MassMessageTest.php
new file mode 100644
index 000..ecadda3
--- /dev/null
+++ b/tests/MassMessageTest.php
@@ -0,0 +1,72 @@
+title = Title::newfromText( 'Input list' );
+   $this->page = WikiPage::factory( $this->title );
+   }
+
+   protected function tearDown() {
+   parent::tearDown();
+   }
+   /**
+* Updates $this->title with the provided text
+* @param  string $text
+*/
+   public static function updatePage( $page, $text ) {
+   $user = new User();
+   $page->doEdit( $text, "summary", 0, false, $user );
+   }
+
+   /**
+* First value is the page text to create
+* Second is the values we should check in the first array
+* @return array
+*/
+   public static function provideGetParserFunctionTargets() {
+   global $wgDBname;
+   return array(
+   array( '{{#target:User talk:Example}}', array( 'dbname' 
=> $wgDBname, 'title' => 'User talk:Example' ), ),
+   );
+   }
+
+   /**
+* Tests MassMessage::getParserFunctionTargets
+* @dataProvider provideGetParserFunctionTargets
+* @param  string $text  Text of the page to create
+* @param  array $check Stuff to check against
+*/
+   public function testGetParserFunctionTargets( $text, $check ) {
+   self::updatePage( $this->page, $text );
+   $data = MassMessage::getParserFunctionTargets( $this->title, 
RequestContext::getMain() );
+   $data = $data[0]; // We're just testing the first value
+   foreach ( $check as $key => $value ) {
+   $this->assertEquals( $data[$key], $value );
+   }
+   }
+
+   /**
+* First parameter is the raw url to parse, second is expected output
+* @return array
+*/
+   public static function provideGetBaseUrl() {
+   return array(
+   array( 'http://en.wikipedia.org', 'en.wikipedia.org' ),
+   array( 'https://en.wikipedia.org/wiki/Blah', 
'en.wikipedia.org' ),
+   array( '//test.wikidata.org/wiki/User talk:Example', 
'test.wikidata.org' ),
+   );
+   }
+
+   /**
+* Tests MassMessage::getBaseUrl
+* @dataProvider provideGetBaseUrl
+* @param  string $url  raw url to parse
+* @param  string $expected expected value
+*/
+   public function testGetBaseUrl( $url, $expected ) {
+   $output = MassMessage::getBaseUrl( $url );
+   $this->assertEquals( $output, $expected );
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccfd2b511098a1686de52cd570e9f00aa26e3f62
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MZMcBride 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)

2013-08-01 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Update VisualEditor to master
..


Update VisualEditor to master

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

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



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 9841726..8ab81cf 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 984172611bb98f4b0565e13671c784fd78c67200
+Subproject commit 8ab81cfe4c6401960dcace6e2b03d1de8d746e4d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8700d08fe3abaa7afb6d84da6c4c28bb6c9469dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf12
Gerrit-Owner: Catrope 
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] Update VisualEditor to master - change (mediawiki/core)

2013-08-01 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Update VisualEditor to master
..

Update VisualEditor to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/77272/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 9841726..8ab81cf 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 984172611bb98f4b0565e13671c784fd78c67200
+Subproject commit 8ab81cfe4c6401960dcace6e2b03d1de8d746e4d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8700d08fe3abaa7afb6d84da6c4c28bb6c9469dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf12
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] VE config changes for https://gerrit.wikimedia.org/r/77165 - change (operations/mediawiki-config)

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

Change subject: VE config changes for https://gerrit.wikimedia.org/r/77165
..


VE config changes for https://gerrit.wikimedia.org/r/77165

On enwiki, make the edit links say "Edit source" and "Edit (beta)",
and show a modal dialog the first time the user opens VE.

Change-Id: I8a2537a2069be423a572e393bf7e11d8ebd54fda
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index e9d1dfe..687193b 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1898,6 +1898,16 @@
if ( $wmgVisualEditorEnableSplitTest ) {
$wgVisualEditorEnableSplitTest = true;
}
+   if ( $wmgVisualEditorShowBetaWelcome ) {
+   $wgVisualEditorShowBetaWelcome = true;
+   }
+   if ( $wmgVisualEditorBetaInTab ) {
+   $wgVisualEditorTabPosition = 'after';
+   $wgVisualEditorTabMessages['editappendix'] =
+   $wgVisualEditorTabMessages['createappendix'] =
+   $wgVisualEditorTabMessages['editsectionappendix'] = 
'visualeditor-beta-appendix';
+   }
+
 
// Also include the Parsoid extension when VE is enabled
require_once( "$IP/extensions/Parsoid/php/Parsoid.php" );
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 52c8e92..a4944fe 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10491,6 +10491,16 @@
'default' => false,
 ),
 
+'wmgVisualEditorShowBetaWelcome' => array(
+   'default' => false,
+   'enwiki' => true,
+),
+
+'wmgVisualEditorBetaInTab' => array(
+   'default' => false,
+   'enwiki' => true,
+),
+
 'wmgUseRSSExtension' => array(
'default' => false,
'foundationwiki' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a2537a2069be423a572e393bf7e11d8ebd54fda
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
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] Expand beta message a bit. - change (mediawiki...VisualEditor)

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

Change subject: Expand beta message a bit.
..


Expand beta message a bit.

Change-Id: I6a49da57540d1702d4477619fb002f9fa0a314de
---
M VisualEditor.i18n.php
M modules/ve/ui/styles/ve.ui.Dialog.css
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 67122d9..7098313 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -89,7 +89,7 @@
'visualeditor-dialog-transclusion-remove-template' => 'Remove template',
'visualeditor-dialog-transclusion-title' => 'Transclusion',
'visualeditor-dialog-beta-welcome-title' => 'Welcome to VisualEditor',
-   'visualeditor-dialog-beta-welcome-content' => 'This is our new, easier 
way to edit. It\'s still in beta, which means you might find parts of the page 
you can\'t edit, or encounter issues that need to be fixed. You can keep using 
our old editor by clicking the "$1" tab instead.',
+   'visualeditor-dialog-beta-welcome-content' => 'This is our new, easier 
way to edit. It\'s still in beta, which means you might find parts of the page 
you can\'t edit, or encounter issues that need to be fixed. We encourage you to 
review your changes, and we welcome reports about any issues you might 
encounter in using VisualEditor (click the \'{{int:visualeditor-beta-label}}\' 
button to submit feedback). You can keep using the wikitext editor by clicking 
the "$1" tab instead – unsaved changes will be lost.',
'visualeditor-dialog-beta-welcome-action-continue' => 'Continue',
'visualeditor-dialogbutton-media-tooltip' => 'Media',
'visualeditor-dialogbutton-meta-tooltip' => 'Page settings',
diff --git a/modules/ve/ui/styles/ve.ui.Dialog.css 
b/modules/ve/ui/styles/ve.ui.Dialog.css
index a79f677..9c3d929 100644
--- a/modules/ve/ui/styles/ve.ui.Dialog.css
+++ b/modules/ve/ui/styles/ve.ui.Dialog.css
@@ -55,7 +55,7 @@
 .ve-ui-dialog .ve-ui-window-frame.ve-ui-window-frame-small {
width: 600px;
min-height: 200px;
-   height: 200px;
+   height: 250px;
 }
 
 .ve-ui-dialog-closing .ve-ui-window-frame {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a49da57540d1702d4477619fb002f9fa0a314de
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Eloquence 
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] Expand beta message a bit. - change (mediawiki...VisualEditor)

2013-08-01 Thread Eloquence (Code Review)
Eloquence has uploaded a new change for review.

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


Change subject: Expand beta message a bit.
..

Expand beta message a bit.

Change-Id: I6a49da57540d1702d4477619fb002f9fa0a314de
---
M VisualEditor.i18n.php
M modules/ve/ui/styles/ve.ui.Dialog.css
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 67122d9..b8b99c2 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -89,7 +89,7 @@
'visualeditor-dialog-transclusion-remove-template' => 'Remove template',
'visualeditor-dialog-transclusion-title' => 'Transclusion',
'visualeditor-dialog-beta-welcome-title' => 'Welcome to VisualEditor',
-   'visualeditor-dialog-beta-welcome-content' => 'This is our new, easier 
way to edit. It\'s still in beta, which means you might find parts of the page 
you can\'t edit, or encounter issues that need to be fixed. You can keep using 
our old editor by clicking the "$1" tab instead.',
+   'visualeditor-dialog-beta-welcome-content' => 'This is our new, easier 
way to edit. It\'s still in beta, which means you might find parts of the page 
you can\'t edit, or encounter issues that need to be fixed. We welcome reports 
about any issues you encounter (click the \'Beta\' button to submit feedback) 
and encourage you to review your changes. You can keep using the wikitext 
editor by clicking the "$1" tab instead – unsaved changes will be lost.',
'visualeditor-dialog-beta-welcome-action-continue' => 'Continue',
'visualeditor-dialogbutton-media-tooltip' => 'Media',
'visualeditor-dialogbutton-meta-tooltip' => 'Page settings',
diff --git a/modules/ve/ui/styles/ve.ui.Dialog.css 
b/modules/ve/ui/styles/ve.ui.Dialog.css
index a79f677..9c3d929 100644
--- a/modules/ve/ui/styles/ve.ui.Dialog.css
+++ b/modules/ve/ui/styles/ve.ui.Dialog.css
@@ -55,7 +55,7 @@
 .ve-ui-dialog .ve-ui-window-frame.ve-ui-window-frame-small {
width: 600px;
min-height: 200px;
-   height: 200px;
+   height: 250px;
 }
 
 .ve-ui-dialog-closing .ve-ui-window-frame {

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

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

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


[MediaWiki-commits] [Gerrit] Update VE to master - change (mediawiki/extensions)

2013-08-01 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Update VE to master
..


Update VE to master

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

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



diff --git a/VisualEditor b/VisualEditor
index 7ecc640..390ce7d 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 7ecc640bd48d606e84457ee84e5010168a7ef699
+Subproject commit 390ce7db3f69accec7151e22cf20317bc517b8b6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27a35f4ec20095bb85ae5975de6e10b0305a4bcb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki.util: Optimise logic in addPortletLink - change (mediawiki/core)

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

Change subject: mediawiki.util: Optimise logic in addPortletLink
..


mediawiki.util: Optimise logic in addPortletLink

Optimised to no longer:
* boolean cast "nextnode" twice.
* assert nextnode.jquery when we know it is a jQuery object.
  > !!$( Node ).jquery
* assert nextnode.length when we know it has only 1 element.
  > $( Node ).length === 1
* execute $ul.find( selector ) twice for the CSS selector case.
* check for .length in some places and do an ignorant eq(0) in
  other cases (thus ignoring the case if there are multiple
  elements).

Tests still pass :-)

Change-Id: Ibc86c2dc33a8a3ba378138525c2523ba69bca8f1
---
M resources/mediawiki/mediawiki.util.js
1 file changed, 18 insertions(+), 20 deletions(-)

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



diff --git a/resources/mediawiki/mediawiki.util.js 
b/resources/mediawiki/mediawiki.util.js
index 6f76839..071a52b 100644
--- a/resources/mediawiki/mediawiki.util.js
+++ b/resources/mediawiki/mediawiki.util.js
@@ -432,29 +432,27 @@
$link.attr( 'accesskey', accesskey );
}
 
-   // nextnode is a DOM element (was the only option 
before MW 1.17, in wikibits.js)
-   // so we make it a jQuery object!
-   if ( nextnode && nextnode.nodeType ) {
-   nextnode = $( nextnode );
+   if ( nextnode ) {
+   if ( nextnode.nodeType || typeof nextnode === 
'string' ) {
+   // nextnode is a DOM element (was the 
only option before MW 1.17, in wikibits.js)
+   // or nextnode is a CSS selector for 
jQuery
+   nextnode = $ul.find( nextnode );
+   } else if ( !nextnode.jquery || 
nextnode[0].parentNode !== $ul[0] ) {
+   // Fallback
+   $ul.append( $item );
+   return $item[0];
+   }
+   if ( nextnode.length === 1 ) {
+   // nextnode is a jQuery object that 
represents exactly one element
+   nextnode.before( $item );
+   return $item[0];
+   }
}
 
-   // Where to put our node ?
-   // - nextnode is a jQuery object that represents 
exactly one element
-   if ( nextnode && nextnode.jquery && nextnode.length === 
1 && nextnode[0].parentNode === $ul[0] ) {
-   nextnode.before( $item );
-
-   // - nextnode is a CSS selector for jQuery
-   } else if ( typeof nextnode === 'string' && $ul.find( 
nextnode ).length !== 0 ) {
-   $ul.find( nextnode ).eq( 0 ).before( $item );
-
-   // If the jQuery selector isn't found within the ,
-   // or if nextnode was invalid or not passed at all,
-   // then just append it at the end of the  (this is 
the default behavior)
-   } else {
-   $ul.append( $item );
-   }
-
+   // Fallback (this is the default behavior)
+   $ul.append( $item );
return $item[0];
+
},
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc86c2dc33a8a3ba378138525c2523ba69bca8f1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Matmarex 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update VE to master - change (mediawiki/extensions)

2013-08-01 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Update VE to master
..

Update VE to master

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


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

diff --git a/VisualEditor b/VisualEditor
index 7ecc640..390ce7d 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 7ecc640bd48d606e84457ee84e5010168a7ef699
+Subproject commit 390ce7db3f69accec7151e22cf20317bc517b8b6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27a35f4ec20095bb85ae5975de6e10b0305a4bcb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
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] Beta welcome dialog - change (mediawiki...VisualEditor)

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

Change subject: Beta welcome dialog
..


Beta welcome dialog

For configured wikis, show a dialog that welcomes the user to the
amazing and fantabulous world of VisualEditing, which is not only full of
wonderment and joy but also may lead to increased popularity and love.

The dialog only shows up once (uses a cookie).

Change-Id: I8e7c4dc2c63b36594378a543b9d66291395eebcf
---
M VisualEditor.hooks.php
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
A modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js
M modules/ve-mw/ui/styles/ve.ui.MWDialog.css
M modules/ve/ui/styles/ve.ui.Dialog.css
M modules/ve/ui/ve.ui.Dialog.js
8 files changed, 116 insertions(+), 2 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 88059ed..3fee364 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -270,7 +270,7 @@
'/common/images/magnify-clip' .
( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
'pageLanguageCode' => 
$out->getTitle()->getPageLanguage()->getHtmlCode(),
-   'pageLanguageDir' => 
$out->getTitle()->getPageLanguage()->getDir(),
+   'pageLanguageDir' => 
$out->getTitle()->getPageLanguage()->getDir()
);
 
return true;
@@ -287,7 +287,8 @@
$wgVisualEditorNamespaces,
$wgVisualEditorPluginModules,
$wgVisualEditorTabPosition,
-   $wgVisualEditorTabMessages;
+   $wgVisualEditorTabMessages,
+   $wgVisualEditorShowBetaWelcome;
 
$vars['wgVisualEditorConfig'] = array(
'disableForAnons' => $wgVisualEditorDisableForAnons,
@@ -302,6 +303,7 @@
'skins' => self::$supportedSkins,
'tabPosition' => $wgVisualEditorTabPosition,
'tabMessages' => $wgVisualEditorTabMessages,
+   'showBetaWelcome' => $wgVisualEditorShowBetaWelcome,
);
 
return true;
diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 1da0d2f..3a6b269 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -88,6 +88,9 @@
'visualeditor-dialog-transclusion-remove-param' => 'Remove parameter',
'visualeditor-dialog-transclusion-remove-template' => 'Remove template',
'visualeditor-dialog-transclusion-title' => 'Transclusion',
+   'visualeditor-dialog-beta-welcome-title' => 'Welcome to VisualEditor',
+   'visualeditor-dialog-beta-welcome-content' => 'This is our new, easier 
way to edit. It\'s still in beta, which means you might find parts of the page 
you can\'t edit, or encounter issues that need to be fixed. You can keep using 
our old editor by clicking the "$1" tab instead.',
+   'visualeditor-dialog-beta-welcome-action-continue' => 'Continue',
'visualeditor-dialogbutton-media-tooltip' => 'Media',
'visualeditor-dialogbutton-meta-tooltip' => 'Page settings',
'visualeditor-dialogbutton-reference-tooltip' => 'Reference',
@@ -343,6 +346,9 @@
'visualeditor-dialog-transclusion-remove-param' => 'Label for button 
that removes a parameter from a template',
'visualeditor-dialog-transclusion-remove-template' => 'Label for button 
that removes a template from a transclusion.
 {{Identical|Remove template}}',
+   'visualeditor-dialog-beta-welcome-title' => 'Title of the beta welcome 
dialog',
+   'visualeditor-dialog-beta-welcome-content' => 'Text explaining 
VisualEditor is in beta. Parameters: $1 is the text for #ca-edit',
+   'visualeditor-dialog-beta-welcome-action-continue' => 'Text to close 
the dialog and continue using visual editor',
'visualeditor-dialog-transclusion-title' => 
'{{Identical|Transclusion}}',
'visualeditor-dialogbutton-media-tooltip' => '{{Identical|Media}}',
'visualeditor-dialogbutton-meta-tooltip' => '{{Identical|Page 
Settings}}',
diff --git a/VisualEditor.php b/VisualEditor.php
index 0eb7f35..7ec15ef 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -494,6 +494,7 @@
 
've/ui/dialogs/ve.ui.PagedDialog.js',
've-mw/ui/dialogs/ve.ui.MWMetaDialog.js',
+   've-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js',
've-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js',
've-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js',
've-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js',
@@ -625,6 +626,9 @@
'visualeditor-dialog-transclusion-remove-template',

[MediaWiki-commits] [Gerrit] Move edit tab generation into PHP and make it more configurable - change (mediawiki...VisualEditor)

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

Change subject: Move edit tab generation into PHP and make it more configurable
..


Move edit tab generation into PHP and make it more configurable

* Generate the edit tabs and the section edit links in PHP, with a
  fallback in JS for cases where we don't have them yet due to
  caching. But only change things if VE is enabled, and have the JS
  correct the state if the wrong cached HTML comes through.
* Make the order of the tabs/links and the messages to use as captions
  configurable
* Make the edit tabs and section edit links always be present in the
  page (regardless of namespace, user prefs, etc.) but be hidden and
  have JS unhide them (using html.ve-available) if appropriate
* Add appendix messages so we can do a superscript "beta" even in places
  where we can't use HTML in the message

VisualEditor.php:
* Add new hook registrations
* Remove edit link caption messages from the init init module because
  they're now added dynamically in VisualEditor.hooks.php
* Add a noscript CSS module so we can hide some things in JS-less
  environments
* Remove $wgVisualEditorTabLayout and replace it with
  $wgVisualEditorPosition
* Add config vars for link captions, with null causing us to use
  the default caption
* Add config vars for link caption appendices. Too many config vars
  but we'll clean that up later

VisualEditor.hooks.php:
* Dynamically add tab messages to the init init module
* Remove unused globals in onBeforePageDisplay()
* Add noscript CSS module
* Add a SkinTemplateNavigation hook that changes and reorders the edit
  tabs as appropriate
* Add a DoEditSectionLink hook that overwrites the edit section links
* Export the new config variables to JS

VisualEditor.i18n.php:
* Add beta appendix message
* Add a message for the default VE edit section link

ve.init.mw.ViewPageTarget.init.css:
* Remove the animation on the edit section links
* Darken the color of the brackets and the pipe from #ccc to #555
* Style the beta message to be superscript-like (but not real  to
  avoid moving the baseline)

ve.init.mw.ViewPageTarget.noscript.css:
* Hide the VE edit tab, the pipe and the VE edit section link initally
  unless and until JS unhides

ve.init.mw.ViewPageTarget.init.js:
* Toggle .ve-not-available / .ve-available
* Edit tabs
** Only generate the the edit tabs if they're not already there from PHP
** Rewrite the edit tab generation to mirror what's being done in PHP
* Section edit links
** Same as for edit tabs
** Also add mw-visualeditor-expanded to pad the brackets

ve.init.mw.ViewPageTarget.js:
* #ca-ve-edit is now always the VE tab (and #ca-edit always the
  edit source tab) so update the .selected behavior accordingly

Change-Id: Idcb15faea7fabe5fe7578b1508079969b27d2469
---
M VisualEditor.hooks.php
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
A modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.noscript.css
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
7 files changed, 346 insertions(+), 168 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 7b1153a..88059ed 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -14,7 +14,7 @@
 
public static function onSetup() {
global $wgVisualEditorEnableEventLogging, $wgResourceModules,
-   $wgVisualEditorResourceTemplate;
+   $wgVisualEditorResourceTemplate, 
$wgVisualEditorTabMessages;
 
// This prevents VisualEditor from being run in environments 
that don't
// have the dependent code in core; this should be updated as a 
part of
@@ -24,6 +24,13 @@
// this should have no impact on deploying to Wikimedia's wiki 
cluster.
// Is fine for release tarballs because 1.22wmf11 < 1.22alpha < 
1.22.0.
wfUseMW( '1.22wmf11' );
+
+   // Add tab messages to the init init module
+   foreach ( $wgVisualEditorTabMessages as $msg ) {
+   if ( $msg !== null ) {
+   
$wgResourceModules['ext.visualEditor.viewPageTarget.init']['messages'][] = $msg;
+   }
+   }
 
if ( $wgVisualEditorEnableEventLogging ) {
if ( class_exists( 'ResourceLoaderSchemaModule' ) ) {
@@ -78,7 +85,7 @@
}
 
/**
-* Adds VisualEditor JS to the output if in the correct namespace.
+* Adds VisualEditor JS to the output.
 *
 * This is attached to the MediaWiki 'BeforePageDisplay' hook.
 *
@@ -86,14 +93,147 @@
 * @param $skin Skin
 */
public static function onBeforePageDi

[MediaWiki-commits] [Gerrit] [DO NOT MERGE] Turn VisualEditor beta welcome on everywhere - change (operations/mediawiki-config)

2013-08-01 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: [DO NOT MERGE] Turn VisualEditor beta welcome on everywhere
..

[DO NOT MERGE] Turn VisualEditor beta welcome on everywhere

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a4944fe..ae7b858 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10492,8 +10492,7 @@
 ),
 
 'wmgVisualEditorShowBetaWelcome' => array(
-   'default' => false,
-   'enwiki' => true,
+   'default' => true,
 ),
 
 'wmgVisualEditorBetaInTab' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide7a94bfa280a9acd1b1c7adec2644cfc2f596b5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] VE config changes for https://gerrit.wikimedia.org/r/77165 - change (operations/mediawiki-config)

2013-08-01 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: VE config changes for https://gerrit.wikimedia.org/r/77165
..

VE config changes for https://gerrit.wikimedia.org/r/77165

On enwiki, make the edit links say "Edit source" and "Edit (beta)",
and show a modal dialog the first time the user opens VE.

Change-Id: I8a2537a2069be423a572e393bf7e11d8ebd54fda
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index e9d1dfe..687193b 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1898,6 +1898,16 @@
if ( $wmgVisualEditorEnableSplitTest ) {
$wgVisualEditorEnableSplitTest = true;
}
+   if ( $wmgVisualEditorShowBetaWelcome ) {
+   $wgVisualEditorShowBetaWelcome = true;
+   }
+   if ( $wmgVisualEditorBetaInTab ) {
+   $wgVisualEditorTabPosition = 'after';
+   $wgVisualEditorTabMessages['editappendix'] =
+   $wgVisualEditorTabMessages['createappendix'] =
+   $wgVisualEditorTabMessages['editsectionappendix'] = 
'visualeditor-beta-appendix';
+   }
+
 
// Also include the Parsoid extension when VE is enabled
require_once( "$IP/extensions/Parsoid/php/Parsoid.php" );
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 52c8e92..a4944fe 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10491,6 +10491,16 @@
'default' => false,
 ),
 
+'wmgVisualEditorShowBetaWelcome' => array(
+   'default' => false,
+   'enwiki' => true,
+),
+
+'wmgVisualEditorBetaInTab' => array(
+   'default' => false,
+   'enwiki' => true,
+),
+
 'wmgUseRSSExtension' => array(
'default' => false,
'foundationwiki' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a2537a2069be423a572e393bf7e11d8ebd54fda
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Fix central session usage in Special:CentralAutoLogin - change (mediawiki...CentralAuth)

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

Change subject: Fix central session usage in Special:CentralAutoLogin
..


Fix central session usage in Special:CentralAutoLogin

The central session expires when the user's browser is closed.
Special:CentralAutoLogin should check for this, and take appropriate
measures if the keys it had stored in the session are no longer present.

This fixes various PHP warnings and makes it better about honoring the
"remember me" checkbox from the original login.

Change-Id: I1f551fed312af7e70c5899d92e7f5726710f6f6d
---
M CentralAuthHooks.php
M specials/SpecialCentralAutoLogin.php
2 files changed, 40 insertions(+), 8 deletions(-)

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



diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index 02079dc..11087e2 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -375,6 +375,7 @@
$url = wfAppendQuery( $wiki->getFullUrl( 
'Special:CentralAutoLogin/refreshCookies' ), array(
'type' => '1x1',
'wikiid' => wfWikiID(),
+   'proto' => 
RequestContext::getMain()->getRequest()->detectProtocol(),
) );
$inject_html .= Xml::element( 'img',
array(
@@ -1064,6 +1065,7 @@
$url = wfAppendQuery( 
$wiki->getFullUrl( 'Special:CentralAutoLogin/refreshCookies' ), array(
'type' => '1x1',
'wikiid' => wfWikiID(),
+   'proto' => 
RequestContext::getMain()->getRequest()->detectProtocol(),
) );
$out->addHTML( Xml::element( 
'img',
array(
diff --git a/specials/SpecialCentralAutoLogin.php 
b/specials/SpecialCentralAutoLogin.php
index ed500f3..e5de1ad 100644
--- a/specials/SpecialCentralAutoLogin.php
+++ b/specials/SpecialCentralAutoLogin.php
@@ -45,7 +45,8 @@
'from',
'return',
'returnto',
-   'returnquery'
+   'returnquery',
+   'proto'
);
 
switch ( strval( $par ) ) {
@@ -62,14 +63,20 @@
CentralAuthUser::setP3P();
$centralUser = CentralAuthUser::getInstance( 
$this->getUser() );
if ( $centralUser && $centralUser->getId() ) {
-   $centralSession = $centralUser->getSession();
+   $centralSession = $this->getCentralSession( 
$centralUser );
+
+   // Refresh 'remember me' preference
+   $remember = (bool)$centralSession['remember'];
+   if ( $remember != 
$this->getUser()->getBoolOption( 'rememberpassword' ) ) {
+   $this->getUser()->setOption( 
'rememberpassword', $remember ? 1 : 0 );
+   $this->getUser()->saveSettings();
+   }
+
$secureCookie = null;
if ( $centralSession['finalProto'] == 'http' ) {
$secureCookie = false;
}
-   $centralUser->setGlobalCookies(
-   $centralSession['remember'], false, 
$secureCookie, $centralSession
-   );
+   $centralUser->setGlobalCookies( $remember, 
false, $secureCookie, $centralSession );
$this->doFinalOutput( true, 'success' );
} else {
$this->doFinalOutput( false, 'Not logged in' );
@@ -84,6 +91,7 @@
CentralAuthUser::setP3P();
$this->do302Redirect( $this->loginWiki, 
'checkLoggedIn', array(
'wikiid' => wfWikiID(),
+   'proto' => $request->detectProtocol(),
) + $params );
return;
 
@@ -165,10 +173,8 @@
return;
}
 
-   // Notify the attached wiki if cookies need to be 
insecure
-   $centralSession = $centralUser->getSession();
-
// Write info for session creation into memc
+   $centralSession = $this->getCentralSession( 
$centralUser );
$memc

[MediaWiki-commits] [Gerrit] doc: Clarify documentation for ParserOptions::getUserLangObj - change (mediawiki/core)

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

Change subject: doc: Clarify documentation for ParserOptions::getUserLangObj
..


doc: Clarify documentation for ParserOptions::getUserLangObj

It no longer produces inconsistent link tables, that was fixed
in r89706 by setting the parser to the default language when
saving, and then when viewing it might reparse for a different
uselang if needed (without saving link updates).

Of course, that isn't pretty and it should still be discouraged.

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

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



diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index b01f162..bde508a 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -280,9 +280,17 @@
}
 
/**
+* Get the user language used by the parser for this page.
+*
 * You shouldn't use this. Really. $parser->getFunctionLang() is all 
you need.
-* Using this fragments the cache and is discouraged. Yes, {{int: }} 
uses this,
-* producing inconsistent tables (Bug 14404).
+*
+* To avoid side-effects where the page will be rendered based on the 
language
+* of the user who last saved, this function will triger a cache 
fragmentation.
+* Usage of this method is discouraged for that reason.
+*
+* When saving, this will return the default language instead of the 
user's.
+*
+* {{int: }} uses this which used to produce inconsistent link tables 
(bug 14404).
 *
 * @return Language object
 * @since 1.19

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I599a7162fed458713ffa3a754086c6a2ffdebe07
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Simplify Multi-wiki setups - change (mediawiki...OAuth)

2013-08-01 Thread CSteipp (Code Review)
CSteipp has uploaded a new change for review.

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


Change subject: Simplify Multi-wiki setups
..

Simplify Multi-wiki setups

* Only allow the OAuth handshake to occure on the central wiki. This
could be changed in the future, but simplifies the logic for now.
* Add check during handshake to ensure central wiki user is valid
* Fix error message display for /authorize phase

Change-Id: I8d482961d58251e931d5454533537b8e719e8357
---
M backend/MWOAuthUtils.php
M frontend/MWOAuthUI.setup.php
M frontend/language/MWOAuth.i18n.php
M frontend/specialpages/SpecialMWOAuth.php
4 files changed, 18 insertions(+), 8 deletions(-)


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

diff --git a/backend/MWOAuthUtils.php b/backend/MWOAuthUtils.php
index 0061623..302af26 100644
--- a/backend/MWOAuthUtils.php
+++ b/backend/MWOAuthUtils.php
@@ -257,11 +257,11 @@
 *
 * @param User $user
 * @return integer|bool ID or false if not found
-* @throws MWOAuthException
 */
public static function getCentralIdFromLocalUser( User $user ) {
global $wgMWOAuthCentralWiki;
 
+   // TODO: This allows a non-global account on the central wiki 
to use OAuth
if ( MWOAuthUtils::isCentralWiki() ) {
$id = $user->getId();
} else { // only some central user system can give us the ID
@@ -276,10 +276,6 @@
// Process cache the result to avoid queries
$user->oAuthUserData['centralId'] = $id;
}
-   }
-
-   if ( !$id ) {
-   throw new MWOAuthException( 
'mwoauthserver-invalid-user' );
}
 
return $id;
diff --git a/frontend/MWOAuthUI.setup.php b/frontend/MWOAuthUI.setup.php
index e0e1969..cf29b6f 100644
--- a/frontend/MWOAuthUI.setup.php
+++ b/frontend/MWOAuthUI.setup.php
@@ -10,9 +10,9 @@
 */
public static function defineSpecialPages( array &$pages, array 
&$groups ) {
// Pages available on all wikis
-   $pages['MWOAuth'] = 'SpecialMWOAuth';
// Pages specific to the central OAuth management wiki
if ( MWOAuthUtils::isCentralWiki() ) {
+   $pages['MWOAuth'] = 'SpecialMWOAuth';
$pages['MWOAuthConsumerRegistration'] = 
'SpecialMWOAuthConsumerRegistration';
$groups['MWOAuthConsumerRegistration'] = 'users';
$pages['MWOAuthManageConsumers'] = 
'SpecialMWOAuthManageConsumers';
diff --git a/frontend/language/MWOAuth.i18n.php 
b/frontend/language/MWOAuth.i18n.php
index d33c59e..4fb93c9 100644
--- a/frontend/language/MWOAuth.i18n.php
+++ b/frontend/language/MWOAuth.i18n.php
@@ -207,6 +207,8 @@
'mwoauth-authorize-form-description' => 'Application description: $1',
'mwoauth-authorize-form-version' => 'Application version: $1',
'mwoauth-authorize-form-wiki' => 'Wiki: $1',
+   'mwoauth-authorize-form-invalid-user' => 'This user account cannot use 
OAuth, because the account on this wiki, and the account on the central OAuth 
wiki are not linked.',
+   'mwoauth-error' => 'OAuth Error',
'mwoauth-grants-heading' => 'Requested permissions: ',
'mwoauth-grants-nogrants' => 'The application has not requested any 
permissions.',
 
@@ -478,6 +480,8 @@
'mwoauth-authorize-form-description' => '{{Identical|Application 
description}}',
'mwoauth-authorize-form-version' => '{{Identical|Application version}}',
'mwoauth-authorize-form-wiki' => '{{Identical|Wiki}}',
+   'mwoauth-authorize-form-invalid-user' => 'Text of the error page when 
the user cannot use OAuth.',
+   'mwoauth-error' => 'Heading on the page, whenever an OAuth error is 
presented to a user.',
'mwoauth-grants-heading' => 'Used as label for the grants list.
 
 See also:
diff --git a/frontend/specialpages/SpecialMWOAuth.php 
b/frontend/specialpages/SpecialMWOAuth.php
index e739dfd..b9284c1 100644
--- a/frontend/specialpages/SpecialMWOAuth.php
+++ b/frontend/specialpages/SpecialMWOAuth.php
@@ -10,7 +10,7 @@
$request = $this->getRequest();
$format = $request->getVal( 'format', 'raw' );
if ( !in_array( $subpage, array( 'initiate', 'authorize', 
'token' ) ) ) {
-   $this->showError( wfMessage( 
'oauth-client-invalidrequest' ), $format );
+   $this->showError( 'oauth-client-invalidrequest', 
$format );
}
 
try {
@@ -25,6 +25,7 @@
break;
case 'authorize':
//TODO: most of the "controller" logic 
should be move som

[MediaWiki-commits] [Gerrit] legacy upload.js: Clean up and remove from jshintignore - change (mediawiki/core)

2013-08-01 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: legacy upload.js: Clean up and remove from jshintignore
..

legacy upload.js: Clean up and remove from jshintignore

* Coding style:
  - Braces
  - Single quotes
  - Dot instead of bracket access for properties

* Fixed various implied global/static variables, most significantly
  the for-loop variable 'cached' etc.
* Changed == '' to ! since === '' will require it to be a string
  and == '' returns true for almost anything that is falsy, no
  good way to choose a strict alternative.
* Changed setAttribute('disabled', ..) to using .property instead.
* Using setTimeout as a global instead of as a window property.
* Using other globals from wikibits.js through window property,
  as they are defined.
* Use a closure instead of string eval() in setTimeout().
* Made local equivelants for some global variables for access
  inside the closure.
* Don't create functions in a loop. Moved the onchange function
  outside the loop and re-used it for each one (safe in this case,
  and more efficient).

Change-Id: I9df912ee48d30c189394bf07f5e49014220f36a3
---
M .jshintignore
M skins/common/upload.js
2 files changed, 161 insertions(+), 120 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/77266/1

diff --git a/.jshintignore b/.jshintignore
index ad5e959..f067ecd 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -29,7 +29,6 @@
 skins/common/IEFixes.js
 skins/common/config.js
 skins/common/protect.js
-skins/common/upload.js
 
 # github.com/jshint/jshint/issues/729
 tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js
diff --git a/skins/common/upload.js b/skins/common/upload.js
index 4246e82..4ebde75 100644
--- a/skins/common/upload.js
+++ b/skins/common/upload.js
@@ -1,39 +1,48 @@
+/*global sajax_init_object, sajax_do_call */
+/*jshint camelcase:false */
 ( function ( mw, $ ) {
-varajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ),
+varlicenseSelectorCheck, wgUploadWarningObj, wgUploadLicenseObj, 
fillDestFilename,
+   ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ),
fileExtensions = mw.config.get( 'wgFileExtensions' );
 
-window.licenseSelectorCheck = function() {
-   var selector = document.getElementById( "wpLicense" );
-   var selection = selector.options[selector.selectedIndex].value;
-   if( selector.selectedIndex > 0 ) {
-   if( selection == "" ) {
+licenseSelectorCheck = window.licenseSelectorCheck = function () {
+   var selector = document.getElementById( 'wpLicense' ),
+   selection = selector.options[selector.selectedIndex].value;
+   if ( selector.selectedIndex > 0 ) {
+   if ( !selection ) {
// Option disabled, but browser is broken and doesn't 
respect this
selector.selectedIndex = 0;
}
}
// We might show a preview
-   wgUploadLicenseObj.fetchPreview( selection );
+   wgUploadWarningObj.fetchPreview( selection );
 };
 
 function uploadSetup() {
// Disable URL box if the URL copy upload source type is not selected
-   var e = document.getElementById( 'wpSourceTypeurl' );
-   if( e ) {
-   if( !e.checked ) {
-   var ein = document.getElementById( 'wpUploadFileURL' );
-   if(ein)
-   ein.setAttribute( 'disabled', 'disabled' );
+   var ein,
+   selector, ua, isMacIe, i,
+   optionsTable, row, td,
+   wpLicense, wpLicenseRow, wpLicenseTbody,
+   uploadSourceIds, len, onchange,
+   e = document.getElementById( 'wpSourceTypeurl' );
+   if ( e ) {
+   if ( !e.checked ) {
+   ein = document.getElementById( 'wpUploadFileURL' );
+   if ( ein ) {
+   ein.disabled = true;
+   }
}
}
 
// For MSIE/Mac: non-breaking spaces cause the  not to render.
// But for some reason, setting the text to itself works
-   var selector = document.getElementById("wpLicense");
-   if (selector) {
-   var ua = navigator.userAgent;
-   var isMacIe = (ua.indexOf("MSIE") != -1) && (ua.indexOf("Mac") 
!= -1);
-   if (isMacIe) {
-   for (var i = 0; i < selector.options.length; i++) {
+   selector = document.getElementById( 'wpLicense' );
+   if ( selector ) {
+   ua = navigator.userAgent;
+   isMacIe = ua.indexOf( 'MSIE' ) !== -1 && ua.indexOf( 'Mac' ) 
!== -1;
+   if ( isMacIe ) {
+   for ( i = 0; i < selector.options.length; i++ ) {
selector.options[i].text = 
selector.options[i].

[MediaWiki-commits] [Gerrit] Don't override link target input value while typing - change (mediawiki...VisualEditor)

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

Change subject: Don't override link target input value while typing
..


Don't override link target input value while typing

In some cases this would make VisualEditor be way too aggressive in
forcing you into the first matching page.

Bug: 52420
Change-Id: Ie0a793853d884ee0abf490a99c5214082e9dbf27
---
M modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
index cd42942..30eac64 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
@@ -155,7 +155,8 @@
// Update annotation to match selected item
item = this.lookupMenu.getSelectedItem();
if ( item ) {
-   this.setAnnotation( item.getData() );
+   // Set annotation directly, bypassing re-setting the value of 
the input
+   this.annotation = item.getData();
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0a793853d884ee0abf490a99c5214082e9dbf27
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal 
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] Bug 51194: Localize the publication date in the metadata. - change (mediawiki...BookManagerv2)

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

Change subject: Bug 51194: Localize the publication date in the metadata.
..


Bug 51194: Localize the publication date in the metadata.

This adds functionality to localize publication dates, which can
be either a year, a month and a year, or a day, month, and year.
This solution seems a bit... hacky... any suggestions would be
very welcome.

Change-Id: I21f750c3f3c66d4fbf1d6a88a13dad90beaa5dea
---
M BookManagerv2.hooks.php
1 file changed, 36 insertions(+), 8 deletions(-)

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



diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index ec38eff..26ddfc6 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -197,18 +197,46 @@
 * @return string HTML list item element
 */
public static function addDate( $year, $month, $day ) {
-   // TODO: This needs to be localized.
-   $output = Html::openElement( 'li', array() );
-   if ( $day && !$month ) {
+   global $wgLang, $wgUser;
+
+   // Basic validation of inputs
+   if ( !$month || $month < 1 || $month > 12 ) {
+   $month = null;
+   } else {
+   $monthStr = str_pad( (string)$month, 2, "0", 
STR_PAD_LEFT );
+   }
+
+   if ( !$day || $day < 1 || $day > 31 ) {
+   $day = null;
+   } else {
+   $dayStr = str_pad( (string)$day, 2, "0", STR_PAD_LEFT );
+   }
+
+   if ( $year ) {
+   $yearStr = str_pad( (string)$year, 4, "0", STR_PAD_LEFT 
);
+   }
+
+   if ( $year && !$month ) {
// Having a day without a month doesn't make much sense
$date = $year;
+   $datetime = $year;
+   } else if ( $year && $month && !$day ) {
+   $ts = $yearStr . $monthStr . "0100";
+   $format = $wgLang->getDateFormatString( 'monthonly',
+   $wgUser->getDatePreference() ?: 'default' );
+   $date = $wgLang->sprintfDate( $format, $ts );
+   $datetime = $yearStr . "-" . $monthStr;
} else {
-   $date = $day ? $day . "/" : "";
-   $date .= $month ? $month . "/" : "";
-   $date .= $year ? $year : "";
+   $ts = $yearStr . $monthStr . $dayStr . "00";
+   $format = $wgLang->getDateFormatString( 'date',
+   $wgUser->getDatePreference() ?: 'default' );
+   $date = $wgLang->sprintfDate( $format, $ts );
+   $datetime = $yearStr . "-" . $monthStr . "-" . $dayStr;
}
-   $output .= wfMessage( 'bookmanagerv2-publication-date',
-   $date )->text()
+   $output = Html::openElement( 'li', array() )
+   . Html::openElement( 'time', array( 'datetime' => 
$datetime ) )
+   . wfMessage( 'bookmanagerv2-publication-date', $date 
)->text()
+   . Html::closeElement( 'time' )
. Html::closeElement( 'li' );
return $output;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I21f750c3f3c66d4fbf1d6a88a13dad90beaa5dea
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite 
Gerrit-Reviewer: Mollywhite 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Making title-params no longer required. - change (mediawiki...Echo)

2013-08-01 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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


Change subject: Making title-params no longer required.
..

Making title-params no longer required.

In theory, a notification could not need any contextual information
so there's no reason we should make it required.

Now, if the title-params are not provided in the notifcation
definition, it just sets the value to an empty array.

Change-Id: Iba5ce5cc56010101c5e64976c95b37a215dc99fa
---
M formatters/BasicFormatter.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index 3eaa97a..70c3e20 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -41,8 +41,7 @@
 * @param array
 */
protected $requiredParameters = array (
-   'title-message',
-   'title-params'
+   'title-message'
);
 
/**
@@ -57,14 +56,14 @@
public function __construct( $params ) {
parent::__construct( $params );
 
+   // Set up default params if any are missing
+   $params += $this->getDefaultParams();
+
// Title for archive page
$this->title = array(
'message' => $params['title-message'],
'params' => $params['title-params']
);
-
-   // Set up default params if one is missing
-   $params += $this->getDefaultParams();
 
// Title for the flyout
$this->flyoutTitle = array(
@@ -108,6 +107,7 @@
 */
protected function getDefaultParams() {
return array(
+   'title-params' => array(),
'flyout-message' => $this->title['message'],
'flyout-params' => $this->title['params'],
'bundle-message' => '',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba5ce5cc56010101c5e64976c95b37a215dc99fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] Don't override link target input value while typing - change (mediawiki...VisualEditor)

2013-08-01 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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


Change subject: Don't override link target input value while typing
..

Don't override link target input value while typing

In some cases this would make VisualEditor be way too aggressive in forcing you 
into the first matching page.

Change-Id: Ie0a793853d884ee0abf490a99c5214082e9dbf27
---
M modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
index cd42942..30eac64 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWLinkTargetInputWidget.js
@@ -155,7 +155,8 @@
// Update annotation to match selected item
item = this.lookupMenu.getSelectedItem();
if ( item ) {
-   this.setAnnotation( item.getData() );
+   // Set annotation directly, bypassing re-setting the value of 
the input
+   this.annotation = item.getData();
}
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0a793853d884ee0abf490a99c5214082e9dbf27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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] Remove configuration variable for remote account's password - change (mediawiki...MassMessage)

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

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


Change subject: Remove configuration variable for remote account's password
..

Remove configuration variable for remote account's password

Since we're editing server-side, even for remote messages, we don't need
to store any passwords.

Change-Id: I15d2425513b4a55af829562a9e36d88a59137c11
---
M MassMessage.php
1 file changed, 0 insertions(+), 7 deletions(-)


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

diff --git a/MassMessage.php b/MassMessage.php
index 52c43d8..7dd4946 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -34,13 +34,6 @@
  */
 $wgNamespacesToConvert = array( NS_USER => NS_USER_TALK );
 
-/*
- * Remote account's password
- *
- * Only required for global messages.
- */
-$wgMassMessageAccountPassword = '';
-
 
 $wgExtensionCredits[ 'specialpage' ][] = array(
'path' => __FILE__,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15d2425513b4a55af829562a9e36d88a59137c11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
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] Remove trailing whitespace - change (mediawiki...MassMessage)

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

Change subject: Remove trailing whitespace
..


Remove trailing whitespace

Change-Id: Iff9619b77154eb92f471d16626a604dc2279c174
---
M MassMessage.php
M SpecialMassMessage.php
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/MassMessage.php b/MassMessage.php
index fcf0445..85d30b3 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -41,7 +41,7 @@
  */
 $wgMassMessageAccountPassword = '';
 
- 
+
 $wgExtensionCredits[ 'specialpage' ][] = array(
'path' => __FILE__,
'name' => 'MassMessage',
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index ebf16b4..232a6c0 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -22,7 +22,7 @@
function __construct() {
parent::__construct( 'MassMessage', 'massmessage' );
}
- 
+
function execute( $par ) {
$request = $this->getRequest();
$context = $this->getContext();
@@ -55,7 +55,7 @@
$form->suppressDefaultSubmit(); // We use our own buttons.
$form->setSubmitCallback( array( $this, 'callback' ) );
$form->setMethod( 'post' );
-   
+
$form->prepareForm();
$result = $form->tryAuthorizedSubmit();
if ( $result === true || ( $result instanceof Status && 
$result->isGood() ) ) {
@@ -197,7 +197,7 @@
 */
function logToWiki( $spamlist, $subject ) {
// $title->getLatestRevID()
-   
+
$logEntry = new ManualLogEntry( 'massmessage', 'send' );
$logEntry->setPerformer( $this->getUser() );
$logEntry->setTarget( $spamlist );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff9619b77154eb92f471d16626a604dc2279c174
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove trailing whitespace - change (mediawiki...MassMessage)

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

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


Change subject: Remove trailing whitespace
..

Remove trailing whitespace

Change-Id: Iff9619b77154eb92f471d16626a604dc2279c174
---
M MassMessage.php
M SpecialMassMessage.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/MassMessage.php b/MassMessage.php
index fcf0445..85d30b3 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -41,7 +41,7 @@
  */
 $wgMassMessageAccountPassword = '';
 
- 
+
 $wgExtensionCredits[ 'specialpage' ][] = array(
'path' => __FILE__,
'name' => 'MassMessage',
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index ebf16b4..232a6c0 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -22,7 +22,7 @@
function __construct() {
parent::__construct( 'MassMessage', 'massmessage' );
}
- 
+
function execute( $par ) {
$request = $this->getRequest();
$context = $this->getContext();
@@ -55,7 +55,7 @@
$form->suppressDefaultSubmit(); // We use our own buttons.
$form->setSubmitCallback( array( $this, 'callback' ) );
$form->setMethod( 'post' );
-   
+
$form->prepareForm();
$result = $form->tryAuthorizedSubmit();
if ( $result === true || ( $result instanceof Status && 
$result->isGood() ) ) {
@@ -197,7 +197,7 @@
 */
function logToWiki( $spamlist, $subject ) {
// $title->getLatestRevID()
-   
+
$logEntry = new ManualLogEntry( 'massmessage', 'send' );
$logEntry->setPerformer( $this->getUser() );
$logEntry->setTarget( $spamlist );

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

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

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


[MediaWiki-commits] [Gerrit] Fix grouppage-* message - change (mediawiki...WikimediaMessages)

2013-08-01 Thread Shirayuki (Code Review)
Shirayuki has uploaded a new change for review.

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


Change subject: Fix grouppage-* message
..

Fix grouppage-* message

* grouppage-* should be plural for consistency

Change-Id: I65db2aa7fc6bb9c2034aaf7bdb4805420f6c2251
---
M WikimediaMessages.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index 55a66ee..6a1d083 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -93,7 +93,7 @@
 
'group-eliminator'=> 'Eliminators',
'group-eliminator-member' => '{{GENDER:$1|eliminator}}',
-   'grouppage-eliminator'=> '{{ns:project}}:Eliminator',
+   'grouppage-eliminator'=> '{{ns:project}}:Eliminators',
 
'group-filemover'=> 'File movers',
'group-filemover-member' => '{{GENDER:$1|file mover}}',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65db2aa7fc6bb9c2034aaf7bdb4805420f6c2251
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
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] mw.ViewPageTarget.init: Fix pageExists/isViewPage behaviour - change (mediawiki...VisualEditor)

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

Change subject: mw.ViewPageTarget.init: Fix pageExists/isViewPage behaviour
..


mw.ViewPageTarget.init: Fix pageExists/isViewPage behaviour

"Let me clarify this for you" - Timo

Follows-up 1984c3ca46cceb.

Bug: 49000
Change-Id: Ia094aa9aae1da1ba11dbaef827e305cbcf08f9b4
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index eafd735..ec2760c 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -53,13 +53,12 @@
 
conf = mw.config.get( 'wgVisualEditorConfig' );
uri = new mw.Uri();
-   // For non-article pages, no information about page existence is 
exposed to
+   // For special pages, no information about page existence is exposed to
// mw.config, so we assume it exists TODO: fix this in core.
-   pageExists = !!mw.config.get( 'wgArticleId' ) || !mw.config.get( 
'wgIsArticle' );
+   pageExists = !!mw.config.get( 'wgArticleId' ) || mw.config.get( 
'wgNamespaceNumber' ) < 0;
viewUri = new mw.Uri( mw.util.wikiGetlink( mw.config.get( 
'wgRelevantPageName' ) ) );
veEditUri = viewUri.clone().extend( { 'veaction': 'edit' } );
isViewPage = (
-   mw.config.get( 'wgAction' ) === 'view' &&
mw.config.get( 'wgIsArticle' ) &&
!( 'diff' in uri.query )
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia094aa9aae1da1ba11dbaef827e305cbcf08f9b4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
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] More accurate function descriptions - change (mediawiki/core)

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

Change subject: More accurate function descriptions
..


More accurate function descriptions

Change-Id: I633a7740996b8933778aa32036cb429026f75ebe
---
M includes/User.php
1 file changed, 11 insertions(+), 4 deletions(-)

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



diff --git a/includes/User.php b/includes/User.php
index 685bce7..973e7cc 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1828,8 +1828,14 @@
}
 
/**
-* Return the revision and link for the oldest new talk page message for
-* this user.
+* Return the data needed to construct links for new talk page message
+* alerts. If there are new messages, this will return an associative 
array
+* with the following data:
+* wiki: The database name of the wiki
+* link: Root-relative link to the user's talk page
+* rev: The last talk page revision that the user has seen or null. 
This
+* is useful for building diff links.
+* If there are no new messages, it returns an empty array.
 * @note This function was designed to accomodate multiple talk pages, 
but
 * currently only returns a single link and revision.
 * @return Array
@@ -1853,8 +1859,9 @@
}
 
/**
-* Get the revision ID for the oldest new talk page message for this 
user
-* @return int|null Revision id or null if there are no new messages
+* Get the revision ID for the last talk page revision viewed by the 
talk
+* page owner.
+* @return int|null Revision ID or null
 */
public function getNewMessageRevisionId() {
$newMessageRevisionId = null;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I633a7740996b8933778aa32036cb429026f75ebe
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Bsitu 
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] Fix broken 'unless' condition for Exec['set mysql password'] - change (mediawiki/vagrant)

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

Change subject: Fix broken 'unless' condition for Exec['set mysql password']
..


Fix broken 'unless' condition for Exec['set mysql password']

mysqladmin's "ping" subcommand returns 0 for both success and failure, so it is
unsuitable as a predicate. "status" had the right behavior.

Change-Id: I0f69e59b92f86dd3579b603a550aa4f91e5643fd
---
M puppet/modules/mysql/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/mysql/manifests/init.pp 
b/puppet/modules/mysql/manifests/init.pp
index 8199163..75263d1 100644
--- a/puppet/modules/mysql/manifests/init.pp
+++ b/puppet/modules/mysql/manifests/init.pp
@@ -36,7 +36,7 @@
 
 exec { 'set mysql password':
 command => "mysqladmin -u root password \"${root_password}\"",
-unless  => "mysqladmin -u root -p\"${root_password}\" ping",
+unless  => "mysqladmin -u root -p\"${root_password}\" status",
 require => Service['mysql'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f69e59b92f86dd3579b603a550aa4f91e5643fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix broken 'unless' condition for Exec['set mysql password'] - change (mediawiki/vagrant)

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

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


Change subject: Fix broken 'unless' condition for Exec['set mysql password']
..

Fix broken 'unless' condition for Exec['set mysql password']

mysqladmin's "ping" subcommand returns 0 for both success and failure, so it is
unsuitable as a predicate. "status" had the right behavior.

Change-Id: I0f69e59b92f86dd3579b603a550aa4f91e5643fd
---
M puppet/modules/mysql/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/59/77259/1

diff --git a/puppet/modules/mysql/manifests/init.pp 
b/puppet/modules/mysql/manifests/init.pp
index 8199163..75263d1 100644
--- a/puppet/modules/mysql/manifests/init.pp
+++ b/puppet/modules/mysql/manifests/init.pp
@@ -36,7 +36,7 @@
 
 exec { 'set mysql password':
 command => "mysqladmin -u root password \"${root_password}\"",
-unless  => "mysqladmin -u root -p\"${root_password}\" ping",
+unless  => "mysqladmin -u root -p\"${root_password}\" status",
 require => Service['mysql'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f69e59b92f86dd3579b603a550aa4f91e5643fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Fix group-* and grouppage-* message - change (mediawiki...EducationProgram)

2013-08-01 Thread Shirayuki (Code Review)
Shirayuki has uploaded a new change for review.

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


Change subject: Fix group-* and grouppage-* message
..

Fix group-* and grouppage-* message

* group-* should be plural for consistency

Change-Id: I7af9caa3190c2c07cb0e6047b51498289a4e57af
---
M EducationProgram.i18n.php
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram 
refs/changes/58/77258/1

diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php
index 27d7ea1..361bb2f 100644
--- a/EducationProgram.i18n.php
+++ b/EducationProgram.i18n.php
@@ -173,19 +173,19 @@
// Groups
'group-epcoordinator' => 'Course coordinators',
'group-epcoordinator-member' => '{{GENDER:$1|course coordinator}}',
-   'grouppage-epcoordinator' => '{{ns:project}}:Course_coordinators',
+   'grouppage-epcoordinator' => '{{ns:project}}:Course coordinators',
 
'group-eponline' => 'Course online volunteers',
'group-eponline-member' => '{{GENDER:$1|course online volunteer}}',
-   'grouppage-eponline' => '{{ns:project}}:Course_online_volunteers',
+   'grouppage-eponline' => '{{ns:project}}:Course online volunteers',
 
'group-epcampus' => 'Course campus volunteers',
'group-epcampus-member' => '{{GENDER:$1|course campus volunteer}}',
-   'grouppage-epcampus' => '{{ns:project}}:Course_campus_volunteers',
+   'grouppage-epcampus' => '{{ns:project}}:Course campus volunteers',
 
-   'group-epinstructor' => 'Course instructor',
+   'group-epinstructor' => 'Course instructors',
'group-epinstructor-member' => '{{GENDER:$1|course instructor}}',
-   'grouppage-epinstructor' => '{{ns:project}}:Course_instructors',
+   'grouppage-epinstructor' => '{{ns:project}}:Course instructors',
 
// Special pages
'specialpages-group-education' => 'Education',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7af9caa3190c2c07cb0e6047b51498289a4e57af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
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] Update COPYING to match proposed new README - change (mediawiki/core)

2013-08-01 Thread SuchABot (Code Review)
SuchABot has uploaded a new change for review.

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


Change subject: Update COPYING to match proposed new README
..

Update COPYING to match proposed new README

This updates COPYING to contain more information about licensing, by including 
information removed from README in this patch: 
https://gerrit.wikimedia.org/r/#/c/76643/1

I'm afraid the line-wrapping was done by hand; please feel free to LART me if 
there are errors.

In general, I kept the text essentially the same, but there are a few somewhat 
substantive changes:
- changed URL from GPL (unspecified version, pointing currently to v3) to GPL 
v2, to match the text
- removed statement that the Foundation does not hold any rights in the 
codebase, as it may in some cases have rights through contractors
- added note about looking for information in individual components
- removed incorrect CC information about Sajax (which appears to be 
BSD-licensed, according to its file header in skins/common/ajax.js
- rephrased the CC license information to make more clear and precise

Change-Id: I726608391e58f9e62fdfd97b2b03a20dfef8f58d
GitHub: https://github.com/wikimedia/mediawiki-core/pull/4
---
M COPYING
1 file changed, 38 insertions(+), 0 deletions(-)


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

diff --git a/COPYING b/COPYING
index 019694a..001c80f 100644
--- a/COPYING
+++ b/COPYING
@@ -1,3 +1,41 @@
+== License and Copyright Information ==
+
+=== License ===
+
+Mediawiki is licensed under the terms of the GNU General Public License, 
+version 2 or later. Derivative works and later versions of the code must be 
+free software licensed under the same or a compatible license. This includes 
+"extensions" that use MediaWiki functions or variables; see 
+http://www.gnu.org/licenses/gpl-faq.html#GPLAndPlugins for details.
+
+For the full text of version 2 of the license, see 
+https://www.gnu.org/licenses/gpl-2.0.html or '''GNU General Public License''' 
+below.
+
+=== Copyright Owners ===
+
+Mediawiki contributors, including those listed in the CREDITS file, hold the 
+copyright to this work.
+
+=== Additional License Information ===
+
+Some components of Mediawiki imported from other projects may be under other
+Free and Open Source, or Free Culture, licenses. Specific details of their 
+licensing information can be found in those components.
+
+Sections of code written exclusively by Lee Crocker or Erik Moeller are also
+released into the public domain, which does not impair the obligations of users
+under the GPL for use of the whole code or other sections thereof.
+
+MediaWiki uses the following Creative Commons icons to illustrate links to the 
+CC licenses:
+
+* skins/common/images/cc-by-nc-sa.png
+* skins/common/images/cc-by-sa.png
+
+These icons are trademarked, and used subject to the CC trademark license, 
+available at http://creativecommons.org/policies#trademark
+
 == GNU GENERAL PUBLIC LICENSE ==
 
 Version 2, June 1991

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki.util: Fix addPortletLink to allow jQuery objects - change (mediawiki/core)

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

Change subject: mediawiki.util: Fix addPortletLink to allow jQuery objects
..


mediawiki.util: Fix addPortletLink to allow jQuery objects

The docs already say jQuery is a supported type for nextnode, it just
wasn't yet checking for it in the function.

Change-Id: I0bdc7dacd24aac720b70c6fc0ca3154ceccd0ebb
---
M RELEASE-NOTES-1.22
M resources/mediawiki/mediawiki.util.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
3 files changed, 16 insertions(+), 6 deletions(-)

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



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index a06ca64..2142522 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -172,6 +172,7 @@
   too. Can be used whenever several multicast group could be interested by a
   specific purge.
 * (bug 25931) Add Special:RandomInCategory.
+* mediawiki.util: addPortletLink now supports passing a jQuery object as 
nextnode.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
diff --git a/resources/mediawiki/mediawiki.util.js 
b/resources/mediawiki/mediawiki.util.js
index b482823..6f76839 100644
--- a/resources/mediawiki/mediawiki.util.js
+++ b/resources/mediawiki/mediawiki.util.js
@@ -432,10 +432,16 @@
$link.attr( 'accesskey', accesskey );
}
 
+   // nextnode is a DOM element (was the only option 
before MW 1.17, in wikibits.js)
+   // so we make it a jQuery object!
+   if ( nextnode && nextnode.nodeType ) {
+   nextnode = $( nextnode );
+   }
+
// Where to put our node ?
-   // - nextnode is a DOM element (was the only option 
before MW 1.17, in wikibits.js)
-   if ( nextnode && nextnode.parentNode === $ul[0] ) {
-   $( nextnode ).before( $item );
+   // - nextnode is a jQuery object that represents 
exactly one element
+   if ( nextnode && nextnode.jquery && nextnode.length === 
1 && nextnode[0].parentNode === $ul[0] ) {
+   nextnode.before( $item );
 
// - nextnode is a CSS selector for jQuery
} else if ( typeof nextnode === 'string' && $ul.find( 
nextnode ).length !== 0 ) {
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
index 674f56a..e867369 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
@@ -137,8 +137,8 @@
 * Previously, test elements where invisible to the selector since only
 * one element can have a given id.
 */
-   QUnit.test( 'addPortletLink', 10, function ( assert ) {
-   var pTestTb, pCustom, vectorTabs, tbRL, cuQuux, $cuQuux, tbMW, 
$tbMW, tbRLDM, caFoo;
+   QUnit.test( 'addPortletLink', 11, function ( assert ) {
+   var pTestTb, pCustom, vectorTabs, tbRL, cuQuux, $cuQuux, tbMW, 
$tbMW, tbRLDM, caFoo, addedAfter;
 
pTestTb = '\
\
@@ -194,7 +194,7 @@
);
 
assert.equal( $tbMW.closest( '.portlet' ).attr( 'id' ), 
'p-test-tb', 'Link was inserted within correct portlet' );
-   assert.equal( $tbMW.next().attr( 'id' ), 't-rl', 'Link is in 
the correct position (by passing nextnode)' );
+   assert.strictEqual( $tbMW.next()[0], tbRL, 'Link is in the 
correct position (by passing nextnode)' );
 
cuQuux = mw.util.addPortletLink( 'p-test-custom', '#', 'Quux', 
null, 'Example [shift-x]', 'q' );
$cuQuux = $( cuQuux );
@@ -216,6 +216,9 @@
 
assert.strictEqual( $tbMW.find( 'span' ).length, 0, 'No  
element should be added for porlets without vectorTabs class.' );
assert.strictEqual( $( caFoo ).find( 'span' ).length, 1, 'A 
 element should be added for porlets with vectorTabs class.' );
+
+   addedAfter = mw.util.addPortletLink( 'p-test-tb', '#', 'After 
foo', 'post-foo', 'After foo', null, $( tbRL ) );
+   assert.strictEqual( $( addedAfter ).next()[0], tbRL, 'Link is 
in the correct position (by passing a jQuery object as nextnode)' );
} );
 
QUnit.test( 'jsMessage', 1, function ( assert ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bdc7dacd24aac720b70c6fc0ca3154ceccd0ebb
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Ge

[MediaWiki-commits] [Gerrit] mediawiki.util: Optimise logic in addPortletLink - change (mediawiki/core)

2013-08-01 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: mediawiki.util: Optimise logic in addPortletLink
..

mediawiki.util: Optimise logic in addPortletLink

Optimised to no longer:
* boolean cast "nextnode" twice.
* assert nextnode.jquery when we know it is a jQuery object.
  > !!$( Node ).jquery
* assert nextnode.length when we know it has only 1 element.
  > $( Node ).length === 1
* excute $ul.find( selector ) twice for the CSS selector case.
* check for .length in some places and do an ignorant eq(0) in
  other cases (thus ignoring the case if there are multipe
  elements).

Tests still pass :-)

Change-Id: Ibc86c2dc33a8a3ba378138525c2523ba69bca8f1
---
M resources/mediawiki/mediawiki.util.js
1 file changed, 20 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/77256/1

diff --git a/resources/mediawiki/mediawiki.util.js 
b/resources/mediawiki/mediawiki.util.js
index 6f76839..5c0dd46 100644
--- a/resources/mediawiki/mediawiki.util.js
+++ b/resources/mediawiki/mediawiki.util.js
@@ -432,29 +432,29 @@
$link.attr( 'accesskey', accesskey );
}
 
-   // nextnode is a DOM element (was the only option 
before MW 1.17, in wikibits.js)
-   // so we make it a jQuery object!
-   if ( nextnode && nextnode.nodeType ) {
-   nextnode = $( nextnode );
+   if ( nextnode ) {
+   if ( nextnode.nodeType ) {
+   // nextnode is a DOM element (was the 
only option before MW 1.17, in wikibits.js)
+   nextnode = $ul.find( nextnode );
+   } else if ( typeof nextnode === 'string' ) {
+   // nextnode is a CSS selector for jQuery
+   nextnode = $ul.find( nextnode );
+   } else if ( !nextnode.jquery || 
nextnode[0].parentNode === $ul[0] ) {
+   // Fallback
+   $ul.append( $item );
+   return $item[0];
+   }
+   if ( nextnode.length === 1 ) {
+   // nextnode is a jQuery object that 
represents exactly one element
+   nextnode.before( $item );
+   return $item[0];
+   }
}
 
-   // Where to put our node ?
-   // - nextnode is a jQuery object that represents 
exactly one element
-   if ( nextnode && nextnode.jquery && nextnode.length === 
1 && nextnode[0].parentNode === $ul[0] ) {
-   nextnode.before( $item );
-
-   // - nextnode is a CSS selector for jQuery
-   } else if ( typeof nextnode === 'string' && $ul.find( 
nextnode ).length !== 0 ) {
-   $ul.find( nextnode ).eq( 0 ).before( $item );
-
-   // If the jQuery selector isn't found within the ,
-   // or if nextnode was invalid or not passed at all,
-   // then just append it at the end of the  (this is 
the default behavior)
-   } else {
-   $ul.append( $item );
-   }
-
+   // Fallback (this is the default behavior)
+   $ul.append( $item );
return $item[0];
+
},
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc86c2dc33a8a3ba378138525c2523ba69bca8f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Add a family parameter to DataPage.interwiki so users can ch... - change (pywikibot/compat)

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

Change subject: Add a family parameter to DataPage.interwiki so users can 
choose which links they want
..


Add a family parameter to DataPage.interwiki so users can choose which links 
they want

Change-Id: If1d0fb8fc902a1509fb964540c518b3d2d765376
---
M wikipedia.py
1 file changed, 10 insertions(+), 4 deletions(-)

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



diff --git a/wikipedia.py b/wikipedia.py
index 3d4e924..ccdc5d7 100644
--- a/wikipedia.py
+++ b/wikipedia.py
@@ -4696,19 +4696,25 @@
 def isEmpty(self):
 return not self.exists()
 
-def interwiki(self):
+def interwiki(self, family='wikipedia'):
 """Return a list of interwiki links from data repository.
 
 The return value is a list of Page objects for each of the
 interwiki links.
 
+@param family: Which family of links to get
+@type family: str
 """
+if family == 'wikipedia':
+suffix = 'wiki'
+else:
+suffix = family
 links = self.get()['links']
-self._interwiki = [Page(getSite(code.replace('wiki',
+self._interwiki = [Page(getSite(code.replace(suffix,
  '').replace('_', '-'),
-fam='wikipedia'),
+fam=family),
 links[code]) for code in links
-if code.endswith('wiki')]
+if code.endswith(suffix)]
 return self._interwiki
 
 def linktitles(self):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1d0fb8fc902a1509fb964540c518b3d2d765376
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update ListDiffer and CallbackListDiffer to make use of new ... - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Update ListDiffer and CallbackListDiffer to make use of new 
ArrayComparer classes
..

Update ListDiffer and CallbackListDiffer to make use of new ArrayComparer 
classes

Change-Id: I4437d21a5557d30a1031332f2653d3659c91b8ba
---
M src/ArrayComparer/StrategicArrayComparer.php
M src/differ/CallbackListDiffer.php
M src/differ/ListDiffer.php
M tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
M tests/phpunit/differ/CallbackListDifferTest.php
5 files changed, 67 insertions(+), 107 deletions(-)


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

diff --git a/src/ArrayComparer/StrategicArrayComparer.php 
b/src/ArrayComparer/StrategicArrayComparer.php
index fbf0977..555925a 100644
--- a/src/ArrayComparer/StrategicArrayComparer.php
+++ b/src/ArrayComparer/StrategicArrayComparer.php
@@ -3,6 +3,7 @@
 namespace Diff\ArrayComparer;
 
 use Diff\Comparer\ValueComparer;
+use RuntimeException;
 
 /**
  * Computes the difference between two arrays by comparing elements with
@@ -60,11 +61,16 @@
 * @param array $haystack
 *
 * @return bool|int|string
+* @throws RuntimeException
 */
protected function arraySearch( $needle, array $haystack ) {
foreach ( $haystack as $valueOffset => $thing ) {
$areEqual = $this->valueComparer->valuesAreEqual( 
$needle, $thing );
 
+   if ( !is_bool( $areEqual ) ) {
+   throw new RuntimeException( 'ValueComparer 
returned a non-boolean value' );
+   }
+
if ( $areEqual ) {
return $valueOffset;
}
diff --git a/src/differ/CallbackListDiffer.php 
b/src/differ/CallbackListDiffer.php
index e8f9e11..ce8c21f 100644
--- a/src/differ/CallbackListDiffer.php
+++ b/src/differ/CallbackListDiffer.php
@@ -2,7 +2,8 @@
 
 namespace Diff;
 
-use Exception;
+use Diff\ArrayComparer\StrategicArrayComparer;
+use Diff\Comparer\CallbackComparer;
 
 /**
  * Differ that only looks at the values of the arrays (and thus ignores key 
differences).
@@ -21,11 +22,11 @@
 class CallbackListDiffer implements Differ {
 
/**
-* @since 0.5
+* @since 0.8
 *
-* @var callable|null
+* @var ListDiffer
 */
-   protected $comparisonCallback = null;
+   protected $differ = null;
 
/**
 * Constructor.
@@ -35,7 +36,7 @@
 * @param callable $comparisonCallback
 */
public function __construct( $comparisonCallback ) {
-   $this->comparisonCallback = $comparisonCallback;
+   $this->differ = new ListDiffer( new StrategicArrayComparer( new 
CallbackComparer( $comparisonCallback ) ) );
}
 
/**
@@ -49,68 +50,7 @@
 * @return DiffOp[]
 */
public function doDiff( array $oldValues, array $newValues ) {
-   $operations = array();
-
-   foreach ( $this->diffArrays( $newValues, $oldValues ) as 
$addition ) {
-   $operations[] = new DiffOpAdd( $addition );
-   }
-
-   foreach ( $this->diffArrays( $oldValues, $newValues ) as 
$removal ) {
-   $operations[] = new DiffOpRemove( $removal );
-   }
-
-   return $operations;
-   }
-
-   /**
-* @since 0.5
-*
-* @param array $arrayOne
-* @param array $arrayTwo
-*
-* @return array
-*/
-   protected function diffArrays( array $arrayOne, array $arrayTwo ) {
-   $notInTwo = array();
-
-   foreach ( $arrayOne as $element ) {
-   $valueOffset = $this->arraySearch( $element, $arrayTwo 
);
-
-   if ( $valueOffset === false ) {
-   $notInTwo[] = $element;
-   continue;
-   }
-
-   unset( $arrayTwo[$valueOffset] );
-   }
-
-   return $notInTwo;
-   }
-
-   /**
-* @since 0.5
-*
-* @param string|int $needle
-* @param array $haystack
-*
-* @return bool|int|string
-* @throws Exception
-*/
-   protected function arraySearch( $needle, array $haystack ) {
-   foreach ( $haystack as $valueOffset => $thing ) {
-   $areEqual = call_user_func_array( 
$this->comparisonCallback, array( $needle, $thing ) );
-
-   if ( !is_bool( $areEqual ) ) {
-   // TODO: throw a more specific exception type
-   throw new Exception( 'Comparison callback 
returned a non-boolean value' );
- 

[MediaWiki-commits] [Gerrit] Kill use of MobileFormatter on special pages - change (mediawiki...MobileFrontend)

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

Change subject: Kill use of MobileFormatter on special pages
..


Kill use of MobileFormatter on special pages

* Stop adding #section_0 to special pages
* Re-instore search special page styling
* Stop scrubbing search elements - instead hide in css

Change-Id: I78881cd2b264ea1b3c6475238f3a3c25bce8b93f
---
M includes/MobileFrontend.body.php
M includes/MobileFrontend.hooks.php
M includes/formatters/MobileFormatter.php
M less/specials/search.less
M stylesheets/specials/search.css
5 files changed, 26 insertions(+), 5 deletions(-)

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



diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 38e50c3..1c07bf8 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -25,8 +25,10 @@
wfRunHooks( 'MobileFrontendBeforeDOM', array( $context, 
$formatter ) );
 
wfProfileIn( __METHOD__ . '-filter' );
+   $specialPage = $out->getTitle()->isSpecialPage();
if ( $context->getContentTransformations() ) {
-   $formatter->filterContent();
+   // Remove images if they're disabled from special 
pages, but don't transform otherwise
+   $formatter->filterContent( /* remove defaults */ 
!$specialPage );
}
wfProfileOut( __METHOD__ . '-filter' );
 
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 2be5bbc..0794455 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -313,12 +313,22 @@
public static function onSpecialPageBeforeExecute( SpecialPage 
$special, $subpage ) {
global $wgMFForceSecureLogin;
$mobileContext = MobileContext::singleton();
-   if ( $special->getName() != 'Userlogin' || 
!$mobileContext->shouldDisplayMobileView() ) {
+   $isMobileView = $mobileContext->shouldDisplayMobileView();
+   if ( $special->getName() != 'Userlogin' || !$isMobileView ) {
// no further processing necessary
return true;
}
 
$out = $special->getContext()->getOutput();
+   if ( $special->getName() === 'Search' ) {
+   $out->addModuleStyles( 'mobile.search.styles' );
+   }
+
+   // go no further if we're not dealing with the login page
+   if ( $special->getName() != 'Userlogin' ) {
+   return true;
+   }
+
$out->addModuleStyles( 'mobile.userlogin.styles' );
 
// make sure we're on https if we're supposed to be and 
currently aren't.
diff --git a/includes/formatters/MobileFormatter.php 
b/includes/formatters/MobileFormatter.php
index d44b17d..e6e77db 100644
--- a/includes/formatters/MobileFormatter.php
+++ b/includes/formatters/MobileFormatter.php
@@ -17,9 +17,7 @@
 
private $defaultItemsToRemove = array(
'.toc',
-   '#search', // remove search form element from Special:Search
'div.magnify',
-   '.mw-search-createlink',
'.nomobile',
);
 
@@ -50,6 +48,7 @@
$title = $context->getTitle();
$isMainPage = $title->isMainPage();
$isFilePage = $title->inNamespace( NS_FILE );
+   $isSpecialPage = $title->isSpecialPage();
 
$html = self::wrapHTML( $html );
if ( $context->getContentFormat() === 'WML' ) {
@@ -57,7 +56,7 @@
$formatter = new MobileFormatterWML( $html, $title, 
$wmlContext );
} else {
$formatter = new MobileFormatterHTML( $html, $title );
-   $formatter->enableExpandableSections( !$isMainPage );
+   $formatter->enableExpandableSections( !$isMainPage && 
!$isSpecialPage );
}
 
if ( $context->isBetaGroupMember() ) {
diff --git a/less/specials/search.less b/less/specials/search.less
index 13fdffc..b9f4ef9 100644
--- a/less/specials/search.less
+++ b/less/specials/search.less
@@ -19,3 +19,9 @@
}
}
 }
+
+.mw-search-createlink,
+// FIXME: Revisit when search input is not in a table
+#search {
+   display: none;
+}
diff --git a/stylesheets/specials/search.css b/stylesheets/specials/search.css
index e0b3048..46f5a88 100644
--- a/stylesheets/specials/search.css
+++ b/stylesheets/specials/search.css
@@ -19,3 +19,7 @@
   width: 100%;
   margin-left: 12px;
 }
+.mw-search-createlink,
+#search {
+  display: none;
+}

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

Gerrit-MessageType: merged

[MediaWiki-commits] [Gerrit] Simplify handling of API POST requests - change (mediawiki...OAuth)

2013-08-01 Thread CSteipp (Code Review)
CSteipp has uploaded a new change for review.

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


Change subject: Simplify handling of API POST requests
..

Simplify handling of API POST requests

Instead of restricting the content type, and trying to parse the params
in the OAuth code, just rely on MediaWiki's parameter handling. This
seems to work better with php/curl clients, that multi-part encode
everything.

The risk is that an attacker could MITM the post call, and modify the
request in a way that the user didn't intend, but when we decode it and
use the param, we don't detect the change in the signature. However,
handling should give a more accurate representation of how MediaWiki
interprets the parameters, so is likely more safe than doing the decode
ourselves.

Change-Id: Ia8bafe5defd442c76143e71f0139e28ed87c289b
---
M backend/MWOAuthRequest.php
1 file changed, 4 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/54/77254/1

diff --git a/backend/MWOAuthRequest.php b/backend/MWOAuthRequest.php
index f5fa6be..4bb547b 100644
--- a/backend/MWOAuthRequest.php
+++ b/backend/MWOAuthRequest.php
@@ -41,16 +41,10 @@
// Parse the query-string to find GET parameters
$parameters = $request->getQueryValues();
 
-   // It's a POST request of the proper content-type, so parse POST
-   // parameters and add those overriding any duplicates from GET
-   if ( $request->wasPosted()
-   && isset( $requestHeaders['Content-Type'] )
-   && strpos(
-   $requestHeaders['Content-Type'],
-   'application/x-www-form-urlencoded'
-   ) === 0
-   ) {
-   $postData = $request->getPostValues();
+   // Keep things simple and let MediaWiki handle param decoding, 
instead of
+   // restricting to specific content-type and parsing the 
parameters ourselves
+   if ( $request->wasPosted() ) {
+   $postData = $request->getValues();
$parameters = array_merge( $parameters, $postData );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8bafe5defd442c76143e71f0139e28ed87c289b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: CSteipp 

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


[MediaWiki-commits] [Gerrit] Make Nearby listed on Special:SpecialPages - change (mediawiki...MobileFrontend)

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

Change subject: Make Nearby listed on Special:SpecialPages
..


Make Nearby listed on Special:SpecialPages

Bug: 49948
Change-Id: Ie1502aeb210d6483f661db33a025a768be0a3dd7
---
M MobileFrontend.i18n.php
M MobileFrontend.php
R includes/specials/MobileSpecialPage.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileMenu.php
M includes/specials/SpecialMobileOptions.php
M includes/specials/SpecialNearby.php
M includes/specials/SpecialUploads.php
8 files changed, 24 insertions(+), 8 deletions(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 8b4c5b8..15df54e 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -12,6 +12,9 @@
 $messages = array();
 
 $messages['en'] = array (
+   /** special pages */
+   'nearby' => 'Pages near you',
+
'mobile-frontend-desc' => 'Mobile Frontend',
'mobile.css' => '/* CSS placed here will affect users of the mobile 
site */', # only translate this message to other languages if you have to 
change it
'mobile.js' => '/* Any JavaScript here will be loaded for users using 
the mobile site */', # only translate this message to other languages if you 
have to change it
@@ -309,6 +312,8 @@
  * @author Yekrats
  */
 $messages['qqq'] = array(
+   'nearby' => 'Description of Special:Nearby on Special:SpecialPages',
+
'mobile-frontend-desc' => '{{desc|name=Mobile 
Frontend|url=http://www.mediawiki.org/wiki/Extension:MobileFrontend}}',
'mobile.css' => '{{optional}}
 *{{msg-mw|Mobile.js}} (optional)
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 177902f..06d70e6 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -62,7 +62,7 @@
'SpecialMobileMenu' => 'specials/SpecialMobileMenu',
'SpecialMobileWatchlist' => 'specials/SpecialMobileWatchlist',
'SpecialNearby' => 'specials/SpecialNearby',
-   'UnlistedSpecialMobilePage' => 'specials/UnlistedSpecialMobilePage',
+   'MobileSpecialPage' => 'specials/MobileSpecialPage',
 
'MinervaTemplate' => 'skins/MinervaTemplate',
'MobileTemplate' => 'skins/MobileTemplate',
@@ -121,10 +121,11 @@
 $wgSpecialPages['MobileMenu'] = 'SpecialMobileMenu';
 
 function efMobileFrontend_Setup() {
-   global $wgMFNearby, $wgSpecialPages;
+   global $wgMFNearby, $wgSpecialPages, $wgSpecialPageGroups;
 
if ( $wgMFNearby ) {
$wgSpecialPages['Nearby'] = 'SpecialNearby';
+   $wgSpecialPageGroups['Nearby'] = 'pages';
}
 }
 
diff --git a/includes/specials/UnlistedSpecialMobilePage.php 
b/includes/specials/MobileSpecialPage.php
similarity index 79%
rename from includes/specials/UnlistedSpecialMobilePage.php
rename to includes/specials/MobileSpecialPage.php
index 82ba874..409c35b 100644
--- a/includes/specials/UnlistedSpecialMobilePage.php
+++ b/includes/specials/MobileSpecialPage.php
@@ -1,5 +1,10 @@
 getOutput()->setProperty( 'bodyClassName', 'no-margins' 
);
}
+
+   public function isListed() {
+   return $this->listed;
+   }
 }
diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 1ef8597..fa4709c 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -1,6 +1,6 @@
 listed = true;
}
 
public function execute( $par = '' ) {
diff --git a/includes/specials/SpecialUploads.php 
b/includes/specials/SpecialUploads.php
index f5ba4bc..266f62c 100644
--- a/includes/specials/SpecialUploads.php
+++ b/includes/specials/SpecialUploads.php
@@ -1,6 +1,6 @@
 https://gerrit.wikimedia.org/r/77171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1502aeb210d6483f661db33a025a768be0a3dd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: awjrichards 
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 some phpdocs - change (mediawiki...WikibaseQueryEngine)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Fix some phpdocs
..

Fix some phpdocs

Change-Id: I5e624d0f78d45b189f91e622dfe9723a63e2ec12
---
M src/SQLStore/SnakStore/SnakInserter.php
M src/SQLStore/StoreConfig.php
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/src/SQLStore/SnakStore/SnakInserter.php 
b/src/SQLStore/SnakStore/SnakInserter.php
index 853c9cd..79409c8 100644
--- a/src/SQLStore/SnakStore/SnakInserter.php
+++ b/src/SQLStore/SnakStore/SnakInserter.php
@@ -27,6 +27,7 @@
 
/**
 * @param SnakStore[] $snakStores
+* @param SnakRowBuilder $snakRowBuilder
 */
public function __construct( array $snakStores, SnakRowBuilder 
$snakRowBuilder ) {
$this->snakStores = $snakStores;
diff --git a/src/SQLStore/StoreConfig.php b/src/SQLStore/StoreConfig.php
index 99f924f..b51a65b 100644
--- a/src/SQLStore/StoreConfig.php
+++ b/src/SQLStore/StoreConfig.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\QueryEngine\SQLStore;
 
+use Exception;
 use Wikibase\Database\TableDefinition;
 use Wikibase\QueryEngine\PropertyDataValueTypeLookup;
 
@@ -71,10 +72,12 @@
 
/**
 * @return PropertyDataValueTypeLookup
+*
+* @throws Exception
 */
public function getPropertyDataValueTypeLookup() {
if ( $this->propertyDataValueTypeLookup === null ) {
-   throw new \Exception( 'setPropertyDataValueTypeLookup 
has not been called yet' );
+   throw new Exception( 'setPropertyDataValueTypeLookup 
has not been called yet' );
}
 
return $this->propertyDataValueTypeLookup;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e624d0f78d45b189f91e622dfe9723a63e2ec12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQueryEngine
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Fix pageExists/isViewPage behaviour - change (mediawiki...VisualEditor)

2013-08-01 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Fix pageExists/isViewPage behaviour
..

Fix pageExists/isViewPage behaviour

"Let me clarify this for you" - Timo

Bug: 49000
Change-Id: Ia094aa9aae1da1ba11dbaef827e305cbcf08f9b4
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index eafd735..ec2760c 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -53,13 +53,12 @@
 
conf = mw.config.get( 'wgVisualEditorConfig' );
uri = new mw.Uri();
-   // For non-article pages, no information about page existence is 
exposed to
+   // For special pages, no information about page existence is exposed to
// mw.config, so we assume it exists TODO: fix this in core.
-   pageExists = !!mw.config.get( 'wgArticleId' ) || !mw.config.get( 
'wgIsArticle' );
+   pageExists = !!mw.config.get( 'wgArticleId' ) || mw.config.get( 
'wgNamespaceNumber' ) < 0;
viewUri = new mw.Uri( mw.util.wikiGetlink( mw.config.get( 
'wgRelevantPageName' ) ) );
veEditUri = viewUri.clone().extend( { 'veaction': 'edit' } );
isViewPage = (
-   mw.config.get( 'wgAction' ) === 'view' &&
mw.config.get( 'wgIsArticle' ) &&
!( 'diff' in uri.query )
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia094aa9aae1da1ba11dbaef827e305cbcf08f9b4
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] fixing iodine entry adding ssl1007-9 - change (operations/puppet)

2013-08-01 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

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


Change subject: fixing iodine entry adding ssl1007-9
..

fixing iodine entry adding ssl1007-9

Change-Id: I66b2bb8e661edf2b5aeec57145690bff625acc11
---
M files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 16 insertions(+), 1 deletion(-)


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

diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 72877f7..924d9bb 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1421,7 +1421,7 @@
 }
 
 host iodine {
-   hardware ethernet 90:B1:1C:00:B1:93;
+   hardware ethernet 90:B1:1C:00:A9:D5;
fixed-address iodine.wikimedia.org;
 }
 
@@ -4729,6 +4729,21 @@
fixed-address ssl1006.wikimedia.org;
 }
 
+host ssl1007 {
+   hardware ethernet 90:B1:1C:2D:7F:6B;
+   fixed-address ssl1007.wikimedia.org;
+}
+
+host ssl1008 {
+   hardware ethernet 90:B1:1C:2D:87:0C;
+   fixed-address ssl1008.wikimedia.org;
+}
+
+host ssl1009 {
+   hardware ethernet 90:B1:1C:2D:80:E4;
+   fixed-address ssl1009.wikimedia.org;
+}
+
 host ssl3001 {
hardware ethernet 78:2b:cb:45:1d:e0;
fixed-address ssl3001.esams.wikimedia.org;

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

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

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


[MediaWiki-commits] [Gerrit] fixing iodine entry adding ssl1007-9 - change (operations/puppet)

2013-08-01 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: fixing iodine entry adding ssl1007-9
..


fixing iodine entry adding ssl1007-9

Change-Id: I66b2bb8e661edf2b5aeec57145690bff625acc11
---
M files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 16 insertions(+), 1 deletion(-)

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



diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 72877f7..924d9bb 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1421,7 +1421,7 @@
 }
 
 host iodine {
-   hardware ethernet 90:B1:1C:00:B1:93;
+   hardware ethernet 90:B1:1C:00:A9:D5;
fixed-address iodine.wikimedia.org;
 }
 
@@ -4729,6 +4729,21 @@
fixed-address ssl1006.wikimedia.org;
 }
 
+host ssl1007 {
+   hardware ethernet 90:B1:1C:2D:7F:6B;
+   fixed-address ssl1007.wikimedia.org;
+}
+
+host ssl1008 {
+   hardware ethernet 90:B1:1C:2D:87:0C;
+   fixed-address ssl1008.wikimedia.org;
+}
+
+host ssl1009 {
+   hardware ethernet 90:B1:1C:2D:80:E4;
+   fixed-address ssl1009.wikimedia.org;
+}
+
 host ssl3001 {
hardware ethernet 78:2b:cb:45:1d:e0;
fixed-address ssl3001.esams.wikimedia.org;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66b2bb8e661edf2b5aeec57145690bff625acc11
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson 
Gerrit-Reviewer: Cmjohnson 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] fix typo in README - change (mediawiki...Ask)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: fix typo in README
..

fix typo in README

Change-Id: Icbfbcb3accc92f78770eb98d230be033ad453e1c
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/README.md b/README.md
index cde834b..d8b8780 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Ask
 
 [![Latest Stable 
Version](https://poser.pugx.org/ask/ask/version.png)](https://packagist.org/packages/ask/ask)
-[![Latest Stable 
Version](https://poser.pugx.org/ask/ask/d/total.png)](https://packagist.org/packages/ask/ask)
+[![Download 
count](https://poser.pugx.org/ask/ask/d/total.png)](https://packagist.org/packages/ask/ask)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Ask.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
 [![Coverage 
Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-Ask/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-Ask?branch=master)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbfbcb3accc92f78770eb98d230be033ad453e1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Remove pointless standalone test runner - change (mediawiki...Ask)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Remove pointless standalone test runner
..

Remove pointless standalone test runner

We now have a phpunit.xml.dist file with bootstrap,
which is the more standard approach

Change-Id: I0c605dd4769a3e49084017faa3d42269279e6dc1
---
D Tests/phpunit.php
1 file changed, 0 insertions(+), 28 deletions(-)


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

diff --git a/Tests/phpunit.php b/Tests/phpunit.php
deleted file mode 100755
index 6e5783c..000
--- a/Tests/phpunit.php
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env php
-run( $arguments );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c605dd4769a3e49084017faa3d42269279e6dc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Match changes in WikibaseDatabase - change (mediawiki...WikibaseQueryEngine)

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

Change subject: Match changes in WikibaseDatabase
..


Match changes in WikibaseDatabase

This matches https://gerrit.wikimedia.org/r/#/c/76718/

Change-Id: I0c41f3f1fbd63ba0792a49254665990126652bc6
---
M src/SQLStore/Schema.php
1 file changed, 11 insertions(+), 18 deletions(-)

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



diff --git a/src/SQLStore/Schema.php b/src/SQLStore/Schema.php
index 06b8c59..c0127a0 100644
--- a/src/SQLStore/Schema.php
+++ b/src/SQLStore/Schema.php
@@ -174,13 +174,13 @@
}
 
/**
-* TODO
-*
 * @since 0.1
 *
 * @return FieldDefinition[]
 */
private function getPropertySnakFields() {
+   // TODO: indexes
+
return array(
// Internal subject id
new FieldDefinition(
@@ -188,8 +188,7 @@
FieldDefinition::TYPE_INTEGER,
FieldDefinition::NOT_NULL,
FieldDefinition::NO_DEFAULT,
-   FieldDefinition::ATTRIB_UNSIGNED,
-   FieldDefinition::NO_INDEX
+   FieldDefinition::ATTRIB_UNSIGNED
),
 
// Internal property id
@@ -198,15 +197,12 @@
FieldDefinition::TYPE_INTEGER,
FieldDefinition::NOT_NULL,
FieldDefinition::NO_DEFAULT,
-   FieldDefinition::ATTRIB_UNSIGNED,
-   FieldDefinition::INDEX
+   FieldDefinition::ATTRIB_UNSIGNED
),
);
}
 
/**
-* TODO
-*
 * @since 0.1
 *
 * @return TableDefinition[]
@@ -232,6 +228,7 @@
 * @return TableDefinition
 */
public function getEntitiesTable() {
+   // TODO: indexes
return new TableDefinition(
$this->config->getTablePrefix() . 'entities',
array(
@@ -241,8 +238,7 @@
FieldDefinition::TYPE_INTEGER,
FieldDefinition::NOT_NULL,
FieldDefinition::NO_DEFAULT,
-   FieldDefinition::ATTRIB_UNSIGNED,
-   FieldDefinition::INDEX
+   FieldDefinition::ATTRIB_UNSIGNED
),
 
// EntityId type part
@@ -251,8 +247,7 @@
FieldDefinition::TYPE_TEXT,
FieldDefinition::NOT_NULL,
FieldDefinition::NO_DEFAULT,
-   FieldDefinition::NO_ATTRIB,
-   FieldDefinition::INDEX
+   FieldDefinition::NO_ATTRIB
),
 
// EntityId numerical part
@@ -261,8 +256,7 @@
FieldDefinition::TYPE_INTEGER,
FieldDefinition::NOT_NULL,
FieldDefinition::NO_DEFAULT,
-   FieldDefinition::ATTRIB_UNSIGNED,
-   FieldDefinition::INDEX
+   FieldDefinition::ATTRIB_UNSIGNED
),
)
);
@@ -274,6 +268,7 @@
 * @return TableDefinition
 */
public function getValuelessSnaksTable() {
+   // TODO: indexes
return new TableDefinition(
$this->config->getTablePrefix() . 'valueless_snaks',
array_merge(
@@ -285,8 +280,7 @@
 FieldDefinition::TYPE_INTEGER,
 FieldDefinition::NOT_NULL,
 FieldDefinition::NO_DEFAULT,
-
FieldDefinition::ATTRIB_UNSIGNED,
-FieldDefinition::INDEX
+
FieldDefinition::ATTRIB_UNSIGNED
 ),
 
 // Role of the snak (ie "main snak" or 
"qualifier")
@@ -295,8 +289,7 @@
 FieldDefinition::TYPE_INTEGER,
 FieldDefinition::NOT_N

[MediaWiki-commits] [Gerrit] Implemented StrategicArrayComparer - change (mediawiki...Diff)

2013-08-01 Thread Daniel Werner (Code Review)
Daniel Werner has submitted this change and it was merged.

Change subject: Implemented StrategicArrayComparer
..


Implemented StrategicArrayComparer

Change-Id: Ib1f3f4c2a1e3f28fa142429cb64d115c4706fabd
---
M RELEASE-NOTES.md
M src/ArrayComparer/ArrayComparer.php
M src/ArrayComparer/NativeArrayComparer.php
M src/ArrayComparer/StrategicArrayComparer.php
M src/ArrayComparer/StrictArrayComparer.php
M src/differ/CallbackListDiffer.php
M tests/phpunit/ArrayComparer/NativeArrayComparerTest.php
M tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
M tests/phpunit/ArrayComparer/StrictArrayComparerTest.php
9 files changed, 225 insertions(+), 26 deletions(-)

Approvals:
  Daniel Werner: Looks good to me, approved



diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index f1c82cc..01e3a08 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -4,6 +4,13 @@
 
 ## Version 0.8 (dev)
 
+ Additions
+
+* Added Diff\ArrayComparer\ArrayComparer interface
+* Added NativeArrayComparer, ArrayComparer adapter for array_diff
+* Added StrictArrayComparer, containing the "strict mode" logic from ListDiffer
+* Added StrategicArrayComparer, implementation of ArrayComparer that takes a 
ValueComparer as strategy
+
  Improvements
 
 * MapPatcher will now report conflicts for remove operations that specify a 
value to be removed
diff --git a/src/ArrayComparer/ArrayComparer.php 
b/src/ArrayComparer/ArrayComparer.php
index 8fbab4c..99c6ab9 100644
--- a/src/ArrayComparer/ArrayComparer.php
+++ b/src/ArrayComparer/ArrayComparer.php
@@ -6,7 +6,7 @@
  * Interface for objects that can compute the difference between two arrays
  * in similar fashion to PHPs native array_diff.
  *
- * @since 0.7
+ * @since 0.8
  *
  * @file
  * @ingroup Diff
@@ -19,7 +19,9 @@
/**
 * Returns an array containing all the entries from arrayOne that are 
not present in arrayTwo.
 *
-* @since 0.7
+* Implementations are allowed to hold quantity into account or to 
disregard it.
+*
+* @since 0.8
 *
 * @param array $firstArray
 * @param array $secondArray
diff --git a/src/ArrayComparer/NativeArrayComparer.php 
b/src/ArrayComparer/NativeArrayComparer.php
index 798e873..c5ef04f 100644
--- a/src/ArrayComparer/NativeArrayComparer.php
+++ b/src/ArrayComparer/NativeArrayComparer.php
@@ -5,7 +5,7 @@
 /**
  * Adapter for PHPs native array_diff method.
  *
- * @since 0.7
+ * @since 0.8
  *
  * @file
  * @ingroup Diff
@@ -20,7 +20,7 @@
 *
 * Uses @see array_diff.
 *
-* @since 0.7
+* @since 0.8
 *
 * @param array $arrayOne
 * @param array $arrayTwo
diff --git a/src/ArrayComparer/StrategicArrayComparer.php 
b/src/ArrayComparer/StrategicArrayComparer.php
index 39c6d32..fbf0977 100644
--- a/src/ArrayComparer/StrategicArrayComparer.php
+++ b/src/ArrayComparer/StrategicArrayComparer.php
@@ -8,7 +8,9 @@
  * Computes the difference between two arrays by comparing elements with
  * a ValueComparer.
  *
- * @since 0.7
+ * Quantity matters: [42, 42] and [42] are different
+ *
+ * @since 0.8
  *
  * @file
  * @ingroup Diff
@@ -27,7 +29,7 @@
/**
 * @see ArrayComparer::diffArrays
 *
-* @since 0.7
+* @since 0.8
 *
 * @param array $arrayOne
 * @param array $arrayTwo
@@ -35,7 +37,40 @@
 * @return array
 */
public function diffArrays( array $arrayOne, array $arrayTwo ) {
-   return array(); // TODO: implement
+   $notInTwo = array();
+
+   foreach ( $arrayOne as $element ) {
+   $valueOffset = $this->arraySearch( $element, $arrayTwo 
);
+
+   if ( $valueOffset === false ) {
+   $notInTwo[] = $element;
+   continue;
+   }
+
+   unset( $arrayTwo[$valueOffset] );
+   }
+
+   return $notInTwo;
+   }
+
+   /**
+* @since 0.8
+*
+* @param string|int $needle
+* @param array $haystack
+*
+* @return bool|int|string
+*/
+   protected function arraySearch( $needle, array $haystack ) {
+   foreach ( $haystack as $valueOffset => $thing ) {
+   $areEqual = $this->valueComparer->valuesAreEqual( 
$needle, $thing );
+
+   if ( $areEqual ) {
+   return $valueOffset;
+   }
+   }
+
+   return false;
}
 
 }
diff --git a/src/ArrayComparer/StrictArrayComparer.php 
b/src/ArrayComparer/StrictArrayComparer.php
index 785bce8..6d3e2c3 100644
--- a/src/ArrayComparer/StrictArrayComparer.php
+++ b/src/ArrayComparer/StrictArrayComparer.php
@@ -5,7 +5,15 @@
 /**
  * Strict variant of PHPs array_diff method.
  *
- * @since 0.7
+ * Sim

[MediaWiki-commits] [Gerrit] Remove obsolete INSTALL file - change (mediawiki...Diff)

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

Change subject: Remove obsolete INSTALL file
..


Remove obsolete INSTALL file

Change-Id: I04b0b974f7d361bba0a3091631e44e79fa226bbc
---
D INSTALL
1 file changed, 0 insertions(+), 31 deletions(-)

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



diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index fab068f..000
--- a/INSTALL
+++ /dev/null
@@ -1,31 +0,0 @@
-These is the install file for the Diff extension.
-
-Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Diff
-Latest version of the install file: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Diff.git;a=blob;f=INSTALL
-
-
-== Requirements ==
-
-Diff requires:
-
-* PHP 5.3 or above
-* (For running the PHPUnit tests: PHPUnit 3.7 or later)
-* (If used as MediaWiki extension: MediaWiki 1.16 or later)
-
-== Download ==
-
-git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git
-
-== Installation as MediaWiki extension ==
-
-Once you have downloaded the code, place the ''Diff'' directory within your 
MediaWiki
-'extensions' directory. Then add the following code to your 
[[Manual:LocalSettings.php|LocalSettings.php]] file:
-
-# Diff
-require_once( "$IP/extensions/Diff/Diff.php" );
-
-== Installation as standalone library ==
-
-Include Diff/Diff.standalone.php. This file includes an autoloader allowing 
you to directly
-reference the diff classes without first including their files. If you want to 
use your
-own autoloader, you can find the list of diff classes in Diff/Diff.classes.php.
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04b0b974f7d361bba0a3091631e44e79fa226bbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Create ve MWModal interstitial - change (mediawiki...VisualEditor)

2013-08-01 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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


Change subject: Create ve MWModal interstitial
..

Create ve MWModal interstitial

For configured wikis, show MWModal on the first load of VisualEditor.

Change-Id: I8e7c4dc2c63b36594378a543b9d66291395eebcf
---
M VisualEditor.hooks.php
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
A modules/ve-mw/ui/dialogs/ve.ui.MWModalDialog.js
M modules/ve-mw/ui/styles/ve.ui.MWDialog.css
M modules/ve/ui/styles/ve.ui.Dialog.css
M modules/ve/ui/ve.ui.Dialog.js
8 files changed, 108 insertions(+), 1 deletion(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 7b1153a..c1813fd 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -122,7 +122,7 @@
 * Adds extra variables to the page config.
 */
public static function onMakeGlobalVariablesScript( array &$vars, 
OutputPage $out ) {
-   global $wgStylePath, $wgContLang;
+   global $wgStylePath, $wgContLang, $wgVisualEditorShowBetaModal;
$vars['wgVisualEditor'] = array(
'isPageWatched' => $out->getUser()->isWatched( 
$out->getTitle() ),
// Same as in Linker.php
@@ -131,6 +131,7 @@
( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
'pageLanguageCode' => 
$out->getTitle()->getPageLanguage()->getHtmlCode(),
'pageLanguageDir' => 
$out->getTitle()->getPageLanguage()->getDir(),
+   'showBetaModal' => $wgVisualEditorShowBetaModal
);
 
return true;
diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index f4aacde..8d53369 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -86,6 +86,9 @@
'visualeditor-dialog-transclusion-remove-param' => 'Remove parameter',
'visualeditor-dialog-transclusion-remove-template' => 'Remove template',
'visualeditor-dialog-transclusion-title' => 'Transclusion',
+   'visualeditor-dialog-ve-modal-title' => 'VisualEditor is in beta',
+   'visualeditor-dialog-ve-modal-content' => 'This is our new editor to 
make editing easier, VisualEditor. It\'s still in "beta", which means you might 
be unable to edit some parts of the page, or encounter issues that need to be 
fixed. You can keep using our old editor by clicking the "$1" tab instead.',
+   'visualeditor-dialog-ve-modal-action-get-started' => 'Let\'s get 
started',
'visualeditor-dialogbutton-media-tooltip' => 'Media',
'visualeditor-dialogbutton-meta-tooltip' => 'Page settings',
'visualeditor-dialogbutton-reference-tooltip' => 'Reference',
@@ -341,6 +344,9 @@
'visualeditor-dialog-transclusion-remove-param' => 'Label for button 
that removes a parameter from a template',
'visualeditor-dialog-transclusion-remove-template' => 'Label for button 
that removes a template from a transclusion.
 {{Identical|Remove template}}',
+   'visualeditor-dialog-ve-modal-title' => 'Title of the ve warning modal',
+   'visualeditor-dialog-ve-modal-content' => 'Text explaining visual 
editor is in beta. Parameters: $1 is the text for #ca-edit',
+   'visualeditor-dialog-ve-modal-action-get-started' => 'Text to close the 
dialog and continue using visual editor',
'visualeditor-dialog-transclusion-title' => 
'{{Identical|Transclusion}}',
'visualeditor-dialogbutton-media-tooltip' => '{{Identical|Media}}',
'visualeditor-dialogbutton-meta-tooltip' => '{{Identical|Page 
Settings}}',
diff --git a/VisualEditor.php b/VisualEditor.php
index bc68d57..bfc332d 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -491,6 +491,7 @@
 
've/ui/dialogs/ve.ui.PagedDialog.js',
've-mw/ui/dialogs/ve.ui.MWMetaDialog.js',
+   've-mw/ui/dialogs/ve.ui.MWModalDialog.js',
've-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js',
've-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js',
've-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js',
@@ -622,6 +623,9 @@
'visualeditor-dialog-transclusion-remove-template',
'visualeditor-dialog-transclusion-title',
'visualeditor-dialog-transclusion-wikitext-label',
+   'visualeditor-dialog-ve-modal-title',
+   'visualeditor-dialog-ve-modal-content',
+   'visualeditor-dialog-ve-modal-action-get-started',
'visualeditor-dialogbutton-media-tooltip',
'visualeditor-dialogbutton-meta-tooltip',
'visualeditor-di

[MediaWiki-commits] [Gerrit] Throw Merger section out of readme and add TODO for ArrayCom... - change (mediawiki...Diff)

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

Change subject: Throw Merger section out of readme and add TODO for 
ArrayComparer
..


Throw Merger section out of readme and add TODO for ArrayComparer

Change-Id: I2be01f9e34375d750060042ae715ff57b2f0277c
---
M README.md
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/README.md b/README.md
index b39636c..d483a0f 100644
--- a/README.md
+++ b/README.md
@@ -119,15 +119,15 @@
 
 All classes part of the patcher component can be found in 
includes/patcher
 
-### Comparer
+### ValueComparer
 
 Added in 0.6
 
 TODO
 
-### Merger
+### ArrayComparer
 
-Added in 0.7
+Added in 0.8
 
 TODO
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2be01f9e34375d750060042ae715ff57b2f0277c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
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 error in readme file - change (mediawiki...Diff)

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

Change subject: Fix error in readme file
..


Fix error in readme file

Change-Id: I86e7dc9d0228c7cc12a4ee090a435333d12d1030
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/README.md b/README.md
index 84b951c..b39636c 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Diff
 
 [![Latest Stable 
Version](https://poser.pugx.org/diff/diff/version.png)](https://packagist.org/packages/diff/diff)
-[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/d/total.png)](https://packagist.org/packages/diff/diff)
+[![Download 
count](https://poser.pugx.org/diff/diff/d/total.png)](https://packagist.org/packages/diff/diff)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Diff.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Diff)
 [![Coverage 
Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-Diff/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-Diff?branch=master)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86e7dc9d0228c7cc12a4ee090a435333d12d1030
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Change release notes to markdown - change (mediawiki...Diff)

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

Change subject: Change release notes to markdown
..


Change release notes to markdown

Change-Id: Ic590e9bf11af7439b7bbd99352c5acbe573cf181
---
R RELEASE-NOTES.md
1 file changed, 27 insertions(+), 36 deletions(-)

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



diff --git a/RELEASE-NOTES b/RELEASE-NOTES.md
similarity index 81%
rename from RELEASE-NOTES
rename to RELEASE-NOTES.md
index 655aa51..f1c82cc 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES.md
@@ -1,57 +1,53 @@
-These are the release notes for the Diff extension.
+# Diff release notes
 
-Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Diff
+[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/version.png)](https://packagist.org/packages/diff/diff)
 
+## Version 0.8 (dev)
 
-=== Version 0.8 ===
-dev
-
-; Improvements
+ Improvements
 
 * MapPatcher will now report conflicts for remove operations that specify a 
value to be removed
 different from the value in the structure being patched.
 
-; Removals
+ Removals
 
 * Removed obsolete tests/phpunit.php test runner
 
-=== Version 0.7 ===
-2013-07-16
+## Version 0.7 (2013-07-16)
 
-; Improvements
+ Improvements
 
 * Added extra tests for MapPatcher and ListPatcher
 * Added extra tests for Diff
 * Added extra tests for MapDiffer
 * Added @covers tags to the unit tests to improve coverage report accuracy
 
-; Removals
+ Removals
 
 * Removed static methods from ListDiff and MapDiff (all deprecated since 0.4)
 * Removed DiffOpTestDummy
 
-; Bug fixes
+ Bug fixes
 
 * MapPatcher will now no longer stop patching after the first remove operation 
it encounters
 * MapPatcher now always treats its top level input diff as a map diff
 * Fixed several issues in ListPatcherTest
 
-=== Version 0.6 ===
-2013-05-08
+## Version 0.6 (2013-05-08)
 
-; Compatibility changes
+ Compatibility changes
 
 * The tests can now run independently of MediaWiki
 * The tests now require PHPUnit 3.7 or later
 
-; Additions
+ Additions
 
 * Added phpunit.php runner in the tests directory
 * Added Diff\Comparer\ValueComparer interface with CallbackComparer and 
StrictComparer implementations
 * Added MapPatcher::setValueComparer to facilitate patching maps containing 
objects
 * Added PHPUnit configuration file using the new tests/bootstrap.php
 
-; Removals
+ Removals
 
 * GenericArrayObject has been removed from this package.
   Diff derives from ArrayObject rather than GenericArrayObject.
@@ -62,33 +58,31 @@
   rather than a MWException.
 * Removed Diff\Exception
 
-=== Version 0.5 ===
-2013-02-26
+## Version 0.5 (2013-02-26)
 
-; Additions
+ Additions
 
 * Added DiffOpFactory
 * Added DiffOp::toArray
 * Added CallbackListDiffer
 * Added MapDiffer::setComparisonCallback
 
-; Deprecations
+ Deprecations
 
 * Hard deprecated ListDiff, MapDiff and IDiff
 
-; Removals
+ Removals
 
 * Removed Diff::getApplicableDiff
 
-=== Version 0.4 ===
-2013-01-08
+## Version 0.4 (2013-01-08)
 
-; Additions
+ Additions
 
 * Split off diffing code from MapDiff and ListDiff to dedicated Differ classes
 * Added dedicated Patcher classes, which are used for the getApplicableDiff 
functionality
 
-; Deprecations
+ Deprecations
 
 * Deprecated ListDiff:newFromArrays and MapDiff::newFromArrays
 * Deprecated ListDiff::newEmpty and MapDiff::newEmpty
@@ -97,34 +91,31 @@
 * Soft deprecated IDiff interface in favour of Diff
 * Soft deprecated MapDiff and ListDiff in favour of Diff
 
-; Removals
+ Removals
 
 * Removed parentKey functionality from Diff
 * Removed constructor from Diff interface
 * Removed Diff::newEmpty
 
-=== Version 0.3 ===
-2012-11-21
+## Version 0.3 (2012-11-21)
 
 * Improved entry point and setup code. Diff.php is now the main entry point 
for both MW extension and standalone library
 * ListDiffs with only add operations can now be applied on top of bases that 
do not have their key
 * Added Diff::removeEmptyOperations
 * Improved type hinting
 * Improved test coverage
-** Added constructor tests for MapDiff and ListDiff
-** Added extra tests for Diff and MapDiff
-** Test coverage is now 100%
+* Added constructor tests for MapDiff and ListDiff
+* Added extra tests for Diff and MapDiff
+* Test coverage is now 100%
 * Removed static method from Diff interface
 
-=== Version 0.2 ===
-2012-11-01
+## Version 0.2 (2012-11-01)
 
 * Fixed tests to work with PHP 5.4 and above
 * Added translations
 * Added some profiling calls
 
-=== Version 0.1 ===
-2012-9-25
+## Version 0.1 (2012-9-25)
 
 Initial release with these features:
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic590e9bf11af7439b7bbd99352c5acbe573cf181
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Ge

[MediaWiki-commits] [Gerrit] Removed unused imports - change (mediawiki...Diff)

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

Change subject: Removed unused imports
..


Removed unused imports

Change-Id: I30586881bad9337e2bc57e6af9e919cf69ec181e
---
M tests/phpunit/diffop/diff/DiffTest.php
M tests/phpunit/patcher/ListPatcherTest.php
M tests/phpunit/patcher/MapPatcherTest.php
3 files changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/tests/phpunit/diffop/diff/DiffTest.php 
b/tests/phpunit/diffop/diff/DiffTest.php
index c137f67..938392d 100644
--- a/tests/phpunit/diffop/diff/DiffTest.php
+++ b/tests/phpunit/diffop/diff/DiffTest.php
@@ -7,7 +7,6 @@
 use Diff\DiffOpAdd;
 use Diff\DiffOpChange;
 use Diff\DiffOpRemove;
-use Diff\MapDiff;
 use stdClass;
 
 /**
diff --git a/tests/phpunit/patcher/ListPatcherTest.php 
b/tests/phpunit/patcher/ListPatcherTest.php
index 3d15943..b45643e 100644
--- a/tests/phpunit/patcher/ListPatcherTest.php
+++ b/tests/phpunit/patcher/ListPatcherTest.php
@@ -6,7 +6,6 @@
 use Diff\DiffOpAdd;
 use Diff\DiffOpRemove;
 use Diff\ListPatcher;
-use Diff\MapPatcher;
 use Diff\Patcher;
 
 /**
diff --git a/tests/phpunit/patcher/MapPatcherTest.php 
b/tests/phpunit/patcher/MapPatcherTest.php
index aa7b87c..f564036 100644
--- a/tests/phpunit/patcher/MapPatcherTest.php
+++ b/tests/phpunit/patcher/MapPatcherTest.php
@@ -3,7 +3,6 @@
 namespace Diff\Tests;
 
 use Diff\Comparer\CallbackComparer;
-use Diff\Comparer\StrictComparer;
 use Diff\Diff;
 use Diff\DiffOpAdd;
 use Diff\DiffOpChange;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30586881bad9337e2bc57e6af9e919cf69ec181e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Implrmented StrategicArrayComparer - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Implrmented StrategicArrayComparer
..

Implrmented StrategicArrayComparer

Change-Id: Ib1f3f4c2a1e3f28fa142429cb64d115c4706fabd
---
M src/ArrayComparer/StrategicArrayComparer.php
M src/differ/CallbackListDiffer.php
M tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
3 files changed, 202 insertions(+), 10 deletions(-)


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

diff --git a/src/ArrayComparer/StrategicArrayComparer.php 
b/src/ArrayComparer/StrategicArrayComparer.php
index 39c6d32..d4a3656 100644
--- a/src/ArrayComparer/StrategicArrayComparer.php
+++ b/src/ArrayComparer/StrategicArrayComparer.php
@@ -3,12 +3,15 @@
 namespace Diff\ArrayComparer;
 
 use Diff\Comparer\ValueComparer;
+use Exception;
 
 /**
  * Computes the difference between two arrays by comparing elements with
  * a ValueComparer.
  *
- * @since 0.7
+ * Quantity matters: [42, 42] and [42] are different
+ *
+ * @since 0.8
  *
  * @file
  * @ingroup Diff
@@ -27,7 +30,7 @@
/**
 * @see ArrayComparer::diffArrays
 *
-* @since 0.7
+* @since 0.8
 *
 * @param array $arrayOne
 * @param array $arrayTwo
@@ -35,7 +38,41 @@
 * @return array
 */
public function diffArrays( array $arrayOne, array $arrayTwo ) {
-   return array(); // TODO: implement
+   $notInTwo = array();
+
+   foreach ( $arrayOne as $element ) {
+   $valueOffset = $this->arraySearch( $element, $arrayTwo 
);
+
+   if ( $valueOffset === false ) {
+   $notInTwo[] = $element;
+   continue;
+   }
+
+   unset( $arrayTwo[$valueOffset] );
+   }
+
+   return $notInTwo;
+   }
+
+   /**
+* @since 0.8
+*
+* @param string|int $needle
+* @param array $haystack
+*
+* @return bool|int|string
+* @throws Exception
+*/
+   protected function arraySearch( $needle, array $haystack ) {
+   foreach ( $haystack as $valueOffset => $thing ) {
+   $areEqual = $this->valueComparer->valuesAreEqual( 
$needle, $thing );
+
+   if ( $areEqual ) {
+   return $valueOffset;
+   }
+   }
+
+   return false;
}
 
 }
diff --git a/src/differ/CallbackListDiffer.php 
b/src/differ/CallbackListDiffer.php
index 9f5dc28..e8f9e11 100644
--- a/src/differ/CallbackListDiffer.php
+++ b/src/differ/CallbackListDiffer.php
@@ -101,6 +101,7 @@
$areEqual = call_user_func_array( 
$this->comparisonCallback, array( $needle, $thing ) );
 
if ( !is_bool( $areEqual ) ) {
+   // TODO: throw a more specific exception type
throw new Exception( 'Comparison callback 
returned a non-boolean value' );
}
 
diff --git a/tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php 
b/tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
index 9d3b400..b457c0f 100644
--- a/tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
+++ b/tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
@@ -2,6 +2,7 @@
 
 namespace Diff\Tests\ArrayComparer;
 
+use Diff\ArrayComparer\ArrayComparer;
 use Diff\ArrayComparer\StrategicArrayComparer;
 use Diff\Tests\DiffTestCase;
 
@@ -9,7 +10,7 @@
  * @covers Diff\ArrayComparer\StrategicArrayComparer
  *
  * @file
- * @since 0.7
+ * @since 0.8
  *
  * @ingroup DiffTest
  *
@@ -25,26 +26,179 @@
$this->assertTrue( true );
}
 
-   public function testDiffArrays() {
+   public function testDiffArraysWithComparerThatAlwaysReturnsTrue() {
+   $valueComparer = $this->getMock( 'Diff\Comparer\ValueComparer' 
);
+
+   $valueComparer->expects( $this->any() )
+   ->method( 'valuesAreEqual' )
+   ->will( $this->returnValue( true ) );
+
+   $arrayComparer = new StrategicArrayComparer( $valueComparer );
+
+   $this->assertNoDifference(
+   $arrayComparer,
+   array( 0, 2, 4 ),
+   array( 1, 2, 9 )
+   );
+
+   $this->assertNoDifference(
+   $arrayComparer,
+   array( 1, 2, 3 ),
+   array( 1, 2, 3 )
+   );
+
+   $this->assertNoDifference(
+   $arrayComparer,
+   array( 'bah' ),
+   array( 'foo', 'bar', 'baz' )
+   );
+
+   $this

[MediaWiki-commits] [Gerrit] Fix edit links on special pages - change (mediawiki...VisualEditor)

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

Change subject: Fix edit links on special pages
..


Fix edit links on special pages

Added wgIsArticle to isViewPage checks, otherwise we were attempting
to load VE dynamically on Special:Move/Delete, which resulted in a
broken h1 title and odd behavior off the 'Read' tab.

Also added !wgIsArticle to pageExists. This is a bit of a hack because
we don't have any info on page existence in the JS on these pages
(I think?). But it's better to display 'Edit' for a page that doesn't
exist, than 'Create' for a page that does.

Bug: 49000
Change-Id: Ib47e5524d41e6066b362e0f5645750c769de5193
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index 0b7af16..eafd735 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -53,11 +53,14 @@
 
conf = mw.config.get( 'wgVisualEditorConfig' );
uri = new mw.Uri();
-   pageExists = !!mw.config.get( 'wgArticleId' );
+   // For non-article pages, no information about page existence is 
exposed to
+   // mw.config, so we assume it exists TODO: fix this in core.
+   pageExists = !!mw.config.get( 'wgArticleId' ) || !mw.config.get( 
'wgIsArticle' );
viewUri = new mw.Uri( mw.util.wikiGetlink( mw.config.get( 
'wgRelevantPageName' ) ) );
veEditUri = viewUri.clone().extend( { 'veaction': 'edit' } );
isViewPage = (
mw.config.get( 'wgAction' ) === 'view' &&
+   mw.config.get( 'wgIsArticle' ) &&
!( 'diff' in uri.query )
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib47e5524d41e6066b362e0f5645750c769de5193
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] Fix edit links on special pages - change (mediawiki...VisualEditor)

2013-08-01 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Fix edit links on special pages
..

Fix edit links on special pages

Added wgIsArticle to isViewPage checks, otherwise we were attempting
to load VE dynamically on Special:Move/Delete, which resulted in a
broken h1 title and odd behavior off the 'Read' tab.

Also added !wgIsArticle to pageExists. This is a bit of a hack because
we don't have any info on page existence in the JS on these pages
(I think?). But it's better to display 'Edit' for a page that doesn't
exist, than 'Create' for a page that does.

Bug: 49000
Change-Id: Ib47e5524d41e6066b362e0f5645750c769de5193
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index 0b7af16..eafd735 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -53,11 +53,14 @@
 
conf = mw.config.get( 'wgVisualEditorConfig' );
uri = new mw.Uri();
-   pageExists = !!mw.config.get( 'wgArticleId' );
+   // For non-article pages, no information about page existence is 
exposed to
+   // mw.config, so we assume it exists TODO: fix this in core.
+   pageExists = !!mw.config.get( 'wgArticleId' ) || !mw.config.get( 
'wgIsArticle' );
viewUri = new mw.Uri( mw.util.wikiGetlink( mw.config.get( 
'wgRelevantPageName' ) ) );
veEditUri = viewUri.clone().extend( { 'veaction': 'edit' } );
isViewPage = (
mw.config.get( 'wgAction' ) === 'view' &&
+   mw.config.get( 'wgIsArticle' ) &&
!( 'diff' in uri.query )
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib47e5524d41e6066b362e0f5645750c769de5193
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] WIP: (Bug 52405) Make category links sol-transparent - change (mediawiki...Parsoid)

2013-08-01 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: WIP: (Bug 52405) Make category links sol-transparent
..

WIP: (Bug 52405) Make category links sol-transparent

* In the PHP preprocessor, category links just change page state
  and get preprocessed to an empty string and are therefore,
  transparent to further passes.  In particular, in Parsoid,
  this affects sol-transparency checks in the pre-handler.

* This makes category links sol-transparent which in turn
  fixes the pre-handler issues.

* Added new parser tests.
  - The new tests fail wt2html mode because the normalization
is not able to strip out all insignificant whitespace and
mw:Transclusion markers.  For now, blacklisting the test,
but worth investigating normalization.

  - 3 selser paragraph/category links interaction tests are
now failing because of the change.  To be investigated.
Hence WIP.

* Tested on pl:Polietylen and pl:Darmsztadt and verified the
  absence of s

Change-Id: Ifccdcfd3d01aec50f9ac8966a2cbfe7cbfc2eec9
---
M js/lib/mediawiki.Util.js
M js/tests/parserTests-blacklist.js
M js/tests/parserTests.txt
3 files changed, 35 insertions(+), 0 deletions(-)


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

diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index f0d5bf7..cb55375 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -259,12 +259,20 @@

['table','tbody','caption','th','tr','td'].indexOf(token.name) !== -1;
},
 
+   isCategoryLinkTag: function(token) {
+   return token.constructor === pd.SelfclosingTagTk &&
+   token.name === 'link' &&
+   token.getAttribute('rel') === 'mw:WikiLink/Category';
+   },
+
isSolTransparent: function(token) {
var tc = token.constructor;
if (tc === String) {
if (token.match(/[^\s]/)) {
return false;
}
+   } else if (this.isCategoryLinkTag(token)) {
+   return true;
} else if (tc !== pd.CommentTk &&
   (tc !== pd.SelfclosingTagTk || token.name !== 
'meta')) {
return false;
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index 34cd0ef..7f0e39c 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -55,6 +55,8 @@
 add("wt2html", "2c. Indent-Pre and tables (bug 42252)");
 add("wt2html", "4. Multiple spaces at start-of-line");
 add("wt2html", "5. White-space in indent-pre\nNOTE: the white-space char on 
2nd line is significant");
+add("wt2html", "6a. Indent-pre and category links");
+add("wt2html", "6b. Indent-pre and category links");
 add("wt2html", "Definition Lists: Nesting: Multi-level (Parsoid only)");
 add("wt2html", "Definition Lists: Nesting: Test 2 (Parsoid only)");
 add("wt2html", "Definition Lists: Nesting: Test 3 (Parsoid only)");
@@ -3164,6 +3166,9 @@
 add("selser", "BUG 561: {{/Subpage}} [[3]]");
 add("selser", "BUG 561: {{/Subpage}} [[4]]");
 add("selser", "BUG 561: {{/Subpage}} [[2]]");
+add("selser", "Category / paragraph interactions 
[3,2,1,3,0,4,1,2,1,2,0,2,0,0,0,0,0,4,0,0,0,0,0,3]");
+add("selser", "Category / paragraph interactions 
[[2,3,3],2,4,2,1,3,[2],0,0,2,2,2,4,3,0,0,4,2,4,3,3,0,0,1]");
+add("selser", "Category / paragraph interactions 
[[4,0,0],3,3,2,[3,3,0],4,3,4,2,2,0,2,0,0,0,0,0,0,0,1,3,0,0,3]");
 add("selser", "Handling of sections up to level 6 and beyond 
[1,2,1,2,1,0,[3],2,2,4,[2],4,0,0,1,0,0,3,1]");
 add("selser", "Handling of sections up to level 6 and beyond 
[[2],0,3,3,4,4,4,3,0,2,1,0,4,2,[3],0,[3],4,4]");
 add("selser", "Handling of sections up to level 6 and beyond 
[1,0,1,0,0,3,2,3,0,0,4,0,[4],0,1,0,0,4,0]");
diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt
index 76388d9..830bf66 100644
--- a/js/tests/parserTests.txt
+++ b/js/tests/parserTests.txt
@@ -1826,6 +1826,28 @@
 
 !! end
 
+!! test
+6a. Indent-pre and category links
+!! options
+parsoid=wt2html,wt2wt
+!! input
+ [[Category:foo]] 
+{{echo| [[Category:foo]]}} 
+!! result
+!! end
+
+!! test
+6b. Indent-pre and category links
+!! options
+parsoid=wt2html,wt2wt
+!! input
+ [[Category:foo]] a
+ [[Category:foo]] {{echo|b}}
+!! result
+a b
+
+!! end
+
 ###
 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
 ###

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifccdcfd3d01aec50f9ac8966a2cbfe7cbfc2eec9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

_

[MediaWiki-commits] [Gerrit] Added missing test and fixed missing check in constructor - change (mediawiki...Ask)

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

Change subject: Added missing test and fixed missing check in constructor
..


Added missing test and fixed missing check in constructor

Change-Id: I5725fb5552cc09ee0ba5be63c807be113619844b
---
M Tests/Phpunit/Language/Description/ValueDescriptionTest.php
M src/Ask/Language/Description/ValueDescription.php
2 files changed, 32 insertions(+), 6 deletions(-)

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



diff --git a/Tests/Phpunit/Language/Description/ValueDescriptionTest.php 
b/Tests/Phpunit/Language/Description/ValueDescriptionTest.php
index 157d7fc..53c1d0b 100644
--- a/Tests/Phpunit/Language/Description/ValueDescriptionTest.php
+++ b/Tests/Phpunit/Language/Description/ValueDescriptionTest.php
@@ -3,6 +3,9 @@
 namespace Ask\Tests\Phpunit\Language\Description;
 
 use Ask\Language\Description\ValueDescription;
+use DataValues\MonolingualTextValue;
+use DataValues\NumberValue;
+use DataValues\StringValue;
 
 /**
  * @covers Ask\Language\Description\ValueDescription
@@ -42,9 +45,9 @@
$instances = array();
 
$values = array(
-   new \DataValues\StringValue( 'ohi there' ),
-   new \DataValues\NumberValue( 4.2 ),
-   new \DataValues\MonolingualTextValue( 'en', 'ohi there' 
),
+   new StringValue( 'ohi there' ),
+   new NumberValue( 4.2 ),
+   new MonolingualTextValue( 'en', 'ohi there' ),
);
 
$comparators = array(
@@ -101,4 +104,23 @@
$this->assertEquals( $comparator, 
$newInstance->getComparator(), 'Comparator is returned as it was passed to the 
constructor' );
}
 
+   /**
+* @dataProvider invalidComparatorProvider
+*/
+   public function testCannotConstructWithInvalidComparator( 
$invalidComparator ) {
+   $this->setExpectedException( 'InvalidArgumentException' );
+   new ValueDescription( new StringValue( 'foo' ), 
$invalidComparator );
+   }
+
+   public function invalidComparatorProvider() {
+   return array(
+   array( null ),
+   array( array() ),
+   array( 4.2 ),
+   array( true ),
+   array( 'foo' ),
+   array( '' ),
+   );
+   }
+
 }
diff --git a/src/Ask/Language/Description/ValueDescription.php 
b/src/Ask/Language/Description/ValueDescription.php
index d44b27c..cb38e70 100644
--- a/src/Ask/Language/Description/ValueDescription.php
+++ b/src/Ask/Language/Description/ValueDescription.php
@@ -79,14 +79,18 @@
 * @throws InvalidArgumentException
 */
public function __construct( DataValue $value, $comparator = 
self::COMP_EQUAL ) {
-   if ( $comparator < self::COMP_EQUAL || $comparator > 
self::COMP_GREATER ) {
-   throw new InvalidArgumentException( 'Invalid comparator 
specified' );
-   }
+   $this->assertComparatorValidity( $comparator );
 
$this->value = $value;
$this->comparator = $comparator;
}
 
+   protected function assertComparatorValidity( $comparator ) {
+   if ( !is_int( $comparator ) || $comparator < self::COMP_EQUAL 
|| $comparator > self::COMP_GREATER ) {
+   throw new InvalidArgumentException( 'Invalid comparator 
specified' );
+   }
+   }
+
/**
 * Returns the value to compare against.
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5725fb5552cc09ee0ba5be63c807be113619844b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Change release notes to markdown - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Change release notes to markdown
..

Change release notes to markdown

Change-Id: Ic590e9bf11af7439b7bbd99352c5acbe573cf181
---
R RELEASE-NOTES.md
1 file changed, 27 insertions(+), 36 deletions(-)


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

diff --git a/RELEASE-NOTES b/RELEASE-NOTES.md
similarity index 81%
rename from RELEASE-NOTES
rename to RELEASE-NOTES.md
index 655aa51..f1c82cc 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES.md
@@ -1,57 +1,53 @@
-These are the release notes for the Diff extension.
+# Diff release notes
 
-Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Diff
+[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/version.png)](https://packagist.org/packages/diff/diff)
 
+## Version 0.8 (dev)
 
-=== Version 0.8 ===
-dev
-
-; Improvements
+ Improvements
 
 * MapPatcher will now report conflicts for remove operations that specify a 
value to be removed
 different from the value in the structure being patched.
 
-; Removals
+ Removals
 
 * Removed obsolete tests/phpunit.php test runner
 
-=== Version 0.7 ===
-2013-07-16
+## Version 0.7 (2013-07-16)
 
-; Improvements
+ Improvements
 
 * Added extra tests for MapPatcher and ListPatcher
 * Added extra tests for Diff
 * Added extra tests for MapDiffer
 * Added @covers tags to the unit tests to improve coverage report accuracy
 
-; Removals
+ Removals
 
 * Removed static methods from ListDiff and MapDiff (all deprecated since 0.4)
 * Removed DiffOpTestDummy
 
-; Bug fixes
+ Bug fixes
 
 * MapPatcher will now no longer stop patching after the first remove operation 
it encounters
 * MapPatcher now always treats its top level input diff as a map diff
 * Fixed several issues in ListPatcherTest
 
-=== Version 0.6 ===
-2013-05-08
+## Version 0.6 (2013-05-08)
 
-; Compatibility changes
+ Compatibility changes
 
 * The tests can now run independently of MediaWiki
 * The tests now require PHPUnit 3.7 or later
 
-; Additions
+ Additions
 
 * Added phpunit.php runner in the tests directory
 * Added Diff\Comparer\ValueComparer interface with CallbackComparer and 
StrictComparer implementations
 * Added MapPatcher::setValueComparer to facilitate patching maps containing 
objects
 * Added PHPUnit configuration file using the new tests/bootstrap.php
 
-; Removals
+ Removals
 
 * GenericArrayObject has been removed from this package.
   Diff derives from ArrayObject rather than GenericArrayObject.
@@ -62,33 +58,31 @@
   rather than a MWException.
 * Removed Diff\Exception
 
-=== Version 0.5 ===
-2013-02-26
+## Version 0.5 (2013-02-26)
 
-; Additions
+ Additions
 
 * Added DiffOpFactory
 * Added DiffOp::toArray
 * Added CallbackListDiffer
 * Added MapDiffer::setComparisonCallback
 
-; Deprecations
+ Deprecations
 
 * Hard deprecated ListDiff, MapDiff and IDiff
 
-; Removals
+ Removals
 
 * Removed Diff::getApplicableDiff
 
-=== Version 0.4 ===
-2013-01-08
+## Version 0.4 (2013-01-08)
 
-; Additions
+ Additions
 
 * Split off diffing code from MapDiff and ListDiff to dedicated Differ classes
 * Added dedicated Patcher classes, which are used for the getApplicableDiff 
functionality
 
-; Deprecations
+ Deprecations
 
 * Deprecated ListDiff:newFromArrays and MapDiff::newFromArrays
 * Deprecated ListDiff::newEmpty and MapDiff::newEmpty
@@ -97,34 +91,31 @@
 * Soft deprecated IDiff interface in favour of Diff
 * Soft deprecated MapDiff and ListDiff in favour of Diff
 
-; Removals
+ Removals
 
 * Removed parentKey functionality from Diff
 * Removed constructor from Diff interface
 * Removed Diff::newEmpty
 
-=== Version 0.3 ===
-2012-11-21
+## Version 0.3 (2012-11-21)
 
 * Improved entry point and setup code. Diff.php is now the main entry point 
for both MW extension and standalone library
 * ListDiffs with only add operations can now be applied on top of bases that 
do not have their key
 * Added Diff::removeEmptyOperations
 * Improved type hinting
 * Improved test coverage
-** Added constructor tests for MapDiff and ListDiff
-** Added extra tests for Diff and MapDiff
-** Test coverage is now 100%
+* Added constructor tests for MapDiff and ListDiff
+* Added extra tests for Diff and MapDiff
+* Test coverage is now 100%
 * Removed static method from Diff interface
 
-=== Version 0.2 ===
-2012-11-01
+## Version 0.2 (2012-11-01)
 
 * Fixed tests to work with PHP 5.4 and above
 * Added translations
 * Added some profiling calls
 
-=== Version 0.1 ===
-2012-9-25
+## Version 0.1 (2012-9-25)
 
 Initial release with these features:
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic590e9bf11af7439b7bbd99352c5acbe573cf181
Gerrit-Patc

[MediaWiki-commits] [Gerrit] Fix error in readme file - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Fix error in readme file
..

Fix error in readme file

Change-Id: I86e7dc9d0228c7cc12a4ee090a435333d12d1030
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/README.md b/README.md
index 84b951c..b39636c 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Diff
 
 [![Latest Stable 
Version](https://poser.pugx.org/diff/diff/version.png)](https://packagist.org/packages/diff/diff)
-[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/d/total.png)](https://packagist.org/packages/diff/diff)
+[![Download 
count](https://poser.pugx.org/diff/diff/d/total.png)](https://packagist.org/packages/diff/diff)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Diff.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Diff)
 [![Coverage 
Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-Diff/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-Diff?branch=master)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86e7dc9d0228c7cc12a4ee090a435333d12d1030
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Split ve.ui.Toolbar and ve.ui.SurfaceToolbar - change (mediawiki...VisualEditor)

2013-08-01 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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


Change subject: Split ve.ui.Toolbar and ve.ui.SurfaceToolbar
..

Split ve.ui.Toolbar and ve.ui.SurfaceToolbar

Objective:

* Make it possible to make a toolbar without a surface

Changes:

*.php
* Links to new file

ve.ui.Toolbar.js, ve.ui.SurfaceToolbar.js
* Split toolbar into generic and surface specific classes

*.js
* Update symbol names

Change-Id: Ice063a2fb67b5ce5155cdc96a0d47af49eee48cb
---
M VisualEditor.php
M demos/ve/index.php
M modules/syntaxhighlight/ve.ui.MWSyntaxHighlightButtonTool.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/test/index.php
M modules/ve/init/sa/ve.init.sa.Target.js
M modules/ve/test/index.php
M modules/ve/ui/tools/buttons/ve.ui.BoldButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.BulletButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.ClearButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.CodeButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.IndentButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.ItalicButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.LanguageButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.LinkButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.NumberButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.OutdentButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.RedoButtonTool.js
M modules/ve/ui/tools/buttons/ve.ui.UndoButtonTool.js
M modules/ve/ui/tools/dropdowns/ve.ui.FormatDropdownTool.js
M modules/ve/ui/tools/ve.ui.AnnotationButtonTool.js
M modules/ve/ui/tools/ve.ui.DialogButtonTool.js
M modules/ve/ui/tools/ve.ui.DropdownTool.js
M modules/ve/ui/tools/ve.ui.IndentationButtonTool.js
M modules/ve/ui/tools/ve.ui.InspectorButtonTool.js
M modules/ve/ui/tools/ve.ui.ListButtonTool.js
M modules/ve/ui/ve.ui.Context.js
A modules/ve/ui/ve.ui.SurfaceToolbar.js
M modules/ve/ui/ve.ui.Toolbar.js
M modules/ve/ui/widgets/ve.ui.SurfaceWidget.js
30 files changed, 301 insertions(+), 245 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 9fedf04..11fe5d0 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -465,6 +465,7 @@
've/ui/ve.ui.Tool.js',
've/ui/ve.ui.ToolFactory.js',
've/ui/ve.ui.Toolbar.js',
+   've/ui/ve.ui.SurfaceToolbar.js',
've/ui/ve.ui.CommandRegistry.js',
've/ui/ve.ui.Trigger.js',
've/ui/ve.ui.TriggerRegistry.js',
diff --git a/demos/ve/index.php b/demos/ve/index.php
index 55007be..42a3904 100644
--- a/demos/ve/index.php
+++ b/demos/ve/index.php
@@ -224,6 +224,7 @@



+   



diff --git a/modules/syntaxhighlight/ve.ui.MWSyntaxHighlightButtonTool.js 
b/modules/syntaxhighlight/ve.ui.MWSyntaxHighlightButtonTool.js
index 873fcea..71a0c48 100644
--- a/modules/syntaxhighlight/ve.ui.MWSyntaxHighlightButtonTool.js
+++ b/modules/syntaxhighlight/ve.ui.MWSyntaxHighlightButtonTool.js
@@ -11,7 +11,7 @@
  * @class
  * @extends ve.ui.DialogButtonTool
  * @constructor
- * @param {ve.ui.Toolbar} toolbar
+ * @param {ve.ui.SurfaceToolbar} toolbar
  * @param {Object} [config] Config options
  */
 ve.ui.MWSyntaxHighlightButtonTool = function VeUiMWSyntaxHighlightButtonTool( 
toolbar, config ) {
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index e109d13..3947d49 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -1882,7 +1882,7 @@
  * @method
  */
 ve.init.mw.ViewPageTarget.prototype.setUpToolbar = function () {
-   this.toolbar = new ve.ui.Toolbar( this.surface, { 'shadow': true, 
'actions': true } );
+   this.toolbar = new ve.ui.SurfaceToolbar( this.surface, { 'shadow': 
true, 'actions': true } );
this.toolbar.addTools( this.constructor.static.toolbarTools );
this.surface.addCommands( this.constructor.static.surfaceCommands );
if ( !this.isMobileDevice ) {
diff --git a/modules/ve-mw/test/index.php b/modules/ve-mw/test/index.php
index 0c5f190..b0392da 100644
--- a/modules/ve-mw/test/index.php
+++ b/modules/ve-mw/test/index.php
@@ -211,6 +211,7 @@



+   



diff --git a/modules/ve/init/sa/ve.init.sa.Target.js 
b/modules/ve/init/sa/ve.init.sa.Target.js
index e259f31..b9d86df 100644
--- a/modules/ve/init/sa/ve.init.sa.Target.js
+++ b/modules/ve/init/sa/ve.init.sa.Target.js
@@ -26,7 +26,7 @@
 
// Properties
this.surface = new ve.ui.Surface( doc );
-   this.toolbar = new ve.ui.Toolbar( this.

[MediaWiki-commits] [Gerrit] Throw Merger section out of readme and add TODO for ArrayCom... - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Throw Merger section out of readme and add TODO for 
ArrayComparer
..

Throw Merger section out of readme and add TODO for ArrayComparer

Change-Id: I2be01f9e34375d750060042ae715ff57b2f0277c
---
M README.md
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/README.md b/README.md
index b39636c..d483a0f 100644
--- a/README.md
+++ b/README.md
@@ -119,15 +119,15 @@
 
 All classes part of the patcher component can be found in 
includes/patcher
 
-### Comparer
+### ValueComparer
 
 Added in 0.6
 
 TODO
 
-### Merger
+### ArrayComparer
 
-Added in 0.7
+Added in 0.8
 
 TODO
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2be01f9e34375d750060042ae715ff57b2f0277c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Make ValueDescription non-final - change (mediawiki...Ask)

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

Change subject: Make ValueDescription non-final
..


Make ValueDescription non-final

Change-Id: Ie859b14b4452c985e9458648d33f13785a491e97
---
M src/Ask/Language/Description/ValueDescription.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/Ask/Language/Description/ValueDescription.php 
b/src/Ask/Language/Description/ValueDescription.php
index d44b27c..cfa7a23 100644
--- a/src/Ask/Language/Description/ValueDescription.php
+++ b/src/Ask/Language/Description/ValueDescription.php
@@ -40,7 +40,7 @@
  * @licence GNU GPL v2+
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  */
-final class ValueDescription extends Description implements \Ask\Immutable {
+class ValueDescription extends Description implements \Ask\Immutable {
 
// This list has values backwards compatible with SMW_CMP_.
const COMP_EQUAL = 1;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie859b14b4452c985e9458648d33f13785a491e97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove obsolete INSTALL file - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Remove obsolete INSTALL file
..

Remove obsolete INSTALL file

Change-Id: I04b0b974f7d361bba0a3091631e44e79fa226bbc
---
D INSTALL
1 file changed, 0 insertions(+), 31 deletions(-)


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

diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index fab068f..000
--- a/INSTALL
+++ /dev/null
@@ -1,31 +0,0 @@
-These is the install file for the Diff extension.
-
-Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Diff
-Latest version of the install file: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Diff.git;a=blob;f=INSTALL
-
-
-== Requirements ==
-
-Diff requires:
-
-* PHP 5.3 or above
-* (For running the PHPUnit tests: PHPUnit 3.7 or later)
-* (If used as MediaWiki extension: MediaWiki 1.16 or later)
-
-== Download ==
-
-git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git
-
-== Installation as MediaWiki extension ==
-
-Once you have downloaded the code, place the ''Diff'' directory within your 
MediaWiki
-'extensions' directory. Then add the following code to your 
[[Manual:LocalSettings.php|LocalSettings.php]] file:
-
-# Diff
-require_once( "$IP/extensions/Diff/Diff.php" );
-
-== Installation as standalone library ==
-
-Include Diff/Diff.standalone.php. This file includes an autoloader allowing 
you to directly
-reference the diff classes without first including their files. If you want to 
use your
-own autoloader, you can find the list of diff classes in Diff/Diff.classes.php.
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04b0b974f7d361bba0a3091631e44e79fa226bbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Do not use deprecated interface - change (mediawiki...Wikibase)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Do not use deprecated interface
..

Do not use deprecated interface

Change-Id: I44f649cb5a93d83e0fe40d2eb848dcc352a273a6
---
M lib/includes/changes/DiffChange.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/lib/includes/changes/DiffChange.php 
b/lib/includes/changes/DiffChange.php
index 21bf022..b550ef8 100644
--- a/lib/includes/changes/DiffChange.php
+++ b/lib/includes/changes/DiffChange.php
@@ -1,11 +1,11 @@
 getInfo( $cache );
@@ -66,9 +66,9 @@
/**
 * @since 0.1
 *
-* @param IDiff $diff
+* @param Diff $diff
 */
-   public function setDiff( IDiff $diff ) {
+   public function setDiff( Diff $diff ) {
$info = $this->hasField( 'info' ) ? $this->getField( 'info' ) : 
array();
$info['diff'] = $diff;
$this->setField( 'info', $info );
@@ -77,12 +77,12 @@
/**
 * @since 0.1
 *
-* @param IDiff $diff
+* @param Diff $diff
 * @param array|null $fields
 *
 * @return DiffChange
 */
-   public static function newFromDiff( IDiff $diff, array $fields = null ) 
{
+   public static function newFromDiff( Diff $diff, array $fields = null ) {
$instance = new static(
ChangesTable::singleton(),
$fields,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44f649cb5a93d83e0fe40d2eb848dcc352a273a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Fix incorrect method names and improve @covers tags - change (mediawiki...Ask)

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

Change subject: Fix incorrect method names and improve @covers tags
..


Fix incorrect method names and improve @covers tags

Change-Id: I075c60fa2fe3801966d9b4e3effe20e8176b25a2
---
M Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php
M Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
M Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
3 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php 
b/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php
index 5c26284..4b3 100644
--- a/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php
+++ b/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php
@@ -13,6 +13,7 @@
 
 /**
  * @covers Ask\Deserializers\DescriptionDeserializer
+ * @covers Ask\Deserializers\Strategies\DescriptionDeserializationStrategy
  *
  * @file
  * @since 1.0
diff --git a/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php 
b/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
index e6c7185..e603d53 100644
--- a/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
+++ b/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
@@ -7,6 +7,7 @@
 
 /**
  * @covers Ask\Deserializers\SelectionRequestDeserializer
+ * @covers Ask\Deserializers\Strategies\SelectionRequestDeserializationStrategy
  *
  * @file
  * @since 1.0
@@ -113,7 +114,7 @@
return $argLists;
}
 
-   public function testCannotDeserilaizeWithUnknownDescriptionType() {
+   public function testCannotDeserilaizeWithUnknownSelectionRequestType() {
$notASelectionRequest = array(
'objectType' => 'selectionRequest',
'selectionRequestType' => 'fooBar',
@@ -124,7 +125,7 @@
$this->newSelectionRequestDeserializer()->deserialize( 
$notASelectionRequest );
}
 
-   public function testCannotDeserilaizeWithoutDescriptionType() {
+   public function testCannotDeserilaizeWithoutSelectionRequestType() {
$notASortExpression = array(
'objectType' => 'selectionRequest',
'value' => array()
diff --git a/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php 
b/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
index d5bb8c6..84a5838 100644
--- a/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
+++ b/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
@@ -11,6 +11,7 @@
 
 /**
  * @covers Ask\Deserializers\SortExpressionDeserializer
+ * @covers Ask\Deserializers\Strategies\SortExpressionDeserializationStrategy
  *
  * @file
  * @since 1.0
@@ -117,7 +118,7 @@
return $argLists;
}
 
-   public function testCannotDeserilaizeWithUnknownDescriptionType() {
+   public function testCannotDeserilaizeWithUnknownSortExpressionType() {
$notASortExpression = array(
'objectType' => 'sortExpression',
'sortExpressionType' => 'fooBar',
@@ -128,7 +129,7 @@
$this->newSortExpressionDeserializer()->deserialize( 
$notASortExpression );
}
 
-   public function testCannotDeserilaizeWithoutDescriptionType() {
+   public function testCannotDeserilaizeWithoutSortExpressionType() {
$notASortExpression = array(
'objectType' => 'sortExpression',
'value' => array()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I075c60fa2fe3801966d9b4e3effe20e8176b25a2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Removed unused imports - change (mediawiki...Diff)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Removed unused imports
..

Removed unused imports

Change-Id: I30586881bad9337e2bc57e6af9e919cf69ec181e
---
M tests/phpunit/diffop/diff/DiffTest.php
M tests/phpunit/patcher/ListPatcherTest.php
M tests/phpunit/patcher/MapPatcherTest.php
3 files changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/tests/phpunit/diffop/diff/DiffTest.php 
b/tests/phpunit/diffop/diff/DiffTest.php
index c137f67..938392d 100644
--- a/tests/phpunit/diffop/diff/DiffTest.php
+++ b/tests/phpunit/diffop/diff/DiffTest.php
@@ -7,7 +7,6 @@
 use Diff\DiffOpAdd;
 use Diff\DiffOpChange;
 use Diff\DiffOpRemove;
-use Diff\MapDiff;
 use stdClass;
 
 /**
diff --git a/tests/phpunit/patcher/ListPatcherTest.php 
b/tests/phpunit/patcher/ListPatcherTest.php
index 3d15943..b45643e 100644
--- a/tests/phpunit/patcher/ListPatcherTest.php
+++ b/tests/phpunit/patcher/ListPatcherTest.php
@@ -6,7 +6,6 @@
 use Diff\DiffOpAdd;
 use Diff\DiffOpRemove;
 use Diff\ListPatcher;
-use Diff\MapPatcher;
 use Diff\Patcher;
 
 /**
diff --git a/tests/phpunit/patcher/MapPatcherTest.php 
b/tests/phpunit/patcher/MapPatcherTest.php
index aa7b87c..f564036 100644
--- a/tests/phpunit/patcher/MapPatcherTest.php
+++ b/tests/phpunit/patcher/MapPatcherTest.php
@@ -3,7 +3,6 @@
 namespace Diff\Tests;
 
 use Diff\Comparer\CallbackComparer;
-use Diff\Comparer\StrictComparer;
 use Diff\Diff;
 use Diff\DiffOpAdd;
 use Diff\DiffOpChange;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30586881bad9337e2bc57e6af9e919cf69ec181e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Added missing test case - change (mediawiki...Ask)

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

Change subject: Added missing test case
..


Added missing test case

Change-Id: I25a0f2afbbfceae40071237a384def28ed5aae2e
---
M Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
1 file changed, 23 insertions(+), 0 deletions(-)

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



diff --git a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php 
b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
index b1f3dfd..d3e2246 100644
--- a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
+++ b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
@@ -8,6 +8,7 @@
 
 /**
  * @covers Ask\Language\Option\PropertyValueSortExpression
+ * @covers Ask\Language\Option\SortExpression
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -80,4 +81,26 @@
return $instances;
}
 
+   /**
+* @dataProvider invalidSortDirectionProvider
+*/
+   public function testCannotConstructWithInvalidSortDirection( 
$invalidSortDirection ) {
+   $this->setExpectedException( 'InvalidArgumentException' );
+
+   new PropertyValueSortExpression(
+   new StringValue( 'foo' ),
+   $invalidSortDirection
+   );
+   }
+
+   public function invalidSortDirectionProvider() {
+   return array(
+   array( null ),
+   array( array() ),
+   array( true ),
+   array( 4.2 ),
+   array( 'foo' ),
+   );
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25a0f2afbbfceae40071237a384def28ed5aae2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove unused imports - change (mediawiki...Wikibase)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Remove unused imports
..

Remove unused imports

Change-Id: Ib08ad4447a07a1974ad05d70c47791aa66f7cbbc
---
M lib/includes/store/EntityRevision.php
1 file changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/lib/includes/store/EntityRevision.php 
b/lib/includes/store/EntityRevision.php
index fc11e3f..2f68d76 100644
--- a/lib/includes/store/EntityRevision.php
+++ b/lib/includes/store/EntityRevision.php
@@ -2,12 +2,7 @@
 
 namespace Wikibase;
 
-use Diff\Comparer\CallbackComparer;
-use Diff\Differ;
-use Diff\MapPatcher;
-use Diff\Patcher;
 use MWException;
-use Wikibase\Lib\GuidGenerator;
 
 /**
  * Represents a revision of a Wikibase entity.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib08ad4447a07a1974ad05d70c47791aa66f7cbbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Send proper X-Vary-Options - change (mediawiki...MobileFrontend)

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

Change subject: Send proper X-Vary-Options
..


Send proper X-Vary-Options

Change-Id: Iae2f70422dbb9a58758faa3f20f3602a549213a9
---
M includes/MobileContext.php
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMobile.php
3 files changed, 16 insertions(+), 44 deletions(-)

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



diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index fd33f3e..f5df79f 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -1,9 +1,9 @@
 getRequest()->getCookie( 
$this->getUseFormatCookieName(), '' );
+   $useFormatFromCookie = $this->getRequest()->getCookie( 
self::USEFORMAT_COOKIE_NAME, '' );
 
return $useFormatFromCookie;
}
@@ -522,21 +522,15 @@
 *
 * @param string $cookieFormat
 * @param null $expiry
-* @param bool $force Whether or not to force the cookie getting set
 */
-   public function setUseFormatCookie( $cookieFormat = 'true', $expiry = 
null, $force = false ) {
+   public function setUseFormatCookie( $cookieFormat = 'true', $expiry = 
null ) {
global $wgCookiePath, $wgCookieSecure;
-
-   // sanity check before setting the cookie
-   if ( !$this->shouldSetUseFormatCookie() && !$force ) {
-   return;
-   }
 
if ( is_null( $expiry ) ) {
$expiry = $this->getUseFormatCookieExpiry();
}
 
-   setcookie( $this->getUseFormatCookieName(), $cookieFormat, 
$expiry, $wgCookiePath,
+   setcookie( self::USEFORMAT_COOKIE_NAME, $cookieFormat, $expiry, 
$wgCookiePath,
$this->getRequest()->getHeader( 'Host' ), 
$wgCookieSecure );
wfIncrStats( 'mobile.useformat_' . $cookieFormat . 
'_cookie_set' );
}
@@ -549,37 +543,6 @@
// set expiration date in the past
$expire = $this->getUseFormatCookieExpiry( time(), -3600 );
$this->setUseFormatCookie( '', $expire, true );
-   }
-
-   public function getUseFormatCookieName() {
-   if ( !isset( $this->useFormatCookieName ) ) {
-   $this->useFormatCookieName = 'mf_mobileFormat';
-   }
-   return $this->useFormatCookieName;
-   }
-
-   /**
-* Determine whether or not the requested cookie value should get set
-*
-* Ignores certain URL patterns, eg initial requests to a 
mobile-specific
-* domain with no path. This is intended to avoid pitfalls for certain
-* server configurations, but should not get in the way of
-* out-of-the-box configs.
-*
-* Also will not set cookie if the cookie's value has already been
-* appropriately set.
-* @return bool
-*/
-   protected function shouldSetUseFormatCookie() {
-   global $wgScriptPath;
-
-   $reqUrl = $this->getRequest()->getRequestUrl();
-   $urlsToIgnore = array( '/?useformat=mobile', $wgScriptPath . 
'/?useformat=mobile' );
-   if ( in_array( $reqUrl, $urlsToIgnore ) ) {
-   return false;
-   }
-
-   return true;
}
 
/**
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 84d8c8e..b56b8d4 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -221,7 +221,17 @@
 * @return bool
 */
public static function onGetCacheVaryCookies( $out, &$cookies ) {
-   $cookies[] = 'mf_useformat';
+   global $wgMobileUrlTemplate;
+
+   $cookies[] = MobileContext::USEFORMAT_COOKIE_NAME; // Enables 
mobile cookies on wikis w/o mobile domain
+   $cookies[] = 'stopMobileRedirect'; // Don't redirect to mobile 
if user had explicitly opted out of it
+   $context = MobileContext::singleton();
+   if ( $context->shouldDisplayMobileView() || 
!$wgMobileUrlTemplate ) {
+   $cookies[] = 'optin'; // Alpha/beta cookie
+   $cookies[] = 'disableImages';
+   }
+   // Redirect people who want so from HTTP to HTTPS. Ideally, 
should be only for HTTP but we don't vary on protocol
+   $cookies[] = 'forceHTTPS';
return true;
}
 
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 6a50eaa..0944f95 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -97,9 +97,8 @@
 
public function getSkinConfigVariables() {
global $wgCookiePath;
-   $ctx = MobileContext::singleton();
$wgUseFormatCookie = a

[MediaWiki-commits] [Gerrit] Bail when JSON length exceeds database limits - change (mediawiki...TemplateData)

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

Change subject: Bail when JSON length exceeds database limits
..


Bail when JSON length exceeds database limits

This might not be necessary on non-MySQL databases, but I'm sure that
at least their limits aren't lower than MySQL's, so let's stay on the
safe side.

Bug: 51740
Change-Id: I9c7115a951f126844bc70755bff12e8cd5fc2be1
---
M TemplateData.i18n.php
M TemplateDataBlob.php
M tests/TemplateDataBlobTest.php
3 files changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/TemplateData.i18n.php b/TemplateData.i18n.php
index febbdca..b86b3c1 100644
--- a/TemplateData.i18n.php
+++ b/TemplateData.i18n.php
@@ -23,6 +23,7 @@
'templatedata-invalid-missing' => 'Required property "$1" not found.',
'templatedata-invalid-unknown' => 'Unexpected property "$1".',
'templatedata-invalid-value' => 'Invalid value for property "$1".',
+   'templatedata-invalid-length' => 'Data too large to save 
({{formatnum:$1}} {{PLURAL:$1|byte|bytes}}, {{PLURAL:$2|limit is}} 
{{formatnum:$2}})',
 );
 
 /** Message documentation (Message documentation)
@@ -61,6 +62,9 @@
 * $1 - name of property. e.g. "params.1.foobar"',
'templatedata-invalid-value' => 'Error message when a property that 
cannot contain free-form text has an invalid value.
 * $1 - name of property. e.g. "params.1.type"',
+   'templatedata-invalid-length' => 'Error message when generated JSON\'s 
length exceed database limits.
+* $1 - length of generated JSON
+* $2 - maximal allowed length',
 );
 
 /** Asturian (asturianu)
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 25ed569..21d9cec 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -12,6 +12,8 @@
  * @class
  */
 class TemplateDataBlob {
+   // Size of MySQL 'blob' field; page_props table where the data is 
stored uses one.
+   const MAX_LENGTH = 65535;
 
/**
 * @var stdClass
@@ -304,6 +306,11 @@
}
}
 
+   $length = strlen( $this->getJSON() );
+   if ( $length > self::MAX_LENGTH ) {
+   return Status::newFatal( 'templatedata-invalid-length', 
$length, self::MAX_LENGTH );
+   }
+
return Status::newGood();
}
 
diff --git a/tests/TemplateDataBlobTest.php b/tests/TemplateDataBlobTest.php
index 35a4c85..10a2498 100644
--- a/tests/TemplateDataBlobTest.php
+++ b/tests/TemplateDataBlobTest.php
@@ -304,6 +304,13 @@
}',
'status' => true
),
+   array(
+   'input' => '{
+   "description": "' . str_repeat( 'X', 
65535 ) . '",
+   "params": {}
+   }',
+   'status' => 'Data too large to save (65,582 
bytes, limit is 65,535)'
+   ),
);
$calls = array();
foreach ( $cases as $case ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c7115a951f126844bc70755bff12e8cd5fc2be1
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Matmarex 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Matmarex 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Added missing test and fixed missing check in constructor - change (mediawiki...Ask)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Added missing test and fixed missing check in constructor
..

Added missing test and fixed missing check in constructor

Change-Id: I5725fb5552cc09ee0ba5be63c807be113619844b
---
M Tests/Phpunit/Language/Description/ValueDescriptionTest.php
M src/Ask/Language/Description/ValueDescription.php
2 files changed, 32 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/35/77235/1

diff --git a/Tests/Phpunit/Language/Description/ValueDescriptionTest.php 
b/Tests/Phpunit/Language/Description/ValueDescriptionTest.php
index 157d7fc..53c1d0b 100644
--- a/Tests/Phpunit/Language/Description/ValueDescriptionTest.php
+++ b/Tests/Phpunit/Language/Description/ValueDescriptionTest.php
@@ -3,6 +3,9 @@
 namespace Ask\Tests\Phpunit\Language\Description;
 
 use Ask\Language\Description\ValueDescription;
+use DataValues\MonolingualTextValue;
+use DataValues\NumberValue;
+use DataValues\StringValue;
 
 /**
  * @covers Ask\Language\Description\ValueDescription
@@ -42,9 +45,9 @@
$instances = array();
 
$values = array(
-   new \DataValues\StringValue( 'ohi there' ),
-   new \DataValues\NumberValue( 4.2 ),
-   new \DataValues\MonolingualTextValue( 'en', 'ohi there' 
),
+   new StringValue( 'ohi there' ),
+   new NumberValue( 4.2 ),
+   new MonolingualTextValue( 'en', 'ohi there' ),
);
 
$comparators = array(
@@ -101,4 +104,23 @@
$this->assertEquals( $comparator, 
$newInstance->getComparator(), 'Comparator is returned as it was passed to the 
constructor' );
}
 
+   /**
+* @dataProvider invalidComparatorProvider
+*/
+   public function testCannotConstructWithInvalidComparator( 
$invalidComparator ) {
+   $this->setExpectedException( 'InvalidArgumentException' );
+   new ValueDescription( new StringValue( 'foo' ), 
$invalidComparator );
+   }
+
+   public function invalidComparatorProvider() {
+   return array(
+   array( null ),
+   array( array() ),
+   array( 4.2 ),
+   array( true ),
+   array( 'foo' ),
+   array( '' ),
+   );
+   }
+
 }
diff --git a/src/Ask/Language/Description/ValueDescription.php 
b/src/Ask/Language/Description/ValueDescription.php
index d44b27c..cb38e70 100644
--- a/src/Ask/Language/Description/ValueDescription.php
+++ b/src/Ask/Language/Description/ValueDescription.php
@@ -79,14 +79,18 @@
 * @throws InvalidArgumentException
 */
public function __construct( DataValue $value, $comparator = 
self::COMP_EQUAL ) {
-   if ( $comparator < self::COMP_EQUAL || $comparator > 
self::COMP_GREATER ) {
-   throw new InvalidArgumentException( 'Invalid comparator 
specified' );
-   }
+   $this->assertComparatorValidity( $comparator );
 
$this->value = $value;
$this->comparator = $comparator;
}
 
+   protected function assertComparatorValidity( $comparator ) {
+   if ( !is_int( $comparator ) || $comparator < self::COMP_EQUAL 
|| $comparator > self::COMP_GREATER ) {
+   throw new InvalidArgumentException( 'Invalid comparator 
specified' );
+   }
+   }
+
/**
 * Returns the value to compare against.
 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5725fb5552cc09ee0ba5be63c807be113619844b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Tools: Manage obsolete files in /usr/local/bin - change (operations/puppet)

2013-08-01 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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


Change subject: Tools: Manage obsolete files in /usr/local/bin
..

Tools: Manage obsolete files in /usr/local/bin

/usr/local/bin had some obsolete versions of scripts that since then
have been moved to /usr/bin.  To properly manage those, we add
symbolic links pointing to /usr/bin.  Also, the requirement of the
jobutils package is moved from toollabs::bastion and
toollabs::webserver to gridengine::submit_host.

Change-Id: I28ff4ea1806f0f58e1738cf8194f44ea49085608
---
M modules/gridengine/manifests/submit_host.pp
M modules/toollabs/manifests/bastion.pp
M modules/toollabs/manifests/webserver.pp
3 files changed, 17 insertions(+), 8 deletions(-)


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

diff --git a/modules/gridengine/manifests/submit_host.pp 
b/modules/gridengine/manifests/submit_host.pp
index 76e2d80..68fe717 100644
--- a/modules/gridengine/manifests/submit_host.pp
+++ b/modules/gridengine/manifests/submit_host.pp
@@ -6,7 +6,7 @@
gridmaster => $gridmaster,
}
 
-package { "gridengine-client":
+package { [ "gridengine-client", "jobutils" ]:
 ensure => latest,
 }
 
@@ -17,6 +17,14 @@
   ensure => present;
 }
 
+# Temporary hack to manage obsolete files in /usr/local/bin.
+# TODO: Remove when no longer needed.
+file { [ "/usr/local/bin/job", "/usr/local/bin/jstart",
+ "/usr/local/bin/jstop", "/usr/local/bin/jsub"]:
+  ensure => link,
+  target => regsubst(name, "^/usr/local/bin/", "/usr/bin/")
+}
+
 # Not actually possible in the labs
 #  @@sshkey { $fqdn:
 #  ensure => present,
diff --git a/modules/toollabs/manifests/bastion.pp 
b/modules/toollabs/manifests/bastion.pp
index 2e17bb0..c3a037c 100644
--- a/modules/toollabs/manifests/bastion.pp
+++ b/modules/toollabs/manifests/bastion.pp
@@ -45,10 +45,17 @@
 source => "puppet:///modules/toollabs/sql",
   }
 
-  package { [ 'jobutils', 'misctools' ]:
+  package { "misctools":
 ensure => latest,
   }
 
+  # Temporary hack to manage obsolete files in /usr/local/bin.
+  # TODO: Remove when no longer needed.
+  file { "/usr/local/bin/become":
+ensure => link,
+target => "/usr/bin/become"
+  }
+
   # TODO: cron setup
 }
 
diff --git a/modules/toollabs/manifests/webserver.pp 
b/modules/toollabs/manifests/webserver.pp
index e700a27..6ff3ffa 100644
--- a/modules/toollabs/manifests/webserver.pp
+++ b/modules/toollabs/manifests/webserver.pp
@@ -25,12 +25,6 @@
 ensure => present
   }
 
-  package { [
-  'jobutils',
-  ]:
-ensure => latest
-  }
-
   file { "$store/submithost-$fqdn":
 ensure => file,
 owner => 'root',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28ff4ea1806f0f58e1738cf8194f44ea49085608
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] Make ValueDescription non-final - change (mediawiki...Ask)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Make ValueDescription non-final
..

Make ValueDescription non-final

Change-Id: Ie859b14b4452c985e9458648d33f13785a491e97
---
M src/Ask/Language/Description/ValueDescription.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/Ask/Language/Description/ValueDescription.php 
b/src/Ask/Language/Description/ValueDescription.php
index d44b27c..cfa7a23 100644
--- a/src/Ask/Language/Description/ValueDescription.php
+++ b/src/Ask/Language/Description/ValueDescription.php
@@ -40,7 +40,7 @@
  * @licence GNU GPL v2+
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  */
-final class ValueDescription extends Description implements \Ask\Immutable {
+class ValueDescription extends Description implements \Ask\Immutable {
 
// This list has values backwards compatible with SMW_CMP_.
const COMP_EQUAL = 1;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie859b14b4452c985e9458648d33f13785a491e97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Fix incorrect method names and improve @covers tags - change (mediawiki...Ask)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Fix incorrect method names and improve @covers tags
..

Fix incorrect method names and improve @covers tags

Change-Id: I075c60fa2fe3801966d9b4e3effe20e8176b25a2
---
M Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
M Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
2 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php 
b/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
index e6c7185..e603d53 100644
--- a/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
+++ b/Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php
@@ -7,6 +7,7 @@
 
 /**
  * @covers Ask\Deserializers\SelectionRequestDeserializer
+ * @covers Ask\Deserializers\Strategies\SelectionRequestDeserializationStrategy
  *
  * @file
  * @since 1.0
@@ -113,7 +114,7 @@
return $argLists;
}
 
-   public function testCannotDeserilaizeWithUnknownDescriptionType() {
+   public function testCannotDeserilaizeWithUnknownSelectionRequestType() {
$notASelectionRequest = array(
'objectType' => 'selectionRequest',
'selectionRequestType' => 'fooBar',
@@ -124,7 +125,7 @@
$this->newSelectionRequestDeserializer()->deserialize( 
$notASelectionRequest );
}
 
-   public function testCannotDeserilaizeWithoutDescriptionType() {
+   public function testCannotDeserilaizeWithoutSelectionRequestType() {
$notASortExpression = array(
'objectType' => 'selectionRequest',
'value' => array()
diff --git a/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php 
b/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
index d5bb8c6..84a5838 100644
--- a/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
+++ b/Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php
@@ -11,6 +11,7 @@
 
 /**
  * @covers Ask\Deserializers\SortExpressionDeserializer
+ * @covers Ask\Deserializers\Strategies\SortExpressionDeserializationStrategy
  *
  * @file
  * @since 1.0
@@ -117,7 +118,7 @@
return $argLists;
}
 
-   public function testCannotDeserilaizeWithUnknownDescriptionType() {
+   public function testCannotDeserilaizeWithUnknownSortExpressionType() {
$notASortExpression = array(
'objectType' => 'sortExpression',
'sortExpressionType' => 'fooBar',
@@ -128,7 +129,7 @@
$this->newSortExpressionDeserializer()->deserialize( 
$notASortExpression );
}
 
-   public function testCannotDeserilaizeWithoutDescriptionType() {
+   public function testCannotDeserilaizeWithoutSortExpressionType() {
$notASortExpression = array(
'objectType' => 'sortExpression',
'value' => array()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I075c60fa2fe3801966d9b4e3effe20e8176b25a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Added missing test case - change (mediawiki...Ask)

2013-08-01 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Added missing test case
..

Added missing test case

Change-Id: I25a0f2afbbfceae40071237a384def28ed5aae2e
---
M Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
1 file changed, 23 insertions(+), 0 deletions(-)


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

diff --git a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php 
b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
index b1f3dfd..d3e2246 100644
--- a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
+++ b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php
@@ -8,6 +8,7 @@
 
 /**
  * @covers Ask\Language\Option\PropertyValueSortExpression
+ * @covers Ask\Language\Option\SortExpression
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -80,4 +81,26 @@
return $instances;
}
 
+   /**
+* @dataProvider invalidSortDirectionProvider
+*/
+   public function testCannotConstructWithInvalidSortDirection( 
$invalidSortDirection ) {
+   $this->setExpectedException( 'InvalidArgumentException' );
+
+   new PropertyValueSortExpression(
+   new StringValue( 'foo' ),
+   $invalidSortDirection
+   );
+   }
+
+   public function invalidSortDirectionProvider() {
+   return array(
+   array( null ),
+   array( array() ),
+   array( true ),
+   array( 4.2 ),
+   array( 'foo' ),
+   );
+   }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25a0f2afbbfceae40071237a384def28ed5aae2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] rt: package[] -> Package[] - change (operations/puppet)

2013-08-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: rt: package[] -> Package[]
..


rt: package[] -> Package[]

Change-Id: I9e985b090eaeb9873fc826756da727f03053e135
---
M manifests/misc/rt-server-apache.pp
M manifests/misc/rt-server.pp
2 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/manifests/misc/rt-server-apache.pp 
b/manifests/misc/rt-server-apache.pp
index 9920545..be16a8a 100644
--- a/manifests/misc/rt-server-apache.pp
+++ b/manifests/misc/rt-server-apache.pp
@@ -27,19 +27,19 @@
 
   file {
 '/etc/request-tracker4/RT_SiteConfig.d/50-debconf':
-  require => package['request-tracker4'],
+  require => Package['request-tracker4'],
   content => template('rt/50-debconf.erb'),
   notify  => Exec['update-rt-siteconfig'];
 '/etc/request-tracker4/RT_SiteConfig.d/51-dbconfig-common':
-  require => package['request-tracker4'],
+  require => Package['request-tracker4'],
   content => template('rt/51-dbconfig-common.erb'),
   notify  => Exec['update-rt-siteconfig'];
 '/etc/request-tracker4/RT_SiteConfig.d/80-wikimedia':
-  require => package['request-tracker4'],
+  require => Package['request-tracker4'],
   source  => 'puppet:///files/rt/80-wikimedia',
   notify  => Exec['update-rt-siteconfig'];
 '/etc/request-tracker4/RT_SiteConfig.pm':
-  require => package['request-tracker4'],
+  require => Package['request-tracker4'],
   owner   => 'root',
   group   => 'www-data',
   mode=> '0440';
@@ -76,7 +76,7 @@
 '/etc/request-tracker4/RT_SiteConfig.d/50-debconf',
 
'/etc/request-tracker4/RT_SiteConfig.d/51-dbconfig-common',
 '/etc/request-tracker4/RT_SiteConfig.d/80-wikimedia' ],
-require => package[ 'request-tracker4', 'rt4-db-mysql', 'rt4-clients' 
],
+require => Package[ 'request-tracker4', 'rt4-db-mysql', 'rt4-clients' 
],
 refreshonly => true,
 notify  => Service[apache2];
   }
diff --git a/manifests/misc/rt-server.pp b/manifests/misc/rt-server.pp
index b3eb033..e3d37d5 100644
--- a/manifests/misc/rt-server.pp
+++ b/manifests/misc/rt-server.pp
@@ -52,7 +52,7 @@
 # If we're a new labs install, set up the RT database.
 exec { 'rt-db-initialize':
   command => "/bin/echo '' | /usr/sbin/rt-setup-database --action init 
--dba root --prompt-for-dba-password",
-  require => [ package[ 'request-tracker3.8', 'rt3.8-db-mysql', 
'rt3.8-clients', 'libcgi-fast-perl', 'lighttpd',
+  require => [ Package[ 'request-tracker3.8', 'rt3.8-db-mysql', 
'rt3.8-clients', 'libcgi-fast-perl', 'lighttpd',
 'libdbd-pg-perl' ] ],
   unless  => '/usr/bin/mysqlshow rtdb';
 }
@@ -62,13 +62,13 @@
 command => '/usr/sbin/update-rt-siteconfig-3.8',
 subscribe => file[ "/etc/request-tracker3.8/RT_SiteConfig.d/50-debconf",
"/etc/request-tracker3.8/RT_SiteConfig.d/80-wikimedia" 
],
-require => package[ 'request-tracker3.8', 'rt3.8-db-mysql', 
'rt3.8-clients', 'libcgi-fast-perl' ],
+require => Package[ 'request-tracker3.8', 'rt3.8-db-mysql', 
'rt3.8-clients', 'libcgi-fast-perl' ],
 refreshonly => true,
 notify  => Service[lighttpd];
   }
 
   lighttpd_config { '10-rt':
-require => [ package[ 'request-tracker3.8', 'rt3.8-db-mysql', 
'rt3.8-clients', 'libcgi-fast-perl', 'lighttpd' ],
+require => [ Package[ 'request-tracker3.8', 'rt3.8-db-mysql', 
'rt3.8-clients', 'libcgi-fast-perl', 'lighttpd' ],
   File[ '/etc/lighttpd/conf-available/10-rt.conf', '/var/run/fastcgi', 
'/etc/request-tracker3.8/RT_SiteConfig.d/50-debconf',
 '/etc/request-tracker3.8/RT_SiteConfig.d/80-wikimedia', 
'/etc/cron.d/mkdir-var-run-fastcgi', '/etc/request-tracker3.8/rt.conf' ] ],
 notify  => Service[lighttpd];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e985b090eaeb9873fc826756da727f03053e135
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Updating link in README.md - change (operations...kafka)

2013-08-01 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Updating link in README.md
..


Updating link in README.md

Change-Id: I64b4ecec87080ec7060b4945e52e9d3bf6b5b7cb
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/README.md b/README.md
index 362ef3a..1918bf2 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 This module is currently being maintained by The Wikimedia Foundation at
 
[operations/puppet/kafka](https://gerrit.wikimedia.org/r/gitweb?p=operations%2Fpuppet%2Fkafka.git;a=summary)
 and mirrored on [GitHub](https://github.com/wikimedia/operations-puppet-kafka).
-It was originally developed for 0.7.2 at 
https://github.com/wikimedia/puppet-kafka.
+It was originally developed for 0.7.2 at 
https://github.com/wikimedia/puppet-kafka-0.7.2.
 
 
 ## Requirements:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64b4ecec87080ec7060b4945e52e9d3bf6b5b7cb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/kafka
Gerrit-Branch: master
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] Updating link in README.md - change (operations...kafka)

2013-08-01 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Updating link in README.md
..

Updating link in README.md

Change-Id: I64b4ecec87080ec7060b4945e52e9d3bf6b5b7cb
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/kafka 
refs/changes/30/77230/1

diff --git a/README.md b/README.md
index 362ef3a..1918bf2 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 This module is currently being maintained by The Wikimedia Foundation at
 
[operations/puppet/kafka](https://gerrit.wikimedia.org/r/gitweb?p=operations%2Fpuppet%2Fkafka.git;a=summary)
 and mirrored on [GitHub](https://github.com/wikimedia/operations-puppet-kafka).
-It was originally developed for 0.7.2 at 
https://github.com/wikimedia/puppet-kafka.
+It was originally developed for 0.7.2 at 
https://github.com/wikimedia/puppet-kafka-0.7.2.
 
 
 ## Requirements:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64b4ecec87080ec7060b4945e52e9d3bf6b5b7cb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/kafka
Gerrit-Branch: master
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] Permit specifying a name for default actions - change (mediawiki...GuidedTour)

2013-08-01 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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


Change subject: Permit specifying a name for default actions
..

Permit specifying a name for default actions

Previously if a tour writer supplied a name along with a button action
of 'next' or 'okay', it was ignored.  Now,
buttons: [ {
action: 'next',
name: 'A different name here'
} ]
works.

Bug: 45049
Change-Id: I8667dab37eae322a07cd1997f8e2fd4d8869a532
---
M modules/ext.guidedTour.lib.js
1 file changed, 9 insertions(+), 4 deletions(-)


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

diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js
index a3eb529..513817e 100644
--- a/modules/ext.guidedTour.lib.js
+++ b/modules/ext.guidedTour.lib.js
@@ -380,13 +380,18 @@
 * @param {string} buttonType type, currently 'next' or 'okay'
 * @param {Function} callback Function to call if they click the button
 * @param {HTMLElement} callback.btn Raw DOM element of the okay button
+* @param {string} [buttonName] optional button text to override 
default.
 *
 * @return {Object} Guiders button specification
 */
-   function getMessageButton( buttonType, callback ) {
+   function getMessageButton( buttonType, callback, buttonName ) {
var buttonKey = 'guidedtour-' + buttonType + '-button';
+
+   if ( buttonName === undefined ) {
+   buttonName = getMessage( buttonKey );
+   }
return {
-   name: getMessage ( buttonKey ),
+   name: buttonName,
onclick: function () {
callback( this );
},
@@ -467,13 +472,13 @@
if ( currentButton.action !== undefined ) {
switch ( currentButton.action ) {
case 'next':
-   nextButton = getMessageButton( 
'next', next );
+   nextButton = getMessageButton( 
'next', next, currentButton.name );
break;
case 'okay':
if ( currentButton.onclick === 
undefined ) {
throw new 
gt.TourDefinitionError( 'You must pass an \'onclick\' function if you use an 
\'okay\' action.' );
}
-   okayButton = getMessageButton( 
'okay', currentButton.onclick );
+   okayButton = getMessageButton( 
'okay', currentButton.onclick, currentButton.name );
break;
case 'end':
okayButton = getMessageButton( 
'okay', endTour );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8667dab37eae322a07cd1997f8e2fd4d8869a532
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
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] adding ssl1007-9 to node - change (operations/puppet)

2013-08-01 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: adding ssl1007-9 to node
..


adding ssl1007-9 to node

Change-Id: I3ac02dcda150387b0258fb2cfd6ff32641619a0a
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 7180722..d20aa0f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2489,7 +2489,7 @@
 interface::add_ip6_mapped { "main": interface => "eth0" }
 }
 
-node /ssl100[1-6]\.wikimedia\.org/ {
+node /ssl100[1-9]\.wikimedia\.org/ {
 if $hostname =~ /^ssl100[12]$/ {
 $ganglia_aggregator = true
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ac02dcda150387b0258fb2cfd6ff32641619a0a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson 
Gerrit-Reviewer: Cmjohnson 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Lcarr 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bump GuidedTour for E3 deployment - change (mediawiki/core)

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

Change subject: Bump GuidedTour for E3 deployment
..


Bump GuidedTour for E3 deployment

As of this version of GuidedTour, the guiders submodule is not used.

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

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



diff --git a/extensions/GuidedTour b/extensions/GuidedTour
index 0107941..4b1d273 16
--- a/extensions/GuidedTour
+++ b/extensions/GuidedTour
-Subproject commit 01079415958e41663eb7f582c23e6c27053d3523
+Subproject commit 4b1d273776dcae5be9a6af236a131f1a508d82f5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4d1d4d8ed7ac0bdb8327c1d7226eb59c3abb0c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf12
Gerrit-Owner: Mattflaschen 
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] adding ssl1007-9 to node - change (operations/puppet)

2013-08-01 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

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


Change subject: adding ssl1007-9 to node
..

adding ssl1007-9 to node

Change-Id: I3ac02dcda150387b0258fb2cfd6ff32641619a0a
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/77228/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 4ce80e6..2982409 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2489,7 +2489,7 @@
 interface::add_ip6_mapped { "main": interface => "eth0" }
 }
 
-node /ssl100[1-6]\.wikimedia\.org/ {
+node /ssl100[1-9]\.wikimedia\.org/ {
 if $hostname =~ /^ssl100[12]$/ {
 $ganglia_aggregator = true
 }

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

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

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


[MediaWiki-commits] [Gerrit] start puppetizing new OTRS host iodine - change (operations/puppet)

2013-08-01 Thread Jgreen (Code Review)
Jgreen has uploaded a new change for review.

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


Change subject: start puppetizing new OTRS host iodine
..

start puppetizing new OTRS host iodine

Change-Id: I7106f9da5b075b64e2b1c47f67e41c55156324de
---
M manifests/site.pp
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/77227/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 7180722..1ddb1bb 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2913,6 +2913,14 @@
 install_certificate{ "star.wikimedia.org": }
 }
 
+node "iodine.wikimedia.org" {
+include base,
+ganglia,
+ntp::client
+
+install_certificate{ "star.wikimedia.org": }
+}
+
 node /(cerium|titanium)\.wikimedia\.org/ {
 include standard
 }

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

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

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


[MediaWiki-commits] [Gerrit] Replicating operations/puppet/kafka to github wikimedia/pupp... - change (operations/puppet)

2013-08-01 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Replicating operations/puppet/kafka to github 
wikimedia/puppet-kafka
..


Replicating operations/puppet/kafka to github wikimedia/puppet-kafka

Change-Id: Ia6e7f4070f0c5321d649ed1bd63d848617087e33
---
M manifests/role/gerrit.pp
1 file changed, 18 insertions(+), 7 deletions(-)

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



diff --git a/manifests/role/gerrit.pp b/manifests/role/gerrit.pp
index 25e77c7..7ff973c 100644
--- a/manifests/role/gerrit.pp
+++ b/manifests/role/gerrit.pp
@@ -25,21 +25,22 @@
ssh_key  => 
'B3NzaC1yc2EBIwAAAQEAxOlshfr3UaPr8gQ8UVskxHAGG9xb55xDyfqlK7vsAs/p+OXpRB4KZOxHWqI40FpHhW+rFVA0Ugk7vBK13oKCB435TJlHYTJR62qQNb2DVxi5rtvZ7DPnRRlAvdGpRft9JsoWdgsXNqRkkStbkA5cqotvVHDYAgzBnHxWPM8REokQVqil6S/yHkIGtXO5J7F6I1OvYCnG1d1GLT5nDt+ZeyacLpZAhrBlyFD6pCwDUhg4+H4O3HGwtoh5418U4cvzRgYOQQXsU2WW5nBQHE9LXVLoL6UeMYY4yMtaNw207zN6kXcMFKyTuF5qlF5whC7cmM4elhAO2snwIw4C3EyQgw==',
ssl_cert => 'gerrit.wikimedia.org',
ssl_cert_key => 'gerrit.wikimedia.org',
+   smtp_host=> 'smtp.pmtpa.wmnet',
replication  => {
# If adding a new entry, remember to add the 
fingerprint to gerrit2's known_hosts
-   'inside-wmf' => {
+   'inside-wmf'  => {
'url'  => 
'gerritsl...@gallium.wikimedia.org:/var/lib/git/${name}.git',
'threads'  => '4',
'mirror'   => 'true',
},
-   'gitblit'=> {
+   'gitblit' => {
'url'   => 
'gerritsl...@antimony.wikimedia.org:/var/lib/git/${name}.git',
'threads'   => '4',
'authGroup' => 
'mediawiki-replication',
'push'  => 
'+refs/*:refs/*',
'mirror'=> 'true',
},
-   'github' => {
+   'github'  => {
'url'  => 
'g...@github.com:wikimedia/${name}',
'threads'  => '4',
'authGroup'=> 
'mediawiki-replication',
@@ -48,7 +49,7 @@
'remoteNameStyle'  => 'dash',
'mirror'   => 'true',
},
-   'github-puppet-cdh4' => {
+   'github-puppet-cdh4'  => {
'url'  => 
'g...@github.com:wikimedia/puppet-cdh4',
'threads'  => '1',
'authGroup'=> 
'mediawiki-replication',
@@ -58,7 +59,7 @@
'mirror'   => 'true',
'projects' => 
'operations/puppet/cdh4',
},
-   'github-puppet-jmxtrans' => {
+   'github-puppet-jmxtrans'  => {
'url'  => 
'g...@github.com:wikimedia/puppet-jmxtrans',
'threads'  => '1',
'authGroup'=> 
'mediawiki-replication',
@@ -78,7 +79,7 @@
'mirror'   => 'true',
'projects' => 
'operations/puppet/zookeeper',
},
-   'github-kraken' => {
+   'github-kraken'   => {
'url'  => 
'g...@github.com:wikimedia/kraken',
'threads'  => '1',
'authGroup'=> 
'mediawiki-replication',
@@ -88,8 +89,18 @@
'mirror'   => 'true',
'projects' => 
'analytics/kraken',
},
+
+   'github-puppet-kafka' => {
+   

[MediaWiki-commits] [Gerrit] cleaned code, moved breadcrumbs out of contentSub, minor bug... - change (mediawiki...BreadCrumbs2)

2013-08-01 Thread tosfos (Code Review)
tosfos has submitted this change and it was merged.

Change subject: cleaned code, moved breadcrumbs out of contentSub, minor 
bugfixes
..


cleaned code, moved breadcrumbs out of contentSub, minor bugfixes

Change-Id: I3e32ceaacfc7c33a1e235f6c03fb172f5636e9de
---
A BreadCrumbs2.css
M BreadCrumbs2.php
2 files changed, 91 insertions(+), 45 deletions(-)

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



diff --git a/BreadCrumbs2.css b/BreadCrumbs2.css
new file mode 100644
index 000..82cc83c
--- /dev/null
+++ b/BreadCrumbs2.css
@@ -0,0 +1,8 @@
+/* breadcrumbs used to be shown in #contentSub, so add the styling for that 
from vector skin */
+#breadcrumbs2 {
+  color: #7D7D7D;
+  font-size: 84%;
+  line-height: 1.2em;
+  margin: 0 0 1.4em 1em;
+  width: auto;
+}
diff --git a/BreadCrumbs2.php b/BreadCrumbs2.php
index 52ad5f6..e561299 100644
--- a/BreadCrumbs2.php
+++ b/BreadCrumbs2.php
@@ -18,8 +18,8 @@
 ***/
 
 # Change these constants to customize your installation
-define ("DELIM", '@'); // 
Delimiter/marker for parameters and keywords
-define ("CRUMBPAGE", 'MediaWiki:Breadcrumbs'); // Default is 
'MediaWiki:Breadcrumbs'
+define ("DELIM", '@');  // 
Delimiter/marker for parameters and keywords
+define ("CRUMBPAGE", 'MediaWiki:Breadcrumbs');  // Default is 
'MediaWiki:Breadcrumbs'
 
 # Standard sanity check
 if ( !defined( 'MEDIAWIKI' ) ) {
@@ -36,43 +36,62 @@
'description' => 'Implements a Breadcrumb navigation based on 
categories'
 );
 
+$wgResourceModules['ext.breadcrumbs2'] = array(
+   'styles' => 'BreadCrumbs2.css',
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'BreadCrumbs2',
+);
+
 # Hook function modifies skin output after it has been generated
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'buildBreadcrumbs';
+$wgHooks['BeforePageDisplay'][] = 'addBreadCrumbs2Modules';
+
+function addBreadCrumbs2Modules( OutputPage &$out, Skin &$skin ) {
+   $out->addModules( 'ext.breadcrumbs2' );
+
+   return true;
+}
 
 # This is the main function. Identify the categories for the current page,
 # then locate the first match in the navigation list.
 function buildBreadcrumbs( $skin, $template ) {
+   # Only show breadcrumbs when viewing the page, not editing, etc.
+   # The following line should perhaps utilize Action::getActionName( 
$skin->getContext() );
+   if ( $skin->getRequest()->getVal( 'action', 'view') != 'view' ) {
+   return true;
+   }
 
# Get the list of categories for the current page
-   preg_match_all( '`title="Category:(.*?)"`', $skin->getCategories(), 
$matches, PREG_PATTERN_ORDER );
-   $categories = $matches[1];
+   $categories = $skin->getOutput()->getCategories();
+
+   $title = $skin->getRelevantTitle();
 
# Treat the namespace as a category too
-   if ( $skin->getTitle()->getNsText() )
-   $categories[] = $skin->getTitle()->getNsText();
+   if ( $title->getNsText() ) {
+   $categories[] = $title->getNsText();
+   }
 
-   # Load and parse the breadcrumb template. If it's a redirected page, 
extract redirect info
$crumbs = matchFirstCategory( CRUMBPAGE, $categories );
-   $breadcrumb = trim( $crumbs[0] . ' ' . $skin->getTitle()->getText() );
-   if ( preg_match('/\(Redirected.*?\)/', $template->data['subtitle'], 
$match) )
-   $breadcrumb .= ' ' . $match[0];
-   # Set the page subtitle to the breadcrumb contents
-   $template->set( 'subtitle', $breadcrumb  );
+
+   # add current title
+   $breadcrumb = trim( $crumbs[0] . ' ' . $title->getText() );
+   $breadcrumbHTML =  Xml::openElement( 'div', array ( 'id' => 
'breadcrumbs2' ) ) . $breadcrumb . Xml::closeElement( 'div' );
+   $skin->getOutput()->prependHTML( $breadcrumbHTML );
 
# If the current page is a category page, add it to the list
# We didn't add it before because we don't want Category > Category'
-   $pagecat = strstr( $skin->getTitle()->getPrefixedText(), 'Category:' );
+   $pagecat = strstr( $title->getPrefixedText(), 'Category:' );
if ( $pagecat !== FALSE )
$categories[] = substr( $pagecat, strlen('Category:') );
# If it's not a category page, try for an exact match of the title 
(e.g. 'Main')
else
-   $categories[] = $skin->getTitle()->getText();
+   $categories[] = $title->getText();
 
# Mark the corresponding tab of the sidebar as active
$crumbs = matchFirstCategory( CRUMBPAGE, $categories );
if ( !empty($crumbs[1]) ) {
# See if there's a corresponding link in the sidebar and mark 
it as active.
-   # This is especially useful for skins that display the sidebar 
as a tab bar. 
+   # This is especially use

[MediaWiki-commits] [Gerrit] Bump GuidedTour for E3 deployment - change (mediawiki/core)

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

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


Change subject: Bump GuidedTour for E3 deployment
..

Bump GuidedTour for E3 deployment

As of this version of GuidedTour, the guiders submodule is not used.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/77226/1

diff --git a/extensions/GuidedTour b/extensions/GuidedTour
index 0107941..4b1d273 16
--- a/extensions/GuidedTour
+++ b/extensions/GuidedTour
-Subproject commit 01079415958e41663eb7f582c23e6c27053d3523
+Subproject commit 4b1d273776dcae5be9a6af236a131f1a508d82f5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4d1d4d8ed7ac0bdb8327c1d7226eb59c3abb0c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf12
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Remove dead code - change (mediawiki...Diff)

2013-08-01 Thread Daniel Werner (Code Review)
Daniel Werner has submitted this change and it was merged.

Change subject: Remove dead code
..


Remove dead code

Change-Id: I75224fb2ca3cf123d4f88aa1c211108f15dfcbf7
---
M src/differ/ListDiffer.php
1 file changed, 1 insertion(+), 23 deletions(-)

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



diff --git a/src/differ/ListDiffer.php b/src/differ/ListDiffer.php
index 6f466bd..757d130 100644
--- a/src/differ/ListDiffer.php
+++ b/src/differ/ListDiffer.php
@@ -6,10 +6,9 @@
 
 /**
  * Differ that only looks at the values of the arrays (and thus ignores key 
differences).
+ *
  * Values are compared using the strictDiff method in strict mode (default)
  * or using array_diff_assoc in native mode.
- *
- * TODO: use a ArrayComparer as strategy rather then the current flags and 
callback
  *
  * @since 0.4
  *
@@ -45,13 +44,6 @@
protected $diffMode;
 
/**
-* @since 0.5
-*
-* @var callable|null
-*/
-   protected $comparisonCallback = null;
-
-   /**
 * Constructor.
 *
 * Takes an argument that determines the diff mode.
@@ -66,20 +58,6 @@
 */
public function __construct( $diffMode = self::MODE_STRICT ) {
$this->diffMode = $diffMode;
-   }
-
-   /**
-* Sets a callback to use for comparison. The callback should accept two
-* arguments.
-*
-* FIXME: this field is not used!
-*
-* @since 0.5
-*
-* @param callable $comparisonCallback
-*/
-   public function setComparisonCallback( $comparisonCallback ) {
-   $this->comparisonCallback = $comparisonCallback;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75224fb2ca3cf123d4f88aa1c211108f15dfcbf7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Daniel Werner 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Replicating operations/puppet/kafka to github wikimedia/pupp... - change (operations/puppet)

2013-08-01 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Replicating operations/puppet/kafka to github 
wikimedia/puppet-kafka
..

Replicating operations/puppet/kafka to github wikimedia/puppet-kafka

Change-Id: Ia6e7f4070f0c5321d649ed1bd63d848617087e33
---
M manifests/role/gerrit.pp
1 file changed, 18 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/77225/1

diff --git a/manifests/role/gerrit.pp b/manifests/role/gerrit.pp
index 25e77c7..7ff973c 100644
--- a/manifests/role/gerrit.pp
+++ b/manifests/role/gerrit.pp
@@ -25,21 +25,22 @@
ssh_key  => 
'B3NzaC1yc2EBIwAAAQEAxOlshfr3UaPr8gQ8UVskxHAGG9xb55xDyfqlK7vsAs/p+OXpRB4KZOxHWqI40FpHhW+rFVA0Ugk7vBK13oKCB435TJlHYTJR62qQNb2DVxi5rtvZ7DPnRRlAvdGpRft9JsoWdgsXNqRkkStbkA5cqotvVHDYAgzBnHxWPM8REokQVqil6S/yHkIGtXO5J7F6I1OvYCnG1d1GLT5nDt+ZeyacLpZAhrBlyFD6pCwDUhg4+H4O3HGwtoh5418U4cvzRgYOQQXsU2WW5nBQHE9LXVLoL6UeMYY4yMtaNw207zN6kXcMFKyTuF5qlF5whC7cmM4elhAO2snwIw4C3EyQgw==',
ssl_cert => 'gerrit.wikimedia.org',
ssl_cert_key => 'gerrit.wikimedia.org',
+   smtp_host=> 'smtp.pmtpa.wmnet',
replication  => {
# If adding a new entry, remember to add the 
fingerprint to gerrit2's known_hosts
-   'inside-wmf' => {
+   'inside-wmf'  => {
'url'  => 
'gerritsl...@gallium.wikimedia.org:/var/lib/git/${name}.git',
'threads'  => '4',
'mirror'   => 'true',
},
-   'gitblit'=> {
+   'gitblit' => {
'url'   => 
'gerritsl...@antimony.wikimedia.org:/var/lib/git/${name}.git',
'threads'   => '4',
'authGroup' => 
'mediawiki-replication',
'push'  => 
'+refs/*:refs/*',
'mirror'=> 'true',
},
-   'github' => {
+   'github'  => {
'url'  => 
'g...@github.com:wikimedia/${name}',
'threads'  => '4',
'authGroup'=> 
'mediawiki-replication',
@@ -48,7 +49,7 @@
'remoteNameStyle'  => 'dash',
'mirror'   => 'true',
},
-   'github-puppet-cdh4' => {
+   'github-puppet-cdh4'  => {
'url'  => 
'g...@github.com:wikimedia/puppet-cdh4',
'threads'  => '1',
'authGroup'=> 
'mediawiki-replication',
@@ -58,7 +59,7 @@
'mirror'   => 'true',
'projects' => 
'operations/puppet/cdh4',
},
-   'github-puppet-jmxtrans' => {
+   'github-puppet-jmxtrans'  => {
'url'  => 
'g...@github.com:wikimedia/puppet-jmxtrans',
'threads'  => '1',
'authGroup'=> 
'mediawiki-replication',
@@ -78,7 +79,7 @@
'mirror'   => 'true',
'projects' => 
'operations/puppet/zookeeper',
},
-   'github-kraken' => {
+   'github-kraken'   => {
'url'  => 
'g...@github.com:wikimedia/kraken',
'threads'  => '1',
'authGroup'=> 
'mediawiki-replication',
@@ -88,8 +89,18 @@
'mirror'   => 'true',
'projects' => 
'analytics/kraken',
},
+
+   'github-

[MediaWiki-commits] [Gerrit] fixing lvs1001's public-c-eqiad vlan ip - change (operations/puppet)

2013-08-01 Thread Lcarr (Code Review)
Lcarr has submitted this change and it was merged.

Change subject: fixing lvs1001's public-c-eqiad vlan ip
..


fixing lvs1001's public-c-eqiad vlan ip

Change-Id: Id693825219793b8d86b8e59c3f2c2291e2c48b56
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 4ce80e6..7180722 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1540,7 +1540,7 @@
 'lvs1003' => "208.80.154.142",
 },
 'public1-c-eqiad' => {
-'lvs1001' => "208.80.154.67",
+'lvs1001' => "208.80.154.78",
 'lvs1002' => "208.80.154.68",
 'lvs1003' => "208.80.154.69",
 'lvs1004' => "208.80.154.70",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id693825219793b8d86b8e59c3f2c2291e2c48b56
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr 
Gerrit-Reviewer: Lcarr 

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


[MediaWiki-commits] [Gerrit] fixing lvs1001's public-c-eqiad vlan ip - change (operations/puppet)

2013-08-01 Thread Lcarr (Code Review)
Lcarr has uploaded a new change for review.

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


Change subject: fixing lvs1001's public-c-eqiad vlan ip
..

fixing lvs1001's public-c-eqiad vlan ip

Change-Id: Id693825219793b8d86b8e59c3f2c2291e2c48b56
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/77224/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 4ce80e6..7180722 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1540,7 +1540,7 @@
 'lvs1003' => "208.80.154.142",
 },
 'public1-c-eqiad' => {
-'lvs1001' => "208.80.154.67",
+'lvs1001' => "208.80.154.78",
 'lvs1002' => "208.80.154.68",
 'lvs1003' => "208.80.154.69",
 'lvs1004' => "208.80.154.70",

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

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

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


[MediaWiki-commits] [Gerrit] cleaned code, moved breadcrumbs out of contentSub, minor bug... - change (mediawiki...BreadCrumbs2)

2013-08-01 Thread tosfos (Code Review)
tosfos has uploaded a new change for review.

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


Change subject: cleaned code, moved breadcrumbs out of contentSub, minor 
bugfixes
..

cleaned code, moved breadcrumbs out of contentSub, minor bugfixes

Change-Id: I3e32ceaacfc7c33a1e235f6c03fb172f5636e9de
---
A BreadCrumbs2.css
M BreadCrumbs2.php
2 files changed, 91 insertions(+), 45 deletions(-)


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

diff --git a/BreadCrumbs2.css b/BreadCrumbs2.css
new file mode 100644
index 000..82cc83c
--- /dev/null
+++ b/BreadCrumbs2.css
@@ -0,0 +1,8 @@
+/* breadcrumbs used to be shown in #contentSub, so add the styling for that 
from vector skin */
+#breadcrumbs2 {
+  color: #7D7D7D;
+  font-size: 84%;
+  line-height: 1.2em;
+  margin: 0 0 1.4em 1em;
+  width: auto;
+}
diff --git a/BreadCrumbs2.php b/BreadCrumbs2.php
index 52ad5f6..e561299 100644
--- a/BreadCrumbs2.php
+++ b/BreadCrumbs2.php
@@ -18,8 +18,8 @@
 ***/
 
 # Change these constants to customize your installation
-define ("DELIM", '@'); // 
Delimiter/marker for parameters and keywords
-define ("CRUMBPAGE", 'MediaWiki:Breadcrumbs'); // Default is 
'MediaWiki:Breadcrumbs'
+define ("DELIM", '@');  // 
Delimiter/marker for parameters and keywords
+define ("CRUMBPAGE", 'MediaWiki:Breadcrumbs');  // Default is 
'MediaWiki:Breadcrumbs'
 
 # Standard sanity check
 if ( !defined( 'MEDIAWIKI' ) ) {
@@ -36,43 +36,62 @@
'description' => 'Implements a Breadcrumb navigation based on 
categories'
 );
 
+$wgResourceModules['ext.breadcrumbs2'] = array(
+   'styles' => 'BreadCrumbs2.css',
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'BreadCrumbs2',
+);
+
 # Hook function modifies skin output after it has been generated
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'buildBreadcrumbs';
+$wgHooks['BeforePageDisplay'][] = 'addBreadCrumbs2Modules';
+
+function addBreadCrumbs2Modules( OutputPage &$out, Skin &$skin ) {
+   $out->addModules( 'ext.breadcrumbs2' );
+
+   return true;
+}
 
 # This is the main function. Identify the categories for the current page,
 # then locate the first match in the navigation list.
 function buildBreadcrumbs( $skin, $template ) {
+   # Only show breadcrumbs when viewing the page, not editing, etc.
+   # The following line should perhaps utilize Action::getActionName( 
$skin->getContext() );
+   if ( $skin->getRequest()->getVal( 'action', 'view') != 'view' ) {
+   return true;
+   }
 
# Get the list of categories for the current page
-   preg_match_all( '`title="Category:(.*?)"`', $skin->getCategories(), 
$matches, PREG_PATTERN_ORDER );
-   $categories = $matches[1];
+   $categories = $skin->getOutput()->getCategories();
+
+   $title = $skin->getRelevantTitle();
 
# Treat the namespace as a category too
-   if ( $skin->getTitle()->getNsText() )
-   $categories[] = $skin->getTitle()->getNsText();
+   if ( $title->getNsText() ) {
+   $categories[] = $title->getNsText();
+   }
 
-   # Load and parse the breadcrumb template. If it's a redirected page, 
extract redirect info
$crumbs = matchFirstCategory( CRUMBPAGE, $categories );
-   $breadcrumb = trim( $crumbs[0] . ' ' . $skin->getTitle()->getText() );
-   if ( preg_match('/\(Redirected.*?\)/', $template->data['subtitle'], 
$match) )
-   $breadcrumb .= ' ' . $match[0];
-   # Set the page subtitle to the breadcrumb contents
-   $template->set( 'subtitle', $breadcrumb  );
+
+   # add current title
+   $breadcrumb = trim( $crumbs[0] . ' ' . $title->getText() );
+   $breadcrumbHTML =  Xml::openElement( 'div', array ( 'id' => 
'breadcrumbs2' ) ) . $breadcrumb . Xml::closeElement( 'div' );
+   $skin->getOutput()->prependHTML( $breadcrumbHTML );
 
# If the current page is a category page, add it to the list
# We didn't add it before because we don't want Category > Category'
-   $pagecat = strstr( $skin->getTitle()->getPrefixedText(), 'Category:' );
+   $pagecat = strstr( $title->getPrefixedText(), 'Category:' );
if ( $pagecat !== FALSE )
$categories[] = substr( $pagecat, strlen('Category:') );
# If it's not a category page, try for an exact match of the title 
(e.g. 'Main')
else
-   $categories[] = $skin->getTitle()->getText();
+   $categories[] = $title->getText();
 
# Mark the corresponding tab of the sidebar as active
$crumbs = matchFirstCategory( CRUMBPAGE, $categories );
if ( !empty($crumbs[1]) ) {
# See if there's a corresponding link in the sidebar and mark 
it as active.
-   # This is especially useful for skins that

[MediaWiki-commits] [Gerrit] WIP VE Headings test - change (qa/browsertests)

2013-08-01 Thread Rachel99 (Code Review)
Rachel99 has uploaded a new change for review.

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


Change subject: WIP VE Headings test
..

WIP VE Headings test

Change-Id: I1a7f134e19a374c77342ab82d277ed700b975a42
---
A features/step_definitions/visual_editor_headings_steps.rb
M features/support/pages/visual_editor_page.rb
A features/visual_editor_headings.feature
3 files changed, 68 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/20/77220/1

diff --git a/features/step_definitions/visual_editor_headings_steps.rb 
b/features/step_definitions/visual_editor_headings_steps.rb
new file mode 100644
index 000..0d5978f
--- /dev/null
+++ b/features/step_definitions/visual_editor_headings_steps.rb
@@ -0,0 +1,19 @@
+When(/^I click the Headings pull\-down menu$/) do
+   on(VisualEditorPage).ve_heading_menu_element.when_present.click
+ end
+
+Given(/^I can see the Headings interface$/) do
+  on(VisualEditorPage).ve_heading_ui.should match Regexp.escape('Paragraph')
+end
+
+When(/^I click the down arrow$/) do
+  on(VisualEditorPage).downarrow_element.when_present.click
+end
+
+When(/^I click Paragraph$/) do
+  on(VisualEditorPage).paragraph_element.when_present.click
+end
+
+Then(/^a paragraph heading appears in the diff view$/) do
+  pending # express the regexp above with the code you wish you had
+end
diff --git a/features/support/pages/visual_editor_page.rb 
b/features/support/pages/visual_editor_page.rb
index 282f7c0..2a3d1d5 100644
--- a/features/support/pages/visual_editor_page.rb
+++ b/features/support/pages/visual_editor_page.rb
@@ -22,6 +22,7 @@
   span(:save_page, class: 've-ui-labeledElement-label', text: 'Save page')
   span(:second_save_page, class: 've-ui-labeledElement-label', text: 'Save 
page', index: 1)
   span(:ve_link_icon, class: 've-ui-buttonTool-icon ve-ui-icon-link')
+  div(:ve_heading_menu, class: 've-ui-dropdownTool-icon ve-ui-icon-down')
   span(:ve_references, class: 've-ui-buttonTool-icon ve-ui-icon-reference')
   div(:visual_editor_toolbar, class: 've-ui-toolbar-tools')
   span(:transclusion, class: 've-ui-buttonTool-icon ve-ui-icon-template')
@@ -32,12 +33,14 @@
 span(:apply_changes, text: 'Apply changes', frame: frame)
 text_field(:content_box, index: 0, frame: frame)
 span(:create_new, text:'Insert reference', frame: frame)
+div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down')
 div(:insert_reference, class: 've-ui-widget ve-ui-flaggableElement-primary 
ve-ui-buttonWidget ve-ui-window-applyButton', frame: frame)
 a(:leftarrowclose, class: 've-ui-widget ve-ui-iconButtonWidget 
ve-ui-icon-previous ve-ui-inspector-closeButton', frame: frame)
 span(:internal_linksuggestion, text: 'Main Page')
 span(:linksuggestion, text: 'http://www.example.com')
 span(:newpage_linksuggestion, text: 'DoesNotExist')
 text_field(:parameter_box, index: 0, frame: frame)
+span(:paragraph, text: 'Paragraph')
 div(:ref_body, class:'ve-ui-window-head', frame: frame)
 div(:ve_link_ui, class: 've-ui-window-head', frame: frame)
 span(:remove_parameter, text: 'Remove parameter', frame: frame)
@@ -46,5 +49,6 @@
 list_item(:template_list_item, text: 'S', frame: frame)
 div(:title, class: 've-ui-window-title', frame: frame)
 text_area(:transclusion_textarea, index: 0, frame: frame)
+span(:ve_heading_ui, text: 'Paragraph')
   end
 end
diff --git a/features/visual_editor_headings.feature 
b/features/visual_editor_headings.feature
new file mode 100644
index 000..f18ea9a
--- /dev/null
+++ b/features/visual_editor_headings.feature
@@ -0,0 +1,45 @@
+@ie6-bug  @ie7-bug  @ie8-bug  @ie9-bug @ie10-bug @test2.wikipedia.org @login
+Feature: VisualEditor Headings
+
+  Background:
+Given I am logged in
+  And I am at my user page
+When I click Edit for VisualEditor
+  And I click the Headings pull-down menu
+
+Scenario: Choose Paragraph Heading
+Given I can see the Headings interface
+When I edit the page with a string
+  And I click the down arrow
+  And I click Paragraph
+  And I click Save page
+  And I click Review your changes
+Then a paragraph heading appears in the diff view
+
+Scenario: Choose Sub-Heading 1
+Given I can see the Headings Inteface
+When I edit the page with a string
+  And I click the down arrow
+  And I click Sub-Heading 1
+  And I click Save page
+  And I click Review your changes
+Then a sub-heading 1 appears in the diff view
+
+
+  Scenario: Choose Sub-Heading 2
+  When I edit the page with a string
+And I click the down arrow
+And I click Paragraph
+And I click Save page
+And I click Review your changes
+  Then a sub-heading 2 appears in the diff view
+
+
+  Scenario: Choose Sub-Heading 3
+  When I edit the page with a string
+And I click the down arrow
+And I click Paragraph
+And I click Save pag

[MediaWiki-commits] [Gerrit] doc: Clarify documentation for ParserOptions::getUserLangObj - change (mediawiki/core)

2013-08-01 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: doc: Clarify documentation for ParserOptions::getUserLangObj
..

doc: Clarify documentation for ParserOptions::getUserLangObj

It no longer produces inconsistent link tables, that was fixed
in r89706 by setting the parser to the default language when
saving, and then when viewing it might reparse for a different
uselang if needed (without saving link updates).

Of course, that isn't pretty and it should still be discouraged.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/77219/1

diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index b01f162..bde508a 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -280,9 +280,17 @@
}
 
/**
+* Get the user language used by the parser for this page.
+*
 * You shouldn't use this. Really. $parser->getFunctionLang() is all 
you need.
-* Using this fragments the cache and is discouraged. Yes, {{int: }} 
uses this,
-* producing inconsistent tables (Bug 14404).
+*
+* To avoid side-effects where the page will be rendered based on the 
language
+* of the user who last saved, this function will triger a cache 
fragmentation.
+* Usage of this method is discouraged for that reason.
+*
+* When saving, this will return the default language instead of the 
user's.
+*
+* {{int: }} uses this which used to produce inconsistent link tables 
(bug 14404).
 *
 * @return Language object
 * @since 1.19

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I599a7162fed458713ffa3a754086c6a2ffdebe07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] mexia to public ip - change (operations/puppet)

2013-08-01 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: mexia to public ip
..


mexia to public ip

Change-Id: I3cb0ccb862f822764079f12ff7487a8d4219b3b5
---
M files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 38ceeae..72877f7 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1926,7 +1926,7 @@
 
 host mexia {
hardware ethernet D4:AE:52:AD:62:75;
-   fixed-address mexia.pmtpa.wmnet;
+   fixed-address mexia.wikimedia.org;
 }
 
 host mw1 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cb0ccb862f822764079f12ff7487a8d4219b3b5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] mexia to public ip - change (operations/puppet)

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

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


Change subject: mexia to public ip
..

mexia to public ip

Change-Id: I3cb0ccb862f822764079f12ff7487a8d4219b3b5
---
M files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/77211/1

diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 38ceeae..72877f7 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1926,7 +1926,7 @@
 
 host mexia {
hardware ethernet D4:AE:52:AD:62:75;
-   fixed-address mexia.pmtpa.wmnet;
+   fixed-address mexia.wikimedia.org;
 }
 
 host mw1 {

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

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

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


[MediaWiki-commits] [Gerrit] Add month-only date format. - change (mediawiki/core)

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

Change subject: Add month-only date format.
..


Add month-only date format.

The BookManagerv2 extension needs support for dates that consist
of only a month and a year, and I think this is something that
would potentially be useful to other extensions as well.

Change-Id: I3672b0b0aee196890981302a41daeefb61130141
---
M languages/messages/MessagesEn.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 826c364..92f264c 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -161,21 +161,25 @@
 $dateFormats = array(
'mdy time' => 'H:i',
'mdy date' => 'F j, Y',
+   'mdy monthonly' => 'F Y',
'mdy both' => 'H:i, F j, Y',
'mdy pretty' => 'F j',
 
'dmy time' => 'H:i',
'dmy date' => 'j F Y',
+   'dmy monthonly' => 'F Y',
'dmy both' => 'H:i, j F Y',
'dmy pretty' => 'j F',
 
'ymd time' => 'H:i',
'ymd date' => 'Y F j',
+   'ymd monthonly' => 'Y F',
'ymd both' => 'H:i, Y F j',
'ymd pretty' => 'F j',
 
'ISO 8601 time' => 'xnH:xni:xns',
'ISO 8601 date' => 'xnY-xnm-xnd',
+   'ISO 8601 monthonly' => 'xnY-xnm',
'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
'ISO 8601 pretty' => 'xnm-xnd'
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3672b0b0aee196890981302a41daeefb61130141
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mollywhite 
Gerrit-Reviewer: Matmarex 
Gerrit-Reviewer: Mollywhite 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Skip redirects in forceSearchIndex run by id. - change (mediawiki...CirrusSearch)

2013-08-01 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Skip redirects in forceSearchIndex run by id.
..

Skip redirects in forceSearchIndex run by id.

Note that we don't skip redirects when run by timestamp because that is
assumed to be for an outage.
Note that we now properly skip doing anything when a page redirects to a
page that his been deleted.
Finally also note that if you happen to get a whole batch of redirects
all at once this doesn't cause the process to stop prematurely.  Yay.

Change-Id: I54ccb8b062ce97350e8a9f688510ea575526bd9d
---
M forceSearchIndex.php
1 file changed, 28 insertions(+), 7 deletions(-)


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

diff --git a/forceSearchIndex.php b/forceSearchIndex.php
index 198e05f..ba1dbe9 100644
--- a/forceSearchIndex.php
+++ b/forceSearchIndex.php
@@ -81,6 +81,9 @@
if ( $this->indexUpdates ) {
$revisions = $this->findUpdates( $minUpdate, 
$minId, $this->to );
$size = count( $revisions );
+   // Note that we'll strip invalid revisions 
after checking to the loop break condition
+   // because we don't want a batch the contains 
only invalid revisions to cause early
+   // termination of the process
} else {
$titles = $this->findDeletes( $minUpdate, 
$minNamespace, $minTitle, $this->to );
$size = count( $titles );
@@ -94,6 +97,12 @@
$minUpdate = $last[ 'update' ];
$minId = $last[ 'id' ];
 
+   // Strip entries without a revision.  We can't 
do anything with them.
+   $revisions = array_filter($revisions, function 
($rev) {
+   return $rev[ 'rev' ] !== null;
+   });
+   // Update size to reflect stripped entries.
+   $size = count( $revisions );
CirrusSearchUpdater::updateRevisions( 
$revisions );
} else {
$idsToDelete = array();
@@ -123,14 +132,16 @@
 * Find $this->mBatchSize revisions who are the latest for a page and 
were
 * made after (minUpdate,minId) and before maxUpdate.
 *
-* @return an array of the last update timestamp and id that were found
+* @return an array of the last update timestamp, id, revision, and 
text that was found.
+*Sometimes rev and text are null - those record should be used to 
determine new
+*inputs for this function but should not by synced to the search 
index.
 */
private function findUpdates( $minUpdate, $minId, $maxUpdate ) {
wfProfileIn( __METHOD__ );
$dbr = $this->getDB( DB_SLAVE );
$minId = $dbr->addQuotes( $minId );
$search = SearchEngine::create();
-   if ( is_null( $maxUpdate ) ) {
+   if ( $maxUpdate === null ) {
$toIdPart = '';
if ( !is_null( $this->toId ) ) {
$toId = $dbr->addQuotes( $this->toId );
@@ -144,8 +155,8 @@
. ' AND rev_text_id = old_id'
. ' AND rev_id = page_latest'
. ' AND page_is_redirect = 0',
-   // Note that redirects aren't allowed 
here because we'll index everything we need from them
-   // when we index the page to which they 
are redirecting.
+   // Note that we attempt to filter out 
redirects because everything about the redirect
+   // will be covered when we index the 
page to which it points.
__METHOD__,
array( 'ORDER BY' => 'page_id',
   'LIMIT' => $this->mBatchSize )
@@ -172,12 +183,22 @@
wfProfileIn( __METHOD__ . '::decodeResults' );
$rev = Revision::newFromRow( $row );
if ( $rev->getContent()->isRedirect() ) {
-   $target = 
$rev->getContent()->getUltimateRedirectTarget();
-   $rev = Revision::loadFromPageId( wfGetDB( 
DB_SLAVE ), $target->getArticleID() );
+   if ( $maxUpdate === null ) {
+   // Looks like we accidentally picked up 
a 

[MediaWiki-commits] [Gerrit] (bug 52325) validators for url schemes. - change (mediawiki...Wikibase)

2013-08-01 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: (bug 52325) validators for url schemes.
..

(bug 52325) validators for url schemes.

This allows separate validators to be used for different URL schemes
such as http or mailto.

Change-Id: I09230ce144a5df97ec845bb5b45d442f255a489a
---
M docs/options.wiki
M lib/WikibaseLib.classes.php
M lib/WikibaseLib.i18n.php
M lib/includes/Validators/RegexValidator.php
A lib/includes/Validators/UrlSchemeValidators.php
A lib/includes/Validators/UrlValidator.php
M lib/includes/WikibaseDataTypeBuilders.php
A lib/tests/phpunit/Validators/UrlSchemeValidatorsTest.php
A lib/tests/phpunit/Validators/UrlValidatorTest.php
M lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
M repo/config/Wikibase.default.php
M repo/includes/WikibaseRepo.php
12 files changed, 552 insertions(+), 29 deletions(-)


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

diff --git a/docs/options.wiki b/docs/options.wiki
index 48c7913..3761fd9 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -45,6 +45,7 @@
 === Basic Settings ===
 
 ;entityNamespaces: Defines which kind of entity is managed in which namespace; 
this is given as an associative array mapping content model IDs such as 
CONTENT_MODEL_WIKIBASE_ITEM to namespace IDs. This setting is 
required for each kind of entity that should be supported.
+;urlSchemes: Which URL schemes should be allowed in URL data values. The 
default is array( 'http', 'https' ). Schemes (protocols) added here will only 
have any effect if validation is supported for that protocol; that is, adding 
'mailto' will work, while adding 'gopher' will do nothing.
 
 === Expert Settings ===
 ;apiInDebug: Put Wikibase API into debug mode. Boolean, default is false. 
'''Deprecated'''.
diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index 3330036..5a6e887 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -164,6 +164,8 @@
'Wikibase\Validators\StringLengthValidator' => 
'includes/Validators/StringLengthValidator.php',
'Wikibase\Validators\TypeValidator' => 
'includes/Validators/TypeValidator.php',
'Wikibase\Validators\ValidatorErrorLocalizer' => 
'includes/Validators/ValidatorErrorLocalizer.php',
+   'Wikibase\Validators\UrlValidator' => 
'includes/Validators/UrlValidator.php',
+   'Wikibase\Validators\UrlSchemeValidators' => 
'includes/Validators/UrlSchemeValidators.php',
 
// tests
'Wikibase\Test\SpecialPageTestBase' => 
'tests/phpunit/specials/SpecialPageTestBase.php',
diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php
index c2466b8..f55944e 100644
--- a/lib/WikibaseLib.i18n.php
+++ b/lib/WikibaseLib.i18n.php
@@ -63,6 +63,10 @@
'wikibase-validator-no-such-property' => 'Property $1 not found',
'wikibase-validator-bad-value' => 'Illegal value: $1',
'wikibase-validator-bad-value-type' => 'Bad value type $1, expected $2',
+   'wikibase-validator-bad-url' => 'Malformed URL: $1', //FIXME: make sure 
$1 is excaped!
+   'wikibase-validator-bad-url-scheme' => 'Unsupported URL scheme: $1',
+   'wikibase-validator-bad-http-url' => 'Malformed HTTP URL: $1',
+   'wikibase-validator-bad-mailto-url' => 'Malformed mailto URL: $1',
'datatypes-type-wikibase-item' => 'Item',
'datatypes-type-commonsMedia' => 'Commons media file',
'version-wikibase' => 'Wikibase',
@@ -197,6 +201,22 @@
 Parameters:
 * $1 is the actual value type
 * $2 is the expected value type',
+   'wikibase-validator-bad-url' => 'Input validation error shown when the 
value is an invalid URL.
+
+Parameters:
+* $1 is the malformed URL',
+   'wikibase-validator-bad-url-scheme' => 'Input validation error shown 
when the value is a URL using an unsupported protocol (scheme).
+
+Parameters:
+* $1 is the scheme name',
+   'wikibase-validator-bad-http-url' => 'Input validation error shown when 
the value is an HTTP or HTTPS URL.
+
+Parameters:
+* $1 is the malformed URL',
+   'wikibase-validator-bad-mailto-url'  => 'Input validation error shown 
when the value is an invalid "mailto" URL.
+
+Parameters:
+* $1 is the malformed URL',
'datatypes-type-wikibase-item' => 'The name of a data type for items in 
Wikibase.
 {{Identical|Item}}',
'datatypes-type-commonsMedia' => 'The name of a data type for media 
files on Wikimedia Commons (proper name, capitalised in English; first letter 
capitalised anyway in this message and relatives).',
diff --git a/lib/includes/Validators/RegexValidator.php 
b/lib/includes/Validators/RegexValidator.php
index efb1384..9def8d8 100644
--- a/lib/includes/Validators/RegexValidator.php
+++ b/lib/includes/Validators/RegexValidator.php
@@ -50,13 +50,20 @@
protected $inver

  1   2   3   >