Merge "Document DBO_PERSISTENT in DefaultSettings.php"
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 18 May 2012 05:15:39 +0000 (05:15 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 18 May 2012 05:15:39 +0000 (05:15 +0000)
includes/filerepo/FileRepo.php
includes/filerepo/backend/FileBackendStore.php
includes/filerepo/backend/SwiftFileBackend.php
includes/parser/Parser.php
includes/specials/SpecialMovepage.php
maintenance/archives/patch-filejournal.sql
tests/parser/parserTests.txt

index 6533dae..d3dded4 100644 (file)
@@ -852,14 +852,11 @@ class FileRepo {
                        $operations[] = array(
                                'op'        => 'store',
                                'src'       => $src,
-                               'dst'       => $this->resolveToStoragePath( $dst ),
-                               'overwrite' => true
+                               'dst'       => $this->resolveToStoragePath( $dst )
                        );
                        $this->backend->prepare( array( 'dir' => dirname( $dst ) ) );
                }
-               $status->merge( $this->backend->doOperations( $operations,
-                       array( 'force' => 1, 'nonLocking' => 1, 'allowStale' => 1, 'nonJournaled' => 1 )
-               ) );
+               $status->merge( $this->backend->doQuickOperations( $operations ) );
 
                return $status;
        }
@@ -882,9 +879,7 @@ class FileRepo {
                                'ignoreMissingSource' => true
                        );
                }
-               $status->merge( $this->backend->doOperations( $operations,
-                       array( 'force' => 1, 'nonLocking' => 1, 'allowStale' => 1, 'nonJournaled' => 1 )
-               ) );
+               $status->merge( $this->backend->doQuickOperations( $operations ) );
 
                return $status;
        }
index 62c32eb..7d32bec 100644 (file)
@@ -947,7 +947,7 @@ abstract class FileBackendStore extends FileBackend {
                wfProfileIn( __METHOD__ . '-' . $this->name );
                $status = Status::newGood();
 
-               $async = $this->parallelize;
+               $async = ( $this->parallelize === 'implicit' );
                $maxConcurrency = $this->concurrency; // throttle
 
                $statuses = array(); // array of (index => Status)
@@ -1016,6 +1016,9 @@ abstract class FileBackendStore extends FileBackend {
                        }
                }
                $res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
+               foreach ( $fileOpHandles as $fileOpHandle ) {
+                       $fileOpHandle->closeResources();
+               }
                wfProfileOut( __METHOD__ . '-' . $this->name );
                wfProfileOut( __METHOD__ );
                return $res;
index eefe852..12fc801 100644 (file)
@@ -973,10 +973,6 @@ class SwiftFileBackend extends FileBackendStore {
                        $statuses[$index] = $status;
                }
 
-               foreach ( $fileOpHandles as $fileOpHandle ) {
-                       $fileOpHandle->closeResources();
-               }
-
                return $statuses;
        }
 
index fa98dbf..35f187f 100644 (file)
@@ -3390,10 +3390,8 @@ class Parser {
                }
 
                # Replace raw HTML by a placeholder
-               # Add a blank line preceding, to prevent it from mucking up
-               # immediately preceding headings
                if ( $isHTML ) {
-                       $text = "\n\n" . $this->insertStripItem( $text );
+                       $text = $this->insertStripItem( $text );
                } elseif ( $nowiki && ( $this->ot['html'] || $this->ot['pre'] ) ) {
                        # Escape nowiki-style return values
                        $text = wfEscapeWikiText( $text );
index 6b817d2..a512ee6 100644 (file)
@@ -246,6 +246,14 @@ class MovePageForm extends UnlistedSpecialPage {
                // Byte limit (not string length limit) for wpReason and wpNewTitleMain
                // is enforced in the mediawiki.special.movePage module
 
+               $immovableNamespaces = array();
+
+               foreach ( array_keys( $this->getLanguage()->getNamespaces() ) as $nsId ) {
+                       if ( !MWNamespace::isMovable( $nsId ) ) {
+                               $immovableNamespaces[] = $nsId;
+                       }
+               }
+
                $out->addHTML(
                         Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
                         Xml::openElement( 'fieldset' ) .
@@ -265,7 +273,10 @@ class MovePageForm extends UnlistedSpecialPage {
                                "</td>
                                <td class='mw-input'>" .
                                        Html::namespaceSelector(
-                                               array( 'selected' => $newTitle->getNamespace() ),
+                                               array(
+                                                       'selected' => $newTitle->getNamespace(),
+                                                       'exclude' => $immovableNamespaces
+                                               ),
                                                array( 'name' => 'wpNewTitleNs', 'id' => 'wpNewTitleNs' )
                                        ) .
                                        Xml::input( 'wpNewTitleMain', 60, $wgContLang->recodeForEdit( $newTitle->getText() ), array(
index 114297c..6c07858 100644 (file)
@@ -16,7 +16,7 @@ CREATE TABLE /*_*/filejournal (
   fj_new_sha1 varbinary(32) NOT NULL default '',
   -- Timestamp of the batch operation
   fj_timestamp varbinary(14) NOT NULL default ''
-);
+) /*$wgDBTableOptions*/;
 
 CREATE INDEX /*i*/fj_batch_id ON /*_*/filejournal (fj_batch_uuid);
 CREATE INDEX /*i*/fj_timestamp ON /*_*/filejournal (fj_timestamp);
index ddb84c3..3a8a778 100644 (file)
@@ -6064,8 +6064,6 @@ Special page transclusion
 !! input
 {{Special:Prefixindex/Xyzzyx}}
 !! result
-<p><br />
-</p>
 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
 
 !! end
@@ -6077,11 +6075,7 @@ Special page transclusion twice (bug 5021)
 {{Special:Prefixindex/Xyzzyx}}
 {{Special:Prefixindex/Xyzzyx}}
 !! result
-<p><br />
-</p>
 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
-<p><br />
-</p>
 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
 
 !! end