[Phpbb-php5mod-cvs-checkins] phpbb-php5/contrib dbinformer.php,1.1,1.2
Brought to you by:
jelly_doughnut
From: geocator <geo...@us...> - 2004-07-30 02:12:46
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13115/contrib Modified Files: dbinformer.php Log Message: Say goodbye long array names. Say hello superglobals. Removed code in common.php to try to rename the variables at runtime. No longer needed since we are renaming them. Index: dbinformer.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/contrib/dbinformer.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dbinformer.php 29 Jul 2004 22:35:59 -0000 1.1 --- dbinformer.php 30 Jul 2004 02:12:38 -0000 1.2 *************** *** 26,47 **** if (!get_magic_quotes_gpc()) { ! if (is_array($HTTP_POST_VARS)) { ! while (list($k, $v) = each($HTTP_POST_VARS)) { ! if (is_array($HTTP_POST_VARS[$k])) { ! while (list($k2, $v2) = each($HTTP_POST_VARS[$k])) { ! $HTTP_POST_VARS[$k][$k2] = addslashes($v2); } ! @reset($HTTP_POST_VARS[$k]); } else { ! $HTTP_POST_VARS[$k] = addslashes($v); } } ! @reset($HTTP_POST_VARS); } } --- 26,47 ---- if (!get_magic_quotes_gpc()) { ! if (is_array($_POST)) { ! while (list($k, $v) = each($_POST)) { ! if (is_array($_POST[$k])) { ! while (list($k2, $v2) = each($_POST[$k])) { ! $_POST[$k][$k2] = addslashes($v2); } ! @reset($_POST[$k]); } else { ! $_POST[$k] = addslashes($v); } } ! @reset($_POST); } } *************** *** 98,104 **** while (list($var, $param) = each($check_var_list)) { ! if (!empty($HTTP_POST_VARS[$param])) { ! $$var = stripslashes(htmlspecialchars(strip_tags($HTTP_POST_VARS[$param]))); } } --- 98,104 ---- while (list($var, $param) = each($check_var_list)) { ! if (!empty($_POST[$param])) { ! $$var = stripslashes(htmlspecialchars(strip_tags($_POST[$param]))); } } *************** *** 113,117 **** ); ! if (isset($HTTP_POST_VARS['download_config']) && $HTTP_POST_VARS['download_config'] == true && isset($HTTP_POST_VARS['submit_download_config']) && $HTTP_POST_VARS['submit_download_config'] == 'Download') { /* borrowed from install.php */ --- 113,117 ---- ); ! if (isset($_POST['download_config']) && $_POST['download_config'] == true && isset($_POST['submit_download_config']) && $_POST['submit_download_config'] == 'Download') { /* borrowed from install.php */ *************** *** 171,175 **** <td class="row1" align="right"><span class="gen">Database type: </span></td> <td class="row2"> ! <form action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post"> <select name="dbms"> <?php --- 171,175 ---- <td class="row1" align="right"><span class="gen">Database type: </span></td> <td class="row2"> ! <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <select name="dbms"> <?php *************** *** 206,210 **** <td class="row1" align="right"><span class="gen">Generate a config file: </span></td> </td> ! <td class="row2"><input type="checkbox" name="generate_config" value="true" <?php $checked = (isset($HTTP_POST_VARS['generate_config']) && $HTTP_POST_VARS['generate_config'] == true) ? 'checked="checked"' : ''; echo $checked; ?> /></td> </tr> <tr> --- 206,210 ---- <td class="row1" align="right"><span class="gen">Generate a config file: </span></td> </td> ! <td class="row2"><input type="checkbox" name="generate_config" value="true" <?php $checked = (isset($_POST['generate_config']) && $_POST['generate_config'] == true) ? 'checked="checked"' : ''; echo $checked; ?> /></td> </tr> <tr> *************** *** 216,220 **** </table> <?php ! if (!isset($HTTP_POST_VARS['submit'])) { echo '<br />Please enter your data.<br />'; --- 216,220 ---- </table> <?php ! if (!isset($_POST['submit'])) { echo '<br />Please enter your data.<br />'; *************** *** 405,409 **** { /* Highlight tables with the table_prefix specified */ ! if (preg_match("/^$HTTP_POST_VARS[table_prefix]/i", $table[0])) { echo '<li><b>' . $table[0] . '</b></li><br />'; --- 405,409 ---- { /* Highlight tables with the table_prefix specified */ ! if (preg_match("/^$_POST[table_prefix]/i", $table[0])) { echo '<li><b>' . $table[0] . '</b></li><br />'; *************** *** 426,430 **** /* Create a config file if checked and if the connection went OK */ ! if (isset($HTTP_POST_VARS['generate_config']) && $HTTP_POST_VARS['generate_config'] == true) { echo '<a name="config"><h3><u>Config file</u></h3></a>'; --- 426,430 ---- /* Create a config file if checked and if the connection went OK */ ! if (isset($_POST['generate_config']) && $_POST['generate_config'] == true) { echo '<a name="config"><h3><u>Config file</u></h3></a>'; *************** *** 438,442 **** /* Create our config file */ ! echo '<form action="' . $HTTP_SERVER_VARS['PHP_SELF'] . '" method="post"><table cellspacing="1" cellpadding="3" border="0"><tr><td class="code">'; echo make_config($dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix); echo '</td></tr></table>'; --- 438,442 ---- /* Create our config file */ ! echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table cellspacing="1" cellpadding="3" border="0"><tr><td class="code">'; echo make_config($dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix); echo '</td></tr></table>'; |