[MediaWiki-commits] [Gerrit] Display a warning when translating to a non-priority language - change (mediawiki...Translate)

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

Change subject: Display a warning when translating to a non-priority language
..


Display a warning when translating to a non-priority language

Change-Id: I4b35e934a64b1405f1a6f90bac9eb1a0284ad258
---
M Translate.php
M resources/css/ext.translate.special.translate.css
M resources/js/ext.translate.special.translate.js
M specials/SpecialTranslate.php
4 files changed, 75 insertions(+), 8 deletions(-)

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



diff --git a/Translate.php b/Translate.php
index 6826781..eb548d2 100644
--- a/Translate.php
+++ b/Translate.php
@@ -456,6 +456,7 @@
'scripts' = 'resources/js/ext.translate.special.translate.js',
'position' = 'top',
'dependencies' = array(
+   'mediawiki.jqueryMsg',
'mediawiki.Uri',
'mediawiki.api.parse',
'ext.translate.base',
@@ -471,6 +472,8 @@
'translate-js-support-unsaved-warning',
'translate-documentation-language',
'translate-workflow-state-',
+   'tpt-discouraged-language-force',
+   'tpt-discouraged-language',
),
 ) + $resourcePaths;
 
diff --git a/resources/css/ext.translate.special.translate.css 
b/resources/css/ext.translate.special.translate.css
index e3de396..1c43581 100644
--- a/resources/css/ext.translate.special.translate.css
+++ b/resources/css/ext.translate.special.translate.css
@@ -108,20 +108,34 @@
top: 1px;
 }
 
-.tux-editor-header .description {
-   font-size: 14px;
+.tux-editor-header {
color: #252525;
+   font-size: 14px;
+   padding-bottom: 20px;
+}
+
+.tux-editor-header .description {
+   margin: 5px 0;
+}
+
+.tux-editor-header .group-warning {
+   background: #FFF5AA;
+   padding: 5px;
+   margin: 5px 0;
+}
+
+.tux-editor-header .group-warning:empty {
+   display: none;
 }
 
 .tux-workflow-status {
-   font-size: 14px;
background: #eee;
border: 1px solid #ddd;
color: #252525;
cursor: pointer;
display: inline-block;
padding: 2px 4px;
-   margin: 0 5px;
+   margin: 5px 0;
 }
 
 .tux-workflow-status:hover {
@@ -175,7 +189,7 @@
 }
 
 .tux-messagetable-header {
-   padding-top: 25px;
+   padding-top: 5px;
border-bottom: 1px solid #777;
/* @noflip */
-webkit-box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.5);
diff --git a/resources/js/ext.translate.special.translate.js 
b/resources/js/ext.translate.special.translate.js
index 1d20974..994597a 100644
--- a/resources/js/ext.translate.special.translate.js
+++ b/resources/js/ext.translate.special.translate.js
@@ -81,6 +81,7 @@
mw.translate.loadMessages( changes );
mw.translate.changeUrl( changes );
mw.translate.prepareWorkflowSelector( group );
+   updateGroupWarning();
},
 
changeLanguage: function ( language ) {
@@ -94,6 +95,7 @@
mw.translate.changeUrl( changes );
$( '.tux-statsbar' ).trigger( 'refresh', language );
mw.translate.loadMessages();
+   updateGroupWarning();
},
 
changeFilter: function ( filter ) {
@@ -241,6 +243,38 @@
} );
}
 
+   function updateGroupWarning() {
+   /*jshint loopfunc:true */
+   var preferredLanguages,
+   $groupWarning = $( '.tux-editor-header .group-warning' 
),
+   targetLanguage = $( '.tux-messagelist' ).data( 
'targetlangcode' ),
+   msgGroupData = mw.translate.getGroup(
+   $( '.tux-messagetable-loader' ).data( 
'messagegroup' )
+   );
+
+   if ( msgGroupData.prioritylangs 
+   $.inArray( targetLanguage, msgGroupData.prioritylangs ) 
=== -1
+   ) {
+   preferredLanguages = $.map( msgGroupData.prioritylangs, 
function ( code ) {
+   return $.uls.data.getAutonym( code );
+   } );
+
+   new mw.Api().parse(
+   mw.message( msgGroupData.priorityforce ?
+   'tpt-discouraged-language-force' :
+   'tpt-discouraged-language',
+   '',
+   $.uls.data.getAutonym( targetLanguage ),
+   preferredLanguages.join( ', ' )
+   ).parse()
+   ).done( function ( parsedWarning ) {
+   $groupWarning.html( parsedWarning );
+   

[MediaWiki-commits] [Gerrit] Add yandex geocode - change (mediawiki...MultiMaps)

2013-02-26 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: Add yandex geocode
..

Add yandex geocode

Change-Id: Id1c152e2d6a68da8bee5312236fba7e7501bff0e
---
M MultiMaps.php
M includes/Geocoders.php
M includes/Point.php
M tests/phpunit/bootstrap.php
A tests/phpunit/includes/mapelements/RectangleTest.php
A tests/phpunit/services/Yandex/YandexTest.php
6 files changed, 160 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiMaps 
refs/changes/87/50887/1

diff --git a/MultiMaps.php b/MultiMaps.php
index e0a80c8..c7b142c 100644
--- a/MultiMaps.php
+++ b/MultiMaps.php
@@ -113,5 +113,6 @@
$files = array_merge( $files, glob( 
$testDir/services/*Test.php ) );
$files = array_merge( $files, glob( 
$testDir/services/Google/*Test.php ) );
$files = array_merge( $files, glob( 
$testDir/services/Leaflet/*Test.php ) );
+   $files = array_merge( $files, glob( 
$testDir/services/Yandex/*Test.php ) );
return true;
 };
\ No newline at end of file
diff --git a/includes/Geocoders.php b/includes/Geocoders.php
index cb1609b..033b72a 100644
--- a/includes/Geocoders.php
+++ b/includes/Geocoders.php
@@ -16,6 +16,9 @@
case 'google':
return self::getCoordinatesUseGoogle($address);
break;
+   case 'yandex':
+   return self::getCoordinatesUseYandex($address);
+   break;
}
return false;
}
@@ -55,6 +58,44 @@
return $return;
}
 
+   private static function getCoordinatesUseYandex($address) {
+   $return = false;
+
+   $urlArgs = array(
+   'format' = 'json',
+   'results' = '1',
+   'geocode' = $address,
+   );
+   $response = self::performRequest( 
'https://geocode-maps.yandex.ru/1.x/?', $urlArgs);
+
+   if( $response !== false ) {
+   $data = \FormatJson::decode( $response );
+   if( is_null($data) === false ) {
+   $geoObjectCollection = 
$data-response-GeoObjectCollection;
+   if ( 
$geoObjectCollection-metaDataProperty-GeocoderResponseMetaData-found  0 ) {
+   $geoObject = 
$geoObjectCollection-featureMember[0]-GeoObject;
+   list($lon, $lat) = explode(' ', 
$geoObject-Point-pos);
+   $point = new Point($lat, $lon);
+   if( $point-isValid() ) {
+   $return = $point-pos;
+   $envelope = 
$geoObject-boundedBy-Envelope;
+   if( !is_null($envelope) ) {
+   list($lon, $lat) = 
explode(' ', $envelope-upperCorner);
+   $bounds_ne = new 
Point($lat, $lon);
+   list($lon, $lat) = 
explode(' ', $envelope-lowerCorner);
+   $bounds_sw = new 
Point($lat, $lon);
+   if( 
$bounds_ne-isValid()  $bounds_sw-isValid() ) {
+   $b = new 
Bounds( array($bounds_ne, $bounds_sw) );
+   
$return['bounds'] = $b;
+   }
+   }
+   }
+   }
+   }
+   }
+   return $return;
+   }
+
private static function performRequest($url, $urlArgs) {
return \Http::get( $url.wfArrayToCgi($urlArgs) );
}
diff --git a/includes/Point.php b/includes/Point.php
index 872855f..9f54216 100644
--- a/includes/Point.php
+++ b/includes/Point.php
@@ -11,6 +11,7 @@
  * @property-read float $lat Latitude coordinate
  * @property-read float $lon Longitude coordinate
  * @property Bounds $bounds Bounds associated with the point, used in the 
geocoding
+ * @property-read array $pos Position as array( 'lat' = lat, 'lon' = lon)
  */
 class Point {
/**
@@ -38,8 +39,8 @@
 */
public function __construct($lat = false, $lon = false) {
if( is_numeric($lat)  is_numeric($lon)) {
-   $this-latitude = $lat;
-   $this-longitude = $lon;
+   

[MediaWiki-commits] [Gerrit] (bug 45387) (bug 45388) $wgRSSAllowImageTag new name; bug fixed - change (mediawiki...RSS)

2013-02-26 Thread Wikinaut (Code Review)
Wikinaut has uploaded a new change for review.

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


Change subject: (bug 45387) (bug 45388) $wgRSSAllowImageTag new name; bug fixed
..

(bug 45387) (bug 45388) $wgRSSAllowImageTag new name; bug fixed

+++ breaking change +++
variable name $wgAllowImageTag renamed to $wgRSSAllowImagetag

+ fixed a problem that $wgAllowImageTag was not obeyed
+ added $wgRSSAllowImageTag to the variable declaration list in RSS.php

Change-Id: I112ebcdf492dfe80ba187fe6ab2406d3eed10f6a
---
M RELEASE-NOTES
M RSS.php
M RSSParser.php
3 files changed, 27 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RSS 
refs/changes/88/50888/1

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 89c430d..915c392 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,6 +1,6 @@
 RELEASE NOTES of the MediaWiki extension RSS
 
-Version 2.18 20130220
+Version 2.19 20130226
 
 Manual http://www.mediawiki.org/wiki/Extension:RSS
 
@@ -27,6 +27,11 @@
   The length limitation must be HTML tag-safe, but it is not at the moment.
   Length limitation is disabled by default.
 
+=== 2.19 2013-02-26 ===
+* (bug 45387) $wgAllowImageTag variable name changed to $wgRSSAllowImageTag
+* problem that $wgRSSAllowImageTag was ignored (fixed)
+* (bug 45388) definition of all variables in RSS.php (fixed)
+
 === Version 2.18 2013-02-20 ===
 * release version
 
diff --git a/RSS.php b/RSS.php
index a1bde4e..cb86200 100644
--- a/RSS.php
+++ b/RSS.php
@@ -14,7 +14,7 @@
  * @link http://www.mediawiki.org/wiki/Extension:RSS Documentation
  */
 
-define( EXTENSION_RSS_VERSION, 2.18 20130220 );
+define( EXTENSION_RSS_VERSION, 2.19 20130226 );
 
 if ( !defined( 'MEDIAWIKI' ) ) {
die( This is not a valid entry point.\n );
@@ -83,7 +83,8 @@
 $wgRSSUrlNumberOfAllowedRedirects = 0;
 
 // Agent to use for fetching feeds
-$wgRSSUserAgent = MediaWikiRSS/ . strtok( EXTENSION_RSS_VERSION,   ) .  
(+http://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension;
+$wgRSSUserAgent = MediaWikiRSS/ . strtok( EXTENSION_RSS_VERSION,   ) .
+(+http://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS 
extension;
 
 // Proxy server to use for fetching feeds
 $wgRSSProxy = false;
@@ -98,3 +99,6 @@
 
 // You can choose to allow active links in feed items; default: false
 $wgRSSAllowLinkTag = false;
+
+// If you want to allow images (HTML img tag) in RSS feeds; default: false
+$wgRSSAllowImageTag = false;
diff --git a/RSSParser.php b/RSSParser.php
index 33a85ca..7c2d9f7 100644
--- a/RSSParser.php
+++ b/RSSParser.php
@@ -426,22 +426,31 @@
 * $wgRSSAllowLinkTag = true;
 *
 * If you want to allow images (HTML img tag) in RSS feeds:
-* $wgAllowImageTag = true;
+* $wgRSSAllowImageTag = true;
 *
 */
protected function escapeTemplateParameter( $text ) {
-   global $wgRSSAllowLinkTag, $wgAllowImageTag;
+   global $wgRSSAllowLinkTag, $wgRSSAllowImageTag;
+
+   $extraInclude = array();
+   $extraExclude = array( iframe );
 
if ( isset( $wgRSSAllowLinkTag )  $wgRSSAllowLinkTag ) {
-   $extra = array( a );
+   $extraInclude[] = a;
} else {
-   $extra = array();
+   $extraExclude[] = a;
+   }
+
+   if ( isset( $wgRSSAllowImageTag )  $wgRSSAllowImageTag ) {
+   $extraInclude[] = img;
+   } else {
+   $extraExclude[] = img;
}
 
if ( ( isset( $wgRSSAllowLinkTag )  $wgRSSAllowLinkTag )
-   || ( isset( $wgAllowImageTag )  $wgAllowImageTag ) ) {
+   || ( isset( $wgRSSAllowImageTag )  
$wgRSSAllowImageTag ) ) {
 
-   $ret = Sanitizer::removeHTMLtags( $text, null, array(), 
$extra, array( iframe ) );
+   $ret = Sanitizer::removeHTMLtags( $text, null, array(), 
$extraInclude, $extraExclude );
 
} else { // use the old escape method for a while
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I112ebcdf492dfe80ba187fe6ab2406d3eed10f6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RSS
Gerrit-Branch: master
Gerrit-Owner: Wikinaut m...@tgries.de

___
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/core)

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

Change subject: Remove dead code.
..


Remove dead code.

$initialTime was never used. It was probably a clever trick
for an old time where ProfilerSimple used globals.

Change-Id: I34fd952127914d50ce4d12b6f9275926496aff9d
---
M maintenance/fileOpPerfTest.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/maintenance/fileOpPerfTest.php b/maintenance/fileOpPerfTest.php
index 4cb5e10..008d768 100644
--- a/maintenance/fileOpPerfTest.php
+++ b/maintenance/fileOpPerfTest.php
@@ -21,7 +21,6 @@
  * @ingroup Maintenance
  */
 
-$initialTime = microtime( true );
 $wgProfiler = array( 'class' = 'ProfilerSimpleText' );
 error_reporting( E_ALL );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34fd952127914d50ce4d12b6f9275926496aff9d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Platonides platoni...@gmail.com
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: IAlex ialex.w...@gmail.com
Gerrit-Reviewer: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Platonides platoni...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
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 43876) prevent page from jumping when clicking controls... - change (mediawiki...EducationProgram)

2013-02-26 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 43876) prevent page from jumping when clicking controls in 
the students table
..


(bug 43876) prevent page from jumping when clicking controls in the students 
table

Change-Id: I53f8712a4afb2d5a455757e4383081b45807b987
---
M resources/ep.articletable.js
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/resources/ep.articletable.js b/resources/ep.articletable.js
index 00952be..0365bc4 100644
--- a/resources/ep.articletable.js
+++ b/resources/ep.articletable.js
@@ -63,6 +63,8 @@
} );
 
$dialog.append( $form );
+
+   return false;
}
 
function removeStudent() {
@@ -126,6 +128,8 @@
} );
 
$dialog.append( $form );
+
+   return false;
}
 
function removeArticle() {
@@ -185,6 +189,8 @@
} );
 
$dialog.append( $form );
+
+   return false;
}
 
function removeReviewer() {
@@ -253,6 +259,8 @@
} );
 
$dialog.append( $form );
+
+   return false;
}
 
$( document ).ready( function() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53f8712a4afb2d5a455757e4383081b45807b987
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Ragesoss rages...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
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 43876) Return false in onclick handler to prevent page ... - change (mediawiki...EducationProgram)

2013-02-26 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 43876) Return false in onclick handler to prevent page 
from jumping
..


(bug 43876) Return false in onclick handler to prevent page from jumping

Change-Id: I5a0ef8dedbf219199fbcf0676ce1ea03fc65fc3c
---
M resources/ep.enlist.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/resources/ep.enlist.js b/resources/ep.enlist.js
index eebd78f..7e45315 100644
--- a/resources/ep.enlist.js
+++ b/resources/ep.enlist.js
@@ -105,6 +105,8 @@
doRemove();
}
} );
+
+   return false;
} );
 
$( '.ep-add-role' ).click( function( event ) {
@@ -286,6 +288,8 @@
 
this.nameInput.keypress( enterHandler );
this.summaryInput.keypress( enterHandler );
+
+   return false;
} );
 
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a0ef8dedbf219199fbcf0676ce1ea03fc65fc3c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Ragesoss rages...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] larger root partition size, correct recipe name for snapshots - change (operations/puppet)

2013-02-26 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: larger root partition size, correct recipe name for snapshots
..

larger root partition size, correct recipe name for snapshots

Change-Id: I73776cbb19bb3625e9b2869798403b449549607d
---
M files/autoinstall/partman/snapshot.cfg
1 file changed, 11 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/50890/1

diff --git a/files/autoinstall/partman/snapshot.cfg 
b/files/autoinstall/partman/snapshot.cfg
index 3010b49..8644d6e 100644
--- a/files/autoinstall/partman/snapshot.cfg
+++ b/files/autoinstall/partman/snapshot.cfg
@@ -2,7 +2,7 @@
 
 # 30 gb root partition, 
 # 1 gb swap,
-# the rest to /a
+# the rest to /local
 
 # Implementation specific hack:
 d-ipartman-auto/init_automatically_partition   select  
20some_device__/var/lib/partman/devices/=dev=sda
@@ -14,28 +14,24 @@
 
 # Note, expert_recipe wants to fill up the entire disk
 # See 
http://d-i.alioth.debian.org/svn/debian-installer/installer/doc/devel/partman-auto-recipe.txt
-d-ipartman-auto/expert_recipe  string  apache :: \
-   1 5000 3 ext3 \
+d-ipartman-auto/expert_recipe  string  snapshot :: \
+   3 5000 3 ext3 \
$primary{ } \
$bootable{ } \
-   method{ format } \
-   format{ } \
-   use_filesystem{ } \
-   filesystem{ ext3 } \
+   method{ format } format{ } \
+   use_filesystem{ } filesystem{ ext3 } \
mountpoint{ / } \
. \
-   1000 1000 1000 linux-swap \
+   1000 2000 1000 linux-swap \
method{ swap } \
format{ } \
. \
-   64 1000 1000 jfs \
-   method{ format } \
-   format{ } \
-   use_filesystem{ } \
-   filesystem{ jfs } \
-   mountpoint{ /a } 
+   1 1000 -1 jfs \
+   method{ format } format{ } \
+   use_filesystem{ } filesystem{ jfs } \
+   mountpoint{ /local }
 
-d-ipartman-auto/choose_recipe  apache
+d-ipartman-auto/choose_recipe  snapshot
 
 # Preseeding of other packages
 fontconfig fontconfig/enable_bitmaps   boolean true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73776cbb19bb3625e9b2869798403b449549607d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] larger root partition size, correct recipe name for snapshots - change (operations/puppet)

2013-02-26 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: larger root partition size, correct recipe name for snapshots
..


larger root partition size, correct recipe name for snapshots

Change-Id: I73776cbb19bb3625e9b2869798403b449549607d
---
M files/autoinstall/partman/snapshot.cfg
1 file changed, 11 insertions(+), 15 deletions(-)

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



diff --git a/files/autoinstall/partman/snapshot.cfg 
b/files/autoinstall/partman/snapshot.cfg
index 3010b49..8644d6e 100644
--- a/files/autoinstall/partman/snapshot.cfg
+++ b/files/autoinstall/partman/snapshot.cfg
@@ -2,7 +2,7 @@
 
 # 30 gb root partition, 
 # 1 gb swap,
-# the rest to /a
+# the rest to /local
 
 # Implementation specific hack:
 d-ipartman-auto/init_automatically_partition   select  
20some_device__/var/lib/partman/devices/=dev=sda
@@ -14,28 +14,24 @@
 
 # Note, expert_recipe wants to fill up the entire disk
 # See 
http://d-i.alioth.debian.org/svn/debian-installer/installer/doc/devel/partman-auto-recipe.txt
-d-ipartman-auto/expert_recipe  string  apache :: \
-   1 5000 3 ext3 \
+d-ipartman-auto/expert_recipe  string  snapshot :: \
+   3 5000 3 ext3 \
$primary{ } \
$bootable{ } \
-   method{ format } \
-   format{ } \
-   use_filesystem{ } \
-   filesystem{ ext3 } \
+   method{ format } format{ } \
+   use_filesystem{ } filesystem{ ext3 } \
mountpoint{ / } \
. \
-   1000 1000 1000 linux-swap \
+   1000 2000 1000 linux-swap \
method{ swap } \
format{ } \
. \
-   64 1000 1000 jfs \
-   method{ format } \
-   format{ } \
-   use_filesystem{ } \
-   filesystem{ jfs } \
-   mountpoint{ /a } 
+   1 1000 -1 jfs \
+   method{ format } format{ } \
+   use_filesystem{ } filesystem{ jfs } \
+   mountpoint{ /local }
 
-d-ipartman-auto/choose_recipe  apache
+d-ipartman-auto/choose_recipe  snapshot
 
 # Preseeding of other packages
 fontconfig fontconfig/enable_bitmaps   boolean true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73776cbb19bb3625e9b2869798403b449549607d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
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 yandex geocode - change (mediawiki...MultiMaps)

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

Change subject: Add yandex geocode
..


Add yandex geocode

Change-Id: Id1c152e2d6a68da8bee5312236fba7e7501bff0e
---
M MultiMaps.php
M includes/Geocoders.php
M includes/Point.php
M tests/phpunit/bootstrap.php
A tests/phpunit/includes/mapelements/RectangleTest.php
A tests/phpunit/services/Yandex/YandexTest.php
6 files changed, 160 insertions(+), 2 deletions(-)

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



diff --git a/MultiMaps.php b/MultiMaps.php
index e0a80c8..c7b142c 100644
--- a/MultiMaps.php
+++ b/MultiMaps.php
@@ -113,5 +113,6 @@
$files = array_merge( $files, glob( 
$testDir/services/*Test.php ) );
$files = array_merge( $files, glob( 
$testDir/services/Google/*Test.php ) );
$files = array_merge( $files, glob( 
$testDir/services/Leaflet/*Test.php ) );
+   $files = array_merge( $files, glob( 
$testDir/services/Yandex/*Test.php ) );
return true;
 };
\ No newline at end of file
diff --git a/includes/Geocoders.php b/includes/Geocoders.php
index cb1609b..033b72a 100644
--- a/includes/Geocoders.php
+++ b/includes/Geocoders.php
@@ -16,6 +16,9 @@
case 'google':
return self::getCoordinatesUseGoogle($address);
break;
+   case 'yandex':
+   return self::getCoordinatesUseYandex($address);
+   break;
}
return false;
}
@@ -55,6 +58,44 @@
return $return;
}
 
+   private static function getCoordinatesUseYandex($address) {
+   $return = false;
+
+   $urlArgs = array(
+   'format' = 'json',
+   'results' = '1',
+   'geocode' = $address,
+   );
+   $response = self::performRequest( 
'https://geocode-maps.yandex.ru/1.x/?', $urlArgs);
+
+   if( $response !== false ) {
+   $data = \FormatJson::decode( $response );
+   if( is_null($data) === false ) {
+   $geoObjectCollection = 
$data-response-GeoObjectCollection;
+   if ( 
$geoObjectCollection-metaDataProperty-GeocoderResponseMetaData-found  0 ) {
+   $geoObject = 
$geoObjectCollection-featureMember[0]-GeoObject;
+   list($lon, $lat) = explode(' ', 
$geoObject-Point-pos);
+   $point = new Point($lat, $lon);
+   if( $point-isValid() ) {
+   $return = $point-pos;
+   $envelope = 
$geoObject-boundedBy-Envelope;
+   if( !is_null($envelope) ) {
+   list($lon, $lat) = 
explode(' ', $envelope-upperCorner);
+   $bounds_ne = new 
Point($lat, $lon);
+   list($lon, $lat) = 
explode(' ', $envelope-lowerCorner);
+   $bounds_sw = new 
Point($lat, $lon);
+   if( 
$bounds_ne-isValid()  $bounds_sw-isValid() ) {
+   $b = new 
Bounds( array($bounds_ne, $bounds_sw) );
+   
$return['bounds'] = $b;
+   }
+   }
+   }
+   }
+   }
+   }
+   return $return;
+   }
+
private static function performRequest($url, $urlArgs) {
return \Http::get( $url.wfArrayToCgi($urlArgs) );
}
diff --git a/includes/Point.php b/includes/Point.php
index 872855f..9f54216 100644
--- a/includes/Point.php
+++ b/includes/Point.php
@@ -11,6 +11,7 @@
  * @property-read float $lat Latitude coordinate
  * @property-read float $lon Longitude coordinate
  * @property Bounds $bounds Bounds associated with the point, used in the 
geocoding
+ * @property-read array $pos Position as array( 'lat' = lat, 'lon' = lon)
  */
 class Point {
/**
@@ -38,8 +39,8 @@
 */
public function __construct($lat = false, $lon = false) {
if( is_numeric($lat)  is_numeric($lon)) {
-   $this-latitude = $lat;
-   $this-longitude = $lon;
+   $this-latitude = (float)$lat;
+   

[MediaWiki-commits] [Gerrit] Fix capitalisation - change (mediawiki...PageTriage)

2013-02-26 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Fix capitalisation
..

Fix capitalisation

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage 
refs/changes/91/50891/1

diff --git a/PageTriage.i18n.php b/PageTriage.i18n.php
index cf47e19..3773f37 100644
--- a/PageTriage.i18n.php
+++ b/PageTriage.i18n.php
@@ -415,7 +415,7 @@
'echo-pref-subscription-pagetriage-add-maintenance-tag' = 'Reviews a 
page I created and adds maintenance tags',
'echo-pref-subscription-pagetriage-add-deletion-tag' = 'Reviews a page 
I created and nominates it for deletion',
'pagetriage-notification-mark-as-reviewed-email-batch-body' = '$1 was 
{{GENDER:$2|reviewed}} by $2',
-   'echo-email-batch-category-header-page-review' = '$1 {{PLURAL:$1|Page 
review|Page reviews}}',
+   'echo-email-batch-category-header-page-review' = '$1 {{PLURAL:$1|page 
review|page reviews}}',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34dd138a3cb4a19b87379fbfa2c24dad63d6e6a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 35753) Allow {{FORMATNUM}} to only do digit transform - change (mediawiki/core)

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

Change subject: (bug 35753) Allow {{FORMATNUM}} to only do digit transform
..


(bug 35753) Allow {{FORMATNUM}} to only do digit transform

{{formatnum:1234567.89|NOSEP}} will perform only digit transformations.

Change-Id: Ic882d5ba087665030144e85248680acece8aa901
---
M includes/parser/CoreParserFunctions.php
M languages/Language.php
M languages/messages/MessagesEn.php
M tests/parser/parserTests.txt
4 files changed, 45 insertions(+), 14 deletions(-)

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



diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 8917b6d..3643368 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -269,12 +269,14 @@
/**
 * @param $parser Parser
 * @param string $num
-* @param null $raw
-* @return
+* @param string $arg
+* @return string
 */
-   static function formatnum( $parser, $num = '', $raw = null) {
-   if ( self::isRaw( $raw ) ) {
+   static function formatnum( $parser, $num = '', $arg = null ) {
+   if ( self::matchAgainstMagicword( 'rawsuffix', $arg ) ) {
$func = array( $parser-getFunctionLang(), 
'parseFormattedNumber' );
+   } elseif ( self::matchAgainstMagicword( 'nocommafysuffix', $arg 
) ) {
+   $func = array( $parser-getFunctionLang(), 
'formatNumNoSeparators' );
} else {
$func = array( $parser-getFunctionLang(), 'formatNum' 
);
}
@@ -386,20 +388,23 @@
return '';
}
 
-   static function isRaw( $param ) {
-   static $mwRaw;
-   if ( !$mwRaw ) {
-   $mwRaw = MagicWord::get( 'rawsuffix' );
-   }
-   if ( is_null( $param ) ) {
+   /**
+* Matches the given value against the value of given magic word
+*
+* @param string $magicword magic word key
+* @param mixed $value value to match
+* @return boolean true on successful match
+*/
+   static private function matchAgainstMagicword( $magicword, $value ) {
+   if ( strval( $value ) === '' ) {
return false;
-   } else {
-   return $mwRaw-match( $param );
}
+   $mwObject = MagicWord::get( $magicword );
+   return $mwObject-match( $value );
}
 
static function formatRaw( $num, $raw ) {
-   if( self::isRaw( $raw ) ) {
+   if( self::matchAgainstMagicword( 'rawsuffix', $raw ) ) {
return $num;
} else {
global $wgContLang;
@@ -585,7 +590,7 @@
static $cache = array();
 
// split the given option to its variable
-   if( self::isRaw( $arg1 ) ) {
+   if( self::matchAgainstMagicword( 'rawsuffix', $arg1 ) ) {
//{{pagesincategory:|raw[|type]}}
$raw = $arg1;
$type = $magicWords-matchStartToEnd( $arg2 );
diff --git a/languages/Language.php b/languages/Language.php
index 7475d2f..cd3acb5 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -2911,6 +2911,18 @@
}
 
/**
+* Front-end for non-commafied formatNum
+*
+* @param mixed $number the string to be formatted, should be an integer
+*or a floating point number.
+* @since 1.21
+* @return string
+*/
+   public function formatNumNoSeparators( $number ) {
+   return $this-formatNum( $number, true );
+   }
+
+   /**
 * @param $number string
 * @return string
 */
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 8cf05dc..ec38ab6 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -322,6 +322,7 @@
'raw' = array( 0,'RAW:' ),
'displaytitle'= array( 1,'DISPLAYTITLE' ),
'rawsuffix'   = array( 1,'R' ),
+   'nocommafysuffix' = array( 0,'NOSEP' ),
'newsectionlink'  = array( 1,'__NEWSECTIONLINK__' ),
'nonewsectionlink'= array( 1,'__NONEWSECTIONLINK__' ),
'currentversion'  = array( 1,'CURRENTVERSION' ),
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index bc24236..eef2549 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -12004,6 +12004,19 @@
 !! end
 
 !! test
+Check noCommafy in formatNum
+!! options
+language=be-tarask
+!! input

[MediaWiki-commits] [Gerrit] Fix capitalisation - change (mediawiki...PageTriage)

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

Change subject: Fix capitalisation
..


Fix capitalisation

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

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



diff --git a/PageTriage.i18n.php b/PageTriage.i18n.php
index cf47e19..3773f37 100644
--- a/PageTriage.i18n.php
+++ b/PageTriage.i18n.php
@@ -415,7 +415,7 @@
'echo-pref-subscription-pagetriage-add-maintenance-tag' = 'Reviews a 
page I created and adds maintenance tags',
'echo-pref-subscription-pagetriage-add-deletion-tag' = 'Reviews a page 
I created and nominates it for deletion',
'pagetriage-notification-mark-as-reviewed-email-batch-body' = '$1 was 
{{GENDER:$2|reviewed}} by $2',
-   'echo-email-batch-category-header-page-review' = '$1 {{PLURAL:$1|Page 
review|Page reviews}}',
+   'echo-email-batch-category-header-page-review' = '$1 {{PLURAL:$1|page 
review|page reviews}}',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34dd138a3cb4a19b87379fbfa2c24dad63d6e6a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] snapshot recipe use the standard /srv for extra partion - change (operations/puppet)

2013-02-26 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: snapshot recipe use the standard /srv for extra partion
..

snapshot recipe use the standard /srv for extra partion

Change-Id: Idf37a1149f77a38e32308bfd65ff19d026ef0798
---
M files/autoinstall/partman/snapshot.cfg
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/50893/1

diff --git a/files/autoinstall/partman/snapshot.cfg 
b/files/autoinstall/partman/snapshot.cfg
index 8644d6e..b98c1c6 100644
--- a/files/autoinstall/partman/snapshot.cfg
+++ b/files/autoinstall/partman/snapshot.cfg
@@ -2,7 +2,7 @@
 
 # 30 gb root partition, 
 # 1 gb swap,
-# the rest to /local
+# the rest to /srv
 
 # Implementation specific hack:
 d-ipartman-auto/init_automatically_partition   select  
20some_device__/var/lib/partman/devices/=dev=sda
@@ -29,7 +29,7 @@
1 1000 -1 jfs \
method{ format } format{ } \
use_filesystem{ } filesystem{ jfs } \
-   mountpoint{ /local }
+   mountpoint{ /srv }
 
 d-ipartman-auto/choose_recipe  snapshot
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf37a1149f77a38e32308bfd65ff19d026ef0798
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] snapshot recipe use the standard /srv for extra partion - change (operations/puppet)

2013-02-26 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: snapshot recipe use the standard /srv for extra partion
..


snapshot recipe use the standard /srv for extra partion

Change-Id: Idf37a1149f77a38e32308bfd65ff19d026ef0798
---
M files/autoinstall/partman/snapshot.cfg
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/files/autoinstall/partman/snapshot.cfg 
b/files/autoinstall/partman/snapshot.cfg
index 8644d6e..b98c1c6 100644
--- a/files/autoinstall/partman/snapshot.cfg
+++ b/files/autoinstall/partman/snapshot.cfg
@@ -2,7 +2,7 @@
 
 # 30 gb root partition, 
 # 1 gb swap,
-# the rest to /local
+# the rest to /srv
 
 # Implementation specific hack:
 d-ipartman-auto/init_automatically_partition   select  
20some_device__/var/lib/partman/devices/=dev=sda
@@ -29,7 +29,7 @@
1 1000 -1 jfs \
method{ format } format{ } \
use_filesystem{ } filesystem{ jfs } \
-   mountpoint{ /local }
+   mountpoint{ /srv }
 
 d-ipartman-auto/choose_recipe  snapshot
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf37a1149f77a38e32308bfd65ff19d026ef0798
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Mention the batch-download time in copyFileBackend.php. - change (mediawiki/core)

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

Change subject: Mention the batch-download time in copyFileBackend.php.
..


Mention the batch-download time in copyFileBackend.php.

Change-Id: Idc46f9ed276d116b5b7eda0fbf354659243b646f
---
M maintenance/copyFileBackend.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php
index 4e3c7fa..f2c4ac5 100644
--- a/maintenance/copyFileBackend.php
+++ b/maintenance/copyFileBackend.php
@@ -141,7 +141,11 @@
foreach ( $srcPathsRel as $srcPathRel ) {
$srcPaths[] = $src-getRootStoragePath() . 
/$backendRel/$srcPathRel;
}
+   $t_start = microtime( true );
$fsFiles = $src-getLocalReferenceMulti( array( 'srcs' 
= $srcPaths, 'latest' = 1 ) );
+   $ellapsed_ms = floor( ( microtime( true ) - $t_start ) 
* 1000 );
+   $this-output( \nDownloaded these file(s) 
[{$ellapsed_ms}ms]:\n .
+   implode( \n, $srcPaths ) . \n\n );
}
 
// Determine what files need to be copied over...

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc46f9ed276d116b5b7eda0fbf354659243b646f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: IAlex ialex.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] make sure /srv exists and is dir, not symlink for new snapshots - change (operations/puppet)

2013-02-26 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: make sure /srv exists and is dir, not symlink for new snapshots
..

make sure /srv exists and is dir, not symlink for new snapshots

Change-Id: Ic523f5b59f232eca229bc0759c156be601fa3279
---
M manifests/snapshots.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/50894/1

diff --git a/manifests/snapshots.pp b/manifests/snapshots.pp
index 8cd1556..2f0b486 100644
--- a/manifests/snapshots.pp
+++ b/manifests/snapshots.pp
@@ -33,6 +33,9 @@
source = 
puppet:///files/php/fss.ini.snaps.${::lsbdistcodename},
ensure = present;
}
+   file { /srv:
+   ensure = directory;
+   }
}
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic523f5b59f232eca229bc0759c156be601fa3279
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (testing) necessary adjustment to blockeduser selenium test - change (mediawiki...Wikibase)

2013-02-26 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) necessary adjustment to blockeduser selenium test
..


(testing) necessary adjustment to blockeduser selenium test

- this caused the test to fail since the handling of blocked users
changed on Special:CreateItem

Change-Id: I65674bc398e9d5c06b492424255de7216e93e322
---
M repo/tests/selenium/item/blocked_user_spec.rb
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/tests/selenium/item/blocked_user_spec.rb 
b/repo/tests/selenium/item/blocked_user_spec.rb
index b67c37d..346d5a0 100644
--- a/repo/tests/selenium/item/blocked_user_spec.rb
+++ b/repo/tests/selenium/item/blocked_user_spec.rb
@@ -72,10 +72,7 @@
 page.login_with(WIKI_BLOCKED_USERNAME, WIKI_BLOCKED_PASSWORD)
   end
   visit_page(CreateItemPage) do |page|
-page.createEntityLabelField = generate_random_string(10)
-page.createEntityDescriptionField = generate_random_string(20)
-page.createEntitySubmit
-page.mwFirstHeading.should == Permissions errors
+page.mwFirstHeading.should == User is blocked
   end
 end
   end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65674bc398e9d5c06b492424255de7216e93e322
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Anja Jentzsch anja.jentz...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Commafy support for convertNumber - change (mediawiki/core)

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

Change subject: Commafy support for convertNumber
..


Commafy support for convertNumber

As per http://www.unicode.org/reports/tr35

Change-Id: I765298959ad10ea8561abfea487328c8ddeb39f0
---
M includes/resourceloader/ResourceLoaderLanguageDataModule.php
M resources/Resources.php
M resources/mediawiki.language/mediawiki.language.js
A resources/mediawiki.language/mediawiki.language.numbers.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.test.js
6 files changed, 394 insertions(+), 130 deletions(-)

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



diff --git a/includes/resourceloader/ResourceLoaderLanguageDataModule.php 
b/includes/resourceloader/ResourceLoaderLanguageDataModule.php
index 9679a59..0f8e54c 100644
--- a/includes/resourceloader/ResourceLoaderLanguageDataModule.php
+++ b/includes/resourceloader/ResourceLoaderLanguageDataModule.php
@@ -48,22 +48,33 @@
}
 
/**
+* Get the digit groupin Pattern for the site content language.
+*
+* @return array
+*/
+   protected function getDigitGroupingPattern() {
+   return $this-language-digitGroupingPattern();
+   }
+
+   /**
 * Get the digit transform table for the content language
-* Seperator transform table also required here to convert
-* the . and , sign to appropriate forms in content language.
 *
 * @return array
 */
protected function getDigitTransformTable() {
-   $digitTransformTable = $this-language-digitTransformTable();
-   $separatorTransformTable = 
$this-language-separatorTransformTable();
-   if ( $digitTransformTable ) {
-   array_merge( $digitTransformTable, 
(array)$separatorTransformTable );
-   } else {
-   return $separatorTransformTable;
-   }
-   return $digitTransformTable;
+   return $this-language-digitTransformTable();
}
+
+   /**
+* Get seperator transform table required for converting
+* the . and , sign to appropriate forms in site content language.
+*
+* @return array
+*/
+   protected function getSeparatorTransformTable() {
+   return $this-language-separatorTransformTable();
+   }
+
 
/**
 * Get all the dynamic data for the content language to an array
@@ -73,8 +84,10 @@
protected function getData() {
return array(
'digitTransformTable' = 
$this-getDigitTransformTable(),
+   'separatorTransformTable' = 
$this-getSeparatorTransformTable(),
'grammarForms' = $this-getSiteLangGrammarForms(),
'pluralRules' = $this-getPluralRules(),
+   'digitGroupingPattern' = 
$this-getDigitGroupingPattern(),
);
}
 
diff --git a/resources/Resources.php b/resources/Resources.php
index 51bf05f..c2df86d 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -746,7 +746,10 @@
/* MediaWiki Language */
 
'mediawiki.language' = array(
-   'scripts' = 
'resources/mediawiki.language/mediawiki.language.js',
+   'scripts' = array(
+   'resources/mediawiki.language/mediawiki.language.js',
+   
'resources/mediawiki.language/mediawiki.language.numbers.js'
+   ),
'languageScripts' = array(
'bs' = 'resources/mediawiki.language/languages/bs.js',
'dsb' = 
'resources/mediawiki.language/languages/dsb.js',
@@ -764,7 +767,7 @@
),
'dependencies' = array(
'mediawiki.language.data',
-   'mediawiki.cldr'
+   'mediawiki.cldr',
),
'targets' = array( 'desktop', 'mobile' ),
),
diff --git a/resources/mediawiki.language/mediawiki.language.js 
b/resources/mediawiki.language/mediawiki.language.js
index f8af0a0..7f729bd 100644
--- a/resources/mediawiki.language/mediawiki.language.js
+++ b/resources/mediawiki.language/mediawiki.language.js
@@ -75,46 +75,6 @@
},
 
/**
-* Converts a number using digitTransformTable.
-*
-* @param {Number} number Value to be converted
-* @param {boolean} integer Convert the return value to an integer
-* @return {Number|String} formatted number
-*/
-   convertNumber: function ( num, integer ) {
-   var i, tmp, transformTable, numberString, convertedNumber;
-
-   // Set the target Transform table:
-   

[MediaWiki-commits] [Gerrit] Extend ... magic to also work when others is linked somewhere - change (mediawiki/core)

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

Change subject: Extend ... magic to also work when others is linked somewhere
..


Extend ... magic to also work when others is linked somewhere

Change-Id: I8c6657c95061b066ed48f115e771889a507bd268
---
M RELEASE-NOTES-1.21
M includes/DefaultSettings.php
M includes/specials/SpecialVersion.php
3 files changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 2db9153..51259de 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -85,6 +85,8 @@
   in MW 1.20 (saving preferences using Special:Preferences cleared any
   additional fields) and which has been disabled in 1.20.1 as a part of
   a security fix (bug 42202).
+* Added option to specify others as author in extension credits using
+  ... as author name.
 * Added the ability to limit the wall clock time used by shell processes,
   as well as the CPU time. Configurable with $wgMaxShellWallClockTime.
 * Allow memory of shell subprocesses to be limited using Linux cgroups
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 731c1a1..e33c6c0 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5464,6 +5464,11 @@
  * Where $type is 'specialpage', 'parserhook', 'variable', 'media' or 'other'.
  * Where 'descriptionmsg' can be an array with message key and parameters:
  * 'descriptionmsg' = array( 'exampleextension-desc', param1, param2, ... ),
+ *
+ * author can be a string or an array of strings. Authors can be linked using
+ * the regular wikitext link syntax. To have an internationalized version of
+ * and others show, add an element  This element can also be linked,
+ * for instance [http://example ...].
  */
 $wgExtensionCredits = array();
 
diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 88d647e..f847ca3 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -606,8 +606,10 @@
function listAuthors( $authors ) {
$list = array();
foreach( (array)$authors as $item ) {
-   if( $item == '...' ) {
+   if ( $item == '...' ) {
$list[] = $this-msg( 
'version-poweredby-others' )-text();
+   } elseif ( substr( $item, -5 ) == ' ...]' ) {
+   $list[] = substr( $item, 0, -4 ) . $this-msg( 
'version-poweredby-others' )-text() . ];
} else {
$list[] = $item;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c6657c95061b066ed48f115e771889a507bd268
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: IAlex ialex.w...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Platonides platoni...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Refresh docs for wfMessage - change (mediawiki/core)

2013-02-26 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: Refresh docs for wfMessage
..

Refresh docs for wfMessage

Change-Id: I53d2d32e7d6972171f3c2430412a44eea0b5b0a8
---
M includes/GlobalFunctions.php
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/50895/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index be862e7..a2b882f 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1386,9 +1386,13 @@
 }
 
 /**
- * This is the new function for getting translated interface messages.
- * See the Message class for documentation how to use them.
- * The intention is that this function replaces all old wfMsg* functions.
+ * This is the function for getting translated interface messages.
+ *
+ * @see Message class for documentation how to use them.
+ * @see https://www.mediawiki.org/wiki/Manual:Messages_API
+ *
+ * This function replaces all old wfMsg* functions.
+ *
  * @param $key \string Message key.
  * Varargs: normal message parameters.
  * @return Message

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53d2d32e7d6972171f3c2430412a44eea0b5b0a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Refresh docs for wfMessage - change (mediawiki/core)

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

Change subject: Refresh docs for wfMessage
..


Refresh docs for wfMessage

Change-Id: I53d2d32e7d6972171f3c2430412a44eea0b5b0a8
---
M includes/GlobalFunctions.php
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index be862e7..a2b882f 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1386,9 +1386,13 @@
 }
 
 /**
- * This is the new function for getting translated interface messages.
- * See the Message class for documentation how to use them.
- * The intention is that this function replaces all old wfMsg* functions.
+ * This is the function for getting translated interface messages.
+ *
+ * @see Message class for documentation how to use them.
+ * @see https://www.mediawiki.org/wiki/Manual:Messages_API
+ *
+ * This function replaces all old wfMsg* functions.
+ *
  * @param $key \string Message key.
  * Varargs: normal message parameters.
  * @return Message

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53d2d32e7d6972171f3c2430412a44eea0b5b0a8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: IAlex ialex.w...@gmail.com
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 45345) Add Language to gettext file header - change (mediawiki...Translate)

2013-02-26 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: (bug 45345) Add Language to gettext file header
..

(bug 45345) Add Language to gettext file header

Change-Id: Id125a06815e47ad3e09a6269191e43132e265b10
---
M ffs/GettextFFS.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php
index 8441a75..f865fc1 100644
--- a/ffs/GettextFFS.php
+++ b/ffs/GettextFFS.php
@@ -405,6 +405,7 @@
}
$specs['Content-Type'] = 'text/plain; charset=UTF-8';
$specs['Content-Transfer-Encoding'] = '8bit';
+   $specs['Language'] = $this-group-mapCode( $code );
wfRunHooks( 'Translate:GettextFFS:headerFields', array( 
$specs, $this-group, $code ) );
$specs['X-Generator'] = $this-getGenerator();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id125a06815e47ad3e09a6269191e43132e265b10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


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

2013-02-26 Thread Matthias Mullie (Code Review)
Matthias Mullie has submitted this change and it was merged.

Change subject: Update ArticleFeedback to master
..


Update ArticleFeedback to master

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

Approvals:
  Matthias Mullie: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/extensions/ArticleFeedback b/extensions/ArticleFeedback
index 2b56053..33b5c13 16
--- a/extensions/ArticleFeedback
+++ b/extensions/ArticleFeedback
-Subproject commit 2b56053be5127118d7a60782880740245944bd04
+Subproject commit 33b5c1327c4768b8c6d1d393bf343c373632b2e2

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I625198576b17ef6b2f8b1799c6b3dd510771db41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
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 ArticleFeedback to master - change (mediawiki/core)

2013-02-26 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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


Change subject: Update ArticleFeedback to master
..

Update ArticleFeedback to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/50896/1

diff --git a/extensions/ArticleFeedback b/extensions/ArticleFeedback
index 2b56053..33b5c13 16
--- a/extensions/ArticleFeedback
+++ b/extensions/ArticleFeedback
-Subproject commit 2b56053be5127118d7a60782880740245944bd04
+Subproject commit 33b5c1327c4768b8c6d1d393bf343c373632b2e2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I625198576b17ef6b2f8b1799c6b3dd510771db41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemD... - change (mediawiki...Wikibase)

2013-02-26 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 45352, 45353) Add Special:ItemByTitle and 
Special:ItemDisambiguation to Special:SpecialPages
..

(Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemDisambiguation to 
Special:SpecialPages

Add Special:ItemByTitle and Special:ItemDisambiguation to Special:SpecialPages

Change-Id: Id8b0f22d795f881e37d56c4288faca306fdff4ee
---
M repo/includes/specials/SpecialItemResolver.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/includes/specials/SpecialItemResolver.php 
b/repo/includes/specials/SpecialItemResolver.php
index ce77fff..133d3ea 100644
--- a/repo/includes/specials/SpecialItemResolver.php
+++ b/repo/includes/specials/SpecialItemResolver.php
@@ -38,7 +38,7 @@
 * @param string $name
 */
public function __construct( $name ) {
-   parent::__construct( $name, '', false );
+   parent::__construct( $name, '', );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8b0f22d795f881e37d56c4288faca306fdff4ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch anja.jentz...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] (bug 42612) Have PythonSingleFFS observe codeMap - change (mediawiki...Translate)

2013-02-26 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: (bug 42612) Have  PythonSingleFFS observe codeMap
..

(bug 42612) Have  PythonSingleFFS observe codeMap

Change-Id: I28d7dcababef93be53b510a66ebc4f8f41ea8c03
---
M ffs/PythonSingleFFS.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/ffs/PythonSingleFFS.php b/ffs/PythonSingleFFS.php
index 5b9025e..bfe91c9 100644
--- a/ffs/PythonSingleFFS.php
+++ b/ffs/PythonSingleFFS.php
@@ -145,6 +145,7 @@
$authorList .= \t# Author: $author\n;
}
 
+   $code = $this-group-mapCode( $code );
$section = $authorList\t'$code': {\n$block\t},;
 
// Store the written part, so that when next language is called,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28d7dcababef93be53b510a66ebc4f8f41ea8c03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemD... - change (mediawiki...Wikibase)

2013-02-26 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 45352, 45353) Add Special:ItemByTitle and 
Special:ItemDisambiguation to Special:SpecialPages
..

(Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemDisambiguation to 
Special:SpecialPages

Add Special:ItemByTitle and Special:ItemDisambiguation to Special:SpecialPages

Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
---
M repo/includes/specials/SpecialItemResolver.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/includes/specials/SpecialItemResolver.php 
b/repo/includes/specials/SpecialItemResolver.php
index ce77fff..133d3ea 100644
--- a/repo/includes/specials/SpecialItemResolver.php
+++ b/repo/includes/specials/SpecialItemResolver.php
@@ -38,7 +38,7 @@
 * @param string $name
 */
public function __construct( $name ) {
-   parent::__construct( $name, '', false );
+   parent::__construct( $name, '', );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch anja.jentz...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix the toggle style of mode changing buttons of message table - change (mediawiki...Translate)

2013-02-26 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Fix the toggle style of mode changing buttons of message table
..

Fix the toggle style of mode changing buttons of message table

Change-Id: I8dd8ba39b2bf9c1a5e6f64a62391df2c20be80a7
---
M resources/js/ext.translate.messagetable.js
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 6244c80..fac3c1a 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -63,7 +63,9 @@
}
 
MessageTable.prototype = {
-   init: function () {},
+   init: function () {
+   this.switchMode( this.mode );
+   },
 
listen: function () {
var messageTable = this;
@@ -365,10 +367,10 @@
var messageTable = this;
 
messageTable.$actionBar.find( '.down').removeClass( 
'down' );
-   if ( messageTable.mode === 'translate' ) {
+   if ( mode === 'translate' ) {
messageTable.$actionBar.find( 
'.translate-mode-button' ).addClass( 'down' );
}
-   if ( messageTable.mode === 'proofread' ) {
+   if ( mode === 'proofread' ) {
messageTable.$actionBar.find( 
'.tux-proofread-button' ).addClass( 'down' );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dd8ba39b2bf9c1a5e6f64a62391df2c20be80a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add status as class for proofread rows - change (mediawiki...Translate)

2013-02-26 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Add status as class for proofread rows
..

Add status as class for proofread rows

For better styling based on message status

Change-Id: I57d02bf5d9ce38b65c3c1fa0b199289fffc80e77
---
M resources/js/ext.translate.proofread.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/resources/js/ext.translate.proofread.js 
b/resources/js/ext.translate.proofread.js
index 4f396c5..cbe99be 100644
--- a/resources/js/ext.translate.proofread.js
+++ b/resources/js/ext.translate.proofread.js
@@ -169,7 +169,8 @@
$( 'div' )
.addClass( 
'tux-proofread-edit' )
)
-   );
+   )
+   .addClass( this.message.properties.status );
},
 
hide: function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57d02bf5d9ce38b65c3c1fa0b199289fffc80e77
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix variable number in message - change (mediawiki...TranslationNotifications)

2013-02-26 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: Fix variable number in message
..

Fix variable number in message

Per message doc:
$1 is the user who performed the action
$10 is the number of notified languages

Spotted by Pikne
https://translatewiki.net/wiki/Thread:Translating_talk:MediaWiki/About_MediaWiki:Logentry-translationnotifications-sent/en

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslationNotifications 
refs/changes/04/50904/1

diff --git a/TranslationNotifications.i18n.php 
b/TranslationNotifications.i18n.php
index cc720eb..c71e7d9 100644
--- a/TranslationNotifications.i18n.php
+++ b/TranslationNotifications.i18n.php
@@ -117,7 +117,7 @@
'translationnotifications-edit-summary' = 'Translation notification: 
$1',
'translationnotifications-email-priority' = 'The priority of this page 
is $1.',
'translationnotifications-email-deadline' = 'The deadline for 
translating this page is $1.',
-   'logentry-translationnotifications-sent' = '$1 {{GENDER:$2|sent}} a 
notification about translating page $3; {{PLURAL:$1|language|languages}}: $4; 
deadline: $5; priority: $6; sent to {{PLURAL:$7|one recipient|$7 recipients}}, 
failed for {{PLURAL:$8|one recipient|$8 recipients}}, skipped for 
{{PLURAL:$9|one recipient|$9 recipients}}',
+   'logentry-translationnotifications-sent' = '$1 {{GENDER:$2|sent}} a 
notification about translating page $3; {{PLURAL:$10|language|languages}}: $4; 
deadline: $5; priority: $6; sent to {{PLURAL:$7|one recipient|$7 recipients}}, 
failed for {{PLURAL:$8|one recipient|$8 recipients}}, skipped for 
{{PLURAL:$9|one recipient|$9 recipients}}',
'log-name-notifytranslators' = 'Translation notifications',
'log-description-notifytranslators' = 'A log of notifications sent to 
translators about translatable pages',
'translationnotifications-sent-title' = 'Translation notification 
sent',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc7b7a1987b54ffbc1de479628830466fc19dd05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix variable number in message - change (mediawiki...TranslationNotifications)

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

Change subject: Fix variable number in message
..


Fix variable number in message

Per message doc:
$1 is the user who performed the action
$10 is the number of notified languages

Spotted by Pikne
https://translatewiki.net/wiki/Thread:Translating_talk:MediaWiki/About_MediaWiki:Logentry-translationnotifications-sent/en

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

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



diff --git a/TranslationNotifications.i18n.php 
b/TranslationNotifications.i18n.php
index cc720eb..c71e7d9 100644
--- a/TranslationNotifications.i18n.php
+++ b/TranslationNotifications.i18n.php
@@ -117,7 +117,7 @@
'translationnotifications-edit-summary' = 'Translation notification: 
$1',
'translationnotifications-email-priority' = 'The priority of this page 
is $1.',
'translationnotifications-email-deadline' = 'The deadline for 
translating this page is $1.',
-   'logentry-translationnotifications-sent' = '$1 {{GENDER:$2|sent}} a 
notification about translating page $3; {{PLURAL:$1|language|languages}}: $4; 
deadline: $5; priority: $6; sent to {{PLURAL:$7|one recipient|$7 recipients}}, 
failed for {{PLURAL:$8|one recipient|$8 recipients}}, skipped for 
{{PLURAL:$9|one recipient|$9 recipients}}',
+   'logentry-translationnotifications-sent' = '$1 {{GENDER:$2|sent}} a 
notification about translating page $3; {{PLURAL:$10|language|languages}}: $4; 
deadline: $5; priority: $6; sent to {{PLURAL:$7|one recipient|$7 recipients}}, 
failed for {{PLURAL:$8|one recipient|$8 recipients}}, skipped for 
{{PLURAL:$9|one recipient|$9 recipients}}',
'log-name-notifytranslators' = 'Translation notifications',
'log-description-notifytranslators' = 'A log of notifications sent to 
translators about translatable pages',
'translationnotifications-sent-title' = 'Translation notification 
sent',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc7b7a1987b54ffbc1de479628830466fc19dd05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
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 45346) Update FUEL to use correct naming convention - change (translatewiki)

2013-02-26 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: (bug 45346) Update FUEL to use correct naming convention
..

(bug 45346) Update FUEL to use correct naming convention

Change-Id: Icb9da42bd3bc20e84a2bf3db34d0568ec9b564eb
---
M groups/FUEL/FUEL.yaml
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/98/50898/1

diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 440e44a..4f7afad 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -45,9 +45,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/desktop/fuel-desktop_translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/desktop/fuel-desktop-%CODE%_translatewiki.net.po
   definitionFile: 
%GROUPROOT%/fuel/language/en/terminology/desktop/fuel-desktop-en.pot
-  targetPattern: 
fuel/language/%CODE%/terminology/desktop/fuel-desktop_translatewiki.net.po
+  targetPattern: 
fuel/language/%CODE%/terminology/desktop/fuel-desktop-%CODE%_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher
@@ -62,9 +62,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/mobile/fuel-mobile_translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/mobile/fuel-mobile-%CODE%_translatewiki.net.po
   definitionFile: 
%GROUPROOT%/fuel/language/en/terminology/mobile/fuel-mobile-en.pot
-  targetPattern: 
fuel/language/%CODE%/terminology/mobile/fuel-mobile_translatewiki.net.po
+  targetPattern: 
fuel/language/%CODE%/terminology/mobile/fuel-mobile-%CODE%_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher
@@ -79,9 +79,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/web/fuel-web_translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/web/fuel-web-%CODE%_translatewiki.net.po
   definitionFile: %GROUPROOT%/fuel/language/en/terminology/web/fuel-web-en.pot
-  targetPattern: 
fuel/language/%CODE%/terminology/web/fuel-web_translatewiki.net.po
+  targetPattern: 
fuel/language/%CODE%/terminology/web/fuel-web-%CODE%_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb9da42bd3bc20e84a2bf3db34d0568ec9b564eb
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [EXPERIMENTAL] Take full width of page for translate - change (mediawiki...Translate)

2013-02-26 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: [EXPERIMENTAL] Take full width of page for translate
..

[EXPERIMENTAL] Take full width of page for translate

Hides MW side and top bars when we start floating the TUX
action bar and filter bar. Restore when user is on top of scroll
aread of page.

Do not merge!

Change-Id: I6af4880cf99baf107446e626db75c5f52afdb713
---
M resources/js/ext.translate.messagetable.js
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 6244c80..cc818de 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -429,8 +429,12 @@
needsTableHeaderStick = messageListTop + 
$tuxTableHeader.height() - $window.scrollTop() = 0;
if ( needsTableHeaderFloat ) {
$tuxTableHeader.addClass( 'floating' ).width( 
this.$container.width() );
+   $( '#mw-navigation' ).hide();
+   $( '.mw-body' ).css( 'margin-left', 0 );
} else if ( needsTableHeaderStick ) {
$tuxTableHeader.removeClass( 'floating' );
+   $( '#mw-navigation' ).show();
+   $( '.mw-body' ).css( 'margin-left', '11em' );
}
 
// Action bar:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6af4880cf99baf107446e626db75c5f52afdb713
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix the toggle style of mode changing buttons of message table - change (mediawiki...Translate)

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

Change subject: Fix the toggle style of mode changing buttons of message table
..


Fix the toggle style of mode changing buttons of message table

Change-Id: I8dd8ba39b2bf9c1a5e6f64a62391df2c20be80a7
---
M resources/js/ext.translate.messagetable.js
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 6244c80..fac3c1a 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -63,7 +63,9 @@
}
 
MessageTable.prototype = {
-   init: function () {},
+   init: function () {
+   this.switchMode( this.mode );
+   },
 
listen: function () {
var messageTable = this;
@@ -365,10 +367,10 @@
var messageTable = this;
 
messageTable.$actionBar.find( '.down').removeClass( 
'down' );
-   if ( messageTable.mode === 'translate' ) {
+   if ( mode === 'translate' ) {
messageTable.$actionBar.find( 
'.translate-mode-button' ).addClass( 'down' );
}
-   if ( messageTable.mode === 'proofread' ) {
+   if ( mode === 'proofread' ) {
messageTable.$actionBar.find( 
'.tux-proofread-button' ).addClass( 'down' );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8dd8ba39b2bf9c1a5e6f64a62391df2c20be80a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
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 layout for editor in proofreading mode - change (mediawiki...Translate)

2013-02-26 Thread Pginer (Code Review)
Pginer has uploaded a new change for review.

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


Change subject: Fix broken layout for editor in proofreading mode
..

Fix broken layout for editor in proofreading mode

The translate editor was showing a gap at the top which was produced
by the elements behind it. This comments removes these elements from
the layout when the editor is open.

Change-Id: I2dc613b73cb4289c13b053157874fd46b1e13df7
---
M resources/css/ext.translate.proofread.css
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index 57f6e52..eabaf3d 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -13,6 +13,13 @@
background: #fefefe;
 }
 
+.tux-message-proofread.open .tux-proofread-status,
+.tux-message-proofread.open .tux-proofread-source,
+.tux-message-proofread.open .tux-proofread-translation,
+.tux-message-proofread.open .tux-proofread-action-block {
+   display:none;
+}
+
 .tux-proofread-source {
color: #555;
font-size: 16px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dc613b73cb4289c13b053157874fd46b1e13df7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add status as class for proofread rows - change (mediawiki...Translate)

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

Change subject: Add status as class for proofread rows
..


Add status as class for proofread rows

For better styling based on message status

Change-Id: I57d02bf5d9ce38b65c3c1fa0b199289fffc80e77
---
M resources/js/ext.translate.proofread.js
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Amire80: Looks good to me, approved
  Pginer: Checked; Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/js/ext.translate.proofread.js 
b/resources/js/ext.translate.proofread.js
index 4f396c5..cbe99be 100644
--- a/resources/js/ext.translate.proofread.js
+++ b/resources/js/ext.translate.proofread.js
@@ -169,7 +169,8 @@
$( 'div' )
.addClass( 
'tux-proofread-edit' )
)
-   );
+   )
+   .addClass( this.message.properties.status );
},
 
hide: function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57d02bf5d9ce38b65c3c1fa0b199289fffc80e77
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Pginer pgi...@wikimedia.org
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 layout for editor in proofreading mode - change (mediawiki...Translate)

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

Change subject: Fix broken layout for editor in proofreading mode
..


Fix broken layout for editor in proofreading mode

The translate editor was showing a gap at the top which was produced
by the elements behind it. This comments removes these elements from
the layout when the editor is open.

Change-Id: I2dc613b73cb4289c13b053157874fd46b1e13df7
---
M resources/css/ext.translate.proofread.css
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index 57f6e52..eabaf3d 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -13,6 +13,13 @@
background: #fefefe;
 }
 
+.tux-message-proofread.open .tux-proofread-status,
+.tux-message-proofread.open .tux-proofread-source,
+.tux-message-proofread.open .tux-proofread-translation,
+.tux-message-proofread.open .tux-proofread-action-block {
+   display:none;
+}
+
 .tux-proofread-source {
color: #555;
font-size: 16px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dc613b73cb4289c13b053157874fd46b1e13df7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
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 GeoData: https://gerrit.wikimedia.org/r/#/c/50844/ - change (mediawiki/core)

2013-02-26 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/
..

Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/50907/1

diff --git a/extensions/GeoData b/extensions/GeoData
index c0fecf6..6be2f14 16
--- a/extensions/GeoData
+++ b/extensions/GeoData
-Subproject commit c0fecf6747acc1f5c4cd98848cb3e9c814939e0a
+Subproject commit 6be2f14253cc59eacb716263da7d70c56d673ea1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa92b29b473f8ca9992981277793b4137ce9a29c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/ - change (mediawiki/core)

2013-02-26 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/
..

Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/

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


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

diff --git a/extensions/GeoData b/extensions/GeoData
index c0fecf6..6be2f14 16
--- a/extensions/GeoData
+++ b/extensions/GeoData
-Subproject commit c0fecf6747acc1f5c4cd98848cb3e9c814939e0a
+Subproject commit 6be2f14253cc59eacb716263da7d70c56d673ea1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7573b1e5cd1972450e8d35356b0225eda94e7623
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf9
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixup a few MW related issues - change (mediawiki...BlameMaps)

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

Change subject: Fixup a few MW related issues
..


Fixup a few MW related issues

- Prefixes and table options to mysql tables
- Undefined variable
- Documenation

Change-Id: Ic62569319e385dcb4b319f75d4bc632e835bd6c5
---
M Tries.php
M TriesA5.php
M blamemaps.php
M createTable.sql
4 files changed, 48 insertions(+), 19 deletions(-)

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



diff --git a/Tries.php b/Tries.php
index 2581683..69673cc 100644
--- a/Tries.php
+++ b/Tries.php
@@ -6,8 +6,7 @@
  * necessary for constructing a tree
  * for naive trie algorithm
  */
-class Tries
-{
+class Tries {
/**
 * information about nodes is stored in array $nodes (array of arrays)
 * $nodes[$nodeId] returns an array, say, $node which
@@ -88,6 +87,7 @@
// inserting root
$this-addNode( 0 );
}
+
/**
 * adds revision
 * revision is array of tokens
@@ -113,6 +113,7 @@
// $th = $this-getTruncateThreshold();
// $this-truncateTree( $th );
}
+
/**
 * method adds string $this-revision[startIdx] ... [endIdx] to the tree
 * to do this we traverse down the tree matching the string along
@@ -173,6 +174,7 @@
return;
}
}
+
/**
 * adds node to array $nodes with $nodeId
 * returns id if a new node
@@ -214,6 +216,7 @@
$this-nodes[$destNodeId][self::NODE_LAST_VISIT] = 
$this-crNumber;
return $e;
}
+
protected function getNewNodeId() {
$this-linId += 1;
return $this-linId;
@@ -252,6 +255,7 @@
$this-addEdge( $middleNodeId, $eDestNodeIdOld, $secondPartOfe 
);
return $middleNodeId;
}
+
protected function calculateCurrentCovering() {
$result = array();
$labelArray = array();
@@ -274,12 +278,14 @@
}
$this-cCovering = $result;
}
+
/**
 * method returns covering for current revision
 */
public function getCurrentCovering() {
return $this-cCovering;
}
+
/**
 * given string s of length N method
 * returns leaf id that string path
@@ -329,6 +335,7 @@
return null;
}
}
+
/**
 * method deletes nodes and edges that were
 * visited more than threshold revisions ago
@@ -361,6 +368,7 @@
unset( $this-nodes[$nodeId] );
}
}
+
/**
 * calculates threshold for truncating nodes.
 * all nodes that were visited more than $threshold
@@ -374,6 +382,7 @@
$value = max( $this-crNumber - $revisionOldest, 
$this-K_revisions );
return $value;
}
+
/**
 * time table is needed for truncating
 * nodes of the tree. Timetable is an array
@@ -452,6 +461,7 @@
}
return $result;
}
+
/**
 * loads tree from json
 */
@@ -594,6 +604,7 @@
public function testGetNodes() {
return $this-nodes;
}
+
public function testGetEdges() {
return $this-edges;
}
diff --git a/TriesA5.php b/TriesA5.php
index c67cfcb..fc88e1b 100644
--- a/TriesA5.php
+++ b/TriesA5.php
@@ -15,8 +15,7 @@
 //- add saving class values like N, K_rev, K_time, cr_timestamp
 //- change timestamp format
 //- add author fields in $this-add_revision method
-class TriesA5
-{
+class TriesA5 {
/**
 * information about nodes is stored in array $nodes (array of arrays)
 * $nodes[$nodeId] returns an array, say, $node which
@@ -134,6 +133,7 @@
echo truncating =  . ( $time4 - $time3 ) .  sec \n;
 
}
+
/**
 * method calculates covering for current
 * revision (sets property $cCovering)
@@ -190,6 +190,7 @@
$this-cCovering = $result;
return $arrayOfLeavesId;
}
+
/**
 * given string s of length N method
 * returns leaf id that string path
@@ -309,6 +310,7 @@
return null;
}
}
+
/**
 * given covering for current revision (property $cCovering)
 * method updates all covering labels in the tree
@@ -336,6 +338,7 @@
$this-setCoveringLabel( $leafId, $labels );
}
}
+
/**
 * method sets covering labels $covLabels
 * to the leaf with node id $leafId
@@ -361,7 +364,6 @@
$this-nodes[$newNodeId] = $newNode;
return $newNodeId;

[MediaWiki-commits] [Gerrit] Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/ - change (mediawiki/core)

2013-02-26 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/
..


Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/

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

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



diff --git a/extensions/GeoData b/extensions/GeoData
index c0fecf6..6be2f14 16
--- a/extensions/GeoData
+++ b/extensions/GeoData
-Subproject commit c0fecf6747acc1f5c4cd98848cb3e9c814939e0a
+Subproject commit 6be2f14253cc59eacb716263da7d70c56d673ea1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa92b29b473f8ca9992981277793b4137ce9a29c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
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 GeoData: https://gerrit.wikimedia.org/r/#/c/50844/ - change (mediawiki/core)

2013-02-26 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/
..


Update GeoData: https://gerrit.wikimedia.org/r/#/c/50844/

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

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



diff --git a/extensions/GeoData b/extensions/GeoData
index c0fecf6..6be2f14 16
--- a/extensions/GeoData
+++ b/extensions/GeoData
-Subproject commit c0fecf6747acc1f5c4cd98848cb3e9c814939e0a
+Subproject commit 6be2f14253cc59eacb716263da7d70c56d673ea1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7573b1e5cd1972450e8d35356b0225eda94e7623
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf9
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Maintenance script: Update header - change (mediawiki...VisualEditor)

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

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


Change subject: Maintenance script: Update header
..

Maintenance script: Update header

This is a much simpler pattern and more consistent
with other extensions.

Change-Id: Ia8b31ff0573287325eeb5a878a1eb36bbf6374af
---
M maintenance/makeStaticLoader.php
1 file changed, 4 insertions(+), 7 deletions(-)


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

diff --git a/maintenance/makeStaticLoader.php b/maintenance/makeStaticLoader.php
index f8c6ba0..978f181 100644
--- a/maintenance/makeStaticLoader.php
+++ b/maintenance/makeStaticLoader.php
@@ -1,12 +1,9 @@
 ?php
-
-$path = __DIR__ . '/../../..';
-
-if ( getenv( 'MW_INSTALL_PATH' ) !== false ) {
-   $path = getenv( 'MW_INSTALL_PATH' );
+$IP = getenv( 'MW_INSTALL_PATH' );
+if ( $IP === false ) {
+   $IP = __DIR__  . '/../../..';
 }
-
-require_once( $path . '/maintenance/Maintenance.php' );
+require_once( $IP . '/maintenance/Maintenance.php' );
 
 class MakeStaticLoader extends Maintenance {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8b31ff0573287325eeb5a878a1eb36bbf6374af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (Bug 44987) Allow n=form in plural syntax - change (mediawiki/core)

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

Change subject: (Bug 44987) Allow n=form in plural syntax
..


(Bug 44987) Allow n=form in plural syntax

phpunit testcases included

Change-Id: I7be51e24a0b953dcd1f9cb21f54af9b4127a5cdb
---
M languages/Language.php
M tests/phpunit/languages/LanguageTest.php
2 files changed, 17 insertions(+), 4 deletions(-)

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



diff --git a/languages/Language.php b/languages/Language.php
index ffb3268..7611e54 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -3520,11 +3520,12 @@
return '';
}
 
-   // Handle explicit 0= and 1= forms
+   // Handle explicit n=pluralform cases
foreach ( $forms as $index = $form ) {
-   if ( isset( $form[1] )  $form[1] === '=' ) {
-   if ( $form[0] === (string) $count ) {
-   return substr( $form, 2 );
+   if ( preg_match( '/\d+=/i', $form ) ) {
+   $pos = strpos( $form, '=' );
+   if ( substr( $form, 0, $pos ) === (string) 
$count ) {
+   return substr( $form, $pos + 1 );
}
unset( $forms[$index] );
}
diff --git a/tests/phpunit/languages/LanguageTest.php 
b/tests/phpunit/languages/LanguageTest.php
index 9507714..eba63dc 100644
--- a/tests/phpunit/languages/LanguageTest.php
+++ b/tests/phpunit/languages/LanguageTest.php
@@ -1227,6 +1227,9 @@
 
function providePluralData() {
return array(
+   array( 'plural', 0, array(
+   'singular', 'plural'
+   ) ),
array( 'explicit zero', 0, array(
'0=explicit zero', 'singular', 'plural'
) ),
@@ -1239,6 +1242,15 @@
array( 'plural', 3, array(
'0=explicit zero', '1=explicit one', 
'singular', 'plural'
) ),
+   array( 'explicit elevan', 11, array(
+   'singular', 'plural', '11=explicit elevan',
+   ) ),
+   array( 'plural', 12, array(
+   'singular', 'plural', '11=explicit twelve',
+   ) ),
+   array( 'plural', 12, array(
+   'singular', 'plural', '=explicit form',
+   ) ),
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7be51e24a0b953dcd1f9cb21f54af9b4127a5cdb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
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 45417) Remove resetArticleID() call from RecentChanges:... - change (mediawiki/core)

2013-02-26 Thread IAlex (Code Review)
IAlex has uploaded a new change for review.

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


Change subject: (bug 45417) Remove resetArticleID() call from 
RecentChanges::getTitle()
..

(bug 45417) Remove resetArticleID() call from RecentChanges::getTitle()

This is doing more harm than good; see I489c406f (4769f44) for a similar issue.

The problem is that if resetArticleID() get called with a strictly positive 
value
when the page does not exist, getArticleID() will return that value indicating 
that
the page exists, but the LinkCache will return null for complementary fields, 
causing
the exception mentionned in the bug.
By removing the resetArticleID() call, the ID will get loaded from the 
LinkCache, and
thus the whole Title object is in a consistent state.
Since a LinkBatch is already executed for those titles from 
Special:Recentchanges and
Special:Watchlist, this will not increase the number of database queries for 
those
special pages (and even lowers it from what I saw on my development wiki).

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


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

diff --git a/includes/RecentChange.php b/includes/RecentChange.php
index f63e95c..6af7597 100644
--- a/includes/RecentChange.php
+++ b/includes/RecentChange.php
@@ -191,8 +191,6 @@
public function getTitle() {
if ( $this-mTitle === false ) {
$this-mTitle = Title::makeTitle( 
$this-mAttribs['rc_namespace'], $this-mAttribs['rc_title'] );
-   # Make sure the correct page ID is process cached
-   $this-mTitle-resetArticleID( 
$this-mAttribs['rc_cur_id'] );
}
return $this-mTitle;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8742cce46908ce8eb3fee55c1b6e458732b1ebd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex ialex.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove MediaWiki overrides for plural rules for Scots Gaelic... - change (mediawiki/core)

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

Change subject: Remove MediaWiki overrides for plural rules for Scots Gaelic 
(gd)
..


Remove MediaWiki overrides for plural rules for Scots Gaelic (gd)

Also cleanup the tests.

Change-Id: Ic29026a7a8128b890882b8869569309ab05e4226
---
M languages/data/plurals-mediawiki.xml
M tests/phpunit/languages/LanguageGdTest.php
2 files changed, 29 insertions(+), 27 deletions(-)

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



diff --git a/languages/data/plurals-mediawiki.xml 
b/languages/data/plurals-mediawiki.xml
index 0a380a6..14ee09b 100644
--- a/languages/data/plurals-mediawiki.xml
+++ b/languages/data/plurals-mediawiki.xml
@@ -23,21 +23,6 @@
pluralRule count=twon mod 10 is 2/pluralRule
pluralRule count=fewn mod 10 in 3..4/pluralRule
/pluralRules
-   !-- Plural form transformations
-   Based on this discussion: 
http://translatewiki.net/wiki/Thread:Support/New_plural_rules_for_Scots_Gaelic_(gd)
-   $forms[0] - 1
-   $forms[1] - 2
-   $forms[2] - 11
-   $forms[3] - 12
-   $forms[4] - 3-10, 13-19
-   $forms[5] - 0, 20, rest --
-   pluralRules locales=gd
-   pluralRule count=onen is 1/pluralRule
-   pluralRule count=twon is 2/pluralRule
-   pluralRule count=elevann is 11/pluralRule
-   pluralRule count=twelven is 12/pluralRule
-   pluralRule count=fewn in 3..10 or n in 
13..19/pluralRule
-   /pluralRules
!-- Hopefully temporary overrides for bug 40251 --
pluralRules locales=fa hu ja vi
pluralRule count=onen is 1/pluralRule
diff --git a/tests/phpunit/languages/LanguageGdTest.php 
b/tests/phpunit/languages/LanguageGdTest.php
index 409820f..5de1e9d 100644
--- a/tests/phpunit/languages/LanguageGdTest.php
+++ b/tests/phpunit/languages/LanguageGdTest.php
@@ -1,7 +1,7 @@
 ?php
 /**
  * @author Santhosh Thottingal
- * @copyright Copyright © 2012, Santhosh Thottingal
+ * @copyright Copyright © 2012-2013, Santhosh Thottingal
  * @file
  */
 
@@ -10,22 +10,39 @@
 
/** @dataProvider providerPlural */
function testPlural( $result, $value ) {
-   // The CLDR ticket for this plural forms is not same as mw 
plural forms. See http://unicode.org/cldr/trac/ticket/2883
-   $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4', 'Form 
5', 'Form 6' );
+   $forms = array( 'one', 'two', 'few', 'other' );
$this-assertEquals( $result, $this-getLang()-convertPlural( 
$value, $forms ) );
}
 
function providerPlural() {
-   return array(
-   array( 'Form 6', 0 ),
-   array( 'Form 1', 1 ),
-   array( 'Form 2', 2 ),
-   array( 'Form 3', 11 ),
-   array( 'Form 4', 12 ),
-   array( 'Form 5', 3 ),
-   array( 'Form 5', 19 ),
-   array( 'Form 6', 200 ),
+   return array (
+   array( 'other', 0 ),
+   array( 'one', 1 ),
+   array( 'two', 2 ),
+   array( 'one', 11 ),
+   array( 'two', 12 ),
+   array( 'few', 3 ),
+   array( 'few', 19 ),
+   array( 'other', 200 ),
);
}
 
+   /** @dataProvider providerPluralExplicit */
+   function testExplicitPlural( $result, $value ) {
+   $forms = array( 'one', 'two', 'few', 'other', '11=Form11', 
'12=Form12' );
+   $this-assertEquals( $result, $this-getLang()-convertPlural( 
$value, $forms ) );
+   }
+
+   function providerPluralExplicit() {
+   return array (
+   array( 'other', 0 ),
+   array( 'one', 1 ),
+   array( 'two', 2 ),
+   array( 'Form11', 11 ),
+   array( 'Form12', 12 ),
+   array( 'few', 3 ),
+   array( 'few', 19 ),
+   array( 'other', 200 ),
+   );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic29026a7a8128b890882b8869569309ab05e4226
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org

[MediaWiki-commits] [Gerrit] (bug 44745) Toolbar controller widget - change (mediawiki...Wikibase)

2013-02-26 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: (bug 44745) Toolbar controller widget
..

(bug 44745) Toolbar controller widget

Initialized in the repo's entityViewInit.js, the toolbar controller widget 
initializes
and manages all add and edit toolbars registered to the controller. This 
ensures
a clean separation between the toolbars and the actual widgets they interact 
with.

Change-Id: If9537051448bc263ce749c0b56bba2a001c4b74f
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
A lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller.js
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
12 files changed, 305 insertions(+), 66 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 7971739..e1ad64b 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -318,6 +318,16 @@
)
),
 
+   'jquery.wikibase.toolbarcontroller' = $moduleTemplate + array(
+   'scripts' = array(
+   
'jquery.wikibase./jquery.wikibase.toolbarcontroller.js',
+   ),
+   'dependencies' = array(
+   'jquery.wikibase.addtoolbar',
+   'jquery.wikibase.edittoolbar',
+   )
+   ),
+
'jquery.wikibase.addtoolbar' = $moduleTemplate + array(
'scripts' = array(
'jquery.wikibase/jquery.wikibase.addtoolbar.js',
@@ -390,7 +400,7 @@
),
'dependencies' = array(
'jquery.ui.TemplatedWidget',
-   'jquery.wikibase.edittoolbar',
+   'jquery.wikibase.toolbarcontroller',
)
),
 
@@ -451,6 +461,7 @@
),
'dependencies' = array(
'jquery.wikibase.claimview',
+   'jquery.wikibase.toolbarcontroller',
)
),
 
@@ -459,10 +470,10 @@

'jquery.wikibase/jquery.wikibase.statementview.js',
),
'dependencies' = array(
-   'jquery.wikibase.addtoolbar',
'jquery.wikibase.claimview',
'jquery.wikibase.listview',
'jquery.wikibase.referenceview',
+   'jquery.wikibase.toolbarcontroller',
'wikibase.utilities',
),
'messages' = array(
@@ -478,7 +489,7 @@
),
'dependencies' = array(
'jquery.wikibase.claimview',
-   'jquery.wikibase.edittoolbar',
+   'jquery.wikibase.toolbarcontroller',
'wikibase.templates',
),
'messages' = array(
@@ -491,9 +502,9 @@
'jquery.wikibase/jquery.wikibase.entityview.js'
),
'dependencies' = array(
-   'jquery.wikibase.addtoolbar',
'jquery.wikibase.statementview',
'jquery.wikibase.claimlistview',
+   'jquery.wikibase.toolbarcontroller',
'wikibase.templates'
),
'messages' = array(
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9cec3fe..9e9a555 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
@@ -16,6 +16,9 @@
 * The widget the toolbar shall interact with has to have implemented 
certain methods listed in
 * the _requiredMethods attribute.
 *
+* @option 

[MediaWiki-commits] [Gerrit] Remove temporary plural overrides for fa, hu, ja, vi - change (mediawiki/core)

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

Change subject: Remove temporary plural overrides for fa, hu, ja, vi
..


Remove temporary plural overrides for fa, hu, ja, vi

These overrides were done for Bug 40251, but fixed later in
I345c305134a62d43c9dfedc5243981d0e77e326d

Change-Id: I8c1cc0055722ddd31d04fbd9b6cb1215adde23c6
---
M languages/data/plurals-mediawiki.xml
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/languages/data/plurals-mediawiki.xml 
b/languages/data/plurals-mediawiki.xml
index 14ee09b..5c4f193 100644
--- a/languages/data/plurals-mediawiki.xml
+++ b/languages/data/plurals-mediawiki.xml
@@ -23,10 +23,6 @@
pluralRule count=twon mod 10 is 2/pluralRule
pluralRule count=fewn mod 10 in 3..4/pluralRule
/pluralRules
-   !-- Hopefully temporary overrides for bug 40251 --
-   pluralRules locales=fa hu ja vi
-   pluralRule count=onen is 1/pluralRule
-   /pluralRules
!-- Copied from bh --
pluralRules locales=bho
pluralRule count=onen in 0..1/pluralRule

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c1cc0055722ddd31d04fbd9b6cb1215adde23c6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
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 MySQL incompatibility - change (mediawiki...EducationProgram)

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

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


Change subject: Fix MySQL incompatibility
..

Fix MySQL incompatibility

Change-Id: If5073598e817e1609f890bf3c046d456b87f2bbe
---
M EducationProgram.hooks.php
M sql/rename_upc_index.sql
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php
index 4e36fef..051beb4 100644
--- a/EducationProgram.hooks.php
+++ b/EducationProgram.hooks.php
@@ -43,6 +43,7 @@
'course_touched',
__DIR__ . '/sql/AddTouched.sql'
);
+
$updater-renameExtensionIndex(
'ep_users_per_course',
'ep_users_per_course',
diff --git a/sql/rename_upc_index.sql b/sql/rename_upc_index.sql
index d173bfc..c15a9c3 100644
--- a/sql/rename_upc_index.sql
+++ b/sql/rename_upc_index.sql
@@ -1,5 +1,5 @@
 -- for SQLite compatibility, the index can not have the
 -- same name as a table
-DROP INDEX IF EXISTS /*i*/ep_users_per_course;
+DROP INDEX /*i*/ep_users_per_course ON /*_*/mw_ep_users_per_course;
 CREATE UNIQUE INDEX /*i*/ep_upc_user_courseid_role ON /*_*/ep_users_per_course 
(upc_user_id, upc_course_id, upc_role);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5073598e817e1609f890bf3c046d456b87f2bbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Improve settings system - change (mediawiki...EducationProgram)

2013-02-26 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Improve settings system
..


Improve settings system

* No longer forces global state usage
* Default settings are defined in standard MW fashion rather than in a method 
in the settings class (which clearly violates SRP)

Change-Id: I84a4ba1ff170a9408655fe167d5d765dc76607d2
---
M EducationProgram.php
M EducationProgram.settings.php
A includes/Settings.php
3 files changed, 151 insertions(+), 126 deletions(-)

Approvals:
  Jeroen De Dauw: Verified; Looks good to me, approved



diff --git a/EducationProgram.php b/EducationProgram.php
index e528d00..be697a5 100644
--- a/EducationProgram.php
+++ b/EducationProgram.php
@@ -59,7 +59,6 @@
 
 // Autoloading
 $wgAutoloadClasses['EducationProgram\Hooks']   
= $dir . '/EducationProgram.hooks.php';
-$wgAutoloadClasses['EducationProgram\Settings']
= $dir . '/EducationProgram.settings.php';
 
 // includes/actions (deriving from Action)
 $wgAutoloadClasses['EducationProgram\EditCourseAction']
= $dir . '/includes/actions/EditCourseAction.php';
@@ -161,6 +160,7 @@
 $wgAutoloadClasses['EducationProgram\RevisionDiff']
= $dir . '/includes/RevisionDiff.php';
 $wgAutoloadClasses['EducationProgram\DiffTable']   
= $dir . '/includes/DiffTable.php';
 $wgAutoloadClasses['EducationProgram\Menu']
= $dir . '/includes/Menu.php';
+$wgAutoloadClasses['EducationProgram\Settings']
= $dir . '/includes/Settings.php';
 $wgAutoloadClasses['EducationProgram\Timeline']
= $dir . '/includes/Timeline.php';
 $wgAutoloadClasses['EducationProgram\TimelineGroup']   
= $dir . '/includes/TimelineGroup.php';
 
@@ -688,7 +688,7 @@
 
 unset( $moduleTemplate );
 
-$egEPSettings = array();
+require_once 'EducationProgram.settings.php';
 
 // The default value for the user preferences.
 $wgDefaultUserOptions['ep_showtoplink'] = false;
diff --git a/EducationProgram.settings.php b/EducationProgram.settings.php
index 551f438..7445df4 100644
--- a/EducationProgram.settings.php
+++ b/EducationProgram.settings.php
@@ -1,129 +1,56 @@
 ?php
 
-namespace EducationProgram;
-use MWException;
+global $wgExtensionAssetsPath, $wgScriptPath;
 
-/**
- * File defining the settings for the Education Program extension.
- * More info can be found at 
https://www.mediawiki.org/wiki/Extension:Education_Program#Settings
- *
- * NOTICE:
- * Changing one of these settings can be done by assigning to $egSettings,
- * AFTER the inclusion of the extension itself.
- *
- * @since 0.1
- *
- * @file EducationProgram.settings.php
- * @ingroup EducationProgram
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  jeroended...@gmail.com 
- */
-class Settings {
+$epResourceDir = $egSWLScriptPath = $wgExtensionAssetsPath === false ? 
$wgScriptPath . '/extensions' : $wgExtensionAssetsPath;
+$epResourceDir .= '/EducationProgram/resources/';
 
-   /**
-* Returns the default values for the settings.
-* setting name (string) = setting value (mixed)
-*
-* @since 0.1
-*
-* @return array
-*/
-   protected static function getDefaultSettings() {
-   global $wgExtensionAssetsPath, $wgScriptPath;
+$egEPSettings = array(
+   'enableTopLink' = true,
+   'ambassadorPictureDomains' = array(
+   'wikimedia.org'
+   ),
+   'ambassadorCommonsUrl' = 
'https://commons.wikimedia.org/wiki/Special:UploadWizard',
+   'citylessCountries' = array(
+   'BT', 'BV', 'IO', 'VG', 'TD', 'CX', 'CC', 'KM', 'DJ', 'GQ', 
'FK', 'FX', 'TF', 'GW', 'HM', 'KI', 'YT',
+   'MS', 'NR', 'NU', 'NF', 'PN', 'SH', 'PM', 'WS', 'SC', 'GS', 
'SJ', 'TK', 'TP', 'TV', 'UM', 'VU', 'EH'
+   ),
+   'ambassadorImgWidth' = 140,
+   'ambassadorImgHeight' = 140,
+   'recentActivityLimit' = 24 * 60 * 60,
+   'resourceDir' = $epResourceDir,
+   'imageDir' = $epResourceDir . 'images/',
+   'flagWidth' = 25,
+   'flagHeight' = 25,
+   'countryFlags' = array(
+   'US' = 'Flag of the United States.svg',
+   'BR' = 'Flag of Brazil.svg',
+   'CA' = 'Flag of Canada.svg',
+   'IN' = 'Flag of India.svg',
+   'EG' = 'Flag of Egypt.svg',
+   'IT' = 'Flag of Italy.svg',
+   'MK' = 'Flag of Macedonia.svg',
+   'MX' = 'Flag of Mexico.svg',
+   'RU' = 'Flag of Russia.svg',
+   'UK' = 'Flag of the United Kingdom.svg',
+   'DE' = 'Flag of Germany.svg',
+   'NZ' = 'Flag of New Zealand.svg',
+   'CZ' = 'Flag of the Czech Republic.svg',
+   ),
+   

[MediaWiki-commits] [Gerrit] Add ssh_hba variable to turn on HBA for sshd - change (operations/puppet)

2013-02-26 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Add ssh_hba variable to turn on HBA for sshd
..

Add ssh_hba variable to turn on HBA for sshd

Gridengine (including OGS) requires host-based authentication
to use SSH rather than RSH for communication between the master
and the execution nodes.

This simply adds a variable 'ssh_hba' which can be set on 'yes'
in puppet to turn on HBA in sshd_config.

Key management will come in a different change.

Change-Id: Ibb49e71663fe2df2dd823b23f658e80a360c8a67
---
M templates/ssh/sshd_config.erb
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/50913/1

diff --git a/templates/ssh/sshd_config.erb b/templates/ssh/sshd_config.erb
index 21f5a69..8c9ef0f 100644
--- a/templates/ssh/sshd_config.erb
+++ b/templates/ssh/sshd_config.erb
@@ -41,10 +41,14 @@
 IgnoreRhosts yes
 # For this to work you will also need host keys in /etc/ssh_known_hosts
 RhostsRSAAuthentication no
-# similar for protocol version 2
+
+% if has_variable?(ssh_hba) then %
+HostbasedAuthentication %= ssh_hba %
+HostbasedUsesNameFromPacketOnly no
+% else %
 HostbasedAuthentication no
-# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
-#IgnoreUserKnownHosts yes
+% end %
+IgnoreUserKnownHosts yes
 
 # To enable empty passwords, change to yes (NOT RECOMMENDED)
 PermitEmptyPasswords no

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb49e71663fe2df2dd823b23f658e80a360c8a67
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren m...@uberbox.org

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


[MediaWiki-commits] [Gerrit] Improve SQLite compat - change (mediawiki...EducationProgram)

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

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


Change subject: Improve SQLite compat
..

Improve SQLite compat

Fix error that can be seen here 
https://integration.mediawiki.org/ci/job/mwext-EducationProgram-testextensions-master/169/console

Change-Id: I8dc631869fcf6a68767676b42d4fe9aa0a2cb4ac
---
M includes/DYKBox.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/includes/DYKBox.php b/includes/DYKBox.php
index 158e5b6..e7b3253 100644
--- a/includes/DYKBox.php
+++ b/includes/DYKBox.php
@@ -159,6 +159,9 @@
global $wgContLang;
 
$dbr = wfGetDB( DB_SLAVE );
+
+   $randomFunction = $dbr-getType() === 'sqlite' ? 'RANDOM()' : 
'RAND()';
+
$res = $dbr-selectRow(
array( 'page', 'categorylinks' ),
array( 'page_namespace', 'page_title' ),
@@ -167,7 +170,7 @@
'cl_to' = Title::newFromText( $categoryName, 
NS_CATEGORY )-getDBkey()
),
__METHOD__,
-   array( 'ORDER BY' = 'RAND()' )
+   array( 'ORDER BY' = $randomFunction )
);
 
if ( $res !== false ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dc631869fcf6a68767676b42d4fe9aa0a2cb4ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] (bug 44219) Avoid fatal errors when a revision doesn't exist... - change (mediawiki/core)

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

Change subject: (bug 44219) Avoid fatal errors when a revision doesn't exist in 
action=info
..


(bug 44219) Avoid fatal errors when a revision doesn't exist in action=info

WikiPage::getRevision() and WikiPage::getOldestRevision() may return null
when a revision does not exist; catch this in InfoAction::pageInfo().

Change-Id: If141213aedfe7c55e935105abf4415b6feced57c
---
M includes/actions/InfoAction.php
1 file changed, 46 insertions(+), 38 deletions(-)

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



diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index acb8c00..b990490 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -394,53 +394,61 @@
$lastRev = $this-page-getRevision();
$batch = new LinkBatch;
 
-   $firstRevUser = $firstRev-getUserText( Revision::FOR_THIS_USER 
);
-   if ( $firstRevUser !== '' ) {
-   $batch-add( NS_USER, $firstRevUser );
-   $batch-add( NS_USER_TALK, $firstRevUser );
+   if ( $firstRev ) {
+   $firstRevUser = $firstRev-getUserText( 
Revision::FOR_THIS_USER );
+   if ( $firstRevUser !== '' ) {
+   $batch-add( NS_USER, $firstRevUser );
+   $batch-add( NS_USER_TALK, $firstRevUser );
+   }
}
 
-   $lastRevUser = $lastRev-getUserText( Revision::FOR_THIS_USER );
-   if ( $lastRevUser !== '' ) {
-   $batch-add( NS_USER, $lastRevUser );
-   $batch-add( NS_USER_TALK, $lastRevUser );
+   if ( $lastRev ) {
+   $lastRevUser = $lastRev-getUserText( 
Revision::FOR_THIS_USER );
+   if ( $lastRevUser !== '' ) {
+   $batch-add( NS_USER, $lastRevUser );
+   $batch-add( NS_USER_TALK, $lastRevUser );
+   }
}
 
$batch-execute();
 
-   // Page creator
-   $pageInfo['header-edits'][] = array(
-   $this-msg( 'pageinfo-firstuser' ),
-   Linker::revUserTools( $firstRev )
-   );
+   if ( $firstRev ) {
+   // Page creator
+   $pageInfo['header-edits'][] = array(
+   $this-msg( 'pageinfo-firstuser' ),
+   Linker::revUserTools( $firstRev )
+   );
 
-   // Date of page creation
-   $pageInfo['header-edits'][] = array(
-   $this-msg( 'pageinfo-firsttime' ),
-   Linker::linkKnown(
-   $title,
-   $lang-userTimeAndDate( 
$firstRev-getTimestamp(), $user ),
-   array(),
-   array( 'oldid' = $firstRev-getId() )
-   )
-   );
+   // Date of page creation
+   $pageInfo['header-edits'][] = array(
+   $this-msg( 'pageinfo-firsttime' ),
+   Linker::linkKnown(
+   $title,
+   $lang-userTimeAndDate( 
$firstRev-getTimestamp(), $user ),
+   array(),
+   array( 'oldid' = $firstRev-getId() )
+   )
+   );
+   }
 
-   // Latest editor
-   $pageInfo['header-edits'][] = array(
-   $this-msg( 'pageinfo-lastuser' ),
-   Linker::revUserTools( $lastRev )
-   );
+   if ( $lastRev ) {
+   // Latest editor
+   $pageInfo['header-edits'][] = array(
+   $this-msg( 'pageinfo-lastuser' ),
+   Linker::revUserTools( $lastRev )
+   );
 
-   // Date of latest edit
-   $pageInfo['header-edits'][] = array(
-   $this-msg( 'pageinfo-lasttime' ),
-   Linker::linkKnown(
-   $title,
-   $lang-userTimeAndDate( 
$this-page-getTimestamp(), $user ),
-   array(),
-   array( 'oldid' = $this-page-getLatest() )
-   )
-   );
+   // Date of latest edit
+   $pageInfo['header-edits'][] = array(
+   $this-msg( 

[MediaWiki-commits] [Gerrit] Re-registering onBeforePageDisplay hook - change (mediawiki...Wikibase)

2013-02-26 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: Re-registering onBeforePageDisplay hook
..

Re-registering onBeforePageDisplay hook

Change I032208726699d104c8ee76ef97e3f61b5f78f334 seems to have accidentally 
removed the
onBeforePageDisplay hook from the Wikibase.php file preventing the native 
search box
being replaced by the entity selector widget.

Change-Id: Ib515bdb8ddc01072f5965b30aa12556a6821c9e9
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index c1c7b88..b8213f3 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -37,9 +37,12 @@
 final class RepoHooks {
/**
 * Handler for the BeforePageDisplay hook, simply injects 
wikibase.ui.entitysearch module
+* replacing the native search box with the entity selector widget.
 *
 * @since 0.4
 *
+* @param \OutputPage $out
+* @param \Skin $skin
 * @return boolean
 */
public static function onBeforePageDisplay( \OutputPage $out, \Skin 
$skin ) {
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 2111cee..15d7d6b 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -254,7 +254,8 @@
 
 
 // Hooks
-$wgHooks['WikibaseDefaultSettings'][]  = 
'Wikibase\RepoHooks::onWikibaseDefaultSettings';
+$wgHooks['BeforePageDisplay'][]
= 'Wikibase\RepoHooks::onBeforePageDisplay';
+$wgHooks['WikibaseDefaultSettings'][]  = 
'Wikibase\RepoHooks::onWikibaseDefaultSettings';
 $wgHooks['LoadExtensionSchemaUpdates'][]   = 
'Wikibase\RepoHooks::onSchemaUpdate';
 $wgHooks['UnitTestsList'][]= 
'Wikibase\RepoHooks::registerUnitTests';
 $wgHooks['NamespaceIsMovable'][]   = 
'Wikibase\RepoHooks::onNamespaceIsMovable';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib515bdb8ddc01072f5965b30aa12556a6821c9e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Re-enable voting for EducationProgram - change (integration/zuul-config)

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

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


Change subject: Re-enable voting for EducationProgram
..

Re-enable voting for EducationProgram

Issue it was disabled by fixed in https://gerrit.wikimedia.org/r/#/c/50914/

Change-Id: I47dcaaf596650efe91f2401a4fcfaeb47d7bebc7
---
M layout.yaml
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/16/50916/1

diff --git a/layout.yaml b/layout.yaml
index 200e8dc..330da33 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -274,11 +274,6 @@
   - name: ^mwext-GeoData-testextensions.*
 voting: false
 
-  # Lacks SQLite support https://gerrit.wikimedia.org/r/#/c/43828/
-  # Has a test not passing under SQLite
-  - name: ^mwext-EducationProgram-testextensions-master
-voting: false
-
   # LabeledSectionTransclusion has only parser tests which does not
   # play well for now. https://gerrit.wikimedia.org/r/#/c/38114 should
   # let PHPUnit load in the parser tests though. See bug 42506.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47dcaaf596650efe91f2401a4fcfaeb47d7bebc7
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Version 0.5 - change (mediawiki...Diff)

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

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


Change subject: Version 0.5
..

Version 0.5

Change-Id: I286f474600dca818546baaf34f28a4e41c27461f
---
M Diff.php
M RELEASE-NOTES
M composer.json
3 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/Diff.php b/Diff.php
index efa0b30..eaefbe3 100644
--- a/Diff.php
+++ b/Diff.php
@@ -28,7 +28,7 @@
  * @ingroup Test
  */
 
-define( 'Diff_VERSION', '0.5 alpha' );
+define( 'Diff_VERSION', '0.5' );
 
 // @codeCoverageIgnoreStart
 call_user_func( function() {
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 1bda8f3..a0f2da7 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -5,7 +5,7 @@
 
 
 === Version 0.5 ===
-(dev)
+2013-02-26
 
 ; Additions
 
diff --git a/composer.json b/composer.json
index e966380..83a8f4b 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,6 @@
 {
name: diff/diff,
type: mediawiki-extension,
-   version: 0.5-alpha,
description: Library for computing and representing diffs between 
JSON like data structures,
keywords: [diff],
homepage: https://www.mediawiki.org/wiki/Extension:Diff;,
@@ -23,6 +22,9 @@
require: {
php: =5.3.0
},
+   require-dev: {
+   phpunit/phpunit: *
+   },
suggest: {
mediawiki/core : dev-master
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I286f474600dca818546baaf34f28a4e41c27461f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Check the whole history of included files for Maintenance.php - change (mediawiki...code-utils)

2013-02-26 Thread Platonides (Code Review)
Platonides has uploaded a new change for review.

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


Change subject: Check the whole history of included files for Maintenance.php
..

Check the whole history of included files for Maintenance.php

Files for which we are not interested to use the $evaluatedFiles
cache are:
 maintenance/benchmarks/bench_*
 maintenance/cleanupTitles.php
 maintenance/cleanupImages.php
 maintenance/cleanupWatchlist.php

Change-Id: I56bd221651a99df4a7f1f6730ddc8d952719c602
---
M find-entries.php
1 file changed, 26 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/code-utils 
refs/changes/18/50918/1

diff --git a/find-entries.php b/find-entries.php
index 91a4919..101df60 100755
--- a/find-entries.php
+++ b/find-entries.php
@@ -66,12 +66,13 @@
return true;
 }
 
+$includedFilenames = array();
 /**
  * Return the filename being included or false
  */
 function getIncludeFilename( $currentFilename, $tokens, $i ) {
# Parses the /[ (]*(dirname *\( *__FILE__ *\) 
*)?T_CONSTANT_ENCAPSED_STRING[) ]*;/ regex
-   static $lastFilename = array( false,  );
+   global $includedFilenames;
 
while ( ( $tokens[$i] == '(' ) || ( $tokens[$i][0] == T_WHITESPACE ) ) {
$i++;
@@ -92,10 +93,15 @@
$filetoken = $tokens[$i];
if ( ( $filetoken[0] == T_STRING )  ( $filetoken[1] == 
'DO_MAINTENANCE' || $filetoken[1] == 'RUN_MAINTENANCE_IF_MAIN'  ) ) {
// Hack for MediaWiki maintenance
-   if ( substr( $lastFilename[1], -16 ) == '/Maintenance.php' ) {
-   $filetoken[1] = ' . str_replace( 'Maintenance.php',  
'doMaintenance.php', $lastFilename[1] ) . '; # It will be treated as clean 
for the wrong way, but the final result is right.
-   $absolute = $lastFilename[0];
-   } else {
+   foreach ( $includedFilenames as $lastFilename ) {
+   if ( substr( $lastFilename[1], -16 ) == 
'/Maintenance.php' ) {
+   $filetoken[1] = ' . str_replace( 
'Maintenance.php',  'doMaintenance.php', $lastFilename[1] ) . '; # It will be 
treated as clean for the wrong way, but the final result is right.
+   $absolute = $lastFilename[0];
+   break;
+   }
+   }
+
+   if ( !$absolute ) {
return false;
}
} else if ( $filetoken[0] != T_CONSTANT_ENCAPSED_STRING ) {
@@ -117,7 +123,8 @@
return false;
}
}
-   $lastFilename =  array( $absolute, $filename );
+
+   $includedFilenames[] = array( $absolute, $filename );
 
if ( $absolute === false  ( $filename[0] == '/' || ( substr(PHP_OS, 
0, 3) == 'WIN'  substr( $filename, 1, 3 ) == ':' ) ) ) {
$absolute = ;
@@ -134,12 +141,22 @@
return $absolute . '/' . $filename;
 }
 
+/**
+ * Returns if the analysis of a file is suitable to be cached.
+ * For MediaWiki, maintenance scripts (including Benchmarks) may be
+ * including Maintenance.php through several files and thus we are
+ * not caching them.
+ */
+function cacheableAnalysis( $path ) {
+   return strpos( $path, 'maintenance' ) === false;
+}
+
 function isEntryPoint( $file ) {
static $evaluatedFiles = array();
-   global $whitelistedFunctions;
+   global $whitelistedFunctions, $includedFilenames;
 
$rpath = realpath( $file );
-   if ( isset( $evaluatedFiles[$rpath] )  substr( $rpath, -16 ) !== 
/Benchmarker.php ) {
+   if ( isset( $evaluatedFiles[$rpath] )  cacheableAnalysis( $rpath ) ) {
return $evaluatedFiles[$rpath];
}
$evaluatedFiles[$rpath] = true;
@@ -319,6 +336,7 @@
 }
 
 foreach ( $argv as $arg ) {
+   $includedFilenames = array();
if ( isEntryPoint( $arg ) ) {
$entries++;
echo $arg is an entry point\n;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56bd221651a99df4a7f1f6730ddc8d952719c602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
Gerrit-Branch: master
Gerrit-Owner: Platonides platoni...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix margin for thumbnails in watchlist (alpha) - change (mediawiki...MobileFrontend)

2013-02-26 Thread Jdlrobson (Code Review)
Jdlrobson has submitted this change and it was merged.

Change subject: Fix margin for thumbnails in watchlist (alpha)
..


Fix margin for thumbnails in watchlist (alpha)

Change-Id: If926a6c1c4ac11625b3c0c075b27befbee8b17c4
---
M stylesheets/less/specials/watchlist.less
M stylesheets/specials/watchlist.css
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/stylesheets/less/specials/watchlist.less 
b/stylesheets/less/specials/watchlist.less
index 8876298..9ae3fed 100644
--- a/stylesheets/less/specials/watchlist.less
+++ b/stylesheets/less/specials/watchlist.less
@@ -133,7 +133,7 @@
}
 }
 
-body.beta {
+.beta, .alpha {
ul.mw-mf-watchlist-results {
li {
a.title {
diff --git a/stylesheets/specials/watchlist.css 
b/stylesheets/specials/watchlist.css
index 9a201b1..e3e9d30 100644
--- a/stylesheets/specials/watchlist.css
+++ b/stylesheets/specials/watchlist.css
@@ -118,7 +118,8 @@
 ul.mw-mf-watchlist-results li .mw-mf-user {
   margin: .5em 0 0;
 }
-body.beta ul.mw-mf-watchlist-results li a.title {
+.beta ul.mw-mf-watchlist-results li a.title,
+.alpha ul.mw-mf-watchlist-results li a.title {
   padding-left: 77px;
 }
 #mw-mf-diffview h2 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If926a6c1c4ac11625b3c0c075b27befbee8b17c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
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 breaking languages - change (mediawiki...MobileFrontend)

2013-02-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: fix typo breaking languages
..

fix typo breaking languages

3 l's not 2
current parameter not recognised

Change-Id: I16db58cbb92d3f95102c5f5e58d1a9fa2ae2c7b6
---
M javascripts/common/mf-history-jquery.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/javascripts/common/mf-history-jquery.js 
b/javascripts/common/mf-history-jquery.js
index 99aabc4..a65fcbb 100644
--- a/javascripts/common/mf-history-jquery.js
+++ b/javascripts/common/mf-history-jquery.js
@@ -130,7 +130,7 @@
prop: 'langlinks',
format: 'json',
llurl: true,
-   llimit: 'max',
+   lllimit: 'max',
titles: title
}
} ).done( function( resp ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16db58cbb92d3f95102c5f5e58d1a9fa2ae2c7b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Put the check for empty comment outside of the section ancho... - change (mediawiki/core)

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

Change subject: Put the check for empty comment outside of the section anchor 
section of EditPage::internalAttemptSave()
..


Put the check for empty comment outside of the section anchor section of 
EditPage::internalAttemptSave()

Also reorganise checks for better clarity

Change-Id: Ib75b2c0b0c240459d58618eed283b547aaefd7f6
---
M includes/EditPage.php
1 file changed, 22 insertions(+), 25 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 5434dab..8a3d630 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1561,43 +1561,40 @@
return $status;
}
 
-   # Handle the user preference to force summaries here, 
but not for null edits
-   if ( $this-section != 'new'  
!$this-allowBlankSummary
-!$content-equals( 
$this-getOriginalContent() )
-!$content-isRedirect() ) # check if it's 
not a redirect
-   {
-   if ( md5( $this-summary ) == $this-autoSumm ) 
{
-   $this-missingSummary = true;
-   $status-fatal( 'missingsummary' );
-   $status-value = 
self::AS_SUMMARY_NEEDED;
-   wfProfileOut( __METHOD__ );
-   return $status;
-   }
-   }
-
-   # And a similar thing for new sections
-   if ( $this-section == 'new'  
!$this-allowBlankSummary ) {
-   if ( trim( $this-summary ) == '' ) {
+   if ( $this-section == 'new' ) {
+   // Handle the user preference to force 
summaries here
+   if ( !$this-allowBlankSummary  trim( 
$this-summary ) == '' ) {
$this-missingSummary = true;
$status-fatal( 'missingsummary' ); // 
or 'missingcommentheader' if $section == 'new'. Blegh
$status-value = 
self::AS_SUMMARY_NEEDED;
wfProfileOut( __METHOD__ );
return $status;
}
+
+   // Do not allow the user to post an empty 
comment
+   if ( $this-textbox1 == '' ) {
+   $this-missingComment = true;
+   $status-fatal( 'missingcommenttext' );
+   $status-value = self::AS_TEXTBOX_EMPTY;
+   wfProfileOut( __METHOD__ );
+   return $status;
+   }
+   } elseif ( !$this-allowBlankSummary
+!$content-equals( 
$this-getOriginalContent() )
+!$content-isRedirect()
+md5( $this-summary ) == $this-autoSumm
+   ) {
+   $this-missingSummary = true;
+   $status-fatal( 'missingsummary' );
+   $status-value = self::AS_SUMMARY_NEEDED;
+   wfProfileOut( __METHOD__ );
+   return $status;
}
 
# All's well
wfProfileIn( __METHOD__ . '-sectionanchor' );
$sectionanchor = '';
if ( $this-section == 'new' ) {
-   if ( $this-textbox1 == '' ) {
-   $this-missingComment = true;
-   $status-fatal( 'missingcommenttext' );
-   $status-value = self::AS_TEXTBOX_EMPTY;
-   wfProfileOut( __METHOD__ . 
'-sectionanchor' );
-   wfProfileOut( __METHOD__ );
-   return $status;
-   }
if ( $this-sectiontitle !== '' ) {
$sectionanchor = 
$wgParser-guessLegacySectionNameFromWikiText( $this-sectiontitle );
// If no edit summary was specified, 
create one automatically from the section

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

Gerrit-MessageType: merged

[MediaWiki-commits] [Gerrit] Revert damage of a bad merge/rebase - change (mediawiki...MobileFrontend)

2013-02-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Revert damage of a bad merge/rebase
..

Revert damage of a bad merge/rebase

This seems to have been removed somewhere and shouldn't have
been

Change-Id: I259113bd3ed7af71e32a43a61eac2c97ab943c34
---
M MobileFrontend.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index c3c10aa..1523030 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -343,6 +343,7 @@
'stylesheets/modules/mf-tables.css',
),
'scripts' = array(
+   'javascripts/modules/mf-inline-style-scrubber.js',
'javascripts/modules/mf-random.js',
'javascripts/modules/mf-tables.js',
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I259113bd3ed7af71e32a43a61eac2c97ab943c34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] alpha: slight tweak to tables - change (mediawiki...MobileFrontend)

2013-02-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: alpha: slight tweak to tables
..

alpha: slight tweak to tables

now one click expands the table, clicking again
collapses it again

using css transforms to avoid using another image

Change-Id: I61bc9bb22b958f840a04ebc31811869f0d8e931e
---
M javascripts/modules/mf-tables.js
M stylesheets/less/modules/mf-tables.less
M stylesheets/modules/mf-tables.css
3 files changed, 18 insertions(+), 9 deletions(-)


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

diff --git a/javascripts/modules/mf-tables.js b/javascripts/modules/mf-tables.js
index eba93e5..ee375c8 100644
--- a/javascripts/modules/mf-tables.js
+++ b/javascripts/modules/mf-tables.js
@@ -34,16 +34,14 @@
 
// make the vertical expando
$tr = $( 'tr class=expandoVertical' 
).appendTo( $tc );
-   $( 'td' ).text( 'more' ).attr( 
'colspan', colspan ).appendTo( $tr );
+   $( 'tdnbsp;/td' ).attr( 'colspan', 
colspan ).appendTo( $tr );
$tr.on( 'click', function() {
-   var oldHeight = $t.height(),
-   newHeight = oldHeight + 
STEP_SIZE;
-   if ( newHeight  maxHeight ) {
-   $t.height( newHeight );
-   } else {
-   $t.css( 'height', '' );
-   $tr.remove();
-   }
+   var height,
+   expand = $tr.hasClass( 
'expanded' ) ? true : false;
+   height = expand ? STEP_SIZE : 
'';
+   $t.css( 'height', height );
+   $tr.toggleClass( 'expanded' );
+   window.scrollTo( 0, 
$tr.offset().top );
} );
 
}
diff --git a/stylesheets/less/modules/mf-tables.less 
b/stylesheets/less/modules/mf-tables.less
index 68d2952..4f5eb2e 100644
--- a/stylesheets/less/modules/mf-tables.less
+++ b/stylesheets/less/modules/mf-tables.less
@@ -41,6 +41,13 @@
tr.expandoVertical {
bottom: 0;
 
+   .expanded {
+   td {
+   -webkit-transform: 
rotate(180deg);
+   transform: rotate(180deg);
+   }
+   }
+
td {
text-indent: -999px;
overflow: hidden;
diff --git a/stylesheets/modules/mf-tables.css 
b/stylesheets/modules/mf-tables.css
index 0b3fb1a..25e4efb 100644
--- a/stylesheets/modules/mf-tables.css
+++ b/stylesheets/modules/mf-tables.css
@@ -32,6 +32,10 @@
 #content table.expando tbody tr.expandoVertical {
   bottom: 0;
 }
+#content table.expando tbody tr.expandoVertical.expanded td {
+  -webkit-transform: rotate(180deg);
+  transform: rotate(180deg);
+}
 #content table.expando tbody tr.expandoVertical td {
   text-indent: -999px;
   overflow: hidden;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61bc9bb22b958f840a04ebc31811869f0d8e931e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 44934) Remove link to Special:PropertyDisambiguation in... - change (mediawiki...Wikibase)

2013-02-26 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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


Change subject: (bug 44934) Remove link to Special:PropertyDisambiguation in 
new property page
..

(bug 44934) Remove link to Special:PropertyDisambiguation in new property page

We still need a need for some better way to search for properties. Once we have 
something
like that, then it would be nice to link to that from Special:NewProperty.  
Until then,
it's silly to link to a special page that does not exist.

Change-Id: I6313038bcc9f098d562f277549b5382b1bba4cde
---
M repo/Wikibase.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 7c6bec9..0bc6935 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -131,7 +131,7 @@
'wikibase-itemdisambiguation-invalid-langcode' = 'Sorry, the language 
identifier you have provided is unknown to the system. Please use a valid 
identifier like en.',
'wikibase-itemdisambiguation-description' = 'Values used for searching 
must be the complete text entry. Language is an identifier, such as en.',
'special-newproperty' = 'Create a new property',
-   'wikibase-newproperty-summary' = 'Make sure to 
[[Special:PropertyDisambiguation|check if the property already exists]]!br 
/You should create a [[Help:Label|label]] and a 
[[Help:Description|description]] for all new properties, and in addition a 
valid property type.',
+   'wikibase-newproperty-summary' = 'Make sure to check if the property 
already exists!br /You should create a [[Help:Label|label]] and a 
[[Help:Description|description]] for all new properties, and in addition a 
valid property type.',
'wikibase-newproperty-fieldset' = 'Create a new property',
'wikibase-newproperty-datatype' = 'Data type:',
'wikibase-newproperty-invalid-datatype' = 'Invalid datatype specified',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6313038bcc9f098d562f277549b5382b1bba4cde
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Removed author names from individual files and updated AUTHO... - change (mediawiki...Parsoid)

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

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


Change subject: Removed author names from individual files and updated 
AUTHORS.txt
..

Removed author names from individual files and updated AUTHORS.txt

Change-Id: I6eba8acb530f9d52492e5afd1747f6176b80e7f2
---
M AUTHORS.txt
M js/lib/ext.core.BehaviorSwitchHandler.js
M js/lib/ext.util.TokenAndAttrCollector.js
M js/tests/dumpGrepper.js
M js/tests/parse.js
M js/tests/parserTests.js
6 files changed, 8 insertions(+), 18 deletions(-)


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

diff --git a/AUTHORS.txt b/AUTHORS.txt
index efdb212..e89cdd2 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -1,12 +1,18 @@
 Full list of authors, by number of lines in revision
-ad8d60a7e739c3c537746c7b8b38f88cf01cfefb Dec 27 2012:
+fd57d9a56c67e2c150782f9564b34f17c70442ec Feb 26 2013:
+
+[ Authors from older revisions may not show up in
+  newer revisions -- so continue to add names to
+  this list, please do not remove. ]
 
 Gabriel Wicke gwi...@wikimedia.org
 Subramanya Sastry ssas...@wikimedia.org
 Mark Holmquist mtrac...@member.fsf.org
 Adam Wight awi...@wikimedia.org
+C. Scott Ananian csc...@cscott.net
 Catrope r...@wikimedia.org
 Brion Vibber br...@wikimedia.org
+plancalculus j...@monoid-it.de
 Siebrand Mazeland s.mazel...@xs4all.nl
 Antoine Musso has...@free.fr
 lwelling lwell...@wikimedia.org
@@ -25,6 +31,5 @@
 Same for mail adresses:
 
 git ls-tree -r HEAD|cut -f 2|grep -E '\.(js|cc|h|cpp|hpp|c|txt|sh)$' | grep -v 
-E 'scripts|html5'   |xargs -n1 git blame --line-porcelain|grep -e 
^author-mail |sort|uniq -c|sort -nr
-
 
 Please see git blame for per-file information.
diff --git a/js/lib/ext.core.BehaviorSwitchHandler.js 
b/js/lib/ext.core.BehaviorSwitchHandler.js
index 7e53440..5d51998 100644
--- a/js/lib/ext.core.BehaviorSwitchHandler.js
+++ b/js/lib/ext.core.BehaviorSwitchHandler.js
@@ -1,8 +1,5 @@
 use strict;
 
-/**
- */
-
 var Util = require('./mediawiki.Util.js').Util;
 
 function BehaviorSwitchHandler( manager, options ) {
diff --git a/js/lib/ext.util.TokenAndAttrCollector.js 
b/js/lib/ext.util.TokenAndAttrCollector.js
index 6e6068b..24410e8 100644
--- a/js/lib/ext.util.TokenAndAttrCollector.js
+++ b/js/lib/ext.util.TokenAndAttrCollector.js
@@ -42,9 +42,6 @@
  * ideally should not be supported/seen in wikitext.  This support may
  * evolve in the future to issue appropriate warnings/error messages to
  * encourage fixing up the relevant pages.
- *
- * Authors: Subramanya Sastry ssas...@wikimedia.org
- *  Gabriel Wicke gwi...@wikimedia.org
  *  */
 
 use strict;
diff --git a/js/tests/dumpGrepper.js b/js/tests/dumpGrepper.js
index 23dc4e1..66882a3 100644
--- a/js/tests/dumpGrepper.js
+++ b/js/tests/dumpGrepper.js
@@ -1,7 +1,5 @@
 /**
  * A simple dump grepper based on the DumpReader module.
- *
- * @author Gabriel Wicke gwi...@wikimedia.org
  */
 
 var dumpReader = require('./dumpReader.js'),
@@ -50,7 +48,7 @@
optimist.showHelp();
process.exit( 0 );
}
-   
+
var flags = 'g';
if(argv.i) {
flags += 'i';
diff --git a/js/tests/parse.js b/js/tests/parse.js
index 0e2e146..d95d99e 100644
--- a/js/tests/parse.js
+++ b/js/tests/parse.js
@@ -1,9 +1,6 @@
 /**
  * Command line parse utility.
  * Read from STDIN, write to STDOUT.
- *
- * @author Neil Kandalgaonkar ne...@wikimedia.org
- * @author Gabriel Wicke gwi...@wikimedia.org
  */
 
 var ParserPipelineFactory = 
require('../lib/mediawiki.parser.js').ParserPipelineFactory,
diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index 07dd5a3..878fd8e 100644
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -3,10 +3,6 @@
  *
  * This pulls all the parserTests.txt items and runs them through the JS
  * parser and JS HTML renderer.
- *
- * @author Brion Vibber br...@pobox.com
- * @author Gabriel Wicke gwi...@wikimedia.org
- * @author Neil Kandalgaonkar ne...@wikimedia.org
  */
 
 (function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6eba8acb530f9d52492e5afd1747f6176b80e7f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 44934) Remove link to Special:PropertyDisambiguation in... - change (mediawiki...Wikibase)

2013-02-26 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: (bug 44934) Remove link to Special:PropertyDisambiguation in 
new property page
..


(bug 44934) Remove link to Special:PropertyDisambiguation in new property page

We still need a need for some better way to search for properties. Once we have 
something
like that, then it would be nice to link to that from Special:NewProperty.  
Until then,
it's silly to link to a special page that does not exist.

Change-Id: I6313038bcc9f098d562f277549b5382b1bba4cde
---
M repo/Wikibase.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 7c6bec9..0bc6935 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -131,7 +131,7 @@
'wikibase-itemdisambiguation-invalid-langcode' = 'Sorry, the language 
identifier you have provided is unknown to the system. Please use a valid 
identifier like en.',
'wikibase-itemdisambiguation-description' = 'Values used for searching 
must be the complete text entry. Language is an identifier, such as en.',
'special-newproperty' = 'Create a new property',
-   'wikibase-newproperty-summary' = 'Make sure to 
[[Special:PropertyDisambiguation|check if the property already exists]]!br 
/You should create a [[Help:Label|label]] and a 
[[Help:Description|description]] for all new properties, and in addition a 
valid property type.',
+   'wikibase-newproperty-summary' = 'Make sure to check if the property 
already exists!br /You should create a [[Help:Label|label]] and a 
[[Help:Description|description]] for all new properties, and in addition a 
valid property type.',
'wikibase-newproperty-fieldset' = 'Create a new property',
'wikibase-newproperty-datatype' = 'Data type:',
'wikibase-newproperty-invalid-datatype' = 'Invalid datatype specified',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6313038bcc9f098d562f277549b5382b1bba4cde
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
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 possibility for the user to disable sorting, and chang... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: Added possibility for the user to disable sorting, and changed 
a bit the sorting function.
..

Added possibility for the user to disable sorting,
and changed a bit the sorting function.

Change-Id: I36fa0245de2e07cd084642d5ffa6152e68884d9e
---
M OmegaWiki/resources/omegawiki-ajax.js
1 file changed, 22 insertions(+), 10 deletions(-)


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

diff --git a/OmegaWiki/resources/omegawiki-ajax.js 
b/OmegaWiki/resources/omegawiki-ajax.js
index f01705e..2cfa391 100644
--- a/OmegaWiki/resources/omegawiki-ajax.js
+++ b/OmegaWiki/resources/omegawiki-ajax.js
@@ -3,9 +3,13 @@
 * Some javascript that is run when the page finished loading
 */
 
-   // First, sort the table on languages
-   sortTablesOnLanguages();
-   
+   // document.OWnosort can be set in the user .js to disable
+   // sorting for faster page loads
+   if ( ! document.OWnosort ) {
+   // sort the tables on language
+   sortTablesOnLanguages();
+   }
+
// add and manage arrows to navigate the tabs
if ( $(.wd-tablist).length ) {
initializeTabs();
@@ -59,13 +63,21 @@
'ä':'ae', 'ö' : 'oe', 'ß': 'ss', 'ü':'ue' // German 
characters
});
 
-   // start the tablesorter jquery plugin, only for tables having 
a language (or exp) column
-   tablesToSort = 
$(th.language,th.exp).parents(table.wiki-data-table);
-   
-   $(tablesToSort).tablesorter();
-   $(tablesToSort).find(th.headerSort.language).click();
-   // for syntrans table, the headerSort is not on language but on 
expression
-   $(tablesToSort).find(th.headerSort.exp).click();
+   // sort the definitions in the DM namespace
+   $(div.expand-dm-def-transl).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.language).click();
+
+   // sort the definitions in the Expression namespace
+   
$(div.expand-exp-meanings-exact-dm-def-transl).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.language).click();
+
+   // sort the translations in the DM namespace
+   $(div.expand-dm-syntrans).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.exp:first).click();
+
+   // sort the translations in the Expression namespace
+   
$(div.expand-exp-meanings-exact-dm-syntrans).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.exp:first).click();
 
// now disable sorting for users
$(.jquery-tablesorter).find(th).off(click);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36fa0245de2e07cd084642d5ffa6152e68884d9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] Prevent unauthorized users from modifying the identical mean... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: Prevent unauthorized users from modifying the identical meaning 
selector.
..

Prevent unauthorized users from modifying the identical meaning selector.

Change-Id: Ida339d2bbd0d336f989646c175f7a79c0a2accf2
---
M OmegaWiki/Editor.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index f951fad..dd02f2f 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1516,6 +1516,11 @@
}
 
public function getEditHTML( IdStack $idPath, $value ) {
+   global $wgUser;
+   if ( ! $wgUser-isAllowed( 'deletewikidata-uw' ) ) {
+   return $this-getViewHTML( $idPath, $value );
+   }
+
// $value is what is returned from the database, i.e. an 
integer, 0 or 1
if ( $value == 0 ) {
return getSelect( $this-updateId( $idPath-getId() ), 
$this-textValuesEdit, false );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida339d2bbd0d336f989646c175f7a79c0a2accf2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] switched the destination language / source language for a mo... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: switched the destination language / source language for a more 
natural order.
..

switched the destination language / source language for a more
natural order.

Change-Id: I5e24a4989ce0fbbd6a7160e2c62f18d2d48ef8f3
---
M OmegaWiki/SpecialNeedsTranslation.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/OmegaWiki/SpecialNeedsTranslation.php 
b/OmegaWiki/SpecialNeedsTranslation.php
index a87e6ee..1d0e1bc 100644
--- a/OmegaWiki/SpecialNeedsTranslation.php
+++ b/OmegaWiki/SpecialNeedsTranslation.php
@@ -25,8 +25,8 @@
 
$wgOut-addHTML( getOptionPanel(
array(
-   wfMsg( 'ow_needs_xlation_dest_lang' ) = 
getSuggest( 'to-lang', 'language', array(), $destinationLanguageId, 
languageIdAsText( $destinationLanguageId ) ),
wfMsg( 'ow_needs_xlation_source_lang' ) = 
getSuggest( 'from-lang', 'language', array(), $sourceLanguageId, 
languageIdAsText( $sourceLanguageId ) ),
+   wfMsg( 'ow_needs_xlation_dest_lang' ) = 
getSuggest( 'to-lang', 'language', array(), $destinationLanguageId, 
languageIdAsText( $destinationLanguageId ) ),
wfMsg( 'ow_Collection_colon' ) = getSuggest( 
'collection', 'collection', array(), $collectionId, collectionIdAsText( 
$collectionId ) )
)
) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e24a4989ce0fbbd6a7160e2c62f18d2d48ef8f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] Get language-specific annotations also for lexical annotatio... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: Get language-specific annotations also for lexical annotations 
of the current syntrans being viewed.
..

Get language-specific annotations also for lexical annotations of
the current syntrans being viewed.

Change-Id: Ic221b1d75b574f0ba35afba7facb7c8e0fef9415
---
M OmegaWiki/Editor.php
M OmegaWiki/SpecialSuggest.php
M OmegaWiki/forms.php
3 files changed, 17 insertions(+), 8 deletions(-)


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

diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index dd02f2f..e4a62d6 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1708,16 +1708,24 @@
 
public function add( IdStack $idPath ) {
if ( $this-isAddField ) {
-   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
-   if ( $syntransId ==  ) $syntransId = 0 ; // in the 
case of a DM option attribute, there is no syntrans in the PathId
-
$parameters = array(
level = $this-attributesLevelName,
definedMeaningId = 
$idPath-getDefinedMeaningId(),
-   syntransId = $syntransId,
annotationAttributeId = 
$idPath-getAnnotationAttribute()-getId()
);
 
+   if ( $this-attributesLevelName == 
WLD_SYNTRANS_MEANING_NAME ) {
+   // find and add syntransId as a parameter
+   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
+   if ( $syntransId ==  ) {
+   // second tentative, sometimes it is 
called objectId
+   $syntransId = 
$idPath-getKeyStack()-peek( 0 )-objectId;
+   }
+   if ( $syntransId !=  ) {
+   $parameters[syntransId] = $syntransId;
+   }
+   }
+
return getSuggest( $this-addId( $idPath-getId() ), 
$this-suggestType(), $parameters );
}
else
diff --git a/OmegaWiki/SpecialSuggest.php b/OmegaWiki/SpecialSuggest.php
index 322df36..374d150 100644
--- a/OmegaWiki/SpecialSuggest.php
+++ b/OmegaWiki/SpecialSuggest.php
@@ -259,7 +259,7 @@
 
$classMids = $wgDefaultClassMids ;
 
-   if ( ( $syntransId != 0 )  ( 
!is_null($wgIso639_3CollectionId)) ) {
+   if ( ( !is_null($syntransId) )  ( 
!is_null($wgIso639_3CollectionId)) ) {
// find the language of the syntrans and add attributes 
of that language by adding the language DM to the list of default classes
// this first query returns the language_id
$sql = 'SELECT language_id' .
diff --git a/OmegaWiki/forms.php b/OmegaWiki/forms.php
index 721fbf3..d2985ec 100644
--- a/OmegaWiki/forms.php
+++ b/OmegaWiki/forms.php
@@ -133,9 +133,10 @@
'input type=hidden id=' . $name . ' name=' . 
$name . ' value=' . $value . '/' .
'input type=hidden id=' . $name . 
'-suggest-dataset value=' . $dc . '/';
 
-   foreach ( $parameters as $parameter = $parameterValue )
-   $result .=
-   'input type=hidden id=' . $name . 
'-suggest-parameter-' . $parameter . ' name=' . $parameter . ' value=' . 
$parameterValue . '/';
+   foreach ( $parameters as $parameter = $parameterValue ) {
+   $inputID = $name . '-suggest-parameter-' . $parameter;
+   $result .= HTML::hidden( $parameter, $parameterValue , array( 
id = $inputID ) );
+   }
 
$result .=
'span id=' . $name . '-suggest-link class=suggest-link 
title=' . wfMsgSc( SuggestHint ) . '' . $label . '/span' .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic221b1d75b574f0ba35afba7facb7c8e0fef9415
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] Added possibility for the user to disable sorting, and chang... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Added possibility for the user to disable sorting, and changed 
a bit the sorting function.
..


Added possibility for the user to disable sorting,
and changed a bit the sorting function.

Change-Id: I36fa0245de2e07cd084642d5ffa6152e68884d9e
---
M OmegaWiki/resources/omegawiki-ajax.js
1 file changed, 22 insertions(+), 10 deletions(-)

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



diff --git a/OmegaWiki/resources/omegawiki-ajax.js 
b/OmegaWiki/resources/omegawiki-ajax.js
index f01705e..2cfa391 100644
--- a/OmegaWiki/resources/omegawiki-ajax.js
+++ b/OmegaWiki/resources/omegawiki-ajax.js
@@ -3,9 +3,13 @@
 * Some javascript that is run when the page finished loading
 */
 
-   // First, sort the table on languages
-   sortTablesOnLanguages();
-   
+   // document.OWnosort can be set in the user .js to disable
+   // sorting for faster page loads
+   if ( ! document.OWnosort ) {
+   // sort the tables on language
+   sortTablesOnLanguages();
+   }
+
// add and manage arrows to navigate the tabs
if ( $(.wd-tablist).length ) {
initializeTabs();
@@ -59,13 +63,21 @@
'ä':'ae', 'ö' : 'oe', 'ß': 'ss', 'ü':'ue' // German 
characters
});
 
-   // start the tablesorter jquery plugin, only for tables having 
a language (or exp) column
-   tablesToSort = 
$(th.language,th.exp).parents(table.wiki-data-table);
-   
-   $(tablesToSort).tablesorter();
-   $(tablesToSort).find(th.headerSort.language).click();
-   // for syntrans table, the headerSort is not on language but on 
expression
-   $(tablesToSort).find(th.headerSort.exp).click();
+   // sort the definitions in the DM namespace
+   $(div.expand-dm-def-transl).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.language).click();
+
+   // sort the definitions in the Expression namespace
+   
$(div.expand-exp-meanings-exact-dm-def-transl).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.language).click();
+
+   // sort the translations in the DM namespace
+   $(div.expand-dm-syntrans).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.exp:first).click();
+
+   // sort the translations in the Expression namespace
+   
$(div.expand-exp-meanings-exact-dm-syntrans).children(.wiki-data-table)
+   .tablesorter().find(th.headerSort.exp:first).click();
 
// now disable sorting for users
$(.jquery-tablesorter).find(th).off(click);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36fa0245de2e07cd084642d5ffa6152e68884d9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com
Gerrit-Reviewer: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] Prevent unauthorized users from modifying the identical mean... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Prevent unauthorized users from modifying the identical meaning 
selector.
..


Prevent unauthorized users from modifying the identical meaning selector.

Change-Id: Ida339d2bbd0d336f989646c175f7a79c0a2accf2
---
M OmegaWiki/Editor.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index f951fad..dd02f2f 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1516,6 +1516,11 @@
}
 
public function getEditHTML( IdStack $idPath, $value ) {
+   global $wgUser;
+   if ( ! $wgUser-isAllowed( 'deletewikidata-uw' ) ) {
+   return $this-getViewHTML( $idPath, $value );
+   }
+
// $value is what is returned from the database, i.e. an 
integer, 0 or 1
if ( $value == 0 ) {
return getSelect( $this-updateId( $idPath-getId() ), 
$this-textValuesEdit, false );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida339d2bbd0d336f989646c175f7a79c0a2accf2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com
Gerrit-Reviewer: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] switched the destination language / source language for a mo... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: switched the destination language / source language for a more 
natural order.
..


switched the destination language / source language for a more
natural order.

Change-Id: I5e24a4989ce0fbbd6a7160e2c62f18d2d48ef8f3
---
M OmegaWiki/SpecialNeedsTranslation.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/OmegaWiki/SpecialNeedsTranslation.php 
b/OmegaWiki/SpecialNeedsTranslation.php
index a87e6ee..1d0e1bc 100644
--- a/OmegaWiki/SpecialNeedsTranslation.php
+++ b/OmegaWiki/SpecialNeedsTranslation.php
@@ -25,8 +25,8 @@
 
$wgOut-addHTML( getOptionPanel(
array(
-   wfMsg( 'ow_needs_xlation_dest_lang' ) = 
getSuggest( 'to-lang', 'language', array(), $destinationLanguageId, 
languageIdAsText( $destinationLanguageId ) ),
wfMsg( 'ow_needs_xlation_source_lang' ) = 
getSuggest( 'from-lang', 'language', array(), $sourceLanguageId, 
languageIdAsText( $sourceLanguageId ) ),
+   wfMsg( 'ow_needs_xlation_dest_lang' ) = 
getSuggest( 'to-lang', 'language', array(), $destinationLanguageId, 
languageIdAsText( $destinationLanguageId ) ),
wfMsg( 'ow_Collection_colon' ) = getSuggest( 
'collection', 'collection', array(), $collectionId, collectionIdAsText( 
$collectionId ) )
)
) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e24a4989ce0fbbd6a7160e2c62f18d2d48ef8f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com
Gerrit-Reviewer: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] Get language-specific annotations also for lexical annotatio... - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Get language-specific annotations also for lexical annotations 
of the current syntrans being viewed.
..


Get language-specific annotations also for lexical annotations of
the current syntrans being viewed.

Change-Id: Ic221b1d75b574f0ba35afba7facb7c8e0fef9415
---
M OmegaWiki/Editor.php
M OmegaWiki/SpecialSuggest.php
M OmegaWiki/forms.php
3 files changed, 17 insertions(+), 8 deletions(-)

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



diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index dd02f2f..e4a62d6 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1708,16 +1708,24 @@
 
public function add( IdStack $idPath ) {
if ( $this-isAddField ) {
-   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
-   if ( $syntransId ==  ) $syntransId = 0 ; // in the 
case of a DM option attribute, there is no syntrans in the PathId
-
$parameters = array(
level = $this-attributesLevelName,
definedMeaningId = 
$idPath-getDefinedMeaningId(),
-   syntransId = $syntransId,
annotationAttributeId = 
$idPath-getAnnotationAttribute()-getId()
);
 
+   if ( $this-attributesLevelName == 
WLD_SYNTRANS_MEANING_NAME ) {
+   // find and add syntransId as a parameter
+   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
+   if ( $syntransId ==  ) {
+   // second tentative, sometimes it is 
called objectId
+   $syntransId = 
$idPath-getKeyStack()-peek( 0 )-objectId;
+   }
+   if ( $syntransId !=  ) {
+   $parameters[syntransId] = $syntransId;
+   }
+   }
+
return getSuggest( $this-addId( $idPath-getId() ), 
$this-suggestType(), $parameters );
}
else
diff --git a/OmegaWiki/SpecialSuggest.php b/OmegaWiki/SpecialSuggest.php
index 322df36..374d150 100644
--- a/OmegaWiki/SpecialSuggest.php
+++ b/OmegaWiki/SpecialSuggest.php
@@ -259,7 +259,7 @@
 
$classMids = $wgDefaultClassMids ;
 
-   if ( ( $syntransId != 0 )  ( 
!is_null($wgIso639_3CollectionId)) ) {
+   if ( ( !is_null($syntransId) )  ( 
!is_null($wgIso639_3CollectionId)) ) {
// find the language of the syntrans and add attributes 
of that language by adding the language DM to the list of default classes
// this first query returns the language_id
$sql = 'SELECT language_id' .
diff --git a/OmegaWiki/forms.php b/OmegaWiki/forms.php
index 721fbf3..d2985ec 100644
--- a/OmegaWiki/forms.php
+++ b/OmegaWiki/forms.php
@@ -133,9 +133,10 @@
'input type=hidden id=' . $name . ' name=' . 
$name . ' value=' . $value . '/' .
'input type=hidden id=' . $name . 
'-suggest-dataset value=' . $dc . '/';
 
-   foreach ( $parameters as $parameter = $parameterValue )
-   $result .=
-   'input type=hidden id=' . $name . 
'-suggest-parameter-' . $parameter . ' name=' . $parameter . ' value=' . 
$parameterValue . '/';
+   foreach ( $parameters as $parameter = $parameterValue ) {
+   $inputID = $name . '-suggest-parameter-' . $parameter;
+   $result .= HTML::hidden( $parameter, $parameterValue , array( 
id = $inputID ) );
+   }
 
$result .=
'span id=' . $name . '-suggest-link class=suggest-link 
title=' . wfMsgSc( SuggestHint ) . '' . $label . '/span' .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic221b1d75b574f0ba35afba7facb7c8e0fef9415
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com
Gerrit-Reviewer: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] (bug 45417) Remove resetArticleID() call from RecentChanges:... - change (mediawiki/core)

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

Change subject: (bug 45417) Remove resetArticleID() call from 
RecentChanges::getTitle()
..


(bug 45417) Remove resetArticleID() call from RecentChanges::getTitle()

This is doing more harm than good; see I489c406f (4769f44) for a similar issue.

The problem is that if resetArticleID() get called with a strictly positive 
value
when the page does not exist, getArticleID() will return that value indicating 
that
the page exists, but the LinkCache will return null for complementary fields, 
causing
the exception mentionned in the bug.
By removing the resetArticleID() call, the ID will get loaded from the 
LinkCache, and
thus the whole Title object is in a consistent state.
Since a LinkBatch is already executed for those titles from 
Special:Recentchanges and
Special:Watchlist, this will not increase the number of database queries for 
those
special pages (and even lowers it from what I saw on my development wiki).

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

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



diff --git a/includes/RecentChange.php b/includes/RecentChange.php
index f63e95c..6af7597 100644
--- a/includes/RecentChange.php
+++ b/includes/RecentChange.php
@@ -191,8 +191,6 @@
public function getTitle() {
if ( $this-mTitle === false ) {
$this-mTitle = Title::makeTitle( 
$this-mAttribs['rc_namespace'], $this-mAttribs['rc_title'] );
-   # Make sure the correct page ID is process cached
-   $this-mTitle-resetArticleID( 
$this-mAttribs['rc_cur_id'] );
}
return $this-mTitle;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8742cce46908ce8eb3fee55c1b6e458732b1ebd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex ialex.w...@gmail.com
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tidy up and document JavaScript API - change (mediawiki...EventLogging)

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

Change subject: Tidy up and document JavaScript API
..


Tidy up and document JavaScript API

I first tried this using jsduck and found that I disliked it intensely. I tried
out YUIDoc and decided I like it better. It may be better still to use Sphinx's
JavaScript domain, for consistency with the Python codebase, but for now this
seems to work well enough.

In the process of tidying up the documentation, I cleaned up some bits of code.

* Got rid of 'getSchema' altogether.
* Renamed 'setSchema' to 'declareSchema'. 'declareSchema' was always the better
  name, but I kept it as 'setSchema' for consistency with 'getSchema'. (I kept
  a 'setSchema' alias to prevent schema modules from breaking while
  ResourceLoaderModule updates; I will remove it subsequently.)
* Renamed 'validate' to 'assertValid'. The latter name hints at the behavior of
  the method (throw an error if invalid) whereas the former is a bit opaque.
* Rename 'instanceOf' to 'isInstanceOf' and rename its first parameter from
  'instance' to 'value'

Change-Id: I265d3962155b89d6890b7aedf749983ba124fa79
---
M includes/ResourceLoaderSchemaModule.php
M modules/ext.eventLogging.core.js
M modules/ext.eventLogging.jsonSchema.js
M tests/ext.eventLogging.tests.js
4 files changed, 122 insertions(+), 74 deletions(-)

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



diff --git a/includes/ResourceLoaderSchemaModule.php 
b/includes/ResourceLoaderSchemaModule.php
index 9135d28..b6498f8 100644
--- a/includes/ResourceLoaderSchemaModule.php
+++ b/includes/ResourceLoaderSchemaModule.php
@@ -84,6 +84,6 @@
 */
function getScript( ResourceLoaderContext $context ) {
$params = array( $this-schema-title, 
$this-schema-jsonSerialize() );
-   return Xml::encodeJsCall( 'mediaWiki.eventLog.setSchema', 
$params );
+   return Xml::encodeJsCall( 'mediaWiki.eventLog.declareSchema', 
$params );
}
 }
diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index d255c6b..c2be7df 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -1,50 +1,73 @@
 /**
- * Logs arbitrary events from client-side code to server. Each event
- * must validate against a predeclared data model, specified as JSON
- * Schema (version 3 of the draft).
+ * This module implements EventLogging's API for logging events from
+ * client-side JavaScript code. Instances of `ResourceLoaderSchemaModule`
+ * indicate a dependency on this module and declare themselves via its
+ * 'declareSchema' method.
  *
+ * Developers should not load this module directly, but work with schema
+ * modules instead. Schema modules will load this module as a
+ * dependency.
+ *
+ * @module ext.eventLogging.core.js
  * @author Ori Livneh o...@wikimedia.org
  */
-
 ( function ( mw, $, console ) {
'use strict';
 
/**
+* Represents a failure to validate an object against its schema.
+*
+* @class ValidationError
 * @constructor
 * @extends Error
+* @private
 **/
function ValidationError( message ) {
this.message = message;
}
ValidationError.prototype = new Error();
 
-   if ( !mw.config.get( 'wgEventLoggingBaseUri' ) ) {
-   mw.log( 'wgEventLoggingBaseUri is not set.' );
-   }
 
+   /**
+* Client-side EventLogging API.
+*
+* The public API consists of a single function, `mw.eventLog.logEvent`.
+* Other methods represent internal functionality, which is exposed only
+* to ease debugging code and writing tests.
+*
+*
+* @class eventLog
+* @namespace mediaWiki
+* @static
+*/
var self = mw.eventLog = {
 
+   /**
+* Schema registry. Schemas that have been declared explicitly 
via
+* `eventLog.declareSchema` or implicitly by being referenced 
in an
+* `eventLog.logEvent` call are stored in this object.
+*
+* @property schemas
+* @type Object
+*/
schemas: {},
 
warn: console  $.isFunction( console.warn ) ?
$.proxy( console.warn, console ) : mw.log,
 
/**
-* @param string schemaName
-* @return {Object|null}
+* Register a schema so that it can be used to validate events.
+* `ResourceLoaderSchemaModule` instances generate JavaScript 
code that
+* invokes this method.
+*
+* @method declareSchema
+* @param {String} schemaName Name of schema.
+* @param {Object} [meta] An object describing a schema:
+

[MediaWiki-commits] [Gerrit] Test conf.parsoid.apiURI instead of conf.wiki.apiURI - change (mediawiki...Parsoid)

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

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


Change subject: Test conf.parsoid.apiURI instead of conf.wiki.apiURI
..

Test conf.parsoid.apiURI instead of conf.wiki.apiURI

* echo 'math3/math' | node parse was not parsing extension
  output whereas ... | node parse --fetchConfig was doing this.

* Turned out that the extension and template handlers were still
  testing the wrong URI before making api requests.

* Fixes commandline parser tests.

Change-Id: I0703fe39dafba4c9a5a4db3c9f4ccf00ffa876a3
---
M js/lib/ext.core.TemplateHandler.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/js/lib/ext.core.TemplateHandler.js 
b/js/lib/ext.core.TemplateHandler.js
index 1368f65..6d2a076 100644
--- a/js/lib/ext.core.TemplateHandler.js
+++ b/js/lib/ext.core.TemplateHandler.js
@@ -66,7 +66,7 @@
}
 
if ( this.manager.env.conf.parsoid.usePHPPreProcessor 
-   this.manager.env.conf.wiki.apiURI !== null ) {
+   this.manager.env.conf.parsoid.apiURI !== null ) {
if ( this.options.wrapTemplates ) {
// Use MediaWiki's action=expandtemplates preprocessor
// We'll never get to frame depth beyond 1 in this 
scenario
@@ -687,7 +687,7 @@
 TemplateHandler.prototype.onExtension = function ( token, frame, cb ) {
var extensionName = token.getAttribute('name');
if ( this.manager.env.conf.parsoid.usePHPPreProcessor 
-   this.manager.env.conf.wiki.apiURI !== null ) {
+   this.manager.env.conf.parsoid.apiURI !== null ) {
// Use MediaWiki's action=parse preprocessor
this.fetchExpandedTplOrExtension(
extensionName,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0703fe39dafba4c9a5a4db3c9f4ccf00ffa876a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] language-specific annotations also for OptionAttributeEditor - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: language-specific annotations also for OptionAttributeEditor
..

language-specific annotations also for OptionAttributeEditor

Change-Id: I09b601cd82043063d0f5049aba684e07af8f0bcc
---
M OmegaWiki/Editor.php
1 file changed, 13 insertions(+), 4 deletions(-)


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

diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index e4a62d6..c3349db 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1773,17 +1773,26 @@
 
public function add( IdStack $idPath ) {
if ( $this-isAddField ) {
-   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
-   if ( ! $syntransId ) $syntransId = 0 ; // in the case 
of a DM option attribute, there is no syntrans in the PathId
-
// note: it is normal that the updateSelectOptions( 
has no closing parenthesis. An additional parameter and ')' is added by the 
function updateSuggestValue (suggest.js)
$parameters = array(
level = $this-attributesLevelName,
definedMeaningId = 
$idPath-getDefinedMeaningId(),
-   syntransId = $syntransId,
annotationAttributeId = 
$idPath-getAnnotationAttribute()-getId(),
onUpdate = 'updateSelectOptions(\'' . 
$this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX . '\',' . $syntransId
);
+
+   if ( $this-attributesLevelName == 
WLD_SYNTRANS_MEANING_NAME ) {
+   // find and add syntransId as a parameter
+   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
+   if ( $syntransId ==  ) {
+   // second tentative, sometimes it is 
called objectId
+   $syntransId = 
$idPath-getKeyStack()-peek( 0 )-objectId;
+   }
+   if ( $syntransId !=  ) {
+   $parameters[syntransId] = $syntransId;
+   }
+   }
+
return getSuggest( $this-addId( $idPath-getId() ), 
$this-suggestType(), $parameters );
}
else return '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09b601cd82043063d0f5049aba684e07af8f0bcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] language-specific annotations also for OptionAttributeEditor - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: language-specific annotations also for OptionAttributeEditor
..


language-specific annotations also for OptionAttributeEditor

Change-Id: I09b601cd82043063d0f5049aba684e07af8f0bcc
---
M OmegaWiki/Editor.php
1 file changed, 13 insertions(+), 4 deletions(-)

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



diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index e4a62d6..c3349db 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1773,17 +1773,26 @@
 
public function add( IdStack $idPath ) {
if ( $this-isAddField ) {
-   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
-   if ( ! $syntransId ) $syntransId = 0 ; // in the case 
of a DM option attribute, there is no syntrans in the PathId
-
// note: it is normal that the updateSelectOptions( 
has no closing parenthesis. An additional parameter and ')' is added by the 
function updateSuggestValue (suggest.js)
$parameters = array(
level = $this-attributesLevelName,
definedMeaningId = 
$idPath-getDefinedMeaningId(),
-   syntransId = $syntransId,
annotationAttributeId = 
$idPath-getAnnotationAttribute()-getId(),
onUpdate = 'updateSelectOptions(\'' . 
$this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX . '\',' . $syntransId
);
+
+   if ( $this-attributesLevelName == 
WLD_SYNTRANS_MEANING_NAME ) {
+   // find and add syntransId as a parameter
+   $syntransId = $idPath-getKeyStack()-peek( 0 
)-syntransId;
+   if ( $syntransId ==  ) {
+   // second tentative, sometimes it is 
called objectId
+   $syntransId = 
$idPath-getKeyStack()-peek( 0 )-objectId;
+   }
+   if ( $syntransId !=  ) {
+   $parameters[syntransId] = $syntransId;
+   }
+   }
+
return getSuggest( $this-addId( $idPath-getId() ), 
$this-suggestType(), $parameters );
}
else return '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09b601cd82043063d0f5049aba684e07af8f0bcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool kipmas...@gmail.com
Gerrit-Reviewer: Kipcool kipmas...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove temp hack for bug 31187 - change (operations/mediawiki-config)

2013-02-26 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Remove temp hack for bug 31187
..


Remove temp hack for bug 31187

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2196cfa..b5788a2 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -333,9 +333,6 @@
 
 $wgSQLMode = null;
 
-# TEMP HACK for bug 31187 --roan
-$wgResourceLoaderValidateJS = false;
-
 # Object cache and session settings
 
 $pcTemplate = array( 'type' = 'mysql',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I066f28c54dec98f9f71635e787d50008e2acf5d7
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
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 CentralNotice Underallocation - change (mediawiki...CentralNotice)

2013-02-26 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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


Change subject: Fix CentralNotice Underallocation
..

Fix CentralNotice Underallocation

CentralNotice should have been giving at least 1 slot to each banner.
In the case where low weight banners were at the end of the banner
list they could be missed during the reallocation step.

This has been solved with sorting, explicit minimum, and taking
care of any potential overallocation.

Change-Id: I2214ed49ede39718bc22cb69e9662ad344beacc6
---
M includes/BannerChooser.php
1 file changed, 16 insertions(+), 2 deletions(-)


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

diff --git a/includes/BannerChooser.php b/includes/BannerChooser.php
index 849fbb5..5a74998 100644
--- a/includes/BannerChooser.php
+++ b/includes/BannerChooser.php
@@ -105,10 +105,24 @@
return;
}
 
-   // First pass allocate the minimum number of slots to each 
banner
+   // Sort the banners by weight, smallest to largest - this helps 
in slot allocation
+   // because we are not guaranteed to underallocate but we do 
want to attempt to give
+   // one slot per banner
+   usort( $this-banners, function( $a, $b ) {
+   return ( $a[ 'weight' ] = $b[ 'weight' ] ) ? 1 
: -1;
+   } );
+
+   // First pass allocate the minimum number of slots to each 
banner, giving at least one
+   // slot per banner up to RAND_MAX slots.
$sum = 0;
foreach ( $this-banners as $banner ) {
-   $slots = floor( ( $banner[ 'weight' ] / $total ) * 
self::RAND_MAX );
+   $slots = max( floor( ( $banner[ 'weight' ] / $total ) * 
self::RAND_MAX ), 1 );
+
+   // Compensate for potential overallocation
+   if ( $slots + $sum  self::RAND_MAX ) {
+   $slots = self::RAND_MAX - $sum;
+   }
+
$banner[ self::SLOTS_KEY ] = $slots;
$sum += $slots;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2214ed49ede39718bc22cb69e9662ad344beacc6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Maintenance script: Update header - change (mediawiki...VisualEditor)

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

Change subject: Maintenance script: Update header
..


Maintenance script: Update header

This is a much simpler pattern and more consistent
with other extensions.

Change-Id: Ia8b31ff0573287325eeb5a878a1eb36bbf6374af
---
M maintenance/makeStaticLoader.php
1 file changed, 4 insertions(+), 7 deletions(-)

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



diff --git a/maintenance/makeStaticLoader.php b/maintenance/makeStaticLoader.php
index f8c6ba0..978f181 100644
--- a/maintenance/makeStaticLoader.php
+++ b/maintenance/makeStaticLoader.php
@@ -1,12 +1,9 @@
 ?php
-
-$path = __DIR__ . '/../../..';
-
-if ( getenv( 'MW_INSTALL_PATH' ) !== false ) {
-   $path = getenv( 'MW_INSTALL_PATH' );
+$IP = getenv( 'MW_INSTALL_PATH' );
+if ( $IP === false ) {
+   $IP = __DIR__  . '/../../..';
 }
-
-require_once( $path . '/maintenance/Maintenance.php' );
+require_once( $IP . '/maintenance/Maintenance.php' );
 
 class MakeStaticLoader extends Maintenance {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8b31ff0573287325eeb5a878a1eb36bbf6374af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Using rawElement for intro - change (mediawiki...Wikibase)

2013-02-26 Thread Bene (Code Review)
Bene has uploaded a new change for review.

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


Change subject: Using rawElement for intro
..

Using rawElement for intro

Fix for Special:SetAliases intro

Change-Id: I8757a93b446c39210de9b276de38cd24abd96fd8
---
M repo/includes/specials/SpecialSetEntity.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/includes/specials/SpecialSetEntity.php 
b/repo/includes/specials/SpecialSetEntity.php
index 3f82c60..5910a7b 100644
--- a/repo/includes/specials/SpecialSetEntity.php
+++ b/repo/includes/specials/SpecialSetEntity.php
@@ -208,7 +208,7 @@
$id = $entityContent ? 
$entityContent-getTitle()-getText() : '';
$value = $this-getValue( $entityContent, $language ? 
$language : $this-getLanguage()-getCode() );
$this-getOutput()-addHTML(
-   Html::element(
+   Html::rawElement(
'p',
array(),
$this-msg( 'wikibase-' . strtolower( 
$this-getName() ) . '-intro' )-text()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8757a93b446c39210de9b276de38cd24abd96fd8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene benestar.wikime...@googlemail.com

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


[MediaWiki-commits] [Gerrit] Script calling cleanups - change (mediawiki/core)

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

Change subject: Script calling cleanups
..


Script calling cleanups

· Use env(1) in shebangs instead of hardcoding paths.
· $IP is already set in the constructor of Maintenance classes.
· Add sapi guard to some phpunit files.

Change-Id: I6c6fd6c61e2861b5992f2ccd67a4e3f62e2c445e
---
M includes/normal/UtfNormalTest2.php
M tests/RunSeleniumTests.php
M tests/phpunit/includes/api/generateRandomImages.php
M tests/phpunit/phpunit.php
M tests/qunit/data/generateJqueryMsgData.php
M tests/qunit/data/load.mock.php
M tests/selenium/installer/MediaWikiInstallerTestSuite.php
7 files changed, 14 insertions(+), 18 deletions(-)

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



diff --git a/includes/normal/UtfNormalTest2.php 
b/includes/normal/UtfNormalTest2.php
index f4a8379..2266696 100644
--- a/includes/normal/UtfNormalTest2.php
+++ b/includes/normal/UtfNormalTest2.php
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/env php
 ?php
 /**
  * Other tests for the unicode normalization module.
diff --git a/tests/RunSeleniumTests.php b/tests/RunSeleniumTests.php
index 716a8db..6e212eb 100644
--- a/tests/RunSeleniumTests.php
+++ b/tests/RunSeleniumTests.php
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/env php
 ?php
 /**
  * @file
@@ -24,11 +24,12 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-$IP = dirname( __DIR__ );
+if ( PHP_SAPI != 'cli' ) {
+   die( Run me from the command line please.\n );
+}
 
 define( 'SELENIUMTEST', true );
 
-//require_once( __DIR__ . '/../maintenance/commandLine.inc' );
 require( __DIR__ . '/../maintenance/Maintenance.php' );
 
 require_once( 'PHPUnit/Runner/Version.php' );
diff --git a/tests/phpunit/includes/api/generateRandomImages.php 
b/tests/phpunit/includes/api/generateRandomImages.php
index cba8312..bdd15c4 100644
--- a/tests/phpunit/includes/api/generateRandomImages.php
+++ b/tests/phpunit/includes/api/generateRandomImages.php
@@ -5,11 +5,8 @@
  * @file
  */
 
-// Evaluate the include path relative to this file
-$IP = dirname( dirname( dirname( dirname( __DIR__ ) ) ) );
-
 // Start up MediaWiki in command-line mode
-require_once( $IP/maintenance/Maintenance.php );
+require_once( __DIR__ . /../../../../maintenance/Maintenance.php );
 require( __DIR__ . /RandomImageGenerator.php );
 
 class GenerateRandomImages extends Maintenance {
diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php
index 2a0298a..cce5dde 100755
--- a/tests/phpunit/phpunit.php
+++ b/tests/phpunit/phpunit.php
@@ -8,14 +8,11 @@
 
 /* Configuration */
 
-// Evaluate the include path relative to this file
-$IP = dirname( dirname( __DIR__ ) );
-
 // Set a flag which can be used to detect when other scripts have been entered 
through this entry point or not
 define( 'MW_PHPUNIT_TEST', true );
 
 // Start up MediaWiki in command-line mode
-require_once( $IP/maintenance/Maintenance.php );
+require_once( dirname( dirname( __DIR__ ) ) . /maintenance/Maintenance.php );
 
 class PHPUnitMaintClass extends Maintenance {
 
diff --git a/tests/qunit/data/generateJqueryMsgData.php 
b/tests/qunit/data/generateJqueryMsgData.php
index 774000b..604ede8 100644
--- a/tests/qunit/data/generateJqueryMsgData.php
+++ b/tests/qunit/data/generateJqueryMsgData.php
@@ -61,9 +61,7 @@
  * /code
  */
 
-$maintenanceDir = dirname( dirname( dirname( __DIR__ ) ) ) . '/maintenance';
-
-require( $maintenanceDir/Maintenance.php );
+require( __DIR__ . '/../../../maintenance/Maintenance.php' );
 
 class GenerateJqueryMsgData extends Maintenance {
 
@@ -149,4 +147,4 @@
 }
 
 $maintClass = GenerateJqueryMsgData;
-require_once( $maintenanceDir/doMaintenance.php );
+require_once( RUN_MAINTENANCE_IF_MAIN );
diff --git a/tests/qunit/data/load.mock.php b/tests/qunit/data/load.mock.php
index 1c18970..7ff392a 100644
--- a/tests/qunit/data/load.mock.php
+++ b/tests/qunit/data/load.mock.php
@@ -24,7 +24,7 @@
  */
 header( 'Content-Type: text/javascript; charset=utf-8' );
 
-require_once '../../../includes/Xml.php';
+require_once __DIR__ . '/../../../includes/Xml.php';
 
 $moduleImplementations = array(
'testUsesMissing' = 
diff --git a/tests/selenium/installer/MediaWikiInstallerTestSuite.php 
b/tests/selenium/installer/MediaWikiInstallerTestSuite.php
index 1356ce6..f179113 100644
--- a/tests/selenium/installer/MediaWikiInstallerTestSuite.php
+++ b/tests/selenium/installer/MediaWikiInstallerTestSuite.php
@@ -1,5 +1,4 @@
 ?php
-
 /**
  * MediaWikiInstallerTestSuite
  *
@@ -27,6 +26,10 @@
  *
  */
 
+if ( PHP_SAPI != 'cli' ) {
+   die( Run me from the command line please.\n );
+}
+
 require_once 'PHPUnit/Framework/TestSuite.php';
 
 require_once ( __DIR__ . '/MediaWikiUserInterfaceTestCase.php' );

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] New version: 2.5.2 - change (mediawiki...SemanticForms)

2013-02-26 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: New version: 2.5.2
..

New version: 2.5.2

Change-Id: Icd40656a9bae3b8a4f6f8c7148a81ae49d983d8e
---
M INSTALL
M README
M SemanticForms.php
3 files changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/INSTALL b/INSTALL
index 972ff5e..bd6e5a0 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-[[Semantic Forms 2.5.1]]
+[[Semantic Forms 2.5.2]]
 
 Contents:
 * Disclaimer
diff --git a/README b/README
index 972537f..6d5c23b 100644
--- a/README
+++ b/README
@@ -22,8 +22,8 @@
 Important code contributions were also made by Christoph Burgmer,
 Daniel Friesen, Daniel Hansch, Eugene Mednikov, Harold Solbrig, Jayson
 Harshbarger, Jeffrey Stuckman, Jeroen De Dauw, Louis Gerbarg, Matt
-Williamson, Nils Opperman, Patrick Nagel, Remco de Boer, Sergey
-Chernyshev, wheresmytab and others.
+Williamson, Niklas Laxstrom, Nils Opperman, Patrick Nagel, Remco de Boer,
+Sergey Chernyshev, Siebrand Mazeland, wheresmytab and others.
 
 Language translations were provided by many people; see each file in
 the /languages directory for the full listings.
diff --git a/SemanticForms.php b/SemanticForms.php
index a9c91b8..93e33b1 100644
--- a/SemanticForms.php
+++ b/SemanticForms.php
@@ -40,7 +40,7 @@
die( ERROR: a href=\http://semantic-mediawiki.org\;Semantic 
MediaWiki/a must be installed for Semantic Forms to run! );
 }
 
-define( 'SF_VERSION', '2.5.2 alpha' );
+define( 'SF_VERSION', '2.5.2' );
 
 $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 
'specialpage'][] = array(
'path' = __FILE__,
@@ -48,7 +48,7 @@
'version' = SF_VERSION,
'author' = array( 'Yaron Koren', 'Stephan Gambke', '...' ),
'url' = 'https://www.mediawiki.org/wiki/Extension:Semantic_Forms',
-   'descriptionmsg'  = 'semanticforms-desc',
+   'descriptionmsg' = 'semanticforms-desc',
 );
 
 # ##
@@ -281,8 +281,8 @@
 // Global functions
 
 /**
- *  This is a delayed init that makes sure that MediaWiki is set up
- *  properly before we add our stuff.
+ * This is a delayed init that makes sure that MediaWiki is set up
+ * properly before we add our stuff.
  */
 function sffSetupExtension() {
// This global variable is needed so that other extensions can hook
@@ -353,7 +353,7 @@
 # ##
 $sfgRenameEditTabs = false;
 $sfgRenameMainEditTab = false;
-$wgGroupPermissions['*']['viewedittab']   = true;
+$wgGroupPermissions['*']['viewedittab'] = true;
 $wgAvailableRights[] = 'viewedittab';
 
 # ##

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd40656a9bae3b8a4f6f8c7148a81ae49d983d8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com

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


[MediaWiki-commits] [Gerrit] New version: 2.5.2 - change (mediawiki...SemanticForms)

2013-02-26 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: New version: 2.5.2
..


New version: 2.5.2

Change-Id: Icd40656a9bae3b8a4f6f8c7148a81ae49d983d8e
---
M INSTALL
M README
M SemanticForms.php
3 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved
  Jeroen De Dauw: Looks good to me, approved



diff --git a/INSTALL b/INSTALL
index 972ff5e..bd6e5a0 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-[[Semantic Forms 2.5.1]]
+[[Semantic Forms 2.5.2]]
 
 Contents:
 * Disclaimer
diff --git a/README b/README
index 972537f..6d5c23b 100644
--- a/README
+++ b/README
@@ -22,8 +22,8 @@
 Important code contributions were also made by Christoph Burgmer,
 Daniel Friesen, Daniel Hansch, Eugene Mednikov, Harold Solbrig, Jayson
 Harshbarger, Jeffrey Stuckman, Jeroen De Dauw, Louis Gerbarg, Matt
-Williamson, Nils Opperman, Patrick Nagel, Remco de Boer, Sergey
-Chernyshev, wheresmytab and others.
+Williamson, Niklas Laxstrom, Nils Opperman, Patrick Nagel, Remco de Boer,
+Sergey Chernyshev, Siebrand Mazeland, wheresmytab and others.
 
 Language translations were provided by many people; see each file in
 the /languages directory for the full listings.
diff --git a/SemanticForms.php b/SemanticForms.php
index a9c91b8..93e33b1 100644
--- a/SemanticForms.php
+++ b/SemanticForms.php
@@ -40,7 +40,7 @@
die( ERROR: a href=\http://semantic-mediawiki.org\;Semantic 
MediaWiki/a must be installed for Semantic Forms to run! );
 }
 
-define( 'SF_VERSION', '2.5.2 alpha' );
+define( 'SF_VERSION', '2.5.2' );
 
 $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 
'specialpage'][] = array(
'path' = __FILE__,
@@ -48,7 +48,7 @@
'version' = SF_VERSION,
'author' = array( 'Yaron Koren', 'Stephan Gambke', '...' ),
'url' = 'https://www.mediawiki.org/wiki/Extension:Semantic_Forms',
-   'descriptionmsg'  = 'semanticforms-desc',
+   'descriptionmsg' = 'semanticforms-desc',
 );
 
 # ##
@@ -281,8 +281,8 @@
 // Global functions
 
 /**
- *  This is a delayed init that makes sure that MediaWiki is set up
- *  properly before we add our stuff.
+ * This is a delayed init that makes sure that MediaWiki is set up
+ * properly before we add our stuff.
  */
 function sffSetupExtension() {
// This global variable is needed so that other extensions can hook
@@ -353,7 +353,7 @@
 # ##
 $sfgRenameEditTabs = false;
 $sfgRenameMainEditTab = false;
-$wgGroupPermissions['*']['viewedittab']   = true;
+$wgGroupPermissions['*']['viewedittab'] = true;
 $wgAvailableRights[] = 'viewedittab';
 
 # ##

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd40656a9bae3b8a4f6f8c7148a81ae49d983d8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Yaron Koren yaro...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] oops forgot to update updateSelectOptions - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: oops forgot to update updateSelectOptions
..

oops forgot to update updateSelectOptions

Change-Id: I02661683088e287e70de53a05cfd2b94bbf1df14
---
M OmegaWiki/Editor.php
M OmegaWiki/SpecialSelect.php
2 files changed, 18 insertions(+), 13 deletions(-)


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

diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index c3349db..c3d3732 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1778,7 +1778,7 @@
level = $this-attributesLevelName,
definedMeaningId = 
$idPath-getDefinedMeaningId(),
annotationAttributeId = 
$idPath-getAnnotationAttribute()-getId(),
-   onUpdate = 'updateSelectOptions(\'' . 
$this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX . '\',' . $syntransId
+   onUpdate = updateSelectOptions(' . 
$this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX . ',0
);
 
if ( $this-attributesLevelName == 
WLD_SYNTRANS_MEANING_NAME ) {
@@ -1790,6 +1790,7 @@
}
if ( $syntransId !=  ) {
$parameters[syntransId] = $syntransId;
+   $parameters[onUpdate] = 
'updateSelectOptions(\'' . $this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX 
. '\',' . $syntransId ;
}
}
 
diff --git a/OmegaWiki/SpecialSelect.php b/OmegaWiki/SpecialSelect.php
index 55c8cbd..b8bf5fd 100644
--- a/OmegaWiki/SpecialSelect.php
+++ b/OmegaWiki/SpecialSelect.php
@@ -19,20 +19,24 @@
 
$dc = wdGetDataSetContext();
$optionAttribute = $wgRequest-getVal( WLD_OPTION_ATTRIBUTE );
-   $attributeObject = $wgRequest-getVal( 'attribute-object' );
+   $attributeObject = $wgRequest-getVal( 'attribute-object', 0 );
$lang_code = $wgLang-getCode();
 
$dbr = wfGetDB( DB_SLAVE );
-   $sql = 'SELECT language_id' .
-FROM {$dc}_syntrans .
-JOIN {$dc}_expression ON 
{$dc}_expression.expression_id = {$dc}_syntrans.expression_id .
-WHERE {$dc}_syntrans.syntrans_sid =  . 
$attributeObject .
-   ' AND ' . getLatestTransactionRestriction( 
{$dc}_syntrans ) .
-   ' AND ' . getLatestTransactionRestriction( 
{$dc}_expression );
-   $lang_res = $dbr-query( $sql );
-   $objectLanguage = $dbr-fetchObject( $lang_res )-language_id;
-   // language is not always defined, for example for a DM Option 
Attribute
-   if ( ! $objectLanguage ) $objectLanguage = 0 ;
+
+   $objectLanguage = 0 ;
+   if ( $attributeObject != 0 ) {
+   $sql = 'SELECT language_id' .
+FROM {$dc}_syntrans .
+JOIN {$dc}_expression ON 
{$dc}_expression.expression_id = {$dc}_syntrans.expression_id .
+WHERE {$dc}_syntrans.syntrans_sid =  
. $attributeObject .
+   ' AND ' . 
getLatestTransactionRestriction( {$dc}_syntrans ) .
+   ' AND ' . 
getLatestTransactionRestriction( {$dc}_expression );
+   $lang_res = $dbr-query( $sql );
+   $objectLanguage = $dbr-fetchObject( $lang_res 
)-language_id;
+   // language is not always defined, for example for a DM 
Option Attribute
+   if ( ! $objectLanguage ) $objectLanguage = 0 ;
+   }
 
$sql = SELECT 
{$dc}_option_attribute_options.option_id,{$dc}_option_attribute_options.option_mid
 .
 FROM {$dc}_option_attribute_options .
@@ -67,7 +71,7 @@
' AND ' . 
getLatestTransactionRestriction( {$dc}_syntrans ) .
' AND ' . 
getLatestTransactionRestriction( {$dc}_expression );
$res = $dbr-query( $sql );
-   if ( !$dbr-fetchObject( $res )-spelling )
+   if ( !$dbr-fetchObject( $res ) )
$sql = SELECT 
{$dc}_expression.spelling .
 FROM {$dc}_syntrans .
 JOIN {$dc}_expression 
ON {$dc}_expression.expression_id = 

[MediaWiki-commits] [Gerrit] oops forgot to update updateSelectOptions - change (mediawiki...WikiLexicalData)

2013-02-26 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: oops forgot to update updateSelectOptions
..


oops forgot to update updateSelectOptions

Change-Id: I02661683088e287e70de53a05cfd2b94bbf1df14
---
M OmegaWiki/Editor.php
M OmegaWiki/SpecialSelect.php
2 files changed, 18 insertions(+), 13 deletions(-)

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



diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index c3349db..c3d3732 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1778,7 +1778,7 @@
level = $this-attributesLevelName,
definedMeaningId = 
$idPath-getDefinedMeaningId(),
annotationAttributeId = 
$idPath-getAnnotationAttribute()-getId(),
-   onUpdate = 'updateSelectOptions(\'' . 
$this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX . '\',' . $syntransId
+   onUpdate = updateSelectOptions(' . 
$this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX . ',0
);
 
if ( $this-attributesLevelName == 
WLD_SYNTRANS_MEANING_NAME ) {
@@ -1790,6 +1790,7 @@
}
if ( $syntransId !=  ) {
$parameters[syntransId] = $syntransId;
+   $parameters[onUpdate] = 
'updateSelectOptions(\'' . $this-addId( $idPath-getId() ) . WLD_OPTION_SUFFIX 
. '\',' . $syntransId ;
}
}
 
diff --git a/OmegaWiki/SpecialSelect.php b/OmegaWiki/SpecialSelect.php
index 55c8cbd..b8bf5fd 100644
--- a/OmegaWiki/SpecialSelect.php
+++ b/OmegaWiki/SpecialSelect.php
@@ -19,20 +19,24 @@
 
$dc = wdGetDataSetContext();
$optionAttribute = $wgRequest-getVal( WLD_OPTION_ATTRIBUTE );
-   $attributeObject = $wgRequest-getVal( 'attribute-object' );
+   $attributeObject = $wgRequest-getVal( 'attribute-object', 0 );
$lang_code = $wgLang-getCode();
 
$dbr = wfGetDB( DB_SLAVE );
-   $sql = 'SELECT language_id' .
-FROM {$dc}_syntrans .
-JOIN {$dc}_expression ON 
{$dc}_expression.expression_id = {$dc}_syntrans.expression_id .
-WHERE {$dc}_syntrans.syntrans_sid =  . 
$attributeObject .
-   ' AND ' . getLatestTransactionRestriction( 
{$dc}_syntrans ) .
-   ' AND ' . getLatestTransactionRestriction( 
{$dc}_expression );
-   $lang_res = $dbr-query( $sql );
-   $objectLanguage = $dbr-fetchObject( $lang_res )-language_id;
-   // language is not always defined, for example for a DM Option 
Attribute
-   if ( ! $objectLanguage ) $objectLanguage = 0 ;
+
+   $objectLanguage = 0 ;
+   if ( $attributeObject != 0 ) {
+   $sql = 'SELECT language_id' .
+FROM {$dc}_syntrans .
+JOIN {$dc}_expression ON 
{$dc}_expression.expression_id = {$dc}_syntrans.expression_id .
+WHERE {$dc}_syntrans.syntrans_sid =  
. $attributeObject .
+   ' AND ' . 
getLatestTransactionRestriction( {$dc}_syntrans ) .
+   ' AND ' . 
getLatestTransactionRestriction( {$dc}_expression );
+   $lang_res = $dbr-query( $sql );
+   $objectLanguage = $dbr-fetchObject( $lang_res 
)-language_id;
+   // language is not always defined, for example for a DM 
Option Attribute
+   if ( ! $objectLanguage ) $objectLanguage = 0 ;
+   }
 
$sql = SELECT 
{$dc}_option_attribute_options.option_id,{$dc}_option_attribute_options.option_mid
 .
 FROM {$dc}_option_attribute_options .
@@ -67,7 +71,7 @@
' AND ' . 
getLatestTransactionRestriction( {$dc}_syntrans ) .
' AND ' . 
getLatestTransactionRestriction( {$dc}_expression );
$res = $dbr-query( $sql );
-   if ( !$dbr-fetchObject( $res )-spelling )
+   if ( !$dbr-fetchObject( $res ) )
$sql = SELECT 
{$dc}_expression.spelling .
 FROM {$dc}_syntrans .
 JOIN {$dc}_expression 
ON {$dc}_expression.expression_id = {$dc}_syntrans.expression_id .

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

[MediaWiki-commits] [Gerrit] Added a bunch of docs and stub classes - change (mediawiki...Wikibase)

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

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


Change subject: Added a bunch of docs and stub classes
..

Added a bunch of docs and stub classes

Change-Id: Icaddb6ab2b00bcf16639be7b47b4a937fbdec088
---
M repo/includes/Database/FieldDefinition.php
M repo/includes/Database/MediaWikiQueryInterface.php
M repo/includes/Database/QueryInterface.php
M repo/includes/Database/TableBuilder.php
M repo/includes/Database/TableDefinition.php
M repo/includes/Query/QueryEngine.php
M repo/includes/Query/QueryEngineResult.php
M repo/includes/Query/QueryStore.php
A repo/includes/Query/SQLStore/DataValueHandler.php
A repo/includes/Query/SQLStore/Engine.php
D repo/includes/Query/SQLStore/QueryEngine.php
M repo/includes/Query/SQLStore/Setup.php
M repo/includes/Query/SQLStore/Store.php
13 files changed, 263 insertions(+), 54 deletions(-)


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

diff --git a/repo/includes/Database/FieldDefinition.php 
b/repo/includes/Database/FieldDefinition.php
index 01f3024..e1d3301 100644
--- a/repo/includes/Database/FieldDefinition.php
+++ b/repo/includes/Database/FieldDefinition.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 0.4
+ * @since wd.db
  *
  * @file
  * @ingroup WikibaseRepo
@@ -33,49 +33,49 @@
 class FieldDefinition implements \Immutable {
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var string
 */
private $name;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var string
 */
private $type;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var mixed
 */
private $default;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var string|null
 */
private $attributes;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var boolean
 */
private $null;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var string|null
 */
private $index;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var boolean
 */
diff --git a/repo/includes/Database/MediaWikiQueryInterface.php 
b/repo/includes/Database/MediaWikiQueryInterface.php
index 64f0469..a4a5e6d 100644
--- a/repo/includes/Database/MediaWikiQueryInterface.php
+++ b/repo/includes/Database/MediaWikiQueryInterface.php
@@ -23,7 +23,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 0.4
+ * @since wd.db
  *
  * @file
  * @ingroup WikibaseRepo
diff --git a/repo/includes/Database/QueryInterface.php 
b/repo/includes/Database/QueryInterface.php
index 56f10c9..7619f9b 100644
--- a/repo/includes/Database/QueryInterface.php
+++ b/repo/includes/Database/QueryInterface.php
@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 0.4
+ * @since wd.db
  *
  * @file
  * @ingroup WikibaseRepo
diff --git a/repo/includes/Database/TableBuilder.php 
b/repo/includes/Database/TableBuilder.php
index 5a819dd..490d7e9 100644
--- a/repo/includes/Database/TableBuilder.php
+++ b/repo/includes/Database/TableBuilder.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 0.4
+ * @since wd.db
  *
  * @file
  * @ingroup WikibaseRepo
@@ -33,14 +33,14 @@
 class TableBuilder {
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var QueryInterface
 */
private $db;
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @var MessageReporter|null
 */
@@ -49,7 +49,7 @@
/**
 * Constructor.
 *
-* @since 0.4
+* @since wd.db
 *
 * @param QueryInterface $queryInterface
 * @param MessageReporter|null $messageReporter
@@ -60,7 +60,7 @@
}
 
/**
-* @since 0.4
+* @since wd.db
 *
 * @param string $message
 */
@@ -73,7 +73,7 @@
/**
 * Creates a table if it does not exist yet.
 *
-* @since 0.4
+* @since wd.db
 *
 * @param TableDefinition $table
 */
diff --git a/repo/includes/Database/TableDefinition.php 
b/repo/includes/Database/TableDefinition.php
index d1ccce9..37e9006 100644
--- a/repo/includes/Database/TableDefinition.php
+++ b/repo/includes/Database/TableDefinition.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 0.4
+ * 

[MediaWiki-commits] [Gerrit] [FileBackend] Process cache negatives for file SHA1 function. - change (mediawiki/core)

2013-02-26 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: [FileBackend] Process cache negatives for file SHA1 function.
..

[FileBackend] Process cache negatives for file SHA1 function.

Change-Id: I2a6b801cd97e8ee1a678a43d5f6d01d3e9603637
---
M includes/filebackend/FileBackendStore.php
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/50936/1

diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index b906af5..53c2698 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -767,10 +767,7 @@
$hash = $this-doGetFileSha1Base36( $params );
wfProfileOut( __METHOD__ . '-miss-' . $this-name );
wfProfileOut( __METHOD__ . '-miss' );
-   if ( $hash ) { // don't cache negatives
-   $this-cheapCache-set( $path, 'sha1',
-   array( 'hash' = $hash, 'latest' = $latest ) );
-   }
+   $this-cheapCache-set( $path, 'sha1', array( 'hash' = $hash, 
'latest' = $latest ) );
wfProfileOut( __METHOD__ . '-' . $this-name );
wfProfileOut( __METHOD__ );
return $hash;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a6b801cd97e8ee1a678a43d5f6d01d3e9603637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 43010) Make it explicit that the title cannot be modifi... - change (mediawiki...UploadWizard)

2013-02-26 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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


Change subject: (bug 43010) Make it explicit that the title cannot be modified 
later on.
..

(bug 43010) Make it explicit that the title cannot be modified later on.

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


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

diff --git a/UploadWizard.i18n.php b/UploadWizard.i18n.php
index b04d705..6a4cab1 100644
--- a/UploadWizard.i18n.php
+++ b/UploadWizard.i18n.php
@@ -196,7 +196,7 @@
'mwe-upwiz-tooltip-source' = 'Where this digital file came from — 
could be a URL, or a book or publication.',
'mwe-upwiz-tooltip-sign' = 'You can use your wiki user name or your 
real name.
 In both cases, this will be linked to your wiki user page.',
-   'mwe-upwiz-tooltip-title' = 'A unique descriptive title for the file, 
which will serve as a filename. You may use plain language with spaces. Do not 
include the file extension.',
+   'mwe-upwiz-tooltip-title' = 'A unique descriptive title for the file, 
which will serve as a filename and cannot be modified later. You may use plain 
language with spaces. Do not include the file extension.',
'mwe-upwiz-tooltip-description' = 'Briefly describe everything notable 
about the work.
 For a photo, mention the main things that are depicted, the occasion, or the 
place.',
'mwe-upwiz-tooltip-date' = 'Date this work was created or first 
published (-MM-DD format).',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6acd4b5118bf1a64f4248a3771b5e955c1ca6ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 nischay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix some minor bugs in the link neighbour code - change (mediawiki...Parsoid)

2013-02-26 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has submitted this change and it was merged.

Change subject: Fix some minor bugs in the link neighbour code
..


Fix some minor bugs in the link neighbour code

The traverser will now use Node:firstChild and Node:nextSibling to
traverse, and our link neighbour handler will now bail out correctly
if it's handling a non-wikilink link.

Test case:

echo Writing 40 [[Greasemonkey]] 
scripts[http://userscripts.org/users/21031/scripts] for fix websites and 
support Firefox | node parse --apiURL https://en.wikipedia.org/w/api.php; 
--wt2wt

Also:

node roundtrip-test.js 'August Penguin'

Change-Id: I736b794a2b916350c148f419b5153190fcaecbcf
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 32 insertions(+), 22 deletions(-)

Approvals:
  Subramanya Sastry: Verified; Looks good to me, approved



diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index 34b419c..ee68bd9 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -115,12 +115,17 @@
  * Traverse the DOM and fire the handlers that are registered
  */
 DOMTraverser.prototype.traverse = function ( node ) {
-   var ix, child, childDT, children = node.childNodes;
+   var childDT, nextChild, child = node.firstChild;
 
-   for ( ix = 0; children  ix  children.length; ix++ ) {
-   child = children[ix];
+   while ( child !== null ) {
+   nextChild = child.nextSibling;
this.callHandlers( child );
-   this.traverse( child );
+
+   if ( child.parentNode !== null ) {
+   this.traverse( child );
+   }
+
+   child = nextChild;
}
 };
 
@@ -2063,16 +2068,16 @@
var baseAbout = null,
regex = env.conf.wiki.linkPrefixRegex;
 
-   if ( node !== null  DU.isTplElementNode( env, node ) ) {
-   baseAbout = node.getAttribute( 'about' );
-   }
-
if ( !regex ) {
return null;
}
 
+   if ( node !== null  DU.isTplElementNode( env, node ) ) {
+   baseAbout = node.getAttribute( 'about' );
+   }
+
node = node === null ? node : node.previousSibling;
-   return searchForNeighbour( env, false, regex, node, baseAbout );
+   return findAndHandleNeighbour( env, false, regex, node, baseAbout );
 }
 
 /**
@@ -2082,29 +2087,30 @@
var baseAbout = null,
regex = env.conf.wiki.linkTrailRegex;
 
-   if ( node !== null  DU.isTplElementNode( env, node ) ) {
-   baseAbout = node.getAttribute( 'about' );
-   }
-
if ( !regex ) {
return null;
}
 
+   if ( node !== null  DU.isTplElementNode( env, node ) ) {
+   baseAbout = node.getAttribute( 'about' );
+   }
+
node = node === null ? node : node.nextSibling;
-   return searchForNeighbour( env, true, regex, node, baseAbout );
+   return findAndHandleNeighbour( env, true, regex, node, baseAbout );
 }
 
 /**
  * Abstraction of both link-prefix and link-trail searches.
  */
-function searchForNeighbour( env, goForward, regex, node, baseAbout ) {
-   var value, matches, document,
+function findAndHandleNeighbour( env, goForward, regex, node, baseAbout ) {
+   var value, matches, document, nextSibling,
nextNode = goForward ? 'nextSibling' : 'previousSibling',
innerNode = goForward ? 'firstChild' : 'lastChild',
getInnerNeighbour = goForward ? getLinkTrail : getLinkPrefix,
result = { content: [], src: '' };
 
while ( node !== null ) {
+   nextSibling = node[nextNode];
document = node.ownerDocument;
 
if ( node.nodeType === node.TEXT_NODE ) {
@@ -2114,6 +2120,7 @@
value.src = matches[0];
if ( value.src === node.nodeValue ) {
value.content = node;
+   node.parentNode.removeChild( node );
} else {
value.content = 
document.createTextNode( matches[0] );
node.parentNode.replaceChild( 
document.createTextNode( node.nodeValue.replace( regex, '' ) ), node );
@@ -2149,7 +2156,7 @@
} else {
break;
}
-   node = node[nextNode];
+   node = nextSibling;
}
 
return result;
@@ -2159,19 +2166,21 @@
  * Workhorse function for bringing linktrails and link prefixes into link 
content.
  */
 function handleLinkNeighbours( env, node ) {
-   var ix, prefix = getLinkPrefix( env, node ),
-   trail = getLinkTrail( env, node ),
-   dp = Util.getJSONAttribute( node, 'data-parsoid', {} 

[MediaWiki-commits] [Gerrit] Notifications for TemplateData to #mediawiki-visualeditor - change (operations/puppet)

2013-02-26 Thread Ryan Lane (Code Review)
Ryan Lane has submitted this change and it was merged.

Change subject: Notifications for TemplateData to #mediawiki-visualeditor
..


Notifications for TemplateData to #mediawiki-visualeditor

Change-Id: Ib7da92be82def9cdf313f6600054dbd7fc6f3bcc
---
M templates/gerrit/hookconfig.py.erb
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Ryan Lane: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/templates/gerrit/hookconfig.py.erb 
b/templates/gerrit/hookconfig.py.erb
index 87f6a4a..1eca1ab 100644
--- a/templates/gerrit/hookconfig.py.erb
+++ b/templates/gerrit/hookconfig.py.erb
@@ -29,6 +29,7 @@
mediawiki/extensions/MobileFrontend : mobile.log,
mediawiki/extensions/Parsoid: parsoid.log,
mediawiki/extensions/VisualEditor: visualeditor.log,
+   mediawiki/extensions/TemplateData: visualeditor.log,
analytics/*   : wikimedia-dev.log,
integration/* : wikimedia-dev.log,
labs/*  : labs.log,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7da92be82def9cdf313f6600054dbd7fc6f3bcc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org
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 for correct display of spaces in page names in form titles - change (mediawiki...SemanticForms)

2013-02-26 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: Fix for correct display of spaces in page names in form titles
..

Fix for correct display of spaces in page names in form titles

Change-Id: Ib60ba6bc1e325a9dd6cf288402726f9d97bf7f47
---
M specials/SF_FormEdit.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/specials/SF_FormEdit.php b/specials/SF_FormEdit.php
index 76e1dbd..b6f2b2e 100644
--- a/specials/SF_FormEdit.php
+++ b/specials/SF_FormEdit.php
@@ -38,6 +38,7 @@
$queryparts = explode( '/', $query, 2 );
$this-mForm = isset( $queryparts[ 0 ] ) ? $queryparts[ 
0 ] : '';
$this-mTarget = isset( $queryparts[ 1 ] ) ? 
$queryparts[ 1 ] : '';
+   $this-mTarget = str_replace( '_', ' ', $this-mTarget 
);
}
 
$alt_forms = $this-getRequest()-getArray( 'alt_form' );
@@ -62,7 +63,6 @@
}
 
static function printForm( $form_name, $targetName, $alt_forms = 
array( ) ) {
-
global $wgOut, $wgRequest;
 
if ( method_exists( 'ApiMain', 'getContext' ) ) {
@@ -108,8 +108,7 @@
} else {
$pageTitle = $result[ 'formtitle' ] . ': ' . 
$targetName;
}
-
-   } else if ( $result[ 'form' ] !== '' ) {
+   } elseif ( $result[ 'form' ] !== '' ) {
// set page title depending on whether the target page 
exists
if ( empty( $targetName ) ) {
$pageTitle = wfMessage( 
'sf_formedit_createtitlenotarget', $result[ 'form' ] )-text();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib60ba6bc1e325a9dd6cf288402726f9d97bf7f47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com

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


[MediaWiki-commits] [Gerrit] Disable photo upload button on main and protected pages - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Disable photo upload button on main and protected pages
..

Disable photo upload button on main and protected pages

Change-Id: Ia7236a76a18c81289a72515ed80629566eb5cee5
---
M javascripts/modules/mf-photo.js
M tests/js/test_mf-photo.js
2 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 4f9ceb2..31f2418 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -17,7 +17,7 @@
$container = $content_0;
}
 
-   return $container.find( '.thumb img, .navbox, .infobox' 
).length === 0;
+   return $container.find( 'img, .navbox, .infobox' ).length === 0;
}
 
function isSupported() {
@@ -432,7 +432,7 @@
} );
}
 
-   if ( isSupported() ) {
+   if ( isSupported()  M.getConfig( 'can_edit' ) ) {
// FIXME: https://bugzilla.wikimedia.org/show_bug.cgi?id=45299
if ( M.getConfig( 'beta' ) ) {
M.on( 'page-loaded', initialize );
diff --git a/tests/js/test_mf-photo.js b/tests/js/test_mf-photo.js
index 69a5a89..05aec3a 100644
--- a/tests/js/test_mf-photo.js
+++ b/tests/js/test_mf-photo.js
@@ -21,7 +21,9 @@
// no #content_0 and an infobox
[ $( 'divtable class=infoboxdiv' ), false ],
// no #content_0 and a navbox
-   [ $( 'divtable class=navboxdiv' ), false ]
+   [ $( 'divtable class=navboxdiv' ), false ],
+   // no #content_0, image not in .thumb (happens on main pages)
+   [ $( 'divimgdiv' ), false ]
];
 
 module( 'MobileFrontend photo', {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7236a76a18c81289a72515ed80629566eb5cee5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix for correct display of spaces in page names in form titles - change (mediawiki...SemanticForms)

2013-02-26 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Fix for correct display of spaces in page names in form titles
..


Fix for correct display of spaces in page names in form titles

Change-Id: Ib60ba6bc1e325a9dd6cf288402726f9d97bf7f47
---
M specials/SF_FormEdit.php
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/specials/SF_FormEdit.php b/specials/SF_FormEdit.php
index 76e1dbd..b6f2b2e 100644
--- a/specials/SF_FormEdit.php
+++ b/specials/SF_FormEdit.php
@@ -38,6 +38,7 @@
$queryparts = explode( '/', $query, 2 );
$this-mForm = isset( $queryparts[ 0 ] ) ? $queryparts[ 
0 ] : '';
$this-mTarget = isset( $queryparts[ 1 ] ) ? 
$queryparts[ 1 ] : '';
+   $this-mTarget = str_replace( '_', ' ', $this-mTarget 
);
}
 
$alt_forms = $this-getRequest()-getArray( 'alt_form' );
@@ -62,7 +63,6 @@
}
 
static function printForm( $form_name, $targetName, $alt_forms = 
array( ) ) {
-
global $wgOut, $wgRequest;
 
if ( method_exists( 'ApiMain', 'getContext' ) ) {
@@ -108,8 +108,7 @@
} else {
$pageTitle = $result[ 'formtitle' ] . ': ' . 
$targetName;
}
-
-   } else if ( $result[ 'form' ] !== '' ) {
+   } elseif ( $result[ 'form' ] !== '' ) {
// set page title depending on whether the target page 
exists
if ( empty( $targetName ) ) {
$pageTitle = wfMessage( 
'sf_formedit_createtitlenotarget', $result[ 'form' ] )-text();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib60ba6bc1e325a9dd6cf288402726f9d97bf7f47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com
Gerrit-Reviewer: Yaron Koren yaro...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Disable photo upload button on main and protected pages - change (mediawiki...MobileFrontend)

2013-02-26 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Disable photo upload button on main and protected pages
..


Disable photo upload button on main and protected pages

Change-Id: Ia7236a76a18c81289a72515ed80629566eb5cee5
---
M javascripts/modules/mf-photo.js
M tests/js/test_mf-photo.js
2 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 4f9ceb2..31f2418 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -17,7 +17,7 @@
$container = $content_0;
}
 
-   return $container.find( '.thumb img, .navbox, .infobox' 
).length === 0;
+   return $container.find( 'img, .navbox, .infobox' ).length === 0;
}
 
function isSupported() {
@@ -432,7 +432,7 @@
} );
}
 
-   if ( isSupported() ) {
+   if ( isSupported()  M.getConfig( 'can_edit' ) ) {
// FIXME: https://bugzilla.wikimedia.org/show_bug.cgi?id=45299
if ( M.getConfig( 'beta' ) ) {
M.on( 'page-loaded', initialize );
diff --git a/tests/js/test_mf-photo.js b/tests/js/test_mf-photo.js
index 69a5a89..05aec3a 100644
--- a/tests/js/test_mf-photo.js
+++ b/tests/js/test_mf-photo.js
@@ -21,7 +21,9 @@
// no #content_0 and an infobox
[ $( 'divtable class=infoboxdiv' ), false ],
// no #content_0 and a navbox
-   [ $( 'divtable class=navboxdiv' ), false ]
+   [ $( 'divtable class=navboxdiv' ), false ],
+   // no #content_0, image not in .thumb (happens on main pages)
+   [ $( 'divimgdiv' ), false ]
];
 
 module( 'MobileFrontend photo', {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7236a76a18c81289a72515ed80629566eb5cee5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Regsiter Query classes - change (mediawiki...Wikibase)

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

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


Change subject: Regsiter Query classes
..

Regsiter Query classes

Change-Id: I272c4ff3f95bb350a29fd50a1c42d2fb3c2a0ad7
---
M repo/config/Wikibase.experimental.php
1 file changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index d7f23b9..b6a3501 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -53,6 +53,16 @@
  'Wikibase\Repo\Database\QueryInterface',
  'Wikibase\Repo\Database\TableBuilder',
  'Wikibase\Repo\Database\TableDefinition',
+
+ 'Wikibase\Repo\Query\QueryEngine',
+ 'Wikibase\Repo\Query\QueryEngineResult',
+ 'Wikibase\Repo\Query\QueryResult',
+ 'Wikibase\Repo\Query\QueryStore',
+
+ 'Wikibase\Repo\Query\SQLStore\DataValueHandler',
+ 'Wikibase\Repo\Query\SQLStore\Engine',
+ 'Wikibase\Repo\Query\SQLStore\Setup',
+ 'Wikibase\Repo\Query\SQLStore\Store',
  ) as $class ) {
 
$wgAutoloadClasses[$class] = $dir . 'includes' . str_replace( '\\', 
'/', substr( $class, 13 ) ) . '.php';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I272c4ff3f95bb350a29fd50a1c42d2fb3c2a0ad7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Added test stubs for new Query code - change (mediawiki...Wikibase)

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

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


Change subject: Added test stubs for new Query code
..

Added test stubs for new Query code

Change-Id: Ib8c3c700ad7db8510dd91b8101693efc09368ffe
---
M repo/config/Wikibase.experimental.php
M repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
M repo/tests/phpunit/includes/Database/TableBuilderTest.php
M repo/tests/phpunit/includes/Database/TableDefinitionTest.php
A repo/tests/phpunit/includes/Query/QueryEngineResultTest.php
A repo/tests/phpunit/includes/Query/QueryEngineTest.php
A repo/tests/phpunit/includes/Query/QueryStoreTest.php
A repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php
A repo/tests/phpunit/includes/Query/SQLStore/SetupTest.php
A repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php
10 files changed, 279 insertions(+), 25 deletions(-)


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

diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index b6a3501..ac88acf 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -46,33 +46,45 @@
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
 
+$classes = array(
+   'Wikibase\Repo\Database\FieldDefinition',
+   'Wikibase\Repo\Database\MediaWikiQueryInterface',
+   'Wikibase\Repo\Database\QueryInterface',
+   'Wikibase\Repo\Database\TableBuilder',
+   'Wikibase\Repo\Database\TableDefinition',
 
-foreach ( array(
- 'Wikibase\Repo\Database\FieldDefinition',
- 'Wikibase\Repo\Database\MediaWikiQueryInterface',
- 'Wikibase\Repo\Database\QueryInterface',
- 'Wikibase\Repo\Database\TableBuilder',
- 'Wikibase\Repo\Database\TableDefinition',
+   'Wikibase\Repo\Query\QueryEngine',
+   'Wikibase\Repo\Query\QueryEngineResult',
+   'Wikibase\Repo\Query\QueryResult',
+   'Wikibase\Repo\Query\QueryStore',
 
- 'Wikibase\Repo\Query\QueryEngine',
- 'Wikibase\Repo\Query\QueryEngineResult',
- 'Wikibase\Repo\Query\QueryResult',
- 'Wikibase\Repo\Query\QueryStore',
+   'Wikibase\Repo\Query\SQLStore\DataValueHandler',
+   'Wikibase\Repo\Query\SQLStore\Engine',
+   'Wikibase\Repo\Query\SQLStore\Setup',
+   'Wikibase\Repo\Query\SQLStore\Store',
+);
 
- 'Wikibase\Repo\Query\SQLStore\DataValueHandler',
- 'Wikibase\Repo\Query\SQLStore\Engine',
- 'Wikibase\Repo\Query\SQLStore\Setup',
- 'Wikibase\Repo\Query\SQLStore\Store',
- ) as $class ) {
-
+foreach ( $classes as $class ) {
+   // This enforces partial PSR-0 compliance
$wgAutoloadClasses[$class] = $dir . 'includes' . str_replace( '\\', 
'/', substr( $class, 13 ) ) . '.php';
 }
+
+unset( $classes );
 
 if ( !class_exists( 'MessageReporter' ) ) {
$wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
$wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
 }
 
+if ( defined( 'MW_PHPUNIT_TEST' ) ) {
+   $wgAutoloadClasses['Wikibase\Repo\Test\Query\QueryEngineTest']
+   = $dir . 'tests/phpunit/includes/Query/QueryEngineTest.php';
+
+   $wgAutoloadClasses['Wikibase\Repo\Test\Query\QueryStoreTest']
+   = $dir . 'tests/phpunit/includes/Query/QueryStoreTest.php';
+}
+
+unset( $dir );
 
 $wgAPIModules['wbremovequalifiers']= 
'Wikibase\Repo\Api\RemoveQualifiers';
 $wgAPIModules['wbsetqualifier']= 
'Wikibase\Repo\Api\SetQualifier';
@@ -82,8 +94,6 @@
 $wgSpecialPages['EntityData']  = 
'SpecialEntityData';
 
 $wgContentHandlers[CONTENT_MODEL_WIKIBASE_QUERY] = '\Wikibase\QueryHandler';
-
-unset( $dir );
 
 /**
  * Hook to add PHPUnit test cases.
@@ -110,6 +120,12 @@
'Database/TableBuilder',
'Database/TableDefinition',
 
+   'Query/QueryEngineResult',
+
+   'Query/SQLStore/Engine',
+   'Query/SQLStore/Setup',
+   'Query/SQLStore/Store',
+
'specials/SpecialEntityData',
 
);
diff --git a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
index 122cbfb..5566a95 100644
--- a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
+++ b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
@@ -5,7 +5,7 @@
 use Wikibase\Repo\Database\FieldDefinition;
 
 /**
- * Unit test 

[MediaWiki-commits] [Gerrit] Disable reactors for now - change (operations/puppet)

2013-02-26 Thread Ryan Lane (Code Review)
Ryan Lane has uploaded a new change for review.

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


Change subject: Disable reactors for now
..

Disable reactors for now

These reactors aren't working properly, and they cause connection
issues with minions. Disable till working properly.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/50942/1

diff --git a/manifests/role/salt.pp b/manifests/role/salt.pp
index 020325f..8267ab1 100644
--- a/manifests/role/salt.pp
+++ b/manifests/role/salt.pp
@@ -42,13 +42,13 @@
salt_file_roots = $salt_file_roots,
salt_pillar_roots = $salt_pillar_roots,
salt_worker_threads = 50,
-   # event_tag = [reactors]
-   salt_reactor = {
-   auth = [auth.sls],
-   key = [key.sls],
-   minion_start = [minion_start.sls],
-   puppet = [puppet.sls],
-   },
+   ## event_tag = [reactors]
+   #salt_reactor = {
+   #   auth = [auth.sls],
+   #   key = [key.sls],
+   #   minion_start = [minion_start.sls],
+   #   puppet = [puppet.sls],
+   #},
}
 
class { salt_reactors:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If040e33f3c8e44c5f17354b33548f77afed71b8c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ryan Lane rl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Store semantic data after successfully uploading a file from... - change (mediawiki...SemanticMediaWiki)

2013-02-26 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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


Change subject: Store semantic data after successfully uploading a file from 
Special:Upload
..

Store semantic data after successfully uploading a file from Special:Upload

This patch introduces a hook handler for SpecialUploadComplete called after 
successfully uploading a file from Special:Upload.
The handler will trigger storing of semantic data for the uploaded file's wiki 
page.

Change-Id: Iac0a48b16ae84693c32666520e03bd23d6b4b06f
---
M includes/SMW_ParseData.php
M includes/Setup.php
2 files changed, 22 insertions(+), 0 deletions(-)


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

diff --git a/includes/SMW_ParseData.php b/includes/SMW_ParseData.php
index c35053f..4bc8c70 100644
--- a/includes/SMW_ParseData.php
+++ b/includes/SMW_ParseData.php
@@ -515,6 +515,27 @@
}
 
/**
+* This method will be called after successfully uploading a file from 
Special:Upload
+*/
+   static public function onSpecialUploadComplete( SpecialUpload 
$special_upload ) {
+
+   global $wgParser;
+
+   // get Title and WikiPage for the uploaded file
+   $title = $special_upload-mLocalFile-getTitle();
+   $wikiPage = new WikiFilePage( $title );
+
+   // parse the page text
+   $wgParser-parse( $wikiPage-getRawText(), $title, 
$wikiPage-makeParserOptions( 'canonical' ) );
+
+   // store the semantic data
+   $parserOutput = $wgParser-getOutput();
+   self::storeData( $parserOutput, $title, true );
+
+   return true;
+   }
+
+   /**
 * This method will be called whenever an article is deleted so that
 * semantic properties are cleared appropriately.
 */
diff --git a/includes/Setup.php b/includes/Setup.php
index c1b6026..173bff3 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -58,6 +58,7 @@
$wgHooks['ArticleDelete'][] = 'SMWParseData::onArticleDelete'; // 
delete annotations
$wgHooks['TitleMoveComplete'][] = 'SMWParseData::onTitleMoveComplete'; 
// move annotations
$wgHooks['LinksUpdateConstructed'][] = 
'SMWParseData::onLinksUpdateConstructed'; // update data after template change 
and at save
+   $wgHooks['SpecialUploadComplete'][] = 
'SMWParseData::onSpecialUploadComplete'; // update data after file upload
$wgHooks['ParserAfterTidy'][] = 'SMWParseData::onParserAfterTidy'; // 
fetch some MediaWiki data for replication in SMW's store
$wgHooks['NewRevisionFromEditComplete'][] = 
'SMWParseData::onNewRevisionFromEditComplete'; // fetch some MediaWiki data for 
replication in SMW's store
$wgHooks['OutputPageParserOutput'][] = 
'SMWFactbox::onOutputPageParserOutput'; // copy some data for later Factbox 
display

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac0a48b16ae84693c32666520e03bd23d6b4b06f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com

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


  1   2   3   4   >