$progress_bar->setValue(Misc::calculatePercent($x, $total_days)); $progress_bar->display(); $x++; } //$aplf->FailTransaction(); $aplf->CommitTransaction(); } } $progress_bar->setValue(100); $progress_bar->display(); } } break; default: //Test InitProgressBar(10); for ($i = 0; $i < 11; $i++) { $progress_bar->display(); $progress_bar->incValue(); if ($i % 2 == 0) { sleep(1); } } break; } ?> </div> <?php sleep(2); if (Debug::getVerbosity() <= 10) { if (isset($next_page) and $next_page != '') {
$install_obj->setIsUpgrade(TRUE); //$upgrade = TRUE; } else { $install_obj->setIsUpgrade(FALSE); //$upgrade = FALSE; } } $action = Misc::findSubmitButton(); switch ($action) { case 'install_schema': //Need to create the tables after the database //exists and Database.inc.php has made a connection. //Otherwise we can't use objects yet. //Debug::setVerbosity(11); Debug::Text('Install Schema', __FILE__, __LINE__, __METHOD__, 10); InitProgressBar(); $progress_bar->setValue(1); $progress_bar->display(); if ($install_obj->checkDatabaseExists($config_vars['database']['database_name']) == TRUE) { //Create SQL, always try to install every schema version, as //installSchema() will check if its already been installed or not. $install_obj->setDatabaseDriver($config_vars['database']['type']); $install_obj->createSchemaRange(NULL, NULL); //All schema versions //FIXME: Notify the user of any errors. $install_obj->setVersions(); } else { Debug::Text('bDatabase does not exist.', __FILE__, __LINE__, __METHOD__, 10); } $progress_bar->setValue(100); $progress_bar->display();