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
diff --git a/system/libraries/URI.php b/system/libraries/URI.php
index 26a7b4a..4d0cd9c 100644
--- a/system/libraries/URI.php
+++ b/system/libraries/URI.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
*
@@ -134,7 +134,7 @@
*/
function _parse_request_uri()
{
- if (! isset($_SERVER['REQUEST_URI']) OR $_SERVER['REQUEST_URI'] == '')
+ if ( ! isset($_SERVER['REQUEST_URI']) OR $_SERVER['REQUEST_URI'] == '')
{
return '';
}
@@ -186,7 +186,7 @@
{
if ($str != '' AND $this->config->item('permitted_uri_chars') != '')
{
- if (! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
+ if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
{
exit('The URI you submitted has disallowed characters.');
}
@@ -279,7 +279,7 @@
*/
function segment($n, $no_result = FALSE)
{
- return (! isset($this->segments[$n])) ? $no_result : $this->segments[$n];
+ return ( ! isset($this->segments[$n])) ? $no_result : $this->segments[$n];
}
// --------------------------------------------------------------------
@@ -298,7 +298,7 @@
*/
function rsegment($n, $no_result = FALSE)
{
- return (! isset($this->rsegments[$n])) ? $no_result : $this->rsegments[$n];
+ return ( ! isset($this->rsegments[$n])) ? $no_result : $this->rsegments[$n];
}
// --------------------------------------------------------------------
@@ -361,7 +361,7 @@
$segment_array = 'rsegment_array';
}
- if (! is_numeric($n))
+ if ( ! is_numeric($n))
{
return $default;
}
@@ -410,7 +410,7 @@
{
foreach ($default as $val)
{
- if (! array_key_exists($val, $retval))
+ if ( ! array_key_exists($val, $retval))
{
$retval[$val] = FALSE;
}
@@ -586,6 +586,6 @@
}
// END URI Class
-
-/* End of file URI.php */
+
+/* End of file URI.php */
/* Location: ./system/libraries/URI.php */
\ No newline at end of file