Merge "Added a new "api-error-publishfailed" message."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 23 Jan 2013 08:28:31 +0000 (08:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 23 Jan 2013 08:28:31 +0000 (08:28 +0000)
includes/api/ApiUpload.php
includes/libs/CSSJanus.php
tests/phpunit/includes/libs/CSSJanusTest.php

index 4afc8e7..1d7ba0f 100644 (file)
@@ -53,6 +53,7 @@ class ApiUpload extends ApiBase {
                $request = $this->getMain()->getRequest();
                // Check if async mode is actually supported
                $this->mParams['async'] = ( $this->mParams['async'] && !wfIsWindows() );
+               $this->mParams['async'] = false; // XXX: disabled per bug 44080
                // Add the uploaded file to the params array
                $this->mParams['file'] = $request->getFileName( 'file' );
                $this->mParams['chunk'] = $request->getFileName( 'chunk' );
index 4ebbc49..76c5b6a 100644 (file)
@@ -57,6 +57,7 @@ class CSSJanus {
                'lookahead_not_open_brace' => null,
                'lookahead_not_closing_paren' => null,
                'lookahead_for_closing_paren' => null,
+               'lookahead_not_letter' => '(?![a-zA-Z])',
                'lookbehind_not_letter' => '(?<![a-zA-Z])',
                'chars_within_selector' => '[^\}]*?',
                'noflip_annotation' => '\/\*\s*@noflip\s*\*\/',
@@ -104,8 +105,8 @@ class CSSJanus {
                $patterns['noflip_class'] = "/({$patterns['noflip_annotation']}{$patterns['chars_within_selector']}})/i";
                $patterns['direction_ltr'] = "/({$patterns['direction']})ltr/i";
                $patterns['direction_rtl'] = "/({$patterns['direction']})rtl/i";
-               $patterns['left'] = "/{$patterns['lookbehind_not_letter']}(left){$patterns['lookahead_not_closing_paren']}{$patterns['lookahead_not_open_brace']}/i";
-               $patterns['right'] = "/{$patterns['lookbehind_not_letter']}(right){$patterns['lookahead_not_closing_paren']}{$patterns['lookahead_not_open_brace']}/i";
+               $patterns['left'] = "/{$patterns['lookbehind_not_letter']}(left){$patterns['lookahead_not_letter']}{$patterns['lookahead_not_closing_paren']}{$patterns['lookahead_not_open_brace']}/i";
+               $patterns['right'] = "/{$patterns['lookbehind_not_letter']}(right){$patterns['lookahead_not_letter']}{$patterns['lookahead_not_closing_paren']}{$patterns['lookahead_not_open_brace']}/i";
                $patterns['left_in_url'] = "/{$patterns['lookbehind_not_letter']}(left){$patterns['lookahead_for_closing_paren']}/i";
                $patterns['right_in_url'] = "/{$patterns['lookbehind_not_letter']}(right){$patterns['lookahead_for_closing_paren']}/i";
                $patterns['ltr_in_url'] = "/{$patterns['lookbehind_not_letter']}(ltr){$patterns['lookahead_for_closing_paren']}/i";
index 54f6607..2cd86ea 100644 (file)
@@ -458,6 +458,16 @@ class CSSJanusTest extends MediaWikiTestCase {
                                ".foo\t{\tleft\t:\t0;}",
                                ".foo\t{\tright\t:\t0;}"
                        ),
+
+                       // Guard against partial keys
+                       array(
+                               '.foo { leftxx: 0; }',
+                               '.foo { leftxx: 0; }'
+                       ),
+                       array(
+                               '.foo { rightxx: 0; }',
+                               '.foo { rightxx: 0; }'
+                       ),
                );
        }
 
@@ -534,16 +544,6 @@ class CSSJanusTest extends MediaWikiTestCase {
         */
        function provideTransformBrokenCases() {
                return array(
-                       // Guard against partial keys
-                       array(
-                               '.foo { leftxx: 0; }',
-                               '.foo { leftxx: 0; }'
-                       ),
-                       array(
-                               '.foo { rightxx: 0; }',
-                               '.foo { rightxx: 0; }'
-                       ),
-
                        // Guard against selectors that look flippable
                        array(
                                # <foo-left-x attr="x">