From c66972f2cb89e65a8bbf8e39d42e8e479f7eb8dc Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 4 Nov 2009 11:01:15 +0100 Subject: Emit less E_NOTICEs and E_STRICTs Changes of behaviour are: * Allow the user name, title & description \e2\80\9c0\e2\80\9d * Default to Port 443 if using HTTPS * Set $INFO['isadmin'] and $INFO['ismanager'] to \e2\80\9cfalse\e2\80\9d even if no user is logged in * Do not pass empty fragment field in the event data for event ACTION_SHOW_REDIRECT * Handle chunked encoding in HTTPClient darcs-hash:20091104100115-e4919-5cf6397d4a457e3f98a8ca49fbdab03f2147721d.gz --- inc/actions.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 4ade9aab2..27292e6f6 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -387,23 +387,22 @@ function act_redirect($id,$preact){ session_write_close(); } - //get section name when coming from section edit - if($PRE && preg_match('/^\s*==+([^=\n]+)/',$TEXT,$match)){ - $check = false; - $title = sectionID($match[0],$check); - } - $opts = array( 'id' => $id, - 'fragment' => $title, 'preact' => $preact ); + //get section name when coming from section edit + if($PRE && preg_match('/^\s*==+([^=\n]+)/',$TEXT,$match)){ + $check = false; //Byref + $opts['fragment'] = sectionID($match[0], $check); + } + trigger_event('ACTION_SHOW_REDIRECT',$opts,'act_redirect_execute'); } function act_redirect_execute($opts){ $go = wl($opts['id'],'',true); - if($opts['fragment']) $go .= '#'.$opts['fragment']; + if(isset($opts['fragment'])) $go .= '#'.$opts['fragment']; //show it send_redirect($go); @@ -419,7 +418,7 @@ function act_auth($act){ global $INFO; //already logged in? - if($_SERVER['REMOTE_USER'] && $act=='login'){ + if(isset($_SERVER['REMOTE_USER']) && $act=='login'){ return 'show'; } -- cgit v1.2.3