$Form = new Form($_SERVER['PHP_SELF']); $Form->switch_template_parts($booststrap_install_form_params); $Form->begin_form('form-horizontal'); $Form->hidden('action', 'update_config'); $Form->hidden('password', $password); $Form->textarea_input('content', $file_overrides_content, 20, T_('Config'), array('cols' => 50, 'note' => 'A few possible settings:<br /><br /> $minimum_comment_interval = 1;<br /> $debug = 1;<br /> $debug_jslog = 1;<br /> $allow_po_extraction = 1;<br /> $test_install_all_features = true;<br /> $db_config[\'debug_dump_rows\'] = 20;<br /> $db_config[\'debug_explain_joins\'] = false;<br /> $display_errors_on_production = false;')); $Form->end_form(array(array('name' => 'submit', 'value' => T_('Save Changes!'), 'class' => 'btn-primary btn-lg'))); block_close(); break; default: /* * ----------------------------------------------------------------------------------- * Default config * ----------------------------------------------------------------------------------- */ echo T_('To enable this tool, create a file called /conf/_overrides_TEST.php with the following contents:'); echo '<pre><?php $debug_pwd = \'set a password here\'; // @@BEGIN debug.php section // @@END debug.php section ?></pre>'; break; }
/** * Base config recap */ function display_base_config_recap() { global $default_locale, $conf_db_user, $conf_db_password, $conf_db_name, $conf_db_host, $db_config, $tableprefix, $baseurl, $admin_email; static $base_config_recap_already_displayed = false; if ($base_config_recap_already_displayed) { return; } $base_config_recap_already_displayed = true; echo '<br />'; block_open(T_('Base config recap...')); ?> <p><?php printf(T_('If you don\'t see correct settings here, STOP before going any further, and <a %s>update your base configuration</a>.'), 'href="index.php?action=start&locale=' . $default_locale . '"'); ?> </p> <?php if (!isset($conf_db_user)) { $conf_db_user = $db_config['user']; } if (!isset($conf_db_password)) { $conf_db_password = $db_config['password']; } if (!isset($conf_db_name)) { $conf_db_name = $db_config['name']; } if (!isset($conf_db_host)) { $conf_db_host = isset($db_config['host']) ? $db_config['host'] : 'localhost'; } echo '<samp>' . T_('MySQL Username') . ': ' . $conf_db_user . '<br />' . T_('MySQL Password') . ': ' . ($conf_db_password != 'demopass' ? T_('(Set, but not shown for security reasons)') : 'demopass') . '<br />' . T_('MySQL Database name') . ': ' . $conf_db_name . '<br />' . T_('MySQL Host/Server') . ': ' . $conf_db_host . '<br />' . T_('MySQL tables prefix') . ': ' . $tableprefix . '<br /><br />' . T_('Base URL') . ': ' . $baseurl . '<br /><br />' . T_('Admin email') . ': ' . $admin_email . '</samp>'; block_close(); }