r77898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77897‎ | r77898 | r77899 >
Date:20:04, 6 December 2010
Author:bharris
Status:ok (Comments)
Tags:
Comment:
Revert r77860, which was a reversion of r75832.

Didn't see comments about escaping html and use of tipsy; will be addressed in next commit.
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/OracleInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/PostgresInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/SqliteInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerOutput.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -632,21 +632,12 @@
633633 array_shift( $args );
634634 $args = array_map( 'htmlspecialchars', $args );
635635 $text = wfMsgReal( $msg, $args, false, false, false );
636 - $html = $this->parse( $text, true );
637 -
 636+ $html = htmlspecialchars( $text );
 637+ //$html = $this->parse( $text, true );
638638 return
639 - "<div class=\"config-help-wrapper\">\n" .
640 - "<div class=\"config-help-message\">\n" .
641 - $html .
642 - "</div>\n" .
643 - "<div class=\"config-show-help\">\n" .
644 - "<a href=\"#\">" .
645 - wfMsgHtml( 'config-show-help' ) .
646 - "</a></div>\n" .
647 - "<div class=\"config-hide-help\">\n" .
648 - "<a href=\"#\">" .
649 - wfMsgHtml( 'config-hide-help' ) .
650 - "</a></div>\n</div>\n";
 639+ "<span class=\"mw-help-field-hint\"\n" .
 640+ " title=\"" . $html . "\"\n" .
 641+ " original-title=\"" . $html . "\"></span>\n";
651642 }
652643
653644 /**
@@ -689,7 +680,7 @@
690681 * Label a control by wrapping a config-input div around it and putting a
691682 * label before it.
692683 */
693 - public function label( $msg, $forId, $contents ) {
 684+ public function label( $msg, $forId, $contents, $helpData = "" ) {
694685 if ( strval( $msg ) == '' ) {
695686 $labelText = '&#160;';
696687 } else {
@@ -703,11 +694,16 @@
704695 }
705696
706697 return
707 - "<div class=\"config-input\">\n" .
 698+ "<div class=\"config-block\">\n" .
 699+ " <div class=\"config-block-label\">\n" .
708700 Xml::tags( 'label',
709701 $attributes,
710702 $labelText ) . "\n" .
711 - $contents .
 703+ $helpData .
 704+ " </div>\n" .
 705+ " <div class=\"config-block-elements\">\n" .
 706+ $contents .
 707+ " </div>\n" .
712708 "</div>\n";
713709 }
714710
@@ -721,6 +717,7 @@
722718 * attribs: Additional attributes for the input element (optional)
723719 * controlName: The name for the input element (optional)
724720 * value: The current value of the variable (optional)
 721+ * help: The html for the help text (optional)
725722 */
726723 public function getTextBox( $params ) {
727724 if ( !isset( $params['controlName'] ) ) {
@@ -734,7 +731,9 @@
735732 if ( !isset( $params['attribs'] ) ) {
736733 $params['attribs'] = array();
737734 }
738 -
 735+ if ( !isset( $params['help'] ) ) {
 736+ $params['help'] = "";
 737+ }
739738 return
740739 $this->label(
741740 $params['label'],
@@ -748,7 +747,8 @@
749748 'class' => 'config-input-text',
750749 'tabindex' => $this->nextTabIndex()
751750 )
752 - )
 751+ ),
 752+ $params['help']
753753 );
754754 }
755755
@@ -763,6 +763,7 @@
764764 * attribs: Additional attributes for the input element (optional)
765765 * controlName: The name for the input element (optional)
766766 * value: The current value of the variable (optional)
 767+ * help: The html for the help text (optional)
767768 */
768769 public function getPasswordBox( $params ) {
769770 if ( !isset( $params['value'] ) ) {
@@ -789,6 +790,7 @@
790791 * attribs: Additional attributes for the input element (optional)
791792 * controlName: The name for the input element (optional)
792793 * value: The current value of the variable (optional)
 794+ * help: The html for the help text (optional)
793795 */
794796 public function getCheckBox( $params ) {
795797 if ( !isset( $params['controlName'] ) ) {
@@ -802,7 +804,9 @@
803805 if ( !isset( $params['attribs'] ) ) {
804806 $params['attribs'] = array();
805807 }
806 -
 808+ if ( !isset( $params['help'] ) ) {
 809+ $params['help'] = "";
 810+ }
807811 if( isset( $params['rawtext'] ) ) {
808812 $labelText = $params['rawtext'];
809813 } else {
@@ -811,7 +815,8 @@
812816
813817 return
814818 "<div class=\"config-input-check\">\n" .
815 - "<label>\n" .
 819+ $params['help'] .
 820+ "<label>\n" .
816821 Xml::check(
817822 $params['controlName'],
818823 $params['value'],
@@ -822,6 +827,7 @@
823828 ) .
824829 $labelText . "\n" .
825830 "</label>\n" .
 831+ $params['help'] .
826832 "</div>\n";
827833 }
828834
@@ -838,6 +844,7 @@
839845 * commonAttribs Attribute array applied to all items
840846 * controlName: The name for the input element (optional)
841847 * value: The current value of the variable (optional)
 848+ * help: The html for the help text (optional)
842849 */
843850 public function getRadioSet( $params ) {
844851 if ( !isset( $params['controlName'] ) ) {
@@ -851,13 +858,12 @@
852859 if ( !isset( $params['label'] ) ) {
853860 $label = '';
854861 } else {
855 - $label = $this->parse( wfMsgNoTrans( $params['label'] ) );
 862+ $label = $params['label'];
856863 }
857 -
858 - $s = "<label class=\"config-label\">\n" .
859 - $label .
860 - "</label>\n" .
861 - "<ul class=\"config-settings-block\">\n";
 864+ if ( !isset( $params['help'] ) ) {
 865+ $params['help'] = "";
 866+ }
 867+ $s = "<ul>\n";
862868 foreach ( $params['values'] as $value ) {
863869 $itemAttribs = array();
864870
@@ -885,7 +891,8 @@
886892 }
887893
888894 $s .= "</ul>\n";
889 - return $s;
 895+
 896+ return $this->label( $label, $params['controlName'], $s, $params['help'] );
890897 }
891898
892899 /**
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -31,8 +31,6 @@
3232 'config-no-session' => 'Your session data was lost!
3333 Check your php.ini and make sure <code>session.save_path</code> is set to an appropriate directory.',
3434 'config-session-path-bad' => 'Your <code>session.save_path</code> (<code>$1</code>) seems to be invalid or unwritable.',
35 - 'config-show-help' => 'Help',
36 - 'config-hide-help' => 'Hide help',
3735 'config-your-language' => 'Your language:',
3836 'config-your-language-help' => 'Select a language to use during the installation process.',
3937 'config-wiki-language' => 'Wiki language:',
Index: trunk/phase3/includes/installer/WebInstallerOutput.php
@@ -9,20 +9,20 @@
1010 /**
1111 * Output class modelled on OutputPage.
1212 *
13 - * I've opted to use a distinct class rather than derive from OutputPage here in
14 - * the interests of separation of concerns: if we used a subclass, there would be
15 - * quite a lot of things you could do in OutputPage that would break the installer,
16 - * that wouldn't be immediately obvious.
17 - *
 13+ * I've opted to use a distinct class rather than derive from OutputPage here in
 14+ * the interests of separation of concerns: if we used a subclass, there would be
 15+ * quite a lot of things you could do in OutputPage that would break the installer,
 16+ * that wouldn't be immediately obvious.
 17+ *
1818 * @ingroup Deployment
1919 * @since 1.17
2020 */
2121 class WebInstallerOutput {
2222 /**
2323 * The WebInstaller object this WebInstallerOutput is used by.
24 - *
 24+ *
2525 * @var WebInstaller
26 - */
 26+ */
2727 public $parent;
2828
2929 /**
@@ -47,7 +47,7 @@
4848
4949 /**
5050 * Constructor.
51 - *
 51+ *
5252 * @param $parent WebInstaller
5353 */
5454 public function __construct( WebInstaller $parent ) {
@@ -182,16 +182,11 @@
183183 <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?>
184184 <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
185185 <?php echo $this->getJQuery() . "\n"; ?>
 186+ <?php echo $this->getJQueryTipsy() . "\n"; ?>
186187 <?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?>
187188 </head>
188189
189190 <?php echo Html::openElement( 'body', array( 'class' => $this->getDir() ) ) . "\n"; ?>
190 -<noscript>
191 -<style type="text/css">
192 -.config-help-message { display: block; }
193 -.config-show-help { display: none; }
194 -</style>
195 -</noscript>
196191 <div id="mw-page-base"></div>
197192 <div id="mw-head-base"></div>
198193 <div id="content">
@@ -241,6 +236,7 @@
242237 <title><?php $this->outputTitle(); ?></title>
243238 <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?>
244239 <?php echo $this->getJQuery(); ?>
 240+ <?php echo $this->getJQueryTipsy() . "\n"; ?>
245241 <?php echo Html::linkedScript( '../skins/common/config.js' ); ?>
246242 </head>
247243
@@ -256,10 +252,7 @@
257253 public function getJQuery() {
258254 return Html::linkedScript( "../resources/jquery/jquery.js" );
259255 }
260 -
261 - public function outputWarnings() {
262 - $this->addHTML( $this->warnings );
263 - $this->warnings = '';
 256+ public function getJQueryTipsy() {
 257+ return Html::linkedScript( "../resources/jquery/jquery.tipsy.js" );
264258 }
265 -
266259 }
Index: trunk/phase3/includes/installer/SqliteInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using SQLLite.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -41,10 +41,8 @@
4242 }
4343
4444 public function getConnectForm() {
45 - return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir' ) .
46 - $this->parent->getHelpBox( 'config-sqlite-dir-help' ) .
47 - $this->getTextBox( 'wgDBname', 'config-db-name' ) .
48 - $this->parent->getHelpBox( 'config-sqlite-name-help' );
 45+ return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir', array(), $this->parent->getHelpBox( 'config-sqlite-dir-help' ) ) .
 46+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) );
4947 }
5048
5149 public function submitConnectForm() {
Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Base class for DBMS-specific installation helper classes.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -16,30 +16,30 @@
1717
1818 /**
1919 * The Installer object.
20 - *
 20+ *
2121 * TODO: naming this parent is confusing, 'installer' would be clearer.
22 - *
 22+ *
2323 * @var Installer
2424 */
2525 public $parent;
2626
2727 /**
2828 * The database connection.
29 - *
 29+ *
3030 * @var DatabaseBase
3131 */
3232 public $db;
3333
3434 /**
3535 * Internal variables for installation.
36 - *
 36+ *
3737 * @var array
3838 */
3939 protected $internalDefaults = array();
4040
4141 /**
4242 * Array of MW configuration globals this class uses.
43 - *
 43+ *
4444 * @var array
4545 */
4646 protected $globalNames = array();
@@ -56,7 +56,7 @@
5757
5858 /**
5959 * Get HTML for a web form that configures this database. Configuration
60 - * at this time should be the minimum needed to connect and test
 60+ * at this time should be the minimum needed to connect and test
6161 * whether install or upgrade is required.
6262 *
6363 * If this is called, $this->parent can be assumed to be a WebInstaller.
@@ -65,7 +65,7 @@
6666
6767 /**
6868 * Set variables based on the request array, assuming it was submitted
69 - * via the form returned by getConnectForm(). Validate the connection
 69+ * via the form returned by getConnectForm(). Validate the connection
7070 * settings by attempting to connect with them.
7171 *
7272 * If this is called, $this->parent can be assumed to be a WebInstaller.
@@ -77,7 +77,7 @@
7878 /**
7979 * Get HTML for a web form that retrieves settings used for installation.
8080 * $this->parent can be assumed to be a WebInstaller.
81 - * If the DB type has no settings beyond those already configured with
 81+ * If the DB type has no settings beyond those already configured with
8282 * getConnectForm(), this should return false.
8383 */
8484 public function getSettingsForm() {
@@ -87,7 +87,7 @@
8888 /**
8989 * Set variables based on the request array, assuming it was submitted via
9090 * the form return by getSettingsForm().
91 - *
 91+ *
9292 * @return Status
9393 */
9494 public function submitSettingsForm() {
@@ -96,7 +96,7 @@
9797
9898 /**
9999 * Connect to the database using the administrative user/password currently
100 - * defined in the session. On success, return the connection, on failure,
 100+ * defined in the session. On success, return the connection, on failure,
101101 *
102102 * This may be called multiple times, so the result should be cached.
103103 *
@@ -114,7 +114,7 @@
115115
116116 /**
117117 * Create database tables from scratch.
118 - *
 118+ *
119119 * @return Status
120120 */
121121 public function createTables() {
@@ -139,7 +139,7 @@
140140
141141 /**
142142 * Get the DBMS-specific options for LocalSettings.php generation.
143 - *
 143+ *
144144 * @return String
145145 */
146146 public abstract function getLocalSettings();
@@ -188,19 +188,19 @@
189189 */
190190 public function getGlobalNames() {
191191 return $this->globalNames;
192 - }
 192+ }
193193
194194 /**
195195 * Return any table options to be applied to all tables that don't
196196 * override them.
197 - *
 197+ *
198198 * @return Array
199199 */
200200 public function getTableOptions() {
201201 return array();
202202 }
203203
204 - /**
 204+ /**
205205 * Construct and initialise parent.
206206 * This is typically only called from Installer::getDBInstaller()
207207 */
@@ -211,7 +211,7 @@
212212 /**
213213 * Convenience function.
214214 * Check if a named extension is present.
215 - *
 215+ *
216216 * @see wfDl
217217 */
218218 protected static function checkExtension( $name ) {
@@ -267,15 +267,19 @@
268268 /**
269269 * Get a labelled text box to configure a local variable.
270270 */
271 - public function getTextBox( $var, $label, $attribs = array() ) {
 271+ public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) {
272272 $name = $this->getName() . '_' . $var;
273273 $value = $this->getVar( $var );
 274+ if ( !isset( $attribs ) ) {
 275+ $attribs = array();
 276+ }
274277 return $this->parent->getTextBox( array(
275278 'var' => $var,
276279 'label' => $label,
277280 'attribs' => $attribs,
278281 'controlName' => $name,
279 - 'value' => $value
 282+ 'value' => $value,
 283+ 'help' => $helpData
280284 ) );
281285 }
282286
@@ -283,22 +287,26 @@
284288 * Get a labelled password box to configure a local variable.
285289 * Implements password hiding.
286290 */
287 - public function getPasswordBox( $var, $label, $attribs = array() ) {
 291+ public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) {
288292 $name = $this->getName() . '_' . $var;
289293 $value = $this->getVar( $var );
 294+ if ( !isset( $attribs ) ) {
 295+ $attribs = array();
 296+ }
290297 return $this->parent->getPasswordBox( array(
291298 'var' => $var,
292299 'label' => $label,
293300 'attribs' => $attribs,
294301 'controlName' => $name,
295 - 'value' => $value
 302+ 'value' => $value,
 303+ 'help' => $helpData
296304 ) );
297305 }
298306
299307 /**
300308 * Get a labelled checkbox to configure a local boolean variable.
301309 */
302 - public function getCheckBox( $var, $label, $attribs = array() ) {
 310+ public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) {
303311 $name = $this->getName() . '_' . $var;
304312 $value = $this->getVar( $var );
305313 return $this->parent->getCheckBox( array(
@@ -307,6 +315,7 @@
308316 'attribs' => $attribs,
309317 'controlName' => $name,
310318 'value' => $value,
 319+ 'help' => $helpData
311320 ));
312321 }
313322
@@ -339,11 +348,11 @@
340349 }
341350
342351 /**
343 - * Determine whether an existing installation of MediaWiki is present in
344 - * the configured administrative connection. Returns true if there is
 352+ * Determine whether an existing installation of MediaWiki is present in
 353+ * the configured administrative connection. Returns true if there is
345354 * such a wiki, false if the database doesn't exist.
346355 *
347 - * Traditionally, this is done by testing for the existence of either
 356+ * Traditionally, this is done by testing for the existence of either
348357 * the revision table or the cur table.
349358 *
350359 * @return Boolean
@@ -367,9 +376,8 @@
368377 return
369378 Html::openElement( 'fieldset' ) .
370379 Html::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) .
371 - $this->getTextBox( '_InstallUser', 'config-db-username' ) .
372 - $this->getPasswordBox( '_InstallPassword', 'config-db-password' ) .
373 - $this->parent->getHelpBox( 'config-db-install-help' ) .
 380+ $this->getTextBox( '_InstallUser', 'config-db-username', array(), $this->parent->getHelpBox( 'config-db-install-username' ) ) .
 381+ $this->getPasswordBox( '_InstallPassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-install-password' ) ) .
374382 Html::closeElement( 'fieldset' );
375383 }
376384
@@ -389,7 +397,7 @@
390398 public function getWebUserBox( $noCreateMsg = false ) {
391399 $s = Html::openElement( 'fieldset' ) .
392400 Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
393 - $this->getCheckBox(
 401+ $this->getCheckBox(
394402 '_SameAccount', 'config-db-web-account-same',
395403 array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' )
396404 ) .
@@ -408,7 +416,7 @@
409417
410418 /**
411419 * Submit the form from getWebUserBox().
412 - *
 420+ *
413421 * @return Status
414422 */
415423 public function submitWebUserBox() {
Index: trunk/phase3/includes/installer/MysqlInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using MySQL.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -59,14 +59,11 @@
6060
6161 public function getConnectForm() {
6262 return
63 - $this->getTextBox( 'wgDBserver', 'config-db-host' ) .
64 - $this->parent->getHelpBox( 'config-db-host-help' ) .
 63+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
6564 Html::openElement( 'fieldset' ) .
6665 Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
67 - $this->getTextBox( 'wgDBname', 'config-db-name' ) .
68 - $this->parent->getHelpBox( 'config-db-name-help' ) .
69 - $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
70 - $this->parent->getHelpBox( 'config-db-prefix-help' ) .
 66+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
 67+ $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array(), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
7168 Html::closeElement( 'fieldset' ) .
7269 $this->getInstallUserBox();
7370 }
@@ -120,7 +117,7 @@
121118 $this->getVar( '_InstallPassword' ),
122119 false,
123120 false,
124 - 0,
 121+ 0,
125122 $this->getVar( 'wgDBprefix' )
126123 );
127124 $status->value = $this->db;
@@ -252,12 +249,12 @@
253250 if ( count( $parts ) != 2 ) {
254251 return false;
255252 }
256 - $quotedUser = $conn->addQuotes( $parts[0] ) .
 253+ $quotedUser = $conn->addQuotes( $parts[0] ) .
257254 '@' . $conn->addQuotes( $parts[1] );
258255
259256 // The user needs to have INSERT on mysql.* to be able to CREATE USER
260257 // The grantee will be double-quoted in this query, as required
261 - $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*',
 258+ $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*',
262259 array( 'GRANTEE' => $quotedUser ), __METHOD__ );
263260 $insertMysql = false;
264261 $grantOptions = array_flip( $this->webUserPrivs );
@@ -273,7 +270,7 @@
274271 // Check for DB-specific privs for mysql.*
275272 if ( !$insertMysql ) {
276273 $row = $conn->selectRow( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
277 - array(
 274+ array(
278275 'GRANTEE' => $quotedUser,
279276 'TABLE_SCHEMA' => 'mysql',
280277 'PRIVILEGE_TYPE' => 'INSERT',
@@ -288,7 +285,7 @@
289286 }
290287
291288 // Check for DB-level grant options
292 - $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
 289+ $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
293290 array(
294291 'GRANTEE' => $quotedUser,
295292 'IS_GRANTABLE' => 1,
@@ -322,9 +319,9 @@
323320 }
324321 if ( count( $engines ) >= 2 ) {
325322 $s .= $this->getRadioSet( array(
326 - 'var' => '_MysqlEngine',
327 - 'label' => 'config-mysql-engine',
328 - 'itemLabelPrefix' => 'config-mysql-',
 323+ 'var' => '_MysqlEngine',
 324+ 'label' => 'config-mysql-engine',
 325+ 'itemLabelPrefix' => 'config-mysql-',
329326 'values' => $engines
330327 ));
331328 $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
@@ -375,7 +372,7 @@
376373 $this->getVar( 'wgDBpassword' ),
377374 false,
378375 false,
379 - 0,
 376+ 0,
380377 $this->getVar( 'wgDBprefix' )
381378 );
382379 } catch ( DBConnectionError $e ) {
Index: trunk/phase3/includes/installer/OracleInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using Oracle.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -46,8 +46,7 @@
4747 Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
4848 Html::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) .
4949 $this->getTextBox( 'wgDBuser', 'config-db-username' ) .
50 - $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) .
51 - $this->parent->getHelpBox( 'config-db-web-help' ).
 50+ $this->getPasswordBox( 'wgDBpassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-web-help' ) ) .
5251 $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ).
5352 Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
5453 }
@@ -56,14 +55,12 @@
5756 $this->parent->setVar( '_InstallUser', 'sys' );
5857 $this->parent->setVar( 'wgDBserver', '' );
5958 return
60 - $this->getTextBox( 'wgDBserver', 'config-db-host-oracle' ) .
61 - $this->parent->getHelpBox( 'config-db-host-oracle-help' ) .
 59+ $this->getTextBox( 'wgDBserver', 'config-db-host-oracle', array(), $this->parent->getHelpBox( 'config-db-host-oracle-help' ) ) .
6260 Html::openElement( 'fieldset' ) .
6361 Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
6462 $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
6563 $this->getTextBox( '_OracleDefTS', 'config-oracle-def-ts' ) .
66 - $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts' ) .
67 - $this->parent->getHelpBox( 'config-db-oracle-help' ) .
 64+ $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts', array(), $this->parent->getHelpBox( 'config-db-oracle-help' ) ) .
6865 Html::closeElement( 'fieldset' ) .
6966 $this->getInstallUserBox().
7067 $this->getWebUserBox();
Index: trunk/phase3/includes/installer/PostgresInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using Postgres.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -36,23 +36,20 @@
3737
3838 function getConnectForm() {
3939 return
40 - $this->getTextBox( 'wgDBserver', 'config-db-host' ) .
41 - $this->parent->getHelpBox( 'config-db-host-help' ) .
 40+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
4241 $this->getTextBox( 'wgDBport', 'config-db-port' ) .
4342 Html::openElement( 'fieldset' ) .
4443 Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
45 - $this->getTextBox( 'wgDBname', 'config-db-name' ) .
46 - $this->parent->getHelpBox( 'config-db-name-help' ) .
47 - $this->getTextBox( 'wgDBmwschema', 'config-db-schema' ) .
 44+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
 45+ $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
4846 $this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) .
49 - $this->parent->getHelpBox( 'config-db-schema-help' ) .
5047 Html::closeElement( 'fieldset' ) .
5148 $this->getInstallUserBox();
5249 }
5350
5451 function submitConnectForm() {
5552 // Get variables from the request
56 - $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
 53+ $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
5754 'wgDBname', 'wgDBmwschema', 'wgDBts2schema' ) );
5855
5956 // Validate them
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Abstract class to define pages for the web installer.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -16,7 +16,7 @@
1717
1818 /**
1919 * The WebInstaller object this WebInstallerPage belongs to.
20 - *
 20+ *
2121 * @var WebInstaller
2222 */
2323 public $parent;
@@ -25,7 +25,7 @@
2626
2727 /**
2828 * Constructor.
29 - *
 29+ *
3030 * @param $parent WebInstaller
3131 */
3232 public function __construct( WebInstaller $parent ) {
@@ -220,13 +220,15 @@
221221 }
222222 $this->startForm();
223223 $s = Html::hidden( 'LanguageRequestTime', time() ) .
224 - $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang ) .
225 - $this->parent->getHelpBox( 'config-your-language-help' ) .
226 - $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang ) .
227 - $this->parent->getHelpBox( 'config-wiki-language-help' ) .
228 - $this->parent->getCheckBox(
229 - array( 'var' => '_ExternalHTTP', 'label' => 'config-allow-requests' )
230 - ) . $this->parent->getHelpBox( 'config-allow-requests-help' );
 224+ $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang, $this->parent->getHelpBox( 'config-your-language-help' ) ) .
 225+ $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang, $this->parent->getHelpBox( 'config-wiki-language-help' ) ) .
 226+ $this->parent->getCheckBox(
 227+ array(
 228+ 'var' => '_ExternalHTTP',
 229+ 'label' => 'config-allow-requests',
 230+ 'help' => $this->parent->getHelpBox( 'config-allow-requests-help' )
 231+ )
 232+ );
231233
232234 $this->addHTML( $s );
233235 $this->endForm();
@@ -263,7 +265,7 @@
264266 $this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) );
265267 $status = $this->parent->doEnvironmentChecks();
266268 if ( $status ) {
267 - $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
 269+ $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
268270 SpecialVersion::getCopyrightAndAuthorList() ) );
269271 $this->startForm();
270272 $this->endForm();
@@ -295,7 +297,7 @@
296298 $dbSupport = '';
297299 foreach( $this->parent->getDBTypes() as $type ) {
298300 $db = 'Database' . ucfirst( $type );
299 - $dbSupport .= wfMsgNoTrans( "config-support-$type",
 301+ $dbSupport .= wfMsgNoTrans( "config-support-$type",
300302 call_user_func( array( $db, 'getSoftwareLink' ) ) ) . "\n";
301303 }
302304 $this->addHTML( $this->parent->getInfoBox(
@@ -464,21 +466,22 @@
465467 $this->parent->getTextBox( array(
466468 'var' => 'wgSitename',
467469 'label' => 'config-site-name',
 470+ 'help' => $this->parent->getHelpBox( 'config-site-name-help' )
468471 ) ) .
469 - $this->parent->getHelpBox( 'config-site-name-help' ) .
470472 $this->parent->getRadioSet( array(
471473 'var' => '_NamespaceType',
472474 'label' => 'config-project-namespace',
473475 'itemLabelPrefix' => 'config-ns-',
474476 'values' => array( 'site-name', 'generic', 'other' ),
475477 'commonAttribs' => array( 'class' => 'enableForOther', 'rel' => 'config_wgMetaNamespace' ),
 478+ 'help' => $this->parent->getHelpBox( 'config-project-namespace-help' )
476479 ) ) .
477480 $this->parent->getTextBox( array(
478481 'var' => 'wgMetaNamespace',
479482 'label' => '', //TODO: Needs a label?
480483 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ),
 484+
481485 ) ) .
482 - $this->parent->getHelpBox( 'config-project-namespace-help' ) .
483486 $this->getFieldSetStart( 'config-admin-box' ) .
484487 $this->parent->getTextBox( array(
485488 'var' => '_AdminName',
@@ -493,17 +496,16 @@
494497 'var' => '_AdminPassword2',
495498 'label' => 'config-admin-password-confirm'
496499 ) ) .
497 - $this->parent->getHelpBox( 'config-admin-help' ) .
498500 $this->parent->getTextBox( array(
499501 'var' => '_AdminEmail',
500 - 'label' => 'config-admin-email'
 502+ 'label' => 'config-admin-email',
 503+ 'help' => $this->parent->getHelpBox( 'config-admin-email-help' )
501504 ) ) .
502 - $this->parent->getHelpBox( 'config-admin-email-help' ) .
503505 $this->parent->getCheckBox( array(
504506 'var' => '_Subscribe',
505 - 'label' => 'config-subscribe'
 507+ 'label' => 'config-subscribe',
 508+ 'help' => $this->parent->getHelpBox( 'config-subscribe-help' )
506509 ) ) .
507 - $this->parent->getHelpBox( 'config-subscribe-help' ) .
508510 $this->getFieldSetEnd() .
509511 $this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) .
510512 $this->parent->getRadioSet( array(
@@ -585,6 +587,7 @@
586588
587589 // Validate password
588590 $msg = false;
 591+ $valid = false;
589592 $pwd = $this->getVar( '_AdminPassword' );
590593 $user = User::newFromName( $cname );
591594 $valid = $user && $user->getPasswordValidity( $pwd );
@@ -695,31 +698,31 @@
696699 }
697700
698701 $extHtml .= $this->parent->getHelpBox( 'config-extensions-help' ) .
699 - $this->getFieldSetEnd();
 702+ $this->getFieldSetEnd();
700703 $this->addHTML( $extHtml );
701704 }
702705
703706 $this->addHTML(
704707 # Uploading
705708 $this->getFieldSetStart( 'config-upload-settings' ) .
706 - $this->parent->getCheckBox( array(
 709+ $this->parent->getCheckBox( array(
707710 'var' => 'wgEnableUploads',
708711 'label' => 'config-upload-enable',
709712 'attribs' => array( 'class' => 'showHideRadio', 'rel' => 'uploadwrapper' ),
 713+ 'help' => $this->parent->getHelpBox( 'config-upload-help' )
710714 ) ) .
711 - $this->parent->getHelpBox( 'config-upload-help' ) .
712715 '<div id="uploadwrapper" style="display: none;">' .
713 - $this->parent->getTextBox( array(
 716+ $this->parent->getTextBox( array(
714717 'var' => 'wgDeletedDirectory',
715718 'label' => 'config-upload-deleted',
 719+ 'help' => $this->parent->getHelpBox( 'config-upload-deleted-help' )
716720 ) ) .
717 - $this->parent->getHelpBox( 'config-upload-deleted-help' ) .
718721 '</div>' .
719722 $this->parent->getTextBox( array(
720723 'var' => 'wgLogo',
721 - 'label' => 'config-logo'
722 - ) ) .
723 - $this->parent->getHelpBox( 'config-logo-help' )
 724+ 'label' => 'config-logo',
 725+ 'help' => $this->parent->getHelpBox( 'config-logo-help' )
 726+ ) )
724727 );
725728 $canUse = $this->getVar( '_ExternalHTTP' ) ?
726729 'config-instantcommons-good' : 'config-instantcommons-bad';
@@ -727,8 +730,8 @@
728731 $this->parent->getCheckBox( array(
729732 'var' => 'wgUseInstantCommons',
730733 'label' => 'config-instantcommons',
 734+ 'help' => $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) )
731735 ) ) .
732 - $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) ) .
733736 $this->getFieldSetEnd()
734737 );
735738
@@ -754,8 +757,9 @@
755758 $this->parent->getTextBox( array(
756759 'var' => '_MemCachedServers',
757760 'label' => 'config-memcached-servers',
 761+ 'help' => $this->parent->getHelpBox( 'config-memcached-help' )
758762 ) ) .
759 - $this->parent->getHelpBox( 'config-memcached-help' ) . '</div>' .
 763+ '</div>' .
760764 $this->getFieldSetEnd()
761765 );
762766 $this->endForm();

Follow-up revisions

RevisionCommit summaryAuthorDate
r77929* Fix issues brought up in r75832...bharris23:13, 6 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75832* Added tipsy library...bharris21:17, 1 November 2010
r77860Reverted r75832 per my comments on CR, unanswered for 19 days. Moving all hel...tstarling07:08, 6 December 2010

Comments

#Comment by RobLa-WMF (talk | contribs)   20:29, 6 December 2010

Brandon, you still owe Tim a response to the substance of his comment on r75832. I knew that reverting your change the way he did would ruffle your feathers, and it's not how I would have handled it, but I really hope you can avoid escalating this into an edit war.

#Comment by MZMcBride (talk | contribs)   20:30, 6 December 2010

This was discussed heavily in #wikimedia-dev. Brandon was being serious when he said "will be addressed in next commit," which should hopefully be in an hour or two. :-)

#Comment by Jorm (WMF) (talk | contribs)   20:36, 6 December 2010

Yeah; I committed the un-revert before fixing on Roan's advice in order to ease code review problems.

My feathers weren't so much ruffled as confusificated, anyways.

Status & tagging log