From 0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Tue, 13 May 2008 04:22:33 +0000 Subject: Some sweeping syntax changes for consistency: (! foo) changed to ( ! foo) || changed to OR changed newline standardization code in various places from preg_replace to str_replace --- system/codeigniter/CodeIgniter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/codeigniter/CodeIgniter.php') diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php index 5a01eb86c..da20c48a1 100644 --- a/system/codeigniter/CodeIgniter.php +++ b/system/codeigniter/CodeIgniter.php @@ -1,4 +1,4 @@ -fetch_directory().$RTR->fetch_class().EXT)) +if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT)) { show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.'); } @@ -170,7 +170,7 @@ $class = $RTR->fetch_class(); $method = $RTR->fetch_method(); -if (! class_exists($class) +if ( ! class_exists($class) OR $method == 'controller' OR strncmp($method, '_', 1) == 0 OR in_array($method, get_class_methods('Controller'), TRUE) @@ -223,7 +223,7 @@ else { // is_callable() returns TRUE on some versions of PHP 5 for private and protected // methods, so we'll use this workaround for consistent behavior - if (! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI)))) + if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI)))) { show_404("{$class}/{$method}"); } -- cgit v1.2.3-24-g4f1b