Merge "Use htmlspecialchars not htmlentities to escape tags on Version."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 12 Jul 2014 08:34:52 +0000 (08:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 12 Jul 2014 08:34:52 +0000 (08:34 +0000)
includes/libs/CSSMin.php
includes/objectcache/MemcachedPeclBagOStuff.php
maintenance/resources/update-oojs-ui.sh
resources/src/jquery/jquery.arrowSteps.js
tests/phpunit/maintenance/getSlaveServerTest.php [deleted file]
tests/qunit/data/testrunner.js

index 6b10ae4..4885ae6 100644 (file)
@@ -163,6 +163,8 @@ class CSSMin {
         * Build a CSS 'url()' value for the given URL, quoting parentheses (and other funny characters)
         * and escaping quotes as necessary.
         *
+        * See http://www.w3.org/TR/css-syntax-3/#consume-a-url-token
+        *
         * @param string $url URL to process
         * @return string 'url()' value, usually just `"url($url)"`, quoted/escaped if necessary
         */
index f7dfe46..8700c8c 100644 (file)
@@ -269,10 +269,4 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                wfProfileOut( __METHOD__ );
                return $this->checkResult( false, $result );
        }
-
-
-       /* NOTE: there is no cas() method here because it is currently not supported
-        * by the BagOStuff interface and other BagOStuff subclasses, such as
-        * SqlBagOStuff.
-        */
 }
index ca9572f..e1ccb46 100755 (executable)
@@ -72,7 +72,7 @@ NEWCHANGESDISPLAY=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=a
 
 # Copy files
 # - Exclude the default non-svg stylesheet
-rsync --recursive --delete --force --exclude 'oojs-ui.css' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
+rsync --recursive --delete --force --exclude 'oojs-ui.css' --exclude 'oojs-ui*.rtl.css' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
 
 # Read the new version
 NEWVERSION=$(oojsuiversion)
index 66a3c56..f8641e1 100644 (file)
         * @chainable
         */
        $.fn.arrowSteps = function () {
-               var $steps, width, arrowWidth,
+               var $steps, width, arrowWidth, $stepDiv,
+                       $el = this,
                        paddingSide = $( 'body' ).hasClass( 'rtl' ) ? 'padding-left' : 'padding-right';
 
-               this.addClass( 'arrowSteps' );
-               $steps = this.find( 'li' );
+               $el.addClass( 'arrowSteps' );
+               $steps = $el.find( 'li' );
 
                width = parseInt( 100 / $steps.length, 10 );
                $steps.css( 'width', width + '%' );
                // Every step except the last one has an arrow pointing forward:
                // at the right hand side in LTR languages, and at the left hand side in RTL.
                // Also add in the padding for the calculated arrow width.
-               arrowWidth = parseInt( this.outerHeight(), 10 );
-               $steps.filter( ':not(:last-child)' ).addClass( 'arrow' )
-                       .find( 'div' ).css( paddingSide, arrowWidth.toString() + 'px' );
+               $stepDiv = $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ).find( 'div' );
+
+               // Execute when complete page is fully loaded, including all frames, objects and images
+               $( window ).load( function () {
+                       arrowWidth = parseInt( $el.outerHeight(), 10 );
+                       $stepDiv.css( paddingSide, arrowWidth.toString() + 'px' );
+               } );
+
+               $el.data( 'arrowSteps', $steps );
 
-               this.data( 'arrowSteps', $steps );
                return this;
        };
 
diff --git a/tests/phpunit/maintenance/getSlaveServerTest.php b/tests/phpunit/maintenance/getSlaveServerTest.php
deleted file mode 100644 (file)
index 165dc55..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-require_once __DIR__ . "/../../../maintenance/getSlaveServer.php";
-
-/**
- * Tests for getSlaveServer
- *
- * @group Database
- * @covers GetSlaveServer
- */
-class GetSlaveServerTest extends MediaWikiTestCase {
-
-       /**
-        * Yields a regular expression that matches a good DB server name
-        *
-        * It matches IPs or hostnames, both optionally followed by a
-        * port specification
-        *
-        * @return string The regular expression
-        */
-       private function getServerRE() {
-               if ( $this->db->getType() === 'sqlite' ) {
-                       // for SQLite, only the empty string is a good server name
-                       return '';
-               }
-
-               $octet = '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])';
-               $ip = "(($octet\.){3}$octet)";
-
-               $label = '([a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)';
-               $hostname = "($label(\.$label)*)";
-
-               return "($ip|$hostname)(:[0-9]{1,5})?";
-       }
-
-       function testPlain() {
-               $gss = new GetSlaveServer();
-               $gss->execute();
-
-               $this->expectOutputRegex( "/^" . self::getServerRE() . "\n$/D" );
-       }
-
-       function testXmlDumpsBackupUseCase() {
-               global $wgDBprefix;
-
-               global $argv;
-               $argv = array( null, "--globals" );
-
-               $gss = new GetSlaveServer();
-               $gss->loadParamsAndArgs();
-               $gss->execute();
-               $gss->globals();
-
-               // The main answer
-               $output = $this->getActualOutput();
-               $firstLineEndPos = strpos( $output, "\n" );
-               if ( $firstLineEndPos === false ) {
-                       $this->fail( "Could not find end of first line of output" );
-               }
-               $firstLine = substr( $output, 0, $firstLineEndPos );
-               $this->assertRegExp( "/^" . self::getServerRE() . "$/D",
-                       $firstLine, "DB Server" );
-
-               // xmldumps-backup relies on the wgDBprefix in the output.
-               $this->expectOutputRegex( "/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> "
-                       . $wgDBprefix . "$/m" );
-       }
-}
index f3f884a..2eda8f1 100644 (file)
                                        // still suppressed by the end of the test.
                                        restoreWarnings();
 
-                                       // Check for (and clean up, if possible) incomplete animations/requests/etc.
+                                       // Check for incomplete animations/requests/etc and throw
+                                       // error if there are any.
                                        if ( $.timers && $.timers.length !== 0 ) {
                                                // Test may need to use fake timers, wait for animations or
                                                // call $.fx.stop().