Skip to content

Commit

Permalink
Install: print disclaimer when generating SQL
Browse files Browse the repository at this point in the history
Display a warning to inform the admin that the database may not be
installed properly when created/updated via the generated SQL script.

Fixes #26663
  • Loading branch information
dregad committed Feb 17, 2020
1 parent ad05c04 commit 1198e83
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions admin/install.php
Expand Up @@ -873,6 +873,16 @@ function print_test( $p_test_description, $p_result, $p_hard_fail = true, $p_mes
if( $f_log_queries ) {
echo '<tr><td><span class="bigger-120">Database Creation Suppressed, SQL Queries follow</span>';

echo '<div class="space-6"></div>';
echo '<div class="alert alert-warning">';
echo "Please note that executing the generated script below <strong>may not result in a fully functional "
. "database</strong>, particularly in upgrade scenarios. This is due to the fact that some upgrade "
. "steps require the execution of PHP code; these <em>Upgrade Functions</em> are defined in "
. '<a href="https://github.com/mantisbt/mantisbt/blob/master/core/install_helper_functions_api.php">install_helper_functions_api.php</a>'
. " and cannot be translated to SQL statements. Use at your own risk.";
echo '</div>';

echo '<pre>';
echo "-- MantisBT " . MANTIS_VERSION . " Database creation script". PHP_EOL;
echo "-- " . date("c") . PHP_EOL . PHP_EOL;
}
Expand Down

0 comments on commit 1198e83

Please sign in to comment.