function next_function($from, $func = "dbchanges") { global $oldvers, $system_upgrade_detail, $currentscript, $cache; load_module("upgrade" . $from . ".php"); if (function_exists("upgrade" . $from . "_" . $func)) { $function = "upgrade" . $from . "_" . $func; } else { // We're done with our last upgrade script, so add it to the upgrade scripts we've already completed. $version_history = $cache->read("version_history"); $version_history[$from] = $from; $cache->update("version_history", $version_history); $from = $from + 1; if (file_exists(INSTALL_ROOT . "resources/upgrade" . $from . ".php")) { $function = next_function($from); } } if (!$function) { $function = "whatsnext"; } return $function; }
function next_function($from, $func = "dbchanges") { global $oldvers, $system_upgrade_detail, $currentscript; load_module("upgrade" . $from . ".php"); if (function_exists("upgrade" . $from . "_" . $func)) { $function = "upgrade" . $from . "_" . $func; } else { $from = $from + 1; if (file_exists(INSTALL_ROOT . "resources/upgrade" . $from . ".php")) { $function = next_function($from); } } if (!$function) { $function = "whatsnext"; } return $function; }