Ejemplo n.º 1
0
 if (in_array($dbase->GetDatabaseName(), $successInstall)) {
     // Get the status from sessions and check with the current set prefix
     $currentPrefix = $keywords['connection']['dbprefix'];
     $dbStatus = GetDatabaseInstallStatus($dbase->GetDatabaseName());
     if ($currentPrefix != $dbStatus['prefix']) {
         // Change the prefix value to the one used during installation of SQL queries
         SetSessionPrefix($dbStatus['prefix']);
         $keywords['connection']['dbprefix'] = $dbStatus['prefix'];
         $text = $dbStatus['prefix'] == '' ? '<i>empty</i>' : '<b>' . $dbStatus['prefix'] . '</b>';
         // And then notify the user that the prefix has been changed!
         $page->WarningBox('During the setup of database <b>' . $dbase->GetDatabaseName() . '</b>, the prefix ' . 'was set to <tt><i>' . $dbStatus['prefix'] . '</i></tt> but has been changed ' . 'since then to <tt><i>' . $currentPrefix . '</i></tt><br />&nbsp;<br />' . 'The prefix has been reverted back to ' . $text . ' to prevent incorrect ' . 'installation.');
     }
 }
 // Get the number of tables (and list of table names) from database to
 // know what to warn the user about and perhaps show a list of tables if needed
 $tableList = $dbase->GetTableListFromDatabase();
 if (count($tableList) > 0) {
     $prefix = $keywords['connection']['dbprefix'];
     if (strlen($prefix) == 0 && $steps[STEP_DBPREFIX]['enabled']) {
         // Only show a "no prefix set" warning if there has NOT been a successful
         // database installation on the selected database!!
         if (!in_array($dbase->GetDatabaseName(), $successInstall)) {
             $page->WarningBox('You have not specified a table prefix, and the database <b>' . $dbase->GetDatabaseName() . '</b> ' . 'contains <b>' . count($tableList) . '</b> table(s).<br />&nbsp;<br />' . 'It is highly recommended and there is a much lower risk of table collision if you ' . '<a href="?step=' . STEP_DBPREFIX . '">specify a table prefix</a>.');
         }
     }
     $page->Paragraph('The database <b>' . $dbase->GetDatabaseName() . '</b> contains the following tables:');
     $page->StartTable(3, array('class' => 'tablelist'));
     $page->AddTableData($tableList);
     $page->EndTable();
     // Show a small paragraph notifying the user that he must be certain that
     // he wants to install the tables on a non-empty database. BUT, if the