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/Base4.php | 6 +++--- system/codeigniter/Base5.php | 6 +++--- system/codeigniter/CodeIgniter.php | 8 ++++---- system/codeigniter/Common.php | 12 ++++++------ system/codeigniter/Compat.php | 16 ++++++++-------- 5 files changed, 24 insertions(+), 24 deletions(-) (limited to 'system/codeigniter') diff --git a/system/codeigniter/Base4.php b/system/codeigniter/Base4.php index 178b1b8b7..2644f6eab 100644 --- a/system/codeigniter/Base4.php +++ b/system/codeigniter/Base4.php @@ -1,4 +1,4 @@ -load; } - -/* End of file Base4.php */ + +/* End of file Base4.php */ /* Location: ./system/codeigniter/Base4.php */ \ No newline at end of file diff --git a/system/codeigniter/Base5.php b/system/codeigniter/Base5.php index 8f9416537..51839e1de 100644 --- a/system/codeigniter/Base5.php +++ b/system/codeigniter/Base5.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}"); } diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index 8b80b42b1..b0df52921 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -1,4 +1,4 @@ -