Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -355,6 +355,7 @@ |
356 | 356 | |
357 | 357 | /** |
358 | 358 | * Show an error message in a box. Parameters are like wfMsg(). |
| 359 | + * @param $msg |
359 | 360 | */ |
360 | 361 | public function showError( $msg /*...*/ ) { |
361 | 362 | $args = func_get_args(); |
— | — | @@ -366,6 +367,8 @@ |
367 | 368 | |
368 | 369 | /** |
369 | 370 | * Temporary error handler for session start debugging. |
| 371 | + * @param $errno |
| 372 | + * @param $errstr string |
370 | 373 | */ |
371 | 374 | public function errorHandler( $errno, $errstr ) { |
372 | 375 | $this->phpErrors[] = $errstr; |
— | — | @@ -630,6 +633,7 @@ |
631 | 634 | * Get small text indented help for a preceding form field. |
632 | 635 | * Parameters like wfMsg(). |
633 | 636 | * |
| 637 | + * @param $msg |
634 | 638 | * @return string |
635 | 639 | */ |
636 | 640 | public function getHelpBox( $msg /*, ... */ ) { |
— | — | @@ -638,7 +642,7 @@ |
639 | 643 | $args = array_map( 'htmlspecialchars', $args ); |
640 | 644 | $text = wfMsgReal( $msg, $args, false, false, false ); |
641 | 645 | $html = htmlspecialchars( $text ); |
642 | | - $html = $this->parse( $text, true ); |
| 646 | + $html = $this->parse( $html, true ); |
643 | 647 | |
644 | 648 | return "<div class=\"mw-help-field-container\">\n" . |
645 | 649 | "<span class=\"mw-help-field-hint\">" . wfMsgHtml( 'config-help' ) . "</span>\n" . |
— | — | @@ -687,6 +691,10 @@ |
688 | 692 | * Label a control by wrapping a config-input div around it and putting a |
689 | 693 | * label before it. |
690 | 694 | * |
| 695 | + * @param $msg |
| 696 | + * @param $forId |
| 697 | + * @param $contents |
| 698 | + * @param $helpData string |
691 | 699 | * @return string |
692 | 700 | */ |
693 | 701 | public function label( $msg, $forId, $contents, $helpData = "" ) { |
— | — | @@ -1013,6 +1021,7 @@ |
1014 | 1022 | /** |
1015 | 1023 | * Helper for Installer::docLink() |
1016 | 1024 | * |
| 1025 | + * @param $page |
1017 | 1026 | * @return string |
1018 | 1027 | */ |
1019 | 1028 | protected function getDocUrl( $page ) { |
— | — | @@ -1028,6 +1037,9 @@ |
1029 | 1038 | /** |
1030 | 1039 | * Extension tag hook for a documentation link. |
1031 | 1040 | * |
| 1041 | + * @param $linkText |
| 1042 | + * @param $attribs |
| 1043 | + * @param $parser |
1032 | 1044 | * @return string |
1033 | 1045 | */ |
1034 | 1046 | public function docLink( $linkText, $attribs, $parser ) { |
— | — | @@ -1040,6 +1052,9 @@ |
1041 | 1053 | /** |
1042 | 1054 | * Helper for "Download LocalSettings" link on WebInstall_Complete |
1043 | 1055 | * |
| 1056 | + * @param $text |
| 1057 | + * @param $attribs |
| 1058 | + * @param $parser |
1044 | 1059 | * @return String Html for download link |
1045 | 1060 | */ |
1046 | 1061 | public function downloadLinkHook( $text, $attribs, $parser ) { |
Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -1118,6 +1118,9 @@ |
1119 | 1119 | /** |
1120 | 1120 | * Same as locateExecutable(), but checks in getPossibleBinPaths() by default |
1121 | 1121 | * @see locateExecutable() |
| 1122 | + * @param $names |
| 1123 | + * @param $versionInfo bool |
| 1124 | + * @return bool|string |
1122 | 1125 | */ |
1123 | 1126 | public static function locateExecutableInDefaultPaths( $names, $versionInfo = false ) { |
1124 | 1127 | foreach( self::getPossibleBinPaths() as $path ) { |
— | — | @@ -1204,6 +1207,8 @@ |
1205 | 1208 | |
1206 | 1209 | /** |
1207 | 1210 | * Overridden by WebInstaller to provide lastPage parameters. |
| 1211 | + * @param $page stirng |
| 1212 | + * @return string |
1208 | 1213 | */ |
1209 | 1214 | protected function getDocUrl( $page ) { |
1210 | 1215 | return "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page ); |
— | — | @@ -1491,6 +1496,7 @@ |
1492 | 1497 | /** |
1493 | 1498 | * Insert Main Page with default content. |
1494 | 1499 | * |
| 1500 | + * @param $installer DatabaseInstaller |
1495 | 1501 | * @return Status |
1496 | 1502 | */ |
1497 | 1503 | protected function createMainpage( DatabaseInstaller $installer ) { |
Index: trunk/phase3/includes/installer/Ibm_db2Installer.php |
— | — | @@ -144,6 +144,9 @@ |
145 | 145 | if ( !$status->isOK() ) { |
146 | 146 | return $status; |
147 | 147 | } |
| 148 | + /** |
| 149 | + * @var $conn DatabaseBase |
| 150 | + */ |
148 | 151 | $conn = $status->value; |
149 | 152 | $dbName = $this->getVar( 'wgDBname' ); |
150 | 153 | if( !$conn->selectDB( $dbName ) ) { |
Index: trunk/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -281,6 +281,7 @@ |
282 | 282 | /** |
283 | 283 | * Construct and initialise parent. |
284 | 284 | * This is typically only called from Installer::getDBInstaller() |
| 285 | + * @param $parent |
285 | 286 | */ |
286 | 287 | public function __construct( $parent ) { |
287 | 288 | $this->parent = $parent; |
— | — | @@ -291,6 +292,8 @@ |
292 | 293 | * Check if a named extension is present. |
293 | 294 | * |
294 | 295 | * @see wfDl |
| 296 | + * @param $name |
| 297 | + * @return bool |
295 | 298 | */ |
296 | 299 | protected static function checkExtension( $name ) { |
297 | 300 | wfSuppressWarnings(); |
— | — | @@ -323,6 +326,9 @@ |
324 | 327 | |
325 | 328 | /** |
326 | 329 | * Get a variable, taking local defaults into account. |
| 330 | + * @param $var string |
| 331 | + * @param $default null |
| 332 | + * @return mixed |
327 | 333 | */ |
328 | 334 | public function getVar( $var, $default = null ) { |
329 | 335 | $defaults = $this->getGlobalDefaults(); |
— | — | @@ -337,6 +343,8 @@ |
338 | 344 | |
339 | 345 | /** |
340 | 346 | * Convenience alias for $this->parent->setVar() |
| 347 | + * @param $name string |
| 348 | + * @param $value mixed |
341 | 349 | */ |
342 | 350 | public function setVar( $name, $value ) { |
343 | 351 | $this->parent->setVar( $name, $value ); |
— | — | @@ -345,6 +353,10 @@ |
346 | 354 | /** |
347 | 355 | * Get a labelled text box to configure a local variable. |
348 | 356 | * |
| 357 | + * @param $var string |
| 358 | + * @param $label string |
| 359 | + * @param $attribs array |
| 360 | + * @param $helpData string |
349 | 361 | * @return string |
350 | 362 | */ |
351 | 363 | public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) { |
— | — | @@ -367,6 +379,10 @@ |
368 | 380 | * Get a labelled password box to configure a local variable. |
369 | 381 | * Implements password hiding. |
370 | 382 | * |
| 383 | + * @param $var string |
| 384 | + * @param $label string |
| 385 | + * @param $attribs array |
| 386 | + * @param $helpData string |
371 | 387 | * @return string |
372 | 388 | */ |
373 | 389 | public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) { |
Index: trunk/phase3/includes/installer/LocalSettingsGenerator.php |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | $locale = ''; |
189 | 189 | } |
190 | 190 | |
191 | | - $rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; |
| 191 | + //$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // TODO: Fixme, I'm unused! |
192 | 192 | $hashedUploads = $this->safeMode ? '' : '#'; |
193 | 193 | $metaNamespace = ''; |
194 | 194 | if( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) { |
Index: trunk/phase3/includes/installer/MysqlInstaller.php |
— | — | @@ -113,6 +113,9 @@ |
114 | 114 | if ( !$status->isOK() ) { |
115 | 115 | return $status; |
116 | 116 | } |
| 117 | + /** |
| 118 | + * @var $conn DatabaseBase |
| 119 | + */ |
117 | 120 | $conn = $status->value; |
118 | 121 | |
119 | 122 | // Check version |
— | — | @@ -154,6 +157,9 @@ |
155 | 158 | $this->parent->showStatusError( $status ); |
156 | 159 | return; |
157 | 160 | } |
| 161 | + /** |
| 162 | + * @var $conn DatabaseBase |
| 163 | + */ |
158 | 164 | $conn = $status->value; |
159 | 165 | $conn->selectDB( $this->getVar( 'wgDBname' ) ); |
160 | 166 | |
— | — | @@ -212,6 +218,9 @@ |
213 | 219 | if ( !$status->isOK() ) { |
214 | 220 | return $engines; |
215 | 221 | } |
| 222 | + /** |
| 223 | + * @var $conn DatabaseBase |
| 224 | + */ |
216 | 225 | $conn = $status->value; |
217 | 226 | |
218 | 227 | $version = $conn->getServerVersion(); |
— | — | @@ -259,6 +268,9 @@ |
260 | 269 | if ( !$status->isOK() ) { |
261 | 270 | return false; |
262 | 271 | } |
| 272 | + /** |
| 273 | + * @var $conn DatabaseBase |
| 274 | + */ |
263 | 275 | $conn = $status->value; |
264 | 276 | |
265 | 277 | // Check version, need INFORMATION_SCHEMA and CREATE USER |
Index: trunk/phase3/includes/installer/OracleInstaller.php |
— | — | @@ -117,6 +117,10 @@ |
118 | 118 | return $statusIS3; |
119 | 119 | } |
120 | 120 | } |
| 121 | + |
| 122 | + /** |
| 123 | + * @var $conn DatabaseBase |
| 124 | + */ |
121 | 125 | $conn = $status->value; |
122 | 126 | |
123 | 127 | // Check version |
Index: trunk/phase3/includes/installer/PostgresInstaller.php |
— | — | @@ -80,6 +80,9 @@ |
81 | 81 | if ( !$status->isOK() ) { |
82 | 82 | return $status; |
83 | 83 | } |
| 84 | + /** |
| 85 | + * @var $conn DatabaseBase |
| 86 | + */ |
84 | 87 | $conn = $status->value; |
85 | 88 | |
86 | 89 | // Check version |
— | — | @@ -139,6 +142,9 @@ |
140 | 143 | $status = $this->openPgConnection( $type ); |
141 | 144 | |
142 | 145 | if ( $status->isOK() ) { |
| 146 | + /** |
| 147 | + * @var $conn DatabaseBase |
| 148 | + */ |
143 | 149 | $conn = $status->value; |
144 | 150 | $conn->clearFlag( DBO_TRX ); |
145 | 151 | $conn->commit(); |
— | — | @@ -186,6 +192,9 @@ |
187 | 193 | case 'create-tables': |
188 | 194 | $status = $this->openPgConnection( 'create-schema' ); |
189 | 195 | if ( $status->isOK() ) { |
| 196 | + /** |
| 197 | + * @var $conn DatabaseBase |
| 198 | + */ |
190 | 199 | $conn = $status->value; |
191 | 200 | $safeRole = $conn->addIdentifierQuotes( $this->getVar( 'wgDBuser' ) ); |
192 | 201 | $conn->query( "SET ROLE $safeRole" ); |
— | — | @@ -204,6 +213,7 @@ |
205 | 214 | if ( !in_array( $this->getVar( 'wgDBname' ), $dbs ) ) { |
206 | 215 | array_unshift( $dbs, $this->getVar( 'wgDBname' ) ); |
207 | 216 | } |
| 217 | + $conn = false; |
208 | 218 | $status = Status::newGood(); |
209 | 219 | foreach ( $dbs as $db ) { |
210 | 220 | try { |
— | — | @@ -233,6 +243,9 @@ |
234 | 244 | if ( !$status->isOK() ) { |
235 | 245 | return false; |
236 | 246 | } |
| 247 | + /** |
| 248 | + * @var $conn DatabaseBase |
| 249 | + */ |
237 | 250 | $conn = $status->value; |
238 | 251 | $superuser = $this->getVar( '_InstallUser' ); |
239 | 252 | |
— | — | @@ -418,8 +431,8 @@ |
419 | 432 | $dbName = $this->getVar( 'wgDBname' ); |
420 | 433 | $schema = $this->getVar( 'wgDBmwschema' ); |
421 | 434 | $user = $this->getVar( 'wgDBuser' ); |
422 | | - $safeschema = $conn->addIdentifierQuotes( $schema ); |
423 | | - $safeuser = $conn->addIdentifierQuotes( $user ); |
| 435 | + //$safeschema = $conn->addIdentifierQuotes( $schema ); |
| 436 | + //$safeuser = $conn->addIdentifierQuotes( $user ); |
424 | 437 | |
425 | 438 | $exists = $conn->selectField( '"pg_catalog"."pg_database"', '1', |
426 | 439 | array( 'datname' => $dbName ), __METHOD__ ); |
— | — | @@ -481,7 +494,7 @@ |
482 | 495 | $schema = $this->getVar( 'wgDBmwschema' ); |
483 | 496 | $safeuser = $conn->addIdentifierQuotes( $this->getVar( 'wgDBuser' ) ); |
484 | 497 | $safepass = $conn->addQuotes( $this->getVar( 'wgDBpassword' ) ); |
485 | | - $safeschema = $conn->addIdentifierQuotes( $schema ); |
| 498 | + //$safeschema = $conn->addIdentifierQuotes( $schema ); |
486 | 499 | |
487 | 500 | // Check if the user already exists |
488 | 501 | $userExists = $conn->roleExists( $this->getVar( 'wgDBuser' ) ); |
— | — | @@ -532,6 +545,10 @@ |
533 | 546 | if ( !$status->isOK() ) { |
534 | 547 | return $status; |
535 | 548 | } |
| 549 | + |
| 550 | + /** |
| 551 | + * @var $conn DatabaseBase |
| 552 | + */ |
536 | 553 | $conn = $status->value; |
537 | 554 | |
538 | 555 | if( $conn->tableExists( 'user' ) ) { |
— | — | @@ -567,6 +584,9 @@ |
568 | 585 | if ( !$status->isOK() ) { |
569 | 586 | return $status; |
570 | 587 | } |
| 588 | + /** |
| 589 | + * @var $conn DatabaseBase |
| 590 | + */ |
571 | 591 | $conn = $status->value; |
572 | 592 | |
573 | 593 | $exists = $conn->selectField( '"pg_catalog"."pg_language"', 1, |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -212,6 +212,10 @@ |
213 | 213 | /** |
214 | 214 | * Get a <select> for selecting languages. |
215 | 215 | * |
| 216 | + * @param $name |
| 217 | + * @param $label |
| 218 | + * @param $selectedCode |
| 219 | + * @param $helpHtml string |
216 | 220 | * @return string |
217 | 221 | */ |
218 | 222 | public function getLanguageSelector( $name, $label, $selectedCode, $helpHtml = '' ) { |