From 04a63d86bd952b6fd7eb8ad16c8462b540ec9106 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 3 Mar 2008 14:55:54 +0000 Subject: Removed some notices git-svn-id: https://code.elgg.org/elgg/trunk@60 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/configuration.php | 3 +++ engine/lib/elgglib.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index d60b7b8f3..dfbc95279 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -44,6 +44,9 @@ if (empty($CONFIG->sitename)) $CONFIG->sitename = "New Elgg site"; + + if (empty($CONFIG->debug)) + $CONFIG->debug = false; } diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index d98b0fabf..78eb17daf 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -112,7 +112,7 @@ } else { $location = $CONFIG->views->locations[$view]; } - if (!@include($location . "{$viewtype}/{$view}.php")) { + if (file_exists($location . "{$viewtype}/{$view}.php") && !@include($location . "{$viewtype}/{$view}.php")) { $success = false; if ($viewtype != "default") { if (@include($location . "default/{$view}.php")) { @@ -122,6 +122,8 @@ if (!$success && isset($CONFIG->debug) && $CONFIG->debug == true) { echo " [This view ({$view}) does not exist] "; } + } else if ($CONFIG->debug == true) { + echo " [This view ({$view}) does not exist] "; } } -- cgit v1.2.3