More duplication reduction
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 1 Sep 2010 18:16:05 +0000 (18:16 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 1 Sep 2010 18:16:05 +0000 (18:16 +0000)
includes/installer/DatabaseInstaller.php
includes/installer/MysqlInstaller.php
includes/installer/SqliteInstaller.php

index 986d68f..d3727d8 100644 (file)
@@ -424,4 +424,7 @@ abstract class DatabaseInstaller {
                return Status::newGood();
        }
 
-}
\ No newline at end of file
+       public function outputHandler( $string ) {
+               return htmlspecialchars( $string );
+       }
+}
index 6a3f2f1..7be7ff6 100644 (file)
@@ -198,7 +198,7 @@ class MysqlInstaller extends DatabaseInstaller {
 
                $ret = true;
 
-               ob_start( array( __CLASS__, 'outputHandler' ) );
+               ob_start( array( $this, 'outputHandler' ) );
                try {
                        do_all_updates( false, true );
                } catch ( MWException $e ) {
@@ -210,10 +210,6 @@ class MysqlInstaller extends DatabaseInstaller {
                return $ret;
        }
 
-       public static function outputHandler( $string ) {
-               return htmlspecialchars( $string );
-       }
-
        /**
         * Get a list of storage engines that are available and supported
         */
index 68fc6e3..08eea76 100644 (file)
@@ -186,16 +186,12 @@ class SqliteInstaller extends DatabaseInstaller {
                global $wgDatabase;
                LBFactory::enableBackend();
                $wgDatabase = wfGetDB( DB_MASTER );
-               ob_start( array( 'SqliteInstaller', 'outputHandler' ) );
+               ob_start( array( $this, 'outputHandler' ) );
                do_all_updates( false, true );
                ob_end_flush();
                return true;
        }
 
-       public static function outputHandler( $string ) {
-               return htmlspecialchars( $string );
-       }
-
        public function getLocalSettings() {
                $dir = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgSQLiteDataDir' ) );
                return