コード例 #1
0
ファイル: upgrade.php プロジェクト: canneverbe/flyspray
    $todo['postgresql_adodb'] = 'You have a version of ADOdb that does not contain overridden version of method ChangeTableSQL for PostgreSQL. ' . 'Please copy setup/upgrade/1.0/datadict-postgres.inc.php to ' . 'vendor/adodb/adodb-php/datadict/ before proceeding with the upgrade process.';
}
$upgrade_possible = true;
foreach ($checks as $check => $result) {
    if ($result !== true) {
        $upgrade_possible = false;
        $page->assign('todo', $todo[$check]);
        break;
    }
}
if (isset($upgrade_info['options'])) {
    // piece of HTML which adds user input, quick and dirty*/
    $page->assign('upgrade_options', implode('', $upgrade_info['options']));
}
$page->assign('index', APPLICATION_SETUP_INDEX);
$page->uses('checks', 'fs', 'upgrade_possible');
$page->assign('installed_version', $installed_version);
$page->display('upgrade.tpl');
// Functions for checking and fixing possible duplicate entries
// in database for those tables that now have a unique index.
function fix_duplicate_list_entries($doit = true)
{
    global $db, $uplog;
    // Categories need a bit more thinking. A real life example from
    // my own database: A big project originally written (horrible!)
    // in VB6, that I ported to .NET -environment. Categories:
    // BackOfficer (main category)
    // -> Reports (subcategory - should be allowed)
    // BackOfficer.NET (main category)
    // -> Reports (subcategory - should be allowed)
    // -> Reports (I added a fake duplicate - should not be allowed)