コード例 #1
0
ファイル: install.php プロジェクト: horrabin/opendb
            return 'INCOMPLETE';
        } else {
            //if($upgrade_step <= $upgraderPlugin->getNoOfSteps())
            return TRUE;
        }
    } else {
        return FALSE;
    }
}
if (strlen($HTTP_VARS['step']) == 0) {
    echo _theme_header("OpenDb " . get_opendb_version() . " Installation", FALSE);
    $next_step = 'pre-install';
    if (is_db_connected()) {
        // make sure there are actually pre-install changes that are required.
        if (is_valid_opendb_release_table() && (!is_opendb_partially_installed() || count_opendb_table_rows('s_opendb_release') > 0)) {
            $db_version = fetch_opendb_release_version();
            $current_version = get_opendb_version();
            if (opendb_version_compare($db_version, '1.5.4', '>=')) {
                $next_step = 'upgrade';
            } else {
                $next_step = NULL;
                echo "<h3>Upgrade not supported!</h3>\n\t\t\t\t<p>Upgrading from {$db_version} is not supported.  You will need to install 1.5.0.4 first\n\t\t\t\t\tand upgrade from {$db_version} to 1.5.0.4 before installing {$current_version}.</p>\n\t\t\t  \t<p>Please download <a href=\"https://github.com/pellcorp/opendb/archive/RELEASE_1_5_0_4.zip\">Release 1.5.0.4</a></p>";
            }
        }
    } else {
        $errors = db_error();
        if (strlen($errors) > 0) {
            echo "<p class=\"error\">" . $errors . "</p>";
        }
    }
    if ($next_step != NULL) {
コード例 #2
0
ファイル: install.php プロジェクト: horrabin/opendb
/**
* Return TRUE if up to date, otherwise FALSE
* 
* Assumes database exists
*/
function check_opendb_version()
{
    $opendb_release_version = fetch_opendb_release_version();
    if ($opendb_release_version !== FALSE) {
        // the $opendb_release_version is unlikely to be larger than get_opendb_version(),
        // so this could be simplified to a '=', but leave as is.
        if (opendb_version_compare($opendb_release_version, get_opendb_version(), '>=')) {
            return TRUE;
        }
    }
    //else
    return FALSE;
}