Property changes on: branches/REL1_18/phase3/maintenance/cleanupTable.inc |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1 | 1 | Merged /trunk/phase3/maintenance/cleanupTable.inc:r92634,92762,92791,92854,92958,93141,93303 |
Index: branches/REL1_18/phase3/maintenance/Maintenance.php |
— | — | @@ -133,18 +133,25 @@ |
134 | 134 | /** |
135 | 135 | * Should we execute the maintenance script, or just allow it to be included |
136 | 136 | * as a standalone class? It checks that the call stack only includes this |
137 | | - * function and a require (meaning was called from the file scope) |
| 137 | + * function and "requires" (meaning was called from the file scope) |
138 | 138 | * |
139 | 139 | * @return Boolean |
140 | 140 | */ |
141 | 141 | public static function shouldExecute() { |
142 | 142 | $bt = debug_backtrace(); |
143 | | - if( count( $bt ) !== 2 ) { |
144 | | - return false; |
| 143 | + if ( count( $bt ) < 2 ) { |
| 144 | + return false; // sanity |
145 | 145 | } |
146 | | - return in_array( $bt[1]['function'], array( 'require_once', 'require', 'include' ) ) && |
147 | | - $bt[0]['class'] == 'Maintenance' && |
148 | | - $bt[0]['function'] == 'shouldExecute'; |
| 146 | + if ( $bt[0]['class'] !== 'Maintenance' || $bt[0]['function'] !== 'shouldExecute' ) { |
| 147 | + return false; // last call should be to this function |
| 148 | + } |
| 149 | + $includeFuncs = array( 'require_once', 'require', 'include' ); |
| 150 | + for( $i=1; $i < count( $bt ); $i++ ) { |
| 151 | + if ( !in_array( $bt[$i]['function'], $includeFuncs ) ) { |
| 152 | + return false; // previous calls should all be "requires" |
| 153 | + } |
| 154 | + } |
| 155 | + return true; |
149 | 156 | } |
150 | 157 | |
151 | 158 | /** |
— | — | @@ -926,7 +933,9 @@ |
927 | 934 | ini_set( 'include_path', ".:$IP:$IP/includes:$IP/languages:$IP/maintenance" ); |
928 | 935 | |
929 | 936 | if ( $lang == 'test' && $site == 'wikipedia' ) { |
930 | | - define( 'TESTWIKI', 1 ); |
| 937 | + if ( !defined( 'TESTWIKI' ) ) { |
| 938 | + define( 'TESTWIKI', 1 ); |
| 939 | + } |
931 | 940 | } |
932 | 941 | } |
933 | 942 | |
— | — | @@ -1254,4 +1263,3 @@ |
1255 | 1264 | return; |
1256 | 1265 | } |
1257 | 1266 | } |
1258 | | - |
Property changes on: branches/REL1_18/phase3/maintenance/tables.sql |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1259 | 1267 | Merged /trunk/phase3/maintenance/tables.sql:r92634,92762,92791,92854,92958,93141,93303 |
Property changes on: branches/REL1_18/phase3/tests/selenium/installer/README.txt |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1260 | 1268 | Merged /trunk/phase3/tests/selenium/installer/README.txt:r92634,92762,92791,92854,92958,93141,93303 |
Index: branches/REL1_18/phase3/tests/phpunit/includes/media/SVGMetadataExtractorTest.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | */ |
20 | 20 | function testGetXMLMetadata( $infile, $expected ) { |
21 | 21 | $r = new XMLReader(); |
22 | | - if( !method_exists( $r, 'readInnerXML()' ) ) { |
| 22 | + if( !method_exists( $r, 'readInnerXML' ) ) { |
23 | 23 | $this->markTestSkipped( 'XMLReader::readInnerXML() does not exist (libxml >2.6.20 needed).' ); |
24 | 24 | return; |
25 | 25 | } |
Property changes on: branches/REL1_18/phase3/tests/testHelpers.inc |
___________________________________________________________________ |
Modified: svn:mergeinfo |
26 | 26 | Merged /trunk/phase3/tests/testHelpers.inc:r92634,92762,92791,92854,92958,93141,93303 |
Index: branches/REL1_18/phase3/includes/api/ApiQueryQueryPage.php |
— | — | @@ -98,6 +98,11 @@ |
99 | 99 | } |
100 | 100 | } |
101 | 101 | $result->addValue( array( 'query' ), $this->getModuleName(), $r ); |
| 102 | + |
| 103 | + if ( $qp->isCached() && !$qp->isCacheable() ) { |
| 104 | + // Disabled query page, don't run the query |
| 105 | + return; |
| 106 | + } |
102 | 107 | |
103 | 108 | $res = $qp->doQuery( $params['limit'] + 1, $params['offset'] ); |
104 | 109 | $count = 0; |
Property changes on: branches/REL1_18/phase3/includes/api |
___________________________________________________________________ |
Modified: svn:mergeinfo |
105 | 110 | Merged /trunk/phase3/includes/api:r92634,92762,92791,92854,92958,93141,93303 |
Index: branches/REL1_18/phase3/includes/media/SVGMetadataExtractor.php |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | return; |
179 | 179 | } |
180 | 180 | // TODO: find and store type of xml snippet. metadata['metadataType'] = "rdf" |
181 | | - if( method_exists( $this->reader, 'readInnerXML()' ) ) { |
| 181 | + if( method_exists( $this->reader, 'readInnerXML' ) ) { |
182 | 182 | $this->metadata[$metafield] = trim( $this->reader->readInnerXML() ); |
183 | 183 | } else { |
184 | 184 | throw new MWException( "The PHP XMLReader extension does not come with readInnerXML() method. Your libxml is probably out of date (need 2.6.20 or later)." ); |
Index: branches/REL1_18/phase3/includes/specials/SpecialChangePassword.php |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | protected function attemptReset( $newpass, $retype ) { |
209 | 209 | $user = User::newFromName( $this->mUserName ); |
210 | 210 | if( !$user || $user->isAnon() ) { |
211 | | - throw new PasswordError( 'no such user' ); |
| 211 | + throw new PasswordError( wfMsg( 'nosuchusershort', $this->mUserName ) ); |
212 | 212 | } |
213 | 213 | |
214 | 214 | if( $newpass !== $retype ) { |
Property changes on: branches/REL1_18/phase3/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
215 | 215 | Merged /trunk/phase3/includes/specials:r92634,92762,92791,92854,92958,93141,93303 |
Index: branches/REL1_18/phase3/includes/Exception.php |
— | — | @@ -368,7 +368,7 @@ |
369 | 369 | |
370 | 370 | parent::__construct( |
371 | 371 | 'blockedtitle', |
372 | | - $block->mAuto ? 'autoblocketext' : 'blockedtext', |
| 372 | + $block->mAuto ? 'autoblockedtext' : 'blockedtext', |
373 | 373 | array( |
374 | 374 | $link, |
375 | 375 | $reason, |
Property changes on: branches/REL1_18/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
376 | 376 | Merged /trunk/phase3/includes:r92634,92762,92791,92854,92958,93141,93303 |
Index: branches/REL1_18/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -972,7 +972,7 @@ |
973 | 973 | // Allow calling with an external script or single dependency as a string |
974 | 974 | if ( typeof modules === 'string' ) { |
975 | 975 | // Support adding arbitrary external scripts |
976 | | - if ( modules.substr( 0, 7 ) == 'http://' || modules.substr( 0, 8 ) == 'https://' ) { |
| 976 | + if ( modules.substr( 0, 7 ) === 'http://' || modules.substr( 0, 8 ) === 'https://' || modules.substr( 0, 2 ) === '//' ) { |
977 | 977 | if ( type === 'text/css' ) { |
978 | 978 | $( 'head' ).append( $( '<link />', { |
979 | 979 | rel: 'stylesheet', |
Property changes on: branches/REL1_18/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
980 | 980 | Merged /trunk/phase3:r92634,92762,92791,92854,92958,93141,93303 |