From: Chad Horohoe Date: Wed, 1 Sep 2010 18:16:05 +0000 (+0000) Subject: More duplication reduction X-Git-Tag: 1.31.0-rc.0~35241 X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=commitdiff_plain;h=17da093eb9ab8ffc02a7691a6f70d48546117d9e;p=lhc%2Fweb%2Fwiklou.git More duplication reduction --- diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 986d68f279..d3727d87b7 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -424,4 +424,7 @@ abstract class DatabaseInstaller { return Status::newGood(); } -} \ No newline at end of file + public function outputHandler( $string ) { + return htmlspecialchars( $string ); + } +} diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index 6a3f2f1a1e..7be7ff6ab3 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -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 */ diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php index 68fc6e36c8..08eea76b22 100644 --- a/includes/installer/SqliteInstaller.php +++ b/includes/installer/SqliteInstaller.php @@ -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