From 011fdfaf71a08ead4773369503fce357dbf9fa6a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 26 May 2009 00:07:26 +1200 Subject: [PATCH] Tidy up the error handling. --- html/action.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/html/action.php b/html/action.php index 2971ac5..f4483c6 100644 --- a/html/action.php +++ b/html/action.php @@ -14,9 +14,13 @@ require_once('apms_menus.php'); $page_elements = array(); if ( isset($_POST['submit']) ) { - include_once( "action/process/$component.php" ); + if ( ! @include( "action/process/$component.php" ) ) { + $c->messages[] = "action/process/$component not found"; + } +} +if ( ! @require( "action/screen/$component.php" ) ) { + $c->messages[] = "action/screen/$component not found"; } -require_once( "action/screen/$component.php" ); /** * From here we start rendering the page to the user... -- 2.11.4.GIT