From b625808123f9b91b9803f98f818d5745bd7692cc Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 13 Jun 2010 11:40:31 +0200 Subject: [PATCH] msgs are saved in send_redirect now, less code duplication needed --- inc/actions.php | 10 ---------- lib/plugins/plugin/classes/ap_manage.class.php | 13 ++----------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/inc/actions.php b/inc/actions.php index 4b5bfdb1a..b447b65e1 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -387,16 +387,6 @@ function act_revert($act){ function act_redirect($id,$preact){ global $PRE; global $TEXT; - global $MSG; - - //are there any undisplayed messages? keep them in session for display - //on the next page - if(isset($MSG) && count($MSG)){ - //reopen session, store data and close session again - @session_start(); - $_SESSION[DOKU_COOKIE]['msg'] = $MSG; - session_write_close(); - } $opts = array( 'id' => $id, diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php index 297764ebb..eb5348672 100644 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ b/lib/plugins/plugin/classes/ap_manage.class.php @@ -113,23 +113,14 @@ class ap_manage { * Refresh plugin list */ function refresh() { - global $MSG,$config_cascade; - - //are there any undisplayed messages? keep them in session for display - if (isset($MSG) && count($MSG)){ - //reopen session, store data and close session again - @session_start(); - $_SESSION[DOKU_COOKIE]['msg'] = $MSG; - session_write_close(); - } + global $config_cascade; // expire dokuwiki caches // touching local.php expires wiki page, JS and CSS caches @touch(reset($config_cascade['main']['local'])); // update latest plugin date - FIXME - header('Location: '.wl($ID).'?do=admin&page=plugin'); - exit(); + send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true)); } /** -- GitLab