Index: trunk/phase3/maintenance/refreshLinks.php |
— | — | @@ -227,7 +227,7 @@ |
228 | 228 | $dbw->commit(); |
229 | 229 | } |
230 | 230 | |
231 | | - /* |
| 231 | + /** |
232 | 232 | * Removes non-existing links from pages from pagelinks, imagelinks, |
233 | 233 | * categorylinks, templatelinks and externallinks tables. |
234 | 234 | * |
Index: trunk/phase3/includes/search/SearchEngine.php |
— | — | @@ -473,11 +473,13 @@ |
474 | 474 | */ |
475 | 475 | public static function getOpenSearchTemplate() { |
476 | 476 | global $wgOpenSearchTemplate, $wgServer; |
477 | | - if ( $wgOpenSearchTemplate ) { |
| 477 | + if ( $wgOpenSearchTemplate ) { |
478 | 478 | return $wgOpenSearchTemplate; |
479 | 479 | } else { |
480 | 480 | $ns = implode( '|', SearchEngine::defaultNamespaces() ); |
481 | | - if ( !$ns ) $ns = "0"; |
| 481 | + if ( !$ns ) { |
| 482 | + $ns = "0"; |
| 483 | + } |
482 | 484 | return $wgServer . wfScript( 'api' ) . '?action=opensearch&search={searchTerms}&namespace=' . $ns; |
483 | 485 | } |
484 | 486 | } |
Index: trunk/phase3/includes/search/SearchPostgres.php |
— | — | @@ -29,7 +29,12 @@ |
30 | 30 | * @ingroup Search |
31 | 31 | */ |
32 | 32 | class SearchPostgres extends SearchEngine { |
| 33 | + |
33 | 34 | /** |
| 35 | + * @var DatabasePostgres |
| 36 | + */ |
| 37 | + protected $db; |
| 38 | + /** |
34 | 39 | * Creates an instance of this class |
35 | 40 | * @param $db DatabaseSqlite: database object |
36 | 41 | */ |
— | — | @@ -56,6 +61,7 @@ |
57 | 62 | } |
58 | 63 | return new PostgresSearchResultSet( $resultSet, $this->searchTerms ); |
59 | 64 | } |
| 65 | + |
60 | 66 | function searchText( $term ) { |
61 | 67 | $q = $this->searchQuery( $term, 'textvector', 'old_text' ); |
62 | 68 | $olderror = error_reporting(E_ERROR); |
Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -365,7 +365,7 @@ |
366 | 366 | if ( $handler ) { |
367 | 367 | $validity = $handler->isMetadataValid( $this, $this->metadata ); |
368 | 368 | if ( $validity === MediaHandler::METADATA_BAD |
369 | | - || ( $validity === MediaHandler::METADATA_COMPATIBLE && $wgUpdateCompatibleMetadata ) |
| 369 | + || ( $validity === MediaHandler::METADATA_COMPATIBLE && $wgUpdateCompatibleMetadata ) |
370 | 370 | ) { |
371 | 371 | $this->upgradeRow(); |
372 | 372 | $this->upgraded = true; |
— | — | @@ -691,7 +691,7 @@ |
692 | 692 | if ( in_array( $ext, $wgExcludeFromThumbnailPurge ) ) { |
693 | 693 | continue; |
694 | 694 | } |
695 | | - |
| 695 | + |
696 | 696 | # Check that the base file name is part of the thumb name |
697 | 697 | # This is a basic sanity check to avoid erasing unrelated directories |
698 | 698 | if ( strpos( $file, $this->getName() ) !== false ) { |
— | — | @@ -1053,7 +1053,7 @@ |
1054 | 1054 | } |
1055 | 1055 | |
1056 | 1056 | /** |
1057 | | - * Move or copy a file to a specified location. Returns a FileRepoStatus |
| 1057 | + * Move or copy a file to a specified location. Returns a FileRepoStatus |
1058 | 1058 | * object with the archive name in the "value" member on success. |
1059 | 1059 | * |
1060 | 1060 | * The archive name should be passed through to recordUpload for database |
— | — | @@ -1068,7 +1068,7 @@ |
1069 | 1069 | */ |
1070 | 1070 | function publishTo( $srcPath, $dstRel, $flags = 0 ) { |
1071 | 1071 | $this->lock(); |
1072 | | - |
| 1072 | + |
1073 | 1073 | $archiveName = wfTimestamp( TS_MW ) . '!'. $this->getName(); |
1074 | 1074 | $archiveRel = 'archive/' . $this->getHashPath() . $archiveName; |
1075 | 1075 | $flags = $flags & File::DELETE_SOURCE ? LocalRepo::DELETE_SOURCE : 0; |
— | — | @@ -1971,17 +1971,17 @@ |
1972 | 1972 | |
1973 | 1973 | return $status; |
1974 | 1974 | } |
1975 | | - |
| 1975 | + |
1976 | 1976 | /** |
1977 | | - * Cleanup a failed batch. The batch was only partially successful, so |
| 1977 | + * Cleanup a failed batch. The batch was only partially successful, so |
1978 | 1978 | * rollback by removing all items that were succesfully copied. |
1979 | | - * |
| 1979 | + * |
1980 | 1980 | * @param Status $storeStatus |
1981 | 1981 | * @param array $storeBatch |
1982 | 1982 | */ |
1983 | 1983 | function cleanupFailedBatch( $storeStatus, $storeBatch ) { |
1984 | | - $cleanupBatch = array(); |
1985 | | - |
| 1984 | + $cleanupBatch = array(); |
| 1985 | + |
1986 | 1986 | foreach ( $storeStatus->success as $i => $success ) { |
1987 | 1987 | // Check if this item of the batch was successfully copied |
1988 | 1988 | if ( $success ) { |
— | — | @@ -2075,7 +2075,7 @@ |
2076 | 2076 | $triplets = $this->getMoveTriplets(); |
2077 | 2077 | |
2078 | 2078 | $triplets = $this->removeNonexistentFiles( $triplets ); |
2079 | | - |
| 2079 | + |
2080 | 2080 | // Copy the files into their new location |
2081 | 2081 | $statusMove = $repo->storeBatch( $triplets ); |
2082 | 2082 | wfDebugLog( 'imagemove', "Moved files for {$this->file->name}: {$statusMove->successCount} successes, {$statusMove->failCount} failures" ); |
— | — | @@ -2097,10 +2097,10 @@ |
2098 | 2098 | return $statusDb; |
2099 | 2099 | } |
2100 | 2100 | $this->db->commit(); |
2101 | | - |
| 2101 | + |
2102 | 2102 | // Everything went ok, remove the source files |
2103 | 2103 | $this->cleanupSource( $triplets ); |
2104 | | - |
| 2104 | + |
2105 | 2105 | $status->merge( $statusDb ); |
2106 | 2106 | $status->merge( $statusMove ); |
2107 | 2107 | |
— | — | @@ -2196,9 +2196,9 @@ |
2197 | 2197 | |
2198 | 2198 | return $filteredTriplets; |
2199 | 2199 | } |
2200 | | - |
| 2200 | + |
2201 | 2201 | /** |
2202 | | - * Cleanup a partially moved array of triplets by deleting the target |
| 2202 | + * Cleanup a partially moved array of triplets by deleting the target |
2203 | 2203 | * files. Called if something went wrong half way. |
2204 | 2204 | */ |
2205 | 2205 | function cleanupTarget( $triplets ) { |
— | — | @@ -2207,13 +2207,13 @@ |
2208 | 2208 | foreach ( $triplets as $triplet ) { |
2209 | 2209 | $pairs[] = array( $triplet[1], $triplet[2] ); |
2210 | 2210 | } |
2211 | | - |
| 2211 | + |
2212 | 2212 | $this->file->repo->cleanupBatch( $pairs ); |
2213 | 2213 | } |
2214 | | - |
| 2214 | + |
2215 | 2215 | /** |
2216 | 2216 | * Cleanup a fully moved array of triplets by deleting the source files. |
2217 | | - * Called at the end of the move process if everything else went ok. |
| 2217 | + * Called at the end of the move process if everything else went ok. |
2218 | 2218 | */ |
2219 | 2219 | function cleanupSource( $triplets ) { |
2220 | 2220 | // Create source file names from the triplets |
— | — | @@ -2221,7 +2221,7 @@ |
2222 | 2222 | foreach ( $triplets as $triplet ) { |
2223 | 2223 | $files[] = $triplet[0]; |
2224 | 2224 | } |
2225 | | - |
| 2225 | + |
2226 | 2226 | $this->file->repo->cleanupBatch( $files ); |
2227 | 2227 | } |
2228 | 2228 | } |
Index: trunk/phase3/includes/LinksUpdate.php |
— | — | @@ -769,7 +769,7 @@ |
770 | 770 | function getTitle() { |
771 | 771 | return $this->mTitle; |
772 | 772 | } |
773 | | - |
| 773 | + |
774 | 774 | /** |
775 | 775 | * Return the list of images used as generated by the parser |
776 | 776 | */ |
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -329,7 +329,7 @@ |
330 | 330 | $namespaces[] = $opts['namespace']; |
331 | 331 | |
332 | 332 | $inversionSuffix = $opts['invert'] ? '!' : ''; |
333 | | - |
| 333 | + |
334 | 334 | if( $opts['associated'] ) { |
335 | 335 | # namespace association (bug 2429) |
336 | 336 | $namespaces[] = MWNamespace::getAssociated( $opts['namespace'] ); |