Changeset 5571 for trunk/install.php


Ignore:
Timestamp:
Apr 2, 2010, 3:05:53 PM (14 years ago)
Author:
plg
Message:

Improve the install confirmation page: dedicated button to download the
database.inc.php file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/install.php

    r5452 r5571  
    336336      @fclose($fh);
    337337
    338       $error_copy = l10n('Creation of config file local/config/database.inc.php failed.');
    339       $error_copy .= sprintf('<br><a href="install.php?dl=%s">%s</a> %s',
    340                              $tmp_filename,
    341                              l10n('You can download the config file'),
    342                              l10n('and upload it to local/config directory of your installation.')
     338      $template->assign(
     339        array(
     340          'config_creation_failed' => true,
     341          'config_url' => 'install.php?dl='.$tmp_filename,
     342          'config_file_content' => $file_content,
     343          )
    343344        );
    344 
    345       $error_copy .= '<br><br>';
    346       $error_copy .= l10n('An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)');
    347       $error_copy .= '<br><br>';
    348       $error_copy .= '<textarea rows="15" cols="70">' . $file_content . '</textarea>';
    349345    }
    350346    @fputs($fp, $file_content, strlen($file_content));
     
    444440    $html_content = htmlentities( $file_content, ENT_QUOTES );
    445441    $html_content = nl2br( $html_content );
    446     $error_copy = l10n('Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)');
    447     $error_copy .= '<br>--------------------------------------------------------------------<br>';
    448     $error_copy .= '<span class="sql_content">' . $html_content . '</span>';
    449     $error_copy .= '<br>--------------------------------------------------------------------<br>';
     442   
     443    $error_copy = l10n('An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)');
     444    $error_copy .= '<br><br>';
     445    $error_copy .= '<textarea rows="15" cols="70">'.$html_content.'</textarea>';
    450446  }
    451447  else
     
    463459      'T_CONTENT_ENCODING' => 'utf-8',
    464460      'migration' => true
    465           ));
     461      )
     462    );
    466463}
    467464else
Note: See TracChangeset for help on using the changeset viewer.