From a685d4498bc8ec3a3c6985b98c0267491a7973a6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 14 Mar 2018 18:56:28 +0100 Subject: [PATCH] show same tab after installing an extension from a repository --- op/op.ExtensionMgr.php | 9 ++++++--- views/bootstrap/class.ExtensionMgr.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/op/op.ExtensionMgr.php b/op/op.ExtensionMgr.php index 98c81682f..7fcbe569c 100644 --- a/op/op.ExtensionMgr.php +++ b/op/op.ExtensionMgr.php @@ -40,6 +40,9 @@ if(!checkFormKey('extensionmgr')) { if (isset($_POST["action"])) $action=$_POST["action"]; else $action=NULL; +if (isset($_POST["currenttab"])) $currenttab=$_POST["currenttab"]; +else $currenttab=NULL; + // add new attribute definition --------------------------------------------- if ($action == "download") { if (!isset($_POST["extname"])) { @@ -66,7 +69,7 @@ elseif ($action == "refresh") { /* {{{ */ } $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_refresh'))); add_log_line(); - header("Location:../out/out.ExtensionMgr.php"); + header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab); } /* }}} */ elseif ($action == "upload") { /* {{{ */ if(!$extmgr->isWritableExitDir()) { @@ -86,7 +89,7 @@ elseif ($action == "upload") { /* {{{ */ } $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_import'))); add_log_line(); - header("Location:../out/out.ExtensionMgr.php"); + header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab); } /* }}} */ elseif ($action == "import") { /* {{{ */ if(!$_POST['url']) { @@ -108,7 +111,7 @@ elseif ($action == "import") { /* {{{ */ unlink($file); $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_upload'))); add_log_line(); - header("Location:../out/out.ExtensionMgr.php"); + header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab); } /* }}} */ diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php index f63a209f2..c29b8bc76 100644 --- a/views/bootstrap/class.ExtensionMgr.php +++ b/views/bootstrap/class.ExtensionMgr.php @@ -201,7 +201,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style { echo ""; echo "
"; if(!$checkmsgs && $extmgr->isWritableExitDir()) - echo "
".createHiddenFieldWithKey('extensionmgr')."
"; + echo "
".createHiddenFieldWithKey('extensionmgr')."
"; echo "
"; echo ""; echo "";