function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = true) {
global $UPDATE_NOTES, $INC_POOL, $cacheInstance;
global $EXT_VER_HISTORY, $NOTES, $EXT_ALWAYS_ACTIVE, $EXT_VERSION;
- global $EXT_UPDATE_DEPENDS, $SQLs;
+ global $EXT_UPDATE_DEPENDS;
// This shall never do a non-admin user!
if (!IS_ADMIN()) return false;
// "Dry-run-mode" activated?
if (!$dry_run) {
// Run installation pre-installation filters
- RUN_FILTER('pre_extension_installed', false, array('dry_run' => $dry_run, 'sqls' => $SQLs));
+ RUN_FILTER('pre_extension_installed', array('dry_run' => $dry_run, 'sqls' => $SQLs));
// Register extension
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
// Run SQL queries for given extension id
// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
- global $cacheInstance, $SQLs;
+ global $cacheInstance;
// This shall never do a non-admin user!
if (!IS_ADMIN()) return false;
function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
// This shall never do a non-admin user!
global $cacheInstance, $UPDATE_NOTES, $NOTES, $EXT_VER_HISTORY;
- global $EXT_UPDATE_DEPENDS, $EXT_VERSION, $INC_POOL, $cacheArray;
+ global $EXT_UPDATE_DEPENDS, $EXT_VERSION, $INC_POOL, $cacheArray, $SQLs;
// Init arrays
$SQLs = array(); $INC_POOL = array();
// In "dry-run" mode return array with SQL commands
return $SQLs;
}
- }
+ } // END - if
}
// Output verbose SQL table for extension