Exemple #1
0
            echo _T("Installation Report");
        }
        if ($step == 'u7') {
            echo _T("Update Report");
        }
        ?>
</p>
    <ul>
    <?php 
        $table_prefix = $_POST['install_dbprefix'];
        if ($step == 'u7') {
            //before doing anything else, we'll have to convert data to UTF-8
            //required since 0.7dev (if we're upgrading, 'f course)
            $_to_ver = substr($_POST['install_type'], 8);
            if ((double) $_to_ver <= 0.7) {
                $zdb->convertToUTF($table_prefix);
            }
        }
        // begin : copyright (2002) the phpbb group (support@phpbb.com)
        // load in the sql parser
        include '../includes/sql_parse.php';
        if ($step == 'u7') {
            $update_scripts = Galette\Core\Db::getUpdateScripts('.', $_POST['install_dbtype'], substr($_POST['install_type'], 8));
        } else {
            $update_scripts['current'] = $_POST['install_dbtype'] . '.sql';
        }
        $sql_query = '';
        while (list($key, $val) = each($update_scripts)) {
            $sql_query .= @fread(@fopen('sql/' . $val, 'r'), @filesize('sql/' . $val)) . "\n";
        }
        $sql_query = preg_replace('/galette_/', $table_prefix, $sql_query);