aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-05-08 15:39:16 +0000
committermistic100 <mistic@piwigo.org>2011-05-08 15:39:16 +0000
commitdf6125d190b4a6a257094985235475cb9a292a3e (patch)
treeef5c842967f51e49a34123cc15599e5ea8364075
parenta31d9e2a5ddeb65d7295c108474151ed390b3e8a (diff)
plugin manager : store display preferences into a session parameter
git-svn-id: http://piwigo.org/svn/trunk@10817 68402e56-0260-453c-a942-63ccdbb3a9ee
-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'].'&amp;plugin_order='.$plugin_order.'&amp;plugin_display='.$plugin_display;
+$base_url = get_root_url().'admin.php?page='.$page['page'];
$pwg_token = get_pwg_token();
$action_url = $base_url.'&amp;plugin='.'%s'.'&amp;pwg_token='.$pwg_token;