aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/plugins_installed.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/admin/plugins_installed.php b/admin/plugins_installed.php
index 70fd734f5..fd76f69b8 100644
--- a/admin/plugins_installed.php
+++ b/admin/plugins_installed.php
@@ -30,11 +30,13 @@ include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
$template->set_filenames(array('plugins' => 'plugins_list.tpl'));
-// TODO : use a session parameter
-$plugin_order = isset($_GET['plugin_order']) ? $_GET['plugin_order'] : 'state';
-$plugin_display = isset($_GET['plugin_display']) ? $_GET['plugin_display'] : 'compact';
+// order and display mode
+$plugin_order = isset($_GET['plugin_order']) ? $_GET['plugin_order'] : (pwg_get_session_var('plugin_order') != null ? pwg_get_session_var('plugin_order') : 'state');
+$plugin_display = isset($_GET['plugin_display']) ? $_GET['plugin_display'] : (pwg_get_session_var('plugin_display') != null ? pwg_get_session_var('plugin_display') : 'compact');
+pwg_set_session_var('plugin_order', $plugin_order);
+pwg_set_session_var('plugin_display', $plugin_display);
-$base_url = get_root_url().'admin.php?page='.$page['page'].'&plugin_order='.$plugin_order.'&plugin_display='.$plugin_display;
+$base_url = get_root_url().'admin.php?page='.$page['page'];
$pwg_token = get_pwg_token();
$action_url = $base_url.'&plugin='.'%s'.'&pwg_token='.$pwg_token;