r69602 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69601‎ | r69602 | r69603 >
Date:11:25, 20 July 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Clarified field and method visibility
Modified paths:
  • /trunk/phase3/includes/installer/SqliteInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/SqliteInstaller.php
@@ -1,12 +1,13 @@
22 <?php
33
44 class SqliteInstaller extends DatabaseInstaller {
 5+
56 protected $globalNames = array(
67 'wgDBname',
78 'wgSQLiteDataDir',
89 );
910
10 - function getName() {
 11+ public function getName() {
1112 return 'sqlite';
1213 }
1314
@@ -14,7 +15,7 @@
1516 return self::checkExtension( 'pdo_sqlite' );
1617 }
1718
18 - function getGlobalDefaults() {
 19+ public function getGlobalDefaults() {
1920 if ( isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
2021 $path = str_replace(
2122 array( '/', '\\' ),
@@ -27,14 +28,14 @@
2829 }
2930 }
3031
31 - function getConnectForm() {
 32+ public function getConnectForm() {
3233 return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir' ) .
3334 $this->parent->getHelpBox( 'config-sqlite-dir-help' ) .
3435 $this->getTextBox( 'wgDBname', 'config-db-name' ) .
3536 $this->parent->getHelpBox( 'config-sqlite-name-help' );
3637 }
3738
38 - function submitConnectForm() {
 39+ public function submitConnectForm() {
3940 global $wgSQLiteDataDir;
4041 $this->setVarsFromRequest( array( 'wgSQLiteDataDir', 'wgDBname' ) );
4142
@@ -79,7 +80,7 @@
8081 return Status::newGood();
8182 }
8283
83 - function getConnection() {
 84+ public function getConnection() {
8485 global $wgSQLiteDataDir;
8586
8687 $status = Status::newGood();
@@ -98,7 +99,7 @@
99100 return $status;
100101 }
101102
102 - function needsUpgrade() {
 103+ public function needsUpgrade() {
103104 $dir = $this->getVar( 'wgSQLiteDataDir' );
104105 $dbName = $this->getVar( 'wgDBname' );
105106 // Don't create the data file yet
@@ -110,15 +111,15 @@
111112 return parent::needsUpgrade();
112113 }
113114
114 - function getSettingsForm() {
 115+ public function getSettingsForm() {
115116 return false;
116117 }
117118
118 - function submitSettingsForm() {
 119+ public function submitSettingsForm() {
119120 return Status::newGood();
120121 }
121122
122 - function setupDatabase() {
 123+ public function setupDatabase() {
123124 $dir = $this->getVar( 'wgSQLiteDataDir' );
124125
125126 # Sanity check. We checked this before but maybe someone deleted the
@@ -146,7 +147,7 @@
147148 return $this->getConnection();
148149 }
149150
150 - function createTables() {
 151+ public function createTables() {
151152 global $IP;
152153 $status = $this->getConnection();
153154 if ( !$status->isOK() ) {
@@ -161,7 +162,7 @@
162163 return $this->setupSearchIndex();
163164 }
164165
165 - function setupSearchIndex() {
 166+ public function setupSearchIndex() {
166167 global $IP;
167168
168169 $status = Status::newGood();
@@ -181,7 +182,7 @@
182183 return $status;
183184 }
184185
185 - function doUpgrade() {
 186+ public function doUpgrade() {
186187 global $wgDatabase;
187188 LBFactory::enableBackend();
188189 $wgDatabase = wfGetDB( DB_MASTER );
@@ -191,14 +192,15 @@
192193 return true;
193194 }
194195
195 - static function outputHandler( $string ) {
 196+ public static function outputHandler( $string ) {
196197 return htmlspecialchars( $string );
197198 }
198199
199 - function getLocalSettings() {
 200+ public function getLocalSettings() {
200201 $dir = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgSQLiteDataDir' ) );
201202 return
202203 "# SQLite-specific settings
203204 \$wgSQLiteDataDir = \"{$dir}\";";
204205 }
205 -}
 206+
 207+}
\ No newline at end of file

Status & tagging log