install/includes/libenanoinstall.php
changeset 626 be0e904eec17
parent 536 218a627eb53e
child 627 460e483987ab
equal deleted inserted replaced
625:0122f538c242 626:be0e904eec17
    90   echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="../images/checkbad.png" /></td></tr>' . "\n";
    90   echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="../images/checkbad.png" /></td></tr>' . "\n";
    91   flush();
    91   flush();
    92   close_install_table();
    92   close_install_table();
    93   $post_data = '';
    93   $post_data = '';
    94   $mysql_error = mysql_error();
    94   $mysql_error = mysql_error();
       
    95   $file = ( defined('IN_ENANO_UPGRADE') ) ? 'upgrade.php' : 'install.php';
    95   foreach ( $_POST as $key => $value )
    96   foreach ( $_POST as $key => $value )
    96   {
    97   {
    97     // FIXME: These should really also be sanitized for double quotes
    98     // FIXME: These should really also be sanitized for double quotes
    98     $value = htmlspecialchars($value);
    99     $value = htmlspecialchars($value);
    99     $key = htmlspecialchars($key);
   100     $key = htmlspecialchars($key);
   100     $post_data .= "          <input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
   101     $post_data .= "          <input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
   101   }
   102   }
   102   if ( $stage_id == 'renameconfig' )
   103   if ( $stage_id == 'renameconfig' )
   103     echo '<p>' . $failure_explanation . '</p>';
   104     echo '<p>' . $failure_explanation . '</p>';
   104   else
   105   else
   105     echo '<form action="install.php?stage=install&amp;sub=' . $stage_id . '" method="post">
   106     echo '<form action="' . $file . '?stage=install&amp;sub=' . $stage_id . '" method="post">
   106             ' . $post_data . '
   107             ' . $post_data . '
   107             <input type="hidden" name="resume_stack" value="' . htmlspecialchars(implode('|', $resume_stack)) . '" />
   108             <input type="hidden" name="resume_stack" value="' . htmlspecialchars(implode('|', $resume_stack)) . '" />
   108             <h3>' . $lang->get('meta_msg_err_stagefailed_title') . '</h3>
   109             <h3>' . $lang->get('meta_msg_err_stagefailed_title') . '</h3>
   109              <p>' . $failure_explanation . '</p>
   110              <p>' . $failure_explanation . '</p>
   110              ' . ( !empty($mysql_error) ? "<p>" . $lang->get('meta_msg_err_stagefailed_mysqlerror') . " $mysql_error</p>" : '' ) . '
   111              ' . ( !empty($mysql_error) ? "<p>" . $lang->get('meta_msg_err_stagefailed_mysqlerror') . " $mysql_error</p>" : '' ) . '