X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-extensions.php;h=b761a95fff528e21504e2cf30f9dfe134021032e;hp=4bb2f5481bf97eeb62d291267514f366a7e2e60a;hb=3e077cc4c838b433c321a21ced20f02f023f3b80;hpb=52e8a0635bd0b7c653845685c55e4e5f251375fe diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 4bb2f5481b..b761a95fff 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -282,7 +282,7 @@ case "overview": // List all registered extensions case "register": // Register new extension $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND task_type='EXTENSION' LIMIT 1", - array(bigintval(GET_ADMIN_ID($_SESSION['admin_login']))), __FILE__, __LINE__); + array(bigintval(GET_ADMIN_ID(get_session('admin_login')))), __FILE__, __LINE__); $task_found = SQL_NUMROWS($result); // Free result @@ -304,7 +304,13 @@ case "register": // Register new extension // ... so we can finally register and load it in registration mode $status = EXTENSION_REGISTER($ext_name, $id); - if ($status) { + if ($status == true) { + // Is this sql_patches? Then we need to auto-logout! + if ($ext_name == "sql_patches") { + // Auto-logout here + LOAD_URL("modules.php?module=admin&logout=1&sql_patches=1"); + } + // Extension was found and successfully registered LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_EXTENSION_REGISTERED);