From: Daniel Hromada Date: Wed, 26 Jan 2011 21:47:26 +0000 (+0100) Subject: use require_once and not include_once when including other php code (included files... X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=cba4eab7cec303b81e69ea81301222850f36cd03;p=mirrors%2FKyberia-bloodline.git use require_once and not include_once when including other php code (included files can contain invisible characters which make it impossible to use Header redirection) if ever some event returned false value, will call display event in order to show the error message etc. --- diff --git a/wwwroot/inc/eventz.inc b/wwwroot/inc/eventz.inc index 6464345..a5b1d9f 100644 --- a/wwwroot/inc/eventz.inc +++ b/wwwroot/inc/eventz.inc @@ -29,7 +29,7 @@ elseif (is_file(INCLUDE_DIR."eventz/$event.inc")) { || ($event_node['node_permission']=='master') || ($event=='display') ) { - include_once(INCLUDE_DIR."eventz/$event.inc"); + require_once(INCLUDE_DIR."eventz/$event.inc"); $status=$event(); $_SESSION['eventz'][$event]=true; @@ -46,14 +46,18 @@ else { $status=false; } +if (!$status) { + require_once(INCLUDE_DIR."eventz/display.inc"); + display(); +} -if ($status>1) { +elseif ($status>1) { Header("Location: /id/".$status."/"); } elseif ($status) { Header("Location: /id/".$node['node_id']."/"); -} +} ?>