SpecialVersion: Handle Closures in $wgHooks nicer
[lhc/web/wiklou.git] / includes / Export.php
index dd5cb0c..adab21c 100644 (file)
@@ -213,7 +213,6 @@ class WikiExporter {
         * @param array $cond
         */
        protected function do_list_authors( $cond ) {
-               wfProfileIn( __METHOD__ );
                $this->author_list = "<contributors>";
                // rev_deleted
 
@@ -239,7 +238,6 @@ class WikiExporter {
                                "</contributor>";
                }
                $this->author_list .= "</contributors>";
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -248,7 +246,6 @@ class WikiExporter {
         * @throws Exception
         */
        protected function dumpFrom( $cond = '' ) {
-               wfProfileIn( __METHOD__ );
                # For logging dumps...
                if ( $this->history & self::LOGS ) {
                        $where = array( 'user_id = log_user' );
@@ -304,7 +301,6 @@ class WikiExporter {
                                }
 
                                // Inform caller about problem
-                               wfProfileOut( __METHOD__ );
                                throw $e;
                        }
                # For page dumps...
@@ -349,7 +345,6 @@ class WikiExporter {
                                $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
                                # One, and only one hook should set this, and return false
                                if ( Hooks::run( 'WikiExporter::dumpStableQuery', array( &$tables, &$opts, &$join ) ) ) {
-                                       wfProfileOut( __METHOD__ );
                                        throw new MWException( __METHOD__ . " given invalid history dump type." );
                                }
                        } elseif ( $this->history & WikiExporter::RANGE ) {
@@ -358,7 +353,6 @@ class WikiExporter {
                                $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' );
                        } else {
                                # Unknown history specification parameter?
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( __METHOD__ . " given invalid history dump type." );
                        }
                        # Query optimization hacks
@@ -417,7 +411,6 @@ class WikiExporter {
                                throw $e;
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -651,7 +644,6 @@ class XmlDumpWriter {
         * @access private
         */
        function writeRevision( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $out = "    <revision>\n";
                $out .= "      " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
@@ -726,7 +718,6 @@ class XmlDumpWriter {
 
                $out .= "    </revision>\n";
 
-               wfProfileOut( __METHOD__ );
                return $out;
        }
 
@@ -739,7 +730,6 @@ class XmlDumpWriter {
         * @access private
         */
        function writeLogItem( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $out = "  <logitem>\n";
                $out .= "    " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n";
@@ -773,7 +763,6 @@ class XmlDumpWriter {
 
                $out .= "  </logitem>\n";
 
-               wfProfileOut( __METHOD__ );
                return $out;
        }
 
@@ -885,7 +874,7 @@ class XmlDumpWriter {
                }
 
                global $wgContLang;
-               $prefix = str_replace( '_', ' ', $wgContLang->getNsText( $title->getNamespace() ) );
+               $prefix = $wgContLang->getFormattedNsText( $title->getNamespace() );
 
                if ( $prefix !== '' ) {
                        $prefix .= ':';
@@ -1202,7 +1191,7 @@ class Dump7ZipOutput extends DumpPipeOutput {
         * @return string
         */
        function setup7zCommand( $file ) {
-               $command = "7za a -bd -si " . wfEscapeShellArg( $file );
+               $command = "7za a -bd -si -mx=4 " . wfEscapeShellArg( $file );
                // Suppress annoying useless crap from p7zip
                // Unfortunately this could suppress real error messages too
                $command .= ' >' . wfGetNull() . ' 2>&1';