diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-05-13 06:22:33 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-05-13 06:22:33 +0200 |
commit | 0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch) | |
tree | 1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd /system/codeigniter | |
parent | 5cf664748ee295867f593d7eb7991bd35fe8eca6 (diff) |
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
Diffstat (limited to 'system/codeigniter')
-rw-r--r-- | system/codeigniter/Base4.php | 6 | ||||
-rw-r--r-- | system/codeigniter/Base5.php | 6 | ||||
-rw-r--r-- | system/codeigniter/CodeIgniter.php | 8 | ||||
-rw-r--r-- | system/codeigniter/Common.php | 12 | ||||
-rw-r--r-- | system/codeigniter/Compat.php | 16 |
5 files changed, 24 insertions, 24 deletions
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 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -64,6 +64,6 @@ function &get_instance() return $OBJ->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 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -51,6 +51,6 @@ function &get_instance() }
- -/* End of file Base5.php */ +
+/* End of file Base5.php */
/* Location: ./system/codeigniter/Base5.php */
\ No newline at end of file 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 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -146,7 +146,7 @@ load_class('Controller', FALSE); // Load the local application controller
// Note: The Router class automatically validates the controller path. If this include fails it
// means that the default controller in the Routes.php file is not resolving to something valid.
-if (! file_exists(APPPATH.'controllers/'.$RTR->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 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -140,16 +140,16 @@ function &get_config() {
static $main_conf;
- if (! isset($main_conf))
+ if ( ! isset($main_conf))
{
- if (! file_exists(APPPATH.'config/config'.EXT))
+ if ( ! file_exists(APPPATH.'config/config'.EXT))
{
exit('The configuration file config'.EXT.' does not exist.');
}
require(APPPATH.'config/config'.EXT);
- if (! isset($config) OR ! is_array($config))
+ if ( ! isset($config) OR ! is_array($config))
{
exit('Your config file does not appear to be formatted correctly.');
}
@@ -169,11 +169,11 @@ function config_item($item) {
static $config_item = array();
- if (! isset($config_item[$item]))
+ if ( ! isset($config_item[$item]))
{
$config =& get_config();
- if (! isset($config[$item]))
+ if ( ! isset($config[$item]))
{
return FALSE;
}
diff --git a/system/codeigniter/Compat.php b/system/codeigniter/Compat.php index 1f01ca812..6478f086e 100644 --- a/system/codeigniter/Compat.php +++ b/system/codeigniter/Compat.php @@ -1,4 +1,4 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -36,7 +36,7 @@ * will generate errors when running under PHP 4
*
*/
-if (! defined('E_STRICT'))
+if ( ! defined('E_STRICT'))
{
define('E_STRICT', 2048);
}
@@ -51,11 +51,11 @@ if (! defined('E_STRICT')) * @param string
* @return bool
*/
-if (! function_exists('ctype_digit'))
+if ( ! function_exists('ctype_digit'))
{
function ctype_digit($str)
{
- if (! is_string($str) OR $str == '')
+ if ( ! is_string($str) OR $str == '')
{
return FALSE;
}
@@ -76,11 +76,11 @@ if (! function_exists('ctype_digit')) * @param string
* @return bool
*/
-if (! function_exists('ctype_alnum'))
+if ( ! function_exists('ctype_alnum'))
{
function ctype_alnum($str)
{
- if (! is_string($str) OR $str == '')
+ if ( ! is_string($str) OR $str == '')
{
return FALSE;
}
@@ -91,6 +91,6 @@ if (! function_exists('ctype_alnum')) // --------------------------------------------------------------------
- -/* End of file Compat.php */ +
+/* End of file Compat.php */
/* Location: ./system/codeigniter/Compat.php */
\ No newline at end of file |