[MediaWiki-commits] [Gerrit] Remove support for hphpc - change (mediawiki...wikihiero)

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

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


Change subject: Remove support for hphpc
..

Remove support for hphpc

Since support will soon be removed from the core.

Change-Id: Ic9d1e795f5926eb0a864ad0cb79ddb51c1f00e42
---
M wikihiero.php
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero 
refs/changes/80/62780/1

diff --git a/wikihiero.php b/wikihiero.php
index 9fc8fbd..66f16eb 100644
--- a/wikihiero.php
+++ b/wikihiero.php
@@ -68,8 +68,6 @@
),
 );
 
-$wgCompiledFiles[] = MWInit::extCompiledPath( 'wikihiero/data/tables.php' );
-
 /**
  * Because hiero tag is used rarely, we don't need to load its body on every 
hook call,
  * so we keep our simple hook handlers here.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9d1e795f5926eb0a864ad0cb79ddb51c1f00e42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/wikihiero
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 44849) improved icons for provider selection page - change (mediawiki...OpenID)

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

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


Change subject: (bug 44849) improved icons for provider selection page
..

(bug 44849) improved icons for provider selection page

removed dead openid provider logos (Vox, Vidoop)

bumped to version 3.31 20130508

Change-Id: Ia4fe10ae54fb9d0e58913986f9f63b0d36762ba8
---
M CHANGES
M OpenID.php
M OpenIDProvider.body.php
M skin/icons/AOL_large.png
M skin/icons/Blogger_small.png
M skin/icons/Google_large.png
M skin/icons/Verisign_small.png
M skin/icons/WordPress_small.png
M skin/icons/Yahoo_large.png
M skin/openid.css
10 files changed, 9 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenID 
refs/changes/81/62781/3

diff --git a/CHANGES b/CHANGES
index 89b15ae..6318bdf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 CHANGES
 ===
 
+3.31  20130508  removal of dead openid provider logos (Vox, Vidoop)
+bug 44849 retina icons
 3.30  20130505  giving up backward compatibility
 removed outdated Makefile and patch for openid-php library
 renamed README.OpenID-mediawiki-extension to README
diff --git a/OpenID.php b/OpenID.php
index 0fc6bea..79f8947 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
exit( 1 );
 }
 
-define( 'MEDIAWIKI_OPENID_VERSION', '3.30 20130505' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.31 20130508' );
 
 $path = dirname( __FILE__ );
 set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . 
get_include_path() );
diff --git a/OpenIDProvider.body.php b/OpenIDProvider.body.php
index b19d9d0..d7d31df 100644
--- a/OpenIDProvider.body.php
+++ b/OpenIDProvider.body.php
@@ -186,10 +186,6 @@
wfMessage( 
'openid-provider-label-other-username', 'LiveJournal' )-text(),
'http://{username}.livejournal.com/'
),
-   new self( 'VOX',
-   wfMessage( 
'openid-provider-label-other-username', 'VOX' )-text(),
-   'http://{username}.vox.com/'
-   ),
new self( 'Blogger',
wfMessage( 
'openid-provider-label-other-username', 'Blogger' )-text(),
'http://{username}.blogspot.com/'
@@ -201,10 +197,6 @@
new self( 'Verisign',
wfMessage( 
'openid-provider-label-other-username', 'Verisign' )-text(),
'http://{username}.pip.verisignlabs.com/'
-   ),
-   new self( 'Vidoop',
-   wfMessage( 
'openid-provider-label-other-username', 'Vidoop' )-text(),
-   'http://{username}.myvidoop.com/'
),
new self( 'ClaimID',
wfMessage( 
'openid-provider-label-other-username', 'ClaimID' )-text(),
diff --git a/skin/icons/AOL_large.png b/skin/icons/AOL_large.png
index b2061d5..88f9ea5 100644
--- a/skin/icons/AOL_large.png
+++ b/skin/icons/AOL_large.png
Binary files differ
diff --git a/skin/icons/Blogger_small.png b/skin/icons/Blogger_small.png
index 91ea10b..38582c6 100644
--- a/skin/icons/Blogger_small.png
+++ b/skin/icons/Blogger_small.png
Binary files differ
diff --git a/skin/icons/Google_large.png b/skin/icons/Google_large.png
index 1a9a405..97b39f1 100644
--- a/skin/icons/Google_large.png
+++ b/skin/icons/Google_large.png
Binary files differ
diff --git a/skin/icons/Verisign_small.png b/skin/icons/Verisign_small.png
index 306a0a6..e7d7e53 100644
--- a/skin/icons/Verisign_small.png
+++ b/skin/icons/Verisign_small.png
Binary files differ
diff --git a/skin/icons/WordPress_small.png b/skin/icons/WordPress_small.png
index 4cd2f7a..a4104a9 100644
--- a/skin/icons/WordPress_small.png
+++ b/skin/icons/WordPress_small.png
Binary files differ
diff --git a/skin/icons/Yahoo_large.png b/skin/icons/Yahoo_large.png
index 43a60a4..2ae0be5 100644
--- a/skin/icons/Yahoo_large.png
+++ b/skin/icons/Yahoo_large.png
Binary files differ
diff --git a/skin/openid.css b/skin/openid.css
index 99e3c80..af8ed02 100644
--- a/skin/openid.css
+++ b/skin/openid.css
@@ -1,5 +1,5 @@
 #openid_form {
-   width: 470px;   
+   width: 500px;
 }
 
 #openid_form legend {
@@ -23,8 +23,10 @@
height: 60px;
border: 2px solid #DDD;
margin: 3px;
+   padding: 3px;
float: left;
-   background: #fff no-repeat top left;
+   background: transparent no-repeat center;
+   background-size: 100px 60px;
 }
 .openid_small_btn {
width: 24px;
@@ -32,7 +34,8 @@
border: 1px solid #DDD;
margin: 3px;
float: left;
-   background: #fff no-repeat top left;
+   background: transparent no-repeat

[MediaWiki-commits] [Gerrit] (bug 44849) improved icons for provider selection page - change (mediawiki...OpenID)

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

Change subject: (bug 44849) improved icons for provider selection page
..


(bug 44849) improved icons for provider selection page

removed dead openid provider logos (Vox, Vidoop)

bumped to version 3.31 20130508

Change-Id: Ia4fe10ae54fb9d0e58913986f9f63b0d36762ba8
---
M CHANGES
M OpenID.php
M OpenIDProvider.body.php
M skin/icons/AOL_large.png
M skin/icons/Blogger_small.png
M skin/icons/Google_large.png
M skin/icons/Verisign_small.png
M skin/icons/WordPress_small.png
M skin/icons/Yahoo_large.png
M skin/openid.css
10 files changed, 9 insertions(+), 12 deletions(-)

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



diff --git a/CHANGES b/CHANGES
index 89b15ae..6318bdf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 CHANGES
 ===
 
+3.31  20130508  removal of dead openid provider logos (Vox, Vidoop)
+bug 44849 retina icons
 3.30  20130505  giving up backward compatibility
 removed outdated Makefile and patch for openid-php library
 renamed README.OpenID-mediawiki-extension to README
diff --git a/OpenID.php b/OpenID.php
index 0fc6bea..79f8947 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
exit( 1 );
 }
 
-define( 'MEDIAWIKI_OPENID_VERSION', '3.30 20130505' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.31 20130508' );
 
 $path = dirname( __FILE__ );
 set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . 
get_include_path() );
diff --git a/OpenIDProvider.body.php b/OpenIDProvider.body.php
index b19d9d0..d7d31df 100644
--- a/OpenIDProvider.body.php
+++ b/OpenIDProvider.body.php
@@ -186,10 +186,6 @@
wfMessage( 
'openid-provider-label-other-username', 'LiveJournal' )-text(),
'http://{username}.livejournal.com/'
),
-   new self( 'VOX',
-   wfMessage( 
'openid-provider-label-other-username', 'VOX' )-text(),
-   'http://{username}.vox.com/'
-   ),
new self( 'Blogger',
wfMessage( 
'openid-provider-label-other-username', 'Blogger' )-text(),
'http://{username}.blogspot.com/'
@@ -201,10 +197,6 @@
new self( 'Verisign',
wfMessage( 
'openid-provider-label-other-username', 'Verisign' )-text(),
'http://{username}.pip.verisignlabs.com/'
-   ),
-   new self( 'Vidoop',
-   wfMessage( 
'openid-provider-label-other-username', 'Vidoop' )-text(),
-   'http://{username}.myvidoop.com/'
),
new self( 'ClaimID',
wfMessage( 
'openid-provider-label-other-username', 'ClaimID' )-text(),
diff --git a/skin/icons/AOL_large.png b/skin/icons/AOL_large.png
index b2061d5..88f9ea5 100644
--- a/skin/icons/AOL_large.png
+++ b/skin/icons/AOL_large.png
Binary files differ
diff --git a/skin/icons/Blogger_small.png b/skin/icons/Blogger_small.png
index 91ea10b..38582c6 100644
--- a/skin/icons/Blogger_small.png
+++ b/skin/icons/Blogger_small.png
Binary files differ
diff --git a/skin/icons/Google_large.png b/skin/icons/Google_large.png
index 1a9a405..97b39f1 100644
--- a/skin/icons/Google_large.png
+++ b/skin/icons/Google_large.png
Binary files differ
diff --git a/skin/icons/Verisign_small.png b/skin/icons/Verisign_small.png
index 306a0a6..e7d7e53 100644
--- a/skin/icons/Verisign_small.png
+++ b/skin/icons/Verisign_small.png
Binary files differ
diff --git a/skin/icons/WordPress_small.png b/skin/icons/WordPress_small.png
index 4cd2f7a..a4104a9 100644
--- a/skin/icons/WordPress_small.png
+++ b/skin/icons/WordPress_small.png
Binary files differ
diff --git a/skin/icons/Yahoo_large.png b/skin/icons/Yahoo_large.png
index 43a60a4..2ae0be5 100644
--- a/skin/icons/Yahoo_large.png
+++ b/skin/icons/Yahoo_large.png
Binary files differ
diff --git a/skin/openid.css b/skin/openid.css
index 99e3c80..af8ed02 100644
--- a/skin/openid.css
+++ b/skin/openid.css
@@ -1,5 +1,5 @@
 #openid_form {
-   width: 470px;   
+   width: 500px;
 }
 
 #openid_form legend {
@@ -23,8 +23,10 @@
height: 60px;
border: 2px solid #DDD;
margin: 3px;
+   padding: 3px;
float: left;
-   background: #fff no-repeat top left;
+   background: transparent no-repeat center;
+   background-size: 100px 60px;
 }
 .openid_small_btn {
width: 24px;
@@ -32,7 +34,8 @@
border: 1px solid #DDD;
margin: 3px;
float: left;
-   background: #fff no-repeat top left;
+   background: transparent no-repeat center;
+   background-size: 24px 24px

[MediaWiki-commits] [Gerrit] Fix wording of openid-trusted-sites-delete-confirmation-page... - change (mediawiki...OpenID)

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

Change subject: Fix wording of 
openid-trusted-sites-delete-confirmation-page-title
..


Fix wording of openid-trusted-sites-delete-confirmation-page-title

For English and consistency reasons (see message above).
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Openid-trusted-sites-delete-confirmation-page-title/en

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

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



diff --git a/OpenID.i18n.php b/OpenID.i18n.php
index c2b5afb..71f5aa8 100644
--- a/OpenID.i18n.php
+++ b/OpenID.i18n.php
@@ -143,7 +143,7 @@
'openid-trusted-sites-table-header-column-action' = 'Action',
'openid-trusted-sites-delete-link-action-text' = 'Delete',
'openid-trusted-sites-delete-all-link-action-text' = 'Delete all 
trusted sites',
-   'openid-trusted-sites-delete-confirmation-page-title' = 'Site trust 
deletion',
+   'openid-trusted-sites-delete-confirmation-page-title' = 'Trusted site 
deletion',
'openid-trusted-sites-delete-confirmation-question' = 'By clicking the 
{{int:openid-trusted-sites-delete-confirmation-button-text}} button, you will 
remove $1 from the list of sites you trust.',
'openid-trusted-sites-delete-all-confirmation-question' = 'By clicking 
the {{int:openid-trusted-sites-delete-confirmation-button-text}} button, you 
will remove all trusted sites from your user profile.',
'openid-trusted-sites-delete-confirmation-button-text' = 'Confirm',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4849af75091f3f2ec62319ed9c016489104f844
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OpenID
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Wikinaut m...@tgries.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] [ZeroRatedMobileAccess]] Register new ZeroConfig i18n file - change (translatewiki)

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

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


Change subject: [ZeroRatedMobileAccess]] Register new ZeroConfig i18n file
..

[ZeroRatedMobileAccess]] Register new ZeroConfig i18n file

https://gerrit.wikimedia.org/r/#/c/60775/17/includes/ZeroConfig.i18n.php,unified

Change-Id: I2fbf516544ee49ef468b796f7b8b70a075ef86d1
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/82/62782/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 630174b..c83caf1 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1737,3 +1737,6 @@
 Zero Rated Mobile Access
 ignored = zero-rated-mobile-access-carrier-options-wiki-page, 
zero-rated-mobile-access-language-options-wiki-page-for-carrier
 ignored = zero-rated-mobile-access-carrier-options-supported-wikis-wiki-page
+
+Zero Rated Mobile Access - Zero Config
+file = ZeroRatedMobileAccess/includes/ZeroConfig.i18n.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fbf516544ee49ef468b796f7b8b70a075ef86d1
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
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] [ZeroRatedMobileAccess]] Register new ZeroConfig i18n file - change (translatewiki)

2013-05-08 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [ZeroRatedMobileAccess]] Register new ZeroConfig i18n file
..


[ZeroRatedMobileAccess]] Register new ZeroConfig i18n file

https://gerrit.wikimedia.org/r/#/c/60775/17/includes/ZeroConfig.i18n.php,unified

Change-Id: I2fbf516544ee49ef468b796f7b8b70a075ef86d1
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 630174b..c83caf1 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1737,3 +1737,6 @@
 Zero Rated Mobile Access
 ignored = zero-rated-mobile-access-carrier-options-wiki-page, 
zero-rated-mobile-access-language-options-wiki-page-for-carrier
 ignored = zero-rated-mobile-access-carrier-options-supported-wikis-wiki-page
+
+Zero Rated Mobile Access - Zero Config
+file = ZeroRatedMobileAccess/includes/ZeroConfig.i18n.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fbf516544ee49ef468b796f7b8b70a075ef86d1
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: 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] Update URLs to point to the extension's proper location - change (mediawiki...TwoFactorAuthentication)

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

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


Change subject: Update URLs to point to the extension's proper location
..

Update URLs to point to the extension's proper location

Update URLs to MediaWiki Wiki

Change-Id: I44929fd353f738b29369b8f741d64f49c72635ae
---
M TwoFactorAuth.hooks.php
M TwoFactorAuth.php
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoFactorAuthentication 
refs/changes/83/62783/1

diff --git a/TwoFactorAuth.hooks.php b/TwoFactorAuth.hooks.php
index 7b6d504..ca90420 100644
--- a/TwoFactorAuth.hooks.php
+++ b/TwoFactorAuth.hooks.php
@@ -3,7 +3,7 @@
 /**
  * TwoFactorAuth extension - Support for TOTP two-factor authentication
  *
- * For more info see http://mediawiki.org/wiki/Extension:TwoFactorAuth
+ * For more info see 
http://mediawiki.org/wiki/Extension:TwoFactorAuthentication
  *
  * @file
  * @ingroup Extensions
diff --git a/TwoFactorAuth.php b/TwoFactorAuth.php
index 7560397..c325f01 100644
--- a/TwoFactorAuth.php
+++ b/TwoFactorAuth.php
@@ -2,7 +2,7 @@
 /**
  * TwoFactorAuth extension - Support for TOTP two-factor authentication
  *
- * For more info see http://mediawiki.org/wiki/Extension:TwoFactorAuth
+ * For more info see 
http://mediawiki.org/wiki/Extension:TwoFactorAuthentication
  *
  * @file
  * @ingroup Extensions
@@ -22,7 +22,7 @@
'name' = 'TwoFactorAuth',
'author' = 'Tyler Romeo',
'version' = '0.2',
-   'url' = 'http://mediawiki.org/wiki/Extension:TwoFactorAuth',
+   'url' = 'http://mediawiki.org/wiki/Extension:TwoFactorAuthentication',
'descriptionmsg' = 'twofactorauth-desc',
 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44929fd353f738b29369b8f741d64f49c72635ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoFactorAuthentication
Gerrit-Branch: master
Gerrit-Owner: FastLizard4 fastlizard4-git-comm...@fastlizard4.org

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


[MediaWiki-commits] [Gerrit] Remove hphpc support and deprecate related functions - change (mediawiki/core)

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

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


Change subject: Remove hphpc support and deprecate related functions
..

Remove hphpc support and deprecate related functions

hphpc has been superseded by hhvm, so support for hphpc is no longer
needed.

* Continue to use Preprocessor_Hash under HipHop since it is still
  faster under hhvm
* Keep $wgCompiledFiles for now, so that wikihiero doesn't give an error
  before Ic9d1e795 is merged
* Migrate the run-server script and associated configuration file to
  hhvm. Enable EnableStaticContentFromDisk since it doesn't seem
  ridiculously inefficient at first glance. Run from $IP rather than
  $IP/.. since hhvm is apparently not picky about sourcing files from
  outside of the current directory.

Change-Id: Ic3e769f1fbad4f7ad26dd819406796fee48c6b45
---
M api.php
M img_auth.php
M includes/DefaultSettings.php
M includes/Init.php
M includes/Setup.php
M includes/Skin.php
M includes/WebStart.php
M includes/externalstore/ExternalStore.php
M includes/filebackend/SwiftFileBackend.php
M includes/filerepo/FileRepo.php
M includes/job/JobQueue.php
M includes/parser/Parser.php
M includes/parser/Tidy.php
M includes/profiler/Profiler.php
M includes/profiler/ProfilerSimpleUDP.php
M index.php
M languages/Language.php
M load.php
M maintenance/doMaintenance.php
D maintenance/hiphop/compiler.conf
D maintenance/hiphop/extra-files
D maintenance/hiphop/make
M maintenance/hiphop/run-server
M maintenance/hiphop/server.conf
M mw-config/index.php
M profileinfo.php
M thumb.php
27 files changed, 97 insertions(+), 676 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/62784/1

diff --git a/api.php b/api.php
index bc90229..b9efe2c 100644
--- a/api.php
+++ b/api.php
@@ -41,11 +41,7 @@
 }
 
 // Initialise common code.
-if ( isset( $_SERVER['MW_COMPILED'] ) ) {
-   require ( 'core/includes/WebStart.php' );
-} else {
-   require ( __DIR__ . '/includes/WebStart.php' );
-}
+require ( __DIR__ . '/includes/WebStart.php' );
 
 wfProfileIn( 'api.php' );
 $starttime = microtime( true );
diff --git a/img_auth.php b/img_auth.php
index ccaa8af..667a40a 100644
--- a/img_auth.php
+++ b/img_auth.php
@@ -40,11 +40,7 @@
  */
 
 define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
-if ( isset( $_SERVER['MW_COMPILED'] ) ) {
-   require ( 'core/includes/WebStart.php' );
-} else {
-   require ( __DIR__ . '/includes/WebStart.php' );
-}
+require ( __DIR__ . '/includes/WebStart.php' );
 wfProfileIn( 'img_auth.php' );
 
 # Set action base paths so that WebRequest::getPathInfo()
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 053e3a8..407ac8f 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6182,56 +6182,6 @@
 /** @} */ # End job queue }
 
 ///**
- * @name   HipHop compilation
- * @{
- */
-
-/**
- * The build directory for HipHop compilation.
- * Defaults to '$IP/maintenance/hiphop/build'.
- */
-$wgHipHopBuildDirectory = false;
-
-/**
- * The HipHop build type. Can be either Debug or Release.
- */
-$wgHipHopBuildType = 'Debug';
-
-/**
- * Number of parallel processes to use during HipHop compilation, or detect
- * to guess from system properties.
- */
-$wgHipHopCompilerProcs = 'detect';
-
-/**
- * Filesystem extensions directory. Defaults to $IP/../extensions.
- *
- * To compile extensions with HipHop, set $wgExtensionsDirectory correctly,
- * and use code like:
- * @code
- *require( MWInit::extensionSetupPath( 'Extension/Extension.php' ) );
- * @endcode
- *
- * to include the extension setup file from LocalSettings.php. It is not
- * necessary to set this variable unless you use MWInit::extensionSetupPath().
- */
-$wgExtensionsDirectory = false;
-
-/**
- * A list of files that should be compiled into a HipHop build, in addition to
- * those listed in $wgAutoloadClasses. Add to this array in an extension setup
- * file in order to add files to the build.
- *
- * The files listed here must either be either absolute paths under $IP or
- * under $wgExtensionsDirectory, or paths relative to the virtual source root
- * $IP/.., i.e. starting with phase3 for core files, and extensions for
- * extension files.
- */
-$wgCompiledFiles = array();
-
-/** @} */ # End of HipHop compilation }
-
-///**
  * @name   Miscellaneous
  * @{
  */
@@ -6382,6 +6332,12 @@
 );
 
 /**
+ * Formerly a list of files for HipHop compilation
+ * @deprecated since 1.22
+ */
+$wgCompiledFiles = array();
+
+/**
  * For really cool vim folding this needs to be at the end:
  * vim: foldmarker=@{,@} foldmethod=marker
  * @}
diff --git a/includes/Init.php b/includes/Init.php
index 835ffdb..64431f0 100644
--- a/includes/Init.php
+++ b/includes/Init.php
@@ -2,6 +2,9 @@
 /**
  * Some functions that 

[MediaWiki-commits] [Gerrit] Add option to not log autopatrol actions to logging table - change (mediawiki/core)

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

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


Change subject: Add option to not log autopatrol actions to logging table
..

Add option to not log autopatrol actions to logging table

Per bug 47415, this is needed for Wikidata and could be useful for other wikis, 
as well.

Change-Id: Ic999454d001c38dea08746d1e8184f0163cb7330
---
M includes/DefaultSettings.php
M includes/WikiPage.php
2 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/85/62785/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c198081..0c22470 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5114,6 +5114,9 @@
 /** Use new page patrolling to check new pages on Special:Newpages */
 $wgUseNPPatrol = true;
 
+/** Log autopatrol actions to the log table */
+$wgLogAutopatrol = true;
+
 /** Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages */
 $wgFeed = true;
 
diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index 8c00e1b..3192f06 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -1644,7 +1644,7 @@
 */
public function doEditContent( Content $content, $summary, $flags = 0, 
$baseRevId = false,
   User $user = 
null, $serialisation_format = null ) {
-   global $wgUser, $wgUseAutomaticEditSummaries, $wgUseRCPatrol, 
$wgUseNPPatrol;
+   global $wgUser, $wgUseAutomaticEditSummaries, $wgUseRCPatrol, 
$wgUseNPPatrol, $wgLogAutopatrol;
 
// Low-level sanity check
if ( $this-mTitle-getText() === '' ) {
@@ -1803,7 +1803,7 @@
);
 
// Log auto-patrolled edits
-   if ( $patrolled ) {
+   if ( $wgLogAutopatrol === true  
$patrolled ) {
PatrolLog::record( $rc, true, 
$user );
}
}
@@ -1900,7 +1900,7 @@
'', $newsize, $revisionId, $patrolled );
 
// Log auto-patrolled edits
-   if ( $patrolled ) {
+   if ( $wgLogAutopatrol === true  $patrolled ) {
PatrolLog::record( $rc, true, $user );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic999454d001c38dea08746d1e8184f0163cb7330
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] jobs for mw/ext/TwnMainPage - change (integration/jenkins-job-builder-config)

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

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


Change subject: jobs for mw/ext/TwnMainPage
..

jobs for mw/ext/TwnMainPage

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


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 9604630..a1ff0da 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -350,6 +350,7 @@
  - Translate
  - TranslationNotifications
  - TrustedXFF
+ - TwnMainPage
  - UnicodeConverter
  - UniversalLanguageSelector
  - UploadBlacklist

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3999be01dd162e085e0d7f694420057fd3233152
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Also render attributes of the form html/i-j/attrName in CE - change (mediawiki...VisualEditor)

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

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


Change subject: Also render attributes of the form html/i-j/attrName in CE
..

Also render attributes of the form html/i-j/attrName in CE

Factored the parsing of html/* attributes out into a static function.
Factored attribute (re)rendering out into ce.View, attribute updates
are much simpler now.

Change-Id: I4caa6d5e1e2c21c28ddff61c3c864e47f66cc6b2
---
M modules/ve/ce/ve.ce.Node.js
M modules/ve/ce/ve.ce.View.js
M modules/ve/dm/ve.dm.Converter.js
3 files changed, 49 insertions(+), 33 deletions(-)


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

diff --git a/modules/ve/ce/ve.ce.Node.js b/modules/ve/ce/ve.ce.Node.js
index 16cb9e7..2a5bf96 100644
--- a/modules/ve/ce/ve.ce.Node.js
+++ b/modules/ve/ce/ve.ce.Node.js
@@ -63,19 +63,7 @@
  * @param {string} to New value
  */
 ve.ce.Node.prototype.onAttributeChange = function ( key, from, to ) {
-   var htmlKey = key.substr( 7 ).toLowerCase();
-   if (
-   this.constructor.static.renderHtmlAttributes 
-   key.indexOf( 'html/0/' ) === 0 
-   htmlKey.length 
-   this.constructor.static.domAttributeWhitelist.indexOf( htmlKey 
) !== -1
-   ) {
-   if ( to === undefined ) {
-   this.$.removeAttr( htmlKey );
-   } else {
-   this.$.attr( htmlKey, to );
-   }
-   }
+   this.renderAttributes( { key: to } );
 };
 
 /**
diff --git a/modules/ve/ce/ve.ce.View.js b/modules/ve/ce/ve.ce.View.js
index 188ac6d..891bd8a 100644
--- a/modules/ve/ce/ve.ce.View.js
+++ b/modules/ve/ce/ve.ce.View.js
@@ -26,13 +26,7 @@
 
// Initialization
this.$.data( 'view', this );
-   if ( this.constructor.static.renderHtmlAttributes ) {
-   ve.setDomAttributes(
-   this.$[0],
-   this.model.getAttributes( 'html/0/' ),
-   this.constructor.static.domAttributeWhitelist
-   );
-   }
+   this.renderAttributes( this.model.getAttributes() );
 };
 
 /* Inheritance */
@@ -116,3 +110,21 @@
this.live = live;
this.emit( 'live' );
 };
+
+ve.ce.View.prototype.renderAttributes = function ( attributes ) {
+   var key, parsed,
+   whitelist = this.constructor.static.domAttributeWhitelist;
+   if ( !this.constructor.static.renderHtmlAttributes ) {
+   return;
+   }
+   for ( key in attributes ) {
+   parsed = ve.dm.Converter.parseHtmlAttribute( key, this.$ );
+   if ( parsed  whitelist.indexOf( parsed.attribute ) !== -1 ) {
+   if ( attributes[key] === undefined ) {
+   parsed.domElement.removeAttribute( 
parsed.attribute );
+   } else {
+   parsed.domElement.setAttribute( 
parsed.attribute, attributes[key] );
+   }
+   }
+   }
+};
\ No newline at end of file
diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index b7258dd..8f4ebaa 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -97,6 +97,31 @@
}
 };
 
+/**
+ * Parse a linear model attribute name of the form html/i-j-k/attrName.
+ *
+ * @param {string} attribute Name of a linear model attribute
+ * @param {HTMLElement[]|jQuery} domElements DOM elements array that the 
attribute indexes into
+ * @returns {Object|null} Object with domElement and attribute keys, or null
+ */
+ve.dm.Converter.parseHtmlAttribute = function ( attribute, domElements ) {
+   var i, ilen, indexes, child,
+   /*jshint regexp:false */
+   matches = attribute.match( /^html\/((?:\d+\-)*\d)\/(.*)$/ );
+   if ( !matches ) {
+   return null;
+   }
+   indexes = matches[1].split( '-' ); // matches[1] like '1-2-3'
+   child = domElements[indexes[0]];
+   for ( i = 1, ilen = indexes.length; i  ilen; i++ ) {
+   child = child  child.childNodes[indexes[i]];
+   }
+   if ( !child ) {
+   return null;
+   }
+   return { 'domElement': child, 'attribute': matches[2] };
+};
+
 /* Methods */
 
 /**
@@ -198,7 +223,7 @@
  * @returns {HTMLElement|boolean} DOM element, or false if the element cannot 
be converted
  */
 ve.dm.Converter.prototype.getDomElementsFromDataElement = function ( 
dataElements, doc ) {
-   var domElements, dataElementAttributes, key, matches, indexes, i, ilen, 
child,
+   var domElements, dataElementAttributes, key, parsed,
dataElement = ve.isArray( dataElements ) ? dataElements[0] : 
dataElements,
nodeClass = this.modelRegistry.lookup( dataElement.type );
if ( !nodeClass ) {
@@ -214,18 +239,9 @@
 

[MediaWiki-commits] [Gerrit] jobs for mw/ext/TwnMainPage - change (integration/jenkins-job-builder-config)

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

Change subject: jobs for mw/ext/TwnMainPage
..


jobs for mw/ext/TwnMainPage

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

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 9604630..a1ff0da 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -350,6 +350,7 @@
  - Translate
  - TranslationNotifications
  - TrustedXFF
+ - TwnMainPage
  - UnicodeConverter
  - UniversalLanguageSelector
  - UploadBlacklist

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3999be01dd162e085e0d7f694420057fd3233152
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] wgUserId is now in core. - change (mediawiki...GuidedTour)

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

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


Change subject: wgUserId is now in core.
..

wgUserId is now in core.

Change-Id: Id8ca34f58db949eafd187d1e119fe3f8c24ac5f2
---
M modules/ext.guidedTour.lib.js
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js
index f19e741..e78b5cb 100644
--- a/modules/ext.guidedTour.lib.js
+++ b/modules/ext.guidedTour.lib.js
@@ -29,8 +29,7 @@
var gt,
skin = mw.config.get( 'skin' ),
messageParser = new mw.jqueryMsg.parser(),
-   // User ID is relying on a mw.config value from E3Experiments, 
so it will
-   // only be non-null if that is installed and the user is logged 
in.
+   // Non-null if user is logged in.
userId = mw.config.get( 'wgUserId' ),
currentTourState;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8ca34f58db949eafd187d1e119fe3f8c24ac5f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mwext-Wikibase-repo-tests is now voting - change (integration/zuul-config)

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

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


Change subject: mwext-Wikibase-repo-tests is now voting
..

mwext-Wikibase-repo-tests is now voting

Requested by Wikidata team. Some work has been achieved this week that
make the unit tests reliable.

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


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

diff --git a/layout.yaml b/layout.yaml
index a709163..f7f9cab 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -378,8 +378,6 @@
 voting: false
   - name: ^mwext-Wikibase-client-tests$
 voting: false
-  - name: ^mwext-Wikibase-repo-tests$
-voting: false
 
   # MediaWiki core regression tests (on merge and per branches):
   - name: ^mediawiki-core-regression-.*

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12f0d2919ba197b1867c1f2bb1f8cf7d122ba533
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Add .jshintrc - change (mediawiki...TwnMainPage)

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

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


Change subject: Add .jshintrc
..

Add .jshintrc

Copied from Translate

Change-Id: I3999eb2f87d006c469b745c4c6dc58ab4eb35eba
---
A .jshintrc
1 file changed, 40 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage 
refs/changes/90/62790/1

diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..b6a0f58
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,40 @@
+{
+   /* Common */
+
+   // Enforcing
+   camelcase: true,
+   curly: true,
+   eqeqeq: true,
+   immed: true,
+   latedef: true,
+   newcap: true,
+   noarg: true,
+   noempty: true,
+   nonew: true,
+   quotmark: single,
+   trailing: true,
+   undef: true,
+   unused: true,
+   // Legacy
+   onevar: true,
+
+   /* Local */
+
+   // Enforcing
+   bitwise: true,
+   forin: false,
+   regexp: false,
+   strict: true,
+   // Relaxing
+   laxbreak: true,
+   smarttabs: true,
+   multistr: true,
+   // Environment
+   browser: true,
+
+   predef: [
+   mediaWiki,
+   jQuery,
+   QUnit
+   ]
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3999eb2f87d006c469b745c4c6dc58ab4eb35eba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
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] mwext-Wikibase-repo-tests is now voting - change (integration/zuul-config)

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

Change subject: mwext-Wikibase-repo-tests is now voting
..


mwext-Wikibase-repo-tests is now voting

Requested by Wikidata team. Some work has been achieved this week that
make the unit tests reliable.

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

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



diff --git a/layout.yaml b/layout.yaml
index a709163..f7f9cab 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -378,8 +378,6 @@
 voting: false
   - name: ^mwext-Wikibase-client-tests$
 voting: false
-  - name: ^mwext-Wikibase-repo-tests$
-voting: false
 
   # MediaWiki core regression tests (on merge and per branches):
   - name: ^mediawiki-core-regression-.*

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12f0d2919ba197b1867c1f2bb1f8cf7d122ba533
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] mw/ext/wikibase now has gate-and-submit - change (integration/zuul-config)

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

Change subject: mw/ext/wikibase now has gate-and-submit
..


mw/ext/wikibase now has gate-and-submit

The catch all unit tests job was not properly working since the Wikibase
extension has several sub extensions.  Instead it is now tested by two
different job, one known as 'repo' the other as 'client'.

Enable gate-and-submit and use 'repo' as sole unit tests which is better
than nothing.

Change-Id: I972b51ebfb3588e741fa46455ef2e5d3b06fd956
---
M layout.yaml
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index f7f9cab..d570dc7 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -2825,12 +2825,11 @@
   - mwext-Wikibase-testextensions-master
   - mwext-Wikibase-client-tests
   - mwext-Wikibase-repo-tests
-gate-silent:
+gate-and-submit:
   - mwext-Wikibase-merge:
 - mwext-Wikibase-jslint
 - mwext-Wikibase-lint:
-  - mwext-Wikibase-testextensions-master
-  - mwext-Wikibase-client-tests
+#  - mwext-Wikibase-client-tests
   - mwext-Wikibase-repo-tests
 
   - name: mediawiki/extensions/WikiLove

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I972b51ebfb3588e741fa46455ef2e5d3b06fd956
Gerrit-PatchSet: 2
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
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 .jshintrc and fix warnings - change (mediawiki...TwnMainPage)

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

Change subject: Add .jshintrc and fix warnings
..


Add .jshintrc and fix warnings

Copied from Translate

Change-Id: I3999eb2f87d006c469b745c4c6dc58ab4eb35eba
---
A .jshintrc
M resources/js/ext.translate.mainpage.js
2 files changed, 43 insertions(+), 3 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..b6a0f58
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,40 @@
+{
+   /* Common */
+
+   // Enforcing
+   camelcase: true,
+   curly: true,
+   eqeqeq: true,
+   immed: true,
+   latedef: true,
+   newcap: true,
+   noarg: true,
+   noempty: true,
+   nonew: true,
+   quotmark: single,
+   trailing: true,
+   undef: true,
+   unused: true,
+   // Legacy
+   onevar: true,
+
+   /* Local */
+
+   // Enforcing
+   bitwise: true,
+   forin: false,
+   regexp: false,
+   strict: true,
+   // Relaxing
+   laxbreak: true,
+   smarttabs: true,
+   multistr: true,
+   // Environment
+   browser: true,
+
+   predef: [
+   mediaWiki,
+   jQuery,
+   QUnit
+   ]
+}
diff --git a/resources/js/ext.translate.mainpage.js 
b/resources/js/ext.translate.mainpage.js
index 3f1de64..be43b63 100644
--- a/resources/js/ext.translate.mainpage.js
+++ b/resources/js/ext.translate.mainpage.js
@@ -68,7 +68,7 @@
username: username,
email: email,
password: password,
-   token: $form.find( 
'input[name=wpSandboxToken]' ).val(),
+   token: $form.find( 
'input[name=wpSandboxToken]' ).val()
};
 
req = api.post( options );
@@ -81,10 +81,10 @@
action: 'login',
lgname: username,
lgpassword: password
-   }
+   };
 
req = api.post( options );
-   req.fail( function () { window.alert( 
'Failure2' ); } )
+   req.fail( function () { window.alert( 
'Failure2' ); } );
req.done( function ( data ) {
var req,
api = new mw.Api();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3999eb2f87d006c469b745c4c6dc58ab4eb35eba
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
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] add. Register 'dist' aggregator for 'pages_created' in API. - change (analytics/user-metrics)

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

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


Change subject: add. Register 'dist' aggregator for 'pages_created' in API.
..

add. Register 'dist' aggregator for 'pages_created' in API.

Change-Id: Id193f38f5c902a94668ed4596149f393f46712be
---
M user_metrics/api/engine/request_meta.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/92/62792/1

diff --git a/user_metrics/api/engine/request_meta.py 
b/user_metrics/api/engine/request_meta.py
index bbcb54c..814f877 100644
--- a/user_metrics/api/engine/request_meta.py
+++ b/user_metrics/api/engine/request_meta.py
@@ -355,6 +355,7 @@
 'dist+edit_rate': er_stats_agg,
 'proportion+blocks': block_rate_agg,
 'dist+time_to_threshold': ttt_stats_agg,
+'dist+pages_created': ttt_stats_agg,
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id193f38f5c902a94668ed4596149f393f46712be
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: master
Gerrit-Owner: Rfaulk ryan.faulk...@mail.mcgill.ca

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


[MediaWiki-commits] [Gerrit] add. 'dist' aggregator for 'pages_created' metric. - change (analytics/user-metrics)

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

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


Change subject: add. 'dist' aggregator for 'pages_created' metric.
..

add. 'dist' aggregator for 'pages_created' metric.

Change-Id: I4afaad6f0afb721980de71f45bd770196f9e084c
---
M user_metrics/metrics/pages_created.py
1 file changed, 19 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/91/62791/1

diff --git a/user_metrics/metrics/pages_created.py 
b/user_metrics/metrics/pages_created.py
index dcedfb1..558ab11 100644
--- a/user_metrics/metrics/pages_created.py
+++ b/user_metrics/metrics/pages_created.py
@@ -6,9 +6,9 @@
 from user_metrics.config import logging
 
 import os
+from numpy import mean, std, median
 import user_metrics.utils.multiprocessing_wrapper as mpw
 import user_metric as um
-from user_metrics.etl.aggregator import decorator_builder, boolean_rate
 from user_metrics.metrics import query_mod
 from user_metrics.metrics.users import UMP_MAP
 
@@ -119,4 +119,21 @@
 # DEFINE METRIC AGGREGATORS
 # ==
 
-# TODO - add sum, median, mean, min, and max aggregators
+from user_metrics.etl.aggregator import build_numpy_op_agg, build_agg_meta
+from user_metrics.metrics.user_metric import METRIC_AGG_METHOD_KWARGS
+
+metric_header = PagesCreated.header()
+
+field_prefixes =\
+{
+'count_': 1,
+}
+
+# Build dist decorator
+op_list = [sum, mean, std, median, min, max]
+pages_created_stats_agg = build_numpy_op_agg(
+build_agg_meta(op_list, field_prefixes), metric_header,
+'pages_created_stats_agg')
+
+agg_kwargs = getattr(pages_created_stats_agg, METRIC_AGG_METHOD_KWARGS)
+setattr(pages_created_stats_agg, METRIC_AGG_METHOD_KWARGS, agg_kwargs)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4afaad6f0afb721980de71f45bd770196f9e084c
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: master
Gerrit-Owner: Rfaulk ryan.faulk...@mail.mcgill.ca

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


[MediaWiki-commits] [Gerrit] Prevent defaults from clobbering event properties - change (mediawiki...EventLogging)

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

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


Change subject: Prevent defaults from clobbering event properties
..

Prevent defaults from clobbering event properties

As Matt Flaschen noted in 48248, the event object and the defaults object are
passed to $.extend() in the wrong order, causing the defaults to clobber event
data for properties that are defined in both objects. This change reversed the
order of the two parameters, causing event properties to clobber the defaults,
as intended. The change also updates one of the test cases to cover this
particular scenario.

Bug: 48248
Change-Id: Id14ba276329272c41370458d5330599a725f5419
---
M modules/ext.eventLogging.core.js
M tests/ext.eventLogging.tests.js
2 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/93/62793/1

diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index a876e57..10fe6d6 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -221,7 +221,7 @@
schema = self.declareSchema( schemaName );
}
 
-   event = $.extend( true, {}, event, schema.defaults );
+   event = $.extend( true, {}, schema.defaults, event );
 
return {
event: event,
diff --git a/tests/ext.eventLogging.tests.js b/tests/ext.eventLogging.tests.js
index f774c3c..f05ebf3 100644
--- a/tests/ext.eventLogging.tests.js
+++ b/tests/ext.eventLogging.tests.js
@@ -128,19 +128,24 @@
QUnit.asyncTest( 'setDefaults', 2, function ( assert ) {
 
assert.deepEqual( mw.eventLog.setDefaults( 'earthquake', {
+   article: '[[1960 Valdivia earthquake]]',
epicenter: 'Valdivia'
-   } ), { epicenter: 'Valdivia' }, 'setDefaults returns defaults' 
);
+   } ), {
+   article: '[[1960 Valdivia earthquake]]',
+   epicenter: 'Valdivia'
+   }, 'setDefaults returns defaults' );
 
mw.eventLog.logEvent( 'earthquake', {
+   article: '[[1575 Valdivia earthquake]]',
magnitude: 9.5
} ).always( function ( e ) {
assert.deepEqual( e.event, {
+   article: '[[1575 Valdivia earthquake]]',
epicenter: 'Valdivia',
magnitude: 9.5
}, 'Logged event is annotated with defaults' );
QUnit.start();
} );
-
} );
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id14ba276329272c41370458d5330599a725f5419
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove support for hphpc - change (mediawiki...wikihiero)

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

Change subject: Remove support for hphpc
..


Remove support for hphpc

Since support will soon be removed from the core.

Change-Id: Ic9d1e795f5926eb0a864ad0cb79ddb51c1f00e42
---
M wikihiero.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/wikihiero.php b/wikihiero.php
index 9fc8fbd..66f16eb 100644
--- a/wikihiero.php
+++ b/wikihiero.php
@@ -68,8 +68,6 @@
),
 );
 
-$wgCompiledFiles[] = MWInit::extCompiledPath( 'wikihiero/data/tables.php' );
-
 /**
  * Because hiero tag is used rarely, we don't need to load its body on every 
hook call,
  * so we keep our simple hook handlers here.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9d1e795f5926eb0a864ad0cb79ddb51c1f00e42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/wikihiero
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] Toggler widget: Implemented disabled functionality and hover - change (mediawiki...DataValues)

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

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


Change subject: Toggler widget: Implemented disabled functionality and hover
..

Toggler widget: Implemented disabled functionality and hover

Change-Id: Ibbdf21645d42ce1bc67415d2b48753fc9c1d03af
---
M ValueView/resources/jquery.ui/jquery.ui.toggler.js
M ValueView/resources/jquery.ui/themes/default/jquery.ui.toggler.css
2 files changed, 15 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/94/62794/1

diff --git a/ValueView/resources/jquery.ui/jquery.ui.toggler.js 
b/ValueView/resources/jquery.ui/jquery.ui.toggler.js
index b38631b..fee6594 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.toggler.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.toggler.js
@@ -9,7 +9,7 @@
  * element the toggler is initialized on. The toggler considers the subject's 
current display
  * style, so if it is set to none, it is considered invisible initially.
  *
- * @option {string} $subject (REQUIRED) The node whose visibility shall be 
toggled.
+ * @option {jQuery} $subject (REQUIRED) The node whose visibility shall be 
toggled.
  *
  * @dependency jquery.ui.Widget
  */
@@ -89,7 +89,7 @@
 
this.element
.text( '' )
-   .addClass( this.widgetBaseClass +  ' ' + 
this.widgetBaseClass + '-toggle');
+   .addClass( this.widgetBaseClass +  ' ' + 
this.widgetBaseClass + '-toggle ' + 'ui-state-default' );
 
if( this.element[0].nodeName === 'A' ) {
this.element.attr( 'href', 
'javascript:void(0);' );
@@ -100,9 +100,17 @@
 
this.element
.on( 'click', function( event ) {
-   // Change toggle icon to reflect current state 
of toggle subject visibility:
-   self._reflectVisibilityOnToggleIcon( true );
-   self.options.$subject.slideToggle();
+   if( !self.element.hasClass( 'ui-state-disabled' 
) ) {
+   // Change toggle icon to reflect 
current state of toggle subject visibility:
+   self._reflectVisibilityOnToggleIcon( 
true );
+   self.options.$subject.slideToggle();
+   }
+   } )
+   .on( 'mouseover', function( event ) {
+   self.element.addClass( 'ui-state-hover' );
+   } )
+   .on( 'mouseout', function( event ) {
+   self.element.removeClass( 'ui-state-hover' );
} )
.append( this.$toggleIcon )
.append( $toggleLabel );
diff --git a/ValueView/resources/jquery.ui/themes/default/jquery.ui.toggler.css 
b/ValueView/resources/jquery.ui/themes/default/jquery.ui.toggler.css
index 9e5ffde..eb579b4 100644
--- a/ValueView/resources/jquery.ui/themes/default/jquery.ui.toggler.css
+++ b/ValueView/resources/jquery.ui/themes/default/jquery.ui.toggler.css
@@ -11,6 +11,8 @@
display: block;
margin-top: .5em;
white-space: nowrap;
+   border: none;
+   background: none;
 }
 .ui-toggler .ui-toggler-icon,
 .ui-toggler .ui-toggler-label {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbdf21645d42ce1bc67415d2b48753fc9c1d03af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
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] Move RDF stuff into separate directory. - change (mediawiki...Wikibase)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Move RDF stuff into separate directory.
..


Move RDF stuff into separate directory.

This gives classes for RDF handling a separate directory and moves
the external EasyRdf module into a central contribs directory.

Change-Id: I5947c4b4945c0fd22a2d0ca3881b272cefaa489b
---
M .gitmodules
A contrib/easyRdf
M repo/Wikibase.classes.php
M repo/Wikibase.hooks.php
D repo/includes/content/easyRdf
R repo/includes/rdf/RdfBuilder.php
R repo/includes/rdf/RdfSerializer.php
R repo/tests/phpunit/includes/rdf/RdfBuilderTest.php
R repo/tests/phpunit/includes/rdf/RdfSerializerTest.php
9 files changed, 44 insertions(+), 32 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index 794faa1..9a6942a 100755
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
 [submodule repo/includes/content/easyRdf]
-   path = repo/includes/content/easyRdf
+   path = contrib/easyRdf
url = https://github.com/Wikidata/easyrdf_lite.git
diff --git a/contrib/easyRdf b/contrib/easyRdf
new file mode 16
index 000..d32c9ee
--- /dev/null
+++ b/contrib/easyRdf
+Subproject commit d32c9ee9a0bc8867d758209cc4cf2055409b9bc3
diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php
index 4982b70..945ff67 100644
--- a/repo/Wikibase.classes.php
+++ b/repo/Wikibase.classes.php
@@ -96,31 +96,8 @@
'Wikibase\ItemHandler' = 'includes/content/ItemHandler.php',
'Wikibase\PropertyContent' = 
'includes/content/PropertyContent.php',
'Wikibase\PropertyHandler' = 
'includes/content/PropertyHandler.php',
-   'Wikibase\RdfBuilder' = 'includes/content/RdfBuilder.php',
-   'Wikibase\RdfSerializer' = 
'includes/content/RdfSerializer.php',
-
-   // EasyRdf
-   'EasyRdf_Exception' = 
'includes/content/easyRdf/EasyRdf/Exception.php',
-   'EasyRdf_Format' = 
'includes/content/easyRdf/EasyRdf/Format.php',
-   'EasyRdf_Graph' = 'includes/content/easyRdf/EasyRdf/Graph.php',
-   'EasyRdf_Namespace' = 
'includes/content/easyRdf/EasyRdf/Namespace.php',
-   'EasyRdf_Literal' = 
'includes/content/easyRdf/EasyRdf/Literal.php',
-   'EasyRdf_Literal_Boolean' = 
'includes/content/easyRdf/EasyRdf/Literal/Boolean.php',
-   'EasyRdf_Literal_Date' = 
'includes/content/easyRdf/EasyRdf/Literal/Date.php',
-   'EasyRdf_Literal_DateTime' = 
'includes/content/easyRdf/EasyRdf/Literal/DateTime.php',
-   'EasyRdf_Literal_Decimal' = 
'includes/content/easyRdf/EasyRdf/Literal/Decimal.php',
-   'EasyRdf_Literal_HexBinary' = 
'includes/content/easyRdf/EasyRdf/Literal/HexBinary.php',
-   'EasyRdf_Literal_Integer' = 
'includes/content/easyRdf/EasyRdf/Literal/Integer.php',
-   'EasyRdf_Resource' = 
'includes/content/easyRdf/EasyRdf/Resource.php',
-   'EasyRdf_Serialiser' = 
'includes/content/easyRdf/EasyRdf/Serialiser.php',
-   'EasyRdf_Serialiser_GraphViz' = 
'includes/content/easyRdf/EasyRdf/Serialiser/GraphViz.php',
-   'EasyRdf_Serialiser_RdfPhp' = 
'includes/content/easyRdf/EasyRdf/Serialiser/RdfPhp.php',
-   'EasyRdf_Serialiser_Ntriples' = 
'includes/content/easyRdf/EasyRdf/Serialiser/Ntriples.php',
-   'EasyRdf_Serialiser_Json' = 
'includes/content/easyRdf/EasyRdf/Serialiser/Json.php',
-   'EasyRdf_Serialiser_RdfXml' = 
'includes/content/easyRdf/EasyRdf/Serialiser/RdfXml.php',
-   'EasyRdf_Serialiser_Turtle' = 
'includes/content/easyRdf/EasyRdf/Serialiser/Turtle.php',
-   'EasyRdf_TypeMapper' = 
'includes/content/easyRdf/EasyRdf/TypeMapper.php',
-   'EasyRdf_Utils' = 'includes/content/easyRdf/EasyRdf/Utils.php',
+   'Wikibase\RdfBuilder' = 'includes/rdf/RdfBuilder.php',
+   'Wikibase\RdfSerializer' = 'includes/rdf/RdfSerializer.php',
 
// includes/specials
'SpecialNewEntity' = 'includes/specials/SpecialNewEntity.php',
@@ -168,13 +145,43 @@
'Wikibase\Test\Api\LangAttributeBase' = 
'tests/phpunit/includes/api/LangAttributeBase.php',
'Wikibase\Test\EntityContentTest' = 
'tests/phpunit/includes/content/EntityContentTest.php',
'Wikibase\Test\EntityHandlerTest' = 
'tests/phpunit/includes/content/EntityHandlerTest.php',
-   'Wikibase\Test\RdfBuilderTest' = 
'tests/phpunit/includes/content/RdfBuilderTest.php',
+   'Wikibase\Test\RdfBuilderTest' = 
'tests/phpunit/includes/rdf/RdfBuilderTest.php',
 
'MessageReporter' = 'includes/MessageReporter.php',
'ObservableMessageReporter' = 'includes/MessageReporter.php',
'NullMessageReporter' = 

[MediaWiki-commits] [Gerrit] Add $namespaceGenderAliases for 'eo' - change (mediawiki/core)

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

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


Change subject: Add $namespaceGenderAliases for 'eo'
..

Add $namespaceGenderAliases for 'eo'

Per discussion on
https://de.wikipedia.org/w/index.php?title=Benutzer_Diskussion:Raymondoldid=118297156#Benutzernamensraum_ignoriert_Einstellung_bei_.22Geschlecht.22

Change-Id: I4a46d0d50a247b028d8cf84a7da30300b19cf07b
---
M languages/messages/MessagesEo.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/languages/messages/MessagesEo.php 
b/languages/messages/MessagesEo.php
index 68c59ec..bafcdcd 100644
--- a/languages/messages/MessagesEo.php
+++ b/languages/messages/MessagesEo.php
@@ -79,6 +79,11 @@
'Kategoria_diskuto'= NS_CATEGORY_TALK,
 );
 
+$namespaceGenderAliases = array(
+NS_USER = array( 'male' = 'Uzanto', 'female' = 'Uzantino' ),
+NS_USER_TALK = array( 'male' = 'Uzanto-Diskuto', 'female' = 
'Uzantino-Diskuto' ),
+);
+
 $specialPageAliases = array(
'Activeusers'   = array( 'Aktivaj_uzantoj' ),
'Allmessages'   = array( 'Ĉiuj_mesaĝoj' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a46d0d50a247b028d8cf84a7da30300b19cf07b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] (bug 42063) Enable Special:EntityData in production. - change (mediawiki...Wikibase)

2013-05-08 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: (bug 42063) Enable Special:EntityData in production.
..

(bug 42063) Enable Special:EntityData in production.

This contains several minor changes:
* take Special:EntityData out of experimental mode
* silence warnings
* skip claims
* resolve protocol-relative URIs

Change-Id: I8ceba8abf3a4f0ab0f472a44d1482cd7169f2da1
---
M repo/Wikibase.classes.php
M repo/Wikibase.php
M repo/config/Wikibase.experimental.php
M repo/includes/rdf/RdfBuilder.php
4 files changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php
index 945ff67..33fa371 100644
--- a/repo/Wikibase.classes.php
+++ b/repo/Wikibase.classes.php
@@ -114,6 +114,7 @@
'SpecialItemsWithoutSitelinks' = 
'includes/specials/SpecialItemsWithoutSitelinks.php',
'SpecialListDatatypes' = 
'includes/specials/SpecialListDatatypes.php',
'SpecialDispatchStats' = 
'includes/specials/SpecialDispatchStats.php',
+   'SpecialEntityData' = 
'includes/specials/SpecialEntityData.php',
 
// includes/store
'Wikibase\EntityPerPage' = 'includes/store/EntityPerPage.php',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index b299d85..1a6e586 100755
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -123,6 +123,7 @@
 $wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
 $wgSpecialPages['ListDatatypes']   = 
'SpecialListDatatypes';
 $wgSpecialPages['DispatchStats']   = 
'SpecialDispatchStats';
+$wgSpecialPages['EntityData']  = 
'SpecialEntityData';
 
 // Special page groups
 $wgSpecialPageGroups['NewItem']
= 'wikibaserepo';
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index 235c57a..7db5f24 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -49,15 +49,11 @@
 $wgAutoloadClasses['Wikibase\Api\SetQualifier']= $dir . 
'includes/api/SetQualifier.php';
 $wgAutoloadClasses['Wikibase\Api\SetStatementRank']= $dir . 
'includes/api/SetStatementRank.php';
 
-$wgAutoloadClasses['SpecialEntityData']= $dir 
. 'includes/specials/SpecialEntityData.php';
-
 unset( $dir );
 
 $wgAPIModules['wbremovequalifiers']= 
'Wikibase\Api\RemoveQualifiers';
 $wgAPIModules['wbsetqualifier']= 
'Wikibase\Api\SetQualifier';
 $wgAPIModules['wbsetstatementrank']= 
'Wikibase\Api\SetStatementRank';
-
-$wgSpecialPages['EntityData']  = 
'SpecialEntityData';
 
 /**
  * Hook to add PHPUnit test cases.
diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php
index 09c51e3..3557875 100755
--- a/repo/includes/rdf/RdfBuilder.php
+++ b/repo/includes/rdf/RdfBuilder.php
@@ -317,7 +317,9 @@
continue;
}
 
-   $pageRecourse = $this-graph-resource( $link-getUrl() 
);
+   //XXX: ideally, we'd use https if the target site 
supports it.
+   $url = wfExpandUrl( $link-getUrl(), PROTO_HTTP );
+   $pageRecourse = $this-graph-resource( $url );
$entityResource-addResource( 'foaf:primaryTopicOf', 
$pageRecourse, $languageCode );
}
}
@@ -360,7 +362,7 @@
$this-addPropertyValueSnak( $entity, $claim, $snak );
} else {
//TODO: NoValueSnak, SomeValueSnak
-   wfWarn( Unsupported snak type:  . get_class( $snak ) 
);
+   wfDebug( __METHOD__ . : Unsupported snak type:  . 
get_class( $snak ) );
}
}
 
@@ -394,7 +396,7 @@
$statementResource = $this-getStatementResource( $claim );
$entityResource-addResource( $propertyQName, 
$statementResource );
 
-   $value = $snak-getDataValue()-getValue();
+   $value = $snak-getDataValue();
 
$this-entityMentioned( $propertyId );
$this-addClaimValue( $claim, $propertyId, $value );
@@ -428,7 +430,7 @@
break;
default:
//TODO: more media types
-   wfWarn( Unsupported data type: $typeId );
+   wfDebug( __METHOD__ . : Unsupported data type: 
$typeId\n );
   

[MediaWiki-commits] [Gerrit] Add subtle stripes outside the content to draw the eye to th... - change (mediawiki...erudite)

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

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


Change subject: Add subtle stripes outside the content to draw the eye to the 
content
..

Add subtle stripes outside the content to draw the eye to the content

Change-Id: Id83dcfaa9fe8acf0d3f1112269eaeb25540857e0
---
M assets/erudite.css
M assets/wiki-style.css
2 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/erudite 
refs/changes/97/62797/1

diff --git a/assets/erudite.css b/assets/erudite.css
index 3a70a0d..359f613 100755
--- a/assets/erudite.css
+++ b/assets/erudite.css
@@ -25,6 +25,11 @@
 .sidebar {width:24em; clear:both;}
 #footer {clear:both;}
 
+/* Use dark stripes around edge to focus on content */
+div#container { background: white; padding-top: 2em; }
+div#wrapper { background: #fafafa url(images/stripes-dark.png); }
+div#content-container { margin-bottom: 0px; }
+
 /* Typography Base */
 body {font: normal normal normal 10px/1.5 constantia,'hoefler text','palatino 
linotype',serif; background:#fafafa; color:#333; }
 textarea, select, input {font-size:12px;}
@@ -49,7 +54,7 @@
 a:active {color:#55f;}
 
 /* Header */
-#header-wrap {background:#333 url(images/stripes.png) repeat; 
margin-bottom:2em; padding:1em 0;}
+#header-wrap {background:#333 url(images/stripes.png) repeat; padding:1em 0;}
 #header h1, #header h1 a {color:#fff; text-decoration:none; line-height:1; 
margin:0;}
 #blog-description {font-size:1.4em; color:#fff;}
 
diff --git a/assets/wiki-style.css b/assets/wiki-style.css
index 9f8ff90..30830e6 100755
--- a/assets/wiki-style.css
+++ b/assets/wiki-style.css
@@ -304,7 +304,6 @@
 
 .message {
margin: 0 auto;
-   margin-top: -20px;
position: relative;
width: 960px;
color: #fff;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id83dcfaa9fe8acf0d3f1112269eaeb25540857e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/erudite
Gerrit-Branch: master
Gerrit-Owner: Njw nick.wh...@durham.ac.uk

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


[MediaWiki-commits] [Gerrit] (bug 41619) Converting hard coded strings in diff view to i1... - change (mediawiki...Wikibase)

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

Change subject: (bug 41619) Converting hard coded strings in diff view to i18n 
values
..


(bug 41619) Converting hard coded strings in diff view to i18n values

Change-Id: Ib9b80518433fae24282f3006c00bed257291a47e
---
M lib/WikibaseLib.i18n.php
M lib/includes/EntityDiffVisualizer.php
2 files changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php
index 060d1d5..6f2e3fe 100644
--- a/lib/WikibaseLib.i18n.php
+++ b/lib/WikibaseLib.i18n.php
@@ -24,6 +24,10 @@
'wikibase-diffview-reference' = 'reference',
'wikibase-diffview-rank' = 'rank',
'wikibase-diffview-qualifier' = 'qualifier',
+   'wikibase-diffview-label' = 'label',
+   'wikibase-diffview-alias' = 'aliases',
+   'wikibase-diffview-description' = 'description',
+   'wikibase-diffview-link' = 'links',
'wikibase-error-unexpected' = 'An unexpected error occurred.',
'wikibase-error-save-generic' = 'An error occurred while trying to 
perform save and because of this, your changes could not be completed.',
'wikibase-error-remove-generic' = 'An error occurred while trying to 
perform remove and because of this, your changes could not be completed.',
@@ -104,6 +108,10 @@
 {{Identical|Item}}',
'datatypes-type-commonsMedia' = 'The name of a data type for media 
files on Wikimedia Commons (proper name, capitalised in English; first letter 
capitalised anyway in this message and relatives).',
'version-wikibase' = 'Name of the Wikibase extension collection, used 
on [[Special:Version]]',
+   'wikibase-diffview-label' = 'Sub heading for label changes in a diff',
+   'wikibase-diffview-alias' = 'Sub heading for alias changes in a diff',
+   'wikibase-diffview-description' = 'Sub heading for description changes 
in a diff',
+   'wikibase-diffview-link' = 'Sub heading for link changes in a diff',
 );
 
 /** Afrikaans (Afrikaans)
diff --git a/lib/includes/EntityDiffVisualizer.php 
b/lib/includes/EntityDiffVisualizer.php
index dcf6538..7195839 100644
--- a/lib/includes/EntityDiffVisualizer.php
+++ b/lib/includes/EntityDiffVisualizer.php
@@ -92,9 +92,9 @@
$termDiffVisualizer = new DiffView(
array(),
new Diff( array(
-   'label' = $diff-getLabelsDiff(),
-   'aliases' = $diff-getAliasesDiff(),
-   'description' = $diff-getDescriptionsDiff(),
+   $this-context-getLanguage()-getMessage( 
'wikibase-diffview-label' ) = $diff-getLabelsDiff(),
+   $this-context-getLanguage()-getMessage( 
'wikibase-diffview-alias' ) = $diff-getAliasesDiff(),
+   $this-context-getLanguage()-getMessage( 
'wikibase-diffview-description' ) = $diff-getDescriptionsDiff(),
), true ),
$this-context
);
@@ -110,7 +110,7 @@
$termDiffVisualizer = new DiffView(
array(),
new Diff( array(
-   'links' = $diff-getSiteLinkDiff(),
+   
$this-context-getLanguage()-getMessage( 'wikibase-diffview-link' ) = 
$diff-getSiteLinkDiff(),
), true ),
$this-context
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9b80518433fae24282f3006c00bed257291a47e
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Extends QUnit.parameterize to take a callback providing the ... - change (mediawiki...DataValues)

2013-05-08 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: Extends QUnit.parameterize to take a callback providing the 
test cases
..

Extends QUnit.parameterize to take a callback providing the test cases

By providing a callback, the parameters provided to the tests will be created 
separately for each
test. This allows to provide instances which involve state without running into 
problems when
manipulating state in one test case but expecting initial state in another one.

NOTE: We should probably make a fork of jQuery.parameterize and import its 
tests, adjust them
  to properly run in our environment. Also renaming things, like 
QUnit.cases which should
  perhaps better be QUnit.provide.

This change set also changes some usage of QUnit.parameterize in our tests to 
use a callback now.

Change-Id: I18247a7a43c39c634745e9e925d846b060772927
---
M DataValues/resources/qunit.parameterize/qunit.parameterize.js
M ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
2 files changed, 29 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/98/62798/1

diff --git a/DataValues/resources/qunit.parameterize/qunit.parameterize.js 
b/DataValues/resources/qunit.parameterize/qunit.parameterize.js
index 5fe90a4..24daae7 100644
--- a/DataValues/resources/qunit.parameterize/qunit.parameterize.js
+++ b/DataValues/resources/qunit.parameterize/qunit.parameterize.js
@@ -21,6 +21,15 @@
 QUnit.cases = ( function( QUnit ) {
'use strict';
 
+   /**
+* @param {[]|Function} testCases An Array (or a callback returning 
such an object) which
+*has to hold different Objects where each defines what will be 
passed to tests which
+*will be registered to the Object returned by the function. By 
providing a callback,
+*the parameters provided to the tests will be created 
separately for each test. This
+*allows to provide instances which involve state without 
running into problems when
+*manipulating state in one test case but expecting initial 
state in another one.
+* @return {Object}
+*/
return function(testCases) {
var createTest = function(methodName, title, expected, 
callback, parameters) {
QUnit[methodName](
@@ -38,8 +47,12 @@
expected = null;
}
 
-   for (var i = 0; i  testCases.length; ++i) {
-   var parameters = testCases[i];
+   var testTestCases = QUnit.is( function, testCases )
+   ? testCases()
+   : testCases;
+
+   for (var i = 0; i  testTestCases.length; ++i) {
+   var parameters = testTestCases[i];
 
var testCaseTitle = title;
if (parameters.title) {
diff --git 
a/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js 
b/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
index 32d1ef3..e7a333d 100644
--- a/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
+++ b/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
@@ -99,7 +99,12 @@
return experts;
}
 
-   var expertCases = QUnit.cases( expertProvider() );
+   var expertCases = QUnit.cases(
+   // provide fresh instances for each test
+   function() {
+   return expertProvider();
+   }
+   );
 
expertCases.test( 'constructor', function( args, assert ) {
assert.ok(
@@ -164,6 +169,14 @@
);
} );
 
+   expertCases.test( 'rawValue: initial value', function( args, assert ) {
+   assert.equal(
+   args.expert.rawValue(),
+   null,
+   'newly initialized expert has no value (rawValue() 
returns null)'
+   );
+   } );
+
expertCases.test( 'rawValue: setting and getting raw value', function( 
args, assert ) {
var expert = args.expert;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18247a7a43c39c634745e9e925d846b060772927
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] (bug 48145) tests for TimeInput expert - change (mediawiki...DataValues)

2013-05-08 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: (bug 48145) tests for TimeInput expert
..

(bug 48145) tests for TimeInput expert

* also splits TimeInput and TimeValue expert's resource loader modules into two 
separate ones.
* minor documentation updates

Change-Id: Ied337b2c904ca8a43658956fd72df4cb88de6484
---
M ValueView/ValueView.resources.php
M ValueView/ValueView.tests.qunit.php
M ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
A 
ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
M ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
5 files changed, 54 insertions(+), 4 deletions(-)


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

diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index aee0099..9d475af 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -193,15 +193,23 @@
),
),
 
-   'jquery.valueview.experts.timevalue' = $moduleTemplate + array(
+   'jquery.valueview.experts.timeinput' = $moduleTemplate + array(
'scripts' = array(

'jquery.valueview/valueview.experts/experts.TimeInput.js',
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.stringvalue',
+   ),
+   ),
+
+   'jquery.valueview.experts.timevalue' = $moduleTemplate + array(
+   'scripts' = array(

'jquery.valueview/valueview.experts/experts.TimeValue.js',
),
'dependencies' = array(
'jquery.valueview.experts.staticdom',
'jquery.valueview.BifidExpert',
-   'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.timeinput',
),
),
 
diff --git a/ValueView/ValueView.tests.qunit.php 
b/ValueView/ValueView.tests.qunit.php
index 25606d3..ec23a07 100644
--- a/ValueView/ValueView.tests.qunit.php
+++ b/ValueView/ValueView.tests.qunit.php
@@ -101,6 +101,15 @@
'jquery.valueview.experts.stringvalue',
),
),
+
+   'jquery.valueview.experts.timeinput.tests' = array(
+   'scripts' = array(
+   
$bp/jquery.valueview/valueview.experts/experts.TimeInput.tests.js,
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.timeinput',
+   ),
+   ),
);
 
 } );
diff --git 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
index 129bd4d..c32e6e6 100644
--- 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
+++ 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
@@ -16,7 +16,7 @@
 * @since 0.1
 *
 * @constructor
-* @extends jQuery.valueview.experts.StringValue
+* @extends jQuery.valueview.experts.BifidExpert
 */
vv.experts.TimeValue = vv.expert( 'timevalue', PARENT, {
/**
diff --git 
a/ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
 
b/ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
new file mode 100644
index 000..481d5df
--- /dev/null
+++ 
b/ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
@@ -0,0 +1,33 @@
+/**
+ * @since 0.1
+ * @ingroup ValueView
+ *
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+ ( function( $, QUnit, valueview, TimeParser ) {
+
+   'use strict';
+
+   var testExpert = valueview.tests.testExpert;
+
+   QUnit.module( 'jquery.valueview.experts.TimeInput' );
+
+   testExpert( {
+   expertConstructor: valueview.experts.TimeInput,
+   rawValues: {
+   valid: [
+   new time.Time( '1. April 1989' ),
+   new time.Time( '123 bce' ),
+   new time.Time( '1984' )
+   ],
+   unknown: 
testExpert.basicTestDefinition.rawValues.unknown.concat( [
+   42,
+   '1. 1984',
+   new time.Time( 'f - invalid time' )
+   ] 

[MediaWiki-commits] [Gerrit] (bug 42063) Enable Special:EntityData in production. - change (mediawiki...Wikibase)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 42063) Enable Special:EntityData in production.
..


(bug 42063) Enable Special:EntityData in production.

This contains several minor changes:
* take Special:EntityData out of experimental mode
* silence warnings
* skip claims
* resolve protocol-relative URIs

Change-Id: I8ceba8abf3a4f0ab0f472a44d1482cd7169f2da1
---
M repo/Wikibase.classes.php
M repo/Wikibase.hooks.php
M repo/Wikibase.php
M repo/config/Wikibase.experimental.php
M repo/includes/rdf/RdfBuilder.php
M repo/includes/rdf/RdfSerializer.php
6 files changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php
index 945ff67..33fa371 100644
--- a/repo/Wikibase.classes.php
+++ b/repo/Wikibase.classes.php
@@ -114,6 +114,7 @@
'SpecialItemsWithoutSitelinks' = 
'includes/specials/SpecialItemsWithoutSitelinks.php',
'SpecialListDatatypes' = 
'includes/specials/SpecialListDatatypes.php',
'SpecialDispatchStats' = 
'includes/specials/SpecialDispatchStats.php',
+   'SpecialEntityData' = 
'includes/specials/SpecialEntityData.php',
 
// includes/store
'Wikibase\EntityPerPage' = 'includes/store/EntityPerPage.php',
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index f5f2e59..a896770 100755
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -194,6 +194,7 @@
'rdf/RdfBuilder',
'rdf/RdfSerializer',
 
+   'specials/SpecialEntityData',
'specials/SpecialNewItem',
'specials/SpecialNewProperty',
'specials/SpecialItemDisambiguation',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index b299d85..1a6e586 100755
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -123,6 +123,7 @@
 $wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
 $wgSpecialPages['ListDatatypes']   = 
'SpecialListDatatypes';
 $wgSpecialPages['DispatchStats']   = 
'SpecialDispatchStats';
+$wgSpecialPages['EntityData']  = 
'SpecialEntityData';
 
 // Special page groups
 $wgSpecialPageGroups['NewItem']
= 'wikibaserepo';
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index 235c57a..462f823 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -49,15 +49,11 @@
 $wgAutoloadClasses['Wikibase\Api\SetQualifier']= $dir . 
'includes/api/SetQualifier.php';
 $wgAutoloadClasses['Wikibase\Api\SetStatementRank']= $dir . 
'includes/api/SetStatementRank.php';
 
-$wgAutoloadClasses['SpecialEntityData']= $dir 
. 'includes/specials/SpecialEntityData.php';
-
 unset( $dir );
 
 $wgAPIModules['wbremovequalifiers']= 
'Wikibase\Api\RemoveQualifiers';
 $wgAPIModules['wbsetqualifier']= 
'Wikibase\Api\SetQualifier';
 $wgAPIModules['wbsetstatementrank']= 
'Wikibase\Api\SetStatementRank';
-
-$wgSpecialPages['EntityData']  = 
'SpecialEntityData';
 
 /**
  * Hook to add PHPUnit test cases.
@@ -75,9 +71,6 @@
'api/RemoveQualifiers',
'api/SetStatementRank',
'api/SetQualifier',
-
-   'specials/SpecialEntityData',
-
);
 
foreach ( $testFiles as $file ) {
diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php
index 09c51e3..3557875 100755
--- a/repo/includes/rdf/RdfBuilder.php
+++ b/repo/includes/rdf/RdfBuilder.php
@@ -317,7 +317,9 @@
continue;
}
 
-   $pageRecourse = $this-graph-resource( $link-getUrl() 
);
+   //XXX: ideally, we'd use https if the target site 
supports it.
+   $url = wfExpandUrl( $link-getUrl(), PROTO_HTTP );
+   $pageRecourse = $this-graph-resource( $url );
$entityResource-addResource( 'foaf:primaryTopicOf', 
$pageRecourse, $languageCode );
}
}
@@ -360,7 +362,7 @@
$this-addPropertyValueSnak( $entity, $claim, $snak );
} else {
//TODO: NoValueSnak, SomeValueSnak
-   wfWarn( Unsupported snak type:  . get_class( $snak ) 
);
+   wfDebug( __METHOD__ . : Unsupported snak type:  . 
get_class( $snak ) );
   

[MediaWiki-commits] [Gerrit] option to run until all wikis have dumps more recent than cu... - change (operations/dumps)

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

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


Change subject: option to run until all wikis have dumps more recent than 
cutoff date
..

option to run until all wikis have dumps more recent than cutoff date

--cutoff option in wrapper shell script and in main python script
wrapper shell script cleanup (break stuff into functions for
readability)

Change-Id: I405aae9f4c3894eb337d59d487b87e111f37306c
---
M xmldumps-backup/worker
M xmldumps-backup/worker.py
2 files changed, 162 insertions(+), 81 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/00/62800/1

diff --git a/xmldumps-backup/worker b/xmldumps-backup/worker
index afd9944..ced94f8 100755
--- a/xmldumps-backup/worker
+++ b/xmldumps-backup/worker
@@ -1,92 +1,150 @@
 #!/bin/bash
 
-# default number of failures of worker.py in a row before we decide
-# something serious is broken and we refuse to run
-MAXFAILS=3
-# default: don't pass special config file
-CONFIGFILE=
-# default: no logging to file
-LOG=
+usage() {
+echo $0: Unknown option $1
+echo Usage: $0 [--configfile filename] [--log] [--maxfails num] 
[--basedir dir] [--wiki wikiname]
+echo   [--cutoff date]
+echo --configfile   use specified file for config file (default: 
wikidump.conf)
+echo --log  write log of (almost) everything written to stderr 
(default: no logging)
+echo --maxfails if more than this many dumps fail in a row, exit 
(default: 3)
+echo --basedir  scripts and files are relative to this dir (default: 
location of this script)
+echo --cutoff   dump wikis until all have a dump produced more recent 
than the specified cutoff,
+echothen exit.  format: mmdd  OR  'today'
+echo --wiki name of specific wiki db to dump; otherwise all wikis 
in list referenced by
+echoconfig file will be dumped
+echo
+echo If the file maintenance.txt is present, no more jobs will be run, 
and
+echo this script will check the status again in 5 minutes.
+echo If the file exit.txt is present, no more new jobs will be started 
and
+echo this script will terminate.
+exit 1
+}
 
-failures=0
-WIKIDUMP_BASE=`dirname $0`
+set_defaults() {
+# default number of failures of worker.py in a row before we decide
+# something serious is broken and we refuse to run
+MAXFAILS=3
+# default: don't pass special config file
+CONFIGFILE=
+# default: no logging to file
+LOG=
+# default: no cutoff date
+CUTOFF=
+}
 
-while [ $# -gt 0 ]; do
-if [ $1 == --configfile ]; then
-   CONFIGFILE=$2
-   shift; shift
-elif [ $1 == --maxfails ]; then
-   MAXFAILS=$2
-   shift; shift
-elif [ $1 == --basedir ]; then
-   WIKIDUMP_BASE=$2
-   shift; shift
-elif [ $1 == --log ]; then
-   LOG=true
-   shift;
-elif [ $1 == --wiki ]; then
-   WIKI=$2
-   shift; shift
-else
-   echo $0: Unknown option $1
-   echo Usage: $0 [--configfile filename] [--log] [--maxfails num] 
[--basedir dir] [--wiki wikiname]
-   echo --configfile   use specified file for config file (default: 
wikidump.conf)
-   echo --log  write log of (almost) everything written to stderr 
(default: no logging)
-   echo --maxfails if more than this many dumps fail in a row, exit 
(default: 3)
-   echo --basedir  scripts and files are relative to this dir 
(default: location of this script)
-   echo --wiki name of specific wiki db to dump; otherwise all 
wikis in list referenced by
-   echoconfig file will be dumped
-   echo 
-   echo If the file maintenance.txt is present, no more jobs will be run, 
and
-   echo this script will check the status again in 5 minutes.
-   echo If the file exit.txt is present, no more new jobs will be started 
and
-   echo this script will terminate.
-   exit 1
+process_opts() {
+while [ $# -gt 0 ]; do
+   if [ $1 == --configfile ]; then
+   CONFIGFILE=$2
+   shift; shift
+   elif [ $1 == --maxfails ]; then
+   MAXFAILS=$2
+   shift; shift
+   elif [ $1 == --basedir ]; then
+   WIKIDUMP_BASE=$2
+   shift; shift
+   elif [ $1 == --log ]; then
+   LOG=true
+   shift;
+   elif [ $1 == --cutoff ]; then
+   CUTOFF=$2
+   shift; shift
+   elif [ $1 == --wiki ]; then
+   WIKI=$2
+   shift; shift
+   else
+   usage
+   fi
+done
+}
+
+setup_python_args() {
+# set up the command
+pythonargs=( $WIKIDUMP_BASE/worker.py )
+if [ ! -z $CONFIGFILE ]; then
+   pythonargs=( ${pythonargs[@]} --configfile $CONFIGFILE )
 fi
-done
+if [ ! -z $LOG ]; then
+   pythonargs=( ${pythonargs[@]} --log )
+fi
+if [ ! -z $CUTOFF ]; 

[MediaWiki-commits] [Gerrit] Get repolinker via WikibaseClient factory class - change (mediawiki...Wikibase)

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

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


Change subject: Get repolinker via WikibaseClient factory class
..

Get repolinker via WikibaseClient factory class

Change-Id: If56da909d087c7bf372ea2de0d15d6eb0d87739a
---
M client/WikibaseClient.hooks.php
M client/includes/WikibaseClient.php
M client/includes/recentchanges/ExternalChangesLine.php
3 files changed, 24 insertions(+), 61 deletions(-)


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

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 47bcce9..edfbc2a 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -188,12 +188,7 @@
);
 
if ( $itemId !== false ) {
-   $repoLinker = new RepoLinker(
-   Settings::get( 'repoUrl' ),
-   Settings::get( 'repoArticlePath' ),
-   Settings::get( 'repoScriptPath' ),
-   Settings::get( 'repoNamespaces' )
-   );
+   $repoLinker = 
WikibaseClient::getDefaultInstance()-newRepoLinker();
 
$itemByTitle = 'Special:ItemByTitle/' . $globalId . '/' 
. $oldTitle-getPrefixedDBkey();
$itemByTitleLink = $repoLinker-repoArticleUrl( 
$itemByTitle );
@@ -521,12 +516,7 @@
return true;
}
 
-   $repoLinker = new RepoLinker(
-   Settings::get( 'repoUrl' ),
-   Settings::get( 
'repoArticlePath' ),
-   Settings::get( 'repoScriptPath' 
),
-   Settings::get( 'repoNamespaces' 
)
-   );
+   $repoLinker = 
WikibaseClient::getDefaultInstance()-newRepoLinker();
 
// links to the associated item on the 
repo
$template-data['language_urls'][] = 
array(
diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 27cfc1e..7550341 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -183,6 +183,19 @@
);
}
 
+   /**
+* @since 0.4
+*
+* @return RepoLinker
+*/
+   public function newRepoLinker() {
+   return new RepoLinker(
+   $this-settings-getSetting( 'repoUrl' ),
+   $this-settings-getSetting( 'repoArticlePath' ),
+   $this-settings-getSetting( 'repoScriptPath' ),
+   $this-settings-getSetting( 'repoNamespaces' )
+   );
+   }
 
/**
 * Returns an instance of the default store, or an alternate store
@@ -283,4 +296,4 @@
return $instance;
}
 
-}
\ No newline at end of file
+}
diff --git a/client/includes/recentchanges/ExternalChangesLine.php 
b/client/includes/recentchanges/ExternalChangesLine.php
index d135025..d897846 100644
--- a/client/includes/recentchanges/ExternalChangesLine.php
+++ b/client/includes/recentchanges/ExternalChangesLine.php
@@ -72,12 +72,7 @@
$line = '';
 
if ( in_array( $changeType, array( 'remove', 'restore' ) ) ) {
-   $repoLinker = new RepoLinker(
-   Settings::get( 'repoUrl' ),
-   Settings::get( 'repoArticlePath' ),
-   Settings::get( 'repoScriptPath' ),
-   Settings::get( 'repoNamespaces' )
-   );
+   $repoLinker = 
WikibaseClient::getDefaultInstance()-newRepoLinker();
 
$deletionLog = $repoLinker-repoLink( 
'Special:Log/delete', wfMessage( 'dellogpage' )-text() );
$line .= wfMessage( 'parentheses' )-rawParams( 
$deletionLog );
@@ -222,12 +217,7 @@
 * @return string
 */
protected static function diffLink( $titleText, $entityData, $rc ) {
-   $repoLinker = new RepoLinker(
-   Settings::get( 'repoUrl' ),
-   Settings::get( 'repoArticlePath' ),
-   Settings::get( 'repoScriptPath' ),
-   Settings::get( 'repoNamespaces' )
-   );
+   $repoLinker = 
WikibaseClient::getDefaultInstance()-newRepoLinker();
 
return $repoLinker-repoLink(
null,
@@ -257,12 +247,7 @@
 * @return string
 */
protected static 

[MediaWiki-commits] [Gerrit] option to run until all wikis have dumps more recent than cu... - change (operations/dumps)

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

Change subject: option to run until all wikis have dumps more recent than 
cutoff date
..


option to run until all wikis have dumps more recent than cutoff date

--cutoff option in wrapper shell script and in main python script
wrapper shell script cleanup (break stuff into functions for
readability)

Change-Id: I405aae9f4c3894eb337d59d487b87e111f37306c
---
M xmldumps-backup/worker
M xmldumps-backup/worker.py
2 files changed, 162 insertions(+), 81 deletions(-)

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



diff --git a/xmldumps-backup/worker b/xmldumps-backup/worker
index afd9944..ced94f8 100755
--- a/xmldumps-backup/worker
+++ b/xmldumps-backup/worker
@@ -1,92 +1,150 @@
 #!/bin/bash
 
-# default number of failures of worker.py in a row before we decide
-# something serious is broken and we refuse to run
-MAXFAILS=3
-# default: don't pass special config file
-CONFIGFILE=
-# default: no logging to file
-LOG=
+usage() {
+echo $0: Unknown option $1
+echo Usage: $0 [--configfile filename] [--log] [--maxfails num] 
[--basedir dir] [--wiki wikiname]
+echo   [--cutoff date]
+echo --configfile   use specified file for config file (default: 
wikidump.conf)
+echo --log  write log of (almost) everything written to stderr 
(default: no logging)
+echo --maxfails if more than this many dumps fail in a row, exit 
(default: 3)
+echo --basedir  scripts and files are relative to this dir (default: 
location of this script)
+echo --cutoff   dump wikis until all have a dump produced more recent 
than the specified cutoff,
+echothen exit.  format: mmdd  OR  'today'
+echo --wiki name of specific wiki db to dump; otherwise all wikis 
in list referenced by
+echoconfig file will be dumped
+echo
+echo If the file maintenance.txt is present, no more jobs will be run, 
and
+echo this script will check the status again in 5 minutes.
+echo If the file exit.txt is present, no more new jobs will be started 
and
+echo this script will terminate.
+exit 1
+}
 
-failures=0
-WIKIDUMP_BASE=`dirname $0`
+set_defaults() {
+# default number of failures of worker.py in a row before we decide
+# something serious is broken and we refuse to run
+MAXFAILS=3
+# default: don't pass special config file
+CONFIGFILE=
+# default: no logging to file
+LOG=
+# default: no cutoff date
+CUTOFF=
+}
 
-while [ $# -gt 0 ]; do
-if [ $1 == --configfile ]; then
-   CONFIGFILE=$2
-   shift; shift
-elif [ $1 == --maxfails ]; then
-   MAXFAILS=$2
-   shift; shift
-elif [ $1 == --basedir ]; then
-   WIKIDUMP_BASE=$2
-   shift; shift
-elif [ $1 == --log ]; then
-   LOG=true
-   shift;
-elif [ $1 == --wiki ]; then
-   WIKI=$2
-   shift; shift
-else
-   echo $0: Unknown option $1
-   echo Usage: $0 [--configfile filename] [--log] [--maxfails num] 
[--basedir dir] [--wiki wikiname]
-   echo --configfile   use specified file for config file (default: 
wikidump.conf)
-   echo --log  write log of (almost) everything written to stderr 
(default: no logging)
-   echo --maxfails if more than this many dumps fail in a row, exit 
(default: 3)
-   echo --basedir  scripts and files are relative to this dir 
(default: location of this script)
-   echo --wiki name of specific wiki db to dump; otherwise all 
wikis in list referenced by
-   echoconfig file will be dumped
-   echo 
-   echo If the file maintenance.txt is present, no more jobs will be run, 
and
-   echo this script will check the status again in 5 minutes.
-   echo If the file exit.txt is present, no more new jobs will be started 
and
-   echo this script will terminate.
-   exit 1
+process_opts() {
+while [ $# -gt 0 ]; do
+   if [ $1 == --configfile ]; then
+   CONFIGFILE=$2
+   shift; shift
+   elif [ $1 == --maxfails ]; then
+   MAXFAILS=$2
+   shift; shift
+   elif [ $1 == --basedir ]; then
+   WIKIDUMP_BASE=$2
+   shift; shift
+   elif [ $1 == --log ]; then
+   LOG=true
+   shift;
+   elif [ $1 == --cutoff ]; then
+   CUTOFF=$2
+   shift; shift
+   elif [ $1 == --wiki ]; then
+   WIKI=$2
+   shift; shift
+   else
+   usage
+   fi
+done
+}
+
+setup_python_args() {
+# set up the command
+pythonargs=( $WIKIDUMP_BASE/worker.py )
+if [ ! -z $CONFIGFILE ]; then
+   pythonargs=( ${pythonargs[@]} --configfile $CONFIGFILE )
 fi
-done
+if [ ! -z $LOG ]; then
+   pythonargs=( ${pythonargs[@]} --log )
+fi
+if [ ! -z $CUTOFF ]; then
+   if [ $CUTOFF == today ]; 

[MediaWiki-commits] [Gerrit] Update URLs to point to the extension's proper location - change (mediawiki...TwoFactorAuthentication)

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

Change subject: Update URLs to point to the extension's proper location
..


Update URLs to point to the extension's proper location

Update URLs to MediaWiki Wiki

Change-Id: I44929fd353f738b29369b8f741d64f49c72635ae
---
M TwoFactorAuth.hooks.php
M TwoFactorAuth.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/TwoFactorAuth.hooks.php b/TwoFactorAuth.hooks.php
index 7b6d504..f37c9d3 100644
--- a/TwoFactorAuth.hooks.php
+++ b/TwoFactorAuth.hooks.php
@@ -3,7 +3,7 @@
 /**
  * TwoFactorAuth extension - Support for TOTP two-factor authentication
  *
- * For more info see http://mediawiki.org/wiki/Extension:TwoFactorAuth
+ * For more info see 
https://mediawiki.org/wiki/Extension:TwoFactorAuthentication
  *
  * @file
  * @ingroup Extensions
diff --git a/TwoFactorAuth.php b/TwoFactorAuth.php
index 7560397..96d279d 100644
--- a/TwoFactorAuth.php
+++ b/TwoFactorAuth.php
@@ -2,7 +2,7 @@
 /**
  * TwoFactorAuth extension - Support for TOTP two-factor authentication
  *
- * For more info see http://mediawiki.org/wiki/Extension:TwoFactorAuth
+ * For more info see 
https://mediawiki.org/wiki/Extension:TwoFactorAuthentication
  *
  * @file
  * @ingroup Extensions
@@ -22,7 +22,7 @@
'name' = 'TwoFactorAuth',
'author' = 'Tyler Romeo',
'version' = '0.2',
-   'url' = 'http://mediawiki.org/wiki/Extension:TwoFactorAuth',
+   'url' = 'https://mediawiki.org/wiki/Extension:TwoFactorAuthentication',
'descriptionmsg' = 'twofactorauth-desc',
 );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I44929fd353f738b29369b8f741d64f49c72635ae
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TwoFactorAuthentication
Gerrit-Branch: master
Gerrit-Owner: FastLizard4 fastlizard4-git-comm...@fastlizard4.org
Gerrit-Reviewer: FastLizard4 fastlizard4-git-comm...@fastlizard4.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com

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


[MediaWiki-commits] [Gerrit] clean up import statements in main dump script - change (operations/dumps)

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

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


Change subject: clean up import statements in main dump script
..

clean up import statements in main dump script

Change-Id: I8230b14b63ddfc11762cca2f1b2567926cc0de33
---
M xmldumps-backup/worker.py
1 file changed, 5 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/02/62802/1

diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 2245b55..7dcef04 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -1,24 +1,10 @@
 # Worker process, does the actual dumping
 
-import getopt
-import hashlib
-import os
-import re
-import sys
-import time
-import subprocess
-import select
-import shutil
-import stat
-import signal
-import errno
-import glob
-import WikiDump
-import CommandManagement
-import Queue
-import thread
-import traceback
-import socket
+import getopt, hashlib, os, re, sys, errno, time
+import subprocess, select
+import shutil, stat, signal, glob
+import WikiDump, CommandManagement
+import Queue, thread, traceback, socket
 
 from os.path import exists
 from subprocess import Popen, PIPE

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8230b14b63ddfc11762cca2f1b2567926cc0de33
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
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] clean up import statements in main dump script - change (operations/dumps)

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

Change subject: clean up import statements in main dump script
..


clean up import statements in main dump script

Change-Id: I8230b14b63ddfc11762cca2f1b2567926cc0de33
---
M xmldumps-backup/worker.py
1 file changed, 5 insertions(+), 19 deletions(-)

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



diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 2245b55..7dcef04 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -1,24 +1,10 @@
 # Worker process, does the actual dumping
 
-import getopt
-import hashlib
-import os
-import re
-import sys
-import time
-import subprocess
-import select
-import shutil
-import stat
-import signal
-import errno
-import glob
-import WikiDump
-import CommandManagement
-import Queue
-import thread
-import traceback
-import socket
+import getopt, hashlib, os, re, sys, errno, time
+import subprocess, select
+import shutil, stat, signal, glob
+import WikiDump, CommandManagement
+import Queue, thread, traceback, socket
 
 from os.path import exists
 from subprocess import Popen, PIPE

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8230b14b63ddfc11762cca2f1b2567926cc0de33
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
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] (bug 48145) Import of time.js - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Import of time.js
..


(bug 48145) Import of time.js

Source: http://simia.net/valueparser/time.js

Change-Id: I812f08e3b175e28bb5ee943248d45d096547deb9
---
A DataValues/resources/time.js/time.js
1 file changed, 563 insertions(+), 0 deletions(-)

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



diff --git a/DataValues/resources/time.js/time.js 
b/DataValues/resources/time.js/time.js
new file mode 100644
index 000..4821398
--- /dev/null
+++ b/DataValues/resources/time.js/time.js
@@ -0,0 +1,563 @@
+/**
+ * time.js by Denny Vrandečić
+ * Source: http://simia.net/valueparser/time.js
+ *
+ * @licence GNU GPL v2+
+ * @author Denny Vrandečić
+ */
+(function( window ) {
+
+   var time = {};
+   var _oldTime = window.time;
+   window.time = time;
+
+   time.noConflict = function() {
+   window.time = _oldTime;
+   return time;
+   };
+
+   var settings = {};
+
+   settings.bce = ['BCE', 'BC', 'B.C.', 'before Common Era', 'before 
Christ'];
+   settings.ace = ['CE', 'AD', 'A.D.', 'Anno Domini', 'Common Era'];
+   settings.pasttext = '% ago';
+   settings.futuretext = 'in %';
+   settings.calendarnames = [];
+   settings.calendarnames[0] = ['Gregorian', 'G', 'GD', 'GC', 'NS', 
'N.S.', 'New Style', 'Gregorian calendar', 'Gregorian date'];
+   settings.calendarnames[1] = ['Julian', 'J', 'JD', 'JC', 'OS', 'O.S.', 
'Old Style', 'Julian calendar', 'Julian date'];
+   settings.monthnames = [];
+   settings.monthnames[0]  = ['January', 'Jan'];
+   settings.monthnames[1]  = ['February', 'Feb'];
+   settings.monthnames[2]  = ['March', 'Mar'];
+   settings.monthnames[3]  = ['April', 'Apr'];
+   settings.monthnames[4]  = ['May'];
+   settings.monthnames[5]  = ['June', 'Jun'];
+   settings.monthnames[6]  = ['July', 'Jul'],
+   settings.monthnames[7]  = ['August', 'Aug'];
+   settings.monthnames[8]  = ['September', 'Sep'];
+   settings.monthnames[9]  = ['October', 'Oct'];
+   settings.monthnames[10] = ['November', 'Nov'];
+   settings.monthnames[11] = ['December', 'Dec'];
+   settings.precisiontexts = [];
+   settings.precisiontexts[0]  = 'billion years';
+   settings.precisiontexts[1]  = 'hundred million years';
+   settings.precisiontexts[2]  = 'ten million years';
+   settings.precisiontexts[3]  = 'million years';
+   settings.precisiontexts[4]  = '100,000 years';
+   settings.precisiontexts[5]  = '10,000 years';
+   settings.precisiontexts[6]  = 'millenium';
+   settings.precisiontexts[7]  = 'century';
+   settings.precisiontexts[8]  = 'decade';
+   settings.precisiontexts[9]  = 'year';
+   settings.precisiontexts[10] = 'month';
+   settings.precisiontexts[11] = 'day';
+   settings.precisiontexts[12] = 'hour';
+   settings.precisiontexts[13] = 'minute';
+   settings.precisiontexts[14] = 'second';
+   settings.outputprecision = [];
+   settings.outputprecision[0] = '% billion years';
+   settings.outputprecision[1] = '%00 million years';
+   settings.outputprecision[2] = '%0 million years';
+   settings.outputprecision[3] = '% million years';
+   settings.outputprecision[4] = '%00,000 years';
+   settings.outputprecision[5] = '%0,000 years';
+   settings.outputprecision[6] = '%. millenium';
+   settings.outputprecision[7] = '%. century';
+   settings.outputprecision[8] = '%0s';
+
+   var maxPrecision = function() { return 14; };
+
+   var isSane = function( text ) {
+   if (text.indexOf('')  -1) return false;
+   if (text.indexOf('')  -1) return false;
+   return true;
+   };
+
+   var settingArray = function( name, texts ) {
+   if (texts === undefined) return settings[name].slice(0);
+   if (!Array.isArray(texts)) throw 'Parameter to set should be an 
array of strings';
+   if (texts.length === 0) throw 'Parameter to set should be an 
array of strings';
+   for (var i=0; itexts.length; i++) {
+   if (typeof texts[i] !== 'string') throw 'Parameter to 
set should be an array of strings';
+   if (!isSane(texts[i])) throw 'String ' + texts[i] + ' 
is not considered sane';
+   }
+   settings[name] = texts.slice(0);
+   return settings[name].slice(0);
+   };
+   var bce = function( texts ) { return settingArray( 'bce', texts ); };
+   var ace = function( texts ) { return settingArray( 'ace', texts ); };
+   var precisionTexts = function( texts ) {
+   if (texts.length !== 1+maxPrecision()) throw 'Incorrect number 
of strings';
+   return settingArray( 'precisiontexts', texts );
+ 

[MediaWiki-commits] [Gerrit] (bug 48145) Formatted time.js according to our coding guidel... - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Formatted time.js according to our coding guidelines
..


(bug 48145) Formatted time.js according to our coding guidelines

This makes sense since time.js will from now on be further developed in this 
repository if there
are any adjustments necessary.

Change-Id: I65c7f5b2ffe61e910b69324e60ecb4ef9babe4b8
---
M DataValues/resources/time.js/time.js
1 file changed, 435 insertions(+), 270 deletions(-)

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



diff --git a/DataValues/resources/time.js/time.js 
b/DataValues/resources/time.js/time.js
index 4821398..6a57b4d 100644
--- a/DataValues/resources/time.js/time.js
+++ b/DataValues/resources/time.js/time.js
@@ -5,10 +5,11 @@
  * @licence GNU GPL v2+
  * @author Denny Vrandečić
  */
-(function( window ) {
+( function( window ) {
 
-   var time = {};
-   var _oldTime = window.time;
+   var time = {},
+   _oldTime = window.time;
+
window.time = time;
 
time.noConflict = function() {
@@ -23,32 +24,36 @@
settings.pasttext = '% ago';
settings.futuretext = 'in %';
settings.calendarnames = [];
-   settings.calendarnames[0] = ['Gregorian', 'G', 'GD', 'GC', 'NS', 
'N.S.', 'New Style', 'Gregorian calendar', 'Gregorian date'];
-   settings.calendarnames[1] = ['Julian', 'J', 'JD', 'JC', 'OS', 'O.S.', 
'Old Style', 'Julian calendar', 'Julian date'];
+   settings.calendarnames[0] = [
+   'Gregorian', 'G', 'GD', 'GC', 'NS', 'N.S.', 'New Style', 
'Gregorian calendar', 'Gregorian date'
+   ];
+   settings.calendarnames[1] = [
+   'Julian', 'J', 'JD', 'JC', 'OS', 'O.S.', 'Old Style', 'Julian 
calendar', 'Julian date'
+   ];
settings.monthnames = [];
-   settings.monthnames[0]  = ['January', 'Jan'];
-   settings.monthnames[1]  = ['February', 'Feb'];
-   settings.monthnames[2]  = ['March', 'Mar'];
-   settings.monthnames[3]  = ['April', 'Apr'];
-   settings.monthnames[4]  = ['May'];
-   settings.monthnames[5]  = ['June', 'Jun'];
-   settings.monthnames[6]  = ['July', 'Jul'],
-   settings.monthnames[7]  = ['August', 'Aug'];
-   settings.monthnames[8]  = ['September', 'Sep'];
-   settings.monthnames[9]  = ['October', 'Oct'];
+   settings.monthnames[0] = ['January', 'Jan'];
+   settings.monthnames[1] = ['February', 'Feb'];
+   settings.monthnames[2] = ['March', 'Mar'];
+   settings.monthnames[3] = ['April', 'Apr'];
+   settings.monthnames[4] = ['May'];
+   settings.monthnames[5] = ['June', 'Jun'];
+   settings.monthnames[6] = ['July', 'Jul'];
+   settings.monthnames[7] = ['August', 'Aug'];
+   settings.monthnames[8] = ['September', 'Sep'];
+   settings.monthnames[9] = ['October', 'Oct'];
settings.monthnames[10] = ['November', 'Nov'];
settings.monthnames[11] = ['December', 'Dec'];
settings.precisiontexts = [];
-   settings.precisiontexts[0]  = 'billion years';
-   settings.precisiontexts[1]  = 'hundred million years';
-   settings.precisiontexts[2]  = 'ten million years';
-   settings.precisiontexts[3]  = 'million years';
-   settings.precisiontexts[4]  = '100,000 years';
-   settings.precisiontexts[5]  = '10,000 years';
-   settings.precisiontexts[6]  = 'millenium';
-   settings.precisiontexts[7]  = 'century';
-   settings.precisiontexts[8]  = 'decade';
-   settings.precisiontexts[9]  = 'year';
+   settings.precisiontexts[0] = 'billion years';
+   settings.precisiontexts[1] = 'hundred million years';
+   settings.precisiontexts[2] = 'ten million years';
+   settings.precisiontexts[3] = 'million years';
+   settings.precisiontexts[4] = '100,000 years';
+   settings.precisiontexts[5] = '10,000 years';
+   settings.precisiontexts[6] = 'millenium';
+   settings.precisiontexts[7] = 'century';
+   settings.precisiontexts[8] = 'decade';
+   settings.precisiontexts[9] = 'year';
settings.precisiontexts[10] = 'month';
settings.precisiontexts[11] = 'day';
settings.precisiontexts[12] = 'hour';
@@ -65,236 +70,325 @@
settings.outputprecision[7] = '%. century';
settings.outputprecision[8] = '%0s';
 
-   var maxPrecision = function() { return 14; };
+   var maxPrecision = function() {
+   return 14;
+   };
 
var isSane = function( text ) {
-   if (text.indexOf('')  -1) return false;
-   if (text.indexOf('')  -1) return false;
+   if( text.indexOf( '' )  -1 ) {
+   return false;
+   }
+   if( text.indexOf( '' )  -1 ) {
+   return false;
+   }
return true;
};
 
var settingArray = 

[MediaWiki-commits] [Gerrit] (bug 48145) Splits time.js in several files (added time.Tim... - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Splits time.js in several files (added 
time.Time.js and time.Time.parse.js)
..


(bug 48145) Splits time.js in several files (added time.Time.js and 
time.Time.parse.js)

This change doesn't add any improvements, it just moves the code for clear 
separation of different
tasks. This also adds some comments and TODOs. The different fields in the 
time's settings field
are now exposed as simple fields, not functions as before.

Change-Id: I96df9a7dc7ff5202418ea29efb294004ce4a48b9
---
M DataValues/DataValues.resources.php
A DataValues/resources/time.js/time.Time.js
A DataValues/resources/time.js/time.Time.parse.js
M DataValues/resources/time.js/time.js
4 files changed, 462 insertions(+), 517 deletions(-)

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



diff --git a/DataValues/DataValues.resources.php 
b/DataValues/DataValues.resources.php
index 3177971..70eff85 100644
--- a/DataValues/DataValues.resources.php
+++ b/DataValues/DataValues.resources.php
@@ -81,6 +81,15 @@
),
),
 
+   // time.js
+   'time.js' = $moduleTemplate + array(
+   'scripts' = array(
+   'time.js/time.js',
+   'time.js/time.Time.js',
+   'time.js/time.Time.parse.js',
+   )
+   ),
+
// qunit-parameterize from 
https://github.com/AStepaniuk/qunit-parameterize
'qunit.parameterize' = $moduleTemplate + array(
'scripts' = array(
diff --git a/DataValues/resources/time.js/time.Time.js 
b/DataValues/resources/time.js/time.Time.js
new file mode 100644
index 000..cf393cd
--- /dev/null
+++ b/DataValues/resources/time.js/time.Time.js
@@ -0,0 +1,156 @@
+/**
+ * time.js's Time constructor for parsing and representing a time.
+ *
+ * @author Denny Vrandečić
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+time.Time = ( function( time ) {
+   'use strict';
+
+   /**
+* Constructor for object representing a point in time with a certain 
precision.
+*
+* @param {string} inputtext Text to be interpreted as time.
+* @param {number} explicitPrecision Precission which will overrule the 
precision
+*/
+   function Time( inputtext, explicitPrecision ) {
+   this.getInputtext = function() {
+   return inputtext;
+   };
+
+   // TODO: doing parsing here is bad practice, constructor should 
instead take parser output.
+   //  This way we never get an invalid Time object and can throw 
errors if wrong arguments
+   //  are provided to the constructor.
+   var result = time.Time.parse( inputtext );
+   if( result === null ) {
+   result = {};
+   }
+
+   var bce = (result.bce !== undefined) ? result.bce : false,
+   year = (result.year !== undefined) ? result.year : null,
+   month = (result.month !== undefined) ? result.month : 1,
+   day = (result.day !== undefined) ? result.day : 1,
+   hour = (result.hour !== undefined) ? result.hour : 0,
+   minute = (result.minute !== undefined) ? result.minute 
: 0,
+   second = (result.second !== undefined) ? result.second 
: 0,
+   utcoffset = '+00:00',
+   calendarname = (result.calendarname !== undefined) ? 
result.calendarname : 'Gregorian';
+
+   this.year = function() {
+   return year;
+   };
+
+   this.month = function() {
+   return month;
+   };
+
+   this.day = function() {
+   return day;
+   };
+
+   this.utcoffset = function() {
+   return utcoffset;
+   };
+
+   var precision = explicitPrecision !== undefined ? 
explicitPrecision : result.precision;
+   this.precision = function() {
+   return precision;
+   };
+
+   this.precisionText = function() {
+   return time.precisionText( precision );
+   };
+
+   var before = 0,
+   after = 0;
+
+   this.before = function() {
+   return before;
+   };
+
+   this.after = function() {
+   return after;
+   };
+
+   this.gregorian = function() {
+   if( calendarname === 'Gregorian' ) {
+   return {
+   

[MediaWiki-commits] [Gerrit] (bug 48145) Added a isValid function for time.Time - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Added a isValid function for time.Time
..


(bug 48145) Added a isValid function for time.Time

The function returns whether the Object is representing any time at all. It 
will return false if
the value passed to the constructor has not been interpreted as time.

Change-Id: Ic16ecb54424e2e93ff7c72f30d107abd7b4ac814
---
M DataValues/resources/time.js/time.Time.js
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/DataValues/resources/time.js/time.Time.js 
b/DataValues/resources/time.js/time.Time.js
index cf393cd..2511ae7 100644
--- a/DataValues/resources/time.js/time.Time.js
+++ b/DataValues/resources/time.js/time.Time.js
@@ -133,6 +133,16 @@
return time.getTextFromDate( precision, year, month, 
day );
};
 
+   /**
+* Returns whether the Object is representing any time at all. 
This will be false if the
+* value passed to the constructor has not been interpreted as 
time.
+*
+* @returns {boolean}
+*/
+   this.isValid = function() {
+   return this.year() !== null;
+   };
+
this.gregorianText = function() {
var result = this.gregorian();
return time.getTextFromDate( precision, result.year, 
result.month, result.day );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic16ecb54424e2e93ff7c72f30d107abd7b4ac814
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] usage message to stderr, not stdout - change (operations/dumps)

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

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


Change subject: usage message to stderr, not stdout
..

usage message to stderr, not stdout

Change-Id: I74d8773a7ff4fa425af455482fa27240fe83fc9a
---
M xmldumps-backup/worker.py
1 file changed, 41 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/03/62803/1

diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 7dcef04..76b6e6f 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -4050,47 +4050,47 @@
 def usage(message = None):
if message:
print message
-   print Usage: python worker.py [options] [wikidbname]
-   print Options: --aftercheckpoint, --checkpoint, --chunk, --configfile, 
--date, --job, --addnotice, --delnotice, --force, --noprefetch, --nospawn, 
--restartfrom, --log, --cutoff
-   print --aftercheckpoint: Restart thie job from the after specified 
checkpoint file, doing the
-   printrest of the job for the appropriate chunk if 
chunks are configured
-   printor for the all the rest of the revisions if no 
chunks are configured;
-   printonly for jobs articlesdump, metacurrentdump, 
metahistorybz2dump.
-   print --checkpoint:  Specify the name of the checkpoint file to rerun 
(requires --job,
-   printdepending on the file this may imply --chunk)
-   print --chunk:   Specify the number of the chunk to rerun (use 
with a specific job
-   printto rerun, only if parallel jobs (chunks) are 
enabled).
-   print --configfile:  Specify an alternative configuration file to 
read.
-   printDefault config file name: wikidump.conf
-   print --date:Rerun dump of a given date (probably unwise)
-   print --addnotice:   Text message that will be inserted in the 
per-dump-run index.html
-   printfile; use this when rerunning some job and you 
want to notify the
-   printpotential downloaders of problems, for example.  
This option 
-   printremains in effective for the specified wiki and 
date until
-   printthe delnotice option is given.
-   print --delnotice:   Remove any notice that has been specified by 
addnotice, for
-   printthe given wiki and date.
-   print --job: Run just the specified step or set of steps; for 
the list,
-   printgive the option --job help
-   printThis option requires specifiying a wikidbname on 
which to run.
-   printThis option cannot be specified with --force.
-   print --dryrun:  Don't really run the job, just print what would 
be done (must be used
-   printwith a specified wikidbname on which to run
-   print --force:   remove a lock file for the specified wiki 
(dangerous, if there is
-   printanother process running, useful if you want to 
start a second later
-   printrun while the first dump from a previous date is 
still going)
-   printThis option cannot be specified with --job.
-   print --noprefetch:  Do not use a previous file's contents for 
speeding up the dumps
-   print(helpful if the previous files may have corrupt 
contents)
-   print --nospawn: Do not spawn a separate process in order to 
retrieve revision texts
-   print --restartfrom: Do all jobs after the one specified via --job, 
including that one
-   print --log: Log progress messages and other output to logfile 
in addition to
-   printthe usual console output
-   print --cutoff:  Given a cutoff date in mmdd format, display 
the next wiki for which
-   printdumps should be run, if its last dump was not 
after the cutoff date,
-   printand exit, or if there are no such wikis, just 
exit
-   print --verbose: Print lots of stuff (includes printing full 
backtraces for any exception)
-   printThis is used primarily for debugging
+   sys.stderr.write( Usage: python worker.py [options] [wikidbname]\n )
+   sys.stderr.write( Options: --aftercheckpoint, --checkpoint, --chunk, 
--configfile, --date, --job, --addnotice, --delnotice, --force, --noprefetch, 
--nospawn, --restartfrom, --log, --cutoff\n )
+   sys.stderr.write( --aftercheckpoint: Restart thie job from the after 
specified checkpoint file, doing the\n )
+   sys.stderr.write(rest of the job for the appropriate 
chunk if chunks are configured\n )
+   sys.stderr.write(or for the all the rest of the 
revisions if no chunks are configured;\n )
+   

[MediaWiki-commits] [Gerrit] usage message to stderr, not stdout - change (operations/dumps)

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

Change subject: usage message to stderr, not stdout
..


usage message to stderr, not stdout

Change-Id: I74d8773a7ff4fa425af455482fa27240fe83fc9a
---
M xmldumps-backup/worker.py
1 file changed, 41 insertions(+), 41 deletions(-)

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



diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 7dcef04..76b6e6f 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -4050,47 +4050,47 @@
 def usage(message = None):
if message:
print message
-   print Usage: python worker.py [options] [wikidbname]
-   print Options: --aftercheckpoint, --checkpoint, --chunk, --configfile, 
--date, --job, --addnotice, --delnotice, --force, --noprefetch, --nospawn, 
--restartfrom, --log, --cutoff
-   print --aftercheckpoint: Restart thie job from the after specified 
checkpoint file, doing the
-   printrest of the job for the appropriate chunk if 
chunks are configured
-   printor for the all the rest of the revisions if no 
chunks are configured;
-   printonly for jobs articlesdump, metacurrentdump, 
metahistorybz2dump.
-   print --checkpoint:  Specify the name of the checkpoint file to rerun 
(requires --job,
-   printdepending on the file this may imply --chunk)
-   print --chunk:   Specify the number of the chunk to rerun (use 
with a specific job
-   printto rerun, only if parallel jobs (chunks) are 
enabled).
-   print --configfile:  Specify an alternative configuration file to 
read.
-   printDefault config file name: wikidump.conf
-   print --date:Rerun dump of a given date (probably unwise)
-   print --addnotice:   Text message that will be inserted in the 
per-dump-run index.html
-   printfile; use this when rerunning some job and you 
want to notify the
-   printpotential downloaders of problems, for example.  
This option 
-   printremains in effective for the specified wiki and 
date until
-   printthe delnotice option is given.
-   print --delnotice:   Remove any notice that has been specified by 
addnotice, for
-   printthe given wiki and date.
-   print --job: Run just the specified step or set of steps; for 
the list,
-   printgive the option --job help
-   printThis option requires specifiying a wikidbname on 
which to run.
-   printThis option cannot be specified with --force.
-   print --dryrun:  Don't really run the job, just print what would 
be done (must be used
-   printwith a specified wikidbname on which to run
-   print --force:   remove a lock file for the specified wiki 
(dangerous, if there is
-   printanother process running, useful if you want to 
start a second later
-   printrun while the first dump from a previous date is 
still going)
-   printThis option cannot be specified with --job.
-   print --noprefetch:  Do not use a previous file's contents for 
speeding up the dumps
-   print(helpful if the previous files may have corrupt 
contents)
-   print --nospawn: Do not spawn a separate process in order to 
retrieve revision texts
-   print --restartfrom: Do all jobs after the one specified via --job, 
including that one
-   print --log: Log progress messages and other output to logfile 
in addition to
-   printthe usual console output
-   print --cutoff:  Given a cutoff date in mmdd format, display 
the next wiki for which
-   printdumps should be run, if its last dump was not 
after the cutoff date,
-   printand exit, or if there are no such wikis, just 
exit
-   print --verbose: Print lots of stuff (includes printing full 
backtraces for any exception)
-   printThis is used primarily for debugging
+   sys.stderr.write( Usage: python worker.py [options] [wikidbname]\n )
+   sys.stderr.write( Options: --aftercheckpoint, --checkpoint, --chunk, 
--configfile, --date, --job, --addnotice, --delnotice, --force, --noprefetch, 
--nospawn, --restartfrom, --log, --cutoff\n )
+   sys.stderr.write( --aftercheckpoint: Restart thie job from the after 
specified checkpoint file, doing the\n )
+   sys.stderr.write(rest of the job for the appropriate 
chunk if chunks are configured\n )
+   sys.stderr.write(or for the all the rest of the 
revisions if no chunks are configured;\n )
+   sys.stderr.write(only for jobs 

[MediaWiki-commits] [Gerrit] (bug 48145) Added time.Time.newFromIso8601 - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Added time.Time.newFromIso8601
..


(bug 48145) Added time.Time.newFromIso8601

The time parser is currently not able to parse iso8601 in the form it is 
returned by
time.Time.iso8601. This function serves as a workaround to compensate for now.
We require this since we want the TimeValue data value type to store the iso8601
representation rather than all fields separately. The TimeValue's JSON will 
therefore
mainly consist of that iso8601 string from whom we have to create a new 
TimeValue in
the frontend.

Change-Id: I19372290cef7f6a768f687373cac6be59c77474b
---
M DataValues/resources/time.js/time.Time.js
1 file changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/DataValues/resources/time.js/time.Time.js 
b/DataValues/resources/time.js/time.Time.js
index 2511ae7..1ce651f 100644
--- a/DataValues/resources/time.js/time.Time.js
+++ b/DataValues/resources/time.js/time.Time.js
@@ -161,6 +161,26 @@
return ( 1e12 + Math.abs( number ) + '' ).slice( -digits );
}
 
+   /**
+* Creates a new Time object by a given iso8601 string.
+*
+* TODO: this function shouldn't really be required since the parser 
should simply be able to
+*   take such a string and create a new Time object from it.
+*
+* @param {string} signature
+* @param {number} [precision] If not given, precision will be as high 
as possible.
+*/
+   Time.newFromIso8601 = function( iso8601String, precision ) {
+   // The parser only takes the iso8601 string in a certain format 
right now. We have to bring
+   // it into that form first:
+   var formattedIso8601 = iso8601String
+   .replace( /T.+$/, '' ) // get rid of minutes (not 
supported yet)
+   .replace( /([\-\+])?0*/, '$1' )// get rid of trailing 
zeroes, keep - and +
+   .replace( '+', '' ); // get reid of +
+
+   return new Time( formattedIso8601, precision );
+   };
+
return Time; // expose time.Time
 
 }( time ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19372290cef7f6a768f687373cac6be59c77474b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] (bug 48145) Introduction of TimeValue data value type in Jav... - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Introduction of TimeValue data value type in 
JavaScript
..


(bug 48145) Introduction of TimeValue data value type in JavaScript

Changed the backend's TimeValue precision numbers to match the one from the 
frontend since
the time.js's options and precision handling is quite a mess right now. For 
having a simple
version of the time value frontend running asap, this is the faster way to get 
there.

Change-Id: Id9db92258aa667cc625df1483b0dd5aaf8dd3c7b
---
M DataTypes/DataTypes.mw.php
M DataValues/DataValues.resources.php
M DataValues/DataValues.tests.qunit.php
M DataValues/includes/values/TimeValue.php
A DataValues/resources/values/TimeValue.js
A DataValues/tests/qunit/values/TimeValue.tests.js
6 files changed, 185 insertions(+), 17 deletions(-)

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



diff --git a/DataTypes/DataTypes.mw.php b/DataTypes/DataTypes.mw.php
index 39d7c68..23622ac 100644
--- a/DataTypes/DataTypes.mw.php
+++ b/DataTypes/DataTypes.mw.php
@@ -124,7 +124,8 @@
),
'dependencies' = array(
'dataTypes',
-   'qunit.parameterize'
+   'dataValues.values',
+   'qunit.parameterize',
),
);
 
diff --git a/DataValues/DataValues.resources.php 
b/DataValues/DataValues.resources.php
index 70eff85..da979e9 100644
--- a/DataValues/DataValues.resources.php
+++ b/DataValues/DataValues.resources.php
@@ -57,16 +57,20 @@
 
'dataValues.values' = $moduleTemplate + array(
'scripts' = array(
-   // Note: the order here is relevant, scripts 
should be places after the ones they depend on
+   // Note: The order here is relevant, scripts 
should be places after the ones they
+   //  depend on.
+   // TODO: Make one module per data value type.
'values/BoolValue.js',
'values/MonolingualTextValue.js',
'values/MultilingualTextValue.js',
'values/StringValue.js',
'values/NumberValue.js',
+   'values/TimeValue.js',
'values/UnknownValue.js',
),
'dependencies' = array(
'dataValues.DataValue',
+   'time.js' // required by TimeValue
),
),
 
diff --git a/DataValues/DataValues.tests.qunit.php 
b/DataValues/DataValues.tests.qunit.php
index b3309b6..a2fa7d5 100644
--- a/DataValues/DataValues.tests.qunit.php
+++ b/DataValues/DataValues.tests.qunit.php
@@ -60,6 +60,7 @@
$bp/values/MultilingualTextValue.tests.js,
$bp/values/StringValue.tests.js,
$bp/values/NumberValue.tests.js,
+   $bp/values/TimeValue.tests.js,
$bp/values/UnknownValue.tests.js,
),
'dependencies' = array(
diff --git a/DataValues/includes/values/TimeValue.php 
b/DataValues/includes/values/TimeValue.php
index 5adbb08..3a0db4e 100644
--- a/DataValues/includes/values/TimeValue.php
+++ b/DataValues/includes/values/TimeValue.php
@@ -34,21 +34,21 @@
  */
 class TimeValue extends DataValueObject {
 
-   const PRECISION_Ga = 28; // Gigayear
-   const PRECISION_100Ma = 29; // 100 Megayears
-   const PRECISION_10Ma = 30; // 10 Megayears
-   const PRECISION_Ma = 31; // Megayear
-   const PRECISION_100ka = 32; // 100 Kiloyears
-   const PRECISION_10ka = 33; // 10 Kiloyears
-   const PRECISION_ka = 34; // Kiloyear
-   const PRECISION_100a = 35; // 100 years
-   const PRECISION_10a = 36; // 10 years
-   const PRECISION_YEAR = 37;
-   const PRECISION_MONTH = 38;
-   const PRECISION_DAY = 39;
-   const PRECISION_HOUR = 40;
-   const PRECISION_MINUTE = 41;
-   const PRECISION_SECOND = 42;
+   const PRECISION_Ga = 0; // Gigayear
+   const PRECISION_100Ma = 1; // 100 Megayears
+   const PRECISION_10Ma = 2; // 10 Megayears
+   const PRECISION_Ma = 3; // Megayear
+   const PRECISION_100ka = 4; // 100 Kiloyears
+   const PRECISION_10ka = 5; // 10 Kiloyears
+   const PRECISION_ka = 6; // Kiloyear
+   const PRECISION_100a = 7; // 100 years
+   const PRECISION_10a = 8; // 10 years
+   const PRECISION_YEAR = 9;
+   const PRECISION_MONTH = 10;
+   const PRECISION_DAY = 11;
+   const PRECISION_HOUR = 12;
+   const PRECISION_MINUTE = 13;
+ 

[MediaWiki-commits] [Gerrit] (bug 48145) Introduction of TimeParser for TimeValue data va... - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) Introduction of TimeParser for TimeValue data value 
type in JavaScript
..


(bug 48145) Introduction of TimeParser for TimeValue data value type in 
JavaScript

The parser requires a time.Time object just like the TimeValue itself. For now 
the parser does not
really have any use. The interface might change to match the one of 
time.Time.parse instead.

Change-Id: I81465579400ea84187fa45dace81347e5d5ff20f
---
M ValueParsers/Resources.php
M ValueParsers/ValueParsers.mw.php
A ValueParsers/resources/parsers/TimeParser.js
A ValueParsers/tests/qunit/parsers/TimeParser.tests.js
4 files changed, 98 insertions(+), 2 deletions(-)

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



diff --git a/ValueParsers/Resources.php b/ValueParsers/Resources.php
index da13ab2..84913a5 100644
--- a/ValueParsers/Resources.php
+++ b/ValueParsers/Resources.php
@@ -63,16 +63,18 @@
),
 
'valueParsers.parsers' = $moduleTemplate + array(
-   'scripts' = array(
+   'scripts' = array( // TODO: one module per parser
'parsers/BoolParser.js',
'parsers/FloatParser.js',
'parsers/IntParser.js',
'parsers/StringParser.js',
+   'parsers/TimeParser.js',
'parsers/NullParser.js',
),
'dependencies' = array(
'valueParsers.ValueParser',
'valueParsers.api',
+   'time.js', // required by TimeValue
),
),
 
diff --git a/ValueParsers/ValueParsers.mw.php b/ValueParsers/ValueParsers.mw.php
index 143c6a2..587ca34 100644
--- a/ValueParsers/ValueParsers.mw.php
+++ b/ValueParsers/ValueParsers.mw.php
@@ -76,6 +76,7 @@
'includes/parsers/GeoCoordinateParser',
'includes/parsers/FloatParser',
'includes/parsers/IntParser',
+   'includes/parsers/IntParser',
'includes/parsers/NullParser',
'includes/parsers/TitleParser',
 
@@ -133,10 +134,12 @@
'tests/qunit/parsers/FloatParser.tests.js',
'tests/qunit/parsers/IntParser.tests.js',
'tests/qunit/parsers/StringParser.tests.js',
+   'tests/qunit/parsers/TimeParser.tests.js',
'tests/qunit/parsers/NullParser.tests.js',
),
'dependencies' = array(
'ext.valueParsers.tests',
+   'time.js'
),
);
 
@@ -148,4 +151,4 @@
 $wgResourceModules = array_merge(
$wgResourceModules,
include( __DIR__ . '/Resources.php' )
-);
\ No newline at end of file
+);
diff --git a/ValueParsers/resources/parsers/TimeParser.js 
b/ValueParsers/resources/parsers/TimeParser.js
new file mode 100644
index 000..fa08fea
--- /dev/null
+++ b/ValueParsers/resources/parsers/TimeParser.js
@@ -0,0 +1,45 @@
+/**
+ * @file
+ * @ingroup ValueParsers
+ *
+ * @licence GNU GPL v2+
+ *
+ * @author Daniel Werner  danwe...@web.de 
+ */
+( function( vp, dv, $, Time ) {
+   'use strict';
+
+   var PARENT = vp.ValueParser;
+
+   /**
+* Constructor for time parsers.
+*
+* @constructor
+* @extends vp.ValueParser
+* @since 0.1
+*/
+   vp.TimeParser = dv.util.inherit( PARENT, {
+   /**
+* @see vp.ValueParser.parse
+* @since 0.1
+*
+* @param {time.Time} time
+* @return $.Promise
+*/
+   parse: function( time ) {
+   var deferred = $.Deferred();
+
+   if( time.isValid() ) {
+   // Valid time:
+   var dataValue = new dv.TimeValue( time );
+   deferred.resolve( dataValue );
+   } else {
+   // Invalid time:
+   deferred.reject();
+   }
+
+   return deferred.promise();
+   }
+   } );
+
+}( valueParsers, dataValues, jQuery, time.Time ) );
diff --git a/ValueParsers/tests/qunit/parsers/TimeParser.tests.js 
b/ValueParsers/tests/qunit/parsers/TimeParser.tests.js
new file mode 100644
index 000..1ca01f7
--- /dev/null
+++ b/ValueParsers/tests/qunit/parsers/TimeParser.tests.js
@@ -0,0 +1,46 @@
+/**
+ * @since 0.1
+ * @file
+ * @ingroup ValueParsers
+ *
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  danwe...@web.de 

[MediaWiki-commits] [Gerrit] (Bug 47288) Abstraction layer for usage tracking. - change (mediawiki...Wikibase)

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

Change subject: (Bug 47288) Abstraction layer for usage tracking.
..


(Bug 47288) Abstraction layer for usage tracking.

This introduces the EntityUsageIndex for tracking which client
 pages used which entity.

Change-Id: I50dbac5760ec5cb331d3372545f1eac4e53a19bd
---
M lib/WikibaseLib.classes.php
M lib/WikibaseLib.hooks.php
A lib/includes/store/EntityUsageIndex.php
A lib/tests/phpunit/store/EntityUsageIndexTest.php
4 files changed, 648 insertions(+), 0 deletions(-)

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



diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index 9bd68de..6dd483d 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -116,6 +116,7 @@
'Wikibase\ChunkAccess' = 'includes/store/ChunkAccess.php',
'Wikibase\EntityLookup' = 'includes/store/EntityLookup.php',
'Wikibase\PropertyLabelResolver' = 
'includes/store/PropertyLabelResolver.php',
+   'Wikibase\EntityUsageIndex' = 
'includes/store/EntityUsageIndex.php',
'Wikibase\SiteLinkCache' = 'includes/store/SiteLinkCache.php',
'Wikibase\SiteLinkLookup' = 
'includes/store/SiteLinkLookup.php',
'Wikibase\TermIndex' = 'includes/store/TermIndex.php',
diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 2bb2884..6df4241 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -63,6 +63,7 @@
'store/SiteLinkTable',
'store/WikiPageEntityLookup',
'store/CachingEntityLoader',
+   'store/EntityUsageIndex',
 
'store/TermPropertyLabelResolver',
 
diff --git a/lib/includes/store/EntityUsageIndex.php 
b/lib/includes/store/EntityUsageIndex.php
new file mode 100644
index 000..85ba5f4
--- /dev/null
+++ b/lib/includes/store/EntityUsageIndex.php
@@ -0,0 +1,183 @@
+?php
+
+namespace Wikibase;
+
+use Site;
+
+/**
+ * Index for tracking the usage of entities on a specific client wiki.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ *
+ *
+ * @author Daniel Kinzler
+ */
+class EntityUsageIndex {
+
+   /**
+* @param Site   $clientSite
+* @param SiteLinkLookup $siteLinks
+*/
+   public function __construct( Site $clientSite, SiteLinkLookup 
$siteLinks ) {
+   $this-clientSite = $clientSite;
+   $this-siteLinks = $siteLinks;
+   }
+
+   /**
+* Returns the Site of the client wiki this usage index is tracking.
+*
+* @since0.4
+*
+* @return Site
+*/
+   public function getClientSite() {
+   return $this-clientSite;
+   }
+
+   /**
+* Determines which pages use any of the given entities.
+*
+* @since0.4
+*
+* @param EntityId[] $entities
+*
+* @return String[] list of pages using any of the given entities
+*/
+   public function getEntityUsage( array $entities ) {
+   if ( empty( $entities ) ) {
+   return array();
+   }
+
+   $ids = array_map(
+   function ( EntityId $id ) {
+   return $id-getNumericId();
+   },
+   $entities
+   );
+
+   $rows = $this-siteLinks-getLinks( $ids, array( 
$this-clientSite-getGlobalId() ) ) ;
+
+   $pages = array_map(
+   function ( array $row ) {
+   return $row[1]; // page name
+   },
+   $rows
+   );
+
+   $pages = array_unique( $pages );
+   return $pages;
+   }
+
+   /**
+* Checks which of the given entities is used on the target wiki,
+* and removed all others.
+*
+* @since0.4
+*
+* @param EntityID[]  $entities The 

[MediaWiki-commits] [Gerrit] (bug 48145) EntityView support for TimeValue data values - change (mediawiki...Wikibase)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: (bug 48145) EntityView support for TimeValue data values
..


(bug 48145) EntityView support for TimeValue data values

Not nice but fits in with the current state of the ValueView. This is just for 
not having an
error thrown. The handling in the place has not been nice before.

Change-Id: I1f6dc90b952492756b3cc296cb4d41d7e512e646
---
M repo/includes/EntityView.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index 59e784f..a3b57ea 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -494,6 +494,11 @@
$value = 
$claim-getMainSnak()-getDataValue()-getValue();
}
 
+   // TODO: bad to have a switch for different 
data types here
+   if( $value instanceof \DataValues\TimeValue ) {
+   $value = $value-getTime();
+   }
+
$additionalCssClasses = '';
if ( $i++ === 0 ) {
$additionalCssClasses .= 'wb-first ';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f6dc90b952492756b3cc296cb4d41d7e512e646
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Introduction of valueview expert for time value handling - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Introduction of valueview expert for time value handling
..


Introduction of valueview expert for time value handling

* TimeInput expert responsible for handling the input of time. This will 
require some refactoring
  when adding advanced handling. Right now this is inheriting from StringValue 
which is kind of
  abuse of inheritance but allows a simple first implementation of editing and 
displaying time
  values.
* TimeValue expert which is a BifidExpert using the TimeInput expert and the 
StaticDomExpert.
* introduces a minor fix for the BifidExpert's valueCompare function.

For usage with Wikibase, this also requires I1f6dc90.

Change-Id: I6af96084c643ffb67fd3aa99bc9e039ccdfc55e1
---
M ValueView/ValueView.resources.mw.php
M ValueView/ValueView.resources.php
M ValueView/resources/jquery.valueview/valueview.BifidExpert.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.TimeInput.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
M ValueView/resources/mw.ext.valueView.js
6 files changed, 163 insertions(+), 2 deletions(-)

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



diff --git a/ValueView/ValueView.resources.mw.php 
b/ValueView/ValueView.resources.mw.php
index 55706dc..0f1d6b5 100644
--- a/ValueView/ValueView.resources.mw.php
+++ b/ValueView/ValueView.resources.mw.php
@@ -49,6 +49,7 @@
'dependencies' = array(
'jquery.valueview',
'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.timevalue',
'jquery.valueview.experts.commonsmediatype'
),
),
diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index e2a73f0..95c39be 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -174,6 +174,18 @@
),
),
 
+   'jquery.valueview.experts.timevalue' = $moduleTemplate + array(
+   'scripts' = array(
+   
'jquery.valueview/valueview.experts/experts.TimeInput.js',
+   
'jquery.valueview/valueview.experts/experts.TimeValue.js',
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.staticdom',
+   'jquery.valueview.BifidExpert',
+   'jquery.valueview.experts.stringvalue',
+   ),
+   ),
+
'jquery.valueview.experts.commonsmediatype' = $moduleTemplate 
+ array(
'scripts' = array(

'jquery.valueview/valueview.experts/experts.SuggestedStringValue.js',
diff --git a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js 
b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
index 04c0007..e95dae1 100644
--- a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
+++ b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
@@ -135,8 +135,8 @@
/**
 * @see jQuery.valueview.Expert.rawValueCompare
 */
-   rawValueCompare: function( rawValue ) {
-   return this._currentExpert.rawValueCompare( rawValue );
+   rawValueCompare: function( rawValue1, rawValue2 ) {
+   return this._currentExpert.rawValueCompare( rawValue1, 
rawValue2 );
},
 
/**
diff --git 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeInput.js 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeInput.js
new file mode 100644
index 000..1b1016d
--- /dev/null
+++ 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeInput.js
@@ -0,0 +1,89 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+( function( dv, vp, $, vv, Time ) {
+   'use strict';
+
+   // TODO: for now, we only serve a plain input. Later this expert should 
use a widget dedicated
+   //  to time input and therefore not require to inherit from the 
StringValue expert anymore.
+   var PARENT = vv.experts.StringValue;
+
+   /**
+* Valueview expert handling input of time values.
+*
+* @since 0.1
+*
+* @constructor
+* @extends jQuery.valueview.experts.StringValue
+*/
+   vv.experts.TimeInput = vv.expert( 'timeinput', PARENT, {
+   /**
+* @see Query.valueview.Expert.parser
+*/
+   parser: function() {
+   

[MediaWiki-commits] [Gerrit] Introducing jQuery.valueview.MockViewState - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Introducing jQuery.valueview.MockViewState
..


Introducing jQuery.valueview.MockViewState

ViewState for usage in future tests.
Also moves jQuery.valueview.ViewState into its own resource loader module.

Change-Id: I53063504c5bd29eceb57552ba2ad33a4f0738700
---
M ValueView/ValueView.resources.php
M ValueView/ValueView.tests.qunit.php
A ValueView/resources/jquery.valueview/valueview.MockViewState.js
A ValueView/tests/qunit/jquery.valueview/valueview.MockViewState.tests.js
4 files changed, 222 insertions(+), 2 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved



diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index 95c39be..aee0099 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -67,6 +67,24 @@
),
),
 
+   'jquery.valueview.ViewState' = $moduleTemplate + array(
+   'scripts' = array(
+   'jquery.valueview/valueview.ViewState.js',
+   ),
+   'dependencies' = array(
+   'jquery.valueview.base',
+   ),
+   ),
+
+   'jquery.valueview.MockViewState' = $moduleTemplate + array(
+   'scripts' = array(
+   'jquery.valueview/valueview.MockViewState.js',
+   ),
+   'dependencies' = array(
+   'jquery.valueview.ViewState',
+   ),
+   ),
+
// The actual valueview (vv) widget:
'jquery.valueview.valueview' = $moduleTemplate + array(
'scripts' = array(
@@ -79,6 +97,7 @@
'dependencies' = array(
'jquery.ui.widget',
'jquery.valueview.base',
+   'jquery.valueview.ViewState',
'jquery.valueview.experts', // because vv deals 
with ExpertFactory
'jquery.valueview.experts.unsupportedvalue', // 
for displaying unsupported values
'jquery.valueview.experts.emptyvalue', // for 
displaying empty values
diff --git a/ValueView/ValueView.tests.qunit.php 
b/ValueView/ValueView.tests.qunit.php
index c0bc370..81ebd1a 100644
--- a/ValueView/ValueView.tests.qunit.php
+++ b/ValueView/ValueView.tests.qunit.php
@@ -62,6 +62,16 @@
),
),
 
+   'jquery.valueview.MockViewState.tests' = array(
+   'scripts' = array(
+   
$bp/jquery.valueview/valueview.MockViewState.tests.js,
+   ),
+   'dependencies' = array(
+   'jquery.valueview.MockViewState',
+   'qunit.parameterize',
+   ),
+   ),
+
'jquery.valueview.ExpertFactory.tests' = array(
'scripts' = array(

$bp/jquery.valueview/valueview.ExpertFactory.tests.js,
@@ -69,9 +79,9 @@
'dependencies' = array(
'jquery.valueview.experts', // contains 
ExpertFactory
'jquery.valueview.experts.mock',
-   'qunit.parameterize'
+   'qunit.parameterize',
),
-   )
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.MockViewState.js 
b/ValueView/resources/jquery.valueview/valueview.MockViewState.js
new file mode 100644
index 000..fa3234d
--- /dev/null
+++ b/ValueView/resources/jquery.valueview/valueview.MockViewState.js
@@ -0,0 +1,56 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+jQuery.valueview.MockViewState = ( function( $, inherit, ViewState ) {
+   'use strict';
+
+   /**
+* Mock ViewState for usage in tests. Allows to inject the state as a 
plain object.
+*
+* @constructor
+* @extends jQuery.valueview.ViewState
+* @since 0.1
+*
+* @param {Object} [definition={}] A plain object with the fiels 
isInEditMode, isDisabled,
+*value and options. This will just keep a reference to the 
object, so changing the
+*object from the outside will also update the ViewState's 
functions return values.
+*/
+   return inherit( 'ValueviewMockViewState', ViewState, function ( 
definition ) {
+   if( definition !== undefined  !$.isPlainObject( 

[MediaWiki-commits] [Gerrit] Added test for valueview experts in general and StringValue ... - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Added test for valueview experts in general and StringValue 
expert specifically
..


Added test for valueview experts in general and StringValue expert specifically

Introduces jQuery.valueview.tests.testExpert which will test a Expert 
constructor on basis of a
given test definition. Added first expert test using this new function on the 
StringValue expert.
Fixes some minor issues and updates documentation of jQuery.valueview.Expert 
itself to pass the
new tests.

Change-Id: Ia681d6a8a31771cc000d5f1f423de25a77f6a6c2
---
M ValueView/ValueView.tests.qunit.php
M ValueView/resources/jquery.valueview/valueview.Expert.js
A 
ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.StringValue.tests.js
A ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
4 files changed, 437 insertions(+), 8 deletions(-)

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



diff --git a/ValueView/ValueView.tests.qunit.php 
b/ValueView/ValueView.tests.qunit.php
index 81ebd1a..25606d3 100644
--- a/ValueView/ValueView.tests.qunit.php
+++ b/ValueView/ValueView.tests.qunit.php
@@ -82,6 +82,25 @@
'qunit.parameterize',
),
),
+
+   'jquery.valueview.tests.testExpert.js' = array(
+   'scripts' = array(
+   
$bp/jquery.valueview/valueview.tests.testExpert.js,
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts',
+   'qunit.parameterize',
+   ),
+   ),
+
+   'jquery.valueview.experts.stringvalue.tests' = array(
+   'scripts' = array(
+   
$bp/jquery.valueview/valueview.experts/experts.StringValue.tests.js,
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.stringvalue',
+   ),
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.Expert.js 
b/ValueView/resources/jquery.valueview/valueview.Expert.js
index 4aed814..4579fc6 100644
--- a/ValueView/resources/jquery.valueview/valueview.Expert.js
+++ b/ValueView/resources/jquery.valueview/valueview.Expert.js
@@ -62,7 +62,8 @@
 * @param {dv.util.Notifier} [valueViewNotifier] Required so the expert 
can notify the valueview
 *about certain events. The following notification keys can be 
used:
 *- change: will be sent when raw value displayed by the expert 
changes. Either by a
-*  user action or by calling the rawValue() method.
+*  user action or by calling the rawValue() method. 
First parameter is a
+*  reference to the Expert itself.
 * @param {Object} [options={}]
 *
 * TODO: think about whether there should be a function to add multiple 
notifiers for widget
@@ -167,7 +168,7 @@
 * @since 0.1
 * @abstract
 *
-* @return valueParsers.Parser
+* @return valueParsers.ValueParser
 */
parser: function() {
return new vp.NullParser()
@@ -194,7 +195,8 @@
 * value, so basically, the expert itself will do the job of 
parsing itself somehow and does
 * not require an asynchronous job for doing so.
 * If the first parameter is set, then the function will set 
the value instead of returning
-* it. An incompatible value will be recognized as empty (same 
as null).
+* it. An incompatible value will be recognized as empty (same 
as null). If the given value
+* is different from the current one, change will be notified 
to the change notifier.
 *
 * @since 0.1
 *
@@ -203,13 +205,24 @@
 * Returns undefined if used as setter.
 */
rawValue: function( rawValue ) {
+   var currentRawValue = this._getRawValue();
+
if( rawValue === undefined ) { // GETTER:
-   return this._getRawValue();
+   return currentRawValue;
}
-   // SETTER:
-   this._setRawValue( rawValue );
-   this.draw();
-   this._viewNotifier.notify( 'change' );
+
+   // Only change value if different from current value:
+   if( !this.rawValueCompare( currentRawValue, 

[MediaWiki-commits] [Gerrit] Extends QUnit.parameterize to take a callback providing the ... - change (mediawiki...DataValues)

2013-05-08 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Extends QUnit.parameterize to take a callback providing the 
test cases
..


Extends QUnit.parameterize to take a callback providing the test cases

By providing a callback, the parameters provided to the tests will be created 
separately for each
test. This allows to provide instances which involve state without running into 
problems when
manipulating state in one test case but expecting initial state in another one.

NOTE: We should probably make a fork of jQuery.parameterize and import its 
tests, adjust them
  to properly run in our environment. Also renaming things, like 
QUnit.cases which should
  perhaps better be QUnit.provide.

This change set also changes some usage of QUnit.parameterize in our tests to 
use a callback now.

Change-Id: I18247a7a43c39c634745e9e925d846b060772927
---
M DataValues/resources/qunit.parameterize/qunit.parameterize.js
M ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
2 files changed, 29 insertions(+), 3 deletions(-)

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



diff --git a/DataValues/resources/qunit.parameterize/qunit.parameterize.js 
b/DataValues/resources/qunit.parameterize/qunit.parameterize.js
index 5fe90a4..24daae7 100644
--- a/DataValues/resources/qunit.parameterize/qunit.parameterize.js
+++ b/DataValues/resources/qunit.parameterize/qunit.parameterize.js
@@ -21,6 +21,15 @@
 QUnit.cases = ( function( QUnit ) {
'use strict';
 
+   /**
+* @param {[]|Function} testCases An Array (or a callback returning 
such an object) which
+*has to hold different Objects where each defines what will be 
passed to tests which
+*will be registered to the Object returned by the function. By 
providing a callback,
+*the parameters provided to the tests will be created 
separately for each test. This
+*allows to provide instances which involve state without 
running into problems when
+*manipulating state in one test case but expecting initial 
state in another one.
+* @return {Object}
+*/
return function(testCases) {
var createTest = function(methodName, title, expected, 
callback, parameters) {
QUnit[methodName](
@@ -38,8 +47,12 @@
expected = null;
}
 
-   for (var i = 0; i  testCases.length; ++i) {
-   var parameters = testCases[i];
+   var testTestCases = QUnit.is( function, testCases )
+   ? testCases()
+   : testCases;
+
+   for (var i = 0; i  testTestCases.length; ++i) {
+   var parameters = testTestCases[i];
 
var testCaseTitle = title;
if (parameters.title) {
diff --git 
a/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js 
b/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
index 32d1ef3..e7a333d 100644
--- a/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
+++ b/ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
@@ -99,7 +99,12 @@
return experts;
}
 
-   var expertCases = QUnit.cases( expertProvider() );
+   var expertCases = QUnit.cases(
+   // provide fresh instances for each test
+   function() {
+   return expertProvider();
+   }
+   );
 
expertCases.test( 'constructor', function( args, assert ) {
assert.ok(
@@ -164,6 +169,14 @@
);
} );
 
+   expertCases.test( 'rawValue: initial value', function( args, assert ) {
+   assert.equal(
+   args.expert.rawValue(),
+   null,
+   'newly initialized expert has no value (rawValue() 
returns null)'
+   );
+   } );
+
expertCases.test( 'rawValue: setting and getting raw value', function( 
args, assert ) {
var expert = args.expert;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18247a7a43c39c634745e9e925d846b060772927
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] (bug 44578) improved RDF mapping using schema.org - change (mediawiki...Wikibase)

2013-05-08 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: (bug 44578) improved RDF mapping using schema.org
..

(bug 44578) improved RDF mapping using schema.org

Change-Id: Ie05a67c810755cd19bb59ae133efcc0e76b717ef
---
M repo/includes/rdf/RdfBuilder.php
M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php
M repo/tests/phpunit/includes/rdf/RdfSerializerTest.php
3 files changed, 76 insertions(+), 20 deletions(-)


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

diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php
index 3557875..2267357 100755
--- a/repo/includes/rdf/RdfBuilder.php
+++ b/repo/includes/rdf/RdfBuilder.php
@@ -55,10 +55,10 @@
const NS_STATEMENT = 's'; // entity - statement
 
const NS_SKOS = 'skos'; // SKOS vocabulary
-   const NS_FOAF = 'foaf'; // FOAF vocabulary
+   const NS_SCHEMA_ORG = 'schema'; // schema.org vocabulary
 
const SKOS_URI = 'http://www.w3.org/2004/02/skos/core#';
-   const FOAF_URI = 'http://xmlns.com/foaf/0.1/';
+   const SCHEMA_ORG_URI = 'http://schema.org/';
 
const WIKIBASE_STATEMENT_QNAME = 'wikibase:Statement';
 
@@ -106,7 +106,7 @@
self::NS_QUALIFIER = $this-baseUri . '/qualifier/',
self::NS_STATEMENT = $this-baseUri . '/statement/',
self::NS_SKOS = self::SKOS_URI,
-   self::NS_FOAF = self::FOAF_URI,
+   self::NS_SCHEMA_ORG = self::SCHEMA_ORG_URI,
);
 
//XXX: Ugh, static. Should go into $this-graph.
@@ -197,6 +197,19 @@
}
 
/**
+* Gets a URL of the rdf description of the given entity
+*
+* @param EntityId $id
+*
+* @return string
+*/
+   public function getDataURL( EntityId $id ) {
+   $base = $this-namespaces[ self::NS_DATA ];
+   $url = $base . $this-idFormatter-format( $id );
+   return $url;
+   }
+
+   /**
 * Language filter
 *
 * @param $lang
@@ -240,9 +253,20 @@
public function addEntityMetaData( Entity $entity, Revision $rev = null 
) {
$entityResource = $this-getEntityResource( $entity-getId() );
$entityResource-addResource( 'rdf:type', 
$this-getEntityTypeQName( $entity-getType() ) );
-   $entityResource-addResource( 'foaf:primaryTopicOf', 
$this-getEntityQName( self::NS_DATA, $entity-getId() ) );
 
-   //TODO: revision timestamp, revision id, versioned data URI
+   $dataResource = $this-graph-resource( '#' ); // this 
document
+   $dataURL = $this-getDataURL( $entity-getId() );
+   $dataResource-addResource( self::NS_SCHEMA_ORG . ':about', 
$entityResource );
+   $dataResource-addResource( self::NS_SCHEMA_ORG . ':url', 
$dataURL );
+   $dataResource-addResource( 'rdf:type', self::NS_SCHEMA_ORG . 
:Dataset );
+
+   if ( $rev ) {
+   $dataResource-addLiteral( self::NS_SCHEMA_ORG . 
':version', $rev-getId() );
+   $dataResource-addLiteral( self::NS_SCHEMA_ORG . 
':dateModified', wfTimestamp( TS_ISO_8601, $rev-getTimestamp() ) );
+   //TODO: add support for date types to EasyRDF
+   }
+
+   //TODO: revision timestamp, revision id, versioned data URI, 
current-version-of
 
$this-entityResolved( $entity-getId() );
}
@@ -261,7 +285,8 @@
}
 
$entityResource-addLiteral( 'rdfs:label', $labelText, 
$languageCode );
-   $entityResource-addLiteral( 'skos:prefLabel', 
$labelText, $languageCode );
+   $entityResource-addLiteral( self::NS_SKOS . 
':prefLabel', $labelText, $languageCode );
+   $entityResource-addLiteral( self::NS_SCHEMA_ORG . 
':name', $labelText, $languageCode );
}
}
 
@@ -278,7 +303,7 @@
continue;
}
 
-   $entityResource-addLiteral( 'skos:note', $description, 
$languageCode );
+   $entityResource-addLiteral( self::NS_SCHEMA_ORG . 
':description', $description, $languageCode );
}
}
 
@@ -296,7 +321,7 @@
}
 
foreach ( $aliases as $alias ) {
-   $entityResource-addLiteral( 'skos:altLabel', 
$alias, $languageCode );
+   $entityResource-addLiteral( self::NS_SKOS . 
':altLabel', $alias, $languageCode );
}
}
}
@@ -320,7 +345,10 @@
//XXX: ideally, we'd use https if the target site 

[MediaWiki-commits] [Gerrit] (bug 48145) tests for TimeInput expert - change (mediawiki...DataValues)

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

Change subject: (bug 48145) tests for TimeInput expert
..


(bug 48145) tests for TimeInput expert

* also splits TimeInput and TimeValue expert's resource loader modules into two 
separate ones.
* minor documentation updates

Change-Id: Ied337b2c904ca8a43658956fd72df4cb88de6484
---
M ValueView/ValueView.resources.php
M ValueView/ValueView.tests.qunit.php
M ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
A 
ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
M ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
5 files changed, 54 insertions(+), 4 deletions(-)

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



diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index aee0099..9d475af 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -193,15 +193,23 @@
),
),
 
-   'jquery.valueview.experts.timevalue' = $moduleTemplate + array(
+   'jquery.valueview.experts.timeinput' = $moduleTemplate + array(
'scripts' = array(

'jquery.valueview/valueview.experts/experts.TimeInput.js',
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.stringvalue',
+   ),
+   ),
+
+   'jquery.valueview.experts.timevalue' = $moduleTemplate + array(
+   'scripts' = array(

'jquery.valueview/valueview.experts/experts.TimeValue.js',
),
'dependencies' = array(
'jquery.valueview.experts.staticdom',
'jquery.valueview.BifidExpert',
-   'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.timeinput',
),
),
 
diff --git a/ValueView/ValueView.tests.qunit.php 
b/ValueView/ValueView.tests.qunit.php
index 25606d3..ec23a07 100644
--- a/ValueView/ValueView.tests.qunit.php
+++ b/ValueView/ValueView.tests.qunit.php
@@ -101,6 +101,15 @@
'jquery.valueview.experts.stringvalue',
),
),
+
+   'jquery.valueview.experts.timeinput.tests' = array(
+   'scripts' = array(
+   
$bp/jquery.valueview/valueview.experts/experts.TimeInput.tests.js,
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.timeinput',
+   ),
+   ),
);
 
 } );
diff --git 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
index 129bd4d..c32e6e6 100644
--- 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
+++ 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.TimeValue.js
@@ -16,7 +16,7 @@
 * @since 0.1
 *
 * @constructor
-* @extends jQuery.valueview.experts.StringValue
+* @extends jQuery.valueview.experts.BifidExpert
 */
vv.experts.TimeValue = vv.expert( 'timevalue', PARENT, {
/**
diff --git 
a/ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
 
b/ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
new file mode 100644
index 000..481d5df
--- /dev/null
+++ 
b/ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.TimeInput.tests.js
@@ -0,0 +1,33 @@
+/**
+ * @since 0.1
+ * @ingroup ValueView
+ *
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+ ( function( $, QUnit, valueview, TimeParser ) {
+
+   'use strict';
+
+   var testExpert = valueview.tests.testExpert;
+
+   QUnit.module( 'jquery.valueview.experts.TimeInput' );
+
+   testExpert( {
+   expertConstructor: valueview.experts.TimeInput,
+   rawValues: {
+   valid: [
+   new time.Time( '1. April 1989' ),
+   new time.Time( '123 bce' ),
+   new time.Time( '1984' )
+   ],
+   unknown: 
testExpert.basicTestDefinition.rawValues.unknown.concat( [
+   42,
+   '1. 1984',
+   new time.Time( 'f - invalid time' )
+   ] )
+   },
+   

[MediaWiki-commits] [Gerrit] Do proper HTML preservation in ve.dm.MWReferenceListNode - change (mediawiki...VisualEditor)

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

Change subject: Do proper HTML preservation in ve.dm.MWReferenceListNode
..


Do proper HTML preservation in ve.dm.MWReferenceListNode

Store the HTML as a domElements array like everywhere else, rather than
as a string. Also disable HTML attribute preservation because there's
no point doing that when we're already preserving all of the HTML.

Also fixed a misnamed attribute (li li=foo -- li id=foo) in
the test case.

Change-Id: I36bf8bade8118e07a75eb6f3a2427a00ef4915d7
---
M modules/ve/dm/nodes/ve.dm.MWReferenceListNode.js
M modules/ve/test/dm/ve.dm.example.js
2 files changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/modules/ve/dm/nodes/ve.dm.MWReferenceListNode.js 
b/modules/ve/dm/nodes/ve.dm.MWReferenceListNode.js
index 4a387ea..adcd5e0 100644
--- a/modules/ve/dm/nodes/ve.dm.MWReferenceListNode.js
+++ b/modules/ve/dm/nodes/ve.dm.MWReferenceListNode.js
@@ -31,19 +31,19 @@
 
 ve.dm.MWReferenceListNode.static.matchRdfaTypes = [ 'mw:Object/References' ];
 
-ve.dm.MWReferenceListNode.static.toDataElement = function ( domElements ) {
-   var html = $( 'div', domElements[0].ownerDocument ).append( $( 
domElements ).clone() ).html();
+ve.dm.MWReferenceListNode.static.storeHtmlAttributes = false;
 
+ve.dm.MWReferenceListNode.static.toDataElement = function ( domElements ) {
return {
'type': this.name,
'attributes': {
-   'html': html
+   'domElements': ve.copyArray( domElements )
}
};
 };
 
-ve.dm.MWReferenceListNode.static.toDomElements = function ( dataElement, doc ) 
{
-   return [ doc.createElement( 'ol' ) ];
+ve.dm.MWReferenceListNode.static.toDomElements = function ( dataElement ) {
+   return dataElement.attributes.domElements;
 };
 
 /* Registration */
diff --git a/modules/ve/test/dm/ve.dm.example.js 
b/modules/ve/test/dm/ve.dm.example.js
index b0d6be8..4bcb1a9 100644
--- a/modules/ve/test/dm/ve.dm.example.js
+++ b/modules/ve/test/dm/ve.dm.example.js
@@ -1050,7 +1050,7 @@
'/span' +
'/p' +
'ol class=references 
typeof=mw:Object/References' +
-   'li li=cite_note-quux-2a 
href=#cite_ref-quux-2-0u2191/aQuux/li' +
+   'li id=cite_note-quux-2a 
href=#cite_ref-quux-2-0u2191/aQuux/li' +
'/ol' +
'/body',
'data': [
@@ -1119,9 +1119,7 @@
{
'type': 'MWreferenceList',
'attributes': {
-   'html': 'ol class=references 
typeof=mw:Object/Referencesli li=cite_note-quux-2a 
href=#cite_ref-quux-2-0u2191/aQuux/li/ol',
-   'html/0/class': 'references',
-   'html/0/typeof': 'mw:Object/References'
+   'domElements': $( 'ol 
class=references typeof=mw:Object/Referencesli id=cite_note-quux-2a 
href=#cite_ref-quux-2-0u2191/aQuux/li/ol' ).get()
}
},
{ 'type': '/MWreferenceList' },
@@ -1161,7 +1159,7 @@

'data-parsoid={quot;srcquot;:quot;refNo name/refquot;}' +
'/span' +
'/p' +
-   'ol class=references 
typeof=mw:Object/References/ol'
+   'ol class=references 
typeof=mw:Object/Referencesli id=cite_note-quux-2a 
href=#cite_ref-quux-2-0u2191/aQuux/li/ol'
},
'paragraph with alienInline inside': {
'html': 'bodypatt class=foob/ttc/p/body',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36bf8bade8118e07a75eb6f3a2427a00ef4915d7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Esanders esand...@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 47288) Use EntityUsageIndex on the client. - change (mediawiki...Wikibase)

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

Change subject: (Bug 47288) Use EntityUsageIndex on the client.
..


(Bug 47288) Use EntityUsageIndex on the client.

This also overhauls the way the SiteLinkTable is used, for
consistency.

Change-Id: Ide20d01f2c38047e6a640f1b3910df3b3cc9e69a
---
M client/includes/ChangeHandler.php
M client/includes/WikibaseLibrary.php
M client/includes/parserhooks/NoLangLinkHandler.php
M client/includes/parserhooks/PropertyParserFunction.php
M client/includes/store/ClientStore.php
M client/includes/store/sql/CachingSqlStore.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/includes/ChangeHandlerTest.php
M lib/tests/phpunit/store/EntityUsageIndexTest.php
M lib/tests/phpunit/store/SiteLinkLookupTest.php
10 files changed, 154 insertions(+), 28 deletions(-)

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



diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 0df9c64..3f3a627 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -108,7 +108,7 @@
 
public function __construct( PageUpdater $updater = null,
EntityLookup $entityLookup = null,
-   SiteLinkLookup $siteLinkLookup = null,
+   EntityUsageIndex $entityUsageIndex = null,
\Site $localSite = null ) {
 
wfProfileIn( __METHOD__ );
@@ -123,8 +123,8 @@
$entityLookup = 
WikibaseClient::getDefaultInstance()-getStore()-getEntityLookup();
}
 
-   if ( !$siteLinkLookup ) {
-   $siteLinkLookup = 
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable();
+   if ( !$entityUsageIndex ) {
+   $entityUsageIndex = 
WikibaseClient::getDefaultInstance()-getStore()-getEntityUsageIndex();
}
 
if ( !$localSite ) {
@@ -140,7 +140,7 @@
$this-site = $localSite;
$this-updater = $updater;
$this-entityLookup = $entityLookup;
-   $this-siteLinkLookup = $siteLinkLookup;
+   $this-entityUsageIndex = $entityUsageIndex;
 
// TODO: allow these to be passed in as parameters!
$this-setNamespaces(
@@ -549,15 +549,12 @@
if ( $change instanceof ItemChange ) {
// update local pages connected to a relevant data item.
 
-   $itemId = $change-getEntityId()-getNumericId();
+   $itemId = $change-getEntityId();
 
$siteGlobalId = $this-site-getGlobalId();
 
-   // @todo: getLinks is a bit ugly, need a getter for a 
pair of item id + site key
-   $siteLinks = $this-siteLinkLookup-getLinks( array( 
$itemId ), array( $siteGlobalId ) );
-   if ( !empty( $siteLinks ) ) {
-   $pagesToUpdate[] = $siteLinks[0][1];
-   }
+   $usedOnPages = $this-entityUsageIndex-getEntityUsage( 
array( $itemId ) );
+   $pagesToUpdate = array_merge( $pagesToUpdate, 
$usedOnPages );
 
// if an item's sitelinks change, update the old and 
the new target
$siteLinkDiff = ( $change instanceof ItemChange ) ? 
$change-getSiteLinkDiff() : null;
diff --git a/client/includes/WikibaseLibrary.php 
b/client/includes/WikibaseLibrary.php
index 96eb9bb..8039c60 100644
--- a/client/includes/WikibaseLibrary.php
+++ b/client/includes/WikibaseLibrary.php
@@ -94,7 +94,7 @@
public function getEntityId( $pageTitle = null ) {
$this-checkType( 'getEntityByTitle', 1, $pageTitle, 'string' );
$globalSiteId = \Wikibase\Settings::get( 'siteGlobalID' );
-   $table = WikibaseClient::getDefaultInstance()-getStore( 
'sqlstore' )-newSiteLinkTable();
+   $table = 
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable();
if ( $table == null ) {
return array( null );
}
diff --git a/client/includes/parserhooks/NoLangLinkHandler.php 
b/client/includes/parserhooks/NoLangLinkHandler.php
index 9008e36..e81608d 100644
--- a/client/includes/parserhooks/NoLangLinkHandler.php
+++ b/client/includes/parserhooks/NoLangLinkHandler.php
@@ -48,7 +48,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable(),
\Sites::singleton()
);
 

[MediaWiki-commits] [Gerrit] more prints converted to stderr writes in main dump script - change (operations/dumps)

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

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


Change subject: more prints converted to stderr writes in main dump script
..

more prints converted to stderr writes in main dump script

Change-Id: Iee9c09e0c893809637cd2f4ca68929dbc4a5cbc1
---
M xmldumps-backup/worker.py
1 file changed, 25 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/05/62805/1

diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 76b6e6f..08c3816 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -378,8 +378,8 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print 
repr(traceback.format_exception(exc_type, exc_value, exc_traceback))
-   print Couldn't save dump run info file. 
Continuing anyways
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
+   sys.stderr.write(Couldn't save dump run info 
file. Continuing anyways\n)
 
def statusOfOldDumpIsDone(self, runner, date, jobName, jobDesc):
oldDumpRunInfoFilename=self._getDumpRunInfoFileName(date)
@@ -416,7 +416,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
return False
 
#
@@ -490,7 +490,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
return None
 
# find desc in there, look for class='done'
@@ -518,7 +518,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
return None
 
 
@@ -740,12 +740,12 @@
return True
if job == noop or job == latestlinks:
return True
-   print No job of the name specified exists. Choose one of the 
following:
-   print noop (runs no job but rewrites md5sums file and resets 
latest links)
-   print latestlinks (runs no job but resets latest links)
-   print tables (includes all items below that end in 'table')
+   sys.stderr.write(No job of the name specified exists. Choose 
one of the following:\n)
+   sys.stderr.write(noop (runs no job but rewrites md5sums file 
and resets latest links)\n)
+   sys.stderr.write(latestlinks (runs no job but resets latest 
links)\n)
+   sys.stderr.write(tables (includes all items below that end in 
'table')\n)
for item in self.dumpItems:
-   print %s  % item.name()
+   sys.stderr.write(%s\n % item.name())
return False
 
def markFollowingJobsToRun(self):
@@ -1343,7 +1343,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
raise BackupError(failed to rename file %s % 
self.filename)
 
self.filename = os.path.join(self.dirname,newname)
@@ -1411,12 +1411,12 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
message = Couldn't update status files. Continuing 

[MediaWiki-commits] [Gerrit] more prints converted to stderr writes in main dump script - change (operations/dumps)

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

Change subject: more prints converted to stderr writes in main dump script
..


more prints converted to stderr writes in main dump script

Change-Id: Iee9c09e0c893809637cd2f4ca68929dbc4a5cbc1
---
M xmldumps-backup/worker.py
1 file changed, 25 insertions(+), 25 deletions(-)

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



diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 76b6e6f..08c3816 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -378,8 +378,8 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print 
repr(traceback.format_exception(exc_type, exc_value, exc_traceback))
-   print Couldn't save dump run info file. 
Continuing anyways
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
+   sys.stderr.write(Couldn't save dump run info 
file. Continuing anyways\n)
 
def statusOfOldDumpIsDone(self, runner, date, jobName, jobDesc):
oldDumpRunInfoFilename=self._getDumpRunInfoFileName(date)
@@ -416,7 +416,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
return False
 
#
@@ -490,7 +490,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
return None
 
# find desc in there, look for class='done'
@@ -518,7 +518,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
return None
 
 
@@ -740,12 +740,12 @@
return True
if job == noop or job == latestlinks:
return True
-   print No job of the name specified exists. Choose one of the 
following:
-   print noop (runs no job but rewrites md5sums file and resets 
latest links)
-   print latestlinks (runs no job but resets latest links)
-   print tables (includes all items below that end in 'table')
+   sys.stderr.write(No job of the name specified exists. Choose 
one of the following:\n)
+   sys.stderr.write(noop (runs no job but rewrites md5sums file 
and resets latest links)\n)
+   sys.stderr.write(latestlinks (runs no job but resets latest 
links)\n)
+   sys.stderr.write(tables (includes all items below that end in 
'table')\n)
for item in self.dumpItems:
-   print %s  % item.name()
+   sys.stderr.write(%s\n % item.name())
return False
 
def markFollowingJobsToRun(self):
@@ -1343,7 +1343,7 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
raise BackupError(failed to rename file %s % 
self.filename)
 
self.filename = os.path.join(self.dirname,newname)
@@ -1411,12 +1411,12 @@
except:
if (self.verbose):
exc_type, exc_value, exc_traceback = 
sys.exc_info()
-   print repr(traceback.format_exception(exc_type, 
exc_value, exc_traceback))
+   
sys.stderr.write(repr(traceback.format_exception(exc_type, exc_value, 
exc_traceback)))
message = Couldn't update status files. Continuing 
anyways
if 

[MediaWiki-commits] [Gerrit] Fix access to SiteLinkTable in client hooks - change (mediawiki...Wikibase)

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

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


Change subject: Fix access to SiteLinkTable in client hooks
..

Fix access to SiteLinkTable in client hooks

Change-Id: If3bcbfe0e5d1d8b763d3ef68897f5d7156cf8684
---
M client/WikibaseClient.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 47bcce9..dd5c93b 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -180,7 +180,7 @@
 * @return bool
 */
public static function onSpecialMovepageAfterMove( \MovePageForm 
$movePage, \Title $oldTitle, \Title $newTitle ) {
-   $siteLinkCache = 
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable();
+   $siteLinkCache = 
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable();
$globalId = Settings::get( 'siteGlobalID' );
$itemId = $siteLinkCache-getItemIdForLink(
$globalId,
@@ -376,7 +376,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable(),
\Sites::singleton() );
 
$useRepoLinks = $langLinkHandler-useRepoLinks( 
$parser-getTitle(), $parser-getOutput() );
@@ -462,7 +462,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable(),
\Sites::singleton() );
 
$noExternalLangLinks = 
$langLinkHandler-getNoExternalLangLinks( $pout );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3bcbfe0e5d1d8b763d3ef68897f5d7156cf8684
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] Fix access to SiteLinkTable in client hooks - change (mediawiki...Wikibase)

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

Change subject: Fix access to SiteLinkTable in client hooks
..


Fix access to SiteLinkTable in client hooks

Change-Id: If3bcbfe0e5d1d8b763d3ef68897f5d7156cf8684
---
M client/WikibaseClient.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 47bcce9..dd5c93b 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -180,7 +180,7 @@
 * @return bool
 */
public static function onSpecialMovepageAfterMove( \MovePageForm 
$movePage, \Title $oldTitle, \Title $newTitle ) {
-   $siteLinkCache = 
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable();
+   $siteLinkCache = 
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable();
$globalId = Settings::get( 'siteGlobalID' );
$itemId = $siteLinkCache-getItemIdForLink(
$globalId,
@@ -376,7 +376,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable(),
\Sites::singleton() );
 
$useRepoLinks = $langLinkHandler-useRepoLinks( 
$parser-getTitle(), $parser-getOutput() );
@@ -462,7 +462,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-getSiteLinkTable(),
\Sites::singleton() );
 
$noExternalLangLinks = 
$langLinkHandler-getNoExternalLangLinks( $pout );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3bcbfe0e5d1d8b763d3ef68897f5d7156cf8684
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@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] (bug 36325) Direction (ltr/rtl) of feedback comments may be ... - change (mediawiki...ArticleFeedbackv5)

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

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


Change subject: (bug 36325) Direction (ltr/rtl) of feedback comments may be 
different from the direction of the interface language
..

(bug 36325) Direction (ltr/rtl) of feedback comments may be different from the 
direction of the interface language

Bug: 36325
Change-Id: Ifd7c812637bd31e1bbb5784969030fa403efb22f
---
M ArticleFeedbackv5.render.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/ArticleFeedbackv5.render.php b/ArticleFeedbackv5.render.php
index 55e7a12..b06a97d 100644
--- a/ArticleFeedbackv5.render.php
+++ b/ArticleFeedbackv5.render.php
@@ -550,7 +550,7 @@
return
Html::rawElement(
'blockquote',
-   array(),
+   array( 'dir' = 'auto' ),
$short .
$fullLengthToggle
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd7c812637bd31e1bbb5784969030fa403efb22f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
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] Fix bootstrap in unit tests - change (mediawiki/core)

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

Change subject: Fix bootstrap in unit tests
..


Fix bootstrap in unit tests

- Remove check for version, that version is already enforced in phpunit.php,
  so there is not point showing a warning for it is useless
- Remove call to MessageCache::destroyInstance(), there is no need for it,
  since $wgMessageCacheType is set in phpunit.php before running Setup.php
- Remove includes of bootstrap.php in LanguageSrTest.php and LanguageUzTest.php

Change-Id: I4b2db6b3e6f001175e1a407c5add2972aade5e60
---
M tests/phpunit/bootstrap.php
M tests/phpunit/languages/LanguageSrTest.php
M tests/phpunit/languages/LanguageUzTest.php
3 files changed, 0 insertions(+), 21 deletions(-)

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



diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php
index 3978b8d..ea8387c 100644
--- a/tests/phpunit/bootstrap.php
+++ b/tests/phpunit/bootstrap.php
@@ -13,20 +13,3 @@
 EOF;
require_once( __DIR__ . /phpunit.php );
 }
-
-// Output a notice when running with older versions of PHPUnit
-if ( version_compare( PHPUnit_Runner_Version::id(), 3.6.7,  ) ) {
-   echo EOF
-
-
-These tests run best with version PHPUnit 3.6.7 or better. Earlier versions may
-show failures because earlier versions of PHPUnit do not properly implement
-dependencies.
-
-
-
-EOF;
-}
-
-/** @todo Check if this is really needed */
-MessageCache::destroyInstance();
diff --git a/tests/phpunit/languages/LanguageSrTest.php 
b/tests/phpunit/languages/LanguageSrTest.php
index 11d00f3..40d14e3 100644
--- a/tests/phpunit/languages/LanguageSrTest.php
+++ b/tests/phpunit/languages/LanguageSrTest.php
@@ -12,8 +12,6 @@
  * @file
  */
 
-require_once dirname( __DIR__ ) . '/bootstrap.php';
-
 /** Tests for MediaWiki languages/LanguageSr.php */
 class LanguageSrTest extends LanguageClassesTestCase {
function testEasyConversions() {
diff --git a/tests/phpunit/languages/LanguageUzTest.php 
b/tests/phpunit/languages/LanguageUzTest.php
index 495c0be..8ee95b7 100644
--- a/tests/phpunit/languages/LanguageUzTest.php
+++ b/tests/phpunit/languages/LanguageUzTest.php
@@ -12,8 +12,6 @@
  * @file
  */
 
-require_once dirname( __DIR__ ) . '/bootstrap.php';
-
 /** Tests for MediaWiki languages/LanguageUz.php */
 class LanguageUzTest extends LanguageClassesTestCase {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b2db6b3e6f001175e1a407c5add2972aade5e60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@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 35288) the message articlefeedbackv5-disable-flyover-he... - change (mediawiki...ArticleFeedbackv5)

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

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


Change subject: (bug 35288) the message 
articlefeedbackv5-disable-flyover-help-location is poorly placed and not needed 
anyway
..

(bug 35288) the message articlefeedbackv5-disable-flyover-help-location is 
poorly placed and not needed anyway

Bug: 35288
Change-Id: I195eb8e19818ad4564da0d8c3216a1544c6f8138
---
M ArticleFeedbackv5.i18n.php
M ArticleFeedbackv5.php
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
3 files changed, 12 insertions(+), 19 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 
refs/changes/08/62808/1

diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php
index ce7bbfd..a6338ea 100644
--- a/ArticleFeedbackv5.i18n.php
+++ b/ArticleFeedbackv5.i18n.php
@@ -701,9 +701,7 @@
 
/* Front-end: feedback link close button */
'articlefeedbackv5-disable-flyover-title' = 'Remove this tool?',
-   'articlefeedbackv5-disable-flyover-help' = 'To remove $1, go to $2 and 
check $3',
-   'articlefeedbackv5-disable-flyover-help-emphasis-text' = 'Article 
Feedback',
-   'articlefeedbackv5-disable-flyover-help-location' = 'My preferences  
Appearance',
+   'articlefeedbackv5-disable-flyover-help-message' = 'To remove Article 
Feedback, go to $1  $2 and check $3',
'articlefeedbackv5-disable-flyover-prefbutton' = 'Go to my 
preferences',
 
/* Custom AbuseFilter actions */
@@ -2094,16 +2092,12 @@
 * $3 – URL directly to feedback location
 * $4 – The help link',
'articlefeedbackv5-disable-flyover-title' = 'Title of the tooltip that 
pops up when you click the close button on a feedback trigger link, explaining 
how to remove the Article Feedback tool',
-   'articlefeedbackv5-disable-flyover-help' = 'Help text for the tooltip 
that pops up when you click the close button on a feedback trigger link, 
explaining how to remove the Article Feedback tool.
+   'articlefeedbackv5-disable-flyover-help-message' = 'Help text for the 
tooltip that pops up when you click the close button on a feedback trigger 
link, explaining how to remove the Article Feedback tool.
 
 Parameters:
-* $1 - Emphasized name of the tool 
({{msg-mw|articlefeedbackv5-disable-flyover-help-emphasis-text}})
-* $2 - The location of the preference panel 
({{msg-mw|articlefeedbackv5-disable-flyover-help-location}})
-* $3 - The label of the checkbox ( 
{{msg-mw|articlefeedbackv5-disable-preference}})',
-   'articlefeedbackv5-disable-flyover-help-emphasis-text' = 'The emphasis 
text for {{msg-mw|articlefeedbackv5-disable-flyover-help}} (the name of the 
tool)',
-   'articlefeedbackv5-disable-flyover-help-location' = 'A short 
indication of where to go to change your Article Feedback preferences, inside 
{{msg-mw|articlefeedbackv5-disable-flyover-help}}.
-
-It must be: {{msg-mw|mypreferences}}  {{msg-mw|prefs-rendering}}',
+* $1 - Reference to preferences: {{msg-mw|mypreferences}}
+* $2 - Reference to the preference\'s appearance panel: 
{{msg-mw|prefs-rendering}}
+* $3 - The label of the checkbox: 
{{msg-mw|articlefeedbackv5-disable-preference}}',
'articlefeedbackv5-disable-flyover-prefbutton' = 'The text of the big 
glossy button used to send the user to their preferences in the tooltip that 
pops up when you click the close button on a feedback trigger link, explaining 
how to remove the Article Feedback tool',
'abusefilter-edit-action-aftv5flagabuse' = 'The text for the checkbox 
used by Special:AbuseFilter to indicate that a rule should result in the 
feedback being auto-flagged as abuse',
'articlefeedbackv5-abusefilter-note-aftv5flagabuse' = 'The note to add 
to the activity log when auto-flagging a new feedback post as abuse 
(code$1/code is the name of the filter)',
diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php
index 0cae785..31fb0a1 100644
--- a/ArticleFeedbackv5.php
+++ b/ArticleFeedbackv5.php
@@ -673,13 +673,12 @@
'articlefeedbackv5-help-transparency-terms',
'parentheses',
'articlefeedbackv5-disable-flyover-title',
-   'articlefeedbackv5-disable-flyover-help',
-   'articlefeedbackv5-disable-flyover-help-emphasis-text',
-   'articlefeedbackv5-disable-flyover-help-location',
-   'articlefeedbackv5-disable-flyover-help-direction',
+   'articlefeedbackv5-disable-flyover-help-message',
'articlefeedbackv5-disable-flyover-prefbutton',
'articlefeedbackv5-disable-preference',
'pipe-separator',
+   'mypreferences',
+   'prefs-rendering',
),
'dependencies' = array(
'jquery.appear',
diff --git a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js 

[MediaWiki-commits] [Gerrit] Update check blacklist - change (translatewiki)

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

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


Change subject: Update check blacklist
..

Update check blacklist

Spotted by Base in
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Mw-core-1.20-logentry-delete-delete/uk

Change-Id: I06dd129dde98b0fcf2c3302a37db5dbb0eb2891c
---
M groups/check-blacklist.php
1 file changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/09/62809/1

diff --git a/groups/check-blacklist.php b/groups/check-blacklist.php
index 00f6fc6..2c26756 100644
--- a/groups/check-blacklist.php
+++ b/groups/check-blacklist.php
@@ -86,6 +86,32 @@
),
 ),
 array(
+   'group' = 'core-1.19',
+   'check' = 'variable',
+   'message' = array(
+   'mw-core-1.19-logentry-newusers-create2', // Optional GENDER 
parameter
+   'mw-core-1.19-logentry-move-move redir-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.19-logentry-move-move redir', // Optional GENDER 
parameter
+   'mw-core-1.19-logentry-move-move-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.19-logentry-move-move', // Optional GENDER parameter
+   'mw-core-1.19-logentry-delete-restore', // Optional GENDER 
parameter
+   'mw-core-1.19-logentry-delete-delete', // Optional GENDER 
parameter
+   ),
+),
+array(
+   'group' = 'core-1.20',
+   'check' = 'variable',
+   'message' = array(
+   'mw-core-1.20-logentry-newusers-create2', // Optional GENDER 
parameter
+   'mw-core-1.20-logentry-move-move redir-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.20-logentry-move-move redir', // Optional GENDER 
parameter
+   'mw-core-1.20-logentry-move-move-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.20-logentry-move-move', // Optional GENDER parameter
+   'mw-core-1.20-logentry-delete-restore', // Optional GENDER 
parameter
+   'mw-core-1.20-logentry-delete-delete', // Optional GENDER 
parameter
+   ),
+),
+array(
'group' = 'core',
'check' = 'plural',
'message' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06dd129dde98b0fcf2c3302a37db5dbb0eb2891c
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] Update check blacklist - change (translatewiki)

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

Change subject: Update check blacklist
..


Update check blacklist

Spotted by Base in
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Mw-core-1.20-logentry-delete-delete/uk

Change-Id: I06dd129dde98b0fcf2c3302a37db5dbb0eb2891c
---
M groups/check-blacklist.php
1 file changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/groups/check-blacklist.php b/groups/check-blacklist.php
index 00f6fc6..2c26756 100644
--- a/groups/check-blacklist.php
+++ b/groups/check-blacklist.php
@@ -86,6 +86,32 @@
),
 ),
 array(
+   'group' = 'core-1.19',
+   'check' = 'variable',
+   'message' = array(
+   'mw-core-1.19-logentry-newusers-create2', // Optional GENDER 
parameter
+   'mw-core-1.19-logentry-move-move redir-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.19-logentry-move-move redir', // Optional GENDER 
parameter
+   'mw-core-1.19-logentry-move-move-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.19-logentry-move-move', // Optional GENDER parameter
+   'mw-core-1.19-logentry-delete-restore', // Optional GENDER 
parameter
+   'mw-core-1.19-logentry-delete-delete', // Optional GENDER 
parameter
+   ),
+),
+array(
+   'group' = 'core-1.20',
+   'check' = 'variable',
+   'message' = array(
+   'mw-core-1.20-logentry-newusers-create2', // Optional GENDER 
parameter
+   'mw-core-1.20-logentry-move-move redir-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.20-logentry-move-move redir', // Optional GENDER 
parameter
+   'mw-core-1.20-logentry-move-move-noredirect', // Optional 
GENDER parameter
+   'mw-core-1.20-logentry-move-move', // Optional GENDER parameter
+   'mw-core-1.20-logentry-delete-restore', // Optional GENDER 
parameter
+   'mw-core-1.20-logentry-delete-delete', // Optional GENDER 
parameter
+   ),
+),
+array(
'group' = 'core',
'check' = 'plural',
'message' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06dd129dde98b0fcf2c3302a37db5dbb0eb2891c
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@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 from upstream - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Update from upstream
..

Update from upstream

Bug: 43904
Change-Id: I34e8ad3e82ffa23f03b5ddf25e92d850991abb43
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 17 insertions(+), 17 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/10/62810/1

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index dc1d2a4..f93db47 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1,4 +1,4 @@
-/*! jquery.ime - v0.1.0 - 2013-05-06
+/*! jquery.ime - v0.1.0 - 2013-05-08
 * https://github.com/wikimedia/jquery.ime
 * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
 ( function ( $ ) {
@@ -396,8 +396,22 @@
newLines,
scrollTop;
 
-   if ( document.body.createTextRange ) {
-   // IE
+   if ( typeof element.selectionStart === 'number'  typeof 
element.selectionEnd === 'number' ) {
+   // IE9+ and all other browsers
+   scrollTop = element.scrollTop;
+
+   // This could be made better if range selection worked 
on browsers.
+   // But for complex scripts, browsers place cursor in 
unexpected places
+   // and it's not possible to fix cursor programmatically.
+   // Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
+   element.value = element.value.substring( 0, start ) + 
replacement
+   + element.value.substring( end, 
element.value.length );
+   // restore scroll
+   element.scrollTop = scrollTop;
+   // set selection
+   element.selectionStart = element.selectionEnd = start + 
replacement.length;
+   } else {
+   // IE8 and lower
selection = rangeForElementIE(element);
length = element.value.length;
// IE doesn't count \n when computing the offset, so we 
won't either
@@ -413,20 +427,6 @@
selection.text = replacement;
selection.collapse( false );
selection.select();
-   } else {
-   // All other browsers
-   scrollTop = element.scrollTop;
-
-   // This could be made better if range selection worked 
on browsers.
-   // But for complex scripts, browsers place cursor in 
unexpected places
-   // and it's not possible to fix cursor programmatically.
-   // Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
-   element.value = element.value.substring( 0, start ) + 
replacement
-   + element.value.substring( end, 
element.value.length );
-   // restore scroll
-   element.scrollTop = scrollTop;
-   // set selection
-   element.selectionStart = element.selectionEnd = start + 
replacement.length;
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34e8ad3e82ffa23f03b5ddf25e92d850991abb43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Update from upstream - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update from upstream
..


Update from upstream

Bug: 43904
Change-Id: I34e8ad3e82ffa23f03b5ddf25e92d850991abb43
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index dc1d2a4..f93db47 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1,4 +1,4 @@
-/*! jquery.ime - v0.1.0 - 2013-05-06
+/*! jquery.ime - v0.1.0 - 2013-05-08
 * https://github.com/wikimedia/jquery.ime
 * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
 ( function ( $ ) {
@@ -396,8 +396,22 @@
newLines,
scrollTop;
 
-   if ( document.body.createTextRange ) {
-   // IE
+   if ( typeof element.selectionStart === 'number'  typeof 
element.selectionEnd === 'number' ) {
+   // IE9+ and all other browsers
+   scrollTop = element.scrollTop;
+
+   // This could be made better if range selection worked 
on browsers.
+   // But for complex scripts, browsers place cursor in 
unexpected places
+   // and it's not possible to fix cursor programmatically.
+   // Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
+   element.value = element.value.substring( 0, start ) + 
replacement
+   + element.value.substring( end, 
element.value.length );
+   // restore scroll
+   element.scrollTop = scrollTop;
+   // set selection
+   element.selectionStart = element.selectionEnd = start + 
replacement.length;
+   } else {
+   // IE8 and lower
selection = rangeForElementIE(element);
length = element.value.length;
// IE doesn't count \n when computing the offset, so we 
won't either
@@ -413,20 +427,6 @@
selection.text = replacement;
selection.collapse( false );
selection.select();
-   } else {
-   // All other browsers
-   scrollTop = element.scrollTop;
-
-   // This could be made better if range selection worked 
on browsers.
-   // But for complex scripts, browsers place cursor in 
unexpected places
-   // and it's not possible to fix cursor programmatically.
-   // Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
-   element.value = element.value.substring( 0, start ) + 
replacement
-   + element.value.substring( end, 
element.value.length );
-   // restore scroll
-   element.scrollTop = scrollTop;
-   // set selection
-   element.selectionStart = element.selectionEnd = start + 
replacement.length;
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34e8ad3e82ffa23f03b5ddf25e92d850991abb43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: 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] Small cleanups - change (mediawiki...Translate)

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

Change subject: Small cleanups
..


Small cleanups

Class opened - open
Overtly specific selector

Change-Id: I3b73afd471c1be402264497f7a7c527a5aa35a89
---
M resources/js/ext.translate.groupselector.js
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/resources/js/ext.translate.groupselector.js 
b/resources/js/ext.translate.groupselector.js
index bb43ab7..391526d 100644
--- a/resources/js/ext.translate.groupselector.js
+++ b/resources/js/ext.translate.groupselector.js
@@ -106,13 +106,13 @@
 */
show: function () {
// Hide all other open menus
-   $( '.ext-translate-msggroup-selector-menu.opened' )
-   .removeClass( 'opened' )
+   $( '.ext-translate-msggroup-selector-menu.open' )
+   .removeClass( 'open' )
.hide();
-   this.$menu.addClass( 'opened' ).show();
+   this.$menu.addClass( 'open' ).show();
this.position();
// Keep the focus in the message group search box.
-   this.$menu.find( 
'input.ext-translate-msggroup-search-input' ).focus();
+   this.$menu.find( '.ext-translate-msggroup-search-input' 
).focus();
},
 
/**
@@ -120,14 +120,14 @@
 */
hide: function () {
this.$menu.hide();
-   this.$menu.removeClass( 'opened' );
+   this.$menu.removeClass( 'open' );
},
 
/**
 * Toggle the menu open/close state
 */
toggle: function () {
-   if ( this.$menu.hasClass( 'opened' ) ) {
+   if ( this.$menu.hasClass( 'open' ) ) {
this.hide();
} else {
this.show();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b73afd471c1be402264497f7a7c527a5aa35a89
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@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] (bug 46751) Make Buryat (Russia) (буряад) (bxr) fallback to ... - change (mediawiki/core)

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

Change subject: (bug 46751) Make Buryat (Russia) (буряад) (bxr) fallback to 
Russian
..


(bug 46751) Make Buryat (Russia) (буряад) (bxr) fallback to Russian

See bug for details.

Change-Id: Ib017991214955d214710419e10cdfc89c744
---
M RELEASE-NOTES-1.22
A languages/messages/MessagesBxr.php
2 files changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Wizardist: Looks good to me, but someone else must approve
  Nikerabbit: Looks good to me, approved
  MF-Warburg: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index ce4c949..01a45fb 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -100,6 +100,8 @@
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Bugzilla reports.
 
+* (bug 46751) Made Buryat (Russia) (буряад) (bxr) fallback to Russian.
+
 === Other changes in 1.22 ===
 * redirect.php was removed. It was unused.
 * ClickTracking integration was dropped from the mediaWiki.user.bucket
diff --git a/languages/messages/MessagesBxr.php 
b/languages/messages/MessagesBxr.php
new file mode 100644
index 000..215061c
--- /dev/null
+++ b/languages/messages/MessagesBxr.php
@@ -0,0 +1,13 @@
+?php
+/** Buryat (Russia) (буряад)
+ *
+ * See MessagesQqq.php for message documentation incl. usage of parameters
+ * To improve a translation please visit http://translatewiki.net
+ *
+ * @ingroup Language
+ * @file
+ * @comment falls back to Russian
+ *
+ */
+
+$fallback = 'ru';
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib017991214955d214710419e10cdfc89c744
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: MF-Warburg mfwarb...@googlemail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: SPQRobin robinp.1...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Wizardist p.selits...@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] Rename this.$group to this.$trigger for clarity - change (mediawiki...Translate)

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

Change subject: Rename this.$group to this.$trigger for clarity
..


Rename this.$group to this.$trigger for clarity

Change-Id: I2706f12b09d345d347c810fb8d0781d7932e7db3
---
M resources/js/ext.translate.groupselector.js
1 file changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/resources/js/ext.translate.groupselector.js 
b/resources/js/ext.translate.groupselector.js
index 391526d..f21b230 100644
--- a/resources/js/ext.translate.groupselector.js
+++ b/resources/js/ext.translate.groupselector.js
@@ -8,7 +8,7 @@
 *  - language: language for statistics.
 */
function TranslateMessageGroupSelector( element, options ) {
-   this.$group = $( element );
+   this.$trigger = $( element );
this.$menu = null;
this.parentGroupId = null;
this.options = $.extend( true, {}, 
$.fn.msggroupselector.defaults, options );
@@ -25,13 +25,13 @@
 * Initialize the plugin
 */
init: function () {
-   this.parentGroupId = this.$group.data( 'msggroupid' );
+   this.parentGroupId = this.$trigger.data( 'msggroupid' );
if ( this.hasChildGroups( this.parentGroupId ) ) {
this.prepareSelectorMenu();
this.listen();
if ( mw.translate.messageGroups !== {} ) {
// If data is ready, render now.
-   this.$group.trigger( 
'dataready.translate' );
+   this.$trigger.trigger( 
'dataready.translate' );
}
}
},
@@ -146,13 +146,13 @@
groupSelector.hide();
} );
 
-   groupSelector.$group.on( 'dataready.translate', 
function () {
+   groupSelector.$trigger.on( 'dataready.translate', 
function () {
if ( groupSelector.hasChildGroups( 
groupSelector.parentGroupId ) ) {
groupSelector.loadGroups( 
groupSelector.parentGroupId );
}
} );
 
-   groupSelector.$group.on( 'click', function ( e ) {
+   groupSelector.$trigger.on( 'click', function ( e ) {
groupSelector.toggle();
 
e.preventDefault();
@@ -170,11 +170,11 @@
 
groupSelector.hide();
 
-   groupSelector.$group
+   groupSelector.$trigger
.removeClass( 'tail' )
.nextAll().remove();
 
-   groupSelector.$group.addClass( 'expanded' );
+   groupSelector.$trigger.addClass( 'expanded' );
// FIXME In future, if we are going to have 
multiple groupselectors per page
// this will fail.
$( '.ext-translate-msggroup-selector .tail' 
).remove();
@@ -217,7 +217,7 @@
groupSelector.getRecentGroups();
} else {
groupSelector.$menu.find( 
'.ext-translate-msggroup-list' ).empty();
-   groupSelector.loadGroups( 
groupSelector.$group.data( 'msggroupid' ) );
+   groupSelector.loadGroups( 
groupSelector.$trigger.data( 'msggroupid' ) );
}
} );
 
@@ -252,7 +252,7 @@
 */
position: function () {
if ( this.options.position.of === undefined ) {
-   this.options.position.of = this.$group;
+   this.options.position.of = this.$trigger;
}
this.$menu.position( this.options.position );
},
@@ -350,7 +350,7 @@
 
if ( !this.flatGroupList ) {
this.flatGroupList = [];
-   parentGroupId = this.$group.data( 'msggroupid' 
);
+   parentGroupId = this.$trigger.data( 
'msggroupid' );
messageGroups = this.$menu.data( 'msggroups' );
 
if ( parentGroupId ) {

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

[MediaWiki-commits] [Gerrit] Convert DOM elements to stringifiable objects for reporting - change (mediawiki...VisualEditor)

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

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


Change subject: Convert DOM elements to stringifiable objects for reporting
..

Convert DOM elements to stringifiable objects for reporting

We already do this in unit test so moving getDomElementSummary
and convertDomElements from ve.qunit.js to ve.js.

Apply ve.convertDomElements to report data before serialising.

Bug: 47948
Change-Id: Id807ccc6ff31d063be815ed4988cb35684adb76a
---
M modules/ve/init/mw/ve.init.mw.Target.js
M modules/ve/test/ve.qunit.js
M modules/ve/ve.js
3 files changed, 59 insertions(+), 58 deletions(-)


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

diff --git a/modules/ve/init/mw/ve.init.mw.Target.js 
b/modules/ve/init/mw/ve.init.mw.Target.js
index 5cbc8f3..81fbedc 100644
--- a/modules/ve/init/mw/ve.init.mw.Target.js
+++ b/modules/ve/init/mw/ve.init.mw.Target.js
@@ -607,7 +607,7 @@
};
$.post(
mw.config.get( 'wgVisualEditorConfig' ).reportProblemURL,
-   { 'data': JSON.stringify( report ) },
+   { 'data': JSON.stringify( ve.copyObject( report, 
ve.convertDomElements ) ) },
function () {
// This space intentionally left blank
},
diff --git a/modules/ve/test/ve.qunit.js b/modules/ve/test/ve.qunit.js
index e50b3c2..aacba38 100644
--- a/modules/ve/test/ve.qunit.js
+++ b/modules/ve/test/ve.qunit.js
@@ -84,59 +84,6 @@
 }
 
 /**
- * Builds a summary of an HTML element.
- *
- * Summaries include node name, text, attributes and recursive summaries of 
children.
- *
- * @method
- * @private
- * @param {HTMLElement} element Element to summarize
- * @returns {Object} Summary of element.
- */
-function getDomElementSummary( element ) {
-   var i,
-   $element = $( element ),
-   summary = {
-   'type': element.nodeName.toLowerCase(),
-   'text': $element.text(),
-   'attributes': {},
-   'children': []
-   };
-
-   // Gather attributes
-   if ( element.attributes ) {
-   for ( i = 0; i  element.attributes.length; i++ ) {
-   summary.attributes[element.attributes[i].name] = 
element.attributes[i].value;
-   }
-   }
-   // Summarize children
-   if ( element.childNodes ) {
-   for ( i = 0; i  element.childNodes.length; i++ ) {
-   if ( element.childNodes[i].nodeType !== Node.TEXT_NODE 
) {
-   summary.children.push( getDomElementSummary( 
element.childNodes[i] ) );
-   }
-   }
-   }
-   return summary;
-}
-
-/**
- * Callback for ve.copyArray/Object to convert nodes to a comparable summary
- *
- * @method
- * @private
- * @param {Object} value Value in the object/array
- * @returns {Object} DOM element summary if value is a node, otherwise just 
the value
- */
-function convertDomElements( value ) {
-   // Use duck typing rather than instanceof Node; the latter doesn't 
always work correctly
-   if ( value  value.nodeType ) {
-   return getDomElementSummary( value );
-   }
-   return value;
-}
-
-/**
  * Assertion helpers for VisualEditor test suite.
  * @class ve.QUnit.assert
  */
@@ -185,8 +132,8 @@
  * @static
  */
 QUnit.assert.equalDomElement = function ( actual, expected, message ) {
-   var actualSummary = getDomElementSummary( actual ),
-   expectedSummary = getDomElementSummary( expected );
+   var actualSummary = ve.getDomElementSummary( actual ),
+   expectedSummary = ve.getDomElementSummary( expected );
 
QUnit.push(
QUnit.equiv( actualSummary, expectedSummary ), actualSummary, 
expectedSummary, message
@@ -200,8 +147,8 @@
  */
 QUnit.assert.deepEqualWithDomElements = function ( actual, expected, message ) 
{
// Recursively copy objects or arrays, converting any dom elements 
found to comparable summaries
-   actual = ve.isArray( actual ) ? ve.copyArray( actual, 
convertDomElements ) : ve.copyObject( actual, convertDomElements );
-   expected = ve.isArray( expected ) ? ve.copyArray( expected, 
convertDomElements ) : ve.copyObject( expected, convertDomElements );
+   actual = ve.isArray( actual ) ? ve.copyArray( actual, 
ve.convertDomElements ) : ve.copyObject( actual, ve.convertDomElements );
+   expected = ve.isArray( expected ) ? ve.copyArray( expected, 
ve.convertDomElements ) : ve.copyObject( expected, ve.convertDomElements );
 
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
 };
diff --git a/modules/ve/ve.js b/modules/ve/ve.js
index 9d33b64..d8783c3 100644
--- a/modules/ve/ve.js
+++ b/modules/ve/ve.js
@@ -925,6 +925,60 @@
};
 
 

[MediaWiki-commits] [Gerrit] Shorten extension description and remove punctuation - change (mediawiki...AccountAudit)

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

Change subject: Shorten extension description and remove punctuation
..


Shorten extension description and remove punctuation

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

Approvals:
  Siebrand: Verified
  Raimond Spekking: Looks good to me, approved



diff --git a/AccountAudit.i18n.php b/AccountAudit.i18n.php
index c2b93b9..5f44df5 100644
--- a/AccountAudit.i18n.php
+++ b/AccountAudit.i18n.php
@@ -3,7 +3,7 @@
 $messages = array();
 
 $messages['en'] = array(
-   'accountaudit-desc' = 'This extension is used to audit active/inactive 
user accounts.',
+   'accountaudit-desc' = 'Audits active/inactive user accounts',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec075cfa17888e72e9977c55fd21441eb7699fa8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AccountAudit
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Pgehres pgeh...@wikimedia.org
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Depool mc1009 - change (operations/mediawiki-config)

2013-05-08 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Depool mc1009
..

Depool mc1009

That server is down due to a switch failure

Change-Id: Ia77d951cff48a445f20bd4914613457848996ecb
---
M wmf-config/mc-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/mc-eqiad.php b/wmf-config/mc-eqiad.php
index b9b13bf..e8cb222 100644
--- a/wmf-config/mc-eqiad.php
+++ b/wmf-config/mc-eqiad.php
@@ -22,7 +22,7 @@
'10.64.0.185',
'10.64.0.186',
'10.64.0.187',
-   '10.64.0.188',
+   #'10.64.0.188',
'10.64.0.189',
'10.64.0.190',
'10.64.0.191',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia77d951cff48a445f20bd4914613457848996ecb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Depool mc1009 - change (operations/mediawiki-config)

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

Change subject: Depool mc1009
..


Depool mc1009

That server is down due to a switch failure

Change-Id: Ia77d951cff48a445f20bd4914613457848996ecb
---
M wmf-config/mc-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/mc-eqiad.php b/wmf-config/mc-eqiad.php
index b9b13bf..e8cb222 100644
--- a/wmf-config/mc-eqiad.php
+++ b/wmf-config/mc-eqiad.php
@@ -22,7 +22,7 @@
'10.64.0.185',
'10.64.0.186',
'10.64.0.187',
-   '10.64.0.188',
+   #'10.64.0.188',
'10.64.0.189',
'10.64.0.190',
'10.64.0.191',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia77d951cff48a445f20bd4914613457848996ecb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Demon ch...@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] Avoid homepage to become too wide on big screens - change (mediawiki...TwnMainPage)

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

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


Change subject: Avoid homepage to become too wide on big screens
..

Avoid homepage to become too wide on big screens

A max-width value is set to avoid the homepage to become too wide when
seen in very wide screens.

Change-Id: If3bc83cdcd5bee0a29ac887d7ea64b64cd24833e
---
M resources/css/ext.translate.mainpage.css
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/resources/css/ext.translate.mainpage.css 
b/resources/css/ext.translate.mainpage.css
index d8b4c5b..ae12c30 100644
--- a/resources/css/ext.translate.mainpage.css
+++ b/resources/css/ext.translate.mainpage.css
@@ -5,6 +5,9 @@
 .twn-mainpage {
background-color: #fff;
color: #252525;
+   max-width: 1280px;
+   margin-left: auto;
+   margin-right: auto;
 }
 
 .twn-mainpage-header {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3bc83cdcd5bee0a29ac887d7ea64b64cd24833e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Pginer pgi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make $wgCodeEditorEnableCore configurable per wiki - change (operations/mediawiki-config)

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

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


Change subject: Make $wgCodeEditorEnableCore configurable per wiki
..

Make $wgCodeEditorEnableCore configurable per wiki

In preparation for enabling it for editing JS and CSS. The current plan
is to enable it in Beta Labs for testing as soon as bug 47235 is fixed,
and ideally to start turning it on for live sites next week.

Bug: 39653
Change-Id: I39c626d066797d887769c3715df88838e709d527
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
3 files changed, 15 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7b360ff..24c6503 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2547,11 +2547,12 @@
require_once( $IP/extensions/Thanks/Thanks.php );
 }
 
-if ( $wmgUseScribunto ) {
+if ( $wmgUseCodeEditorForCore || $wmgUseScribunto ) {
include( $IP/extensions/CodeEditor/CodeEditor.php );
-   // Don't enable core functionality until it has been reviewed and 
approved
-   $wgCodeEditorEnableCore = false;
+   $wgCodeEditorEnableCore = $wmgUseCodeEditorForCore;
+}
 
+if ( $wmgUseScribunto ) {
include( $IP/extensions/Scribunto/Scribunto.php );
$wgScribuntoUseGeSHi = true;
$wgScribuntoUseCodeEditor = true;
@@ -2656,6 +2657,7 @@
$wgExtraNamespaces[471] = 'Schema_talk';
 
include_once( $IP/extensions/CodeEditor/CodeEditor.php );
+   $wgCodeEditorEnableCore = $wmgUseCodeEditorForCore; // For 
safety's sake
}
 }
 
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 0f79be0..4743428 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -255,6 +255,12 @@
'labswiki' = 'personal',
),
 
+   // (bug 39653) The plan is to enable it for testing on labs first, so 
add
+   // the config hook to be able to do that.
+   'wmgUseCodeEditorForCore' = array(
+   'default' = false,
+   ),
+
 );
 
 } # wmflLabsSettings()
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c9ac96b..2495bff 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12100,6 +12100,10 @@
'mediawikiwiki' = true,
 ),
 
+'wmgUseCodeEditorForCore' = array(
+   'default' = false,
+),
+
 'wmgUseScribunto' = array(
'default' = true,
 ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39c626d066797d887769c3715df88838e709d527
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 47610) Keep default settings out of globals. - change (mediawiki...Wikibase)

2013-05-08 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: (bug 47610) Keep default settings out of globals.
..

(bug 47610) Keep default settings out of globals.

This change allows for using $wgWBClientSettings resp
$wgWBRepoSettings for all settings, while staying compatible with
sites using $wgWBSettings for everything.

Special care has been taken to make sure default values never
override explicit configuration, and repo/client settings override
generic settings.

Change-Id: I14422cd85a3cf0200ea89953251b78b6b8d813cb
---
M client/WikibaseClient.php
M client/config/WikibaseClient.default.php
M lib/WikibaseLib.php
M lib/config/WikibaseLib.default.php
M lib/includes/Settings.php
M repo/Wikibase.php
M repo/config/Wikibase.default.php
7 files changed, 272 insertions(+), 237 deletions(-)


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

diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index ba013d1..9dff8f7 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -39,6 +39,8 @@
 define( 'WBC_VERSION', '0.4 alpha'
. ( defined( 'WB_EXPERIMENTAL_FEATURES' )  WB_EXPERIMENTAL_FEATURES ? 
'/experimental' : '' ) );
 
+define( 'WBC_DIR', __DIR__ );
+
 $wgExtensionCredits['wikibase'][] = array(
'path' = __DIR__,
'name' = 'Wikibase Client',
@@ -144,7 +146,7 @@
 $wgWBClientStores['DirectSqlStore'] = 'Wikibase\DirectSqlStore';
 
 
-include_once( $dir . 'config/WikibaseClient.default.php' );
+$wgWBClientSettings = array();
 
 if ( defined( 'WB_EXPERIMENTAL_FEATURES' )  WB_EXPERIMENTAL_FEATURES ) {
include_once( $dir . 'config/WikibaseClient.experimental.php' );
diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index 617979e..5494f38 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -29,156 +29,157 @@
  * @licence GNU GPL v2+
  */
 
-if ( !defined( 'WBC_VERSION' ) ) {
-   die( 'Not an entry point.' );
-}
 
-global $wgScriptPath, $wgArticlePath, $wgLanguageCode, $wgDBname;
+return call_user_func( function() {
+   global $wgScriptPath, $wgArticlePath, $wgLanguageCode, $wgDBname;
 
-$wgWBClientSettings = array(
-   'namespaces' = array(), // by default, include all namespaces; 
deprecated as of 0.4
-   'excludeNamespaces' = array(),
-   'repoUrl' = '//www.wikidata.org',
-   'repoScriptPath' = $wgScriptPath,
-   'repoArticlePath' = $wgArticlePath,
-   'sort' = 'code',
-   'sortPrepend' = array(),
-   'alwaysSort' = false,
-   'siteGlobalID' = $wgDBname,
-   // @todo would be great to just get this from the sites stuff
-   // but we will need to make sure the caching works good enough
-   'siteLocalID' = $wgLanguageCode,
-   'siteGroup' = 'wikipedia',
-   'injectRecentChanges' = true,
-   'showExternalRecentChanges' = true,
-   'defaultClientStore' = null,
-   'repoDatabase' = null, // note: false means local!
-   // default for repo items in main namespace
-   'repoNamespaces' = array(
-   'wikibase-item' = '',
-   'wikibase-property' = 'Property'
-   ),
-   'allowDataTransclusion' = true,
-   'enableSiteLinkWidget' = false,
-);
+   $defaults = array(
+   'namespaces' = array(), // by default, include all namespaces; 
deprecated as of 0.4
+   'excludeNamespaces' = array(),
+   'repoUrl' = '//www.wikidata.org',
+   'repoScriptPath' = $wgScriptPath,
+   'repoArticlePath' = $wgArticlePath,
+   'sort' = 'code',
+   'sortPrepend' = array(),
+   'alwaysSort' = false,
+   'siteGlobalID' = $wgDBname,
+   // @todo would be great to just get this from the sites stuff
+   // but we will need to make sure the caching works good enough
+   'siteLocalID' = $wgLanguageCode,
+   'siteGroup' = 'wikipedia',
+   'injectRecentChanges' = true,
+   'showExternalRecentChanges' = true,
+   'defaultClientStore' = null,
+   'repoDatabase' = null, // note: false means local!
+   // default for repo items in main namespace
+   'repoNamespaces' = array(
+   'wikibase-item' = '',
+   'wikibase-property' = 'Property'
+   ),
+   'allowDataTransclusion' = true,
+   'enableSiteLinkWidget' = false,
 
-/**
- * @todo this is a bit wikimedia-specific and need to find a better place for 
this stuff,
- * such as mediawiki-config, mediawiki messages for custom orders, or 
somewhere.
- *
- * alphabetic and alphabetic revised come from:
- * 

[MediaWiki-commits] [Gerrit] Render proper zero banners on the Zero config pages - change (mediawiki...ZeroRatedMobileAccess)

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

Change subject: Render proper zero banners on the Zero config pages
..


Render proper zero banners on the Zero config pages

* The patch uses site configuration to pull {{SITENAME}} for localized 
wikipedia sites
* Fixed the width of the banner to 480px for config pages
* Made banner parameter optional

Change-Id: I36fcc32a7028a538b5912be42941db5607122145
---
M includes/CarrierConfig.php
M includes/PageRenderingHooks.php
M includes/ZeroConfig.i18n.php
M includes/ZeroConfigContent.php
M modules/zero.config.css
5 files changed, 33 insertions(+), 19 deletions(-)

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



diff --git a/includes/CarrierConfig.php b/includes/CarrierConfig.php
index 8256f03..b610801 100644
--- a/includes/CarrierConfig.php
+++ b/includes/CarrierConfig.php
@@ -150,7 +150,7 @@
} );
 
//'banner' = null,   // Map of localized banner texts 
with {{PARTNER}} placeholder
-   $this-check( 'banner', null,
+   $this-check( 'banner', array(),
function( $v ) {
return CarrierConfig::isArray( $v, true )
 CarrierConfig::isArrayOfLangs( 
array_keys( $v ) )
diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index 1db8c83..2526e13 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -318,11 +318,11 @@
/**
 * @param $carrier
 * @param Language $lang
-* @param string $style
+* @param string $sitename
 * @return string
 */
-   public static function renderBanner( $carrier, $lang = null, $style = 
'display:none;' ) {
-   $bannerText = self::getBannerText( $carrier, $lang );
+   public static function renderBanner( $carrier, $lang = null, $sitename 
= null ) {
+   $bannerText = self::getBannerText( $carrier, $lang, $sitename );
if ( $bannerText !== false ) {
global $wgRequest;
$billingURL = $wgRequest-appendQuery(
@@ -365,7 +365,7 @@
$banner = Html::rawElement('div',
array(
'class' = 'mw-mf-banner',
-   'style' = $style . $customStyle,
+   'style' = ( $lang === null ? 'display:none;' : 
'' ) . $customStyle,
'id' = 'zero-rated-banner'
),
'button style=padding:0.5em;' . 
$customStyleNotifyClose . $customStyle .
@@ -379,9 +379,10 @@
/**
 * @param $config
 * @param Language $lang
+* @param string $sitename
 * @return bool|String
 */
-   private static function getBannerText( $config, $lang = null ) {
+   private static function getBannerText( $config, $lang, $sitename ) {
if ( $lang === null ) {
global $wgLang;
$lang = $wgLang;
@@ -394,11 +395,13 @@
$nameMsg = new RawMessage( $name );
$linkText = self::pickLocalizedString( $config['banner'], 
$lang, $fallbacks );
if ( $linkText === false ) {
-   $linkTextMsg = wfMessage( 
'zero-rated-mobile-access-banner-text' );
-   } else {
-   $linkTextMsg = new RawMessage( $linkText );
+   $linkText = wfMessage( 
'zero-rated-mobile-access-banner-text' )-inLanguage( $lang )-plain();
}
-
+   if ( $sitename !== null ) {
+   // Rendering for the zero-config page, fake {{SITENAME}}
+   $linkText = str_replace( '{{SITENAME}}', $sitename, 
$linkText );
+   }
+   $linkTextMsg = new RawMessage( $linkText );
return $linkTextMsg-inLanguage( $lang )-rawParams( 
$nameMsg-inLanguage( $lang )-escaped() )-escaped();
}
 
diff --git a/includes/ZeroConfig.i18n.php b/includes/ZeroConfig.i18n.php
index 237781b..c1351a9 100644
--- a/includes/ZeroConfig.i18n.php
+++ b/includes/ZeroConfig.i18n.php
@@ -27,7 +27,7 @@
'zeroconfig-whitelisted_langs-all' = '(all)',
'zeroconfig-whitelisted_langs' = 'must be a list of valid language 
codes and include all of \'showLangs\' languages (or empty for all)',
'zeroconfig-lang_name_overrides' = 'must be a dictionary of valid 
language codes to strings (optional)',
-   'zeroconfig-banner' = 'must be a dictionary of valid language codes to 
strings',
+   'zeroconfig-banner' = 'must be a dictionary of valid language codes to 
strings (optional)',
'zeroconfig-banner_url' = 'must be a valid URL (optional)',
'zeroconfig-sites' = 'must be missing 

[MediaWiki-commits] [Gerrit] Revert Depool mc1009 - change (operations/mediawiki-config)

2013-05-08 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Revert Depool mc1009
..


Revert Depool mc1009

This reverts commit cafabca3b7abe9785ada9a99230c98a946407e70

Change-Id: Id7da23725c93985da2af97baa436c843f07391f9
---
M wmf-config/mc-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/mc-eqiad.php b/wmf-config/mc-eqiad.php
index e8cb222..b9b13bf 100644
--- a/wmf-config/mc-eqiad.php
+++ b/wmf-config/mc-eqiad.php
@@ -22,7 +22,7 @@
'10.64.0.185',
'10.64.0.186',
'10.64.0.187',
-   #'10.64.0.188',
+   '10.64.0.188',
'10.64.0.189',
'10.64.0.190',
'10.64.0.191',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7da23725c93985da2af97baa436c843f07391f9
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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 48236) Fix login.wm.o's (and other wikis') logo - change (operations/mediawiki-config)

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

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


Change subject: (bug 48236) Fix login.wm.o's (and other wikis') logo
..

(bug 48236) Fix login.wm.o's (and other wikis') logo

This commit replaces the current login.wikimedia.org logo
(which is also used on fdcwiki, iegcomwiki, ombudsmenwiki
and transitionteamwiki) with a GIMP-created and loslessly
compressed version that does not have rsvg's rendering
issue mentioned in the bug.

The file is fully protected on Commons and weighs just
3273 bytes, which is quite good for a logo.

Bug: 48236
Change-Id: I0493d70f4e1fe16ef204e5e25a2cc56369e2905f
---
M wmf-config/InitialiseSettings.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c9ac96b..21af1b5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -504,7 +504,7 @@
'fawikiquote'   = '$stdlogo',
'fawikisource'  = 
'//upload.wikimedia.org/wikipedia/commons/1/11/Wikisource_fa.png',
'fawiktionary'  = '$stdlogo',
-   'fdcwiki'   = 
'//upload.wikimedia.org/wikipedia/commons/thumb/8/81/Wikimedia-logo.svg/135px-Wikimedia-logo.svg.png',
+   'fdcwiki'   = 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikimedia_logo-scaled-down.png', 
// bug 48236
'ffwiki'= '$stdlogo',
'fiwiki'= 
'//upload.wikimedia.org/wikipedia/commons/7/7f/Wikipedia-logo-v2-fi.png',
'fiwikibooks'   = '$stdlogo',
@@ -573,7 +573,7 @@
'idwiki'= 
'//upload.wikimedia.org/wikipedia/id/f/f3/Wikipedia-logo-v2-id.png',
'idwikibooks'   = 
'//upload.wikimedia.org/wikibooks/id/3/34/Wikibooks-logo-id.png',
'idwiktionary'  = '$stdlogo',
-   'iegcomwiki'= 
'//upload.wikimedia.org/wikipedia/commons/thumb/8/81/Wikimedia-logo.svg/135px-Wikimedia-logo.svg.png',
+   'iegcomwiki'= 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikimedia_logo-scaled-down.png', 
// bug 48236
'iewiktionary'  = 
'//upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Wiktionary-logo-ie.png/135px-Wiktionary-logo-ie.png',
 // bug 43240
'igwiki'= 
'//upload.wikimedia.org/wikipedia/commons/2/2a/Wikipedia-logo-v2-ig.png', // 
bug 46589
'ikwiki'= 
'//upload.wikimedia.org/wikipedia/commons/e/ef/Wikipedia-logo-v2-ik.png', // 
bug 46589
@@ -645,7 +645,7 @@
'lmowiki'   = 
'//upload.wikimedia.org/wikipedia/commons/f/ff/Wikipedia-logo-v2-lmo.png', // 
bug 40285
'lnwiki'= 
'//upload.wikimedia.org/wikipedia/commons/a/aa/Wikipedia-logo-v2-ln.png', // 
bug 46589
'wikidatawiki'  = 
'//upload.wikimedia.org/wikipedia/commons/e/e4/Wikidata-logo-en-135px.png',
-   'loginwiki' = 
'//upload.wikimedia.org/wikipedia/commons/thumb/8/81/Wikimedia-logo.svg/135px-Wikimedia-logo.svg.png',
+   'loginwiki' = 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikimedia_logo-scaled-down.png', 
// bug 48236
'lowiki'= '$stdlogo',
'ltgwiki'   = 
'//upload.wikimedia.org/wikipedia/commons/7/77/Wikipedia-logo-v2-ltg.png',
'ltwiki'= 
'//upload.wikimedia.org/wikipedia/commons/1/1c/Wikipedia-logo-v2-lt.png', // 
bug 46589
@@ -718,7 +718,7 @@
'ocwikibooks'   = 
'//upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Wikibooks-logo-oc.png/135px-Wikibooks-logo-oc.png',
'ocwiktionary'  = '$stdlogo',
'officewiki'= 
'//upload.wikimedia.org/wikipedia/meta/e/ed/WikimediaOFFICE-logo135px.png',
-   'ombudsmenwiki' = 
'//upload.wikimedia.org/wikipedia/commons/thumb/8/81/Wikimedia-logo.svg/135px-Wikimedia-logo.svg.png',
+   'ombudsmenwiki' = 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikimedia_logo-scaled-down.png', 
// bug 48236
'omwiki'= 
'//upload.wikimedia.org/wikipedia/commons/3/37/Wikipedia-logo-v2-om.png', // 
bug 44974
'orwiki'= 
'//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Wikipedia-logo-v2-or.svg/132px-Wikipedia-logo-v2-or.svg.png',
 # bug 27704
'orwiktionary'  = 
'//upload.wikimedia.org/wikipedia/commons/thumb/1/14/Wiktionary-logo-or.svg/135px-Wiktionary-logo-or.svg.png',
@@ -863,7 +863,7 @@
'tnwiki'= 
'//upload.wikimedia.org/wikipedia/commons/0/00/Wikipedia-logo-v2-tn.png', // 
bug 40285
'towiki'= 
'//upload.wikimedia.org/wikipedia/$lang/9/96/Wiki-to.png',
'tpiwiki'   = 
'//upload.wikimedia.org/wikipedia/commons/3/37/Wikipedia-logo-v2-tpi.png', # 

[MediaWiki-commits] [Gerrit] Bug 48125: Support gender in mobile-frontend-photo-ownership - change (mediawiki...MobileFrontend)

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

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


Change subject: Bug 48125: Support gender in mobile-frontend-photo-ownership
..

Bug 48125: Support gender in mobile-frontend-photo-ownership

Bug: 48125
Change-Id: I721a53bb00987602ce1d544577f41d36422e885a
---
M MobileFrontend.i18n.php
M javascripts/modules/mf-photo.js
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index c24cf3e..86fdb23 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -564,7 +564,7 @@
'mobile-frontend-photo-upload-comment' = 'Comment associated with the 
upload of a photo',
'mobile-frontend-photo-caption-placeholder' = 'Placeholder text 
prompting user to add a mandatory caption to a photo',
'mobile-frontend-image-loading' = 'Text that displays while an image 
is loading',
-   'mobile-frontend-photo-ownership' = 'A statement saying the user 
created the image where $1 is the username',
+   'mobile-frontend-photo-ownership' = 'A statement saying the user 
created the image where $1 is the username. Supports GENDER.',
'mobile-frontend-photo-ownership-help' = 'A link that allows the user 
to open more information about what {{msg-mw|mobile-frontend-photo-ownership}} 
entails.
 {{Identical|What does this mean}}',
'mobile-frontend-photo-ownership-confirm' = 'Friendly confirmation 
message expressing understanding',
diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 6d57127..7e742bb 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -6,7 +6,7 @@
ProgressBar = M.require( 'widgets/progress-bar' ),
nav = M.require( 'navigation' ),
Overlay = nav.Overlay,
-   msg = mw.msg( 'mobile-frontend-photo-ownership', mw.config.get( 
'wgUserName' ) ),
+   msg = mw.msg( 'mobile-frontend-photo-ownership', mw.config.get( 
'wgUserName' ), mw.user ),
CopyrightOverlay = Overlay.extend( {
defaults: {
bulletPoints: [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I721a53bb00987602ce1d544577f41d36422e885a
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] Incorporated Yaron's suggestion to use a separate parameter ... - change (mediawiki...ExternalData)

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

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


Change subject: Incorporated Yaron's suggestion to use a separate parameter to 
capture MongoDB Find Query.  The new parm, is appropriately named find query. 
Also changed str_replace with str_ireplace for matching AND  LIKE in parsing 
MongoDB where.
..

Incorporated Yaron's suggestion to use a separate parameter to capture MongoDB 
Find Query.  The new parm, is appropriately named find query.
Also changed str_replace with str_ireplace for matching AND  LIKE in parsing 
MongoDB where.

Change-Id: I9438fa2dc54d9c3d3f1de1eec984b998ee4f3093
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 38 insertions(+), 41 deletions(-)


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

diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index 93c0f05..44a3919 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -248,10 +248,11 @@
}
$table = ( array_key_exists( 'from', $args ) ) ? $args['from'] 
: null;
$conds = ( array_key_exists( 'where', $args ) ) ? 
$args['where'] : null;
+   $findQuery = ( array_key_exists( 'find query', $args ) ) ? 
$args['find query'] : null;
$limit = ( array_key_exists( 'limit', $args ) ) ? 
$args['limit'] : null;
$orderBy = ( array_key_exists( 'order by', $args ) ) ? 
$args['order by'] : null;
$groupBy = ( array_key_exists( 'group by', $args ) ) ? 
$args['group by'] : null;
-   $options = array( 'LIMIT' = $limit, 'ORDER BY' = $orderBy, 
'GROUP BY' = $groupBy );
+   $options = array( 'LIMIT' = $limit, 'ORDER BY' = $orderBy, 
'GROUP BY' = $groupBy, 'FIND QUERY' = $findQuery );
$mappings = EDUtils::paramToArray( $data ); // parse the data 
arg into mappings
 
$external_values = EDUtils::getDBData( $dbID, $table, 
array_values( $mappings ), $conds, $options );
diff --git a/ED_Utils.php b/ED_Utils.php
index ae90bb1..33845f5 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -291,47 +291,43 @@
 
$collection = new MongoCollection( $db, $from );
 
-   // Turn the SQL of the where= parameter into the appropriate
-   // array for MongoDB.
-   $whereArray = array();
-   if ( $where != '' ) {
-
-   // if the string 'PASSTHRU' is used, then just 
passthrough the
-   // JSON MongoDB find condition as a JSON string.  This 
is necessary so we don't try 
+   $findArray = array();
+   // Was a direct MongoDB find query JSON string provided?
+   if ( $options['FIND QUERY'] != '' ) {
+   // if FIND QUERY is used, then just passthrough the
+   // JSON MongoDB FIND query as a JSON string.  This is 
necessary so we don't try 
// to create a MongoDB find parser in ExternalData to 
accomodate all the possible
// find scenarios since MongoDB is NotSQL :).  Be sure 
to use spaces between curly 
-   // brackets so as not to trip up the MW parser
-   if ( substr($where, 0, 10) == 'PASSTHRU' ) {
-   $whereArray = json_decode (substr($where, 10), 
true);
-   } else {
-   // Hopefully all-caps and all-lowercase are the 
only
-   // two variants that people will use - 
otherwise,
-   // preg_replace() should be used.
-   $where = str_replace( ' and ', ' AND ', $where 
);
-   $where = str_replace( ' like ', ' LIKE ', 
$where );
-   $whereElements = explode( ' AND ', $where );
-   foreach ( $whereElements as $whereElement ) {
-   if ( strpos( $whereElement, '=' ) ) {
-   list( $fieldName, $value ) = 
explode( '=', $whereElement );
-   $whereArray[trim( $fieldName )] 
= array( '$gte' = trim( $value ) );
-   } elseif ( strpos( $whereElement, '' ) 
) {
-   list( $fieldName, $value ) = 
explode( '', $whereElement );
-   $whereArray[trim( $fieldName )] 
= array( '$gt' = trim( $value ) );
-   } elseif ( strpos( $whereElement, '=' 
) ) {
-   list( $fieldName, $value ) = 
explode( '=', $whereElement );
-   $whereArray[trim( $fieldName )] 
= array( '$lte' = trim( 

[MediaWiki-commits] [Gerrit] set cookie and refresh to make sure PDF links are expanded - change (qa/browsertests)

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

Change subject: set cookie and refresh to make sure PDF links are expanded
..


set cookie and refresh to make sure PDF links are expanded

Change-Id: I8742ee82d76d7beb6339cc095684753cae81bf42
---
M features/step_definitions/pdf_steps.rb
M features/support/pages/random_page.rb
2 files changed, 6 insertions(+), 7 deletions(-)

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



diff --git a/features/step_definitions/pdf_steps.rb 
b/features/step_definitions/pdf_steps.rb
index 321f26c..0d78d42 100644
--- a/features/step_definitions/pdf_steps.rb
+++ b/features/step_definitions/pdf_steps.rb
@@ -1,18 +1,18 @@
 Then(/^Download as PDF should be present$/) do
+  @browser.driver.manage.add_cookie(:name = 'vector-nav-p-coll-print_export', 
:value = 'true')
+  @browser.driver.navigate.refresh
   on(RandomPage).download_as_pdf_element.should exist
 end
 
 When(/^I click on Download as PDF$/) do
-  on(RandomPage) do |page|
-page.print_or_export_element.when_present.click
-page.download_as_pdf_element.when_present.click
-  end
+  @browser.driver.manage.add_cookie(:name = 'vector-nav-p-coll-print_export', 
:value = 'true')
+  @browser.driver.navigate.refresh
+  on(RandomPage).download_as_pdf
 end
 
 Then(/^Download the file link should be present$/) do
   on(RandomPage) do |page|
-page.download_the_file_element.when_present(15)
-page.download_the_file_element.should exist
+page.download_the_file_element.when_present(15).should exist
   end
 end
 
diff --git a/features/support/pages/random_page.rb 
b/features/support/pages/random_page.rb
index 0799971..375a2f3 100644
--- a/features/support/pages/random_page.rb
+++ b/features/support/pages/random_page.rb
@@ -7,7 +7,6 @@
   li(:main_page, id: 'n-mainpage-description')
   a(:download_as_pdf, text: 'Download as PDF')
   a(:download_the_file, text: 'Download the file')
-  a(:print_or_export, text: 'Print/export')
   a(:uls_trigger, class: 'uls-trigger')
   div(:search, id: 'search')
   text_field(:search_input, id: 'searchInput')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8742ee82d76d7beb6339cc095684753cae81bf42
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@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] Story 757: Add text to upload CTA in lists of articles - change (mediawiki...MobileFrontend)

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

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


Change subject: Story 757: Add text to upload CTA in lists of articles
..

Story 757: Add text to upload CTA in lists of articles

For articles which have no images add the tagline
'Visit this page to add an image' above the distance

Makes call to action more explicit

Change-Id: I64e7ba0e831d9d954749fd5b4a6d3691168d95bb
---
M MobileFrontend.i18n.php
M MobileFrontend.php
M javascripts/specials/nearby.js
3 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index c24cf3e..1e479a4 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -141,6 +141,7 @@
'mobile-frontend-nearby-refresh' = 'We found a more accurate location 
for you. Click here to refresh the list of nearby pages',
'mobile-frontend-nearby-error' = 'An unexpected error occurred whilst 
trying to find pages nearby',
'mobile-frontend-nearby-link' = 'Read this page in full',
+   'mobile-frontend-needs-photo' = 'Visit this page to add an image',
 
// image donation
'mobile-frontend-donate-image-login' = 'You must be logged in to see 
your uploads.',
@@ -491,6 +492,7 @@
'mobile-frontend-nearby-refresh' = 'Text of toast notification message 
shown when user moved and the list can be refreshed.',
'mobile-frontend-nearby-error' = 'Text of generic error message when 
querying geodata api',
'mobile-frontend-nearby-link' = 'Text of link that takes user to full 
page',
+   'mobile-frontend-needs-photo' = 'Visit this page to add an image',
'mobile-frontend-donate-image-login' = 'Title for 
[[Special:UserLogin]] when being redirected to [[Special:Uploads]].
 
 Used when the user is not logged in.
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 1f09d97..61b8501 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -633,6 +633,7 @@
'mobile-frontend-nearby-noresults',
'mobile-frontend-ajax-preview-loading',
'mobile-frontend-nearby-link',
+   'mobile-frontend-needs-photo',
),
'styles' = array(
'stylesheets/specials/watchlist.css',
diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js
index 982db37..f07a32c 100644
--- a/javascripts/specials/nearby.js
+++ b/javascripts/specials/nearby.js
@@ -119,6 +119,7 @@
page.pageimageClass = thumb.width  
thumb.height ? 'listThumbH' : 'listThumbV';
} else {
page.pageimageClass = 'needsPhoto';
+   page.cta = mw.msg( 
'mobile-frontend-needs-photo' );
}
page.url = M.history.getArticleUrl( page.title );
if ( page.coordinates ) { // FIXME: protect against bug 
47133 (remove when resolved)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64e7ba0e831d9d954749fd5b4a6d3691168d95bb
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 48125: Support gender in mobile-frontend-photo-ownership - change (mediawiki...MobileFrontend)

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

Change subject: Bug 48125: Support gender in mobile-frontend-photo-ownership
..


Bug 48125: Support gender in mobile-frontend-photo-ownership

Bug: 48125
Change-Id: I721a53bb00987602ce1d544577f41d36422e885a
---
M MobileFrontend.i18n.php
M javascripts/modules/mf-photo.js
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index c24cf3e..86fdb23 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -564,7 +564,7 @@
'mobile-frontend-photo-upload-comment' = 'Comment associated with the 
upload of a photo',
'mobile-frontend-photo-caption-placeholder' = 'Placeholder text 
prompting user to add a mandatory caption to a photo',
'mobile-frontend-image-loading' = 'Text that displays while an image 
is loading',
-   'mobile-frontend-photo-ownership' = 'A statement saying the user 
created the image where $1 is the username',
+   'mobile-frontend-photo-ownership' = 'A statement saying the user 
created the image where $1 is the username. Supports GENDER.',
'mobile-frontend-photo-ownership-help' = 'A link that allows the user 
to open more information about what {{msg-mw|mobile-frontend-photo-ownership}} 
entails.
 {{Identical|What does this mean}}',
'mobile-frontend-photo-ownership-confirm' = 'Friendly confirmation 
message expressing understanding',
diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 6d57127..7e742bb 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -6,7 +6,7 @@
ProgressBar = M.require( 'widgets/progress-bar' ),
nav = M.require( 'navigation' ),
Overlay = nav.Overlay,
-   msg = mw.msg( 'mobile-frontend-photo-ownership', mw.config.get( 
'wgUserName' ) ),
+   msg = mw.msg( 'mobile-frontend-photo-ownership', mw.config.get( 
'wgUserName' ), mw.user ),
CopyrightOverlay = Overlay.extend( {
defaults: {
bulletPoints: [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I721a53bb00987602ce1d544577f41d36422e885a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@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] Allow passing arguments to the PHPUnit runner - change (mediawiki...Ask)

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

Change subject: Allow passing arguments to the PHPUnit runner
..


Allow passing arguments to the PHPUnit runner

Change-Id: Ib41ae8430327763087e07f1cb7202397105b7bc1
---
M Tests/Phpunit/phpunit.php
1 file changed, 11 insertions(+), 5 deletions(-)

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



diff --git a/Tests/Phpunit/phpunit.php b/Tests/Phpunit/phpunit.php
index 2a33ab3..66163d4 100755
--- a/Tests/Phpunit/phpunit.php
+++ b/Tests/Phpunit/phpunit.php
@@ -27,9 +27,15 @@
 
 echo 'Running tests for Ask version ' . Ask_VERSION . .\n;
 
+$arguments = $_SERVER['argv'];
+array_shift( $arguments );
+
+if ( array_search( '--group', $arguments ) === false ) {
+   $arguments[] = '--group';
+   $arguments[] = 'Ask';
+}
+
+$arguments[] = __DIR__;
+
 $runner = new PHPUnit_TextUI_Command();
-$runner-run( array(
-   '--group',
-   'Ask',
-   __DIR__
-) );
+$runner-run( $arguments );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41ae8430327763087e07f1cb7202397105b7bc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Add second key for myself - change (operations/puppet)

2013-05-08 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Add second key for myself
..


Add second key for myself

Change-Id: I2f84b105522b5bf873542dd36a026a04f8e32dbb
---
M manifests/admins.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/admins.pp b/manifests/admins.pp
index c649ee4..c1a771c 100644
--- a/manifests/admins.pp
+++ b/manifests/admins.pp
@@ -1557,6 +1557,11 @@
user= $username,
type= ssh-rsa,
key = 
B3NzaC1yc2EDAQABAAABAQD74a9VKRGqzCmiWZZUkZoy1XnPgd9nlFTsPrBn8Nnf9mMBbzEArMupuolHOSFhczk5lC9y7KSRKiWJ6sypvVjfGZypr98SA1SEe5AxvBN+8DbWEpxxwbOGCMhHo+GPVucILa5cjzZn2iKlCli39oMa0Dxwzd7v+SuswNtfqjp47RlrJoG5hTZMYcbICjEVGNDvSxSXBX2E17Kxdw3CiPnvZun+twTRYEuTo0GshGjO/2fQaTnyYHfPKOyFYC8HDsaaSaOWzXPXb7ey8s4lY+vEt5Imj5OqHhNOuG+thH/5dxuSv6Jkfi1Ygl2t3j1aYdo5g/0IRQ1lIqhRQuFqxe7j;
+   chad@ubuntu-desktop:
+   ensure  = present,
+   user= $username,
+   type= ssh-rsa,
+   key = 
B3NzaC1yc2EDAQABAAABAQDptp6lYbp9jlCe/wjp2gHH9i6BcL5pgrEUnjz3f+q8Scfm4Tzs7wTSsaAsfYmdYcI8ERJW2ZYU3BRiPqPIyCmOF7WaUMSM0qTf+NoZpfFb+hV0J9CNfdjwNCQGbsZyq39i9u8hCmZg9+fg+eSZ5q3ceH9MJCckx571YtFJs+F6DioCUlad5uGg+2sPE36cbJtQOmmC+Oys+E9go/vJ72mrxEaPoBUP9Z1p8c5GhJ5TjoSqg+bYUsnV0d9yZPTrcyWeeCWeumeQe5YKtG9Z0EJ86axQgKp7nIBAL3EovTTaPTBSMusfjvftCjkIocbS7eLt+6LqgOyxtUWco5oKCtQn;
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f84b105522b5bf873542dd36a026a04f8e32dbb
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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 phpunit.xml file - change (mediawiki...Ask)

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

Change subject: Added phpunit.xml file
..


Added phpunit.xml file

so tests can be run with bootstrap and config from home dir without extra args

Change-Id: If9ccbe86b7254e79ac5f096103b5f85af7927daa
---
M Tests/Phpunit/phpunit.php
A Tests/bootstrap.php
A phpunit.xml.dist
3 files changed, 43 insertions(+), 14 deletions(-)

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



diff --git a/Tests/Phpunit/phpunit.php b/Tests/Phpunit/phpunit.php
index 66163d4..2ffaf53 100755
--- a/Tests/Phpunit/phpunit.php
+++ b/Tests/Phpunit/phpunit.php
@@ -10,20 +10,7 @@
 }
 require_once( 'PHPUnit/Autoload.php' );
 
-define( 'DATAVALUES', true );
-require_once( __DIR__ . '/../../Ask.php' );
-
-spl_autoload_register( function ( $className ) {
-   static $classes = false;
-
-   if ( $classes === false ) {
-   $classes = include(  __DIR__ . '/../AskTestClasses.php' );
-   }
-
-   if ( array_key_exists( $className, $classes ) ) {
-   include_once __DIR__ . '/../../../' . $classes[$className];
-   }
-} );
+require_once( __DIR__ . '/../bootstrap.php' );
 
 echo 'Running tests for Ask version ' . Ask_VERSION . .\n;
 
diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php
new file mode 100644
index 000..95507fd
--- /dev/null
+++ b/Tests/bootstrap.php
@@ -0,0 +1,27 @@
+?php
+
+/**
+ * Test class registration file for the Ask library.
+ *
+ * @since 0.1
+ *
+ * @file
+ * @ingroup Ask
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+
+require_once( __DIR__ . '/../Ask.php' );
+
+spl_autoload_register( function ( $className ) {
+   static $classes = false;
+
+   if ( $classes === false ) {
+   $classes = include(  __DIR__ . '/AskTestClasses.php' );
+   }
+
+   if ( array_key_exists( $className, $classes ) ) {
+   include_once __DIR__ . '/../../' . $classes[$className];
+   }
+} );
\ No newline at end of file
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 000..8c96eb6
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,15 @@
+phpunit backupGlobals=false
+ backupStaticAttributes=false
+ bootstrap=Tests/bootstrap.php
+ cacheTokens=false
+ colors=false
+ convertErrorsToExceptions=true
+ convertNoticesToExceptions=true
+ convertWarningsToExceptions=true
+ stopOnError=false
+ stopOnFailure=false
+ stopOnIncomplete=false
+ stopOnSkipped=false
+ strict=true
+ verbose=true
+/phpunit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9ccbe86b7254e79ac5f096103b5f85af7927daa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Added testsuite so the relevant directory is included by def... - change (mediawiki...Ask)

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

Change subject: Added testsuite so the relevant directory is included by default
..


Added testsuite so the relevant directory is included by default

Change-Id: I75dec7cd963bb55294626d8dca58ca4d890d0ed3
---
M phpunit.xml.dist
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 8c96eb6..d9ca385 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -2,7 +2,7 @@
  backupStaticAttributes=false
  bootstrap=Tests/bootstrap.php
  cacheTokens=false
- colors=false
+ colors=true
  convertErrorsToExceptions=true
  convertNoticesToExceptions=true
  convertWarningsToExceptions=true
@@ -12,4 +12,9 @@
  stopOnSkipped=false
  strict=true
  verbose=true
+testsuites
+testsuite name=Ask
+directoryTests/directory
+/testsuite
+/testsuites
 /phpunit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75dec7cd963bb55294626d8dca58ca4d890d0ed3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Improvements to PHPUnit runner code - change (mediawiki...Diff)

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

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


Change subject: Improvements to PHPUnit runner code
..

Improvements to PHPUnit runner code

* The phpunit.php runner now properly forwards arguments to PHPUnit
* Added a PHPUnit xml config file with default settings and inclusion path

Change-Id: Ida13de815cf8f2ea9b4d8bf132d9c224fd8c7dc3
---
M RELEASE-NOTES
A phpunit.xml.dist
A tests/bootstrap.php
M tests/phpunit.php
4 files changed, 50 insertions(+), 8 deletions(-)


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

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 3d412e2..84bffbf 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -17,6 +17,7 @@
 * Added phpunit.php runner in the tests directory
 * Added Diff\Comparer\ValueComparer interface with CallbackComparer and 
StrictComparer implementations
 * Added MapPatcher::setValueComparer to facilitate patching maps containing 
objects
+* Added PHPUnit configuration file using the new tests/bootstrap.php
 
 ; Removals
 
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 000..2e31e7d
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,20 @@
+phpunit backupGlobals=false
+ backupStaticAttributes=false
+ bootstrap=tests/bootstrap.php
+ cacheTokens=false
+ colors=true
+ convertErrorsToExceptions=true
+ convertNoticesToExceptions=true
+ convertWarningsToExceptions=true
+ stopOnError=false
+ stopOnFailure=false
+ stopOnIncomplete=false
+ stopOnSkipped=false
+ strict=true
+ verbose=true
+testsuites
+testsuite name=Diff
+directorytests/directory
+/testsuite
+/testsuites
+/phpunit
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 000..5788a07
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,15 @@
+?php
+
+/**
+ * PHPUnit test bootstrap file for the Diff library.
+ *
+ * @since 0.6
+ *
+ * @file
+ * @ingroup Diff
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+
+require_once( __DIR__ . '/../Diff.php' );
diff --git a/tests/phpunit.php b/tests/phpunit.php
index 7f44963..e0bfc4f 100755
--- a/tests/phpunit.php
+++ b/tests/phpunit.php
@@ -10,13 +10,19 @@
 
 require_once( 'PHPUnit/Autoload.php' );
 
-require_once( __DIR__ . '/../Diff.php' );
+require_once( __DIR__ . '/bootstrap.php' );
+
+echo 'Running tests for Diff version ' . Diff_VERSION . .\n;
+
+$arguments = $_SERVER['argv'];
+array_shift( $arguments );
+
+if ( array_search( '--group', $arguments ) === false ) {
+   $arguments[] = '--group';
+   $arguments[] = 'Diff';
+}
+
+$arguments[] = __DIR__;
 
 $runner = new PHPUnit_TextUI_Command();
-
-$runner-run( array(
-   __FILE__,
-   '--group',
-   'Diff',
-   __DIR__
-) );
\ No newline at end of file
+$runner-run( $arguments );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida13de815cf8f2ea9b4d8bf132d9c224fd8c7dc3
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] Fix broken links to banner - change (mediawiki...CentralNotice)

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

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


Change subject: Fix broken links to banner
..

Fix broken links to banner

Change-Id: I663d3c794690c90d81bb39b42d1c88c953fbde0b
---
M includes/Campaign.php
M special/SpecialGlobalAllocation.php
2 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/includes/Campaign.php b/includes/Campaign.php
index fae7805..10fc2fe 100644
--- a/includes/Campaign.php
+++ b/includes/Campaign.php
@@ -263,12 +263,13 @@
if ( $historical_banner === null ) {
//FIXME: crazy hacks
$historical_banner = 
Banner::getBannerSettings( $name );
-   $historical_banner['name'] = wfMessage( 
'centralnotice-damaged-log', $name );
+   $historical_banner['label'] = 
wfMessage( 'centralnotice-damaged-log', $name );
$historical_banner['display_anon'] = 
$historical_banner['anon'];
$historical_banner['display_account'] = 
$historical_banner['account'];
$historical_banner['device'] = 
'desktop';
}
$banner['name'] = $name;
+   $banner['label'] = $name;
 
$campaign_info = array(
'campaign' = $campaign['name'],
diff --git a/special/SpecialGlobalAllocation.php 
b/special/SpecialGlobalAllocation.php
index 8c57461..f8be9d2 100644
--- a/special/SpecialGlobalAllocation.php
+++ b/special/SpecialGlobalAllocation.php
@@ -539,7 +539,7 @@
function getBannerAllocationsVariantRow( $banner, $variesAnon, 
$variesBucket, $isAnon, $bucket ) {
$htmlOut = '';
 
-   $viewBanner = $this-getTitleFor( 'CentralNoticeBanners', 
edit/$banner );
+   $viewBanner = $this-getTitleFor( 'CentralNoticeBanners', 
edit/{$banner['name']} );
$viewCampaign = $this-getTitleFor( 'CentralNotice' );
 
// Row begin
@@ -580,9 +580,7 @@
array( 'class' = 
'cn-'.$banner['campaign'].'-'.$banner['name'] ) );
$htmlOut .= Linker::link(
$viewBanner,
-   htmlspecialchars( $banner['name'] ),
-   array(),
-   array( 'template' = $banner['name'] )
+   htmlspecialchars( $banner['label'] )
);
$htmlOut .= Html::closeElement( 'span' );
$htmlOut .= Html::closeElement( 'td' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I663d3c794690c90d81bb39b42d1c88c953fbde0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Adamw awi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improvements to PHPUnit runner code - change (mediawiki...Diff)

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

Change subject: Improvements to PHPUnit runner code
..


Improvements to PHPUnit runner code

* The phpunit.php runner now properly forwards arguments to PHPUnit
* Added a PHPUnit xml config file with default settings and inclusion path

Change-Id: Ida13de815cf8f2ea9b4d8bf132d9c224fd8c7dc3
---
M RELEASE-NOTES
A phpunit.xml.dist
A tests/bootstrap.php
M tests/phpunit.php
4 files changed, 50 insertions(+), 8 deletions(-)

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



diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 3d412e2..84bffbf 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -17,6 +17,7 @@
 * Added phpunit.php runner in the tests directory
 * Added Diff\Comparer\ValueComparer interface with CallbackComparer and 
StrictComparer implementations
 * Added MapPatcher::setValueComparer to facilitate patching maps containing 
objects
+* Added PHPUnit configuration file using the new tests/bootstrap.php
 
 ; Removals
 
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 000..2e31e7d
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,20 @@
+phpunit backupGlobals=false
+ backupStaticAttributes=false
+ bootstrap=tests/bootstrap.php
+ cacheTokens=false
+ colors=true
+ convertErrorsToExceptions=true
+ convertNoticesToExceptions=true
+ convertWarningsToExceptions=true
+ stopOnError=false
+ stopOnFailure=false
+ stopOnIncomplete=false
+ stopOnSkipped=false
+ strict=true
+ verbose=true
+testsuites
+testsuite name=Diff
+directorytests/directory
+/testsuite
+/testsuites
+/phpunit
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 000..5788a07
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,15 @@
+?php
+
+/**
+ * PHPUnit test bootstrap file for the Diff library.
+ *
+ * @since 0.6
+ *
+ * @file
+ * @ingroup Diff
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+
+require_once( __DIR__ . '/../Diff.php' );
diff --git a/tests/phpunit.php b/tests/phpunit.php
index 7f44963..e0bfc4f 100755
--- a/tests/phpunit.php
+++ b/tests/phpunit.php
@@ -10,13 +10,19 @@
 
 require_once( 'PHPUnit/Autoload.php' );
 
-require_once( __DIR__ . '/../Diff.php' );
+require_once( __DIR__ . '/bootstrap.php' );
+
+echo 'Running tests for Diff version ' . Diff_VERSION . .\n;
+
+$arguments = $_SERVER['argv'];
+array_shift( $arguments );
+
+if ( array_search( '--group', $arguments ) === false ) {
+   $arguments[] = '--group';
+   $arguments[] = 'Diff';
+}
+
+$arguments[] = __DIR__;
 
 $runner = new PHPUnit_TextUI_Command();
-
-$runner-run( array(
-   __FILE__,
-   '--group',
-   'Diff',
-   __DIR__
-) );
\ No newline at end of file
+$runner-run( $arguments );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida13de815cf8f2ea9b4d8bf132d9c224fd8c7dc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Daniel Werner daniel.wer...@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] 0.6 release - change (mediawiki...Diff)

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

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


Change subject: 0.6 release
..

0.6 release

Change-Id: I3177d5ca0824b7a1a50166c2234ff14c2bcfec41
---
M Diff.php
M RELEASE-NOTES
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/Diff.php b/Diff.php
index 0e53e8e..8ef7b23 100644
--- a/Diff.php
+++ b/Diff.php
@@ -28,7 +28,7 @@
  * @ingroup Test
  */
 
-define( 'Diff_VERSION', '0.6 alpha' );
+define( 'Diff_VERSION', '0.6' );
 
 // @codeCoverageIgnoreStart
 call_user_func( function() {
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 84bffbf..7975a00 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -5,7 +5,7 @@
 
 
 === Version 0.6 ===
-dev
+2013-05-08
 
 ; Compatibility changes
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3177d5ca0824b7a1a50166c2234ff14c2bcfec41
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] 0.6 release - change (mediawiki...Diff)

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

Change subject: 0.6 release
..


0.6 release

Change-Id: I3177d5ca0824b7a1a50166c2234ff14c2bcfec41
---
M Diff.php
M RELEASE-NOTES
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/Diff.php b/Diff.php
index 0e53e8e..8ef7b23 100644
--- a/Diff.php
+++ b/Diff.php
@@ -28,7 +28,7 @@
  * @ingroup Test
  */
 
-define( 'Diff_VERSION', '0.6 alpha' );
+define( 'Diff_VERSION', '0.6' );
 
 // @codeCoverageIgnoreStart
 call_user_func( function() {
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 84bffbf..7975a00 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -5,7 +5,7 @@
 
 
 === Version 0.6 ===
-dev
+2013-05-08
 
 ; Compatibility changes
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3177d5ca0824b7a1a50166c2234ff14c2bcfec41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] accommodate slight change to behavior of Next button - change (qa/browsertests)

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

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


Change subject: accommodate slight change to behavior of Next button
..

accommodate slight change to behavior of Next button

Change-Id: Idec61541b55109a4e12295658d00ae9838353382
---
M features/step_definitions/upload_wizard_steps.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/24/62824/1

diff --git a/features/step_definitions/upload_wizard_steps.rb 
b/features/step_definitions/upload_wizard_steps.rb
index 497bfb3..01af4a9 100644
--- a/features/step_definitions/upload_wizard_steps.rb
+++ b/features/step_definitions/upload_wizard_steps.rb
@@ -52,7 +52,7 @@
   @browser.url.should == on(UploadWizardPage).class.url
 end
 Then /^Next button should be there$/ do
-  on(ReleaseRightsPage).next_element.should be_visible
+  on(ReleaseRightsPage).next_element.should exist
 end
 Then /^Release rights page should open$/ do
   @browser.url.should == on(ReleaseRightsPage).class.url

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idec61541b55109a4e12295658d00ae9838353382
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Better regexp for typeof attribute; use normalizeOut for p... - change (mediawiki...Parsoid)

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

Change subject: Better regexp for typeof attribute; use normalizeOut for 
parsoid-only tests.
..


Better regexp for typeof attribute; use normalizeOut for parsoid-only tests.

1. Use consistent normalization for parsoid-only tests (normalizeOut for
both parsoid output and the output specified in the parserTests file,
although we normalize the DOM read in from parserTests before normalizing).

2. Match typeof attributes during normalization, even if they are not the
first attribute in their tag.

Five different parserTests newly pass.  There are two new failures, both due
to the fact that we accurately strip span typeof=Object/Template now.
In the Ugly nesting test case, the typeof used to be hidden by another
attribute in front of it; aka the output was always wrong.  In the
confirming safety of fix test case, an initial span in the template
content is used instead of a newly-added span wrapper, and so normalize
strips an attribute when it shouldn't.  Both of these will be fixed
in upstream parserTests.

Change-Id: I823e5515698764b5b7fbed4a1bd902f8233e71c7
---
M js/lib/mediawiki.Util.js
M js/tests/parserTests-blacklist.js
M js/tests/parserTests.js
3 files changed, 9 insertions(+), 7 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, but someone else must approve
  GWicke: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 82ab83b..8934503 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -1013,7 +1013,7 @@
}
out = normalizeNewlines( out );
return out
-   .replace(/span 
typeof=mw:(?:(?:Placeholder|Nowiki|Object\/Template|Entity))(?: 
[^\0-\cZ\s\\'\/=]+(?:=[^]*)?)*((?:[^]+|(?!\/span).)*)\/span/g, '$1')
+   .replace(/span(?: [^]+)* 
typeof=mw:(?:(?:Placeholder|Nowiki|Object\/Template|Entity))(?: 
[^\0-\cZ\s\\'\/=]+(?:=[^]*)?)*((?:[^]+|(?!\/span).)*)\/span/g, '$1')
// Ignore these attributes for now
.replace(/ 
(data-mw|data-parsoid|typeof|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content|title|class)=[^]*/g,
 '')
// replace mwt ids
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index 389b833..9f8a41a 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -113,13 +113,8 @@
 add(wt2html, Bug 6563: Section extraction for section shown by 
includeonly);
 add(wt2html, Bug 6563: Section extraction for section suppressed by 
includeonly);
 add(wt2html, 2. includeonly in html attr value);
-add(wt2html, Templates: 2. Inside a block tag);
 add(wt2html, Templates: P-wrapping: 1a. Templates on consecutive lines);
 add(wt2html, Templates: P-wrapping: 1b. Templates on consecutive lines);
-add(wt2html, Templates: P-wrapping: 1c. Templates on consecutive lines);
-add(wt2html, Templates: Inline Text: 1. Multiple tmeplate uses);
-add(wt2html, Templates: Inline Text: 2. Back-to-back template uses);
-add(wt2html, Templates: Links: 5. Generation of link text);
 add(wt2html, Templates: HTML Tag: 2. Generation of HTML attr. value);
 add(wt2html, Templates: HTML Tag: 3. Generation of HTML attr key and 
value);
 add(wt2html, Templates: Wiki Tables: 1a. Fostering of entire template 
content);
@@ -129,6 +124,7 @@
 add(wt2html, Templates: Wiki Tables: 4. Templated tags, no content);
 add(wt2html, Templates: Lists: Multi-line list-items via templates);
 add(wt2html, Templates: Ugly nesting: 1. Quotes opened/closed across 
templates (echo));
+add(wt2html, Templates: Ugly nesting: 2. Quotes opened/closed across 
templates (echo_with_span)\n(PHP parser generates misnested html));
 add(wt2html, Templates: Ugly nesting: 4. Divs opened/closed across 
templates);
 add(wt2html, Templates: Ugly templates: 2. Navbox template parses badly 
leading to table misnesting\n(Parsoid-centric));
 add(wt2html, Templates: Ugly templates: 4. newline-only template parameter 
inconsistency);
@@ -142,6 +138,7 @@
 add(wt2html, pre-save transform: unclosed tag);
 add(wt2html, pre-save transform: mixed tag case);
 add(wt2html, pre-save transform: unclosed comment in nowiki);
+add(wt2html, (confirming safety of fix for subst bug 1936));
 add(wt2html, pre-save transform: noinclude in subst (bug 3298));
 add(wt2html, pre-save transform: onlyinclude in subst (bug 3298));
 add(wt2html, bug 22297: safesubst: works during PST);
diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index f879a99..4c671e1 100755
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -1121,7 +1121,12 @@
normalizedOut = Util.normalizeOut( out );
 
if ( item.cachedNormalizedHTML === null ) {
-   normalizedExpected = Util.normalizeHTML( item.result );
+   if ('parsoid' in item.options) {
+   var 

[MediaWiki-commits] [Gerrit] Mobile Zero extension shared configuration settings - change (operations/mediawiki-config)

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

Change subject: Mobile Zero extension shared configuration settings
..


Mobile Zero extension shared configuration settings

* For META, enable custom editor for config pages in Zero: namespace
* For zero sites, set configuration location (meta)
* Changed include{) - include_once() for codeeditor for scribunto

Change-Id: I1b47571cd58710104e4840cdff5630bb407ca863
---
M wmf-config/CommonSettings.php
M wmf-config/mobile.php
2 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d3d013a..ad0fe99 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2522,7 +2522,7 @@
 }
 
 if ( $wmgUseScribunto ) {
-   include( $IP/extensions/CodeEditor/CodeEditor.php );
+   include_once( $IP/extensions/CodeEditor/CodeEditor.php );
// Don't enable core functionality until it has been reviewed and 
approved
$wgCodeEditorEnableCore = false;
 
@@ -2748,7 +2748,10 @@
 }
 
 if ( $wmgUseZeroNamespace ) {
+   include_once( $IP/extensions/CodeEditor/CodeEditor.php );
+   require_once( 
$IP/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.php );
$wgGroupPermissions['zeroadmin']['zero-edit'] = true;
+   $wgZeroRatedMobileAccessEnableZeroConfigPages = true;
 }
 
 if ( $wmgUseAccountAudit ) {
diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index c20bbfa..f83ab79 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -54,6 +54,7 @@
 
 if ( $wmgZeroRatedMobileAccess ) {
require_once( 
$IP/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.php );
+   $wgZeroRatedMobileAccessConfigIndexUri = 
'http://meta.wikimedia.org/w/index.php';
 }
 
 if ( $wmgZeroDisableImages ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b47571cd58710104e4840cdff5630bb407ca863
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Yurik yu...@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] Make jslint for voting for MobileFrontend - change (integration/zuul-config)

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

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


Change subject: Make jslint for voting for MobileFrontend
..

Make jslint for voting for MobileFrontend

Someone told me Jon Robson would love this...

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


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

diff --git a/layout.yaml b/layout.yaml
index d570dc7..37561e4 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -317,6 +317,8 @@
 voting: true
   - name: mwext-Math-jslint
 voting: true
+  - name: mwext-MobileFrontend-jslint
+voting: true
   - name: mwext-PHPExcel-jslint
 voting: true
   - name: mwext-PostEdit-jslint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id03fceeaf9d5a69183f77e71d08d4e3998859aa5
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
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] Added @covers tags to PHPUnit tests to increase accuracy of ... - change (mediawiki...Diff)

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

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


Change subject: Added @covers tags to PHPUnit tests to increase accuracy of 
code coverage reports
..

Added @covers tags to PHPUnit tests to increase accuracy of code coverage 
reports

Change-Id: Ic9f41490e8dcab52d7b1dc57682d4ace8f7afb3d
---
M tests/phpunit/Comparer/CallbackComparerTest.php
M tests/phpunit/Comparer/StrictComparerTest.php
M tests/phpunit/DiffOpFactoryTest.php
M tests/phpunit/differ/CallbackListDifferTest.php
M tests/phpunit/differ/ListDifferTest.php
M tests/phpunit/differ/MapDifferTest.php
M tests/phpunit/diffop/DiffAsOpTest.php
M tests/phpunit/diffop/DiffOpAddTest.php
M tests/phpunit/diffop/DiffOpChangeTest.php
M tests/phpunit/diffop/DiffOpRemoveTest.php
M tests/phpunit/diffop/DiffTest.php
M tests/phpunit/diffop/ListDiffTest.php
M tests/phpunit/diffop/MapDiffTest.php
M tests/phpunit/patcher/ListPatcherTest.php
M tests/phpunit/patcher/MapPatcherTest.php
15 files changed, 17 insertions(+), 13 deletions(-)


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

diff --git a/tests/phpunit/Comparer/CallbackComparerTest.php 
b/tests/phpunit/Comparer/CallbackComparerTest.php
index ef70534..80b5549 100644
--- a/tests/phpunit/Comparer/CallbackComparerTest.php
+++ b/tests/phpunit/Comparer/CallbackComparerTest.php
@@ -6,6 +6,8 @@
 use Diff\Tests\DiffTestCase;
 
 /**
+ * @covers Diff\Comparer\CallbackComparer
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/tests/phpunit/Comparer/StrictComparerTest.php 
b/tests/phpunit/Comparer/StrictComparerTest.php
index a6d8472..df5392d 100644
--- a/tests/phpunit/Comparer/StrictComparerTest.php
+++ b/tests/phpunit/Comparer/StrictComparerTest.php
@@ -6,6 +6,8 @@
 use Diff\Tests\DiffTestCase;
 
 /**
+ * @covers Diff\Comparer\StrictComparer
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/tests/phpunit/DiffOpFactoryTest.php 
b/tests/phpunit/DiffOpFactoryTest.php
index f757151..fd030ca 100644
--- a/tests/phpunit/DiffOpFactoryTest.php
+++ b/tests/phpunit/DiffOpFactoryTest.php
@@ -10,7 +10,7 @@
 use Diff\DiffOpRemove;
 
 /**
- * Tests for the Diff\DiffOpFactory class.
+ * @covers Diff\DiffOpFactory
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/tests/phpunit/differ/CallbackListDifferTest.php 
b/tests/phpunit/differ/CallbackListDifferTest.php
index 00d87e0..d92c830 100644
--- a/tests/phpunit/differ/CallbackListDifferTest.php
+++ b/tests/phpunit/differ/CallbackListDifferTest.php
@@ -8,7 +8,7 @@
 use Diff\Differ;
 
 /**
- * Tests for the Diff\CallbackListDiffer class.
+ * @covers Diff\CallbackListDiffer
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/tests/phpunit/differ/ListDifferTest.php 
b/tests/phpunit/differ/ListDifferTest.php
index e8cc3e6..22ff6f6 100644
--- a/tests/phpunit/differ/ListDifferTest.php
+++ b/tests/phpunit/differ/ListDifferTest.php
@@ -8,7 +8,7 @@
 use Diff\ListDiffer;
 
 /**
- * Tests for the Diff\ListDiffer class.
+ * @covers Diff\ListDiffer
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/tests/phpunit/differ/MapDifferTest.php 
b/tests/phpunit/differ/MapDifferTest.php
index 857badf..27a4d03 100644
--- a/tests/phpunit/differ/MapDifferTest.php
+++ b/tests/phpunit/differ/MapDifferTest.php
@@ -8,7 +8,7 @@
 use Diff\MapDiffer;
 
 /**
- * Tests for the Diff\MapDiffer class.
+ * @covers Diff\MapDiffer
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/tests/phpunit/diffop/DiffAsOpTest.php 
b/tests/phpunit/diffop/DiffAsOpTest.php
index 726d13b..56f4f19 100644
--- a/tests/phpunit/diffop/DiffAsOpTest.php
+++ b/tests/phpunit/diffop/DiffAsOpTest.php
@@ -5,7 +5,7 @@
 use Diff\Diff;
 
 /**
- * Tests for the Diff\Diff class.
+ * @covers Diff\Diff
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/tests/phpunit/diffop/DiffOpAddTest.php 
b/tests/phpunit/diffop/DiffOpAddTest.php
index 9a53a12..0b91e66 100644
--- a/tests/phpunit/diffop/DiffOpAddTest.php
+++ b/tests/phpunit/diffop/DiffOpAddTest.php
@@ -5,7 +5,7 @@
 use Diff\DiffOpAdd as DiffOpAdd;
 

[MediaWiki-commits] [Gerrit] Use Html::element() to build the links used in 'alphaindexli... - change (mediawiki/core)

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

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


Change subject: Use Html::element() to build the links used in 'alphaindexline' 
message
..

Use Html::element() to build the links used in 'alphaindexline' message

It makes the code more readable.

Change-Id: I42e566188e826bd81881c83c069c9f75f5906d73
---
M includes/specials/SpecialAllpages.php
1 file changed, 9 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/62827/1

diff --git a/includes/specials/SpecialAllpages.php 
b/includes/specials/SpecialAllpages.php
index 98ec4f6..a082049 100644
--- a/includes/specials/SpecialAllpages.php
+++ b/includes/specials/SpecialAllpages.php
@@ -308,8 +308,10 @@
function showline( $inpoint, $outpoint, $namespace = NS_MAIN, 
$hideRedirects = false ) {
// Use content language since page titles are considered to use 
content language
global $wgContLang;
-   $inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) 
);
-   $outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint 
) );
+
+   $inpointf = str_replace( '_', ' ', $inpoint );
+   $outpointf = str_replace( '_', ' ', $outpoint );
+
// Don't let the length runaway
$inpointf = $wgContLang-truncate( $inpointf, 
$this-maxPageLength );
$outpointf = $wgContLang-truncate( $outpointf, 
$this-maxPageLength );
@@ -326,12 +328,13 @@
$queryParams['hideredirects'] = 1;
}
 
-   $link = htmlspecialchars(
-   $this-getTitle()-getLocalURL( $queryParams ) );
+   $url = $this-getTitle()-getLocalURL( $queryParams );
+   $inlink = Html::element( 'a', array( 'href' = $url ), 
$inpointf );
+   $outlink = Html::element( 'a', array( 'href' = $url ), 
$outpointf );
 
$out = $this-msg( 'alphaindexline' )-rawParams(
-   a href=\$link\$inpointf/a/tdtd,
-   /tdtda href=\$link\$outpointf/a
+   $inlink/tdtd,
+   /tdtd$outlink
)-escaped();
 
return 'trtd class=mw-allpages-alphaindexline' . $out . 
'/td/tr';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42e566188e826bd81881c83c069c9f75f5906d73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch

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


  1   2   3   >