function get_queries() { global $data, $db_version, $db_versions; $phpds_db_ver = get_db_version(); $queries = ''; foreach ($db_versions as $fetch_version) { if ($phpds_db_ver < $fetch_version) { $filename = 'PHPDevShell-db' . $fetch_version . '.sql'; notePrint(_('Using SQL file named') . ' "' . $filename . '"'); $fp = fopen($filename, 'r'); $queries .= stream_get_contents($fp); fclose($fp); } } if (!empty($queries)) { $queries = preg_replace('/pds_core_/', $data['db_prefix'] . 'core_', $queries); $query = explode(';', $queries); array_pop($query); } // Update version at the end of the query batch $query[] = 'REPLACE INTO `' . $data['db_prefix'] . "core_plugin_activation` VALUES ('AdminTools', 'install', '" . $db_version . "', '1');"; return $query; }
function displaySuccess() { global $aurl; okPrint("The installation was successful."); notePrint("You might want to erase the /service directory and <a href=\"{$aurl}\">check your new installation.</a>"); }