[MediaWiki-commits] [Gerrit] flag API tests with @medium - change (mediawiki...TimedMediaHandler)

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

Change subject: flag API tests with @medium
..


flag API tests with @medium

MediaWiki core now complains when one use API tests wich are not flagged
with a long timeout (@group medium or @group large).

Bug: 61875
Change-Id: I88a1a5449e0f10c8647915442b3b902d6c57954c
---
M tests/phpunit/TestApiUploadVideo.php
M tests/phpunit/TestVideoThumbnail.php
M tests/phpunit/TestVideoTranscode.php
3 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/TestApiUploadVideo.php 
b/tests/phpunit/TestApiUploadVideo.php
index e5e3623..ebc38dd 100644
--- a/tests/phpunit/TestApiUploadVideo.php
+++ b/tests/phpunit/TestApiUploadVideo.php
@@ -12,6 +12,7 @@
 /**
  * @group Database
  * @group Destructive
+ * @group medium
  */
 class TestApiUploadVideo extends ApiTestCaseVideoUpload {
 
diff --git a/tests/phpunit/TestVideoThumbnail.php 
b/tests/phpunit/TestVideoThumbnail.php
index 248a013..3db9d6d 100644
--- a/tests/phpunit/TestVideoThumbnail.php
+++ b/tests/phpunit/TestVideoThumbnail.php
@@ -2,6 +2,7 @@
 /**
  * @ingroup timedmedia
  * @author dale
+ * @group medium
  */
 class TestVideoThumbnail extends ApiTestCaseVideoUpload {
 
@@ -74,4 +75,4 @@
$this->assertEquals( $targetWidth, $srcImageWidth );
}
}
-}
\ No newline at end of file
+}
diff --git a/tests/phpunit/TestVideoTranscode.php 
b/tests/phpunit/TestVideoTranscode.php
index 1837998..c6d97d5 100644
--- a/tests/phpunit/TestVideoTranscode.php
+++ b/tests/phpunit/TestVideoTranscode.php
@@ -2,6 +2,7 @@
 /**
  * @ingroup timedmedia
  * @author michael dale
+ * @group medium
  */
 class TesVideoTranscode extends ApiTestCaseVideoUpload {
 
@@ -115,4 +116,4 @@
 
return $videoInfo['derivatives'];
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88a1a5449e0f10c8647915442b3b902d6c57954c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: J 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Mdale 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Ignore TestVideoTranscode::testTranscodeJobs - change (mediawiki...TimedMediaHandler)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Ignore TestVideoTranscode::testTranscodeJobs
..

Ignore TestVideoTranscode::testTranscodeJobs

The test is broken for now. Filled bug 61878 to get it fixed properly.

Bug: 61878
Change-Id: Iceeb66609024d009cdbd4f14e82e6de98a4262ef
---
M tests/phpunit/TestVideoTranscode.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/TestVideoTranscode.php 
b/tests/phpunit/TestVideoTranscode.php
index 6ef2227..6d07b16 100644
--- a/tests/phpunit/TestVideoTranscode.php
+++ b/tests/phpunit/TestVideoTranscode.php
@@ -12,6 +12,9 @@
 *  Test if a transcode job is added for a file once requested
 *
 * @dataProvider mediaFilesProvider
+* Broken as per bug 61878
+* @group Broken
+*
 */
function testTranscodeJobs( $file ){
// Upload the file to the mediaWiki system

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iceeb66609024d009cdbd4f14e82e6de98a4262ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] Ignore TestVideoThumbnail::testApiThumbnails - change (mediawiki...TimedMediaHandler)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Ignore TestVideoThumbnail::testApiThumbnails
..

Ignore TestVideoThumbnail::testApiThumbnails

The test is broken for now and reports for each test case:

 Undefined index: thumbwidth

Bug 61877 filled to get it fixed properly.

Bug: 61877
Change-Id: Icb1cf6ed6c559381facb0c610385516f37ea13e3
---
M tests/phpunit/TestVideoThumbnail.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/TestVideoThumbnail.php 
b/tests/phpunit/TestVideoThumbnail.php
index 3db9d6d..b3c9ef8 100644
--- a/tests/phpunit/TestVideoThumbnail.php
+++ b/tests/phpunit/TestVideoThumbnail.php
@@ -10,6 +10,8 @@
 * Once video files are uploaded test thumbnail generating
 *
 * @dataProvider mediaFilesProvider
+* Broken as per bug 61877
+* @group Broken
 */
function testApiThumbnails( $file ){
// Upload the file to the mediaWiki system

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb1cf6ed6c559381facb0c610385516f37ea13e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] Avoid key fragmentation in FileBackend - change (mediawiki/core)

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

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

Change subject: Avoid key fragmentation in FileBackend
..

Avoid key fragmentation in FileBackend

* Make sure that global backends do not prefix the cache keys
  with local wiki IDs for container and file stat entries.
  This causes fragmentation and breaks invalidation.

Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
---
M includes/filebackend/FileBackendStore.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/115301/1

diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index 9a2ebb7..16300af 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1565,7 +1565,7 @@
 * @return string
 */
private function containerCacheKey( $container ) {
-   return wfMemcKey( 'backend', $this->getName(), 'container', 
$container );
+   return 
"filebackend:{$this->name}:{$this->wikiId}:container:{$container}";
}
 
/**
@@ -1646,7 +1646,7 @@
 * @return string
 */
private function fileCacheKey( $path ) {
-   return wfMemcKey( 'backend', $this->getName(), 'file', sha1( 
$path ) );
+   return "filebackend:{$this->name}:{$this->wikiId}:file:" . 
sha1( $path );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Avoid key fragmentation in FileBackend - change (mediawiki/core)

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

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

Change subject: Avoid key fragmentation in FileBackend
..

Avoid key fragmentation in FileBackend

* Make sure that global backends do not prefix the cache keys
  with local wiki IDs for container and file stat entries.
  This causes fragmentation and breaks invalidation.

Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
---
M includes/filebackend/FileBackendStore.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/115302/1

diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index 50371f8..f63c1cf 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1501,7 +1501,7 @@
 * @return string
 */
private function containerCacheKey( $container ) {
-   return wfMemcKey( 'backend', $this->getName(), 'container', 
$container );
+   return 
"filebackend:{$this->name}:{$this->wikiId}:container:{$container}";
}
 
/**
@@ -1585,7 +1585,7 @@
 * @return string
 */
private function fileCacheKey( $path ) {
-   return wfMemcKey( 'backend', $this->getName(), 'file', sha1( 
$path ) );
+   return "filebackend:{$this->name}:{$this->wikiId}:file:" . 
sha1( $path );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Avoid key fragmentation in FileBackend - change (mediawiki/core)

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

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

Change subject: Avoid key fragmentation in FileBackend
..

Avoid key fragmentation in FileBackend

* Make sure that global backends do not prefix the cache keys
  with local wiki IDs for container and file stat entries.
  This causes fragmentation and breaks invalidation.

Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
---
M includes/filebackend/FileBackendStore.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/115300/1

diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index 9a2ebb7..16300af 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1565,7 +1565,7 @@
 * @return string
 */
private function containerCacheKey( $container ) {
-   return wfMemcKey( 'backend', $this->getName(), 'container', 
$container );
+   return 
"filebackend:{$this->name}:{$this->wikiId}:container:{$container}";
}
 
/**
@@ -1646,7 +1646,7 @@
 * @return string
 */
private function fileCacheKey( $path ) {
-   return wfMemcKey( 'backend', $this->getName(), 'file', sha1( 
$path ) );
+   return "filebackend:{$this->name}:{$this->wikiId}:file:" . 
sha1( $path );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] techblog.wikimedia.org to get its own certificate - change (operations/puppet)

2014-02-24 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: techblog.wikimedia.org to get its own certificate
..


techblog.wikimedia.org to get its own certificate

it turns out there are hundreds of links for techblog.wikimedia.org
within the projects, so simply breaking them all for HTTPS was
non-ideal.  Adding in a certificate and support for it via this
patchset.

Change-Id: I5b633d37564d5e68d45d9ca34ce5a08d152b2953
RT: 5010
---
M files/apache/sites/blog.wikimedia.org
A files/ssl/techblog.wikimedia.org.pem
M manifests/misc/blogs.pp
3 files changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/files/apache/sites/blog.wikimedia.org 
b/files/apache/sites/blog.wikimedia.org
index b5c4364..fbafd6c 100644
--- a/files/apache/sites/blog.wikimedia.org
+++ b/files/apache/sites/blog.wikimedia.org
@@ -114,4 +114,24 @@
 RewriteRule ^/$ http://blog.wikimedia.org/c/global/ [R=301]
 RewriteCond %{HTTP_HOST} ^blog.wikimediafoundation.org
 RewriteRule ^/$ http://blog.wikimedia.org/ [R=301]
+
+
+
+ServerAdmin n...@wikimedia.org
+ServerName techblog.wikimedia.org
+
+   SSLEngine on
+   SSLCertificateFile /etc/ssl/certs/techblog.wikimedia.org.pem
+   SSLCertificateKeyFile /etc/ssl/private/techblog.wikimedia.org.key
+   SSLCACertificatePath /etc/ssl/certs/
+
+   ServerAlias blog.wikimediafoundation.org
+   RewriteEngine On
+   RewriteRule ^/feed/(.*) 
https://blog.wikimedia.org/c/technology/feed/$1 [R=301]
+   RewriteRule ^/category/(.*) https://blog.wikimedia.org/c/$1 
[R=301]
+   RewriteRule ^/20(.*) https://blog.wikimedia.org/20$1 [R=301]
+   RewriteRule ^/wp-content/(.*) 
https://blog.wikimedia.org/wp-content/$1 [R=301]
+   RewriteCond %{HTTP_HOST} ^techblog.wikimedia.org
+   RewriteRule ^/$ https://blog.wikimedia.org/c/technology/ [R=301]
+
 
\ No newline at end of file
diff --git a/files/ssl/techblog.wikimedia.org.pem 
b/files/ssl/techblog.wikimedia.org.pem
new file mode 100644
index 000..3767955
--- /dev/null
+++ b/files/ssl/techblog.wikimedia.org.pem
@@ -0,0 +1,30 @@
+-BEGIN CERTIFICATE-
+MIIFMjCCBBqgAwIBAgIDEOHIMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew
+HhcNMTQwMjIyMjA1OTQxWhcNMTUwMjI2MDkzNzI0WjCBxTEpMCcGA1UEBRMga1Aw
+bGFWQ3FyTEZyNG5wOWIwU1VKL1dSUjB2NFVlUDYxEzARBgNVBAsTCkdUOTk0NTIw
+MjIxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg
+KGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk
+U1NMKFIpMR8wHQYDVQQDExZ0ZWNoYmxvZy53aWtpbWVkaWEub3JnMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0g8xRm+2shfbmEfN2yCrUSCMd25DJCvU
+QE0RqsRHyxMtq9Eq8lSXS2D3/jKH7ezwhjX3ZjDX9KDkVe9XlCBeQY6EWK7kP1t1
+RYWW1P5vVc3YWPRSYeJqag9sd/BhbxgTeEjoC7BFwBPJY67nm5PBRiOoL+RD/Y6a
+bDXcV9jk2dqECMuwhg9RYadxsk5jjv72tkxUldPgswyXbzbBD+P4Mhpah9rVgXCR
+UPl3638JTNUdc8z9dU2A5F/zerViB+8lvM1cBwXZsSZ/6Wx0BuT9ZCHOmii2Q9ob
+/osyIh2Mv4WwITbjgz+JdchHGb/oZIua9X1TPjusZduSNcq33tWrkQIDAQABo4IB
+sTCCAa0wHwYDVR0jBBgwFoAUa2k9ahhCSt2PAmU5/TUkhniRFjAwDgYDVR0PAQH/
+BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAhBgNVHREEGjAY
+ghZ0ZWNoYmxvZy53aWtpbWVkaWEub3JnMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6
+Ly9yYXBpZHNzbC1jcmwuZ2VvdHJ1c3QuY29tL2NybHMvcmFwaWRzc2wuY3JsMB0G
+A1UdDgQWBBR+es1+r+uMlIMDNyFIK8Bgri4qRDAMBgNVHRMBAf8EAjAAMHgGCCsG
+AQUFBwEBBGwwajAtBggrBgEFBQcwAYYhaHR0cDovL3JhcGlkc3NsLW9jc3AuZ2Vv
+dHJ1c3QuY29tMDkGCCsGAQUFBzAChi1odHRwOi8vcmFwaWRzc2wtYWlhLmdlb3Ry
+dXN0LmNvbS9yYXBpZHNzbC5jcnQwTAYDVR0gBEUwQzBBBgpghkgBhvhFAQc2MDMw
+MQYIKwYBBQUHAgEWJWh0dHA6Ly93d3cuZ2VvdHJ1c3QuY29tL3Jlc291cmNlcy9j
+cHMwDQYJKoZIhvcNAQEFBQADggEBAHQIg7xmS+7OuF0O3aZv7Otgto0JaUDFycCi
+E9aHeN0j4k9uGCWUOOncI5ppe0cK5EBMGXGH4Bikh6+GA5W2m+lEs8Ys8SzEOYSW
+EbrgZIyBECUfztuuzbA8h8LuauvnsLk1C7jxve5nJvuWn53zPTAlDbjXUjtgneGs
+3TROD2e7cTwUSwjH1sYY8S/mPYpiP1GelJ4YiETOmG4i1Mueot8ESHNgsIQe1riN
+dsvlR9Xki7sxNWt4qrf6F4vpste4Mjr/WjqXvr1zxQdMXE/aZIbdsRiMJ3TYy66w
+D+1gU23jXgXTKrM0CHiUg66P4GbWm6BqpdcU6QQLF2ACvGCnzBU=
+-END CERTIFICATE-
diff --git a/manifests/misc/blogs.pp b/manifests/misc/blogs.pp
index 863b821..35bb608 100644
--- a/manifests/misc/blogs.pp
+++ b/manifests/misc/blogs.pp
@@ -33,6 +33,8 @@
 include nrpe
 class { 'memcached': memcached_ip => '127.0.0.1' }
 install_certificate{ 'blog.wikimedia.org': }
+install_certificate{ 'techblog.wikimedia.org': }
+
 
 # There's not really a good reason for this to be "",
 # except that it was like that when I found it.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b633d37564d5e68d45d9ca34ce5a08d152b2953
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer:

[MediaWiki-commits] [Gerrit] Enable VE in the "Recherche:" (104) namespace for frwikiversity - change (operations/mediawiki-config)

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

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

Change subject: Enable VE in the "Recherche:" (104) namespace for frwikiversity
..

Enable VE in the "Recherche:" (104) namespace for frwikiversity

Bug: 61874
Change-Id: I706b6e29d2156baa24dac8ea72247f76ee23a2e2
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cc877f0..458d21c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10700,6 +10700,8 @@
'+enwiki' => array( 100 /* Portal */, 108 /* Book */, 118 /* Draft */ 
), // Bug 56001
// Wiktionaries
'svwiktionary' => array( NS_USER ), // Bug 57356
+   // Wikiversities
+   '+frwikiverity' => array( 104 ), // Bug 61874
// Wikimedia wikis
'+sewikimedia' => array( 100 /* Projekt */ ), // bug 60882
// Private wikis

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

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

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


[MediaWiki-commits] [Gerrit] techblog.wikimedia.org to get its own certificate - change (operations/puppet)

2014-02-24 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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

Change subject: techblog.wikimedia.org to get its own certificate
..

techblog.wikimedia.org to get its own certificate

it turns out there are hundreds of links for techblog.wikimedia.org
within the projects, so simply breaking them all for HTTPS was
non-ideal.  Adding in a certificate and support for it via this
patchset.

Change-Id: I5b633d37564d5e68d45d9ca34ce5a08d152b2953
RT: 5010
---
M files/apache/sites/blog.wikimedia.org
A files/ssl/techblog.wikimedia.org.pem
M manifests/misc/blogs.pp
3 files changed, 50 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/115298/1

diff --git a/files/apache/sites/blog.wikimedia.org 
b/files/apache/sites/blog.wikimedia.org
index b5c4364..34d9112 100644
--- a/files/apache/sites/blog.wikimedia.org
+++ b/files/apache/sites/blog.wikimedia.org
@@ -114,4 +114,22 @@
 RewriteRule ^/$ http://blog.wikimedia.org/c/global/ [R=301]
 RewriteCond %{HTTP_HOST} ^blog.wikimediafoundation.org
 RewriteRule ^/$ http://blog.wikimedia.org/ [R=301]
+
+
+
+ServerAdmin n...@wikimedia.org
+ServerName techblog.wikimedia.org
+SSLEngine on   
+SSLCertificateFile /etc/ssl/certs/techblog.wikimedia.org.pem
+SSLCertificateKeyFile /etc/ssl/private/techblog.wikimedia.org.key
+SSLCACertificatePath /etc/ssl/certs/
+   
+ServerAlias blog.wikimediafoundation.org
+RewriteEngine On
+RewriteRule ^/feed/(.*) https://blog.wikimedia.org/c/technology/feed/$1 
[R=301] 
+RewriteRule ^/category/(.*) https://blog.wikimedia.org/c/$1 [R=301]
+RewriteRule ^/20(.*) https://blog.wikimedia.org/20$1 [R=301]
+RewriteRule ^/wp-content/(.*) https://blog.wikimedia.org/wp-content/$1 [R=301] 
+RewriteCond %{HTTP_HOST} ^techblog.wikimedia.org
+RewriteRule ^/$ https://blog.wikimedia.org/c/technology/ [R=301]
 
\ No newline at end of file
diff --git a/files/ssl/techblog.wikimedia.org.pem 
b/files/ssl/techblog.wikimedia.org.pem
new file mode 100644
index 000..3767955
--- /dev/null
+++ b/files/ssl/techblog.wikimedia.org.pem
@@ -0,0 +1,30 @@
+-BEGIN CERTIFICATE-
+MIIFMjCCBBqgAwIBAgIDEOHIMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew
+HhcNMTQwMjIyMjA1OTQxWhcNMTUwMjI2MDkzNzI0WjCBxTEpMCcGA1UEBRMga1Aw
+bGFWQ3FyTEZyNG5wOWIwU1VKL1dSUjB2NFVlUDYxEzARBgNVBAsTCkdUOTk0NTIw
+MjIxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg
+KGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk
+U1NMKFIpMR8wHQYDVQQDExZ0ZWNoYmxvZy53aWtpbWVkaWEub3JnMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0g8xRm+2shfbmEfN2yCrUSCMd25DJCvU
+QE0RqsRHyxMtq9Eq8lSXS2D3/jKH7ezwhjX3ZjDX9KDkVe9XlCBeQY6EWK7kP1t1
+RYWW1P5vVc3YWPRSYeJqag9sd/BhbxgTeEjoC7BFwBPJY67nm5PBRiOoL+RD/Y6a
+bDXcV9jk2dqECMuwhg9RYadxsk5jjv72tkxUldPgswyXbzbBD+P4Mhpah9rVgXCR
+UPl3638JTNUdc8z9dU2A5F/zerViB+8lvM1cBwXZsSZ/6Wx0BuT9ZCHOmii2Q9ob
+/osyIh2Mv4WwITbjgz+JdchHGb/oZIua9X1TPjusZduSNcq33tWrkQIDAQABo4IB
+sTCCAa0wHwYDVR0jBBgwFoAUa2k9ahhCSt2PAmU5/TUkhniRFjAwDgYDVR0PAQH/
+BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAhBgNVHREEGjAY
+ghZ0ZWNoYmxvZy53aWtpbWVkaWEub3JnMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6
+Ly9yYXBpZHNzbC1jcmwuZ2VvdHJ1c3QuY29tL2NybHMvcmFwaWRzc2wuY3JsMB0G
+A1UdDgQWBBR+es1+r+uMlIMDNyFIK8Bgri4qRDAMBgNVHRMBAf8EAjAAMHgGCCsG
+AQUFBwEBBGwwajAtBggrBgEFBQcwAYYhaHR0cDovL3JhcGlkc3NsLW9jc3AuZ2Vv
+dHJ1c3QuY29tMDkGCCsGAQUFBzAChi1odHRwOi8vcmFwaWRzc2wtYWlhLmdlb3Ry
+dXN0LmNvbS9yYXBpZHNzbC5jcnQwTAYDVR0gBEUwQzBBBgpghkgBhvhFAQc2MDMw
+MQYIKwYBBQUHAgEWJWh0dHA6Ly93d3cuZ2VvdHJ1c3QuY29tL3Jlc291cmNlcy9j
+cHMwDQYJKoZIhvcNAQEFBQADggEBAHQIg7xmS+7OuF0O3aZv7Otgto0JaUDFycCi
+E9aHeN0j4k9uGCWUOOncI5ppe0cK5EBMGXGH4Bikh6+GA5W2m+lEs8Ys8SzEOYSW
+EbrgZIyBECUfztuuzbA8h8LuauvnsLk1C7jxve5nJvuWn53zPTAlDbjXUjtgneGs
+3TROD2e7cTwUSwjH1sYY8S/mPYpiP1GelJ4YiETOmG4i1Mueot8ESHNgsIQe1riN
+dsvlR9Xki7sxNWt4qrf6F4vpste4Mjr/WjqXvr1zxQdMXE/aZIbdsRiMJ3TYy66w
+D+1gU23jXgXTKrM0CHiUg66P4GbWm6BqpdcU6QQLF2ACvGCnzBU=
+-END CERTIFICATE-
diff --git a/manifests/misc/blogs.pp b/manifests/misc/blogs.pp
index 863b821..35bb608 100644
--- a/manifests/misc/blogs.pp
+++ b/manifests/misc/blogs.pp
@@ -33,6 +33,8 @@
 include nrpe
 class { 'memcached': memcached_ip => '127.0.0.1' }
 install_certificate{ 'blog.wikimedia.org': }
+install_certificate{ 'techblog.wikimedia.org': }
+
 
 # There's not really a good reason for this to be "",
 # except that it was like that when I found it.

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

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

___
MediaWiki-commits mailing list
MediaWiki

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: dd02bef..063b3f5 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: dd02bef..063b3f5
..

Syncronize VisualEditor: dd02bef..063b3f5

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


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

diff --git a/VisualEditor b/VisualEditor
index dd02bef..063b3f5 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit dd02bef985d2ebfe0e804b2f1878a73d635acbcf
+Subproject commit 063b3f512d1b67b9e73f1c1420d6f5f6fcc6bc27

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fb2648c459951ad386fdf39f186caca949caf23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: dd02bef..063b3f5 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: dd02bef..063b3f5
..


Syncronize VisualEditor: dd02bef..063b3f5

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

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index dd02bef..063b3f5 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit dd02bef985d2ebfe0e804b2f1878a73d635acbcf
+Subproject commit 063b3f512d1b67b9e73f1c1420d6f5f6fcc6bc27

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fb2648c459951ad386fdf39f186caca949caf23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Always try to put redirects at index 0, offset 0 - change (mediawiki...VisualEditor)

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

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

Change subject: Always try to put redirects at index 0, offset 0
..

Always try to put redirects at index 0, offset 0

This is a hack to make redirects work whilst Parsoid just dumbly inserts them 
in-
place, and should be removed once Parsoid handles that logic.

Bug: 61862
Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d
---
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
index de1e1ae..aab4c54 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
@@ -309,7 +309,8 @@
} else {
if ( newRedirectData ) {
// There's no existing redirect but there is a 
new one, so create
-   this.metaList.insertMeta( newRedirectItemData );
+   // HACK: Putting this at index 0, offset 0 so 
that it works – bug 61862
+   this.metaList.insertMeta( newRedirectItemData, 
0, 0 );
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] flag API tests with @medium - change (mediawiki...TimedMediaHandler)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: flag API tests with @medium
..

flag API tests with @medium

MediaWiki core now complains when one use API tests wich are not flagged
with a long timeout (@group medium or @group large).

Change-Id: I88a1a5449e0f10c8647915442b3b902d6c57954c
---
M tests/phpunit/TestApiUploadVideo.php
M tests/phpunit/TestVideoThumbnail.php
M tests/phpunit/TestVideoTranscode.php
3 files changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/72/115272/1

diff --git a/tests/phpunit/TestApiUploadVideo.php 
b/tests/phpunit/TestApiUploadVideo.php
index e5e3623..ebc38dd 100644
--- a/tests/phpunit/TestApiUploadVideo.php
+++ b/tests/phpunit/TestApiUploadVideo.php
@@ -12,6 +12,7 @@
 /**
  * @group Database
  * @group Destructive
+ * @group medium
  */
 class TestApiUploadVideo extends ApiTestCaseVideoUpload {
 
diff --git a/tests/phpunit/TestVideoThumbnail.php 
b/tests/phpunit/TestVideoThumbnail.php
index 248a013..3db9d6d 100644
--- a/tests/phpunit/TestVideoThumbnail.php
+++ b/tests/phpunit/TestVideoThumbnail.php
@@ -2,6 +2,7 @@
 /**
  * @ingroup timedmedia
  * @author dale
+ * @group medium
  */
 class TestVideoThumbnail extends ApiTestCaseVideoUpload {
 
@@ -74,4 +75,4 @@
$this->assertEquals( $targetWidth, $srcImageWidth );
}
}
-}
\ No newline at end of file
+}
diff --git a/tests/phpunit/TestVideoTranscode.php 
b/tests/phpunit/TestVideoTranscode.php
index 1837998..c6d97d5 100644
--- a/tests/phpunit/TestVideoTranscode.php
+++ b/tests/phpunit/TestVideoTranscode.php
@@ -2,6 +2,7 @@
 /**
  * @ingroup timedmedia
  * @author michael dale
+ * @group medium
  */
 class TesVideoTranscode extends ApiTestCaseVideoUpload {
 
@@ -115,4 +116,4 @@
 
return $videoInfo['derivatives'];
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88a1a5449e0f10c8647915442b3b902d6c57954c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] Typo TesVideoTranscode -> TestVideoTranscode - change (mediawiki...TimedMediaHandler)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Typo TesVideoTranscode -> TestVideoTranscode
..

Typo TesVideoTranscode -> TestVideoTranscode

The class name was not matching the test file name (typo in class name).

Change-Id: Ib491dc852e9795fec1df027e4382cffee0045216
---
M tests/phpunit/TestVideoTranscode.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/phpunit/TestVideoTranscode.php 
b/tests/phpunit/TestVideoTranscode.php
index c6d97d5..6ef2227 100644
--- a/tests/phpunit/TestVideoTranscode.php
+++ b/tests/phpunit/TestVideoTranscode.php
@@ -4,7 +4,7 @@
  * @author michael dale
  * @group medium
  */
-class TesVideoTranscode extends ApiTestCaseVideoUpload {
+class TestVideoTranscode extends ApiTestCaseVideoUpload {
 
/**
 * Once video files are uploaded test transcoding

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib491dc852e9795fec1df027e4382cffee0045216
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] Fix path in UnitTestsList hook - change (mediawiki...CirrusSearch)

2014-02-24 Thread Chad (Code Review)
Chad has submitted this change and it was merged.

Change subject: Fix path in UnitTestsList hook
..


Fix path in UnitTestsList hook

The function registered the unit test files has probably be moved from
the root path down to includes/Hooks.php.  The path to find *Test.php
file did not get updated and tests were no more found.

Change-Id: I87e64580d60eee2c010eee8be51b7600110f9540
---
M includes/Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index a3166e7..ccd762c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -196,7 +196,7 @@
 * @return bool
 */
public static function getUnitTestsList( &$files ) {
-   $files = array_merge( $files, glob( __DIR__ . 
'/tests/unit/*Test.php' ) );
+   $files = array_merge( $files, glob( __DIR__ . 
'/../tests/unit/*Test.php' ) );
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87e64580d60eee2c010eee8be51b7600110f9540
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Manybubbles 

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


[MediaWiki-commits] [Gerrit] Unit tests for TimedMediaHandler (non voting) - change (integration/zuul-config)

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

Change subject: Unit tests for TimedMediaHandler (non voting)
..


Unit tests for TimedMediaHandler (non voting)

They were not enable because we could not declare the MwEmbedSupport
dependency.  This is now possible so enable the tests though making them
non voting because they are broken.

Bug: 61875
Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
---
M layout.yaml
1 file changed, 7 insertions(+), 9 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index a657056..b2b12b4 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -634,6 +634,10 @@
   - name: ^mwext-FlaggedRevs-testextensions.*
 voting: false
 
+  # bug 61875
+  - name: ^mwext-TimedMediaHandler-testextensions-.*
+voting: false
+
   # mwext-SideBarMenu-testextensions-master
   - name: ^mwext-SideBarMenu-testextensions-.*
 voting: false
@@ -2587,15 +2591,9 @@
 extname: Thanks
 
   - name: mediawiki/extensions/TimedMediaHandler
-check-only:
-  - mwext-TimedMediaHandler-jslint
-  - mwext-TimedMediaHandler-lint
-gate-and-submit:
-  - mwext-TimedMediaHandler-jslint
-  - mwext-TimedMediaHandler-lint
-# FIXME Requires the MwEmbedSupport extension :(
-#  - mwext-TimedMediaHandler-lint:
-#- mwext-TimedMediaHandler-testextensions-master
+template:
+  - name: extension-unittests
+extname: TimedMediaHandler
 
   - name: mediawiki/extensions/timeline
 check-only:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Unit tests for TimedMediaHandler (non voting) - change (integration/zuul-config)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Unit tests for TimedMediaHandler (non voting)
..

Unit tests for TimedMediaHandler (non voting)

They were not enable because we could not declare the MwEmbedSupport
dependency.  This is now possible so enable the tests though making them
non voting because they are broken.

Bug: 61875
Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
---
M layout.yaml
1 file changed, 7 insertions(+), 9 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index a657056..b2b12b4 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -634,6 +634,10 @@
   - name: ^mwext-FlaggedRevs-testextensions.*
 voting: false
 
+  # bug 61875
+  - name: ^mwext-TimedMediaHandler-testextensions-.*
+voting: false
+
   # mwext-SideBarMenu-testextensions-master
   - name: ^mwext-SideBarMenu-testextensions-.*
 voting: false
@@ -2587,15 +2591,9 @@
 extname: Thanks
 
   - name: mediawiki/extensions/TimedMediaHandler
-check-only:
-  - mwext-TimedMediaHandler-jslint
-  - mwext-TimedMediaHandler-lint
-gate-and-submit:
-  - mwext-TimedMediaHandler-jslint
-  - mwext-TimedMediaHandler-lint
-# FIXME Requires the MwEmbedSupport extension :(
-#  - mwext-TimedMediaHandler-lint:
-#- mwext-TimedMediaHandler-testextensions-master
+template:
+  - name: extension-unittests
+extname: TimedMediaHandler
 
   - name: mediawiki/extensions/timeline
 check-only:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] Prep for deployment of 51c71eb - change (mediawiki...deploy)

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

Change subject: Prep for deployment of 51c71eb
..


Prep for deployment of 51c71eb

Change-Id: Ie61d07fd3bc97bf9804c0e07184fd2431104a5e8
---
M src
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/src b/src
index 76e9b66..51c71eb 16
--- a/src
+++ b/src
-Subproject commit 76e9b66156790fdee75384e89b446bfb197990c4
+Subproject commit 51c71eb04fd3111e04702c3729118fd3cfd611a9

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie61d07fd3bc97bf9804c0e07184fd2431104a5e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] TimedMediaHandler depends on MwEmbedSupport - change (integration/jenkins-job-builder-config)

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

Change subject: TimedMediaHandler depends on MwEmbedSupport
..


TimedMediaHandler depends on MwEmbedSupport

Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
---
M mediawiki-extensions.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 93df6b2..e95c1eb 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -571,6 +571,10 @@
 dependencies: 'AntiSpoof'
  - '{name}-{ext-name}-testextensions-{mwbranch}':
 name: mwext
+ext-name: TimedMediaHandler
+dependencies: 'MwEmbedSupport'
+ - '{name}-{ext-name}-testextensions-{mwbranch}':
+name: mwext
 ext-name: TranslationNotifications
 dependencies: 'Translate'
  - '{name}-{ext-name}-testextensions-{mwbranch}':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] TimedMediaHandler depends on MwEmbedSupport - change (integration/jenkins-job-builder-config)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: TimedMediaHandler depends on MwEmbedSupport
..

TimedMediaHandler depends on MwEmbedSupport

Change-Id: Id220096c175e4b7711bfdc35c9cbc0db163fa87a
---
M mediawiki-extensions.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 93df6b2..e95c1eb 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -571,6 +571,10 @@
 dependencies: 'AntiSpoof'
  - '{name}-{ext-name}-testextensions-{mwbranch}':
 name: mwext
+ext-name: TimedMediaHandler
+dependencies: 'MwEmbedSupport'
+ - '{name}-{ext-name}-testextensions-{mwbranch}':
+name: mwext
 ext-name: TranslationNotifications
 dependencies: 'Translate'
  - '{name}-{ext-name}-testextensions-{mwbranch}':

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

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

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


[MediaWiki-commits] [Gerrit] Prep for deployment of 51c71eb - change (mediawiki...deploy)

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

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

Change subject: Prep for deployment of 51c71eb
..

Prep for deployment of 51c71eb

Change-Id: Ie61d07fd3bc97bf9804c0e07184fd2431104a5e8
---
M src
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/47/115247/1

diff --git a/src b/src
index 76e9b66..51c71eb 16
--- a/src
+++ b/src
-Subproject commit 76e9b66156790fdee75384e89b446bfb197990c4
+Subproject commit 51c71eb04fd3111e04702c3729118fd3cfd611a9

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

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

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


[MediaWiki-commits] [Gerrit] remove kaulen from puppet, dsh, dhcp - change (operations/puppet)

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

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

Change subject: remove kaulen from puppet,dsh,dhcp
..

remove kaulen from puppet,dsh,dhcp

RT #6905

Change-Id: I1b52715a964a28c47d608bb453e067a181505ac3
---
M files/dsh/group/misc_pmtpa
M files/dsh/group/pmtpa
M manifests/site.pp
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
4 files changed, 0 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/115246/1

diff --git a/files/dsh/group/misc_pmtpa b/files/dsh/group/misc_pmtpa
index 77de1cd..e3f43d8 100644
--- a/files/dsh/group/misc_pmtpa
+++ b/files/dsh/group/misc_pmtpa
@@ -7,7 +7,6 @@
 fenari
 formey
 hume
-kaulen
 linne
 manutius
 maurus
diff --git a/files/dsh/group/pmtpa b/files/dsh/group/pmtpa
index 9ac4015..1961e2a 100644
--- a/files/dsh/group/pmtpa
+++ b/files/dsh/group/pmtpa
@@ -4,7 +4,6 @@
 fenari
 formey
 hume
-kaulen
 linne
 mchenry
 sanger
diff --git a/manifests/site.pp b/manifests/site.pp
index 02354dd..ca22db7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1280,13 +1280,6 @@
 include search::searchqa
 }
 
-node 'kaulen.wikimedia.org' {
-$gid = '500'
-
-include standard
-include admins::roots
-}
-
 ## labsdb dbs
 node 'labsdb1001.eqiad.wmnet' {
 class { 'role::db::labsdb':
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
index 491f7b1..4b46ec4 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600
@@ -43,11 +43,6 @@
fixed-address hume.wikimedia.org;
 }
 
-host kaulen {
-   hardware ethernet 00:26:B9:5C:2C:85;
-   fixed-address kaulen.wikimedia.org;
-}
-
 host linne {
hardware ethernet 00:1e:c9:ea:ab:a7;
fixed-address linne.wikimedia.org;

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

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

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


[MediaWiki-commits] [Gerrit] Add 'showPassword' functionality to Create Account - change (apps...wikipedia)

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

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

Change subject: Add 'showPassword' functionality to Create Account
..

Add 'showPassword' functionality to Create Account

Checkboxes for now, will replace with fancier designs later on

Change-Id: I1709b399ddbba6d6fa4c7b23e36868c022db09de
---
M wikipedia/res/layout/activity_create_account.xml
M wikipedia/src/main/java/org/wikipedia/Utils.java
M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java
M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java
4 files changed, 65 insertions(+), 33 deletions(-)


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

diff --git a/wikipedia/res/layout/activity_create_account.xml 
b/wikipedia/res/layout/activity_create_account.xml
index 7491f22..25c5d43 100644
--- a/wikipedia/res/layout/activity_create_account.xml
+++ b/wikipedia/res/layout/activity_create_account.xml
@@ -20,23 +20,44 @@
 android:inputType="textNoSuggestions"
 />
 
-
+android:orientation="horizontal">
+
+
+
 
-
+android:orientation="horizontal">
+
+
+
+
 
 https://gerrit.wikimedia.org/r/115245
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] Log Elasticsearch hot_threads - change (operations/puppet)

2014-02-24 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Log Elasticsearch hot_threads
..


Log Elasticsearch hot_threads

Logs them once every five minutes when under low load and once every
minute when load goes above half of CPUs.

Change-Id: I436c91a60bcc93d6b8ca6c40409784b6649f0916
---
M manifests/role/elasticsearch.pp
A modules/elasticsearch/files/elasticsearch_hot_threads_logger.py
A modules/elasticsearch/manifests/log/hot_threads.pp
3 files changed, 58 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp
index f0a8be6..c511844 100644
--- a/manifests/role/elasticsearch.pp
+++ b/manifests/role/elasticsearch.pp
@@ -65,5 +65,6 @@
 deployment::target { 'elasticsearchplugins': }
 
 include ::elasticsearch::ganglia
+include ::elasticsearch::log::hot_threads
 include ::elasticsearch::nagios::check
 }
diff --git a/modules/elasticsearch/files/elasticsearch_hot_threads_logger.py 
b/modules/elasticsearch/files/elasticsearch_hot_threads_logger.py
new file mode 100644
index 000..a4a09f1
--- /dev/null
+++ b/modules/elasticsearch/files/elasticsearch_hot_threads_logger.py
@@ -0,0 +1,33 @@
+# Quick and dirty script to print hot_threads once then again every minute if
+# the load average is more than half the number of CPUs.  It scans for 5
+# minutes then exits.  Cron it to run every five minutes and you'll get
+# periodic snapshots of the hot_threads with more frequent ones under load.
+
+from os import getloadavg
+from multiprocessing import cpu_count
+from time import gmtime, sleep, strftime, time
+from sys import stdout
+from urllib import urlopen
+
+
+def print_hot_threads():
+print(strftime("%Y-%m-%d %H:%M:%S", gmtime()))
+hot_threads = urlopen('http://localhost:9200/_nodes/_local/hot_threads')
+try:
+for line in hot_threads.readlines():
+stdout.write(line)
+stdout.flush()
+finally:
+hot_threads.close()
+
+
+print_hot_threads()
+end = time() + 5 * 60
+max_load = cpu_count() / 2.0
+while time() < end:
+one_minute_load = getloadavg()[0]
+if one_minute_load > max_load:
+print("Load average:  %s" % one_minute_load)
+print_hot_threads()
+sleep(50)
+sleep(10)
diff --git a/modules/elasticsearch/manifests/log/hot_threads.pp 
b/modules/elasticsearch/manifests/log/hot_threads.pp
new file mode 100644
index 000..d2969ad
--- /dev/null
+++ b/modules/elasticsearch/manifests/log/hot_threads.pp
@@ -0,0 +1,24 @@
+# == Class: elasticsearch::log::hot_threads
+#
+# Install a cron job to log the hot threads.
+#
+class elasticsearch::log::hot_threads {
+$script_name = 'elasticsearch_hot_threads_logger.py'
+$script = "/usr/local/bin/$script_name"
+$log = '/var/log/elasticsearch/elasticsearch_hot_threads.log'
+file { $script:
+source => "puppet:///modules/elasticsearch/$script_name",
+mode   => '0555',
+}
+
+cron { 'elasticsearch-hot-threads-log':
+command => "python $script 2>&1 >> $log",
+#So the destination directory exists
+require => Package['elasticsearch'],
+user=> 'elasticsearch',
+minute  => '*/5',
+}
+
+# The logrotate configuration for Elasticsearch will roll these logs just
+# fine.
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I436c91a60bcc93d6b8ca6c40409784b6649f0916
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Manybubbles 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix path in UnitTestsList hook - change (mediawiki...CirrusSearch)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Fix path in UnitTestsList hook
..

Fix path in UnitTestsList hook

The function registered the unit test files has probably be moved from
the root path down to includes/Hooks.php.  The path to find *Test.php
file did not get updated and tests were no more found.

Change-Id: I87e64580d60eee2c010eee8be51b7600110f9540
---
M includes/Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Hooks.php b/includes/Hooks.php
index a3166e7..ccd762c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -196,7 +196,7 @@
 * @return bool
 */
public static function getUnitTestsList( &$files ) {
-   $files = array_merge( $files, glob( __DIR__ . 
'/tests/unit/*Test.php' ) );
+   $files = array_merge( $files, glob( __DIR__ . 
'/../tests/unit/*Test.php' ) );
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87e64580d60eee2c010eee8be51b7600110f9540
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


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

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

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

Change subject: remove kaulen, decom
..

remove kaulen, decom

used to be misc. web services
box in Tampa

RT #6905

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/43/115243/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 2dab107..a470616 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -532,7 +532,6 @@
 30 1H  IN PTR  stafford.mgmt.pmtpa.wmnet.
 31 1H  IN PTR  ersch.mgmt.pmtpa.wmnet.
 32 1H  IN PTR  formey.mgmt.pmtpa.wmnet.
-34 1H  IN PTR  kaulen.mgmt.pmtpa.wmnet.
 35 1H  IN PTR  tarin.mgmt.pmtpa.wmnet.
 
 37 1H  IN PTR  pdf3.mgmt.pmtpa.wmnet.
diff --git a/templates/152.80.208.in-addr.arpa 
b/templates/152.80.208.in-addr.arpa
index c448697..d5662d2 100644
--- a/templates/152.80.208.in-addr.arpa
+++ b/templates/152.80.208.in-addr.arpa
@@ -66,7 +66,6 @@
 1451H IN PTR   ae0-101.cr2-pmtpa.wikimedia.org.
 1461H IN PTR   stat1.wikimedia.org.
 1471H IN PTR   formey.wikimedia.org.
-1491H IN PTR   kaulen.wikimedia.org.
 
 1541H IN PTR   pdf2.wikimedia.org.
 1551H IN PTR   pdf1.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index cddafb8..0fdb9c0 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -142,7 +142,6 @@
 iodine 1H  IN A208.80.154.146
 iron   1H  IN A208.80.154.151
1H  IN  2620:0:861:2:208:80:154:151
-kaulen 1H  IN A208.80.152.149
 linne  1H  IN A208.80.152.167
 locke  1H  IN A208.80.152.138
 lutetium   1H  IN A208.80.155.13
diff --git a/templates/wmnet b/templates/wmnet
index 38d1fa8..57d917b 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -350,7 +350,6 @@
 WMF39161H  IN A10.1.8.42
 hume   1H  IN A10.1.252.190
 stafford   1H  IN A10.1.8.30
-kaulen 1H  IN A10.1.8.34
 labsdb1 1H  IN A10.1.8.98
 labsdb2 1H  IN A10.1.8.99
 labstore1  1H  IN A10.1.8.74

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

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

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


[MediaWiki-commits] [Gerrit] Add scope to Exception class methods - change (mediawiki/core)

2014-02-24 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Add scope to Exception class methods
..

Add scope to Exception class methods

Change-Id: I0097aa9a6d9c178c85706b90484f7a68d3ddbc8b
---
M includes/exception/BadTitleError.php
M includes/exception/ErrorPageError.php
M includes/exception/FatalError.php
M includes/exception/MWException.php
M includes/exception/PermissionsError.php
M tests/phpunit/includes/exception/MWExceptionHandlerTest.php
M tests/phpunit/includes/exception/MWExceptionTest.php
7 files changed, 29 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/115242/1

diff --git a/includes/exception/BadTitleError.php 
b/includes/exception/BadTitleError.php
index b3d842d..2da3775 100644
--- a/includes/exception/BadTitleError.php
+++ b/includes/exception/BadTitleError.php
@@ -31,7 +31,7 @@
 * @param string|Message $msg A message key (default: 'badtitletext')
 * @param array $params parameter to wfMessage()
 */
-   function __construct( $msg = 'badtitletext', $params = array() ) {
+   public function __construct( $msg = 'badtitletext', $params = array() ) 
{
parent::__construct( 'badtitle', $msg, $params );
}
 
@@ -39,7 +39,7 @@
 * Just like ErrorPageError::report() but additionally set
 * a 400 HTTP status code (bug 33646).
 */
-   function report() {
+   public function report() {
global $wgOut;
 
// bug 33646: a badtitle error page need to return an error code
diff --git a/includes/exception/ErrorPageError.php 
b/includes/exception/ErrorPageError.php
index 439d8e4..7cd198b 100644
--- a/includes/exception/ErrorPageError.php
+++ b/includes/exception/ErrorPageError.php
@@ -34,7 +34,7 @@
 * @param string|Message $msg Message key (string) for error text, or a 
Message object
 * @param array $params with parameters to wfMessage()
 */
-   function __construct( $title, $msg, $params = array() ) {
+   public function __construct( $title, $msg, $params = array() ) {
$this->title = $title;
$this->msg = $msg;
$this->params = $params;
@@ -52,7 +52,7 @@
parent::__construct( $enMsg->text() );
}
 
-   function report() {
+   public function report() {
global $wgOut;
 
$wgOut->showErrorPage( $this->title, $this->msg, $this->params 
);
diff --git a/includes/exception/FatalError.php 
b/includes/exception/FatalError.php
index 8953219..a7d672f 100644
--- a/includes/exception/FatalError.php
+++ b/includes/exception/FatalError.php
@@ -30,14 +30,14 @@
/**
 * @return string
 */
-   function getHTML() {
+   public function getHTML() {
return $this->getMessage();
}
 
/**
 * @return string
 */
-   function getText() {
+   public function getText() {
return $this->getMessage();
}
 }
diff --git a/includes/exception/MWException.php 
b/includes/exception/MWException.php
index 80b6ac5..f344938 100644
--- a/includes/exception/MWException.php
+++ b/includes/exception/MWException.php
@@ -29,7 +29,7 @@
 *
 * @return bool
 */
-   function useOutputPage() {
+   public function useOutputPage() {
return $this->useMessageCache() &&
!empty( $GLOBALS['wgFullyInitialised'] ) &&
!empty( $GLOBALS['wgOut'] ) &&
@@ -42,7 +42,7 @@
 * @since 1.23
 * @return boolean
 */
-   function isLoggable() {
+   public function isLoggable() {
return true;
}
 
@@ -51,7 +51,7 @@
 *
 * @return bool
 */
-   function useMessageCache() {
+   public function useMessageCache() {
global $wgLang;
 
foreach ( $this->getTrace() as $frame ) {
@@ -70,7 +70,7 @@
 * @param array $args arguments to pass to the callback functions
 * @return string|null string to output or null if any hook has been 
called
 */
-   function runHooks( $name, $args = array() ) {
+   public function runHooks( $name, $args = array() ) {
global $wgExceptionHooks;
 
if ( !isset( $wgExceptionHooks ) || !is_array( 
$wgExceptionHooks ) ) {
@@ -113,7 +113,7 @@
 * The function also has other parameters that are arguments for the 
message
 * @return string message with arguments replaced
 */
-   function msg( $key, $fallback /*[, params...] */ ) {
+   public function msg( $key, $fallback /*[, params...] */ ) {
$args = array_slice( func_get_args(), 2 );
 
if ( $this->useMessageCache() ) {
@@ -130,7 +130,7 @@
 *
 * @return string h

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

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

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

Change subject: remove db9, decom
..

remove db9, decom

RT #6252

Change-Id: I6ae565f6a64e22b491e7de9e44921479feff8bcd
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/41/115241/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 2dab107..470e17f 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -66,7 +66,6 @@
 2361H  IN PTR  es7.pmtpa.wmnet.
 2371H  IN PTR  es8.pmtpa.wmnet.
 2391H  IN PTR  db6.pmtpa.wmnet.
-2421H  IN PTR  db9.pmtpa.wmnet.
 2431H  IN PTR  db10.pmtpa.wmnet.
 2441H  IN PTR  nfs1.pmtpa.wmnet.
 2451H  IN PTR  sockpuppet.pmtpa.wmnet.
@@ -447,7 +446,6 @@
 ; Database Servers
 $ORIGIN 6.1.{{ zonename }}.
 16 1H  IN PTR db6.mgmt.pmtpa.wmnet.
-19 1H  IN PTR db9.mgmt.pmtpa.wmnet.
 20 1H  IN PTR db10.mgmt.pmtpa.wmnet.
 45 1H  IN PTR db35.mgmt.pmtpa.wmnet.
 48 1H  IN PTR db38.mgmt.pmtpa.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 38d1fa8..dfe13a4 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -57,7 +57,6 @@
 
 ; Servers (alphabetic order)
 
-db91H  IN A10.0.0.242
 db10   1H  IN A10.0.0.243
 db35   1H  IN A10.0.6.45
 db38   1H  IN A10.0.6.48
@@ -305,7 +304,6 @@
 amaranth   1H  IN A10.1.8.16
 brewster   1H  IN A10.1.8.3
 dataset2   1H  IN A10.1.8.55
-db91H  IN A10.1.6.19
 db10   1H  IN A10.1.6.20
 db35   1H  IN A10.1.6.45
 db38   1H  IN A10.1.6.48

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

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

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


[MediaWiki-commits] [Gerrit] Don't let the user set a static redirect flag on a non-redirect - change (mediawiki...VisualEditor)

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

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

Change subject: Don't let the user set a static redirect flag on a non-redirect
..

Don't let the user set a static redirect flag on a non-redirect

Bug: 61865
Change-Id: I417d7a5e179f46022652a267de41fb4de8525391
---
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
index 9e32e97..4263ba1 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
@@ -317,7 +317,7 @@
if ( currentStaticRedirectItem && ( !newStaticRedirectState || 
!newRedirectData ) ) {
currentStaticRedirectItem.remove();
}
-   if ( !currentStaticRedirectItem && newStaticRedirectState ) {
+   if ( !currentStaticRedirectItem && newStaticRedirectState && 
newRedirectData ) {
this.metaList.insertMeta( { 'type': 'mwStaticRedirect' 
} );
}
}

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

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

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


[MediaWiki-commits] [Gerrit] added simple schema for db - change (mediawiki...OpenBadges)

2014-02-24 Thread Aizhuli90 (Code Review)
Aizhuli90 has uploaded a new change for review.

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

Change subject: added simple schema for db
..

added simple schema for db

Change-Id: Iae727ec7047bd0902dd34bd38cfe82a1188a6b6a
---
A OpenBadgesLog.sql
1 file changed, 27 insertions(+), 0 deletions(-)


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

diff --git a/OpenBadgesLog.sql b/OpenBadgesLog.sql
new file mode 100644
index 000..308e285
--- /dev/null
+++ b/OpenBadgesLog.sql
@@ -0,0 +1,27 @@
+--
+-- OpenBadges logging schema
+-- Records relevant information regarding issuing of badges
+--
+
+CREATE TABLE IF NOT EXISTS /*_*/openbadges_assertion (
+   obl_id int NOT NULL PRIMARY KEY auto_increment, -- unique id
+   obl_timestamp binary(14) NOT NULL,  -- timestamp
+obl_receiver int(11) NOT NULL, -- user id of the 
receiver
+   obl_badge_url varchar(255) NOT NULL,-- url of 
the badge for the receiver
+   obl_badge_img longblob NOT NULL,
-- image of the badge
+   obl_badge_evidence varchar(255) NOT NULL,   -- 
criteria for receiving the badge 
+   obl_expiration date 
-- expiration of the badge if any
+)
+
+CREATE TABLE IF NOT EXISTS /*_*/openbadges_class (
+obl_badge_id int NOT NULL PRIMARY KEY, -- 
unique id 
+   obl_name varchar(64) NOT NULL,  
-- name of the achievement 
+   obl_description blob NOT NULL,  
-- description of the badge
+   obl_badge_image blob NOT NULL,  
-- image of the badge 
+   obl_criteria varchar(255) NOT NULL, -- 
criteria for earning the badge; might be URL
+   obl_issuer int NOT NULL,
-- id of the issuer 
+   obl_tags blob NOT NULL  
-- list of tags that describe the achievement
+)/DBTableOptions*/;
+
+CREATE INDEX /*i*/wll_timestamp ON /*_*/openbadges_assertion (wll_timestamp);
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae727ec7047bd0902dd34bd38cfe82a1188a6b6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenBadges
Gerrit-Branch: master
Gerrit-Owner: Aizhuli90 

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


[MediaWiki-commits] [Gerrit] Disable redirect field unless the checkbox is set in setup - change (mediawiki...VisualEditor)

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

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

Change subject: Disable redirect field unless the checkbox is set in setup
..

Disable redirect field unless the checkbox is set in setup

The logic for this box is meant to prevent the user from setting a redirect
unless they check the box first – but a simple forgotten line in set up to
actually disable the box if the checkbox is unticked made this not work in
the most-frequent case – when the page isn't a redirect, and the user is
trying to make it into one.

Bug: 61864
Change-Id: If250b24587a6f56fe545e4668d5e3517ffcff903
---
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
index de1e1ae..9e32e97 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
@@ -236,6 +236,7 @@
// Redirect items (disabled states set by change event)
this.enableRedirectInput.setValue( !!redirectTargetItem );
this.redirectTargetInput.setValue( redirectTarget );
+   this.redirectTargetInput.setDisabled( !redirectTargetItem );
this.enableStaticRedirectInput.setValue( !!redirectStatic );
this.enableStaticRedirectInput.setDisabled( !redirectTargetItem );
this.redirectOptionsTouched = false;

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

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

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


[MediaWiki-commits] [Gerrit] Hide editlinks in preview - change (apps...wikipedia)

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

Change subject: Hide editlinks in preview
..


Hide editlinks in preview

Change-Id: I94bf163aad0590e6386d595c45442543e4d215d7
---
M wikipedia/assets/preview.css
M www/Gruntfile.js
A www/less/preview.less
M www/preview.css
4 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css
index 3124f5c..02a4ad9 100644
--- a/wikipedia/assets/preview.css
+++ b/wikipedia/assets/preview.css
@@ -112,3 +112,8 @@
   color: #888;
   font-size: 80%;
 }
+
+/* Hide the stupid editlink */
+.edit-page {
+  display: none;
+}
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index 925db78..06be39d 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -52,7 +52,7 @@
 files: [
 { src: ["less/fonts.less", "less/pagestyles.less", 
"less/ui.less"], dest: "styles.css"},
 { src: ["less/fonts.less", "less/pagestyles.less"], dest: 
"abusefilter.css"},
-{ src: ["less/fonts.less", "less/pagestyles.less"], dest: 
"preview.css"}
+{ src: ["less/fonts.less", "less/pagestyles.less", 
"less/preview.less"], dest: "preview.css"}
 ]
 }
 },
diff --git a/www/less/preview.less b/www/less/preview.less
new file mode 100644
index 000..61b470a
--- /dev/null
+++ b/www/less/preview.less
@@ -0,0 +1,4 @@
+/* Hide the stupid editlink */
+.edit-page {
+  display: none;
+}
diff --git a/www/preview.css b/www/preview.css
index 3124f5c..02a4ad9 100644
--- a/www/preview.css
+++ b/www/preview.css
@@ -112,3 +112,8 @@
   color: #888;
   font-size: 80%;
 }
+
+/* Hide the stupid editlink */
+.edit-page {
+  display: none;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94bf163aad0590e6386d595c45442543e4d215d7
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Add skipcaptcha right for all sysops on labs - change (operations/mediawiki-config)

2014-02-24 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Add skipcaptcha right for all sysops on labs
..

Add skipcaptcha right for all sysops on labs

Source: https://github.com/wikimedia/operations-mediawiki-config/pull/5
Change-Id: Ibbd23a8c7ff0cd2effbd3b87a189fc2ce34d2a8f
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 0a4d372..8b1144c 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -53,6 +53,7 @@
 
 // So that people can easily test the captchas without making accounts -- 
Platonides
 $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = false;
+$wgGroupPermissions['sysop']['skipcaptcha'] = true;
 
 if ( $wmgEnableGeoData ) {
$wgGeoDataSolrMaster = 'deployment-solr.pmtpa.wmflabs';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbd23a8c7ff0cd2effbd3b87a189fc2ce34d2a8f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Steinsplitter 

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


[MediaWiki-commits] [Gerrit] Make the preview task POST - change (apps...wikipedia)

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

Change subject: Make the preview task POST
..


Make the preview task POST

Change-Id: Ic0ea37941823de6fba0de4bf5c2708c3c69961b5
---
M wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
2 files changed, 8 insertions(+), 3 deletions(-)

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



diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
index 9d3f342..ba87a37 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
@@ -3,7 +3,6 @@
 
 import android.content.*;
 import android.test.*;
-import android.util.*;
 import org.wikipedia.*;
 import org.wikipedia.editing.*;
 
@@ -19,8 +18,9 @@
 public void testPreview() throws Throwable {
 startActivity(new Intent(), null, null);
 final PageTitle title = new PageTitle(null, 
"Test_page_for_app_testing/Section1", new Site("test.wikipedia.org"));
-final String wikitext = "== Section 2 ==\n\nEditing section INSERT 
RANDOM & HERE test at " + System.currentTimeMillis();
-final String expected = "Section 2Edit\nEditing section INSERT 
RANDOM\n\n\n\n";
+long randomTime = System.currentTimeMillis();
+final String wikitext = "== Section 2 ==\n\nEditing section INSERT 
RANDOM & HERE test at " + randomTime;
+final String expected = "Section 2Edit\nEditing section INSERT RANDOM & 
HERE test at " + randomTime + "\n\n\n\n";
 final WikipediaApp app = 
(WikipediaApp)getInstrumentation().getTargetContext().getApplicationContext();
 final CountDownLatch completionLatch = new CountDownLatch(1);
 runTestOnUiThread(new Runnable() {
diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
index 856e23f..dfb7a4f 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
@@ -31,6 +31,11 @@
 }
 
 @Override
+protected ApiResult makeRequest(RequestBuilder builder) {
+return builder.post();
+}
+
+@Override
 public String processResult(ApiResult result) throws Throwable {
 return 
result.asObject().optJSONObject("parse").optJSONObject("text").optString("*");
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0ea37941823de6fba0de4bf5c2708c3c69961b5
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Add 'preview' functionality - change (apps...wikipedia)

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

Change subject: Add 'preview' functionality
..


Add 'preview' functionality

- Tapping save first takes you to preview, and then tapping
  again actually saves. This might be changed in the future

Change-Id: Ic356af5878e3a177706f307b56ac5855534fc19c
---
A wikipedia/assets/preview.css
A wikipedia/assets/preview.html
A wikipedia/assets/preview.js
M wikipedia/res/layout/activity_edit_section.xml
A wikipedia/res/layout/fragment_preview_edit.xml
M wikipedia/res/values/strings.xml
A wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
M www/Gruntfile.js
A www/js/preview.js
A www/preview.css
A www/preview.html
A www/preview.js
13 files changed, 568 insertions(+), 10 deletions(-)

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



diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css
new file mode 100644
index 000..3124f5c
--- /dev/null
+++ b/wikipedia/assets/preview.css
@@ -0,0 +1,114 @@
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans.ttf) 
format('truetype');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 700;
+  src: local('Open Sans Bold'), local('OpenSans-Bold'), 
url(fonts/OpenSans-Bold.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 400;
+  src: local('Open Sans Italic'), local('OpenSans-Italic'), 
url(fonts/OpenSans-Italic.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 700;
+  src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), 
url(fonts/OpenSans-BoldItalic.ttf) format('truetype');
+}
+
+/* Should be moved out to the MobileApp extension at some point */
+body {
+  background-color: #F2F2F2;
+  color: #333;
+  font-family: "Open Sans", sans-serif;
+  font-size: 16px;
+  line-height: 160%;
+  margin: 0;
+  padding: 0;
+  margin-top: 48px;
+}
+#content {
+  padding: 8px 24px;
+}
+a {
+  color: #347BFF;
+  text-decoration: none;
+}
+/* Headers */
+h1 {
+  font-family: serif;
+  color: #064AAD;
+  font-size: 26px;
+  line-height: 36px;
+  margin-bottom: 24px;
+  font-weight: bold;
+}
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-family: "Open Sans", sans-serif;
+}
+h2 {
+  font-size: 22px;
+}
+h3 {
+  font-size: 20px;
+}
+h4 {
+  font-size: 18px;
+}
+h5,
+h6 {
+  font-size: 16px;
+}
+/* Basic Thumbnails */
+.thumb {
+  /* Don't stick thumbnails to the text above and below it */
+  margin: 8px 0px;
+  /* Align everything inside a thumbnail to be centered */
+  text-align: center;
+}
+.thumb .thumbinner {
+  /* Make sure that thumb takes up full width */
+  width: 100% !important;
+}
+.thumb .magnify {
+  display: none;
+  /* Our parser is STUPID */
+}
+.thumb .noresize {
+  overflow-x: auto;
+  /* Scrollbars for images that shouldn't be squished */
+}
+/* Makes sure that we don't have horizontal scrollbars for the entire page 
because
+   an image is too wide to fit in to the current viewport */
+img {
+  max-width: 100% !important;
+  height: auto !important;
+}
+/* Basic tables */
+table {
+  width: 100% !important;
+  overflow-x: auto;
+  display: block;
+  border: 1px solid #ccc;
+  margin-top: 4px;
+  margin-bottom: 4px;
+}
+/* Last updated info */
+#attribution {
+  border-top: 1px solid #ccc;
+  padding: 8px;
+  text-align: center;
+  color: #888;
+  font-size: 80%;
+}
diff --git a/wikipedia/assets/preview.html b/wikipedia/assets/preview.html
new file mode 100644
index 000..7f72815
--- /dev/null
+++ b/wikipedia/assets/preview.html
@@ -0,0 +1,13 @@
+
+
+
+https://wikipedia.org"; /> 
+
+
+ 
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wikipedia/assets/preview.js b/wikipedia/assets/preview.js
new file mode 100644
index 000..da569cf
--- /dev/null
+++ b/wikipedia/assets/preview.js
@@ -0,0 +1,80 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof 
require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw 
new Error("Cannot find module '"+o+"'")}var 
f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return 
s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof 
require=="function"&&require;for(var o=0;o
 
+
+
 
diff --git a/wikipedia/res/layout/fragment_preview_edit.xml 
b/wikipedia/res/layout/fragment_preview_edit.xml
new file mode 100644
index 000..6289500
--- /dev/null
+++ b/wikipedia/res/layout/fragment_preview_edit.xml
@@ -0,0 +1,16 @@
+
+
+http://schemas.android.com/apk/res/android";
+  android:id="@+id/edit_preview_container"
+  android:orientation="vertical"
+  android:layout_width="match_parent"
+  android:layout_height=

[MediaWiki-commits] [Gerrit] jquery.delayedBind → jquery.throttle-debounce - change (mediawiki...WikiEditor)

2014-02-24 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: jquery.delayedBind → jquery.throttle-debounce
..

jquery.delayedBind → jquery.throttle-debounce

The former was deprecated in core. This breaks compatibility with MW<1.23.

Change-Id: Ifdbd6efd758d7b9c5491c40366af5ca5eb41162e
---
M WikiEditor.php
M modules/jquery.wikiEditor.iframe.js
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/WikiEditor.php b/WikiEditor.php
index 103c9eb..71a452b 100644
--- a/WikiEditor.php
+++ b/WikiEditor.php
@@ -85,7 +85,7 @@
'dependencies' => array(
'jquery.client',
'jquery.textSelection',
-   'jquery.delayedBind',
+   'jquery.throttle-debounce',
),
'messages' => array(
'wikieditor-wikitext-tab',
diff --git a/modules/jquery.wikiEditor.iframe.js 
b/modules/jquery.wikiEditor.iframe.js
index 538fcb1..3d4f593 100644
--- a/modules/jquery.wikiEditor.iframe.js
+++ b/modules/jquery.wikiEditor.iframe.js
@@ -814,9 +814,9 @@
.bind( 'keyup paste mouseup cut 
encapsulateSelection', function( event ) {
return context.fn.trigger( 
'change', event );
} )
-   .delayedBind( 250, 'keyup paste mouseup 
cut encapsulateSelection', function( event ) {
+   .bind( 'keyup paste mouseup cut 
encapsulateSelection', $.debounce( 250, function( event ) {
context.fn.trigger( 
'delayedChange', event );
-   } );
+   } ) );
} );
// Attach a submit handler to the form so that when the form is 
submitted the content of the iframe gets
// decoded and copied over to the textarea

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdbd6efd758d7b9c5491c40366af5ca5eb41162e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Hide editlinks in preview - change (apps...wikipedia)

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

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

Change subject: Hide editlinks in preview
..

Hide editlinks in preview

Change-Id: I94bf163aad0590e6386d595c45442543e4d215d7
---
M wikipedia/assets/preview.css
M www/Gruntfile.js
A www/less/preview.less
M www/preview.css
4 files changed, 15 insertions(+), 1 deletion(-)


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

diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css
index 3124f5c..02a4ad9 100644
--- a/wikipedia/assets/preview.css
+++ b/wikipedia/assets/preview.css
@@ -112,3 +112,8 @@
   color: #888;
   font-size: 80%;
 }
+
+/* Hide the stupid editlink */
+.edit-page {
+  display: none;
+}
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index 925db78..06be39d 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -52,7 +52,7 @@
 files: [
 { src: ["less/fonts.less", "less/pagestyles.less", 
"less/ui.less"], dest: "styles.css"},
 { src: ["less/fonts.less", "less/pagestyles.less"], dest: 
"abusefilter.css"},
-{ src: ["less/fonts.less", "less/pagestyles.less"], dest: 
"preview.css"}
+{ src: ["less/fonts.less", "less/pagestyles.less", 
"less/preview.less"], dest: "preview.css"}
 ]
 }
 },
diff --git a/www/less/preview.less b/www/less/preview.less
new file mode 100644
index 000..61b470a
--- /dev/null
+++ b/www/less/preview.less
@@ -0,0 +1,4 @@
+/* Hide the stupid editlink */
+.edit-page {
+  display: none;
+}
diff --git a/www/preview.css b/www/preview.css
index 3124f5c..02a4ad9 100644
--- a/www/preview.css
+++ b/www/preview.css
@@ -112,3 +112,8 @@
   color: #888;
   font-size: 80%;
 }
+
+/* Hide the stupid editlink */
+.edit-page {
+  display: none;
+}

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

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

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


[MediaWiki-commits] [Gerrit] Make the preview task POST - change (apps...wikipedia)

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

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

Change subject: Make the preview task POST
..

Make the preview task POST

Change-Id: Ic0ea37941823de6fba0de4bf5c2708c3c69961b5
---
M wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
2 files changed, 8 insertions(+), 3 deletions(-)


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

diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
index 9d3f342..ba87a37 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
@@ -3,7 +3,6 @@
 
 import android.content.*;
 import android.test.*;
-import android.util.*;
 import org.wikipedia.*;
 import org.wikipedia.editing.*;
 
@@ -19,8 +18,9 @@
 public void testPreview() throws Throwable {
 startActivity(new Intent(), null, null);
 final PageTitle title = new PageTitle(null, 
"Test_page_for_app_testing/Section1", new Site("test.wikipedia.org"));
-final String wikitext = "== Section 2 ==\n\nEditing section INSERT 
RANDOM & HERE test at " + System.currentTimeMillis();
-final String expected = "Section 2Edit\nEditing section INSERT 
RANDOM\n\n\n\n";
+long randomTime = System.currentTimeMillis();
+final String wikitext = "== Section 2 ==\n\nEditing section INSERT 
RANDOM & HERE test at " + randomTime;
+final String expected = "Section 2Edit\nEditing section INSERT RANDOM & 
HERE test at " + randomTime + "\n\n\n\n";
 final WikipediaApp app = 
(WikipediaApp)getInstrumentation().getTargetContext().getApplicationContext();
 final CountDownLatch completionLatch = new CountDownLatch(1);
 runTestOnUiThread(new Runnable() {
diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
index 856e23f..dfb7a4f 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
@@ -31,6 +31,11 @@
 }
 
 @Override
+protected ApiResult makeRequest(RequestBuilder builder) {
+return builder.post();
+}
+
+@Override
 public String processResult(ApiResult result) throws Throwable {
 return 
result.asObject().optJSONObject("parse").optJSONObject("text").optString("*");
 }

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

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

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


[MediaWiki-commits] [Gerrit] jquery.delayedBind → jquery.throttle-debounce - change (mediawiki...MassMessage)

2014-02-24 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: jquery.delayedBind → jquery.throttle-debounce
..

jquery.delayedBind → jquery.throttle-debounce

The former was deprecated in core. This breaks compatibility with MW<1.23.

Change-Id: Ib1496e3c7abcd72c7abd7521061abf5042208eb3
---
M MassMessage.php
M modules/ext.MassMessage.badhtml.js
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/MassMessage.php b/MassMessage.php
index f7ba866..cef60e0 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -99,7 +99,7 @@
'dependencies' => array(
'jquery.byteLimit',
'jquery.ui.autocomplete',
-   'jquery.delayedBind',
+   'jquery.throttle-debounce',
'mediawiki.jqueryMsg',
),
'localBasePath' => $dir . '/modules',
diff --git a/modules/ext.MassMessage.badhtml.js 
b/modules/ext.MassMessage.badhtml.js
index a4acbf4..5efa7d2 100644
--- a/modules/ext.MassMessage.badhtml.js
+++ b/modules/ext.MassMessage.badhtml.js
@@ -12,7 +12,7 @@
.addClass( 'warningbox' );
$msg.after( $warnings );
$warnings.hide();
-   $msg.delayedBind( 500, 'keyup', function( ) {
+   $msg.on( 'keyup', $.debounce( 500, function( ) {
var code, matches, tags, possibles, tag;
code = $.trim( $msg.val() );
if( code === '' ) {
@@ -65,7 +65,7 @@
} else {
$warnings.hide();
}
-   });
+   } ) );
});
 
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1496e3c7abcd72c7abd7521061abf5042208eb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Stop using and deprecate jquery.delayedBind - change (mediawiki/core)

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

Change subject: Stop using and deprecate jquery.delayedBind
..


Stop using and deprecate jquery.delayedBind

Reasons:
* It provides the same functionality as jquery.throttle-debounce, but
  in a hackier and less flexible way
* It's (to my knowledge) not used outside of core, while
  jquery.throttle-debounce is - deciding on one can lower the payload
  size a little bit
* It's a custom library and we have too many of those

Only two modules in core were using it:
* jquery.expandableField: It was, in fact, used incorrectly, the code
  needs a simple setTimeout / clearTimeout pair with no debouncing.
  The bug made it possible to keep focus on a field while it was
  unexpanded (by quickly triggering blur and focus events in order).
* skins.vector.js: Straightforwardly converted the usage to a
  $.debounce call. Also fixed a bug where the window resize handler
  was bound for each $.fn.collapsibleTabs call instead of once.

The module will be removed in MediaWiki 1.24:
Ifc84b09a78007a6a0ea5676b0f12a38937dca2e7.

Change-Id: I83ba37a9568a171d9f3654f6bfdb6064e0e65bd4
---
M RELEASE-NOTES-1.23
M resources/Resources.php
M resources/jquery/jquery.delayedBind.js
M resources/jquery/jquery.expandableField.js
M skins/vector/collapsibleTabs.js
5 files changed, 24 insertions(+), 15 deletions(-)

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



diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 2350b8e..d520de5 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -248,6 +248,8 @@
   was removed.
 * A user_password_expires column has been added to the user table. The User
   object expects this column to exist. Use update.php to create this new field.
+* The jquery.delayedBind ResourceLoader module was deprecated in favor of the
+  jquery.throttle-debounce module. It will be removed in MediaWiki 1.24.
 
  Removed classes 
 * FakeMemCachedClient (deprecated in 1.18)
diff --git a/resources/Resources.php b/resources/Resources.php
index 7f5b75a..f8c6114 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -150,7 +150,7 @@
'vector/vector.js',
),
'position' => 'top',
-   'dependencies' => 'jquery.delayedBind',
+   'dependencies' => 'jquery.throttle-debounce',
'remoteBasePath' => $GLOBALS['wgStylePath'],
'localBasePath' => $GLOBALS['wgStyleDirectory'],
),
@@ -238,7 +238,6 @@
),
'jquery.expandableField' => array(
'scripts' => 'resources/jquery/jquery.expandableField.js',
-   'dependencies' => 'jquery.delayedBind',
),
'jquery.farbtastic' => array(
'scripts' => 'resources/jquery/jquery.farbtastic.js',
diff --git a/resources/jquery/jquery.delayedBind.js 
b/resources/jquery/jquery.delayedBind.js
index 40f3d44..874c111 100644
--- a/resources/jquery/jquery.delayedBind.js
+++ b/resources/jquery/jquery.delayedBind.js
@@ -1,4 +1,4 @@
-( function ( $ ) {
+( function ( mw, $ ) {
 /**
  * Function that escapes spaces in event names. This is needed because
  * "_delayedBind-foo bar-1000" refers to two events
@@ -73,4 +73,11 @@
}
 } );
 
-}( jQuery ) );
+mw.log.deprecate( $.fn, 'delayedBind', $.fn.delayedBind,
+   'Use the jquery.throttle-debounce module instead' );
+mw.log.deprecate( $.fn, 'delayedBindCancel', $.fn.delayedBindCancel,
+   'Use the jquery.throttle-debounce module instead' );
+mw.log.deprecate( $.fn, 'delayedBindUnbind', $.fn.delayedBindUnbind,
+   'Use the jquery.throttle-debounce module instead' );
+
+}( mediaWiki, jQuery ) );
diff --git a/resources/jquery/jquery.expandableField.js 
b/resources/jquery/jquery.expandableField.js
index 9e532e5..732cc6e 100644
--- a/resources/jquery/jquery.expandableField.js
+++ b/resources/jquery/jquery.expandableField.js
@@ -56,7 +56,7 @@
args = arguments;
 
$( this ).each( function () {
-   var key, context;
+   var key, context, timeout;
 
/* Construction / Loading */
 
@@ -122,10 +122,13 @@
$( this )
.addClass( 'expandableField' )
.focus( function ( e ) {
+   clearTimeout( timeout );
$.expandableField.expandField( 
e, context );
} )
-   .delayedBind( 250, 'blur', function ( e 
) {
-   
$.expandableField.condenseField( e, context );
+   .blur( function ( e ) {
+

[MediaWiki-commits] [Gerrit] Add task to get a preview + tests - change (apps...wikipedia)

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

Change subject: Add task to get a preview + tests
..


Add task to get a preview + tests

Change-Id: Iad4b6d1d13ad534f81afd751d4bad609d980123a
---
A wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
A wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
2 files changed, 78 insertions(+), 0 deletions(-)

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



diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
new file mode 100644
index 000..9d3f342
--- /dev/null
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
@@ -0,0 +1,41 @@
+
+package org.wikipedia.test;
+
+import android.content.*;
+import android.test.*;
+import android.util.*;
+import org.wikipedia.*;
+import org.wikipedia.editing.*;
+
+import java.util.concurrent.*;
+
+public class PreviewTaskTests extends ActivityUnitTestCase {
+private static final int TASK_COMPLETION_TIMEOUT = 2;
+
+public PreviewTaskTests() {
+super(TestDummyActivity.class);
+}
+
+public void testPreview() throws Throwable {
+startActivity(new Intent(), null, null);
+final PageTitle title = new PageTitle(null, 
"Test_page_for_app_testing/Section1", new Site("test.wikipedia.org"));
+final String wikitext = "== Section 2 ==\n\nEditing section INSERT 
RANDOM & HERE test at " + System.currentTimeMillis();
+final String expected = "Section 2Edit\nEditing section INSERT 
RANDOM\n\n\n\n";
+final WikipediaApp app = 
(WikipediaApp)getInstrumentation().getTargetContext().getApplicationContext();
+final CountDownLatch completionLatch = new CountDownLatch(1);
+runTestOnUiThread(new Runnable() {
+@Override
+public void run() {
+new EditPreviewTask(getInstrumentation().getTargetContext(), 
wikitext, title) {
+@Override
+public void onFinish(String result) {
+assertNotNull(result);
+assertEquals(result, expected);
+completionLatch.countDown();
+}
+}.execute();
+}
+});
+assertTrue(completionLatch.await(TASK_COMPLETION_TIMEOUT, 
TimeUnit.MILLISECONDS));
+}
+}
diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
new file mode 100644
index 000..856e23f
--- /dev/null
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java
@@ -0,0 +1,37 @@
+package org.wikipedia.editing;
+
+import android.content.*;
+import org.mediawiki.api.json.*;
+import org.wikipedia.*;
+import org.wikipedia.concurrency.*;
+
+
+public class EditPreviewTask extends ApiTask {
+private final String wikiText;
+private final PageTitle title;
+
+public EditPreviewTask(Context context, String wikiText, PageTitle title) {
+super(
+
ExecutorService.getSingleton().getExecutor(EditPreviewTask.class, 1),
+
((WikipediaApp)context.getApplicationContext()).getAPIForSite(title.getSite())
+);
+this.wikiText = wikiText;
+this.title = title;
+}
+
+@Override
+public RequestBuilder buildRequest(Api api) {
+return api.action("parse")
+.param("sectionpreview", "true")
+.param("pst", "true")
+.param("mobileformat", "true")
+.param("prop", "text")
+.param("title", title.getPrefixedText())
+.param("text", wikiText);
+}
+
+@Override
+public String processResult(ApiResult result) throws Throwable {
+return 
result.asObject().optJSONObject("parse").optJSONObject("text").optString("*");
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad4b6d1d13ad534f81afd751d4bad609d980123a
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Add Triangle/Pokey to the NavigationPopups - change (mediawiki...Popups)

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

Change subject: Add Triangle/Pokey to the NavigationPopups
..


Add Triangle/Pokey to the NavigationPopups

* Triangles using the border hack for the white part of the popups
* SVG clipPath on FF and Chrome, using SVG 
* Fallback to  on browsers with not SVG support

Change-Id: I3b1226051436652edbffe4642176c9a0e405243c
---
M resources/ext.popups.core.js
M resources/ext.popups.core.less
2 files changed, 95 insertions(+), 11 deletions(-)

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



diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 76727f3..b370d84 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -17,7 +17,7 @@
cache = {},
curRequest, // Current API request
api = new mw.Api(),
-   $box; // DOM element of the popup (defined at the end 
of the file)
+   $svg, $box; // defined at the end of the file
 
/**
 * @method sendRequest
@@ -87,6 +87,15 @@
}
 
/**
+* @method supportsSVG
+* Checks for SVG support in browser
+* @return {boolean}
+*/
+   function supportsSVG() {
+   return document.implementation.hasFeature( 
'http://www.w3.org/TR/SVG11/feature#Image', '1.1' );
+   }
+
+   /**
 * @method createThumbnail
 * Returns a thumbnail object based on the ratio of the image
 * @param {Object} thumbnail
@@ -103,16 +112,35 @@
if ( tall ) {
// This is to mask and center the image within 
a given size
$thumbnail = $( '' )
-   .removeClass( 'mwe-popups-is-tall 
mwe-popups-is-not-tall' )
.addClass( 'mwe-popups-is-tall' )
.css( 'background-image', 'url(' + 
thumbnail.source + ')');
} else {
-   $thumbnail = $( '' )
-   .attr( 'src', thumbnail.source )
-   .removeClass( 'mwe-popups-is-tall 
mwe-popups-is-not-tall' )
-   .addClass( 'mwe-popups-is-not-tall' );
-   }
+   if ( supportsSVG() ) {
+   $thumbnail = $( '' )
+   .addClass( 
'mwe-popups-is-not-tall' )
+   .attr( {
+   'xlink:href': 
thumbnail.source,
+   'clip-path': 
'url(#mwe-popups-mask)',
+   x: 0,
+   y: 0,
+   width: thumbnail.width,
+   height: thumbnail.height
+   } );
 
+   $thumbnail = $( '' )
+   .attr( {
+   xmlns: 
'http://www.w3.org/2000/svg',
+   viewBox: '0 0 ' + 
thumbnail.width + ' ' + thumbnail.height,
+   width: thumbnail.width,
+   height: thumbnail.height
+   } )
+   .append( $thumbnail );
+   } else {
+   $thumbnail = $( '' )
+   .attr( 'src', thumbnail.source )
+   .addClass( 
'mwe-popups-is-not-tall' );
+   }
+   }
 
return $thumbnail;
}
@@ -127,17 +155,30 @@
 */
function createBox ( href, $el ) {
var bar = cache[ href ],
-   offsetTop = $el.offset().top + $el.height() + 7,
+   offsetTop = $el.offset().top + $el.height() + 9,
offsetLeft = $el.offset().left;
 
elTime = mw.now();
elAction = 'dismissed';
 
+   if ( bar.thumbnail === undefined ) {
+   bar.thumbnail = false;
+   

[MediaWiki-commits] [Gerrit] Cleanup webviews when we no longer require them - change (apps...wikipedia)

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

Change subject: Cleanup webviews when we no longer require them
..


Cleanup webviews when we no longer require them

Change-Id: I55f3d58b80887131d76f71288d05d34833b82d6f
---
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
index 41461b9..8c5e16a 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
@@ -320,4 +320,10 @@
 }
 return false;
 }
+
+@Override
+public void onDestroyView() {
+super.onDestroyView();
+webView.destroy();
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55f3d58b80887131d76f71288d05d34833b82d6f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Wait for CSS to be truly loaded before opening the viewer - change (mediawiki...MultimediaViewer)

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

Change subject: Wait for CSS to be truly loaded before opening the viewer
..


Wait for CSS to be truly loaded before opening the viewer

This is a workaround for core bug #61852

Change-Id: If7d830866993eddbf5784694514ff89aece56c5b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/258
---
M MultimediaViewer.php
M resources/mmv/mmv.bootstrap.js
A resources/mmv/mmv.loaded.css
M tests/qunit/mmv.bootstrap.test.js
4 files changed, 59 insertions(+), 4 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index b47866e..7ea99c8 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -398,6 +398,8 @@
 
'styles' => array(
'mmv.less',
+   // Always make this one the last of the list (Bug 61852)
+   'mmv.loaded.css',
),
 
'dependencies' => array(
diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 187bac6..63ea297 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -40,6 +40,10 @@
this.$thumbs = $( '.gallery .image img, a.image img' );
this.processThumbs();
 
+   // Exposed for tests
+   this.readinessCSSClass = 'mw-mmv-has-been-loaded';
+   this.readinessWaitDuration = 100;
+
$( window ).hashchange( function () {
self.hash();
} ).hashchange();
@@ -59,7 +63,9 @@
var deferred = $.Deferred(),
bs = this;
 
-   mw.loader.using( 'mmv', function () {
+   mw.loader.using( 'mmv', function() { bs.isCSSReady( deferred ); 
} );
+
+   return $.when( deferred ).then( function () {
if ( !bs.viewerInitialized ) {
if ( bs.thumbs.length ) {
mw.mediaViewer.initWithThumbs( 
bs.thumbs );
@@ -67,11 +73,27 @@
 
bs.viewerInitialized = true;
}
-
-   deferred.resolve();
} );
+   };
 
-   return deferred.promise();
+   /**
+* Checks if the mmv CSS has been correctly added to the page
+* This is a workaround for core bug 61852
+* @param {jQuery.Promise} deferred
+*/
+   MMVB.isCSSReady = function ( deferred ) {
+   var $dummy = $( '' )
+   .appendTo( $( document.body ) ),
+   bs = this;
+
+   if ( $dummy.css( 'display' ) === 'inline' ) {
+   // Let's be clean and remove the test item before 
resolving the deferred
+   $dummy.remove();
+   deferred.resolve();
+   } else {
+   $dummy.remove();
+   setTimeout( function () { bs.isCSSReady( deferred ); }, 
this.readinessWaitDuration );
+   }
};
 
/**
diff --git a/resources/mmv/mmv.loaded.css b/resources/mmv/mmv.loaded.css
new file mode 100644
index 000..77c1e09
--- /dev/null
+++ b/resources/mmv/mmv.loaded.css
@@ -0,0 +1,3 @@
+.mw-mmv-has-been-loaded {
+   display: inline;
+}
\ No newline at end of file
diff --git a/tests/qunit/mmv.bootstrap.test.js 
b/tests/qunit/mmv.bootstrap.test.js
index 7238618..23a9bfc 100644
--- a/tests/qunit/mmv.bootstrap.test.js
+++ b/tests/qunit/mmv.bootstrap.test.js
@@ -220,4 +220,32 @@
 
assert.strictEqual( window.location.hash, hash, 'Window\'s hash 
has been updated correctly' );
} );
+
+   QUnit.test( 'isCSSReady', 3, function ( assert ) {
+   var bootstrap = new mw.mmv.MultimediaViewerBootstrap(),
+   deferred = $.Deferred(),
+   CSSclass = 'foo-' + $.now(),
+   $style = $( '' )
+   .text( '.' + CSSclass + ' { display: inline; }' 
);
+
+   bootstrap.readinessCSSClass = CSSclass;
+   // This speeds up the test execution
+   // It's not zero because if the test fails, the browser would 
get hammered indefinitely
+   bootstrap.readinessWaitDuration = 30;
+
+   bootstrap.isCSSReady( deferred );
+
+   assert.strictEqual( deferred.state(), 'pending', 'The style 
isn\'t on the page yet' );
+
+   QUnit.stop();
+
+   deferred.then( function() {
+   QUnit.start();
+   assert.ok( true, 'The style is on the page' );
+   assert.strictEqual( $( '.' + CSSclass ).length, 0, 
'There are no leftover test elements' );
+

[MediaWiki-commits] [Gerrit] Fix crash when rotating phone with multiple pages - change (apps...wikipedia)

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

Change subject: Fix crash when rotating phone with multiple pages
..


Fix crash when rotating phone with multiple pages

- This stops replacing fragments, and just adds them. This *must*
  be fixed at some point since otherwise it will lead to unreasonable
  memory pressure.

Change-Id: I847053b3e38096ee0eb3fc5d2988c3157135d29a
---
M wikipedia/res/layout/fragment_page.xml
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
2 files changed, 15 insertions(+), 4 deletions(-)

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



diff --git a/wikipedia/res/layout/fragment_page.xml 
b/wikipedia/res/layout/fragment_page.xml
index b4477cf..20dd0f0 100644
--- a/wikipedia/res/layout/fragment_page.xml
+++ b/wikipedia/res/layout/fragment_page.xml
@@ -3,7 +3,9 @@
 
 http://schemas.android.com/apk/res/android";
   android:layout_width="match_parent"
-  android:layout_height="match_parent">
+  android:layout_height="match_parent"
+  android:background="@color/window_background_color"
+>
 https://gerrit.wikimedia.org/r/115136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I847053b3e38096ee0eb3fc5d2988c3157135d29a
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] 1.0 updates - change (mediawiki...CirrusSearch)

2014-02-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: 1.0 updates
..

1.0 updates

These changes get us working "better" with elasticsearch's master branch
but really are only a starting point for fixing us for 1.0.  Or something.

Change-Id: I1dc24be8350b3a9d7ec9aa4fc251368c7c4b7da2
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 10 insertions(+), 6 deletions(-)


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

diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 0d34258..8a4a353 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -232,7 +232,7 @@
$this->output( $this->indent . "\tValidating number of 
shards..." );
$settingsObject = $this->getIndex()->getSettings();
$settings = $settingsObject->get();
-   $actualShardCount = $settings[ 'index.number_of_shards' ];
+   $actualShardCount = $settings[ 'index' ][ 'number_of_shards' ];
if ( $actualShardCount == $this->getShardCount() ) {
$this->output( "ok\n" );
} else {
@@ -245,7 +245,7 @@
}
 
$this->output( $this->indent . "\tValidating number of 
replicas..." );
-   $actualReplicaCount = $settings[ 'index.number_of_replicas' ];
+   $actualReplicaCount = $settings[ 'index' ][ 
'number_of_replicas' ];
if ( $actualReplicaCount == $this->getReplicaCount() ) {
$this->output( "ok\n" );
} else {
@@ -261,7 +261,7 @@
$settings = $settingsObject->get();
$analysisConfig = new AnalysisConfigBuilder( $this->langCode, 
$this->aggressiveSplitting );
$requiredAnalyzers = $analysisConfig->buildConfig();
-   if ( $this->vaActualMatchRequired( 'index.analysis', $settings, 
$requiredAnalyzers ) ) {
+   if ( $this->vmActualMatchRequired( $settings[ 'index' ][ 
'analysis' ], $requiredAnalyzers ) ) {
$this->output( "ok\n" );
} else {
$this->output( "different..." );
@@ -290,6 +290,7 @@
private function vaActualMatchRequired( $prefix, $settings, $required ) 
{
foreach( $required as $key => $value ) {
$settingsKey = $prefix . '.' . $key;
+
if ( is_array( $value ) ) {
if ( !$this->vaActualMatchRequired( 
$settingsKey, $settings, $value ) ) {
return false;
@@ -341,11 +342,15 @@
 */
private function vmActualMatchRequired( $actual, $required ) {
foreach( $required as $key => $value ) {
+   // print "$key...";
if ( !array_key_exists( $key, $actual ) ) {
+   // print "not found\n";
return false;
}
if ( is_array( $value ) ) {
+   // print "descend...";
if ( !is_array( $actual[ $key ] ) ) {
+   // print "other not array\n";
return false;
}
if ( !$this->vmActualMatchRequired( $actual[ 
$key ], $value ) ) {
@@ -354,10 +359,9 @@
continue;
}
 
-   if ( $actual[ $key ] === 'false' ) {
-   $actual[ $key ] = false;
-   }
+   // print "value...";
// Note that I really mean !=, not !==.  Coercion is 
cool here.
+   // print $actual[ $key ] . "  $value\n";
if ( $actual[ $key ] != $value ) {
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dc24be8350b3a9d7ec9aa4fc251368c7c4b7da2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles 

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


[MediaWiki-commits] [Gerrit] Don't use parsed wikitext when dealing with CSS/JS pages - change (mediawiki...CirrusSearch)

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

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

Change subject: Don't use parsed wikitext when dealing with CSS/JS pages
..

Don't use parsed wikitext when dealing with CSS/JS pages

They're bogus and don't work and lead to fun unpredictable
results when things like unclosed  tags are used in
comments.

Ideally we could skip the parse entirely.

Bug: 61752
Change-Id: Ife47af3c5a769d5b4697105527f93a18425d8e58
---
M includes/BuildDocument/PageDataBuilder.php
1 file changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/includes/BuildDocument/PageDataBuilder.php 
b/includes/BuildDocument/PageDataBuilder.php
index 38ba644..55dc78e 100644
--- a/includes/BuildDocument/PageDataBuilder.php
+++ b/includes/BuildDocument/PageDataBuilder.php
@@ -35,8 +35,16 @@
);
 
public function build() {
-   foreach( $this->parseFuncs as $f ) {
-   $this->$f();
+   switch ( $this->content->getModel() ) {
+   case CONTENT_MODEL_CSS:
+   case CONTENT_MODEL_JAVASCRIPT:
+   // Don't use parser output here. It's useless 
and leads
+   // to weird results. See bug 61752
+   break;
+   default:
+   foreach( $this->parseFuncs as $f ) {
+   $this->$f();
+   }
}
 
return $this->doc;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife47af3c5a769d5b4697105527f93a18425d8e58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] Better way to detect CORS support - change (mediawiki...MultimediaViewer)

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

Change subject: Better way to detect CORS support
..


Better way to detect CORS support

The old technique doesn't work in Firefox and
doesn't always work in Chrome depending on
when you call it.

https://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/

Also fixes some tests that weren't overloading
the right function and were hitting the real
feature detection check

Change-Id: I0a9d6b5654efb169860ddf7e5e0551efb825920c
---
M resources/mmv/provider/mmv.provider.Image.js
M tests/qunit/provider/mmv.provider.Image.test.js
2 files changed, 15 insertions(+), 14 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mmv/provider/mmv.provider.Image.js 
b/resources/mmv/provider/mmv.provider.Image.js
index ee9a2f9..541ba7b 100644
--- a/resources/mmv/provider/mmv.provider.Image.js
+++ b/resources/mmv/provider/mmv.provider.Image.js
@@ -100,11 +100,18 @@
 
/**
 * Checks whether the current browser supports AJAX preloading of 
images.
+* This means that:
+* - the browser supports CORS requests (large wiki farms usually host 
images on a
+*   separate domain) and
+* - either AJAX and normal image loading uses the same cache (when an 
image is used by a CORS
+*   request, and then normally by setting img.src, it is only loaded 
once)
+* - or (as is the case with Firefox) they are cached separately, but 
that can be changed by
+*   setting the crossOrigin attribute
 * @return {boolean}
 */
Image.prototype.imagePreloadingSupported = function () {
-   // FIXME this is a *very* rough guess, but it'll work as the 
first estimation.
-   return 'crossOrigin' in new Image();
+   // This checks if the browser supports CORS requests in XHRs
+   return 'withCredentials' in new XMLHttpRequest();
};
 
mw.mmv.provider.Image = Image;
diff --git a/tests/qunit/provider/mmv.provider.Image.test.js 
b/tests/qunit/provider/mmv.provider.Image.test.js
index eae5754..3afed08 100644
--- a/tests/qunit/provider/mmv.provider.Image.test.js
+++ b/tests/qunit/provider/mmv.provider.Image.test.js
@@ -30,10 +30,8 @@
+ 
'8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAElFTkSuQmCC',
imageProvider = new mw.mmv.provider.Image();
 
-   imageProvider.performance = {
-   imagePreloadingSupported: function () { return false; },
-   recordEntry: $.noop
-   };
+   imageProvider.imagePreloadingSupported = function () { return 
false; };
+   imageProvider.performance.recordEntry = $.noop;
 
QUnit.stop();
imageProvider.get( url ).then( function( image ) {
@@ -52,10 +50,8 @@
result,
imageProvider = new mw.mmv.provider.Image();
 
-   imageProvider.performance = {
-   imagePreloadingSupported: function () { return false; },
-   recordEntry: $.noop
-   };
+   imageProvider.imagePreloadingSupported = function () { return 
false; };
+   imageProvider.performance.recordEntry = $.noop;
 
QUnit.stop();
imageProvider.get( url ).then( function( image ) {
@@ -85,10 +81,8 @@
QUnit.asyncTest( 'Image load fail test', 1, function ( assert ) {
var imageProvider = new mw.mmv.provider.Image();
 
-   imageProvider.performance = {
-   imagePreloadingSupported: function () { return false; },
-   recordEntry: $.noop
-   };
+   imageProvider.imagePreloadingSupported = function () { return 
false; };
+   imageProvider.performance.recordEntry = $.noop;
 
imageProvider.get( 'doesntexist.png' ).fail( function() {
assert.ok( true, 'fail handler was called' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a9d6b5654efb169860ddf7e5e0551efb825920c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Resize handle images - change (VisualEditor/VisualEditor)

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

Change subject: Resize handle images
..


Resize handle images

Arrows instead of circles

Change-Id: Icca4ae9cee154a1d07433cb7632182a9cf2795a2
---
M modules/ve/ce/styles/ve.ce.Node.css
M modules/ve/ce/ve.ce.ResizableNode.js
A modules/ve/ui/styles/images/resize-ne-sw.png
A modules/ve/ui/styles/images/resize-ne-sw.svg
A modules/ve/ui/styles/images/resize-nw-se.png
A modules/ve/ui/styles/images/resize-nw-se.svg
M modules/ve/ui/styles/ve.ui.Icons-raster.css
M modules/ve/ui/styles/ve.ui.Icons-vector.css
8 files changed, 111 insertions(+), 29 deletions(-)

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



diff --git a/modules/ve/ce/styles/ve.ce.Node.css 
b/modules/ve/ce/styles/ve.ce.Node.css
index c4737a3..f3d112f 100644
--- a/modules/ve/ce/styles/ve.ce.Node.css
+++ b/modules/ve/ce/styles/ve.ce.Node.css
@@ -86,39 +86,33 @@
 
 .ve-ce-resizableNode-handles div {
position: absolute;
-   width: 0.66em;
-   height: 0.66em;
-   border: solid 0.125em #fff;
-   background-color: #333;
-   box-shadow: 0 0.1em 0.2em rgba(0,0,0,0.75);
-   border-radius: 1em;
-   -webkit-box-sizing: border-box;
-   -moz-box-sizing: border-box;
-   box-sizing: border-box;
+   width: 11px;
+   height: 11px;
+   background-repeat: no-repeat;
 }
 
 .ve-ce-resizableNode-nwHandle {
cursor: nw-resize;
-   left: -0.33em;
-   top: -0.33em;
+   left: -6px;
+   top: -6px;
 }
 
 .ve-ce-resizableNode-neHandle {
cursor: ne-resize;
-   right: -0.33em;
-   top: -0.33em;
+   right: -6px;
+   top: -6px;
 }
 
 .ve-ce-resizableNode-swHandle {
cursor: sw-resize;
-   bottom: -0.33em;
-   left: -0.33em;
+   bottom: -6px;
+   left: -6px;
 }
 
 .ve-ce-resizableNode-seHandle {
cursor: se-resize;
-   bottom: -0.33em;
-   right: -0.33em;
+   bottom: -6px;
+   right: -6px;
 }
 
 .ve-ce-resizableNode-sizeLabel {
diff --git a/modules/ve/ce/ve.ce.ResizableNode.js 
b/modules/ve/ce/ve.ce.ResizableNode.js
index a06d3bc..be81980 100644
--- a/modules/ve/ce/ve.ce.ResizableNode.js
+++ b/modules/ve/ce/ve.ce.ResizableNode.js
@@ -54,10 +54,18 @@
// Initialization
this.$resizeHandles
.addClass( 've-ce-resizableNode-handles' )
-   .append( this.$( '' ).addClass( 
've-ce-resizableNode-nwHandle' ) )
-   .append( this.$( '' ).addClass( 
've-ce-resizableNode-neHandle' ) )
-   .append( this.$( '' ).addClass( 
've-ce-resizableNode-seHandle' ) )
-   .append( this.$( '' ).addClass( 
've-ce-resizableNode-swHandle' ) );
+   .append( this.$( '' )
+   .addClass( 've-ce-resizableNode-nwHandle 
ve-ui-icon-resize-nw-se' )
+   .data( 'handle', 'nw' ) )
+   .append( this.$( '' )
+   .addClass( 've-ce-resizableNode-neHandle 
ve-ui-icon-resize-ne-sw' )
+   .data( 'handle', 'ne' ) )
+   .append( this.$( '' )
+   .addClass( 've-ce-resizableNode-seHandle 
ve-ui-icon-resize-nw-se' )
+   .data( 'handle', 'se' ) )
+   .append( this.$( '' )
+   .addClass( 've-ce-resizableNode-swHandle 
ve-ui-icon-resize-ne-sw' )
+   .data( 'handle', 'sw' ) );
 
this.setCurrentDimensions( {
'width': this.model.getAttribute( 'width' ),
@@ -306,7 +314,7 @@
'left': this.$resizeHandles.position().left,
'height': this.$resizeHandles.height(),
'width': this.$resizeHandles.width(),
-   'handle': e.target.className
+   'handle': $( e.target ).data( 'handle' )
};
 
// Bind resize events
@@ -391,19 +399,19 @@
if ( this.resizing ) {
// X and Y diff
switch ( this.resizeInfo.handle ) {
-   case 've-ce-resizableNode-seHandle':
+   case 'se':
diff.x = e.screenX - this.resizeInfo.mouseX;
diff.y = e.screenY - this.resizeInfo.mouseY;
break;
-   case 've-ce-resizableNode-nwHandle':
+   case 'nw':
diff.x = this.resizeInfo.mouseX - e.screenX;
diff.y = this.resizeInfo.mouseY - e.screenY;
break;
-   case 've-ce-resizableNode-neHandle':
+   case 'ne':
diff.x = e.screenX - this.resizeInfo.mouseX;
diff.y = this.resizeInfo.mouseY - e.screenY;
break;
-   case 've-ce-resizableNode-swHandle':
+ 

[MediaWiki-commits] [Gerrit] Make VisualEditor opt-out on Portuguese Wikibooks - change (operations/mediawiki-config)

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

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

Change subject: Make VisualEditor opt-out on Portuguese Wikibooks
..

Make VisualEditor opt-out on Portuguese Wikibooks

Bug: 61762
Change-Id: I315156278e013561dfd6a7b79471ed31a9fc0565
---
M visualeditor-default.dblist
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/visualeditor-default.dblist b/visualeditor-default.dblist
index eb40e26..874f088 100644
--- a/visualeditor-default.dblist
+++ b/visualeditor-default.dblist
@@ -160,6 +160,7 @@
 yowiki
 zeawiki
 zuwiki
+ptwikibooks
 boardwiki
 collabwiki
 officewiki

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

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

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


[MediaWiki-commits] [Gerrit] doc: Use lowercase types where primitives (not objects) are ... - change (VisualEditor/VisualEditor)

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

Change subject: doc: Use lowercase types where primitives (not objects) are 
expected
..


doc: Use lowercase types where primitives (not objects) are expected

Fixed:
* ve.dm.MetaList.js (added in I74a9a2139)
* ve.ce.Document.js (added in Ifc01b8e5d)

Change-Id: Id758818ded5b892233bfc0d62f0f435da480c950
---
M modules/ve/ce/ve.ce.Document.js
M modules/ve/dm/ve.dm.MetaList.js
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/modules/ve/ce/ve.ce.Document.js b/modules/ve/ce/ve.ce.Document.js
index 3c21fb2..0df7a8d 100644
--- a/modules/ve/ce/ve.ce.Document.js
+++ b/modules/ve/ce/ve.ce.Document.js
@@ -274,7 +274,7 @@
  *
  * @method
  * @param {ve.Range} range Selection range
- * @returns {String} 'rtl' or 'ltr' as response
+ * @returns {string} 'rtl' or 'ltr' as response
  */
 ve.ce.Document.prototype.getDirectionFromRange = function ( range ) {
var effectiveNode,
diff --git a/modules/ve/dm/ve.dm.MetaList.js b/modules/ve/dm/ve.dm.MetaList.js
index bed2ffa..33d0b80 100644
--- a/modules/ve/dm/ve.dm.MetaList.js
+++ b/modules/ve/dm/ve.dm.MetaList.js
@@ -61,8 +61,8 @@
 /**
  * @event remove
  * @param {ve.dm.MetaItem} item Item that was removed
- * @param {Number} offset Linear model offset that the item was at
- * @param {Number} index Index within that offset the item was at
+ * @param {number} offset Linear model offset that the item was at
+ * @param {number} index Index within that offset the item was at
  */
 
 /* Methods */
@@ -339,8 +339,8 @@
  *
  * Pass a plain object rather than a MetaItem into this function unless you 
know what you're doing.
  * @param {Object|ve.dm.MetaItem} meta Metadata element (or MetaItem) to insert
- * @param {Number} [offset] Offset to insert the new metadata, or undefined to 
add to the end
- * @param {Number} [index] Index to insert the new metadata, or undefined to 
add to the end
+ * @param {number} [offset] Offset to insert the new metadata, or undefined to 
add to the end
+ * @param {number} [index] Index to insert the new metadata, or undefined to 
add to the end
  */
 ve.dm.MetaList.prototype.insertMeta = function ( meta, offset, index ) {
var tx;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id758818ded5b892233bfc0d62f0f435da480c950
Gerrit-PatchSet: 3
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Trevor Parscal 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Toolbar edit group widget optimization - change (mediawiki...Wikibase)

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

Change subject: Toolbar edit group widget optimization
..


Toolbar edit group widget optimization

The change applies some logic and performance improvement to the toolbar 
editgroup widget.
The edit group buttons' characteristics are moved to the options object. Except 
for the
edit button which is displayed initially, the other buttons will be created not 
before
they are needed for interaction. Additionally, the event handlers on each 
button have
been merged to a single event handler applied to the edit group node itself.

Change-Id: I80a5f17c24b20c230062630193b3d3360de77697
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/toolbar/edittoolbar.js
M lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js
M lib/resources/wikibase.ui.AliasesEditTool.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableAliases.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
M lib/tests/qunit/jquery.wikibase/toolbar/toolbareditgroup.tests.js
M lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.tests.js
M repo/resources/wikibase.ui.entityViewInit.js
10 files changed, 357 insertions(+), 172 deletions(-)

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



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 79a83f1..0a0069f 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -463,10 +463,6 @@
'wikibase.AbstractedRepoApi',
),
'messages' => array(
-   'wikibase-cancel',
-   'wikibase-edit',
-   'wikibase-save',
-   'wikibase-add',
'wikibase-save-inprogress',
'wikibase-remove-inprogress',
'wikibase-label-edit-placeholder',
@@ -485,7 +481,6 @@

'wikibase-sitelinks-sitename-columnheading-special',
'wikibase-sitelinks-siteid-columnheading',
'wikibase-sitelinks-link-columnheading',
-   'wikibase-remove',
'wikibase-propertyedittool-full',

'wikibase-propertyedittool-counter-pending-tooltip',

'wikibase-propertyedittool-counter-entrieslabel',
@@ -876,6 +871,12 @@
'jquery.wikibase.toolbar',
'jquery.wikibase.wbtooltip',
),
+   'messages' => array(
+   'wikibase-cancel',
+   'wikibase-edit',
+   'wikibase-save',
+   'wikibase-remove',
+   ),
),
 
'jquery.wikibase.wbtooltip' => $moduleTemplate + array(
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index f202d0e..f7a2693 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -437,7 +437,8 @@
function( event ) {
var $target = $( event.target ),
statementview = 
$target.data( 'statementview' ),
-   $btnSave = 
$target.data( 'edittoolbar' ).toolbar.editGroup.$btnSave,
+   toolbar = $target.data( 
'edittoolbar' ).toolbar,
+   $btnSave = 
toolbar.editGroup.getButton( 'save' ),
btnSave = 
$btnSave.data( 'toolbarbutton' );
 
/**
diff --git a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
index 69d355f..17d0502 100644
--- a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
@@ -188,7 +188,7 @@
editGroup.toNonEditMode();
self.enable();
self.toggleActionMessage( function() {
-   editGroup.$btnEdit.focus();
+   editGroup.getButton( 'edit' ).focus();
} );
} )
  

[MediaWiki-commits] [Gerrit] check_cert: catch SSLErrors and print them as such - change (operations/puppet)

2014-02-24 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: check_cert: catch SSLErrors and print them as such
..


check_cert: catch SSLErrors and print them as such

Catch SSLErrors (like e.g. "certificate verify failed") and raise them
as such, exiting with a CRITICAL error code. Beats unknown WARNINGs with
Tracebacks in their message body.

Change-Id: I31b5ce63092a4bd843a1fe54a8800e1facfe250a
---
M files/icinga/check_cert
1 file changed, 9 insertions(+), 5 deletions(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/files/icinga/check_cert b/files/icinga/check_cert
index 34c4603..a496d92 100644
--- a/files/icinga/check_cert
+++ b/files/icinga/check_cert
@@ -21,11 +21,15 @@
 sock.connect((HOST, PORT))
 
 # It is required to check for validity to pull the peer cert
-sock = ssl.wrap_socket(sock,
-cert_reqs = ssl.CERT_REQUIRED,
-ca_certs = "/etc/ssl/certs/" + args[2]
-)
-cert = sock.getpeercert()
+try:
+sock = ssl.wrap_socket(sock,
+cert_reqs = ssl.CERT_REQUIRED,
+ca_certs = "/etc/ssl/certs/" + args[2]
+)
+cert = sock.getpeercert()
+except ssl.SSLError, e:
+print "SSL error: %s" % e
+sys.exit(2)
 
 expire = datetime.datetime(*time.strptime(cert['notAfter'], "%b %d %H:%M:%S %Y 
GMT")[0:5])
 # Send a warning if the cert expires in the next four weeks

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31b5ce63092a4bd843a1fe54a8800e1facfe250a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] check_cert: catch SSLErrors and print them as such - change (operations/puppet)

2014-02-24 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: check_cert: catch SSLErrors and print them as such
..

check_cert: catch SSLErrors and print them as such

Catch SSLErrors (like e.g. "certificate verify failed") and raise them
as such, exiting with a CRITICAL error code. Beats unknown WARNINGs with
Tracebacks in their message body.

Change-Id: I31b5ce63092a4bd843a1fe54a8800e1facfe250a
---
M files/icinga/check_cert
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/115211/1

diff --git a/files/icinga/check_cert b/files/icinga/check_cert
index 34c4603..a496d92 100644
--- a/files/icinga/check_cert
+++ b/files/icinga/check_cert
@@ -21,11 +21,15 @@
 sock.connect((HOST, PORT))
 
 # It is required to check for validity to pull the peer cert
-sock = ssl.wrap_socket(sock,
-cert_reqs = ssl.CERT_REQUIRED,
-ca_certs = "/etc/ssl/certs/" + args[2]
-)
-cert = sock.getpeercert()
+try:
+sock = ssl.wrap_socket(sock,
+cert_reqs = ssl.CERT_REQUIRED,
+ca_certs = "/etc/ssl/certs/" + args[2]
+)
+cert = sock.getpeercert()
+except ssl.SSLError, e:
+print "SSL error: %s" % e
+sys.exit(2)
 
 expire = datetime.datetime(*time.strptime(cert['notAfter'], "%b %d %H:%M:%S %Y 
GMT")[0:5])
 # Send a warning if the cert expires in the next four weeks

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31b5ce63092a4bd843a1fe54a8800e1facfe250a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] Kafkatee puppet module - change (operations...kafkatee)

2014-02-24 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Kafkatee puppet module
..


Kafkatee puppet module

Change-Id: Ie91622168233d88c4eab6a80c3437d8622ba506e
---
A manifests/init.pp
A manifests/input.pp
A manifests/output.pp
A templates/input.kafka.conf.erb
A templates/input.pipe.conf.erb
A templates/kafkatee.conf.erb
A templates/output.conf.erb
7 files changed, 347 insertions(+), 0 deletions(-)

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



diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 000..c6f7cf8
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,64 @@
+# == Class: kafkatee
+#
+# Installs and configures a kafkatee instance. This does not configure any
+# inputs or outputs for the kafkatee instance.  You should configure them
+# using the kafkatee::input and kafkatee::output defines.
+#
+# == Parameters:
+# $kafka_brokers - Array of Kafka broker addresses.
+# $kafka_offset_store_path   - Path in which to store consumed Kafka offsets.
+#  Default: /var/cache/kafkatee/offsets
+# $kafka_offset_reset- Where to consume from if the offset from which 
to
+#  consume is not on the broker, or if there is no
+#  stored offset yet.  One of: smallest, largest, 
error.
+#  Default: largest
+# $kafka_message_max_bytes   - Maximum message size.  Default: undef (400).
+# $pidfile   - Location of kafkatee pidfile.
+#  Default: /var/run/kafkatee/kafkatee.pid
+# $log_statistics_file   - Path in which to store kafkatee .json 
statistics.
+#  Default: /var/cache/kafkatee/kafkatee.stats.json
+# $log_statistics_interval   - How often to write statistics to 
$log_statistics_file.
+#  Default: 60
+# $output_encoding   - If this is string and inputs are json, then the 
JSON
+#  input will be transformed according to 
$output_format
+#  before they are sent to the configured outputs.
+#  Default: string
+# $output_format - Format string with which to transform JSON data 
into
+#  string output.  See kafkatee.conf documentation
+#  for more info.
+#  Default: SEE PARAMETER
+# $output_queue_size - Maximum queue size for each output, in number 
of messages.
+#  Default: undef, (100)
+# $config_file   - Main kafkatee config file.
+#  Default: /etc/kafkatee.conf
+# $config_directory  - kafkatee config include directory.
+#  Default: /etc/kafkatee.d
+#
+class kafkatee(
+$kafka_brokers,
+$kafka_offset_store_path = '/var/cache/kafkatee/offsets',
+$kafka_offset_reset  = 'largest',
+$kafka_message_max_bytes = undef,
+$pidfile = '/var/run/kafkatee/kafkatee.pid',
+$log_statistics_file = '/var/cache/kafkatee/kafkatee.stats.json',
+$log_statistics_interval = 60,
+$output_encoding = 'string',
+$output_format   = '%{hostname}%{sequence} %{dt}   
%{time_firstbyte}   %{ip}   %{cache_status}/%{http_status}  
%{response_size}%{http_method}  
http://%{uri_host}%{uri_path}%{uri_query}   -   %{content_type} 
%{referer}  %{x_forwarded_for}  %{user_agent}   %{accept_language}  
%{x_analytics}',
+$output_queue_size   = undef,
+)
+{
+package { 'kafkatee':
+ensure => 'installed',
+}
+
+file { '/etc/kafkatee.conf':
+content => template('kafkatee/kafkatee.conf.erb'),
+require  => Package['kafkatee'],
+}
+
+service { 'kafkatee':
+ensure=> running,
+provider  => 'upstart',
+subscribe => File['/etc/kafkatee.conf'],
+}
+}
diff --git a/manifests/input.pp b/manifests/input.pp
new file mode 100644
index 000..5184750
--- /dev/null
+++ b/manifests/input.pp
@@ -0,0 +1,37 @@
+# == Define kafkatee::input
+# Configures a kafkatee input.  This can be either from Kafka
+# or from a subprocess pipe.  If from Kafka, the brokers consumed from
+# are global for this kafkatee instance and configured using
+# the main kafkatee class.
+#
+# == Parameters
+# $type - Type of kafkatee input.  Either 'pipe' or 'kafka'.
+# Default: kafka
+# $topic- Kafka topic from which to consume.  Default: undef
+# $partitions   - Kafka topic partitions from which to consume.
+# This can be a list of partitions, or a range, e.g. 0-9.
+# Default undef.
+# $offset   - Offset type from which to consume in Kafka.
+# One of

[MediaWiki-commits] [Gerrit] Remove content index segregation - change (mediawiki...CirrusSearch)

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

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

Change subject: Remove content index segregation
..

Remove content index segregation

This isn't useful for most wikis and actually cases a huge performance
overhead as you start having tons of extra indexes and aliases that end
up being barely used.

Instead, put all namespaces that aren't explicitly mapped into the general
index.

This is a breaking change, please see the README for configuration to
replicate the existing configuration.

Change-Id: Id2e909b13f97defe8ca2a1b31414040567ea9900
---
M CirrusSearch.php
M README
M includes/Connection.php
3 files changed, 11 insertions(+), 15 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index e39d162..51395d3 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -43,13 +43,13 @@
 $wgCirrusSearchConnectionAttempts = 1;
 
 // Number of shards for each index
-$wgCirrusSearchShardCount = array( 'content' => 4, 'general' => 4 );
+$wgCirrusSearchShardCount = array( 'general' => 4 );
 
 // Number of replicas per shard for each index
 // The default of 0 is fine for single-node setups, but if this is
 // deployed to a multi-node setting you probably at least want these
 // set to 1 for some redundancy, if not 2 for more redundancy.
-$wgCirrusSearchReplicaCount = array( 'content' => 0, 'general' => 0 );
+$wgCirrusSearchReplicaCount = array( 'general' => 0 );
 
 // How many seconds must a search of Elasticsearch be before we consider it
 // slow?  Default value is 10 seconds which should be fine for catching the 
rare
diff --git a/README b/README
index 67f818c..2ec9efc 100644
--- a/README
+++ b/README
@@ -175,7 +175,12 @@
 during upgrades.  More replicas will help distribute queries across more 
nodes.  Having more
 replicas than nodes doesn't make sense and Elasticsearch will stay "yellow" if 
you do that.
 Anyway, you should add this to LocalSettings.php to change it:
- $wgCirrusSearchReplicaCount = array( 'content' => 2, 'general' => 2 );
+ $wgCirrusSearchReplicaCount = array( 'general' => 2 );
+
+If your wiki is very large (millions of pages or more), you may consider 
splitting your index into
+multiple indicies. This used to be done automatically but was changed. The 
previous behavior can
+be emulated using $wgCirrusSearchNamespaceMappings by setting the content 
namespaces to an index
+called 'content.'
 
 
 Testing
diff --git a/includes/Connection.php b/includes/Connection.php
index 15f1caa..bff50f7 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -25,13 +25,7 @@
  */
 class Connection extends ElasticaConnection {
/**
-* Name of the index that holds content articles.
-* @var string
-*/
-   const CONTENT_INDEX_TYPE = 'content';
-   
-   /**
-* Name of the index that holds non-content articles.
+* Name of the index that holds all articles not mapped to their own 
index.
 * @var string
 */
const GENERAL_INDEX_TYPE = 'general';
@@ -78,7 +72,7 @@
public static function getAllIndexTypes() {
global $wgCirrusSearchNamespaceMappings;
return array_merge( array_values( 
$wgCirrusSearchNamespaceMappings ),
-   array( self::CONTENT_INDEX_TYPE, 
self::GENERAL_INDEX_TYPE ) );
+   array( self::GENERAL_INDEX_TYPE ) );
}
 
/**
@@ -90,10 +84,7 @@
global $wgCirrusSearchNamespaceMappings;
if ( isset( $wgCirrusSearchNamespaceMappings[$namespace] ) ) {
return $wgCirrusSearchNamespaceMappings[$namespace];
-   } elseif ( MWNamespace::isContent( $namespace ) ) {
-   return self::CONTENT_INDEX_TYPE;
-   } else {
-   return self::GENERAL_INDEX_TYPE;
}
+   return self::GENERAL_INDEX_TYPE;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2e909b13f97defe8ca2a1b31414040567ea9900
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] Remove another ss_active_users check from SiteStats::isSane - change (mediawiki/core)

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

Change subject: Remove another ss_active_users check from SiteStats::isSane
..


Remove another ss_active_users check from SiteStats::isSane

Also add a comment to method doc to make sure, nobody will add it again.

Follow-Up: Id8f1cb7035ae0058fb34a6c7bdf7bf9f6c740a69
Follow-Up: I268599be96106e1175fdf9750a2adc9468ebc93c
Change-Id: Ifd6da554b531720aace4497f7fbc2f58c12edc07
---
M includes/SiteStats.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index 6e2b5fa..7169b2e 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -221,6 +221,8 @@
/**
 * Is the provided row of site stats sane, or should it be regenerated?
 *
+* Checks only fields which are filled by SiteStatsInit::refresh.
+*
 * @param $row
 *
 * @return bool
@@ -229,7 +231,6 @@
if ( $row === false
|| $row->ss_total_pages < $row->ss_good_articles
|| $row->ss_total_edits < $row->ss_total_pages
-   || $row->ss_users < $row->ss_active_users
) {
return false;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd6da554b531720aace4497f7fbc2f58c12edc07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix hash self-reaction - change (mediawiki...MultimediaViewer)

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

Change subject: Fix hash self-reaction
..


Fix hash self-reaction

* Fixes bug where the mmv would react to its own hash changes
* Adds jquery.hashchange for older browser support

Change-Id: I2d23699bb444d9eb533d239e25bc47fa96c902a9
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/254
---
M .jshintignore
M MultimediaViewer.php
A resources/jquery.hashchange/jquery.hashchange.js
M resources/mmv/mmv.bootstrap.js
M resources/mmv/mmv.js
M resources/mmv/mmv.lightboxinterface.js
M tests/qunit/mmv.bootstrap.test.js
M tests/qunit/mmv.lightboxinterface.test.js
M tests/qunit/mmv.test.js
9 files changed, 474 insertions(+), 32 deletions(-)

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



diff --git a/.jshintignore b/.jshintignore
index bbac23b..bc13f20 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1,3 +1,3 @@
 resources/jquery.scrollTo
-resources/jquery.throttle.debounce
+resources/jquery.hashchange
 docs/js/*
diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 29abb0e..b47866e 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -452,6 +452,7 @@
'mediawiki.Title',
'mmv.logger',
'mmv.ui',
+   'jquery.hashchange',
),
), $moduleInfo( 'mmv' ) );
 
@@ -461,6 +462,12 @@
),
), $moduleInfo( 'jquery.scrollTo' ) );
 
+   $wgResourceModules['jquery.hashchange'] = array_merge( array(
+   'scripts' => array(
+   'jquery.hashchange.js',
+   ),
+   ), $moduleInfo( 'jquery.hashchange' ) );
+
$wgExtensionFunctions[] = function () {
global $wgResourceModules;
 
diff --git a/resources/jquery.hashchange/jquery.hashchange.js 
b/resources/jquery.hashchange/jquery.hashchange.js
new file mode 100644
index 000..1f0592b
--- /dev/null
+++ b/resources/jquery.hashchange/jquery.hashchange.js
@@ -0,0 +1,390 @@
+/*!
+ * jQuery hashchange event - v1.3 - 7/21/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ *
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+
+// Script: jQuery hashchange event
+//
+// *Version: 1.3, Last updated: 7/21/2010*
+//
+// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
+// GitHub   - http://github.com/cowboy/jquery-hashchange/
+// Source   - 
http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
+// (Minified)   - 
http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js
 (0.8kb gzipped)
+//
+// About: License
+//
+// Copyright (c) 2010 "Cowboy" Ben Alman,
+// Dual licensed under the MIT and GPL licenses.
+// http://benalman.com/about/license/
+//
+// About: Examples
+//
+// These working examples, complete with fully commented code, illustrate a few
+// ways in which this plugin can be used.
+//
+// hashchange event - 
http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
+// document.domain - 
http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
+//
+// About: Support and Testing
+//
+// Information about what version or versions of jQuery this plugin has been
+// tested with, what browsers it has been tested in, and where the unit tests
+// reside (so you can test it yourself).
+//
+// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
+// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 
3.2-5,
+//   Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 
4.6-5.
+// Unit Tests  - http://benalman.com/code/projects/jquery-hashchange/unit/
+//
+// About: Known issues
+//
+// While this jQuery hashchange event implementation is quite stable and
+// robust, there are a few unfortunate browser bugs surrounding expected
+// hashchange event-based behaviors, independent of any JavaScript
+// window.onhashchange abstraction. See the following examples for more
+// information:
+//
+// Chrome: Back Button - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
+// Firefox: Remote XMLHttpRequest - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
+// WebKit: Back Button in an Iframe - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
+// Safari: Back Button from a different domain - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
+//
+// Also note that should a browser natively support the window.onhashchange
+// event, but not report that it does, the fallback polling loop will be used.
+//
+// About: Release History
+//
+// 1.3   - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
+// 

[MediaWiki-commits] [Gerrit] Browsertests: minor fixes to tags and sitelinks.feature - change (mediawiki...Wikibase)

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

Change subject: Browsertests: minor fixes to tags and sitelinks.feature
..


Browsertests: minor fixes to tags and sitelinks.feature

Added @wikidata.beta.wmflabs.org tag to sitelinks.feature, means that
sitelink tests will now also run regularely on beta.

Introduced a new tag @performance_testing for easy grouping of performance
related tests.

Change-Id: Ifef2d2fc286a0060d03096074a352db967131bb0
---
M tests/browser/features/performance_test.feature
M tests/browser/features/sitelinks.feature
M tests/browser/features/support/modules/sitelink_module.rb
3 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/tests/browser/features/performance_test.feature 
b/tests/browser/features/performance_test.feature
index 029eebf..a8950ed 100644
--- a/tests/browser/features/performance_test.feature
+++ b/tests/browser/features/performance_test.feature
@@ -4,6 +4,7 @@
 #
 # testing loading time of huge entities
 
+@performance_testing
 Feature: High performance
 
   Background:
diff --git a/tests/browser/features/sitelinks.feature 
b/tests/browser/features/sitelinks.feature
index 8abd524..9032790 100644
--- a/tests/browser/features/sitelinks.feature
+++ b/tests/browser/features/sitelinks.feature
@@ -5,6 +5,7 @@
 #
 # feature definition for item sitelinks tests
 
+@wikidata.beta.wmflabs.org
 Feature: Edit sitelinks
 
   Background:
@@ -118,7 +119,7 @@
   | press the RETURN key in the pagename input field |
 
   @save_sitelink @modify_entity
-  Scenario Outline: Save sitelink & reload
+  Scenario Outline: Save sitelink and reload
 Given The following sitelinks do not exist:
   | enwiki | Asia |
 When I click the sitelink add button
diff --git a/tests/browser/features/support/modules/sitelink_module.rb 
b/tests/browser/features/support/modules/sitelink_module.rb
index 2015e79..376e1f1 100644
--- a/tests/browser/features/support/modules/sitelink_module.rb
+++ b/tests/browser/features/support/modules/sitelink_module.rb
@@ -76,6 +76,8 @@
   self.site_id_input_field = sitelink[0]
   self.page_input_field_element.when_visible
   self.page_input_field = sitelink[1]
+  # remove additional characters sometimes suggested by the suggester
+  self.page_input_field_element.send_keys :delete
   save_sitelink_link
   wait_for_api_callback
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef2d2fc286a0060d03096074a352db967131bb0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Adrian Lang 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: Jhall 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: WikidataJenkins 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7d8e0f4..dd02bef - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 7d8e0f4..dd02bef
..


Syncronize VisualEditor: 7d8e0f4..dd02bef

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

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 7d8e0f4..dd02bef 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 7d8e0f41613f15d704fe3a00b3f80af710a02d6a
+Subproject commit dd02bef985d2ebfe0e804b2f1878a73d635acbcf

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I308981c5a782bd8c082f1feb2bfb79a950a70d7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Update to latest mediawiki-selenium gem for better login - change (mediawiki...VisualEditor)

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

Change subject: Update to latest mediawiki-selenium gem for better login
..


Update to latest mediawiki-selenium gem for better login

Change-Id: I8e75afcc25bdee692124faa63bbfc36cdedb
---
M modules/ve-mw/test/browser/Gemfile.lock
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/test/browser/Gemfile.lock 
b/modules/ve-mw/test/browser/Gemfile.lock
index acc3fd6..f0574fc 100644
--- a/modules/ve-mw/test/browser/Gemfile.lock
+++ b/modules/ve-mw/test/browser/Gemfile.lock
@@ -22,7 +22,7 @@
 headless (1.0.1)
 i18n (0.6.9)
 json (1.8.1)
-mediawiki_selenium (0.2.6)
+mediawiki_selenium (0.2.7)
 mediawiki_api (0.0.2)
   rest-client (~> 1.6, >= 1.6.7)
   cucumber (~> 1.3, >= 1.3.10)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e75afcc25bdee692124faa63bbfc36cdedb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 
Gerrit-Reviewer: Jhall 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7d8e0f4..dd02bef - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 7d8e0f4..dd02bef
..

Syncronize VisualEditor: 7d8e0f4..dd02bef

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


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

diff --git a/VisualEditor b/VisualEditor
index 7d8e0f4..dd02bef 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 7d8e0f41613f15d704fe3a00b3f80af710a02d6a
+Subproject commit dd02bef985d2ebfe0e804b2f1878a73d635acbcf

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I308981c5a782bd8c082f1feb2bfb79a950a70d7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Update Wikidata build - change (mediawiki/core)

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

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

Change subject: Update Wikidata build
..

Update Wikidata build

Fixes time input js, coordinate formatting, commons
link formatting, and includes performance improvement.

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


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

diff --git a/extensions/Wikidata b/extensions/Wikidata
index 0a431c5..c4a0b38 16
--- a/extensions/Wikidata
+++ b/extensions/Wikidata
-Subproject commit 0a431c5a1ba7b745431c3f8e60e9b3e3ec1b0a8d
+Subproject commit c4a0b3899625d3aeb34b2e271a9807f11888e081

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41e304da07ce27bb89d7a6c9607a49ef544497af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Update to latest mediawiki-selenium gem for better login - change (mediawiki...VisualEditor)

2014-02-24 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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

Change subject: Update to latest mediawiki-selenium gem for better login
..

Update to latest mediawiki-selenium gem for better login

Change-Id: I8e75afcc25bdee692124faa63bbfc36cdedb
---
M modules/ve-mw/test/browser/Gemfile.lock
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/test/browser/Gemfile.lock 
b/modules/ve-mw/test/browser/Gemfile.lock
index acc3fd6..f0574fc 100644
--- a/modules/ve-mw/test/browser/Gemfile.lock
+++ b/modules/ve-mw/test/browser/Gemfile.lock
@@ -22,7 +22,7 @@
 headless (1.0.1)
 i18n (0.6.9)
 json (1.8.1)
-mediawiki_selenium (0.2.6)
+mediawiki_selenium (0.2.7)
 mediawiki_api (0.0.2)
   rest-client (~> 1.6, >= 1.6.7)
   cucumber (~> 1.3, >= 1.3.10)

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

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

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


[MediaWiki-commits] [Gerrit] Don't use @include as that supresses useful error output - change (mediawiki...Wikibase)

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

Change subject: Don't use @include as that supresses useful error output
..


Don't use @include as that supresses useful error output

Change-Id: Iafcc7c188841d2710f0eea925a901dd59aac813a
---
M client/WikibaseClient.php
M repo/Wikibase.php
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  Aude: Looks good to me, but someone else must approve
  WikidataJenkins: Verified
  Addshore: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index b009543..a898993 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -35,7 +35,7 @@
 
 // Include the WikibaseLib extension if that hasn't been done yet, since it's 
required for WikibaseClient to work.
 if ( !defined( 'WBL_VERSION' ) ) {
-   @include_once( __DIR__ . '/../lib/WikibaseLib.php' );
+   include_once( __DIR__ . '/../lib/WikibaseLib.php' );
 }
 
 if ( !defined( 'WBL_VERSION' ) ) {
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index ad7028f..1262202 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -27,7 +27,7 @@
 
 // Include the WikibaseLib extension if that hasn't been done yet, since it's 
required for Wikibase to work.
 if ( !defined( 'WBL_VERSION' ) ) {
-   @include_once( __DIR__ . '/../lib/WikibaseLib.php' );
+   include_once( __DIR__ . '/../lib/WikibaseLib.php' );
 }
 
 if ( !defined( 'WBL_VERSION' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafcc7c188841d2710f0eea925a901dd59aac813a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Jeroen De Dauw 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: WikidataJenkins 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Browsertests: fix several broken tests in old-style browsertest - change (mediawiki...Wikibase)

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

Change subject: Browsertests: fix several broken tests in old-style browsertest
..


Browsertests: fix several broken tests in old-style browsertest

Change-Id: Ib3c27df4d2e7bf7fcd381e89864097e9279859f0
---
M repo/tests/selenium/statements/qualifiers_spec.rb
M repo/tests/selenium/statements/references_spec.rb
M repo/tests/selenium/statements/statements_cm_spec.rb
M repo/tests/selenium/statements/statements_coordinate_spec.rb
M repo/tests/selenium/statements/statements_spec.rb
M repo/tests/selenium/statements/statements_string_spec.rb
M selenium/Gemfile.lock
M selenium/lib/modules/statement_module.rb
8 files changed, 60 insertions(+), 31 deletions(-)

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



diff --git a/repo/tests/selenium/statements/qualifiers_spec.rb 
b/repo/tests/selenium/statements/qualifiers_spec.rb
index c36aeac..f9e04d1 100644
--- a/repo/tests/selenium/statements/qualifiers_spec.rb
+++ b/repo/tests/selenium/statements/qualifiers_spec.rb
@@ -38,7 +38,9 @@
 
 cm_statement_value = "Vespa_crabro_head_01.jpg"
 cm_qualifier_value = "Blason_CH_Canton_Valais_3D.svg"
+cm_qualifier_value_expected = "Blason CH Canton Valais 3D.svg"
 cm_qualifier_value_changed = "BlueFeather.jpg"
+cm_qualifier_value_changed_expected = "BlueFeather.jpg"
 
 describe "Check qualifiers UI" do
   before :all do
@@ -179,6 +181,7 @@
 page.entitySelectorInput2?.should be_false
 page.qualifierValueInput1?.should be_true
 page.qualifierValueInput1.should == cm_qualifier_value
+ajax_wait
 page.saveStatement?.should be_true
 page.cancelStatement?.should be_true
 
@@ -311,7 +314,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value
+page.qualifierValue2.should == cm_qualifier_value_expected
 page.qualifierValueLink2?.should be_true
 @browser.refresh
 page.wait_for_entity_to_load
@@ -325,7 +328,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value
+page.qualifierValue2.should == cm_qualifier_value_expected
 page.qualifierValueLink2?.should be_true
 
 page.editFirstStatement?.should be_true
@@ -352,7 +355,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value_changed
+page.qualifierValue2.should == cm_qualifier_value_changed_expected
 page.qualifierValueLink2?.should be_true
 @browser.refresh
 page.wait_for_entity_to_load
@@ -366,7 +369,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value_changed
+page.qualifierValue2.should == cm_qualifier_value_changed_expected
 page.qualifierValueLink2?.should be_true
   end
 end
diff --git a/repo/tests/selenium/statements/references_spec.rb 
b/repo/tests/selenium/statements/references_spec.rb
index c1d19dc..6473933 100644
--- a/repo/tests/selenium/statements/references_spec.rb
+++ b/repo/tests/selenium/statements/references_spec.rb
@@ -38,9 +38,13 @@
 
 cm_statement_value = "Louisiana 462.svg"
 cm_reference_value = "Lousiana Red Kammgarn.jpg"
+cm_reference_value_expected = "Lousiana Red Kammgarn.jpg"
 cm_reference_value2 = "Nyan.jpg"
+cm_reference_value2_expected = "Nyan.jpg"
 cm_reference_value_changed = "Denkmal.png"
+cm_reference_value_changed_expected = "Denkmal.png"
 cm_reference_value_changed2 = "Dynamite-5.svg"
+cm_reference_value_changed2_expected = "Dynamite-5.svg"
 
 describe "Check references UI" do
   before :all do
@@ -117,6 +121,7 @@
 page.removeReferenceLine1?.should be_false
 random_ref_value = generate_random_string(10)
 page.referenceValueInput = random_ref_value
+ajax_wait
 page.saveReference?.should be_true
 page.cancelReference?.should be_true
 page.addReferenceLine?.should be_true
@@ -147,6 +152,7 @@
 page.wait_for_reference_value_box
 page.referenceValueInput_element.clear
 page.referenceValueInput = generate_random_string(10)
+ajax_wait
 page.saveReference?.should be_true
 page.addReferenceLine?.should be_true
 page.cancelReference?.should be_true
@@ -181,19 +187,20 @@
 page.wait_for_entity_selector_list
   

[MediaWiki-commits] [Gerrit] Cleanup wikibase-listdatatypes-* i18n keys - change (mediawiki...Wikibase)

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

Change subject: Cleanup wikibase-listdatatypes-* i18n keys
..


Cleanup wikibase-listdatatypes-* i18n keys

Bug: 61496
Change-Id: I895d50983f1a8b80cf48b24aa107608ff06089d7
---
M repo/Wikibase.i18n.php
1 file changed, 16 insertions(+), 14 deletions(-)

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



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index c29c98b..1f7ee92 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -375,38 +375,39 @@
 
// datatype descriptions
'wikibase-listdatatypes-wikibase-item-head' => 'Item',
-   'wikibase-listdatatypes-wikibase-item-body' => 'Link to other items at 
the project. During entry the "Item" namespace on Wikidata will be searched for 
matching entries. It consists of a single text entry field.
-* scheme – implicit part of the Iri-string
-* hierarchicalpart – implicit part of the Iri-string
-* query – implicit part of the Iri-string
-* fragment – implicit part of the Iri-string',
+   'wikibase-listdatatypes-wikibase-item-body' => 'Link to other items at 
the project. During entry the "Item" namespace on Wikidata will be searched for 
matching entries. It consists of a single text entry field.',
+
'wikibase-listdatatypes-commonsmedia-head' => 'Commons media',
-   'wikibase-listdatatypes-commonsmedia-body' => 'Link to files stored at 
Wikimedia Commons. During entry the "File" namespace on Commons will be 
searched for matching entries.
-* scheme – implicit part of the Iri-string
-* hierarchicalpart – implicit part of the Iri-string
-* query – implicit part of the Iri-string
-* fragment – implicit part of the Iri-string',
+   'wikibase-listdatatypes-commonsmedia-body' => 'Link to files stored at 
Wikimedia Commons. During entry the "File" namespace on Commons will be 
searched for matching entries.',
+
'wikibase-listdatatypes-globe-coordinate-head' => 'Globe coordinate',
'wikibase-listdatatypes-globe-coordinate-body' => 'Literal data for a 
geographical position given as a latitude-longitude pair in gms or decimal 
degrees for the given stellar body. Defaults to "Earth" and then "WGS84". It 
adds a resolution and range.
 * latitude – implicit first part (float, dms, dm, dd) of the coordinate 
string, direction is either given by prefixed sign or by postfixed N/S
 * longitude – implicit second part (float, dms, dm, dd) of the coordinate 
string, direction is either given by prefixed sign or by postfixed E/W
-* globe – explicit (?) data value, given as stellar body that defaults to 
"Earth" and then "WGS84"',
+* globe – explicit (?) data value, given as stellar body that defaults to 
Earth  "http://www.wikidata.org/entity/Q2";
+* precision - numeric precision of the coordinate',
+
'wikibase-listdatatypes-quantity-head' => 'Quantity',
'wikibase-listdatatypes-quantity-body' => 'Literal data field for a 
quantity that relates to some kind of well-defined unit. The actual unit goes 
in the data values that is entered.
-* value – implicit part of the string (mapping of unit prefix is unclear)
-* unit – implicit part of the string (mapping to standardizing body is unclear)
-* accuracy (optional) – explicit data value, has the same unit as the value',
+* amount – implicit part of the string (mapping of unit prefix is unclear)
+* unit – implicit part of the string that defaults to "1" (mapping to 
standardizing body is unclear)
+* upperbound - quantity\'s upper bound
+* lowerbound - quantity\'s lower bound',
+
'wikibase-listdatatypes-monolingual-text-head' => 'Monolingual text',
'wikibase-listdatatypes-monolingual-text-body' => 'Literal data field 
for a string that is not translated into other languages. This type of string 
is defined once and reused across all languages. Typical use is a geographical 
names written in the local language, an identifier of some kind, a chemical 
formula or a Latin scientific name.
 * language – explicit value for identifying the language for the text part
 * value – explicit value for the language specific variant string',
+
'wikibase-listdatatypes-multilingual-text-head' => 'Multilingual text',
'wikibase-listdatatypes-multilingual-text-body' => 'Literal data field 
for a string that must be translated into other languages. Typical use is an 
entity name of global interest that has non-local written forms. Those can 
differ both in languages and script systems.
 * language – explicit value for identifying the language for the text part
 * value – explicit value for the language specific variant string',
+
'wikibase-listdatatypes-string-head' => 'String',
'wikibase-listdatatypes-string-body' => 'Literal data field for a 
string of glyphs. Typical use are identifiers that have written forms which do 
not depend on the language of the reader

[MediaWiki-commits] [Gerrit] set is_recurring and is_refund to false and not null/unset, ... - change (wikimedia...crm)

2014-02-24 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: set is_recurring and is_refund to false and not null/unset, if 
they are known.
..


set is_recurring and is_refund to false and not null/unset, if they are known.

Change-Id: I7e5228152f7bece8af65942d885e73b541958af9
---
M sites/all/modules/wmf_civicrm/WmfTransaction.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/sites/all/modules/wmf_civicrm/WmfTransaction.php 
b/sites/all/modules/wmf_civicrm/WmfTransaction.php
index 3fd5c0f..dfc400c 100644
--- a/sites/all/modules/wmf_civicrm/WmfTransaction.php
+++ b/sites/all/modules/wmf_civicrm/WmfTransaction.php
@@ -58,9 +58,7 @@
 $transaction = new WmfTransaction();
 $transaction->gateway_txn_id = $msg['gateway_txn_id'];
 $transaction->gateway = $msg['gateway'];
-if ( array_key_exists( 'recurring', $msg ) && $msg['recurring'] ) {
-$transaction->is_recurring = true;
-}
+$transaction->is_recurring = ( array_key_exists( 'recurring', $msg ) 
&& $msg['recurring'] );
 return $transaction;
 }
 
@@ -73,11 +71,13 @@
 throw new WmfException( 'INVALID_MESSAGE', "Missing ID." );
 }
 
+$transaction->is_refund = false;
 while ( $parts[0] === "RFD" or $parts[0] === "REFUND" ) {
 $transaction->is_refund = true;
 array_shift( $parts );
 }
 
+$transaction->is_recurring = false;
 while ( $parts[0] === "RECURRING" ) {
 $transaction->is_recurring = true;
 array_shift( $parts );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e5228152f7bece8af65942d885e73b541958af9
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] DefaultSettings.php: Remove $wgPasswordSenderName - change (mediawiki/core)

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

Change subject: DefaultSettings.php: Remove $wgPasswordSenderName
..


DefaultSettings.php: Remove $wgPasswordSenderName

It doesn't do anything.

Follow-up to Ibfd28cd181365c8c0b5f3e8ffe8f5de8c89844a3.

Change-Id: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
---
M includes/DefaultSettings.php
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3526c96..b0ed35b 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1330,13 +1330,6 @@
 unset( $serverName ); # Don't leak local variables to global scope
 
 /**
- * Password reminder name
- *
- * @deprecated since 1.23; use the system message 'emailsender' instead.
- */
-$wgPasswordSenderName = 'MediaWiki Mail';
-
-/**
  * Dummy address which should be accepted during mail send action.
  * It might be necessary to adapt the address or to set it equal
  * to the $wgEmergencyContact address.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] logstash: Increase shard replica count - change (operations/puppet)

2014-02-24 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: logstash: Increase shard replica count
..


logstash: Increase shard replica count

Increase the shard replica count from 1 to 2 for new indices created
based on the logstash index template. This should help avoid data loss
in the case of a cluster split brain event at the cost of a 33% increase
in disk space utilization across the cluster. At current log volume and
index retention duration this should not be an issue.

This change has already been applied to the cluster and will take effect
on indices created on or after 2014-02-25.

Change-Id: I5e9fdde164eee27e43cac57ad56ad20ed04b1dae
---
M modules/logstash/files/elasticsearch-template.json
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/logstash/files/elasticsearch-template.json 
b/modules/logstash/files/elasticsearch-template.json
index 04f6896..a3842dc 100644
--- a/modules/logstash/files/elasticsearch-template.json
+++ b/modules/logstash/files/elasticsearch-template.json
@@ -2,10 +2,9 @@
   "template" : "logstash-*",
   "settings" : {
 "number_of_shards" : 1,
-"number_of_replicas" : 1,
+"number_of_replicas" : 2,
 "index.cache.field.type" : "soft",
 "index.refresh_interval" : "5s",
-"index.routing.allocation.total_shards_per_node" : 2,
 "analysis" : {
   "analyzer" : {
 "default" : {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e9fdde164eee27e43cac57ad56ad20ed04b1dae
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] DefaultSettings.php: Remove $wgPasswordSenderName - change (mediawiki/core)

2014-02-24 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: DefaultSettings.php: Remove $wgPasswordSenderName
..

DefaultSettings.php: Remove $wgPasswordSenderName

It doesn't do anything.

Follow-up to Ibfd28cd181365c8c0b5f3e8ffe8f5de8c89844a3.

Change-Id: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
---
M includes/DefaultSettings.php
1 file changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/115206/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3526c96..b0ed35b 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1330,13 +1330,6 @@
 unset( $serverName ); # Don't leak local variables to global scope
 
 /**
- * Password reminder name
- *
- * @deprecated since 1.23; use the system message 'emailsender' instead.
- */
-$wgPasswordSenderName = 'MediaWiki Mail';
-
-/**
  * Dummy address which should be accepted during mail send action.
  * It might be necessary to adapt the address or to set it equal
  * to the $wgEmergencyContact address.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Fix fatal error when usebetatoolbar option was activated and... - change (mediawiki...ProofreadPage)

2014-02-24 Thread Tpt (Code Review)
Tpt has uploaded a new change for review.

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

Change subject: Fix fatal error when usebetatoolbar option was activated and 
not showtoolbar
..

Fix fatal error when usebetatoolbar option was activated and not showtoolbar

Users in this configuration will still have a degraded but working editing 
experience

Bug: 61220
Change-Id: Ic9d638f29dcd8fb9c56c04b08e4ed27fb5f31f43
---
M modules/page/ext.proofreadpage.page.edit.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/page/ext.proofreadpage.page.edit.js 
b/modules/page/ext.proofreadpage.page.edit.js
index 969c852..28c428e 100644
--- a/modules/page/ext.proofreadpage.page.edit.js
+++ b/modules/page/ext.proofreadpage.page.edit.js
@@ -185,7 +185,7 @@
}
} );
} );
-   } else {
+   } else if( mw.user.options.get( 'showtoolbar' ) ) {
mw.loader.using( 'mediawiki.action.edit', function() {
var $toolbar = $( '#toolbar' );
 
@@ -212,7 +212,7 @@
 * Improve the WikiEditor interface
 */
function setupWikiEditor() {
-   if( !mw.user.options.get( 'usebetatoolbar' ) ) {
+   if( !mw.user.options.get( 'showtoolbar' ) || 
!mw.user.options.get( 'usebetatoolbar' ) ) {
return;
}
mw.loader.using( 'ext.wikiEditor', function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9d638f29dcd8fb9c56c04b08e4ed27fb5f31f43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt 

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


[MediaWiki-commits] [Gerrit] logstash: Increase shard replica count - change (operations/puppet)

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

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

Change subject: logstash: Increase shard replica count
..

logstash: Increase shard replica count

Increase the shard replica count from 1 to 2 for new indices created
based on the logstash index template. This should help avoid data loss
in the case of a cluster split brain event at the cost of a 33% increase
in disk space utilization across the cluster. At current log volume and
index retention duration this should not be an issue.

This change has already been applied to the cluster and will take effect
on indices created on or after 2014-02-25.

Change-Id: I5e9fdde164eee27e43cac57ad56ad20ed04b1dae
---
M modules/logstash/files/elasticsearch-template.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/115204/1

diff --git a/modules/logstash/files/elasticsearch-template.json 
b/modules/logstash/files/elasticsearch-template.json
index 04f6896..f288f16 100644
--- a/modules/logstash/files/elasticsearch-template.json
+++ b/modules/logstash/files/elasticsearch-template.json
@@ -2,10 +2,10 @@
   "template" : "logstash-*",
   "settings" : {
 "number_of_shards" : 1,
-"number_of_replicas" : 1,
+"number_of_replicas" : 2,
 "index.cache.field.type" : "soft",
 "index.refresh_interval" : "5s",
-"index.routing.allocation.total_shards_per_node" : 2,
+"index.routing.allocation.total_shards_per_node" : 1,
 "analysis" : {
   "analyzer" : {
 "default" : {

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

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

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


[MediaWiki-commits] [Gerrit] Attempt to get around Sauce bug where Chrome gets newlines - change (mediawiki...Flow)

2014-02-24 Thread Cmcmahon (Code Review)
Cmcmahon has submitted this change and it was merged.

Change subject: Attempt to get around Sauce bug where Chrome gets newlines
..


Attempt to get around Sauce bug where Chrome gets newlines

Change-Id: Ib543bea354508b637c78f04ce05554ac2fff1f41
---
M tests/browser/features/step_definitions/flow_steps.rb
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Cmcmahon: Looks good to me, approved



diff --git a/tests/browser/features/step_definitions/flow_steps.rb 
b/tests/browser/features/step_definitions/flow_steps.rb
index 4b9f14f..145fa1c 100644
--- a/tests/browser/features/step_definitions/flow_steps.rb
+++ b/tests/browser/features/step_definitions/flow_steps.rb
@@ -37,13 +37,15 @@
 When(/^I create a (.+) in Flow new topic$/) do |flow_title|
   @automated_test_marker = " browsertest edit"
   on(FlowPage) do |page|
+topic_string = flow_title + @random_string + @automated_test_marker
 page.new_topic_title_element.when_present.click
-page.new_topic_title_element.when_present.send_keys(flow_title + 
@random_string + @automated_test_marker)
+page.new_topic_title_element.when_present.send_keys(topic_string)
   end
 end
 
 When(/^I create a (.+) into Flow body$/) do |flow_body|
-  on(FlowPage).new_topic_body_element.when_present.send_keys(flow_body + 
@random_string + @automated_test_marker)
+  body_string = flow_body + @random_string + @automated_test_marker
+  on(FlowPage).new_topic_body_element.when_present.send_keys(body_string)
 end
 
 When(/^I hover over the author link$/) do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib543bea354508b637c78f04ce05554ac2fff1f41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Attempt to get around Sauce bug where Chrome gets newlines - change (mediawiki...Flow)

2014-02-24 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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

Change subject: Attempt to get around Sauce bug where Chrome gets newlines
..

Attempt to get around Sauce bug where Chrome gets newlines

Change-Id: Ib543bea354508b637c78f04ce05554ac2fff1f41
---
M tests/browser/features/step_definitions/flow_steps.rb
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/flow_steps.rb 
b/tests/browser/features/step_definitions/flow_steps.rb
index 4b9f14f..145fa1c 100644
--- a/tests/browser/features/step_definitions/flow_steps.rb
+++ b/tests/browser/features/step_definitions/flow_steps.rb
@@ -37,13 +37,15 @@
 When(/^I create a (.+) in Flow new topic$/) do |flow_title|
   @automated_test_marker = " browsertest edit"
   on(FlowPage) do |page|
+topic_string = flow_title + @random_string + @automated_test_marker
 page.new_topic_title_element.when_present.click
-page.new_topic_title_element.when_present.send_keys(flow_title + 
@random_string + @automated_test_marker)
+page.new_topic_title_element.when_present.send_keys(topic_string)
   end
 end
 
 When(/^I create a (.+) into Flow body$/) do |flow_body|
-  on(FlowPage).new_topic_body_element.when_present.send_keys(flow_body + 
@random_string + @automated_test_marker)
+  body_string = flow_body + @random_string + @automated_test_marker
+  on(FlowPage).new_topic_body_element.when_present.send_keys(body_string)
 end
 
 When(/^I hover over the author link$/) do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib543bea354508b637c78f04ce05554ac2fff1f41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 

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


[MediaWiki-commits] [Gerrit] [TEST] [DONT MERGE] step 2 - change (mediawiki...Popups)

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

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

Change subject: [TEST] [DONT MERGE] step 2
..

[TEST] [DONT MERGE] step 2

Change-Id: I8986fa50176392b69d926d2be8b445e358414ccf
---
M resources/ext.popups.core.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 21c0087..83364b6 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -128,7 +128,7 @@
function createBox ( href, $el ) {
var bar = cache[ href ],
offsetTop = $el.offset().top + $el.height() + 7,
-   offsetLeft = $el.offset().left;
+= $el.offset().left;
 
elTime = mw.now();
elAction = 'dismissed';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8986fa50176392b69d926d2be8b445e358414ccf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] [TEST] [DONT MERGE] step 1 - change (mediawiki...Popups)

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

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

Change subject: [TEST] [DONT MERGE] step 1
..

[TEST] [DONT MERGE] step 1

Change-Id: I882b3b43b2d98a6485b2408c88fec56d86322032
---
M resources/ext.popups.core.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 76727f3..21c0087 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -114,7 +114,7 @@
}
 
 
-   return $thumbnail;
+$thumbnail;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I882b3b43b2d98a6485b2408c88fec56d86322032
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Let smileys have < or > in them - change (mediawiki...MediaWikiChat)

2014-02-24 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Let smileys have < or > in them
..


Let smileys have < or > in them

Before, < and < were being compared, now $lt; and $lt; are being
compared, so they work.

Brickimedia/brickimedia#227

Change-Id: I7ead492b093f1961bd12e722bdb8e27ac5d4676a
---
M MediaWikiChat.php
M MediaWikiChatClass.php
2 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index c90a871..37df2a2 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -17,7 +17,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'MediaWikiChat',
-   'version' => '2.6.5',
+   'version' => '2.6.6',
'author' => 'Adam Carter/UltrasonicNXT',
'url' => 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat',
'descriptionmsg' => 'chat-desc',
diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php
index 914d161..495abec 100644
--- a/MediaWikiChatClass.php
+++ b/MediaWikiChatClass.php
@@ -206,15 +206,17 @@
 
$message = trim( $message );
} else {
-   $message = htmlentities($message);
+   $message = htmlentities( $message );
 
$message = preg_replace( '#(http[s]?\:\/\/[^ \n]+)#', 
'$1', $message );
}
 
$message = str_replace( ' ', ' ', str_replace( ' ', ' 
', $message ) );
 
-   $rawSmileyData = wfMessage( 'smileys' )->plain();
-   $smileyData = explode( '*', $rawSmileyData );
+   $smileyString = wfMessage( 'smileys' )->plain();
+   $smileyString = str_replace( '<', '<', $smileyString ); // 
these make smileys with them in work,
+   $smileyString = str_replace( '>', '>', $smileyString ); // 
as otherwise '>' and '<' are compared
+   $smileyData = explode( '*', $smileyString );
 
$message = ' ' . $message . ' '; // to allow smileys at 
beginning/end of message
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ead492b093f1961bd12e722bdb8e27ac5d4676a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 
Gerrit-Reviewer: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] Let smileys have < or > in them - change (mediawiki...MediaWikiChat)

2014-02-24 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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

Change subject: Let smileys have < or > in them
..

Let smileys have < or > in them

Before, < and < were being compared, now $lt; and $lt; are being
compared, so they work.

Brickimedia/brickimedia#227

Change-Id: I7ead492b093f1961bd12e722bdb8e27ac5d4676a
---
M MediaWikiChatClass.php
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php
index 914d161..495abec 100644
--- a/MediaWikiChatClass.php
+++ b/MediaWikiChatClass.php
@@ -206,15 +206,17 @@
 
$message = trim( $message );
} else {
-   $message = htmlentities($message);
+   $message = htmlentities( $message );
 
$message = preg_replace( '#(http[s]?\:\/\/[^ \n]+)#', 
'$1', $message );
}
 
$message = str_replace( ' ', ' ', str_replace( ' ', ' 
', $message ) );
 
-   $rawSmileyData = wfMessage( 'smileys' )->plain();
-   $smileyData = explode( '*', $rawSmileyData );
+   $smileyString = wfMessage( 'smileys' )->plain();
+   $smileyString = str_replace( '<', '<', $smileyString ); // 
these make smileys with them in work,
+   $smileyString = str_replace( '>', '>', $smileyString ); // 
as otherwise '>' and '<' are compared
+   $smileyData = explode( '*', $smileyString );
 
$message = ' ' . $message . ' '; // to allow smileys at 
beginning/end of message
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ead492b093f1961bd12e722bdb8e27ac5d4676a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] CirrusSearch tests needs Elastica extension - change (integration/jenkins-job-builder-config)

2014-02-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: CirrusSearch tests needs Elastica extension
..

CirrusSearch tests needs Elastica extension

Updates job mwext-CirrusSearch-testextensions-master

Change-Id: I633620574b9683b6bb983719ff0ac8ec4b338fe1
---
M mediawiki-extensions.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 93df6b2..00e7544 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -543,6 +543,10 @@
 dependencies: 'Scribunto'
  - '{name}-{ext-name}-testextensions-{mwbranch}':
 name: mwext
+ext-name: CirrusSearch
+dependencies: 'Elastica'
+ - '{name}-{ext-name}-testextensions-{mwbranch}':
+name: mwext
 ext-name: DataTypes
 dependencies: 'DataValues'
  - '{name}-{ext-name}-testextensions-{mwbranch}':

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

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

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


[MediaWiki-commits] [Gerrit] Remove usage of wikiGetlink deprecated function - change (mediawiki...Echo)

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

Change subject: Remove usage of wikiGetlink deprecated function
..


Remove usage of wikiGetlink deprecated function

Change-Id: I59ecfdcdf834d265b9a911c37fd9a35fd2588ec7
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index 8161649..d29ca32 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -2,6 +2,9 @@
 ( function ( $, mw ) {
'use strict';
 
+   // backwards compatibility <= MW 1.21
+   var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
+
mw.echo.overlay = {
 
/**
@@ -210,7 +213,7 @@
$( '' )
.attr( 'id', 
'mw-echo-overlay-link' )
.addClass( 'mw-echo-grey-link' )
-   .attr( 'href', 
mw.util.wikiGetlink( 'Special:Notifications' ) )
+   .attr( 'href', getUrl( 
'Special:Notifications' ) )
.text( mw.msg( 
'echo-overlay-link' ) )
.click( function () {
mw.echo.logInteraction( 
'ui-archive-link-click', 'flyout' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59ecfdcdf834d265b9a911c37fd9a35fd2588ec7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove another ss_active_users check from SiteStats::isSane - change (mediawiki/core)

2014-02-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Remove another ss_active_users check from SiteStats::isSane
..

Remove another ss_active_users check from SiteStats::isSane

Also add a comment to method doc to make sure, nobody will add it again.

Follow-Up: Id8f1cb7035ae0058fb34a6c7bdf7bf9f6c740a69
Follow-Up: I268599be96106e1175fdf9750a2adc9468ebc93c
Change-Id: Ifd6da554b531720aace4497f7fbc2f58c12edc07
---
M includes/SiteStats.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/115198/1

diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index 6e2b5fa..7169b2e 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -221,6 +221,8 @@
/**
 * Is the provided row of site stats sane, or should it be regenerated?
 *
+* Checks only fields which are filled by SiteStatsInit::refresh.
+*
 * @param $row
 *
 * @return bool
@@ -229,7 +231,6 @@
if ( $row === false
|| $row->ss_total_pages < $row->ss_good_articles
|| $row->ss_total_edits < $row->ss_total_pages
-   || $row->ss_users < $row->ss_active_users
) {
return false;
}

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

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

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


[MediaWiki-commits] [Gerrit] Increases size of the Special:IndexPages input - change (mediawiki...ProofreadPage)

2014-02-24 Thread Tpt (Code Review)
Tpt has uploaded a new change for review.

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

Change subject: Increases size of the Special:IndexPages input
..

Increases size of the Special:IndexPages input

Bug: 61818
Change-Id: I5233ee2a0fea5972f8821d4ae34afaa9c2dfebda
---
M SpecialProofreadPages.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/SpecialProofreadPages.php b/SpecialProofreadPages.php
index 3d8033a..204cd3d 100644
--- a/SpecialProofreadPages.php
+++ b/SpecialProofreadPages.php
@@ -57,11 +57,11 @@
Html::openElement('fieldset', array() ) .
Html::element('legend', null, $this->msg( 
'proofreadpage_specialpage_legend' )->text() ) .
Html::openElement( 'p' ) .
-   Xml::label( $this->msg( 
'proofreadpage_specialpage_label_key' )->text(), 'key' )  . ' ' .
-   Html::input( 'key', $this->searchTerm ) .
+   Html::element( 'label', array( 'for' => 'key' 
), $this->msg( 'proofreadpage_specialpage_label_key' )->text() )  . ' ' .
+   Html::input( 'key', $this->searchTerm, 
'search', array( 'id' => 'key', 'size' => '50' ) ) .
Html::closeElement( 'p' ) .
Html::openElement( 'p' ) .
-   Xml::label( $this->msg( 
'proofreadpage_specialpage_label_orderby' )->text(), 'order' ) . ' ' . 
$orderSelect->getHtml() . ' ' .
+   Html::element( 'label', array( 'for' => 'order' 
), $this->msg( 'proofreadpage_specialpage_label_orderby' )->text() ) . ' ' . 
$orderSelect->getHtml() . ' ' .
Xml::checkLabel( $this->msg( 
'proofreadpage_specialpage_label_sortascending' )->text(), 'sortascending', 
'sortascending', $this->sortAscending ) . ' ' .
Xml::submitButton( $this->msg( 'ilsubmit' 
)->text() ) .
Html::closeElement( 'p' ) .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5233ee2a0fea5972f8821d4ae34afaa9c2dfebda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt 

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


[MediaWiki-commits] [Gerrit] Cloudbees Jenkins jobs are now created using Jenkins Job Bui... - change (mediawiki...MultimediaViewer)

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

Change subject: Cloudbees Jenkins jobs are now created using Jenkins Job Builder
..


Cloudbees Jenkins jobs are now created using Jenkins Job Builder

All Jenkins jobs will fail until this commit is merged:

https://wmf.ci.cloudbees.com/view/mv/

Bug: 61778
Change-Id: I5fb37946bbb15cb1b70045f85aa11ba48ecd2260
---
M tests/browser/Gemfile.lock
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock
index 48eface..48f5741 100644
--- a/tests/browser/Gemfile.lock
+++ b/tests/browser/Gemfile.lock
@@ -2,7 +2,7 @@
   remote: https://rubygems.org/
   specs:
 builder (3.2.2)
-childprocess (0.4.0)
+childprocess (0.5.1)
   ffi (~> 1.0, >= 1.0.11)
 cucumber (1.3.10)
   builder (>= 2.1.2)
@@ -22,7 +22,7 @@
 headless (1.0.1)
 i18n (0.6.9)
 json (1.8.1)
-mediawiki_selenium (0.2.2)
+mediawiki_selenium (0.2.7)
   cucumber (~> 1.3, >= 1.3.10)
   headless (~> 1.0, >= 1.0.1)
   json (~> 1.8, >= 1.8.1)
@@ -46,13 +46,13 @@
 rspec-expectations (2.14.5)
   diff-lcs (>= 1.1.3, < 2.0)
 rubyzip (1.1.0)
-selenium-webdriver (2.39.0)
-  childprocess (>= 0.2.5)
+selenium-webdriver (2.40.0)
+  childprocess (>= 0.5.0)
   multi_json (~> 1.0)
   rubyzip (~> 1.0)
   websocket (~> 1.0.4)
 syntax (1.2.0)
-watir-webdriver (0.6.7)
+watir-webdriver (0.6.8)
   selenium-webdriver (>= 2.18.0)
 websocket (1.0.7)
 yml_reader (0.2)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fb37946bbb15cb1b70045f85aa11ba48ecd2260
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Zfilipin 
Gerrit-Reviewer: Aarcos 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Jhall 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Wait for CSS to be truly loaded before opening the viewer - change (mediawiki...MultimediaViewer)

2014-02-24 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Wait for CSS to be truly loaded before opening the viewer
..

Wait for CSS to be truly loaded before opening the viewer

This is a workaround for core bug #61852

Change-Id: If7d830866993eddbf5784694514ff89aece56c5b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/258
---
M MultimediaViewer.php
M resources/mmv/mmv.bootstrap.js
A resources/mmv/mmv.loaded.css
M tests/qunit/mmv.bootstrap.test.js
4 files changed, 59 insertions(+), 4 deletions(-)


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

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 29abb0e..b4ea1c2 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -398,6 +398,8 @@
 
'styles' => array(
'mmv.less',
+   // Always make this one the last of the list (Bug 61852)
+   'mmv.loaded.css',
),
 
'dependencies' => array(
diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index cad5a87..0d446bf 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -41,6 +41,10 @@
this.processThumbs();
this.hash();
 
+   // Exposed for tests
+   this.readinessCSSClass = 'mw-mmv-has-been-loaded';
+   this.readinessWaitDuration = 100;
+
$( window ).on( 'popstate.mmvb', function () {
self.hash();
} );
@@ -56,7 +60,9 @@
var deferred = $.Deferred(),
bs = this;
 
-   mw.loader.using( 'mmv', function () {
+   mw.loader.using( 'mmv', function() { bs.isCSSReady( deferred ); 
} );
+
+   return $.when( deferred ).then( function () {
if ( !bs.viewerInitialized ) {
if ( bs.thumbs.length ) {
mw.mediaViewer.initWithThumbs( 
bs.thumbs );
@@ -64,11 +70,27 @@
 
bs.viewerInitialized = true;
}
-
-   deferred.resolve();
} );
+   };
 
-   return deferred.promise();
+   /**
+* Checks if the mmv CSS has been correctly added to the page
+* This is a workaround for core bug 61852
+* @param {jQuery.promise} deferred
+*/
+   MMVB.isCSSReady = function ( deferred ) {
+   var $dummy = $( '' )
+   .appendTo( $( document.body ) ),
+   bs = this;
+
+   if ( $dummy.css( 'display' ) === 'inline' ) {
+   // Let's be clean and remove the test item before 
resolving the deferred
+   $dummy.remove();
+   deferred.resolve();
+   } else {
+   $dummy.remove();
+   setTimeout( function () { bs.isCSSReady( deferred ); }, 
this.readinessWaitDuration );
+   }
};
 
/**
diff --git a/resources/mmv/mmv.loaded.css b/resources/mmv/mmv.loaded.css
new file mode 100644
index 000..77c1e09
--- /dev/null
+++ b/resources/mmv/mmv.loaded.css
@@ -0,0 +1,3 @@
+.mw-mmv-has-been-loaded {
+   display: inline;
+}
\ No newline at end of file
diff --git a/tests/qunit/mmv.bootstrap.test.js 
b/tests/qunit/mmv.bootstrap.test.js
index a2511f7..d795152 100644
--- a/tests/qunit/mmv.bootstrap.test.js
+++ b/tests/qunit/mmv.bootstrap.test.js
@@ -196,4 +196,32 @@
 
window.location.hash = '';
} );
+
+   QUnit.test( 'isCSSReady', 3, function ( assert ) {
+   var bootstrap = new mw.mmv.MultimediaViewerBootstrap(),
+   deferred = $.Deferred(),
+   CSSclass = 'foo-' + $.now(),
+   $style = $( '' )
+   .text( '.' + CSSclass + ' { display: inline; }' 
);
+
+   bootstrap.readinessCSSClass = CSSclass;
+   // This speeds up the test execution
+   // It's not zero because if the test fails, the browser would 
get hammered indefinitely
+   bootstrap.readinessWaitDuration = 30;
+
+   bootstrap.isCSSReady( deferred );
+
+   assert.strictEqual( deferred.state(), 'pending', 'The style 
isn\'t on the page yet' );
+
+   QUnit.stop();
+
+   deferred.then( function() {
+   QUnit.start();
+   assert.ok( true, 'The style is on the page' );
+   assert.strictEqual( $( '.' + CSSclass ).length, 0, 
'There are no leftover test elements' );
+   $style.remove();
+   } );
+
+ 

[MediaWiki-commits] [Gerrit] Setup jenkins configuration - change (mediawiki...CirrusSearch)

2014-02-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Setup jenkins configuration
..

Setup jenkins configuration

Change-Id: I8ab4ae49fba1e71aa13c151559347e065f47a2c7
---
M CirrusSearch.php
A tests/jenkins/Jenkins.php
A tests/jenkins/cleanSetup.php
3 files changed, 140 insertions(+), 0 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index e39d162..755c773 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -254,6 +254,7 @@
 $wgAutoloadClasses['CirrusSearch\Connection'] = $includes . 'Connection.php';
 $wgAutoloadClasses['CirrusSearch\DeletePagesJob'] = $includes . 
'DeletePagesJob.php';
 $wgAutoloadClasses['CirrusSearch\ElasticsearchIntermediary'] = $includes . 
'ElasticsearchIntermediary.php';
+$wgAutoloadClasses['CirrusSearch\ForceSearchIndex'] = __DIR__ . 
'/maintenance/forceSearchIndex.php';
 $wgAutoloadClasses['CirrusSearch\Hooks'] = $includes . 'Hooks.php';
 $wgAutoloadClasses['CirrusSearch\LinksUpdateJob'] = $includes . 
'LinksUpdateJob.php';
 $wgAutoloadClasses['CirrusSearch\LinksUpdateSecondaryJob'] = $includes . 
'LinksUpdateSecondaryJob.php';
@@ -305,3 +306,10 @@
 $wgJobClasses[ 'cirrusSearchLinksUpdateSecondary' ] = 
'CirrusSearch\LinksUpdateSecondaryJob';
 $wgJobClasses[ 'cirrusSearchMassIndex' ] = 'CirrusSearch\MassIndexJob';
 $wgJobClasses[ 'cirrusSearchOtherIndex' ] = 'CirrusSearch\OtherIndexJob';
+
+/**
+ * Jenkins configuration required to get all the browser tests passing cleanly.
+ */
+if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI === true ) {
+   require( __DIR__ . '/tests/jenkins/Jenkins.php' );
+}
diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php
new file mode 100644
index 000..96b432e
--- /dev/null
+++ b/tests/jenkins/Jenkins.php
@@ -0,0 +1,82 @@
+http://www.gnu.org/copyleft/gpl.html
+ */
+
+// All of this has to be done at setup time so it has the right globals.  No 
putting
+// it in a class or anything.
+
+// Configuration we have to override before installing Cirrus but only if 
we're using
+// Jenkins as a prototype for development.
+if ( !isset( $wgRedisPassword ) ) {
+   $wgRedisPassword = 'notsecure';
+}
+
+// Extra Cirrus stuff for Jenkins
+$wgAutoloadClasses[ 'CirrusSearch\Jenkins\CleanSetup' ] = __DIR__ . 
'/cleanSetup.php';
+$wgHooks[ 'LoadExtensionSchemaUpdates' ][] = 
'CirrusSearch\Jenkins\Jenkins::installCleanSetup';
+
+// Dependencies
+require( "$IP/extensions/Elastica/Elastica.php" );
+require( "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php" );
+require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" );
+require( "$IP/extensions/PdfHandler/PdfHandler.php" );
+
+// Configuration
+$wgSearchType = 'CirrusSearch';
+$wgOggThumbLocation = '/usr/bin/oggThumb';
+$wgGroupPermissions[ '*' ][ 'deleterevision' ] = true;
+$wgFileExtensions[] = 'pdf';
+$wgCapitalLinks = false;
+$wgUseInstantCommons = true;
+$wgEnableUploads = true;
+$wgJobTypeConf['default'] = array(
+   'class' => 'JobQueueRedis',
+   'order' => 'fifo',
+   'redisServer' => 'localhost',
+   'checkDelay' => true, # The magic bit.
+   'redisConfig' => array(
+   'password' => $wgRedisPassword,
+   ),
+);
+$wgJobQueueAggregator = array(
+   'class'   => 'JobQueueAggregatorRedis',
+   'redisServer' => 'localhost',
+   'redisConfig' => array(
+   'password' => $wgRedisPassword,
+   ),
+);
+
+// Extra helpful configuration but not really required
+$wgShowExceptionDetails = true;
+$wgCirrusSearchShowScore = true;
+
+class Jenkins {
+   /**
+* Installs a maintenance script the provides a clean Elasticsearch 
index for testing.
+* @param DatabaseUpdater $updater database updater
+* @return bool true so we let other extensions install more 
maintenance actions
+*/
+   public static function installCleanSetup( $updater ) {
+   print('foo');
+   $updater->addPostDatabaseUpdateMaintenance( 
'CirrusSearch\Jenkins\CleanSetup');
+   return true;
+   }
+}
diff --git a/tests/jenkins/cleanSetup.php b/tests/jenkins/cleanSetup.php
new file mode 100644
index 000..86b2cb0
--- /dev/null
+++ b/tests/jenkins/cleanSetup.php
@@ -0,0 +1,50 @@
+http://www.gnu.org/copyleft/gpl.html
+ */
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+if( $IP === false ) {
+   $IP = __DIR__ . '/../../../..';
+}
+require_once( "$IP/maintenance/Maintenance.php" );
+
+class CleanSetup extends Maintenance {
+   public function execute() {
+   $child = $this->runChild( 
'CirrusSearch\UpdateSearchIndexConfig' );
+   $child->mOptions[ 'startOver' ] = true;
+   $child->execute();
+   $child = $this->runChild( 'CirrusSearch\ForceSearchIndex' );
+   $child->mOptio

[MediaWiki-commits] [Gerrit] Add createInstance maintenance script for use during migration - change (mediawiki...OpenStackManager)

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

Change subject: Add createInstance maintenance script for use during migration
..


Add createInstance maintenance script for use during migration

Change-Id: I18806cfdacc98af2a0aaeb9246e386823a10e9f6
---
A maintenance/createInstance.php
1 file changed, 116 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/createInstance.php b/maintenance/createInstance.php
new file mode 100644
index 000..f7900a4
--- /dev/null
+++ b/maintenance/createInstance.php
@@ -0,0 +1,116 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ * @author Andrew Bogott
+ */
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+
+if ( $IP === false ) {
+   $IP = __DIR__ . '/../../..';
+
+}
+require_once( "$IP/maintenance/Maintenance.php" );
+
+/**
+ * Maintenance script that triggers an Echo notification for instance action 
completion.
+ *
+ * @ingroup Maintenance
+ */
+class CreateInstance extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->addOption( 'instance', 'The instance name, e.g. 
testhost', true, true );
+   $this->addOption( 'project', 'The instance project, e.g. 
testlabs', true, true );
+   $this->addOption( 'region', 'The instance region, e.g. pmtpa', 
true, true );
+   $this->addOption( 'image', 'The image ID to use when creating', 
true, true );
+   $this->addOption( 'flavor', 'The flavor of the new instance, 
e.g. m1.small', true, true );
+   $this->addOption( 'securitygroups', 'Comma-separated list of 
security groups for new instance', false, true );
+   $this->addOption( 'puppetclasses', 'Comma-separated list of 
security groups for new instance', false, true );
+   }
+
+   public function execute() {
+   global $wgAuth;
+   global $wgOpenStackManagerLDAPUsername;
+   global $wgOpenStackManagerLDAPUserPassword;
+
+
+   if ( $this->hasOption( 'securitygroups' ) ) {
+   $secGroups = explode(',', $this->getOption( 
'securitygroups' ) );
+   } else {
+   $secGroups = array();
+   }
+   if ( $this->hasOption( 'puppetclasses' ) ) {
+   $pupClasses = explode(',', $this->getOption( 
'puppetclasses' ) );
+   } else {
+   $pupClasses = array();
+   }
+   $region = $this->getOption( 'region' );
+   $flavor = $this->getOption( 'flavor' );
+   $image = $this->getOption( 'image' );
+   $instance = $this->getOption( 'instance' );
+   $project = $this->getOption( 'project' );
+
+   $this->user = new OpenStackNovaUser( 
$wgOpenStackManagerLDAPUsername );
+   $this->userNova = OpenStackNovaController::newFromUser( 
$this->user );
+   $this->userNova->setProject( 'testlabs' );
+   $this->userNova->authenticate( $wgOpenStackManagerLDAPUsername, 
$wgOpenStackManagerLDAPUserPassword );
+
+   $this->userNova->setRegion( $region );
+
+   $domain = OpenStackNovaDomain::getDomainByName( $region );
+   if ( !$domain ) {
+   print "invalid domain\n";
+   return true;
+   }
+   $instance = $this->userNova->createInstance( $instance, $image, 
'', $flavor, $secGroups );
+   if ( $instance ) {
+   // In essex it seems attributes from extensions aren't 
returned. So,
+   // for now we need to work around this by fetching the 
instance again.
+   $instanceId = $instance->getInstanceOSId();
+   $instance = $this->userNova->getInstance( $instanceId );
+   }
+   if ( $instance ) {
+   $host = OpenStackNovaHost::addHostFromInstance( 
$instance, $domain, $pupClasses );
+
+   if ( $host ) {
+   $instance->setHost( $host );
+   $title = Title::newFromText("createInstance 
script");
+   $job = new OpenStackNovaHostJob( $title, array( 
'instanceid' => $instance->getInstanceId(), 'instanceosid' => 
$instance->getInstanceOSId(), 'project' => $project, 'region' => $region ) );
+   $job->insert();
+   $image = $this->userNova->getImage( 
$instance->getImageId() );
+   $imageName = $image->getImageName();
+   print "created instance.\n";
+   } else {
+   $instance->deleteInstance( $this->userNo

[MediaWiki-commits] [Gerrit] Vector: Delete edit-icon.png - change (mediawiki/core)

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

Change subject: Vector: Delete edit-icon.png
..


Vector: Delete edit-icon.png

It's unused. It was added with the commit that added Vector itself
(r51086) and survived being recompressed four times since then.

Change-Id: Ia4124c2853ed98f3d0afacd3489f8b1cab0c4c16
---
D skins/vector/images/edit-icon.png
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/skins/vector/images/edit-icon.png 
b/skins/vector/images/edit-icon.png
deleted file mode 100644
index 43e4691..000
--- a/skins/vector/images/edit-icon.png
+++ /dev/null
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4124c2853ed98f3d0afacd3489f8b1cab0c4c16
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove the toolbar controller's own event system - change (mediawiki...Wikibase)

2014-02-24 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged.

Change subject: Remove the toolbar controller's own event system
..


Remove the toolbar controller's own event system

The toolbar controller has an own event system which is complex, extremely slow
and not used. For me, this change reduces loading time of the Italy item from
~170s to ~18s.

Also, there were several bugs in this implementation. Event handlers were called
multiple times and the filtering on selector did not work at all.

Bug: 61850
Change-Id: Idb6432e6857069058d4e6fe519ebbc31c883acf2
(cherry picked from commit 5a7d4489ff30da010fd7a24fa7d7d042475cea47)
---
M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
1 file changed, 9 insertions(+), 156 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 
b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
index 96643eb..514a9e9 100644
--- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
+++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
@@ -56,11 +56,6 @@
},
 
/**
-* @type {Object}
-*/
-   _registeredEventHandlers: {},
-
-   /**
 * @see jQuery.Widget._create
 *
 * @throws {Error} in case a given toolbar ID is not registered 
for the toolbar type given.
@@ -94,151 +89,27 @@
 * for a toolbar type with a specific id: For 
one toolbar, no additional
 * handler should be registered with exactly 
the same eventNames string.
 * @param {Function} callback
-* @param {boolean} [replace] If true, the event handler 
currently registered for the
-*  specified argument combination will be 
replaced.
 *
 * @throws {Error} if the callback provided in an event 
definition is not a function.
 */
-   registerEventHandler: function( toolbarType, toolbarId, 
eventNames, callback, replace ) {
+   registerEventHandler: function( toolbarType, toolbarId, 
eventNames, callback ) {
if( !$.isFunction( callback ) ) {
throw new Error( 'No callback or known default 
action given for event "'
+ eventNames + '"' );
}
 
-   if( !this._registeredEventHandlers[toolbarType] ) {
-   this._registeredEventHandlers[toolbarType] = {};
-   }
-
-   if( 
!this._registeredEventHandlers[toolbarType][toolbarId] ) {
-   
this._registeredEventHandlers[toolbarType][toolbarId] = {};
-   }
-
-   if( !replace && 
this._registeredEventHandlers[toolbarType][toolbarId][eventNames] ) {
-   return;
-   }
-
var self = this;
+   var def = $.wikibase.toolbarcontroller.definition( 
toolbarType, toolbarId );
 
-   // The namespace needs to be very specific since 
instances of the the same
-   // toolbar may listen to the same event(s) on the same 
node:
-   var eventNamespaces = [this.widgetName, this.widgetName 
+ toolbarType + toolbarId],
-   namespacedEventNames = assignNamespaces( 
eventNames, eventNamespaces );
+   this.element.on( eventNames, def.selector, function( 
event ) {
+   event.data = event.data || {};
+   event.data.toolbar = {
+   id: toolbarId,
+   type: toolbarType
+   };
 
-   this.element
-   // Prevent attaching event handlers twice:
-   .off( namespacedEventNames )
-   .on( namespacedEventNames, function( event ) {
-   var callbacks = self._findCallbacks( event );
-
-   if( callbacks ) {
-   event.data = event.data || {};
-
-   event.data.toolbar = {
-   id: toolbarId,
-   type: toolbarType
-   };
-
-   for( var i = 0; i < callbacks.length; 
i++ ) {
-   callbacks[i]( event, self );
-   }
-   

[MediaWiki-commits] [Gerrit] Remove the toolbar controller's own event system - change (mediawiki...Wikibase)

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

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

Change subject: Remove the toolbar controller's own event system
..

Remove the toolbar controller's own event system

The toolbar controller has an own event system which is complex, extremely slow
and not used. For me, this change reduces loading time of the Italy item from
~170s to ~18s.

Also, there were several bugs in this implementation. Event handlers were called
multiple times and the filtering on selector did not work at all.

Bug: 61850
Change-Id: Idb6432e6857069058d4e6fe519ebbc31c883acf2
(cherry picked from commit 5a7d4489ff30da010fd7a24fa7d7d042475cea47)
---
M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
1 file changed, 9 insertions(+), 156 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 
b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
index 96643eb..514a9e9 100644
--- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
+++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
@@ -56,11 +56,6 @@
},
 
/**
-* @type {Object}
-*/
-   _registeredEventHandlers: {},
-
-   /**
 * @see jQuery.Widget._create
 *
 * @throws {Error} in case a given toolbar ID is not registered 
for the toolbar type given.
@@ -94,151 +89,27 @@
 * for a toolbar type with a specific id: For 
one toolbar, no additional
 * handler should be registered with exactly 
the same eventNames string.
 * @param {Function} callback
-* @param {boolean} [replace] If true, the event handler 
currently registered for the
-*  specified argument combination will be 
replaced.
 *
 * @throws {Error} if the callback provided in an event 
definition is not a function.
 */
-   registerEventHandler: function( toolbarType, toolbarId, 
eventNames, callback, replace ) {
+   registerEventHandler: function( toolbarType, toolbarId, 
eventNames, callback ) {
if( !$.isFunction( callback ) ) {
throw new Error( 'No callback or known default 
action given for event "'
+ eventNames + '"' );
}
 
-   if( !this._registeredEventHandlers[toolbarType] ) {
-   this._registeredEventHandlers[toolbarType] = {};
-   }
-
-   if( 
!this._registeredEventHandlers[toolbarType][toolbarId] ) {
-   
this._registeredEventHandlers[toolbarType][toolbarId] = {};
-   }
-
-   if( !replace && 
this._registeredEventHandlers[toolbarType][toolbarId][eventNames] ) {
-   return;
-   }
-
var self = this;
+   var def = $.wikibase.toolbarcontroller.definition( 
toolbarType, toolbarId );
 
-   // The namespace needs to be very specific since 
instances of the the same
-   // toolbar may listen to the same event(s) on the same 
node:
-   var eventNamespaces = [this.widgetName, this.widgetName 
+ toolbarType + toolbarId],
-   namespacedEventNames = assignNamespaces( 
eventNames, eventNamespaces );
+   this.element.on( eventNames, def.selector, function( 
event ) {
+   event.data = event.data || {};
+   event.data.toolbar = {
+   id: toolbarId,
+   type: toolbarType
+   };
 
-   this.element
-   // Prevent attaching event handlers twice:
-   .off( namespacedEventNames )
-   .on( namespacedEventNames, function( event ) {
-   var callbacks = self._findCallbacks( event );
-
-   if( callbacks ) {
-   event.data = event.data || {};
-
-   event.data.toolbar = {
-   id: toolbarId,
-   type: toolbarType
-   };
-
-   for( var i = 0; i < callbacks.length; 
i++ ) {
-   callbacks[i]( event, self );
-

[MediaWiki-commits] [Gerrit] Cloudbees Jenkins jobs are now created using Jenkins Job Bui... - change (mediawiki/selenium)

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

Change subject: Cloudbees Jenkins jobs are now created using Jenkins Job Builder
..


Cloudbees Jenkins jobs are now created using Jenkins Job Builder

Bug: 61778
Change-Id: I4dcb15133297f7d39fbe9a07a679679d78f2
---
D docs/UploadWizard.md
D docs/job.md
D docs/jobs.md
D docs/template.md
R jenkins/jenkins.md
R jenkins/mail.template
R jenkins/view.md
7 files changed, 5 insertions(+), 688 deletions(-)

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



diff --git a/docs/UploadWizard.md b/docs/UploadWizard.md
deleted file mode 100644
index 6f578a2..000
--- a/docs/UploadWizard.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# UploadWizard-commons.wikimedia.org
-
-- Jenkins > New Job
-  - Job name: UploadWizard-commons.wikimedia.org
-  - Build a free-style software project
-  - OK
-- Jenkins > Job > Configure
-  - Source Code Management > Git > Repositories > Repository URL: 
https://gerrit.wikimedia.org/r/mediawiki/extensions/UploadWizard
-  - Build Triggers > Build periodically > Schedule: H */6 * * * (every 6 hours)
-  - Build > Add build step > Execute shell
-
---
-
-set -e
-export 
MEDIAWIKI_PASSWORD_VARIABLE=MEDIAWIKI_PASSWORD_SELENIUM_USER_WIKIPEDIA_ORG
-virtualenv --distribute DEV
-DEV/bin/pip install -rtests/api/requirements.txt
-DEV/bin/python tests/api/upload-wizard_tests.py --username "Selenium_user" 
--api_url "https://commons.wikimedia.org/w/api.php";
-DEV/bin/python tests/api/upload-wizard_tests.py --gen_new_image --username 
"Selenium_user" --api_url "https://commons.wikimedia.org/w/api.php";
-
---
-
-  - Add post-build action
-- E-mail Notification > Recipients > aarcos.w...@gmail.com 
cmcma...@wikimedia.org gti...@wikimedia.org zfili...@wikimedia.org
-- IRC Notification (notifies #wikimedia-qa by default)
-
-
-
-# UploadWizard-commons.wikimedia.beta.wmflabs.org
-
-- Jenkins > New Job
-  - Job name: UploadWizard-commons.wikimedia.beta.wmflabs.org
-  - Build a free-style software project
-  - OK
-- Jenkins > Job > Configure
-  - Source Code Management > Git > Repositories > Repository URL: 
https://gerrit.wikimedia.org/r/mediawiki/extensions/UploadWizard
-  - Build Triggers > Build periodically > Schedule: H */6 * * * (every 6 hours)
-  - Build Triggers > Poll SCM > Schedule > * * * * * (every minute)
-  - Build > Add build step > Execute shell
-
---
-
-set -e
-export 
MEDIAWIKI_PASSWORD_VARIABLE=MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG
-virtualenv --distribute DEV
-DEV/bin/pip install -rtests/api/requirements.txt
-DEV/bin/python tests/api/upload-wizard_tests.py --username "Selenium_user" 
--api_url "http://commons.wikimedia.beta.wmflabs.org/w/api.php";
-DEV/bin/python tests/api/upload-wizard_tests.py --gen_new_image --username 
"Selenium_user" --api_url "http://commons.wikimedia.beta.wmflabs.org/w/api.php";
-
---
-
-  - Add post-build action
-- E-mail Notification > Recipients > aarcos.w...@gmail.com 
cmcma...@wikimedia.org gti...@wikimedia.org zfili...@wikimedia.org
-- IRC Notification (notifies #wikimedia-qa by default)
diff --git a/docs/job.md b/docs/job.md
deleted file mode 100644
index 8c7d63a..000
--- a/docs/job.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Job
-
-- Jenkins > New Job
-  - Job name: (name)
-  - Build a free-style software project
-  - OK
-- Jenkins > Job > Configure
-  - Project name: (name)
-  - Source Code Management > Git > Repositories > Repository URL: (repository)
-  - Build > Add build step > Execute shell
-
---
-
-export MEDIAWIKI_USER=${MEDIAWIKI_USER}
-export MEDIAWIKI_PASSWORD_VARIABLE=${MEDIAWIKI_PASSWORD_VARIABLE}
-
-export BROWSER=${browser}
-export MEDIAWIKI_URL=http://${MEDIAWIKI_URL}/wiki/
-
-curl -s -o use-ruby 
https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
-RUBY_VERSION=2.1.0 \
-  source ./use-ruby
-
-gem install bundler --no-ri --no-rdoc
-if [ -d "${FOLDER}" ]; then cd ${FOLDER}; fi
-bundle install
-bundle exec ${BUNDLE_EXEC}
-
---
-
-  - Post-build Actions > Add post-build action
-- Publish JUnit test result report > Test report XMLs: reports/junit/*.xml
-- E-mail Notification > Recipients: (recipients)
-- IRC Notification
diff --git a/docs/jobs.md b/docs/jobs.md
deleted file mode 100644
index 430d7aa..000
--- a/docs/jobs.md
+++ /dev/null
@@ -1,287 +0,0 @@
-# all jobs
-- Browser Label:
-- bundle exec cucumber:
-- Recipients:
-- MediaWiki URL:
-- Folder: tests/browser/ (if not stated differently)
-- Repository URL:
-- MediaWiki user:
-- MediaWiki password variable:
-- Build schedule: 0 3,18 * * * (if not stated differently)
-
-
-
-# browsertests
-- Recipients: cmcma...@wikimedia.org zfili...@wikimedia.org
-- Repository URL: browsertests
-- MediaWiki user: Selenium_user
-
-
-# browsertests-e

[MediaWiki-commits] [Gerrit] Remove the toolbar controller's own event system - change (mediawiki...Wikibase)

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

Change subject: Remove the toolbar controller's own event system
..


Remove the toolbar controller's own event system

The toolbar controller has an own event system which is complex, extremely slow
and not used. For me, this change reduces loading time of the Italy item from
~170s to ~18s.

Also, there were several bugs in this implementation. Event handlers were called
multiple times and the filtering on selector did not work at all.

Bug: 61850
Change-Id: Idb6432e6857069058d4e6fe519ebbc31c883acf2
---
M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
1 file changed, 9 insertions(+), 156 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 
b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
index 96643eb..514a9e9 100644
--- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
+++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
@@ -56,11 +56,6 @@
},
 
/**
-* @type {Object}
-*/
-   _registeredEventHandlers: {},
-
-   /**
 * @see jQuery.Widget._create
 *
 * @throws {Error} in case a given toolbar ID is not registered 
for the toolbar type given.
@@ -94,151 +89,27 @@
 * for a toolbar type with a specific id: For 
one toolbar, no additional
 * handler should be registered with exactly 
the same eventNames string.
 * @param {Function} callback
-* @param {boolean} [replace] If true, the event handler 
currently registered for the
-*  specified argument combination will be 
replaced.
 *
 * @throws {Error} if the callback provided in an event 
definition is not a function.
 */
-   registerEventHandler: function( toolbarType, toolbarId, 
eventNames, callback, replace ) {
+   registerEventHandler: function( toolbarType, toolbarId, 
eventNames, callback ) {
if( !$.isFunction( callback ) ) {
throw new Error( 'No callback or known default 
action given for event "'
+ eventNames + '"' );
}
 
-   if( !this._registeredEventHandlers[toolbarType] ) {
-   this._registeredEventHandlers[toolbarType] = {};
-   }
-
-   if( 
!this._registeredEventHandlers[toolbarType][toolbarId] ) {
-   
this._registeredEventHandlers[toolbarType][toolbarId] = {};
-   }
-
-   if( !replace && 
this._registeredEventHandlers[toolbarType][toolbarId][eventNames] ) {
-   return;
-   }
-
var self = this;
+   var def = $.wikibase.toolbarcontroller.definition( 
toolbarType, toolbarId );
 
-   // The namespace needs to be very specific since 
instances of the the same
-   // toolbar may listen to the same event(s) on the same 
node:
-   var eventNamespaces = [this.widgetName, this.widgetName 
+ toolbarType + toolbarId],
-   namespacedEventNames = assignNamespaces( 
eventNames, eventNamespaces );
+   this.element.on( eventNames, def.selector, function( 
event ) {
+   event.data = event.data || {};
+   event.data.toolbar = {
+   id: toolbarId,
+   type: toolbarType
+   };
 
-   this.element
-   // Prevent attaching event handlers twice:
-   .off( namespacedEventNames )
-   .on( namespacedEventNames, function( event ) {
-   var callbacks = self._findCallbacks( event );
-
-   if( callbacks ) {
-   event.data = event.data || {};
-
-   event.data.toolbar = {
-   id: toolbarId,
-   type: toolbarType
-   };
-
-   for( var i = 0; i < callbacks.length; 
i++ ) {
-   callbacks[i]( event, self );
-   }
-   }
+   ca

[MediaWiki-commits] [Gerrit] Browsertests: fix several broken tests in old-style browsertest - change (mediawiki...Wikibase)

2014-02-24 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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

Change subject: Browsertests: fix several broken tests in old-style browsertest
..

Browsertests: fix several broken tests in old-style browsertest

Change-Id: Ib3c27df4d2e7bf7fcd381e89864097e9279859f0
---
M repo/tests/selenium/statements/qualifiers_spec.rb
M repo/tests/selenium/statements/references_spec.rb
M repo/tests/selenium/statements/statements_cm_spec.rb
M repo/tests/selenium/statements/statements_coordinate_spec.rb
M repo/tests/selenium/statements/statements_spec.rb
M repo/tests/selenium/statements/statements_string_spec.rb
M selenium/Gemfile.lock
M selenium/lib/modules/statement_module.rb
8 files changed, 60 insertions(+), 31 deletions(-)


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

diff --git a/repo/tests/selenium/statements/qualifiers_spec.rb 
b/repo/tests/selenium/statements/qualifiers_spec.rb
index c36aeac..f9e04d1 100644
--- a/repo/tests/selenium/statements/qualifiers_spec.rb
+++ b/repo/tests/selenium/statements/qualifiers_spec.rb
@@ -38,7 +38,9 @@
 
 cm_statement_value = "Vespa_crabro_head_01.jpg"
 cm_qualifier_value = "Blason_CH_Canton_Valais_3D.svg"
+cm_qualifier_value_expected = "Blason CH Canton Valais 3D.svg"
 cm_qualifier_value_changed = "BlueFeather.jpg"
+cm_qualifier_value_changed_expected = "BlueFeather.jpg"
 
 describe "Check qualifiers UI" do
   before :all do
@@ -179,6 +181,7 @@
 page.entitySelectorInput2?.should be_false
 page.qualifierValueInput1?.should be_true
 page.qualifierValueInput1.should == cm_qualifier_value
+ajax_wait
 page.saveStatement?.should be_true
 page.cancelStatement?.should be_true
 
@@ -311,7 +314,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value
+page.qualifierValue2.should == cm_qualifier_value_expected
 page.qualifierValueLink2?.should be_true
 @browser.refresh
 page.wait_for_entity_to_load
@@ -325,7 +328,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value
+page.qualifierValue2.should == cm_qualifier_value_expected
 page.qualifierValueLink2?.should be_true
 
 page.editFirstStatement?.should be_true
@@ -352,7 +355,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value_changed
+page.qualifierValue2.should == cm_qualifier_value_changed_expected
 page.qualifierValueLink2?.should be_true
 @browser.refresh
 page.wait_for_entity_to_load
@@ -366,7 +369,7 @@
 page.qualifierProperty2.should == properties_cm[1]["label"]
 page.qualifierPropertyLink2?.should be_true
 page.qualifierValue2?.should be_true
-page.qualifierValue2.should == cm_qualifier_value_changed
+page.qualifierValue2.should == cm_qualifier_value_changed_expected
 page.qualifierValueLink2?.should be_true
   end
 end
diff --git a/repo/tests/selenium/statements/references_spec.rb 
b/repo/tests/selenium/statements/references_spec.rb
index c1d19dc..6473933 100644
--- a/repo/tests/selenium/statements/references_spec.rb
+++ b/repo/tests/selenium/statements/references_spec.rb
@@ -38,9 +38,13 @@
 
 cm_statement_value = "Louisiana 462.svg"
 cm_reference_value = "Lousiana Red Kammgarn.jpg"
+cm_reference_value_expected = "Lousiana Red Kammgarn.jpg"
 cm_reference_value2 = "Nyan.jpg"
+cm_reference_value2_expected = "Nyan.jpg"
 cm_reference_value_changed = "Denkmal.png"
+cm_reference_value_changed_expected = "Denkmal.png"
 cm_reference_value_changed2 = "Dynamite-5.svg"
+cm_reference_value_changed2_expected = "Dynamite-5.svg"
 
 describe "Check references UI" do
   before :all do
@@ -117,6 +121,7 @@
 page.removeReferenceLine1?.should be_false
 random_ref_value = generate_random_string(10)
 page.referenceValueInput = random_ref_value
+ajax_wait
 page.saveReference?.should be_true
 page.cancelReference?.should be_true
 page.addReferenceLine?.should be_true
@@ -147,6 +152,7 @@
 page.wait_for_reference_value_box
 page.referenceValueInput_element.clear
 page.referenceValueInput = generate_random_string(10)
+ajax_wait
 page.saveReference?.should be_true
 page.addReferenceLine?.should be_true
 page.cancelReference?.should be_true
@@ -181,19 +187,20 @@
 page.wait_for_e

[MediaWiki-commits] [Gerrit] Add 'newonly' option to Special:Contributions and related i1... - change (mediawiki/core)

2014-02-24 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Add 'newonly' option to Special:Contributions and related i18n 
message
..

Add 'newonly' option to Special:Contributions and related i18n message

Bug: 42026
Change-Id: I07d597ef378d897690097804bf7c774fdadb654c
---
M includes/specials/SpecialContributions.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
4 files changed, 32 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/115189/1

diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index c594807..f601199 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -74,6 +74,7 @@
$this->opts['limit'] = $request->getInt( 'limit', 
$user->getOption( 'rclimit' ) );
$this->opts['target'] = $target;
$this->opts['topOnly'] = $request->getBool( 'topOnly' );
+   $this->opts['newOnly'] = $request->getBool( 'newOnly' );
 
$nt = Title::makeTitleSafe( NS_USER, $target );
if ( !$nt ) {
@@ -140,6 +141,9 @@
if ( $this->opts['topOnly'] ) {
$feedParams['toponly'] = true;
}
+   if ( $this->opts['newOnly'] ) {
+   $feedParams['newonly'] = true;
+   }
if ( $this->opts['deletedOnly'] ) {
$feedParams['deletedonly'] = true;
}
@@ -185,6 +189,7 @@
'month' => $this->opts['month'],
'deletedOnly' => $this->opts['deletedOnly'],
'topOnly' => $this->opts['topOnly'],
+   'newOnly' => $this->opts['newOnly'],
'nsInvert' => $this->opts['nsInvert'],
'associated' => $this->opts['associated'],
) );
@@ -404,6 +409,10 @@
$this->opts['topOnly'] = false;
}
 
+   if ( !isset( $this->opts['newOnly'] ) ) {
+   $this->opts['newOnly'] = false;
+   }
+
$form = Html::openElement(
'form',
array(
@@ -423,6 +432,7 @@
'year',
'month',
'topOnly',
+   'newOnly',
'associated'
);
 
@@ -555,10 +565,21 @@
array( 'class' => 'mw-input' )
)
);
+   $checkLabelNewOnly = Html::rawElement(
+   'span',
+   array( 'style' => 'white-space: nowrap' ),
+   Xml::checkLabel(
+   $this->msg( 'sp-contributions-newonly' 
)->text(),
+   'newOnly',
+   'mw-show-new-only',
+   $this->opts['newOnly'],
+   array( 'class' => 'mw-input' )
+   )
+   );
$extraOptions = Html::rawElement(
'td',
-   array( 'colspan' => 2 ),
-   $deletedOnlyCheck . $checkLabelTopOnly
+   array( 'colspan' => 3 ),
+   $deletedOnlyCheck . $checkLabelTopOnly . 
$checkLabelNewOnly
);
 
$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 
2 ),
@@ -640,8 +661,9 @@
$this->nsInvert = isset( $options['nsInvert'] ) ? 
$options['nsInvert'] : false;
$this->associated = isset( $options['associated'] ) ? 
$options['associated'] : false;
 
-   $this->deletedOnly = !empty( $options['deletedOnly'] );
$this->topOnly = !empty( $options['topOnly'] );
+   $this->newOnly = !empty( $options['newOnly'] );
+   $this->deletedOnly = !empty( $options['deletedOnly'] );
 
$year = isset( $options['year'] ) ? $options['year'] : false;
$month = isset( $options['month'] ) ? $options['month'] : false;
@@ -821,6 +843,10 @@
$condition[] = 'rev_id = page_latest';
}
 
+   if ( $this->newOnly ) {
+   $condition[] = 'rev_parent_id = 0';
+   }
+
return array( $tables, $index, $condition, $join_conds );
}
 
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 3fffec2..9716619 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/Message

[MediaWiki-commits] [Gerrit] [WIP] Flip the arrow position if the popup is flipped - change (mediawiki...Popups)

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

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

Change subject: [WIP] Flip the arrow position if the popup is flipped
..

[WIP] Flip the arrow position if the popup is flipped

- Only text popups
- Portrait popups
- Landscape popups

Change-Id: Ib30bb7f5ff9857f6a470b07db05ab50fb0ca8a5d
---
M resources/ext.popups.core.js
M resources/ext.popups.core.less
2 files changed, 70 insertions(+), 7 deletions(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 2d82c52..c9ec344 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -110,10 +110,30 @@
var $thumbnail;
 
if ( tall ) {
-   // This is to mask and center the image within 
a given size
-   $thumbnail = $( '' )
-   .addClass( 'mwe-popups-is-tall' )
-   .css( 'background-image', 'url(' + 
thumbnail.source + ')');
+   if ( supportsSVG() ) {
+   $thumbnail = $( '' )
+   .addClass( 
'mwe-popups-is-not-tall' )
+   .attr( {
+   'xlink:href': 
thumbnail.source,
+   x: 0,
+   y: ( thumbnail.height > 
260) ? ( ( thumbnail.height - 260 ) / -2 ) : thumbnail.height,
+   width: thumbnail.width,
+   height: thumbnail.height
+   } );
+
+   $thumbnail = $( '' )
+   .attr( {
+   xmlns: 
'http://www.w3.org/2000/svg',
+   viewBox: '0 0 203 265',
+   width: 203,
+   height: 265
+   } )
+   .append( $thumbnail );
+   } else {
+   $thumbnail = $( '' )
+   .addClass( 'mwe-popups-is-tall' 
)
+   .css( 'background-image', 
'url(' + thumbnail.source + ')');
+   }
} else {
if ( supportsSVG() ) {
$thumbnail = $( '' )
@@ -156,7 +176,8 @@
function createBox ( href, $el ) {
var bar = cache[ href ],
offsetTop = $el.offset().top + $el.height() + 9,
-   offsetLeft = $el.offset().left;
+   offsetLeft = $el.offset().left,
+   flipped = false;
 
elTime = mw.now();
elAction = 'dismissed';
@@ -172,6 +193,7 @@
if ( offsetLeft > ( $( window ).width() / 2 ) ) {
offsetLeft = offsetLeft + $el.width();
offsetLeft -= ( !bar.tall ) ? 300 : 450;
+   flipped = true;
}
 
$box
@@ -179,7 +201,8 @@
.detach()
// avoid .empty() to keep event handlers
.end()
-   .removeClass( 'mwe-popups-is-tall 
mwe-popups-is-not-tall mwe-popups-no-image-tri mwe-popups-image-tri' )
+   .removeClass( 'mwe-popups-is-tall 
mwe-popups-is-not-tall mwe-popups-no-image-tri mwe-popups-image-tri flipped' )
+   .toggleClass( 'flipped', flipped )
// Add border triangle if there is no image or 
its landscape
.toggleClass( 'mwe-popups-no-image-tri', ( 
!bar.thumbnail || bar.tall ) )
// If theres an image and the popup is portrait 
do the SVG stuff
@@ -197,6 +220,17 @@
// Elements get added to the DOM and not to the 
screen because of different namespaces of HTML and SVG
// More information and workarounds here - 
http://stackoverflow.com/a/13654655/366138
.html( $box.html() );
+
+  

[MediaWiki-commits] [Gerrit] [WIP] Flip the starting point of the popup if its on the rig... - change (mediawiki...Popups)

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

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

Change subject: [WIP] Flip the starting point of the popup if its on the right 
side of the screen
..

[WIP] Flip the starting point of the popup if its on the right side of the 
screen

Change-Id: I7a3fea220d051e0d70fcbf0be3d0557ee24c5da2
---
M resources/ext.popups.core.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 4e912be..2d82c52 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -169,6 +169,11 @@
bar.tall = false;
}
 
+   if ( offsetLeft > ( $( window ).width() / 2 ) ) {
+   offsetLeft = offsetLeft + $el.width();
+   offsetLeft -= ( !bar.tall ) ? 300 : 450;
+   }
+
$box
.children()
.detach()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a3fea220d051e0d70fcbf0be3d0557ee24c5da2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Limit image size for portrait popups - change (mediawiki...Popups)

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

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

Change subject: Limit image size for portrait popups
..

Limit image size for portrait popups

Change-Id: I4980e6d6e024515710abc1912ffcf99b71297e9e
---
M resources/ext.popups.core.js
M resources/ext.popups.core.less
2 files changed, 15 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/86/115186/1

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index b370d84..4e912be 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -122,7 +122,7 @@
'xlink:href': 
thumbnail.source,
'clip-path': 
'url(#mwe-popups-mask)',
x: 0,
-   y: 0,
+   y: ( thumbnail.height > 
200) ? ( ( thumbnail.height - 200 ) / -2 ) : thumbnail.height,
width: thumbnail.width,
height: thumbnail.height
} );
@@ -130,15 +130,15 @@
$thumbnail = $( '' )
.attr( {
xmlns: 
'http://www.w3.org/2000/svg',
-   viewBox: '0 0 ' + 
thumbnail.width + ' ' + thumbnail.height,
-   width: thumbnail.width,
-   height: thumbnail.height
+   viewBox: '0 0 300 ' + ( 
thumbnail.height > 200 ) ? 200 : thumbnail.height,
+   width: 300,
+   height: ( 
thumbnail.height > 200 ) ? 200 : thumbnail.height
} )
.append( $thumbnail );
} else {
-   $thumbnail = $( '' )
-   .attr( 'src', thumbnail.source )
-   .addClass( 
'mwe-popups-is-not-tall' );
+   $thumbnail = $( '' )
+   .addClass( 
'mwe-popups-is-not-tall' )
+   .css( 'background-image', 
'url(' + thumbnail.source + ')' );
}
}
 
diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 9f0ea51..42db1be 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -50,19 +50,17 @@
background-size: cover;
background-repeat: no-repeat;
overflow: hidden;
-
-   img {
-   min-height: 100%;
-   min-width: 100%;
-   
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
-   filter: alpha(opacity=0);
-   opacity: 0
-   }
}
 
-   > img.mwe-popups-is-not-tall{
+   > div.mwe-popups-is-not-tall{
+   float: right;
+   height: 200px;
width: 300px;
-   float: initial;
+   padding: 0;
+   background-size: cover;
+   background-position: center;
+   background-repeat: no-repeat;
+   overflow: hidden;
}
 
> div.mwe-popups-timestamp-older, 
div.mwe-popups-timestamp-recent{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4980e6d6e024515710abc1912ffcf99b71297e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Add createInstance maintenance script for use during migration - change (mediawiki...OpenStackManager)

2014-02-24 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Add createInstance maintenance script for use during migration
..

Add createInstance maintenance script for use during migration

Change-Id: I18806cfdacc98af2a0aaeb9246e386823a10e9f6
---
A maintenance/createInstance.php
1 file changed, 116 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager 
refs/changes/85/115185/1

diff --git a/maintenance/createInstance.php b/maintenance/createInstance.php
new file mode 100644
index 000..77ed22f
--- /dev/null
+++ b/maintenance/createInstance.php
@@ -0,0 +1,116 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ * @author Andrew Bogott
+ */
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+
+if ( $IP === false ) {
+   $IP = __DIR__ . '/../../..';
+
+}
+require_once( "$IP/maintenance/Maintenance.php" );
+
+/**
+ * Maintenance script that triggers an Echo notification for instance action 
completion.
+ *
+ * @ingroup Maintenance
+ */
+class CreateInstance extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->addOption( 'instance', 'The instance name, e.g. 
testhost', true, true );
+   $this->addOption( 'project', 'The instance project, e.g. 
testlabs', true, true );
+   $this->addOption( 'region', 'The instance region, e.g. pmtpa', 
true, true );
+   $this->addOption( 'image', 'The image ID to use when creating', 
true, true );
+   $this->addOption( 'flavor', 'The flavor of the new instance, 
e.g. m1.small', true, true );
+   $this->addOption( 'securitygroups', 'Comma-separated list of 
security groups for new instance', false, false );
+   $this->addOption( 'puppetclasses', 'Comma-separated list of 
security groups for new instance', false, false );
+   }
+
+   public function execute() {
+   global $wgAuth;
+   global $wgOpenStackManagerLDAPUsername;
+   global $wgOpenStackManagerLDAPUserPassword;
+
+   if ( $this->hasOption( 'securitygroups' ) ) {
+   $secGroups = explode(',', $securitygroups);
+   } else {
+   $secGroups = array();
+   }
+   if ( $this->hasOption( 'puppetclasses' ) ) {
+   $pupClasses = explode(',', $puppetclasses);
+   } else {
+   $pupClasses = array();
+   }
+   $region = $this->getOption( 'region' );
+   $flavor = $this->getOption( 'flavor' );
+   $image = $this->getOption( 'image' );
+   $instance = $this->getOption( 'instance' );
+   $project = $this->getOption( 'project' );
+
+   $this->user = new OpenStackNovaUser( 
$wgOpenStackManagerLDAPUsername );
+   $this->userNova = OpenStackNovaController::newFromUser( 
$this->user );
+   $this->userNova->setProject( 'testlabs' );
+   $this->userNova->authenticate( $wgOpenStackManagerLDAPUsername, 
$wgOpenStackManagerLDAPUserPassword );
+
+   $this->userNova->setRegion( $region );
+
+   $domain = OpenStackNovaDomain::getDomainByName( $region );
+   if ( !$domain ) {
+   print "invalid domain\n";
+   return true;
+   }
+   $instance = $this->userNova->createInstance( $instance, $image, 
'', $flavor, $secGroups );
+   if ( $instance ) {
+   // In essex it seems attributes from extensions aren't 
returned. So,
+   // for now we need to work around this by fetching the 
instance again.
+   $instanceId = $instance->getInstanceOSId();
+   $instance = $this->userNova->getInstance( $instanceId );
+   }
+   if ( $instance ) {
+   $host = OpenStackNovaHost::addHostFromInstance( 
$instance, $domain, $pupClasses );
+
+   if ( $host ) {
+   $instance->setHost( $host );
+   $title = "createInstance script";
+   $job = new OpenStackNovaHostJob( $title, array( 
'instanceid' => $instance->getInstanceId(), 'instanceosid' => 
$instance->getInstanceOSId(), 'project' => $project, 'region' => $region ) );
+   $job->run();
+   $image = $this->userNova->getImage( 
$instance->getImageId() );
+   $imageName = $image->getImageName();
+   print "created instance.\n";
+   } else {
+   $instance->deleteInstance( $this->userNova );
+  

[MediaWiki-commits] [Gerrit] Fixes to last commit, based on comments from Nikerabbit - change (mediawiki...ApprovedRevs)

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

Change subject: Fixes to last commit, based on comments from Nikerabbit
..


Fixes to last commit, based on comments from Nikerabbit

Change-Id: Idd011293cf141c972e980801c7c0628ce7ba034c
---
M ApprovedRevs.hooks.php
M SpecialApprovedRevs.php
2 files changed, 23 insertions(+), 22 deletions(-)

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



diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php
index 9001201..2091e81 100644
--- a/ApprovedRevs.hooks.php
+++ b/ApprovedRevs.hooks.php
@@ -268,7 +268,7 @@
$text = Xml::element(
'span',
array( 'class' => 'approvedAndLatestMsg' ),
-   wfMessage( 'approvedrevs-approvedandlatest' 
)->parse()
+   wfMessage( 'approvedrevs-approvedandlatest' 
)->text()
);
} else {
$text = wfMessage( 'approvedrevs-notlatest' )->parse();
@@ -314,8 +314,9 @@
$latestRevID = $title->getLatestRevID();
if ( ! empty( $approvedRevID ) && $approvedRevID != 
$latestRevID ) {
ApprovedRevs::addCSS();
-   global $wgOut;
-   $wgOut->addHTML( '' 
. wfMessage( 'approvedrevs-editwarning' )->parse() . "\n" );
+   // A lengthy way to avoid not calling $wgOut...
+   // hopefully this is better!
+   
$editPage->getArticle()->getContext()->getOutput()->wrapWikiMsg( "$1\n", 'approvedrevs-editwarning' );
}
return true;
}
@@ -335,7 +336,7 @@
ApprovedRevs::addCSS();
$preFormHTML .= Xml::element ( 'p',
array( 'style' => 'font-weight: bold' ),
-   wfMessage( 'approvedrevs-editwarning' 
)->parse() ) . "\n";
+   wfMessage( 'approvedrevs-editwarning' )->text() 
) . "\n";
}
return true;
}
@@ -421,12 +422,12 @@
$url = $title->getLocalUrl(
array( 'action' => 'unapprove' )
);
-   $msg = wfMessage( 'approvedrevs-unapprove' 
)->parse();
+   $msg = wfMessage( 'approvedrevs-unapprove' 
)->text();
} else {
$url = $title->getLocalUrl(
array( 'action' => 'approve', 'oldid' 
=> $row->rev_id )
);
-   $msg = wfMessage( 'approvedrevs-approve' 
)->parse();
+   $msg = wfMessage( 'approvedrevs-approve' 
)->text();
}
$s .= ' (' . Xml::element(
'a',
@@ -466,7 +467,7 @@
$wgOut->addHTML( "\t\t" . Xml::element(
'div',
array( 'class' => 'successbox' ),
-   wfMessage( 'approvedrevs-approvesuccess' )->parse()
+   wfMessage( 'approvedrevs-approvesuccess' )->text()
) . "\n" );
$wgOut->addHTML( "\t\t" . Xml::element(
'p',
@@ -508,9 +509,9 @@
// a blank right now or not
global $egApprovedRevsBlankIfUnapproved;
if ( $egApprovedRevsBlankIfUnapproved ) {
-   $successMsg = wfMessage( 
'approvedrevs-unapprovesuccess2' )->parse();
+   $successMsg = wfMessage( 
'approvedrevs-unapprovesuccess2' )->text();
} else {
-   $successMsg = wfMessage( 
'approvedrevs-unapprovesuccess' )->parse();
+   $successMsg = wfMessage( 
'approvedrevs-unapprovesuccess' )->text();
}
 
global $wgOut;
@@ -577,7 +578,7 @@
 * 'Special:AdminLinks', defined by the Admin Links extension.
 */
static function addToAdminLinks( &$admin_links_tree ) {
-   $general_section = $admin_links_tree->getSection( wfMessage( 
'adminlinks_general' )->parse() );
+   $general_section = $admin_links_tree->getSection( wfMessage( 
'adminlinks_general' )->text() );
$extensions_row = $general_section->getRow( 'extensions' );
if ( is_null( $extensions_row ) ) {
$extensions_row = new ALRow( 'extensions' );
@@ -670,19 +671,19 @@
'oldid' => 
$wgRequest->getInt( 'oldid' )
)
) ),
- 

[MediaWiki-commits] [Gerrit] localize wmgBabelCategoryNames and wmgBabelMainCategory for ... - change (operations/mediawiki-config)

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

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

Change subject: localize wmgBabelCategoryNames and wmgBabelMainCategory for 
oswiki
..

localize wmgBabelCategoryNames and wmgBabelMainCategory for oswiki

for consistency purposes: see also
https://www.mediawiki.org/wiki/Thread:Extension_talk:Babel/Problem_with_local_categories

Change-Id: I97a13b5577b51f112f1cdfa359a17dd40ee8893e
---
M wmf-config/InitialiseSettings.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cc877f0..1bbe0d2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11738,13 +11738,13 @@
'N' => 'Bruker %code%-N',
),
'oswiki' => array(
-   '0' => 'User %code%-0',
-   '1' => 'User %code%-1',
-   '2' => 'User %code%-2',
-   '3' => 'User %code%-3',
-   '4' => 'User %code%-4',
-   '5' => 'User %code%-5',
-   'N' => 'User %code%-N',
+   '0' => 'Архайджытæ %code%-0',
+   '1' => 'Архайджытæ %code%-1',
+   '2' => 'Архайджытæ %code%-2',
+   '3' => 'Архайджытæ %code%-3',
+   '4' => 'Архайджытæ %code%-4',
+   '5' => 'Архайджытæ %code%-5',
+   'N' => 'Архайджытæ %code%-N',
),
'plwiki' => array(
'0' => false,
@@ -12002,7 +12002,7 @@
'metawiki' => 'User %code%',
'minwiki' => 'Pengguna %code%',
'nowiki' => 'Bruker %code%',
-   'oswiki' => 'User %code%',
+   'oswiki' => 'Архайджытæ %code%',
'otrs_wikiwiki' => 'User %code%',
'plwiki' => 'User %code%',
'plwikisource' => 'User %code%', // Bug 39225

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

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

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


<    1   2   3   >