summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
commit0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch)
tree1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd
parent5cf664748ee295867f593d7eb7991bd35fe8eca6 (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
-rw-r--r--system/application/config/autoload.php6
-rw-r--r--system/application/config/config.php6
-rw-r--r--system/application/config/constants.php6
-rw-r--r--system/application/config/database.php6
-rw-r--r--system/application/config/hooks.php2
-rw-r--r--system/application/config/mimes.php6
-rw-r--r--system/application/config/routes.php6
-rw-r--r--system/application/config/smileys.php2
-rw-r--r--system/application/config/user_agents.php6
-rw-r--r--system/application/controllers/welcome.php2
-rw-r--r--system/application/views/welcome_message.php6
-rw-r--r--system/codeigniter/Base4.php6
-rw-r--r--system/codeigniter/Base5.php6
-rw-r--r--system/codeigniter/CodeIgniter.php8
-rw-r--r--system/codeigniter/Common.php12
-rw-r--r--system/codeigniter/Compat.php16
-rw-r--r--system/database/DB.php18
-rw-r--r--system/database/DB_active_rec.php58
-rw-r--r--system/database/DB_cache.php12
-rw-r--r--system/database/DB_driver.php8
-rw-r--r--system/database/DB_forge.php6
-rw-r--r--system/database/DB_result.php12
-rw-r--r--system/database/DB_utility.php16
-rw-r--r--system/database/drivers/mssql/mssql_driver.php20
-rw-r--r--system/database/drivers/mssql/mssql_forge.php6
-rw-r--r--system/database/drivers/mssql/mssql_result.php6
-rw-r--r--system/database/drivers/mssql/mssql_utility.php6
-rw-r--r--system/database/drivers/mysql/mysql_driver.php20
-rw-r--r--system/database/drivers/mysql/mysql_forge.php6
-rw-r--r--system/database/drivers/mysql/mysql_result.php6
-rw-r--r--system/database/drivers/mysql/mysql_utility.php6
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php20
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php6
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php6
-rw-r--r--system/database/drivers/mysqli/mysqli_utility.php6
-rw-r--r--system/database/drivers/oci8/oci8_driver.php26
-rw-r--r--system/database/drivers/oci8/oci8_forge.php6
-rw-r--r--system/database/drivers/oci8/oci8_result.php6
-rw-r--r--system/database/drivers/oci8/oci8_utility.php6
-rw-r--r--system/database/drivers/odbc/odbc_driver.php20
-rw-r--r--system/database/drivers/odbc/odbc_forge.php6
-rw-r--r--system/database/drivers/odbc/odbc_result.php6
-rw-r--r--system/database/drivers/odbc/odbc_utility.php6
-rw-r--r--system/database/drivers/postgre/postgre_driver.php20
-rw-r--r--system/database/drivers/postgre/postgre_forge.php6
-rw-r--r--system/database/drivers/postgre/postgre_result.php6
-rw-r--r--system/database/drivers/postgre/postgre_utility.php6
-rw-r--r--system/database/drivers/sqlite/sqlite_driver.php24
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php8
-rw-r--r--system/database/drivers/sqlite/sqlite_result.php6
-rw-r--r--system/database/drivers/sqlite/sqlite_utility.php8
-rw-r--r--system/helpers/array_helper.php14
-rw-r--r--system/helpers/compatibility_helper.php38
-rw-r--r--system/helpers/cookie_helper.php14
-rw-r--r--system/helpers/date_helper.php42
-rw-r--r--system/helpers/directory_helper.php4
-rw-r--r--system/helpers/download_helper.php10
-rw-r--r--system/helpers/email_helper.php12
-rw-r--r--system/helpers/file_helper.php38
-rw-r--r--system/helpers/form_helper.php70
-rw-r--r--system/helpers/html_helper.php30
-rw-r--r--system/helpers/inflector_helper.php16
-rw-r--r--system/helpers/path_helper.php10
-rw-r--r--system/helpers/security_helper.php18
-rw-r--r--system/helpers/smiley_helper.php22
-rw-r--r--system/helpers/string_helper.php24
-rw-r--r--system/helpers/text_helper.php33
-rw-r--r--system/helpers/typography_helper.php39
-rw-r--r--system/helpers/url_helper.php40
-rw-r--r--system/helpers/xml_helper.php8
-rw-r--r--system/libraries/Benchmark.php6
-rw-r--r--system/libraries/Calendar.php10
-rw-r--r--system/libraries/Config.php14
-rw-r--r--system/libraries/Controller.php8
-rw-r--r--system/libraries/Email.php84
-rw-r--r--system/libraries/Encrypt.php12
-rw-r--r--system/libraries/Exceptions.php12
-rw-r--r--system/libraries/Ftp.php40
-rw-r--r--system/libraries/Hooks.php20
-rw-r--r--system/libraries/Image_lib.php60
-rw-r--r--system/libraries/Input.php36
-rw-r--r--system/libraries/Language.php8
-rw-r--r--system/libraries/Loader.php40
-rw-r--r--system/libraries/Log.php16
-rw-r--r--system/libraries/Model.php8
-rw-r--r--system/libraries/Output.php24
-rw-r--r--system/libraries/Pagination.php8
-rw-r--r--system/libraries/Parser.php10
-rw-r--r--system/libraries/Profiler.php12
-rw-r--r--system/libraries/Router.php14
-rw-r--r--system/libraries/Session.php14
-rw-r--r--system/libraries/Sha1.php6
-rw-r--r--system/libraries/Table.php24
-rw-r--r--system/libraries/Trackback.php36
-rw-r--r--system/libraries/URI.php18
-rw-r--r--system/libraries/Unit_test.php10
-rw-r--r--system/libraries/Upload.php50
-rw-r--r--system/libraries/User_agent.php14
-rw-r--r--system/libraries/Validation.php50
-rw-r--r--system/libraries/Xmlrpc.php40
-rw-r--r--system/libraries/Xmlrpcs.php26
-rw-r--r--system/libraries/Zip.php14
-rw-r--r--system/plugins/captcha_pi.php18
-rw-r--r--system/plugins/js_calendar_pi.php18
-rw-r--r--system/scaffolding/Scaffolding.php20
-rw-r--r--user_guide/general/creating_libraries.html4
-rw-r--r--user_guide/helpers/file_helper.html2
-rw-r--r--user_guide/libraries/email.html2
-rw-r--r--user_guide/libraries/encryption.html2
-rw-r--r--user_guide/libraries/file_uploading.html2
-rw-r--r--user_guide/libraries/image_lib.html6
-rw-r--r--user_guide/libraries/input.html4
-rw-r--r--user_guide/libraries/trackback.html4
-rw-r--r--user_guide/libraries/xmlrpc.html4
114 files changed, 930 insertions, 894 deletions
diff --git a/system/application/config/autoload.php b/system/application/config/autoload.php
index e3e76d560..b99ffe484 100644
--- a/system/application/config/autoload.php
+++ b/system/application/config/autoload.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');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
@@ -122,6 +122,6 @@ $autoload['model'] = array();
// $autoload['core'] = array();
-
-/* End of file autoload.php */
+
+/* End of file autoload.php */
/* Location: ./system/application/config/autoload.php */ \ No newline at end of file
diff --git a/system/application/config/config.php b/system/application/config/config.php
index c93127366..814362326 100644
--- a/system/application/config/config.php
+++ b/system/application/config/config.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');
/*
|--------------------------------------------------------------------------
@@ -311,6 +311,6 @@ $config['time_reference'] = 'local';
$config['rewrite_short_tags'] = FALSE;
-
-/* End of file config.php */
+
+/* End of file config.php */
/* Location: ./system/application/config/config.php */ \ No newline at end of file
diff --git a/system/application/config/constants.php b/system/application/config/constants.php
index 020baa2d1..55dc6b777 100644
--- a/system/application/config/constants.php
+++ b/system/application/config/constants.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');
/*
|--------------------------------------------------------------------------
@@ -36,6 +36,6 @@ define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
-
-/* End of file constants.php */
+
+/* End of file constants.php */
/* Location: ./system/application/config/constants.php */ \ No newline at end of file
diff --git a/system/application/config/database.php b/system/application/config/database.php
index e8eebef97..24789f4b7 100644
--- a/system/application/config/database.php
+++ b/system/application/config/database.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');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
@@ -50,6 +50,6 @@ $db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
-
-/* End of file database.php */
+
+/* End of file database.php */
/* Location: ./system/application/config/database.php */ \ No newline at end of file
diff --git a/system/application/config/hooks.php b/system/application/config/hooks.php
index b13ce6cbd..5e98a9b46 100644
--- a/system/application/config/hooks.php
+++ b/system/application/config/hooks.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');
/*
| -------------------------------------------------------------------------
| Hooks
diff --git a/system/application/config/mimes.php b/system/application/config/mimes.php
index f3bfe8713..f73858acc 100644
--- a/system/application/config/mimes.php
+++ b/system/application/config/mimes.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');
/*
| -------------------------------------------------------------------
| MIME TYPES
@@ -99,6 +99,6 @@ $mimes = array( 'hqx' => 'application/mac-binhex40',
);
-
-/* End of file mimes.php */
+
+/* End of file mimes.php */
/* Location: ./system/application/config/mimes.php */ \ No newline at end of file
diff --git a/system/application/config/routes.php b/system/application/config/routes.php
index 5cd3cca70..a05361e28 100644
--- a/system/application/config/routes.php
+++ b/system/application/config/routes.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');
/*
| -------------------------------------------------------------------------
| URI ROUTING
@@ -43,6 +43,6 @@
$route['default_controller'] = "welcome";
$route['scaffolding_trigger'] = "";
-
-/* End of file routes.php */
+
+/* End of file routes.php */
/* Location: ./system/application/config/routes.php */ \ No newline at end of file
diff --git a/system/application/config/smileys.php b/system/application/config/smileys.php
index 5968f3733..9f38d2ca6 100644
--- a/system/application/config/smileys.php
+++ b/system/application/config/smileys.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');
/*
| -------------------------------------------------------------------
| SMILEYS
diff --git a/system/application/config/user_agents.php b/system/application/config/user_agents.php
index 4a59ab6bc..27a9d0c76 100644
--- a/system/application/config/user_agents.php
+++ b/system/application/config/user_agents.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');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
@@ -100,6 +100,6 @@ $robots = array(
);
-
-/* End of file user_agents.php */
+
+/* End of file user_agents.php */
/* Location: ./system/application/config/user_agents.php */ \ No newline at end of file
diff --git a/system/application/controllers/welcome.php b/system/application/controllers/welcome.php
index 20d48855e..9ab91d039 100644
--- a/system/application/controllers/welcome.php
+++ b/system/application/controllers/welcome.php
@@ -10,6 +10,8 @@ class Welcome extends Controller {
function index()
{
$this->load->view('welcome_message');
+ $this->load->view('fake');
+
}
}
diff --git a/system/application/views/welcome_message.php b/system/application/views/welcome_message.php
index 8313059e4..40997b6b2 100644
--- a/system/application/views/welcome_message.php
+++ b/system/application/views/welcome_message.php
@@ -59,4 +59,8 @@ code {
<p><br />Page rendered in {elapsed_time} seconds</p>
</body>
-</html> \ No newline at end of file
+</html>
+<?php
+
+echo 'grandma';
+
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
diff --git a/system/database/DB.php b/system/database/DB.php
index d603805a5..2446645a7 100644
--- a/system/database/DB.php
+++ b/system/database/DB.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
*
@@ -29,7 +29,7 @@ function &DB($params = '', $active_record_override = FALSE)
{
include(APPPATH.'config/database'.EXT);
- if (! isset($db) OR count($db) == 0)
+ if ( ! isset($db) OR count($db) == 0)
{
show_error('No database connection settings were found in the database config file.');
}
@@ -39,7 +39,7 @@ function &DB($params = '', $active_record_override = FALSE)
$active_group = $params;
}
- if (! isset($active_group) OR ! isset($db[$active_group]))
+ if ( ! isset($active_group) OR ! isset($db[$active_group]))
{
show_error('You have specified an invalid database connection group.');
}
@@ -71,7 +71,7 @@ function &DB($params = '', $active_record_override = FALSE)
}
// No DB specified yet? Beat them senseless...
- if (! isset($params['dbdriver']) OR $params['dbdriver'] == '')
+ if ( ! isset($params['dbdriver']) OR $params['dbdriver'] == '')
{
show_error('You have not selected a database type to connect to.');
}
@@ -88,18 +88,18 @@ function &DB($params = '', $active_record_override = FALSE)
require_once(BASEPATH.'database/DB_driver'.EXT);
- if (! isset($active_record) OR $active_record == TRUE)
+ if ( ! isset($active_record) OR $active_record == TRUE)
{
require_once(BASEPATH.'database/DB_active_rec'.EXT);
- if (! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB'))
{
eval('class CI_DB extends CI_DB_active_record { }');
}
}
else
{
- if (! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB'))
{
eval('class CI_DB extends CI_DB_driver { }');
}
@@ -120,6 +120,6 @@ function &DB($params = '', $active_record_override = FALSE)
}
-
-/* End of file DB.php */
+
+/* End of file DB.php */
/* Location: ./system/database/DB.php */ \ No newline at end of file
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index b53158577..3cb39822c 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.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
*
@@ -147,7 +147,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function select_max($select = '', $alias='')
{
- if (!is_string($select) || $select == '')
+ if ( ! is_string($select) OR $select == '')
{
$this->display_error('db_invalid_query');
}
@@ -179,7 +179,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function select_min($select = '', $alias='')
{
- if (!is_string($select) || $select == '')
+ if ( ! is_string($select) OR $select == '')
{
$this->display_error('db_invalid_query');
}
@@ -211,7 +211,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function select_avg($select = '', $alias='')
{
- if (!is_string($select) || $select == '')
+ if ( ! is_string($select) OR $select == '')
{
$this->display_error('db_invalid_query');
}
@@ -243,7 +243,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function select_sum($select = '', $alias='')
{
- if (!is_string($select) || $select == '')
+ if ( ! is_string($select) OR $select == '')
{
$this->display_error('db_invalid_query');
}
@@ -322,7 +322,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
$type = strtoupper(trim($type));
- if (! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
+ if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
{
$type = '';
}
@@ -418,7 +418,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function _where($key, $value = NULL, $type = 'AND ', $escape = TRUE)
{
- if (! is_array($key))
+ if ( ! is_array($key))
{
$key = array($key => $value);
}
@@ -427,13 +427,13 @@ class CI_DB_active_record extends CI_DB_driver {
{
$prefix = (count($this->ar_where) == 0) ? '' : $type;
- if (! $this->_has_operator($k) && is_null($key[$k]))
+ if ( ! $this->_has_operator($k) && is_null($key[$k]))
{
// value appears not to have been set, assign the test to IS NULL
$k .= ' IS NULL';
}
- if (! is_null($v))
+ if ( ! is_null($v))
{
if ($escape === TRUE)
@@ -449,7 +449,7 @@ class CI_DB_active_record extends CI_DB_driver {
}
}
- if (! $this->_has_operator($k))
+ if ( ! $this->_has_operator($k))
{
$k .= ' =';
}
@@ -570,7 +570,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ')
{
- if ($key === NULL || !is_array($values))
+ if ($key === NULL OR ! is_array($values))
{
return;
}
@@ -696,7 +696,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '')
{
- if (! is_array($field))
+ if ( ! is_array($field))
{
$field = array($field => $match);
}
@@ -838,7 +838,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function _having($key, $value = '', $type = 'AND ', $escape = TRUE)
{
- if (! is_array($key))
+ if ( ! is_array($key))
{
$key = array($key => $value);
}
@@ -978,7 +978,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
$key = $this->_object_to_array($key);
- if (! is_array($key))
+ if ( ! is_array($key))
{
$key = array($key => $value);
}
@@ -1028,7 +1028,7 @@ class CI_DB_active_record extends CI_DB_driver {
$this->from($table);
}
- if (! is_null($limit))
+ if ( ! is_null($limit))
{
$this->limit($limit, $offset);
}
@@ -1093,12 +1093,12 @@ class CI_DB_active_record extends CI_DB_driver {
$this->from($table);
}
- if (! is_null($where))
+ if ( ! is_null($where))
{
$this->where($where);
}
- if (! is_null($limit))
+ if ( ! is_null($limit))
{
$this->limit($limit, $offset);
}
@@ -1136,7 +1136,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function insert($table = '', $set = NULL)
{
- if (! is_null($set))
+ if ( ! is_null($set))
{
$this->set($set);
}
@@ -1152,7 +1152,7 @@ class CI_DB_active_record extends CI_DB_driver {
if ($table == '')
{
- if (! isset($this->ar_from[0]))
+ if ( ! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1185,7 +1185,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function update($table = '', $set = NULL, $where = NULL, $limit = NULL)
{
- if (! is_null($set))
+ if ( ! is_null($set))
{
$this->set($set);
}
@@ -1201,7 +1201,7 @@ class CI_DB_active_record extends CI_DB_driver {
if ($table == '')
{
- if (! isset($this->ar_from[0]))
+ if ( ! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1244,7 +1244,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
if ($table == '')
{
- if (! isset($this->ar_from[0]))
+ if ( ! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1285,7 +1285,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
if ($table == '')
{
- if (! isset($this->ar_from[0]))
+ if ( ! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1327,7 +1327,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
if ($table == '')
{
- if (! isset($this->ar_from[0]))
+ if ( ! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1407,7 +1407,7 @@ class CI_DB_active_record extends CI_DB_driver {
function _has_operator($str)
{
$str = trim($str);
- if (! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str))
+ if ( ! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str))
{
return FALSE;
}
@@ -1480,7 +1480,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
$this->_merge_cache();
- $sql = (! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT ';
+ $sql = ( ! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT ';
$sql .= (count($this->ar_select) == 0) ? '*' : implode(', ', $this->_filter_table_aliases($this->ar_select));
@@ -1583,7 +1583,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
function _object_to_array($object)
{
- if (! is_object($object))
+ if ( ! is_object($object))
{
return $object;
}
@@ -1592,7 +1592,7 @@ class CI_DB_active_record extends CI_DB_driver {
foreach (get_object_vars($object) as $key => $val)
{
// There are some built in keys we need to ignore for this conversion
- if (! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table')
+ if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table')
{
$array[$key] = $val;
@@ -1696,7 +1696,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
foreach ($ar_reset_items as $item => $default_value)
{
- if (!in_array($item, $this->ar_store_array))
+ if ( ! in_array($item, $this->ar_store_array))
{
$this->$item = $default_value;
}
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index 448727fd0..977327a8d 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.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
*
@@ -66,7 +66,7 @@ class CI_DB_Cache {
// Add a trailing slash to the path if needed
$path = preg_replace("/(.+?)\/*$/", "\\1/", $path);
- if (! is_dir($path) OR ! is_really_writable($path))
+ if ( ! is_dir($path) OR ! is_really_writable($path))
{
// If the path is wrong we'll turn off caching
return $this->db->cache_off();
@@ -89,7 +89,7 @@ class CI_DB_Cache {
*/
function read($sql)
{
- if (! $this->check_path())
+ if ( ! $this->check_path())
{
return $this->db->cache_off();
}
@@ -117,7 +117,7 @@ class CI_DB_Cache {
*/
function write($sql, $object)
{
- if (! $this->check_path())
+ if ( ! $this->check_path())
{
return $this->db->cache_off();
}
@@ -129,9 +129,9 @@ class CI_DB_Cache {
$filename = md5($sql);
- if (! @is_dir($dir_path))
+ if ( ! @is_dir($dir_path))
{
- if (! @mkdir($dir_path, DIR_WRITE_MODE))
+ if ( ! @mkdir($dir_path, DIR_WRITE_MODE))
{
return FALSE;
}
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 9ad235ded..306f09d7d 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.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
*
@@ -147,7 +147,7 @@ class CI_DB_driver {
// In the event the DB was created we need to select it
if ($this->db_select())
{
- if (! $this->db_set_charset($this->char_set, $this->dbcollat))
+ if ( ! $this->db_set_charset($this->char_set, $this->dbcollat))
{
log_message('error', 'Unable to set database connection charset: '.$this->char_set);
@@ -173,7 +173,7 @@ class CI_DB_driver {
return FALSE;
}
- if (! $this->db_set_charset($this->char_set, $this->dbcollat))
+ if ( ! $this->db_set_charset($this->char_set, $this->dbcollat))
{
log_message('error', 'Unable to set database connection charset: '.$this->char_set);
@@ -1163,7 +1163,7 @@ class CI_DB_driver {
}
else
{
- $message = (! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error;
+ $message = ( ! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error;
}
$error =& load_class('Exceptions');
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index d7259c08c..d3ef326b6 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.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');
/**
* Code Igniter
*
@@ -341,6 +341,6 @@ class CI_DB_forge {
}
}
-
-/* End of file DB_forge.php */
+
+/* End of file DB_forge.php */
/* Location: ./system/database/DB_forge.php */ \ No newline at end of file
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index b98d7a97b..d8d0d0d97 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.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
*
@@ -125,10 +125,10 @@ class CI_DB_result {
*/
function row($n = 0, $type = 'object')
{
- if (! is_numeric($n))
+ if ( ! is_numeric($n))
{
// We cache the row data for subsequent uses
- if (! is_array($this->row_data))
+ if ( ! is_array($this->row_data))
{
$this->row_data = $this->row_array(0);
}
@@ -156,7 +156,7 @@ class CI_DB_result {
function set_row($key, $value = NULL)
{
// We cache the row data for subsequent uses
- if (! is_array($this->row_data))
+ if ( ! is_array($this->row_data))
{
$this->row_data = $this->row_array(0);
}
@@ -338,6 +338,6 @@ class CI_DB_result {
}
// END DB_result class
-
-/* End of file DB_result.php */
+
+/* End of file DB_result.php */
/* Location: ./system/database/DB_result.php */ \ No newline at end of file
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 5d4c2de45..d273df158 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.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');
/**
* Code Igniter
*
@@ -175,7 +175,7 @@ class CI_DB_utility extends CI_DB_forge {
*/
function csv_from_result($query, $delim = ",", $newline = "\n", $enclosure = '"')
{
- if (! is_object($query) OR ! method_exists($query, 'field_names'))
+ if ( ! is_object($query) OR ! method_exists($query, 'field_names'))
{
show_error('You must submit a valid result object');
}
@@ -217,7 +217,7 @@ class CI_DB_utility extends CI_DB_forge {
*/
function xml_from_result($query, $params = array())
{
- if (! is_object($query) OR ! method_exists($query, 'field_names'))
+ if ( ! is_object($query) OR ! method_exists($query, 'field_names'))
{
show_error('You must submit a valid result object');
}
@@ -225,7 +225,7 @@ class CI_DB_utility extends CI_DB_forge {
// Set our default values
foreach (array('root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t") as $key => $val)
{
- if (! isset($params[$key]))
+ if ( ! isset($params[$key]))
{
$params[$key] = $val;
}
@@ -310,7 +310,7 @@ class CI_DB_utility extends CI_DB_forge {
// ------------------------------------------------------
// Validate the format
- if (! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE))
+ if ( ! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE))
{
$prefs['format'] = 'txt';
}
@@ -367,7 +367,7 @@ class CI_DB_utility extends CI_DB_forge {
}
// Tack on the ".sql" file extension if needed
- if (! preg_match("|.+?\.sql$|", $prefs['filename']))
+ if ( ! preg_match("|.+?\.sql$|", $prefs['filename']))
{
$prefs['filename'] .= '.sql';
}
@@ -384,6 +384,6 @@ class CI_DB_utility extends CI_DB_forge {
}
-
-/* End of file DB_utility.php */
+
+/* End of file DB_utility.php */
/* Location: ./system/database/DB_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index f789634f8..34ad9799e 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.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
*
@@ -132,7 +132,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -162,7 +162,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -187,7 +187,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -492,7 +492,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -540,7 +540,7 @@ class CI_DB_mssql_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -587,7 +587,7 @@ class CI_DB_mssql_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -599,7 +599,7 @@ class CI_DB_mssql_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -641,6 +641,6 @@ class CI_DB_mssql_driver extends CI_DB {
}
-
-/* End of file mssql_driver.php */
+
+/* End of file mssql_driver.php */
/* Location: ./system/database/drivers/mssql/mssql_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index d42fd5ee6..ddd1bb6ae 100644
--- a/system/database/drivers/mssql/mssql_forge.php
+++ b/system/database/drivers/mssql/mssql_forge.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
*
@@ -235,6 +235,6 @@ class CI_DB_mssql_forge extends CI_DB_forge {
}
}
-
-/* End of file mssql_forge.php */
+
+/* End of file mssql_forge.php */
/* Location: ./system/database/drivers/mssql/mssql_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php
index fded4cf37..7532d2053 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.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
*
@@ -170,6 +170,6 @@ class CI_DB_mssql_result extends CI_DB_result {
}
-
-/* End of file mssql_result.php */
+
+/* End of file mssql_result.php */
/* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index 75a8fb4cd..c62146bf6 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.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
*
@@ -118,6 +118,6 @@ class CI_DB_mssql_utility extends CI_DB_utility {
}
-
-/* End of file mssql_utility.php */
+
+/* End of file mssql_utility.php */
/* Location: ./system/database/drivers/mssql/mssql_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 397af02f5..8df6c1b70 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.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
*
@@ -161,7 +161,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -192,7 +192,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -218,7 +218,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -495,7 +495,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -543,7 +543,7 @@ class CI_DB_mysql_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -589,7 +589,7 @@ class CI_DB_mysql_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -601,7 +601,7 @@ class CI_DB_mysql_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -649,6 +649,6 @@ class CI_DB_mysql_driver extends CI_DB {
}
-
-/* End of file mysql_driver.php */
+
+/* End of file mysql_driver.php */
/* Location: ./system/database/drivers/mysql/mysql_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index 6701c42d5..a631e4301 100644
--- a/system/database/drivers/mysql/mysql_forge.php
+++ b/system/database/drivers/mysql/mysql_forge.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
*
@@ -238,6 +238,6 @@ class CI_DB_mysql_forge extends CI_DB_forge {
}
}
-
-/* End of file mysql_forge.php */
+
+/* End of file mysql_forge.php */
/* Location: ./system/database/drivers/mysql/mysql_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php
index 01b57e1e7..4d9dd82bd 100644
--- a/system/database/drivers/mysql/mysql_result.php
+++ b/system/database/drivers/mysql/mysql_result.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
*
@@ -170,6 +170,6 @@ class CI_DB_mysql_result extends CI_DB_result {
}
-
-/* End of file mysql_result.php */
+
+/* End of file mysql_result.php */
/* Location: ./system/database/drivers/mysql/mysql_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php
index 0804f291c..6bae52791 100644
--- a/system/database/drivers/mysql/mysql_utility.php
+++ b/system/database/drivers/mysql/mysql_utility.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
*
@@ -249,6 +249,6 @@ class CI_DB_mysql_utility extends CI_DB_utility {
}
}
-
-/* End of file mysql_utility.php */
+
+/* End of file mysql_utility.php */
/* Location: ./system/database/drivers/mysql/mysql_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index c993e3368..4e840e749 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.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
*
@@ -164,7 +164,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -195,7 +195,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -221,7 +221,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -491,7 +491,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -539,7 +539,7 @@ class CI_DB_mysqli_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -586,7 +586,7 @@ class CI_DB_mysqli_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -598,7 +598,7 @@ class CI_DB_mysqli_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -645,6 +645,6 @@ class CI_DB_mysqli_driver extends CI_DB {
}
-
-/* End of file mysqli_driver.php */
+
+/* End of file mysqli_driver.php */
/* Location: ./system/database/drivers/mysqli/mysqli_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 087f9b80b..f767acbea 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.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
*
@@ -238,6 +238,6 @@ class CI_DB_mysqli_forge extends CI_DB_forge {
}
}
-
-/* End of file mysqli_forge.php */
+
+/* End of file mysqli_forge.php */
/* Location: ./system/database/drivers/mysqli/mysqli_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index 6b42d35e9..4b8115d8e 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.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
*
@@ -170,6 +170,6 @@ class CI_DB_mysqli_result extends CI_DB_result {
}
-
-/* End of file mysqli_result.php */
+
+/* End of file mysqli_result.php */
/* Location: ./system/database/drivers/mysqli/mysqli_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php
index 24b05b7af..235ee4b67 100644
--- a/system/database/drivers/mysqli/mysqli_utility.php
+++ b/system/database/drivers/mysqli/mysqli_utility.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
*
@@ -118,6 +118,6 @@ class CI_DB_mysqli_utility extends CI_DB_utility {
}
}
-
-/* End of file mysqli_utility.php */
+
+/* End of file mysqli_utility.php */
/* Location: ./system/database/drivers/mysqli/mysqli_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index 367095990..2bc45258d 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.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
*
@@ -155,7 +155,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function _set_stmt_id($sql)
{
- if (! is_resource($this->stmt_id))
+ if ( ! is_resource($this->stmt_id))
{
$this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
}
@@ -254,7 +254,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function _bind_params($params)
{
- if (! is_array($params) OR ! is_resource($this->stmt_id))
+ if ( ! is_array($params) OR ! is_resource($this->stmt_id))
{
return;
}
@@ -263,7 +263,7 @@ class CI_DB_oci8_driver extends CI_DB {
{
foreach (array('name', 'value', 'type', 'length') as $val)
{
- if (! isset($param[$val]))
+ if ( ! isset($param[$val]))
{
$param[$val] = '';
}
@@ -283,7 +283,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -313,7 +313,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -339,7 +339,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -603,7 +603,7 @@ class CI_DB_oci8_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -651,7 +651,7 @@ class CI_DB_oci8_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -697,7 +697,7 @@ class CI_DB_oci8_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -709,7 +709,7 @@ class CI_DB_oci8_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -761,6 +761,6 @@ class CI_DB_oci8_driver extends CI_DB {
}
-
-/* End of file oci8_driver.php */
+
+/* End of file oci8_driver.php */
/* Location: ./system/database/drivers/oci8/oci8_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php
index 64dd2a202..9f3fac54f 100644
--- a/system/database/drivers/oci8/oci8_forge.php
+++ b/system/database/drivers/oci8/oci8_forge.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
*
@@ -232,6 +232,6 @@ class CI_DB_oci8_forge extends CI_DB_forge {
}
-
-/* End of file oci8_forge.php */
+
+/* End of file oci8_forge.php */
/* Location: ./system/database/drivers/oci8/oci8_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index 416c57de0..73373c882 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.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
*
@@ -248,6 +248,6 @@ class CI_DB_oci8_result extends CI_DB_result {
}
-
-/* End of file oci8_result.php */
+
+/* End of file oci8_result.php */
/* Location: ./system/database/drivers/oci8/oci8_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php
index 93eaa226f..69d07f437 100644
--- a/system/database/drivers/oci8/oci8_utility.php
+++ b/system/database/drivers/oci8/oci8_utility.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
*
@@ -117,6 +117,6 @@ class CI_DB_oci8_utility extends CI_DB_utility {
}
}
-
-/* End of file oci8_utility.php */
+
+/* End of file oci8_utility.php */
/* Location: ./system/database/drivers/oci8/oci8_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 4511592bb..48a143271 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.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
*
@@ -152,7 +152,7 @@ class CI_DB_odbc_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -181,7 +181,7 @@ class CI_DB_odbc_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -207,7 +207,7 @@ class CI_DB_odbc_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -464,7 +464,7 @@ class CI_DB_odbc_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -512,7 +512,7 @@ class CI_DB_odbc_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -559,7 +559,7 @@ class CI_DB_odbc_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -571,7 +571,7 @@ class CI_DB_odbc_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -613,6 +613,6 @@ class CI_DB_odbc_driver extends CI_DB {
}
-
-/* End of file odbc_driver.php */
+
+/* End of file odbc_driver.php */
/* Location: ./system/database/drivers/odbc/odbc_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php
index fb011f298..60df616c3 100644
--- a/system/database/drivers/odbc/odbc_forge.php
+++ b/system/database/drivers/odbc/odbc_forge.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
*
@@ -253,6 +253,6 @@ class CI_DB_odbc_forge extends CI_DB_forge {
}
-
-/* End of file odbc_forge.php */
+
+/* End of file odbc_forge.php */
/* Location: ./system/database/drivers/odbc/odbc_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index 4acfb056e..809887a43 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.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
*
@@ -229,6 +229,6 @@ class CI_DB_odbc_result extends CI_DB_result {
}
-
-/* End of file odbc_result.php */
+
+/* End of file odbc_result.php */
/* Location: ./system/database/drivers/odbc/odbc_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php
index ac8b5d808..5d9010506 100644
--- a/system/database/drivers/odbc/odbc_utility.php
+++ b/system/database/drivers/odbc/odbc_utility.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
*
@@ -143,6 +143,6 @@ class CI_DB_odbc_utility extends CI_DB_utility {
return FALSE;
}
}
-
-/* End of file odbc_utility.php */
+
+/* End of file odbc_utility.php */
/* Location: ./system/database/drivers/odbc/odbc_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 4fd92f0c0..9a260a5ac 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.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
*
@@ -150,7 +150,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -179,7 +179,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -203,7 +203,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -488,7 +488,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -536,7 +536,7 @@ class CI_DB_postgre_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -583,7 +583,7 @@ class CI_DB_postgre_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -595,7 +595,7 @@ class CI_DB_postgre_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -641,6 +641,6 @@ class CI_DB_postgre_driver extends CI_DB {
}
-
-/* End of file postgre_driver.php */
+
+/* End of file postgre_driver.php */
/* Location: ./system/database/drivers/postgre/postgre_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index fb4fcf128..f8dfca8a1 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.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
*
@@ -235,6 +235,6 @@ class CI_DB_postgre_forge extends CI_DB_forge {
}
-
-/* End of file postgre_forge.php */
+
+/* End of file postgre_forge.php */
/* Location: ./system/database/drivers/postgre/postgre_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php
index 25360b3f3..1613da9b8 100644
--- a/system/database/drivers/postgre/postgre_result.php
+++ b/system/database/drivers/postgre/postgre_result.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
*
@@ -170,6 +170,6 @@ class CI_DB_postgre_result extends CI_DB_result {
}
-
-/* End of file postgre_result.php */
+
+/* End of file postgre_result.php */
/* Location: ./system/database/drivers/postgre/postgre_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php
index 17df599b6..261050b2d 100644
--- a/system/database/drivers/postgre/postgre_utility.php
+++ b/system/database/drivers/postgre/postgre_utility.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
*
@@ -119,6 +119,6 @@ class CI_DB_postgre_utility extends CI_DB_utility {
}
-
-/* End of file postgre_utility.php */
+
+/* End of file postgre_utility.php */
/* Location: ./system/database/drivers/postgre/postgre_utility.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php
index cb53ad91a..b323e4154 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.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
*
@@ -48,7 +48,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function db_connect()
{
- if (! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
+ if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
{
log_message('error', $error);
@@ -73,7 +73,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function db_pconnect()
{
- if (! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
+ if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
{
log_message('error', $error);
@@ -171,7 +171,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -201,7 +201,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -226,7 +226,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -482,7 +482,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -530,7 +530,7 @@ class CI_DB_sqlite_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -577,7 +577,7 @@ class CI_DB_sqlite_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -589,7 +589,7 @@ class CI_DB_sqlite_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -656,6 +656,6 @@ class CI_DB_sqlite_driver extends CI_DB {
}
-
-/* End of file sqlite_driver.php */
+
+/* End of file sqlite_driver.php */
/* Location: ./system/database/drivers/sqlite/sqlite_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php
index 8a1a4da01..25c74a731 100644
--- a/system/database/drivers/sqlite/sqlite_forge.php
+++ b/system/database/drivers/sqlite/sqlite_forge.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
*
@@ -49,7 +49,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
*/
function _drop_database($name)
{
- if (! @file_exists($this->db->database) OR ! @unlink($this->db->database))
+ if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
{
if ($this->db->db_debug)
{
@@ -231,6 +231,6 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
}
}
-
-/* End of file sqlite_forge.php */
+
+/* End of file sqlite_forge.php */
/* Location: ./system/database/drivers/sqlite/sqlite_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php
index 72c93fd48..8bb0d9d0b 100644
--- a/system/database/drivers/sqlite/sqlite_result.php
+++ b/system/database/drivers/sqlite/sqlite_result.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
*
@@ -180,6 +180,6 @@ class CI_DB_sqlite_result extends CI_DB_result {
}
-
-/* End of file sqlite_result.php */
+
+/* End of file sqlite_result.php */
/* Location: ./system/database/drivers/sqlite/sqlite_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php
index c85e36575..fff24a715 100644
--- a/system/database/drivers/sqlite/sqlite_utility.php
+++ b/system/database/drivers/sqlite/sqlite_utility.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
*
@@ -124,7 +124,7 @@ class CI_DB_sqlite_utility extends CI_DB_utility {
*/
function _drop_database($name)
{
- if (! @file_exists($this->db->database) OR ! @unlink($this->db->database))
+ if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
{
if ($this->db->db_debug)
{
@@ -136,6 +136,6 @@ class CI_DB_sqlite_utility extends CI_DB_utility {
}
}
-
-/* End of file sqlite_utility.php */
+
+/* End of file sqlite_utility.php */
/* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ \ No newline at end of file
diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php
index 837e41f14..faa90373c 100644
--- a/system/helpers/array_helper.php
+++ b/system/helpers/array_helper.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
*
@@ -39,11 +39,11 @@
* @param mixed
* @return mixed depends on what the array contains
*/
-if (! function_exists('element'))
+if ( ! function_exists('element'))
{
function element($item, $array, $default = FALSE)
{
- if (! isset($array[$item]) OR $array[$item] == "")
+ if ( ! isset($array[$item]) OR $array[$item] == "")
{
return $default;
}
@@ -61,11 +61,11 @@ if (! function_exists('element'))
* @param array
* @return mixed depends on what the array contains
*/
-if (! function_exists('random_element'))
+if ( ! function_exists('random_element'))
{
function random_element($array)
{
- if (! is_array($array))
+ if ( ! is_array($array))
{
return $array;
}
@@ -73,6 +73,6 @@ if (! function_exists('random_element'))
}
}
-
-/* End of file array_helper.php */
+
+/* End of file array_helper.php */
/* Location: ./system/helpers/array_helper.php */ \ No newline at end of file
diff --git a/system/helpers/compatibility_helper.php b/system/helpers/compatibility_helper.php
index 076f677fa..077ac674e 100644
--- a/system/helpers/compatibility_helper.php
+++ b/system/helpers/compatibility_helper.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
*
@@ -35,7 +35,7 @@
// ------------------------------------------------------------------------
-if (! defined('PHP_EOL'))
+if ( ! defined('PHP_EOL'))
{
define('PHP_EOL', (DIRECTORY_SEPARATOR == '/') ? "\n" : "\r\n");
}
@@ -55,7 +55,7 @@ if (! defined('PHP_EOL'))
* @param int flags
* @return int length of written string
*/
-if (! function_exists('file_put_contents'))
+if ( ! function_exists('file_put_contents'))
{
function file_put_contents($filename, $data, $flags = NULL)
{
@@ -64,7 +64,7 @@ if (! function_exists('file_put_contents'))
settype($data, 'STRING');
}
- if (! is_string($data) && ! is_array($data) && ! is_resource($data))
+ if ( ! is_string($data) && ! is_array($data) && ! is_resource($data))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'file_put_contents(): the 2nd parameter should be either a string or an array', $backtrace[0]['file'], $backtrace[0]['line']);
@@ -83,7 +83,7 @@ if (! function_exists('file_put_contents'))
$text = '';
- while (! feof($data))
+ while ( ! feof($data))
{
$text .= fread($data, 4096);
}
@@ -129,7 +129,7 @@ if (! function_exists('file_put_contents'))
if (($flags & LOCK_EX) > 0)
{
- if (! flock($fp, LOCK_EX))
+ if ( ! flock($fp, LOCK_EX))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'file_put_contents('.htmlentities($filename).') unable to acquire an exclusive lock on file', $backtrace[0]['file'], $backtrace[0]['line']);
@@ -167,12 +167,12 @@ if (! function_exists('file_put_contents'))
* @param string enclosure
* @return int length of written string
*/
-if (! function_exists('fputcsv'))
+if ( ! function_exists('fputcsv'))
{
function fputcsv($handle, $fields, $delimiter = ',', $enclosure = '"')
{
// Checking for a handle resource
- if (! is_resource($handle))
+ if ( ! is_resource($handle))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'fputcsv() expects parameter 1 to be stream resource, '.gettype($handle).' given', $backtrace[0]['file'], $backtrace[0]['line']);
@@ -188,7 +188,7 @@ if (! function_exists('fputcsv'))
}
// Checking for an array of fields
- if (! is_array($fields))
+ if ( ! is_array($fields))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'fputcsv() expects parameter 2 to be array, '.gettype($fields).' given', $backtrace[0]['file'], $backtrace[0]['line']);
@@ -218,7 +218,7 @@ if (! function_exists('fputcsv'))
{
$cell = str_replace($enclosure, $enclosure.$enclosure, $cell);
- if (strpos($cell, $delimiter) !== FALSE || strpos($cell, $enclosure) !== FALSE || strpos($cell, "\n") !== FALSE)
+ if (strpos($cell, $delimiter) !== FALSE OR strpos($cell, $enclosure) !== FALSE OR strpos($cell, "\n") !== FALSE)
{
$out .= $enclosure.$cell.$enclosure.$delimiter;
}
@@ -248,7 +248,7 @@ if (! function_exists('fputcsv'))
* @param int offset
* @return int numeric position of the first occurrence of needle in the haystack
*/
-if (! function_exists('stripos'))
+if ( ! function_exists('stripos'))
{
function stripos($haystack, $needle, $offset = NULL)
{
@@ -258,14 +258,14 @@ if (! function_exists('stripos'))
settype($haystack, 'STRING');
}
- if (! is_string($haystack))
+ if ( ! is_string($haystack))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'stripos() expects parameter 1 to be string, '.gettype($haystack).' given', $backtrace[0]['file'], $backtrace[0]['line']);
return FALSE;
}
- if (! is_scalar($needle))
+ if ( ! is_scalar($needle))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'stripos() needle is not a string or an integer in '.$backtrace[0]['file'], $backtrace[0]['line']);
@@ -277,7 +277,7 @@ if (! function_exists('stripos'))
$offset = (int)$offset;
}
- if (! is_int($offset) && ! is_bool($offset) && ! is_null($offset))
+ if ( ! is_int($offset) && ! is_bool($offset) && ! is_null($offset))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'stripos() expects parameter 3 to be long, '.gettype($offset).' given', $backtrace[0]['file'], $backtrace[0]['line']);
@@ -304,12 +304,12 @@ if (! function_exists('stripos'))
* @param mixed subject
* @return int numeric position of the first occurrence of needle in the haystack
*/
-if (! function_exists('str_ireplace'))
+if ( ! function_exists('str_ireplace'))
{
function str_ireplace($search, $replace, $subject)
{
// Nothing to do here
- if ($search === NULL || $subject === NULL)
+ if ($search === NULL OR $subject === NULL)
{
return $subject;
}
@@ -376,7 +376,7 @@ if (! function_exists('str_ireplace'))
$result = preg_replace($search, $replace, (array)$subject);
// Check if subject was initially a string and return it as a string
- if (! is_array($subject))
+ if ( ! is_array($subject))
{
return current($result);
}
@@ -400,12 +400,12 @@ if (! function_exists('str_ireplace'))
* @param string argument separator
* @return string URL-encoded string
*/
-if (! function_exists('http_build_query'))
+if ( ! function_exists('http_build_query'))
{
function http_build_query($formdata, $numeric_prefix = NULL, $separator = NULL)
{
// Check the data
- if (! is_array($formdata) && ! is_object($formdata))
+ if ( ! is_array($formdata) && ! is_object($formdata))
{
$backtrace = debug_backtrace();
_exception_handler(E_USER_WARNING, 'http_build_query() Parameter 1 expected to be Array or Object. Incorrect value given', $backtrace[0]['file'], $backtrace[0]['line']);
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index 7b8989e3b..821622649 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.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
*
@@ -42,7 +42,7 @@
* @param string the cookie prefix
* @return void
*/
-if (! function_exists('set_cookie'))
+if ( ! function_exists('set_cookie'))
{
function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '')
{
@@ -73,7 +73,7 @@ if (! function_exists('set_cookie'))
$path = $CI->config->item('cookie_path');
}
- if (! is_numeric($expire))
+ if ( ! is_numeric($expire))
{
$expire = time() - 86500;
}
@@ -103,7 +103,7 @@ if (! function_exists('set_cookie'))
* @param bool
* @return mixed
*/
-if (! function_exists('get_cookie'))
+if ( ! function_exists('get_cookie'))
{
function get_cookie($index = '', $xss_clean = FALSE)
{
@@ -123,7 +123,7 @@ if (! function_exists('get_cookie'))
* @param string the cookie prefix
* @return void
*/
-if (! function_exists('delete_cookie'))
+if ( ! function_exists('delete_cookie'))
{
function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '')
{
@@ -131,6 +131,6 @@ if (! function_exists('delete_cookie'))
}
}
-
-/* End of file cookie_helper.php */
+
+/* End of file cookie_helper.php */
/* Location: ./system/helpers/cookie_helper.php */ \ No newline at end of file
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index c4f0e9a40..095e460a9 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.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
*
@@ -35,7 +35,7 @@
* @access public
* @return integer
*/
-if (! function_exists('now'))
+if ( ! function_exists('now'))
{
function now()
{
@@ -80,7 +80,7 @@ if (! function_exists('now'))
* @param integer
* @return integer
*/
-if (! function_exists('mdate'))
+if ( ! function_exists('mdate'))
{
function mdate($datestr = '', $time = '')
{
@@ -107,7 +107,7 @@ if (! function_exists('mdate'))
* @param integer Unix timestamp
* @return string
*/
-if (! function_exists('standard_date'))
+if ( ! function_exists('standard_date'))
{
function standard_date($fmt = 'DATE_RFC822', $time = '')
{
@@ -123,7 +123,7 @@ if (! function_exists('standard_date'))
'DATE_W3C' => '%Y-%m-%dT%H:%i:%s%Q'
);
- if (! isset($formats[$fmt]))
+ if ( ! isset($formats[$fmt]))
{
return FALSE;
}
@@ -145,19 +145,19 @@ if (! function_exists('standard_date'))
* @param integer Unix timestamp
* @return integer
*/
-if (! function_exists('timespan'))
+if ( ! function_exists('timespan'))
{
function timespan($seconds = 1, $time = '')
{
$CI =& get_instance();
$CI->lang->load('date');
- if (! is_numeric($seconds))
+ if ( ! is_numeric($seconds))
{
$seconds = 1;
}
- if (! is_numeric($time))
+ if ( ! is_numeric($time))
{
$time = time();
}
@@ -262,7 +262,7 @@ if (! function_exists('timespan'))
* @param integer a numeric year
* @return integer
*/
-if (! function_exists('days_in_month'))
+if ( ! function_exists('days_in_month'))
{
function days_in_month($month = 0, $year = '')
{
@@ -271,7 +271,7 @@ if (! function_exists('days_in_month'))
return 0;
}
- if (! is_numeric($year) OR strlen($year) != 4)
+ if ( ! is_numeric($year) OR strlen($year) != 4)
{
$year = date('Y');
}
@@ -298,7 +298,7 @@ if (! function_exists('days_in_month'))
* @param integer Unix timestamp
* @return integer
*/
-if (! function_exists('local_to_gmt'))
+if ( ! function_exists('local_to_gmt'))
{
function local_to_gmt($time = '')
{
@@ -324,7 +324,7 @@ if (! function_exists('local_to_gmt'))
* @param bool whether DST is active
* @return integer
*/
-if (! function_exists('gmt_to_local'))
+if ( ! function_exists('gmt_to_local'))
{
function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE)
{
@@ -353,7 +353,7 @@ if (! function_exists('gmt_to_local'))
* @param integer Unix timestamp
* @return integer
*/
-if (! function_exists('mysql_to_unix'))
+if ( ! function_exists('mysql_to_unix'))
{
function mysql_to_unix($time = '')
{
@@ -390,7 +390,7 @@ if (! function_exists('mysql_to_unix'))
* @param string format: us or euro
* @return string
*/
-if (! function_exists('unix_to_human'))
+if ( ! function_exists('unix_to_human'))
{
function unix_to_human($time = '', $seconds = FALSE, $fmt = 'us')
{
@@ -430,7 +430,7 @@ if (! function_exists('unix_to_human'))
* @param string format: us or euro
* @return integer
*/
-if (! function_exists('human_to_unix'))
+if ( ! function_exists('human_to_unix'))
{
function human_to_unix($datestr = '')
{
@@ -442,7 +442,7 @@ if (! function_exists('human_to_unix'))
$datestr = trim($datestr);
$datestr = preg_replace("/\040+/", "\040", $datestr);
- if (! ereg("^[0-9]{2,4}\-[0-9]{1,2}\-[0-9]{1,2}\040[0-9]{1,2}:[0-9]{1,2}.*$", $datestr))
+ if ( ! ereg("^[0-9]{2,4}\-[0-9]{1,2}\-[0-9]{1,2}\040[0-9]{1,2}:[0-9]{1,2}.*$", $datestr))
{
return FALSE;
}
@@ -501,7 +501,7 @@ if (! function_exists('human_to_unix'))
* @param string menu name
* @return string
*/
-if (! function_exists('timezone_menu'))
+if ( ! function_exists('timezone_menu'))
{
function timezone_menu($default = 'UTC', $class = "", $name = 'timezones')
{
@@ -544,7 +544,7 @@ if (! function_exists('timezone_menu'))
* @param string timezone
* @return string
*/
-if (! function_exists('timezones'))
+if ( ! function_exists('timezones'))
{
function timezones($tz = '')
{
@@ -592,10 +592,10 @@ if (! function_exists('timezones'))
if ($tz == 'GMT')
$tz = 'UTC';
- return (! isset($zones[$tz])) ? 0 : $zones[$tz];
+ return ( ! isset($zones[$tz])) ? 0 : $zones[$tz];
}
}
-
-/* End of file date_helper.php */
+
+/* End of file date_helper.php */
/* Location: ./system/helpers/date_helper.php */ \ No newline at end of file
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index d00bdf0aa..1bf694f0b 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.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
*
@@ -39,7 +39,7 @@
* @param bool whether to limit the result to the top level only
* @return array
*/
-if (! function_exists('directory_map'))
+if ( ! function_exists('directory_map'))
{
function directory_map($source_dir, $top_level_only = FALSE)
{
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 2096fd849..53191c7a9 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.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
*
@@ -37,7 +37,7 @@
* @param mixed the data to be downloaded
* @return void
*/
-if (! function_exists('force_download'))
+if ( ! function_exists('force_download'))
{
function force_download($filename = '', $data = '')
{
@@ -61,7 +61,7 @@ if (! function_exists('force_download'))
@include(APPPATH.'config/mimes'.EXT);
// Set a default mime if we can't find it
- if (! isset($mimes[$extension]))
+ if ( ! isset($mimes[$extension]))
{
$mime = 'application/octet-stream';
}
@@ -95,6 +95,6 @@ if (! function_exists('force_download'))
}
}
-
-/* End of file download_helper.php */
+
+/* End of file download_helper.php */
/* Location: ./system/helpers/download_helper.php */ \ No newline at end of file
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php
index 594a030fe..496d61203 100644
--- a/system/helpers/email_helper.php
+++ b/system/helpers/email_helper.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
*
@@ -33,11 +33,11 @@
* @access public
* @return bool
*/
-if (! function_exists('valid_email'))
+if ( ! function_exists('valid_email'))
{
function valid_email($address)
{
- return (! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
+ return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
}
}
@@ -49,7 +49,7 @@ if (! function_exists('valid_email'))
* @access public
* @return bool
*/
-if (! function_exists('send_email'))
+if ( ! function_exists('send_email'))
{
function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
{
@@ -57,6 +57,6 @@ if (! function_exists('send_email'))
}
}
-
-/* End of file email_helper.php */
+
+/* End of file email_helper.php */
/* Location: ./system/helpers/email_helper.php */ \ No newline at end of file
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index fac916f3d..0d33fe3f2 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.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,11 +36,11 @@
* @param string path to file
* @return string
*/
-if (! function_exists('read_file'))
+if ( ! function_exists('read_file'))
{
function read_file($file)
{
- if (! file_exists($file))
+ if ( ! file_exists($file))
{
return FALSE;
}
@@ -50,7 +50,7 @@ if (! function_exists('read_file'))
return file_get_contents($file);
}
- if (! $fp = @fopen($file, FOPEN_READ))
+ if ( ! $fp = @fopen($file, FOPEN_READ))
{
return FALSE;
}
@@ -83,11 +83,11 @@ if (! function_exists('read_file'))
* @param string file data
* @return bool
*/
-if (! function_exists('write_file'))
+if ( ! function_exists('write_file'))
{
function write_file($path, $data, $mode = FOPEN_WRITE_CREATE_DESTRUCTIVE)
{
- if (! $fp = fopen($path, $mode))
+ if ( ! $fp = fopen($path, $mode))
{
return FALSE;
}
@@ -116,14 +116,14 @@ if (! function_exists('write_file'))
* @param bool whether to delete any directories found in the path
* @return bool
*/
-if (! function_exists('delete_files'))
+if ( ! function_exists('delete_files'))
{
function delete_files($path, $del_dir = FALSE, $level = 0)
{
// Trim the trailing slash
$path = preg_replace("|^(.+?)/*$|", "\\1", $path);
- if (! $current_dir = @opendir($path))
+ if ( ! $current_dir = @opendir($path))
return;
while(FALSE !== ($filename = @readdir($current_dir)))
@@ -163,7 +163,7 @@ if (! function_exists('delete_files'))
* @param bool internal variable to determine recursion status - do not use in calls
* @return array
*/
-if (! function_exists('get_filenames'))
+if ( ! function_exists('get_filenames'))
{
function get_filenames($source_dir, $include_path = FALSE, $_recursion = FALSE)
{
@@ -215,7 +215,7 @@ if (! function_exists('get_filenames'))
* @param bool internal variable to determine recursion status - do not use in calls
* @return array
*/
-if (! function_exists('get_dir_file_info'))
+if ( ! function_exists('get_dir_file_info'))
{
function get_dir_file_info($source_dir, $include_path = FALSE, $_recursion = FALSE)
{
@@ -267,12 +267,12 @@ if (! function_exists('get_dir_file_info'))
* @param mixed array or comma separated string of information returned
* @return array
*/
-if (! function_exists('get_file_info'))
+if ( ! function_exists('get_file_info'))
{
function get_file_info($file, $returned_values = array('name', 'server_path', 'size', 'date'))
{
- if (! file_exists($file))
+ if ( ! file_exists($file))
{
return FALSE;
}
@@ -333,7 +333,7 @@ if (! function_exists('get_file_info'))
* @param string path to file
* @return mixed
*/
-if (! function_exists('get_mime_by_extension'))
+if ( ! function_exists('get_mime_by_extension'))
{
function get_mime_by_extension($file)
{
@@ -341,9 +341,9 @@ if (! function_exists('get_mime_by_extension'))
global $mimes;
- if (! is_array($mimes))
+ if ( ! is_array($mimes))
{
- if (! require_once(APPPATH.'config/mimes.php'))
+ if ( ! require_once(APPPATH.'config/mimes.php'))
{
return FALSE;
}
@@ -380,7 +380,7 @@ if (! function_exists('get_mime_by_extension'))
* @param int
* @return string
*/
-if (! function_exists('symbolic_permissions'))
+if ( ! function_exists('symbolic_permissions'))
{
function symbolic_permissions($perms)
{
@@ -448,7 +448,7 @@ if (! function_exists('symbolic_permissions'))
* @param int
* @return string
*/
-if (! function_exists('octal_permissions'))
+if ( ! function_exists('octal_permissions'))
{
function octal_permissions($perms)
{
@@ -456,6 +456,6 @@ if (! function_exists('octal_permissions'))
}
}
-
-/* End of file file_helper.php */
+
+/* End of file file_helper.php */
/* Location: ./system/helpers/file_helper.php */ \ No newline at end of file
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 541ab844a..c6aa0d2b4 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.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
*
@@ -38,7 +38,7 @@
* @param array a key/value pair hidden data
* @return string
*/
-if (! function_exists('form_open'))
+if ( ! function_exists('form_open'))
{
function form_open($action = '', $attributes = array(), $hidden = array())
{
@@ -48,7 +48,7 @@ if (! function_exists('form_open'))
$form = '<form action="'.$action.'"';
- if (! isset($attributes['method']))
+ if ( ! isset($attributes['method']))
{
$form .= ' method="post"';
}
@@ -85,7 +85,7 @@ if (! function_exists('form_open'))
* @param array a key/value pair hidden data
* @return string
*/
-if (! function_exists('form_open_multipart'))
+if ( ! function_exists('form_open_multipart'))
{
function form_open_multipart($action, $attributes = array(), $hidden = array())
{
@@ -107,11 +107,11 @@ if (! function_exists('form_open_multipart'))
* @param string
* @return string
*/
-if (! function_exists('form_hidden'))
+if ( ! function_exists('form_hidden'))
{
function form_hidden($name, $value = '')
{
- if (! is_array($name))
+ if ( ! is_array($name))
{
return '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" />';
}
@@ -137,11 +137,11 @@ if (! function_exists('form_hidden'))
* @param string
* @return string
*/
-if (! function_exists('form_input'))
+if ( ! function_exists('form_input'))
{
function form_input($data = '', $value = '', $extra = '')
{
- $defaults = array('type' => 'text', 'name' => ((! is_array($data)) ? $data : ''), 'value' => $value, 'maxlength' => '500', 'size' => '50');
+ $defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value, 'maxlength' => '500', 'size' => '50');
return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
}
@@ -160,11 +160,11 @@ if (! function_exists('form_input'))
* @param string
* @return string
*/
-if (! function_exists('form_password'))
+if ( ! function_exists('form_password'))
{
function form_password($data = '', $value = '', $extra = '')
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
$data = array('name' => $data);
}
@@ -187,11 +187,11 @@ if (! function_exists('form_password'))
* @param string
* @return string
*/
-if (! function_exists('form_upload'))
+if ( ! function_exists('form_upload'))
{
function form_upload($data = '', $value = '', $extra = '')
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
$data = array('name' => $data);
}
@@ -212,13 +212,13 @@ if (! function_exists('form_upload'))
* @param string
* @return string
*/
-if (! function_exists('form_textarea'))
+if ( ! function_exists('form_textarea'))
{
function form_textarea($data = '', $value = '', $extra = '')
{
- $defaults = array('name' => ((! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
+ $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
- if (! is_array($data) OR ! isset($data['value']))
+ if ( ! is_array($data) OR ! isset($data['value']))
{
$val = $value;
}
@@ -244,11 +244,11 @@ if (! function_exists('form_textarea'))
* @param string
* @return string
*/
-if (! function_exists('form_dropdown'))
+if ( ! function_exists('form_dropdown'))
{
function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
{
- if (! is_array($selected))
+ if ( ! is_array($selected))
{
$selected = array($selected);
}
@@ -287,11 +287,11 @@ if (! function_exists('form_dropdown'))
* @param string
* @return string
*/
-if (! function_exists('form_checkbox'))
+if ( ! function_exists('form_checkbox'))
{
function form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '')
{
- $defaults = array('type' => 'checkbox', 'name' => ((! is_array($data)) ? $data : ''), 'value' => $value);
+ $defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
if (is_array($data) AND array_key_exists('checked', $data))
{
@@ -328,11 +328,11 @@ if (! function_exists('form_checkbox'))
* @param string
* @return string
*/
-if (! function_exists('form_radio'))
+if ( ! function_exists('form_radio'))
{
function form_radio($data = '', $value = '', $checked = FALSE, $extra = '')
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
$data = array('name' => $data);
}
@@ -353,11 +353,11 @@ if (! function_exists('form_radio'))
* @param string
* @return string
*/
-if (! function_exists('form_submit'))
+if ( ! function_exists('form_submit'))
{
function form_submit($data = '', $value = '', $extra = '')
{
- $defaults = array('type' => 'submit', 'name' => ((! is_array($data)) ? $data : ''), 'value' => $value);
+ $defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
}
@@ -374,11 +374,11 @@ if (! function_exists('form_submit'))
* @param string
* @return string
*/
-if (! function_exists('form_reset'))
+if ( ! function_exists('form_reset'))
{
function form_reset($data = '', $value = '', $extra = '')
{
- $defaults = array('type' => 'reset', 'name' => ((! is_array($data)) ? $data : ''), 'value' => $value);
+ $defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
}
@@ -395,11 +395,11 @@ if (! function_exists('form_reset'))
* @param string
* @return string
*/
-if (! function_exists('form_button'))
+if ( ! function_exists('form_button'))
{
function form_button($data = '', $content = '', $extra = '')
{
- $defaults = array('name' => ((! is_array($data)) ? $data : ''), 'type' => 'submit');
+ $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'submit');
if ( is_array($data) AND isset($data['content']))
{
@@ -422,7 +422,7 @@ if (! function_exists('form_button'))
* @param string Additional attributes
* @return string
*/
-if (! function_exists('form_label'))
+if ( ! function_exists('form_label'))
{
function form_label($label_text = '', $id = '', $attributes = array())
{
@@ -460,7 +460,7 @@ if (! function_exists('form_label'))
* @param string Additional attributes
* @return string
*/
-if (! function_exists('form_fieldset'))
+if ( ! function_exists('form_fieldset'))
{
function form_fieldset($legend_text = '', $attributes = array())
{
@@ -497,7 +497,7 @@ if (! function_exists('form_fieldset'))
* @param string
* @return string
*/
-if (! function_exists('form_fieldset_close'))
+if ( ! function_exists('form_fieldset_close'))
{
function form_fieldset_close($extra = '')
{
@@ -514,7 +514,7 @@ if (! function_exists('form_fieldset_close'))
* @param string
* @return string
*/
-if (! function_exists('form_close'))
+if ( ! function_exists('form_close'))
{
function form_close($extra = '')
{
@@ -533,7 +533,7 @@ if (! function_exists('form_close'))
* @param string
* @return string
*/
-if (! function_exists('form_prep'))
+if ( ! function_exists('form_prep'))
{
function form_prep($str = '')
{
@@ -574,7 +574,7 @@ if (! function_exists('form_prep'))
* @param array
* @return string
*/
-if (! function_exists('parse_form_attributes'))
+if ( ! function_exists('parse_form_attributes'))
{
function parse_form_attributes($attributes, $default)
{
@@ -610,6 +610,6 @@ if (! function_exists('parse_form_attributes'))
}
}
-
-/* End of file form_helper.php */
+
+/* End of file form_helper.php */
/* Location: ./system/helpers/form_helper.php */ \ No newline at end of file
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index 592c33a50..7a61055f7 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.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
*
@@ -38,7 +38,7 @@
* @param integer
* @return string
*/
-if (! function_exists('heading'))
+if ( ! function_exists('heading'))
{
function heading($data = '', $h = '1')
{
@@ -58,7 +58,7 @@ if (! function_exists('heading'))
* @param mixed
* @return string
*/
-if (! function_exists('ul'))
+if ( ! function_exists('ul'))
{
function ul($list, $attributes = '')
{
@@ -78,7 +78,7 @@ if (! function_exists('ul'))
* @param mixed
* @return string
*/
-if (! function_exists('ol'))
+if ( ! function_exists('ol'))
{
function ol($list, $attributes = '')
{
@@ -100,12 +100,12 @@ if (! function_exists('ol'))
* @param intiger
* @return string
*/
-if (! function_exists('_list'))
+if ( ! function_exists('_list'))
{
function _list($type = 'ul', $list, $attributes = '', $depth = 0)
{
// If an array wasn't submitted there's nothing to do...
- if (! is_array($list))
+ if ( ! is_array($list))
{
return $list;
}
@@ -138,7 +138,7 @@ if (! function_exists('_list'))
$out .= str_repeat(" ", $depth + 2);
$out .= "<li>";
- if (! is_array($val))
+ if ( ! is_array($val))
{
$out .= $val;
}
@@ -171,7 +171,7 @@ if (! function_exists('_list'))
* @param integer
* @return string
*/
-if (! function_exists('br'))
+if ( ! function_exists('br'))
{
function br($num = 1)
{
@@ -190,11 +190,11 @@ if (! function_exists('br'))
* @param mixed
* @return string
*/
-if (! function_exists('img'))
+if ( ! function_exists('img'))
{
function img($src = '', $index_page = FALSE)
{
- if (! is_array($src) )
+ if ( ! is_array($src) )
{
$src = array('src' => $src);
}
@@ -245,7 +245,7 @@ if (! function_exists('img'))
* @param boolean should index_page be added to the css path
* @return string
*/
-if (! function_exists('link_tag'))
+if ( ! function_exists('link_tag'))
{
function link_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE)
{
@@ -320,7 +320,7 @@ if (! function_exists('link_tag'))
* @param array
* @return string
*/
-if (! function_exists('meta'))
+if ( ! function_exists('meta'))
{
function meta($meta = array(), $newline = "\n")
{
@@ -343,7 +343,7 @@ if (! function_exists('meta'))
* @param integer
* @return string
*/
-if (! function_exists('nbs'))
+if ( ! function_exists('nbs'))
{
function nbs($num = 1)
{
@@ -351,6 +351,6 @@ if (! function_exists('nbs'))
}
}
-
-/* End of file html_helper.php */
+
+/* End of file html_helper.php */
/* Location: ./system/helpers/html_helper.php */ \ No newline at end of file
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index b0b99be54..49ba542a1 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.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
*
@@ -37,7 +37,7 @@
* @param string
* @return str
*/
-if (! function_exists('singular'))
+if ( ! function_exists('singular'))
{
function singular($str)
{
@@ -78,7 +78,7 @@ if (! function_exists('singular'))
* @param bool
* @return str
*/
-if (! function_exists('plural'))
+if ( ! function_exists('plural'))
{
function plural($str, $force = FALSE)
{
@@ -116,7 +116,7 @@ if (! function_exists('plural'))
* @param string
* @return str
*/
-if (! function_exists('camelize'))
+if ( ! function_exists('camelize'))
{
function camelize($str)
{
@@ -137,7 +137,7 @@ if (! function_exists('camelize'))
* @param string
* @return str
*/
-if (! function_exists('underscore'))
+if ( ! function_exists('underscore'))
{
function underscore($str)
{
@@ -156,7 +156,7 @@ if (! function_exists('underscore'))
* @param string
* @return str
*/
-if (! function_exists('humanize'))
+if ( ! function_exists('humanize'))
{
function humanize($str)
{
@@ -164,6 +164,6 @@ if (! function_exists('humanize'))
}
}
-
-/* End of file inflector_helper.php */
+
+/* End of file inflector_helper.php */
/* Location: ./system/helpers/inflector_helper.php */ \ No newline at end of file
diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php
index 05bbd0027..2810b29e2 100644
--- a/system/helpers/path_helper.php
+++ b/system/helpers/path_helper.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
*
@@ -35,7 +35,7 @@
* @param bool checks to see if the path exists
* @return string
*/
-if (! function_exists('set_realpath'))
+if ( ! function_exists('set_realpath'))
{
function set_realpath($path, $check_existance = TRUE)
{
@@ -57,7 +57,7 @@ if (! function_exists('set_realpath'))
// Make sure the path exists
if ($check_existance == TRUE)
{
- if (! is_dir($path))
+ if ( ! is_dir($path))
{
show_error('Not a valid path: '.$path);
}
@@ -67,6 +67,6 @@ if (! function_exists('set_realpath'))
}
}
-
-/* End of file path_helper.php */
+
+/* End of file path_helper.php */
/* Location: ./system/helpers/path_helper.php */ \ No newline at end of file
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 0dc1429dd..8391c2d7b 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.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
*
@@ -35,7 +35,7 @@
* @param string the character set of your data
* @return string
*/
-if (! function_exists('xss_clean'))
+if ( ! function_exists('xss_clean'))
{
function xss_clean($str, $charset = 'ISO-8859-1')
{
@@ -53,15 +53,15 @@ if (! function_exists('xss_clean'))
* @param string
* @return string
*/
-if (! function_exists('dohash'))
+if ( ! function_exists('dohash'))
{
function dohash($str, $type = 'sha1')
{
if ($type == 'sha1')
{
- if (! function_exists('sha1'))
+ if ( ! function_exists('sha1'))
{
- if (! function_exists('mhash'))
+ if ( ! function_exists('mhash'))
{
require_once(BASEPATH.'libraries/Sha1'.EXT);
$SH = new CI_SHA;
@@ -93,7 +93,7 @@ if (! function_exists('dohash'))
* @param string
* @return string
*/
-if (! function_exists('strip_image_tags'))
+if ( ! function_exists('strip_image_tags'))
{
function strip_image_tags($str)
{
@@ -113,7 +113,7 @@ if (! function_exists('strip_image_tags'))
* @param string
* @return string
*/
-if (! function_exists('encode_php_tags'))
+if ( ! function_exists('encode_php_tags'))
{
function encode_php_tags($str)
{
@@ -121,6 +121,6 @@ if (! function_exists('encode_php_tags'))
}
}
-
-/* End of file security_helper.php */
+
+/* End of file security_helper.php */
/* Location: ./system/helpers/security_helper.php */ \ No newline at end of file
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 2162ddda0..8f7543746 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.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
*
@@ -37,7 +37,7 @@
* @param string field name
* @return string
*/
-if (! function_exists('js_insert_smiley'))
+if ( ! function_exists('js_insert_smiley'))
{
function js_insert_smiley($form_name = '', $form_field = '')
{
@@ -63,11 +63,11 @@ EOF;
* @param string the URL to the folder containing the smiley images
* @return array
*/
-if (! function_exists('get_clickable_smileys'))
+if ( ! function_exists('get_clickable_smileys'))
{
function get_clickable_smileys($image_url = '', $smileys = NULL)
{
- if (! is_array($smileys))
+ if ( ! is_array($smileys))
{
if (FALSE === ($smileys = _get_smiley_array()))
{
@@ -111,7 +111,7 @@ if (! function_exists('get_clickable_smileys'))
* @param string the URL to the folder containing the smiley images
* @return string
*/
-if (! function_exists('parse_smileys'))
+if ( ! function_exists('parse_smileys'))
{
function parse_smileys($str = '', $image_url = '', $smileys = NULL)
{
@@ -120,7 +120,7 @@ if (! function_exists('parse_smileys'))
return $str;
}
- if (! is_array($smileys))
+ if ( ! is_array($smileys))
{
if (FALSE === ($smileys = _get_smiley_array()))
{
@@ -150,18 +150,18 @@ if (! function_exists('parse_smileys'))
* @access private
* @return mixed
*/
-if (! function_exists('_get_smiley_array'))
+if ( ! function_exists('_get_smiley_array'))
{
function _get_smiley_array()
{
- if (! file_exists(APPPATH.'config/smileys'.EXT))
+ if ( ! file_exists(APPPATH.'config/smileys'.EXT))
{
return FALSE;
}
include(APPPATH.'config/smileys'.EXT);
- if (! isset($smileys) OR ! is_array($smileys))
+ if ( ! isset($smileys) OR ! is_array($smileys))
{
return FALSE;
}
@@ -170,6 +170,6 @@ if (! function_exists('_get_smiley_array'))
}
}
-
-/* End of file smiley_helper.php */
+
+/* End of file smiley_helper.php */
/* Location: ./system/helpers/smiley_helper.php */ \ No newline at end of file
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index b934723bf..7b6becffe 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.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
*
@@ -42,7 +42,7 @@
* @param string
* @return string
*/
-if (! function_exists('trim_slashes'))
+if ( ! function_exists('trim_slashes'))
{
function trim_slashes($str)
{
@@ -61,7 +61,7 @@ if (! function_exists('trim_slashes'))
* @param mixed string or array
* @return mixed string or array
*/
-if (! function_exists('strip_slashes'))
+if ( ! function_exists('strip_slashes'))
{
function strip_slashes($str)
{
@@ -92,7 +92,7 @@ if (! function_exists('strip_slashes'))
* @param string
* @return string
*/
-if (! function_exists('strip_quotes'))
+if ( ! function_exists('strip_quotes'))
{
function strip_quotes($str)
{
@@ -111,7 +111,7 @@ if (! function_exists('strip_quotes'))
* @param string
* @return string
*/
-if (! function_exists('quotes_to_entities'))
+if ( ! function_exists('quotes_to_entities'))
{
function quotes_to_entities($str)
{
@@ -136,7 +136,7 @@ if (! function_exists('quotes_to_entities'))
* @param string
* @return string
*/
-if (! function_exists('reduce_double_slashes'))
+if ( ! function_exists('reduce_double_slashes'))
{
function reduce_double_slashes($str)
{
@@ -163,7 +163,7 @@ if (! function_exists('reduce_double_slashes'))
* @param bool TRUE/FALSE - whether to trim the character from the beginning/end
* @return string
*/
-if (! function_exists('reduce_multiples'))
+if ( ! function_exists('reduce_multiples'))
{
function reduce_multiples($str, $character = ',', $trim = FALSE)
{
@@ -190,7 +190,7 @@ if (! function_exists('reduce_multiples'))
* @param integer number of characters
* @return string
*/
-if (! function_exists('random_string'))
+if ( ! function_exists('random_string'))
{
function random_string($type = 'alnum', $len = 8)
{
@@ -234,7 +234,7 @@ if (! function_exists('random_string'))
* @param string (as many parameters as needed)
* @return string
*/
-if (! function_exists('alternator'))
+if ( ! function_exists('alternator'))
{
function alternator()
{
@@ -260,7 +260,7 @@ if (! function_exists('alternator'))
* @param integer number of repeats
* @return string
*/
-if (! function_exists('repeater'))
+if ( ! function_exists('repeater'))
{
function repeater($data, $num = 1)
{
@@ -268,6 +268,6 @@ if (! function_exists('repeater'))
}
}
-
-/* End of file string_helper.php */
+
+/* End of file string_helper.php */
/* Location: ./system/helpers/string_helper.php */ \ No newline at end of file
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 2d03699f3..18f33d2b3 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.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
*
@@ -38,7 +38,7 @@
* @param string the end character. Usually an ellipsis
* @return string
*/
-if (! function_exists('word_limiter'))
+if ( ! function_exists('word_limiter'))
{
function word_limiter($str, $limit = 100, $end_char = '&#8230;')
{
@@ -72,7 +72,7 @@ if (! function_exists('word_limiter'))
* @param string the end character. Usually an ellipsis
* @return string
*/
-if (! function_exists('character_limiter'))
+if ( ! function_exists('character_limiter'))
{
function character_limiter($str, $n = 500, $end_char = '&#8230;')
{
@@ -81,7 +81,7 @@ if (! function_exists('character_limiter'))
return $str;
}
- $str = preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str));
+ $str = preg_replace("/\s+/", ' ', str_replace(array("\r\n", "\r", "\n"), ' ', $str));
if (strlen($str) <= $n)
{
@@ -111,7 +111,7 @@ if (! function_exists('character_limiter'))
* @param string
* @return string
*/
-if (! function_exists('ascii_to_entities'))
+if ( ! function_exists('ascii_to_entities'))
{
function ascii_to_entities($str)
{
@@ -163,7 +163,7 @@ if (! function_exists('ascii_to_entities'))
* @param bool
* @return string
*/
-if (! function_exists('entities_to_ascii'))
+if ( ! function_exists('entities_to_ascii'))
{
function entities_to_ascii($str, $all = TRUE)
{
@@ -222,11 +222,11 @@ if (! function_exists('entities_to_ascii'))
* @param string the optional replacement value
* @return string
*/
-if (! function_exists('word_censor'))
+if ( ! function_exists('word_censor'))
{
function word_censor($str, $censored, $replacement = '')
{
- if (! is_array($censored))
+ if ( ! is_array($censored))
{
return $str;
}
@@ -259,7 +259,7 @@ if (! function_exists('word_censor'))
* @param string the text string
* @return string
*/
-if (! function_exists('highlight_code'))
+if ( ! function_exists('highlight_code'))
{
function highlight_code($str)
{
@@ -317,7 +317,7 @@ if (! function_exists('highlight_code'))
* @param string the closing tag to end the phrase with
* @return string
*/
-if (! function_exists('highlight_phrase'))
+if ( ! function_exists('highlight_phrase'))
{
function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>')
{
@@ -349,19 +349,22 @@ if (! function_exists('highlight_phrase'))
* @param integer the number of characters to wrap at
* @return string
*/
-if (! function_exists('word_wrap'))
+if ( ! function_exists('word_wrap'))
{
function word_wrap($str, $charlim = '76')
{
// Se the character limit
- if (! is_numeric($charlim))
+ if ( ! is_numeric($charlim))
$charlim = 76;
// Reduce multiple spaces
$str = preg_replace("| +|", " ", $str);
// Standardize newlines
- $str = preg_replace("/\r\n|\r/", "\n", $str);
+ if (strpos($str, "\r") !== FALSE)
+ {
+ $str = str_replace(array("\r\n", "\r"), "\n", $str);
+ }
// If the current word is surrounded by {unwrap} tags we'll
// strip the entire chunk and replace it with a marker.
@@ -436,6 +439,6 @@ if (! function_exists('word_wrap'))
}
}
-
-/* End of file text_helper.php */
+
+/* End of file text_helper.php */
/* Location: ./system/helpers/text_helper.php */ \ No newline at end of file
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 78ade5cc3..cfb2b94f6 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.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
*
@@ -34,7 +34,7 @@
* @param string
* @return string
*/
-if (! function_exists('nl2br_except_pre'))
+if ( ! function_exists('nl2br_except_pre'))
{
function nl2br_except_pre($str)
{
@@ -71,7 +71,7 @@ if (! function_exists('nl2br_except_pre'))
* @param string
* @return string
*/
-if (! function_exists('auto_typography'))
+if ( ! function_exists('auto_typography'))
{
function auto_typography($str)
{
@@ -117,7 +117,10 @@ class Auto_typography {
$str = ' '.$str.' ';
// Standardize Newlines to make matching easier
- $str = preg_replace("/(\r\n|\r)/", "\n", $str);
+ if (strpos($str, "\r") !== FALSE)
+ {
+ $str = str_replace(array("\r\n", "\r"), "\n", $str);
+ }
/*
* Reduce line breaks
@@ -330,13 +333,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+2, 1);
- if (! in_array($one_after, $space, TRUE) && $one_after != "<")
+ if ( ! in_array($one_after, $space, TRUE) && $one_after != "<")
{
$str = str_replace( $one_before."\"'".$one_after,
$one_before."&#8220;&#8216;".$one_after,
$str);
}
- elseif (! in_array($one_before, $space, TRUE) && (in_array($one_after, $space, TRUE) OR $one_after == '<'))
+ elseif ( ! in_array($one_before, $space, TRUE) && (in_array($one_after, $space, TRUE) OR $one_after == '<'))
{
$str = str_replace( $one_before."\"'".$one_after,
$one_before."&#8221;&#8217;".$one_after,
@@ -363,7 +366,7 @@ class Auto_typography {
$one_before."&#8216;&#8220;".$one_after,
$str);
}
- elseif (! in_array($one_before, $space, TRUE) && $one_before != ">")
+ elseif ( ! in_array($one_before, $space, TRUE) && $one_before != ">")
{
$str = str_replace( $one_before."'\"".$one_after,
$one_before."&#8217;&#8221;".$one_after,
@@ -378,7 +381,7 @@ class Auto_typography {
{
for ($i=0, $s=sizeof($matches['0']); $i < $s; ++$i)
{
- if (! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE))
+ if ( ! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE))
{
$str = str_replace( $matches['0'][$i],
$matches['1'][$i]."&#8220;".$matches['2'][$i]."&#8221;".$matches['3'][$i],
@@ -391,7 +394,7 @@ class Auto_typography {
{
for ($i=0, $s=sizeof($matches['0']); $i < $s; ++$i)
{
- if (! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE))
+ if ( ! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE))
{
$str = str_replace( $matches['0'][$i],
$matches['1'][$i]."&#8216;".$matches['2'][$i]."&#8217;".$matches['3'][$i],
@@ -412,7 +415,7 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+1, 1);
- if (! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE))
+ if ( ! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8217;".$one_after,
@@ -435,9 +438,9 @@ class Auto_typography {
$two_before = substr($str, $start+$current-2, 1);
$two_after = substr($str, $start+$current+3, 1);
- if ((! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE))
+ if (( ! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE))
OR
- (! in_array($two_before, $space, TRUE) && ! in_array($two_after, $space, TRUE) && $one_before == ' ' && $one_after == ' ')
+ ( ! in_array($two_before, $space, TRUE) && ! in_array($two_after, $space, TRUE) && $one_before == ' ' && $one_after == ' ')
)
{
$str = str_replace( $two_before.$one_before."--".$one_after.$two_after,
@@ -468,13 +471,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+1, 1);
- if (! in_array($one_after, $space, TRUE))
+ if ( ! in_array($one_after, $space, TRUE))
{
$str = str_replace( $one_before.'"'.$one_after,
$one_before."&#8220;".$one_after,
$str);
}
- elseif(! in_array($one_before, $space, TRUE))
+ elseif( ! in_array($one_before, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8221;".$one_after,
@@ -495,13 +498,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+1, 1);
- if (! in_array($one_after, $space, TRUE))
+ if ( ! in_array($one_after, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8216;".$one_after,
$str);
}
- elseif(! in_array($one_before, $space, TRUE))
+ elseif( ! in_array($one_before, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8217;".$one_after,
@@ -542,6 +545,6 @@ class Auto_typography {
}
-
-/* End of file typography_helper.php */
+
+/* End of file typography_helper.php */
/* Location: ./system/helpers/typography_helper.php */ \ No newline at end of file
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 32d2da80e..16dd3e021 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.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
*
@@ -37,7 +37,7 @@
* @param string
* @return string
*/
-if (! function_exists('site_url'))
+if ( ! function_exists('site_url'))
{
function site_url($uri = '')
{
@@ -56,7 +56,7 @@ if (! function_exists('site_url'))
* @access public
* @return string
*/
-if (! function_exists('base_url'))
+if ( ! function_exists('base_url'))
{
function base_url()
{
@@ -75,7 +75,7 @@ if (! function_exists('base_url'))
* @access public
* @return string
*/
-if (! function_exists('index_page'))
+if ( ! function_exists('index_page'))
{
function index_page()
{
@@ -97,15 +97,15 @@ if (! function_exists('index_page'))
* @param mixed any attributes
* @return string
*/
-if (! function_exists('anchor'))
+if ( ! function_exists('anchor'))
{
function anchor($uri = '', $title = '', $attributes = '')
{
$title = (string) $title;
- if (! is_array($uri))
+ if ( ! is_array($uri))
{
- $site_url = (! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;
+ $site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
}
else
{
@@ -140,13 +140,13 @@ if (! function_exists('anchor'))
* @param mixed any attributes
* @return string
*/
-if (! function_exists('anchor_popup'))
+if ( ! function_exists('anchor_popup'))
{
function anchor_popup($uri = '', $title = '', $attributes = FALSE)
{
$title = (string) $title;
- $site_url = (! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;
+ $site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
if ($title == '')
{
@@ -158,14 +158,14 @@ if (! function_exists('anchor_popup'))
return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank');\">".$title."</a>";
}
- if (! is_array($attributes))
+ if ( ! is_array($attributes))
{
$attributes = array();
}
foreach (array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0', ) as $key => $val)
{
- $atts[$key] = (! isset($attributes[$key])) ? $val : $attributes[$key];
+ $atts[$key] = ( ! isset($attributes[$key])) ? $val : $attributes[$key];
}
return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\">".$title."</a>";
@@ -183,7 +183,7 @@ if (! function_exists('anchor_popup'))
* @param mixed any attributes
* @return string
*/
-if (! function_exists('mailto'))
+if ( ! function_exists('mailto'))
{
function mailto($email, $title = '', $attributes = '')
{
@@ -213,7 +213,7 @@ if (! function_exists('mailto'))
* @param mixed any attributes
* @return string
*/
-if (! function_exists('safe_mailto'))
+if ( ! function_exists('safe_mailto'))
{
function safe_mailto($email, $title = '', $attributes = '')
{
@@ -328,7 +328,7 @@ if (! function_exists('safe_mailto'))
* @param bool whether to create pop-up links
* @return string
*/
-if (! function_exists('auto_link'))
+if ( ! function_exists('auto_link'))
{
function auto_link($str, $type = 'both', $popup = FALSE)
{
@@ -393,7 +393,7 @@ if (! function_exists('auto_link'))
* @param string the URL
* @return string
*/
-if (! function_exists('prep_url'))
+if ( ! function_exists('prep_url'))
{
function prep_url($str = '')
{
@@ -425,7 +425,7 @@ if (! function_exists('prep_url'))
* @param string the separator: dash, or underscore
* @return string
*/
-if (! function_exists('url_title'))
+if ( ! function_exists('url_title'))
{
function url_title($str, $separator = 'dash')
{
@@ -474,7 +474,7 @@ if (! function_exists('url_title'))
* @param string the method: location or redirect
* @return string
*/
-if (! function_exists('redirect'))
+if ( ! function_exists('redirect'))
{
function redirect($uri = '', $method = 'location', $http_response_code = 302)
{
@@ -501,7 +501,7 @@ if (! function_exists('redirect'))
* @param bool
* @return string
*/
-if (! function_exists('_parse_attributes'))
+if ( ! function_exists('_parse_attributes'))
{
function _parse_attributes($attributes, $javascript = FALSE)
{
@@ -532,6 +532,6 @@ if (! function_exists('_parse_attributes'))
}
}
-
-/* End of file url_helper.php */
+
+/* End of file url_helper.php */
/* Location: ./system/helpers/url_helper.php */ \ No newline at end of file
diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php
index b91664433..256d1e020 100644
--- a/system/helpers/xml_helper.php
+++ b/system/helpers/xml_helper.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
*
@@ -34,7 +34,7 @@
* @param string
* @return string
*/
-if (! function_exists('xml_convert'))
+if ( ! function_exists('xml_convert'))
{
function xml_convert($str)
{
@@ -57,6 +57,6 @@ if (! function_exists('xml_convert'))
}
}
-
-/* End of file xml_helper.php */
+
+/* End of file xml_helper.php */
/* Location: ./system/helpers/xml_helper.php */ \ No newline at end of file
diff --git a/system/libraries/Benchmark.php b/system/libraries/Benchmark.php
index 899350bf7..4c9993a0f 100644
--- a/system/libraries/Benchmark.php
+++ b/system/libraries/Benchmark.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
*
@@ -71,12 +71,12 @@ class CI_Benchmark {
return '{elapsed_time}';
}
- if (! isset($this->marker[$point1]))
+ if ( ! isset($this->marker[$point1]))
{
return '';
}
- if (! isset($this->marker[$point2]))
+ if ( ! isset($this->marker[$point2]))
{
$this->marker[$point2] = microtime();
}
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index fbb275c5f..f6b028463 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.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
*
@@ -49,7 +49,7 @@ class CI_Calendar {
{
$this->CI =& get_instance();
- if (! in_array('calendar_lang'.EXT, $this->CI->lang->is_loaded, TRUE))
+ if ( ! in_array('calendar_lang'.EXT, $this->CI->lang->is_loaded, TRUE))
{
$this->CI->lang->load('calendar');
}
@@ -125,7 +125,7 @@ class CI_Calendar {
// Set the starting day of the week
$start_days = array('sunday' => 0, 'monday' => 1, 'tuesday' => 2, 'wednesday' => 3, 'thursday' => 4, 'friday' => 5, 'saturday' => 6);
- $start_day = (! isset($start_days[$this->start_day])) ? 0 : $start_days[$this->start_day];
+ $start_day = ( ! isset($start_days[$this->start_day])) ? 0 : $start_days[$this->start_day];
// Set the starting day number
$local_date = mktime(12, 0, 0, $month, 1, $year);
@@ -472,6 +472,6 @@ class CI_Calendar {
}
// END CI_Calendar class
-
-/* End of file Calendar.php */
+
+/* End of file Calendar.php */
/* Location: ./system/libraries/Calendar.php */ \ No newline at end of file
diff --git a/system/libraries/Config.php b/system/libraries/Config.php
index 06e1cbe80..a5d268912 100644
--- a/system/libraries/Config.php
+++ b/system/libraries/Config.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
*
@@ -66,7 +66,7 @@ class CI_Config {
return TRUE;
}
- if (! file_exists(APPPATH.'config/'.$file.EXT))
+ if ( ! file_exists(APPPATH.'config/'.$file.EXT))
{
if ($fail_gracefully === TRUE)
{
@@ -77,7 +77,7 @@ class CI_Config {
include(APPPATH.'config/'.$file.EXT);
- if (! isset($config) OR ! is_array($config))
+ if ( ! isset($config) OR ! is_array($config))
{
if ($fail_gracefully === TRUE)
{
@@ -125,7 +125,7 @@ class CI_Config {
{
if ($index == '')
{
- if (! isset($this->config[$item]))
+ if ( ! isset($this->config[$item]))
{
return FALSE;
}
@@ -134,12 +134,12 @@ class CI_Config {
}
else
{
- if (! isset($this->config[$index]))
+ if ( ! isset($this->config[$index]))
{
return FALSE;
}
- if (! isset($this->config[$index][$item]))
+ if ( ! isset($this->config[$index][$item]))
{
return FALSE;
}
@@ -165,7 +165,7 @@ class CI_Config {
*/
function slash_item($item)
{
- if (! isset($this->config[$item]))
+ if ( ! isset($this->config[$item]))
{
return FALSE;
}
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index 1a1e3df53..5c96c577a 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.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
*
@@ -111,7 +111,7 @@ class Controller extends CI_Base {
show_404('Scaffolding unavailable');
}
- $method = (! in_array($this->uri->segment(3), array('add', 'insert', 'edit', 'update', 'view', 'delete', 'do_delete'), TRUE)) ? 'view' : $this->uri->segment(3);
+ $method = ( ! in_array($this->uri->segment(3), array('add', 'insert', 'edit', 'update', 'view', 'delete', 'do_delete'), TRUE)) ? 'view' : $this->uri->segment(3);
require_once(BASEPATH.'scaffolding/Scaffolding'.EXT);
$scaff = new Scaffolding($this->_ci_scaff_table);
@@ -121,6 +121,6 @@ class Controller extends CI_Base {
}
// END _Controller class
-
-/* End of file Controller.php */
+
+/* End of file Controller.php */
/* Location: ./system/libraries/Controller.php */ \ No newline at end of file
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index ebb969288..ab3a24893 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.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
*
@@ -329,8 +329,15 @@ class CI_Email {
*/
function subject($subject)
{
- $subject = preg_replace("/(\r\n)|(\r)|(\n)/", "", $subject);
- $subject = preg_replace("/(\t)/", " ", $subject);
+ if (strpos($subject, "\r") !== FALSE OR strpos($subject, "\n") !== FALSE)
+ {
+ $subject = str_replace(array("\r\n", "\r", "\n"), '', $subject);
+ }
+
+ if (strpos($subject, "\t"))
+ {
+ $subject = str_replace("\t", ' ', $subject);
+ }
$this->_set_header('Subject', trim($subject));
}
@@ -391,7 +398,7 @@ class CI_Email {
*/
function _str_to_array($email)
{
- if (! is_array($email))
+ if ( ! is_array($email))
{
if (strpos($email, ',') !== FALSE)
{
@@ -459,7 +466,7 @@ class CI_Email {
*/
function set_protocol($protocol = 'mail')
{
- $this->protocol = (! in_array($protocol, $this->_protocols, TRUE)) ? 'mail' : strtolower($protocol);
+ $this->protocol = ( ! in_array($protocol, $this->_protocols, TRUE)) ? 'mail' : strtolower($protocol);
}
// --------------------------------------------------------------------
@@ -473,7 +480,7 @@ class CI_Email {
*/
function set_priority($n = 3)
{
- if (! is_numeric($n))
+ if ( ! is_numeric($n))
{
$this->priority = 3;
return;
@@ -571,7 +578,7 @@ class CI_Email {
function _get_protocol($return = TRUE)
{
$this->protocol = strtolower($this->protocol);
- $this->protocol = (! in_array($this->protocol, $this->_protocols, TRUE)) ? 'mail' : $this->protocol;
+ $this->protocol = ( ! in_array($this->protocol, $this->_protocols, TRUE)) ? 'mail' : $this->protocol;
if ($return == TRUE)
{
@@ -590,7 +597,7 @@ class CI_Email {
*/
function _get_encoding($return = TRUE)
{
- $this->_encoding = (! in_array($this->_encoding, $this->_bit_depths)) ? '8bit' : $this->_encoding;
+ $this->_encoding = ( ! in_array($this->_encoding, $this->_bit_depths)) ? '8bit' : $this->_encoding;
foreach ($this->_base_charsets as $charset)
{
@@ -676,7 +683,7 @@ class CI_Email {
*/
function validate_email($email)
{
- if (! is_array($email))
+ if ( ! is_array($email))
{
$this->_set_error_message('email_must_be_array');
return FALSE;
@@ -684,7 +691,7 @@ class CI_Email {
foreach ($email as $val)
{
- if (! $this->valid_email($val))
+ if ( ! $this->valid_email($val))
{
$this->_set_error_message('email_invalid_address', $val);
return FALSE;
@@ -703,7 +710,7 @@ class CI_Email {
*/
function valid_email($address)
{
- return (! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
+ return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
}
// --------------------------------------------------------------------
@@ -717,7 +724,7 @@ class CI_Email {
*/
function clean_email($email)
{
- if (! is_array($email))
+ if ( ! is_array($email))
{
if (preg_match('/\<(.*)\>/', $email, $match))
{
@@ -816,7 +823,10 @@ class CI_Email {
$str = preg_replace("| +|", " ", $str);
// Standardize newlines
- $str = preg_replace("/\r\n|\r/", "\n", $str);
+ if (strpos($str, "\r") !== FALSE)
+ {
+ $str = str_replace(array("\r\n", "\r"), "\n", $str);
+ }
// If the current word is surrounded by {unwrap} tags we'll
// strip the entire chunk and replace it with a marker.
@@ -857,7 +867,7 @@ class CI_Email {
}
// Trim the word down
- $temp .= ($line, 0, $charlim-1);
+ $temp .= substr($line, 0, $charlim-1);
$line = substr($line, $charlim-1);
}
@@ -1089,7 +1099,7 @@ class CI_Email {
$basename = basename($filename);
$ctype = $this->_attach_type[$i];
- if (! file_exists($filename))
+ if ( ! file_exists($filename))
{
$this->_set_error_message('email_attachment_missing', $filename);
return FALSE;
@@ -1104,7 +1114,7 @@ class CI_Email {
$attachment[$z++] = $h;
$file = filesize($filename) +1;
- if (! $fp = fopen($filename, FOPEN_READ))
+ if ( ! $fp = fopen($filename, FOPEN_READ))
{
$this->_set_error_message('email_attachment_unreadable', $filename);
return FALSE;
@@ -1153,7 +1163,10 @@ class CI_Email {
$str = preg_replace("| +|", " ", $str);
// Standardize newlines
- $str = preg_replace("/\r\n|\r/", "\n", $str);
+ if (strpos($str, "\r") !== FALSE)
+ {
+ $str = str_replace(array("\r\n", "\r"), "\n", $str);
+ }
// We are intentionally wrapping so mail servers will encode characters
// properly and MUAs will behave, so {unwrap} must go!
@@ -1228,9 +1241,9 @@ class CI_Email {
$this->reply_to($this->_headers['From']);
}
- if ((! isset($this->_recipients) AND ! isset($this->_headers['To'])) AND
- (! isset($this->_bcc_array) AND ! isset($this->_headers['Bcc'])) AND
- (! isset($this->_headers['Cc'])))
+ if (( ! isset($this->_recipients) AND ! isset($this->_headers['To'])) AND
+ ( ! isset($this->_bcc_array) AND ! isset($this->_headers['Bcc'])) AND
+ ( ! isset($this->_headers['Cc'])))
{
$this->_set_error_message('email_no_recipients');
return FALSE;
@@ -1246,7 +1259,7 @@ class CI_Email {
$this->_build_message();
- if (! $this->_spool_email())
+ if ( ! $this->_spool_email())
{
return FALSE;
}
@@ -1338,7 +1351,12 @@ class CI_Email {
*/
function _remove_nl_callback($matches)
{
- return preg_replace("/(\r\n)|(\r)|(\n)/", "", $matches['1']);
+ if (strpos($matches[1], "\r") !== FALSE OR strpos($matches[1], "\n") !== FALSE)
+ {
+ $matches[1] = str_replace(array("\r\n", "\r", "\n"), '', $matches[1]);
+ }
+
+ return $matches[1];
}
// --------------------------------------------------------------------
@@ -1357,7 +1375,7 @@ class CI_Email {
{
case 'mail' :
- if (! $this->_send_with_mail())
+ if ( ! $this->_send_with_mail())
{
$this->_set_error_message('email_send_failure_phpmail');
return FALSE;
@@ -1365,7 +1383,7 @@ class CI_Email {
break;
case 'sendmail' :
- if (! $this->_send_with_sendmail())
+ if ( ! $this->_send_with_sendmail())
{
$this->_set_error_message('email_send_failure_sendmail');
return FALSE;
@@ -1373,7 +1391,7 @@ class CI_Email {
break;
case 'smtp' :
- if (! $this->_send_with_smtp())
+ if ( ! $this->_send_with_smtp())
{
$this->_set_error_message('email_send_failure_smtp');
return FALSE;
@@ -1398,7 +1416,7 @@ class CI_Email {
{
if ($this->_safe_mode == TRUE)
{
- if (! mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str))
+ if ( ! mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str))
return FALSE;
else
return TRUE;
@@ -1407,7 +1425,7 @@ class CI_Email {
{
// most documentation of sendmail using the "-f" flag lacks a space after it, however
// we've encountered servers that seem to require it to be in place.
- if (! mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, "-f ".$this->clean_email($this->_headers['From'])))
+ if ( ! mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, "-f ".$this->clean_email($this->_headers['From'])))
return FALSE;
else
return TRUE;
@@ -1426,7 +1444,7 @@ class CI_Email {
{
$fp = @popen($this->mailpath . " -oi -f ".$this->clean_email($this->_headers['From'])." -t", 'w');
- if (! is_resource($fp))
+ if ( ! is_resource($fp))
{
$this->_set_error_message('email_no_socket');
return FALSE;
@@ -1519,7 +1537,7 @@ class CI_Email {
$errstr,
$this->smtp_timeout);
- if(! is_resource($this->_smtp_connect))
+ if( ! is_resource($this->_smtp_connect))
{
$this->_set_error_message('email_smtp_error', $errno." ".$errstr);
return FALSE;
@@ -1606,7 +1624,7 @@ class CI_Email {
*/
function _smtp_authenticate()
{
- if (! $this->_smtp_auth)
+ if ( ! $this->_smtp_auth)
{
return TRUE;
}
@@ -1660,7 +1678,7 @@ class CI_Email {
*/
function _send_data($data)
{
- if (! fwrite($this->_smtp_connect, $data . $this->newline))
+ if ( ! fwrite($this->_smtp_connect, $data . $this->newline))
{
$this->_set_error_message('email_smtp_data_failure', $data);
return FALSE;
@@ -1739,7 +1757,7 @@ class CI_Email {
$this->_IP = end($x);
}
- if (! preg_match( "/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $this->_IP))
+ if ( ! preg_match( "/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $this->_IP))
{
$this->_IP = '0.0.0.0';
}
@@ -1899,7 +1917,7 @@ class CI_Email {
'eml' => 'message/rfc822'
);
- return (! isset($mimes[strtolower($ext)])) ? "application/x-unknown-content-type" : $mimes[strtolower($ext)];
+ return ( ! isset($mimes[strtolower($ext)])) ? "application/x-unknown-content-type" : $mimes[strtolower($ext)];
}
}
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index 4b13efda3..7ad577251 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.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
*
@@ -44,7 +44,7 @@ class CI_Encrypt {
function CI_Encrypt()
{
$this->CI =& get_instance();
- $this->_mcrypt_exists = (! function_exists('mcrypt_encrypt')) ? FALSE : TRUE;
+ $this->_mcrypt_exists = ( ! function_exists('mcrypt_encrypt')) ? FALSE : TRUE;
log_message('debug', "Encrypt Class Initialized");
}
@@ -459,9 +459,9 @@ class CI_Encrypt {
*/
function sha1($str)
{
- if (! function_exists('sha1'))
+ if ( ! function_exists('sha1'))
{
- if (! function_exists('mhash'))
+ if ( ! function_exists('mhash'))
{
require_once(BASEPATH.'libraries/Sha1'.EXT);
$SH = new CI_SHA;
@@ -481,6 +481,6 @@ class CI_Encrypt {
}
// END CI_Encrypt class
-
-/* End of file Encrypt.php */
+
+/* End of file Encrypt.php */
/* Location: ./system/libraries/Encrypt.php */ \ No newline at end of file
diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php
index 428759042..5ce243a5e 100644
--- a/system/libraries/Exceptions.php
+++ b/system/libraries/Exceptions.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
*
@@ -74,7 +74,7 @@ class CI_Exceptions {
*/
function log_exception($severity, $message, $filepath, $line)
{
- $severity = (! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
+ $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE);
}
@@ -115,7 +115,7 @@ class CI_Exceptions {
*/
function show_error($heading, $message, $template = 'error_general')
{
- $message = '<p>'.implode('</p><p>', (! is_array($message)) ? array($message) : $message).'</p>';
+ $message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
if (ob_get_level() > $this->ob_level + 1)
{
@@ -142,7 +142,7 @@ class CI_Exceptions {
*/
function show_php_error($severity, $message, $filepath, $line)
{
- $severity = (! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
+ $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
$filepath = str_replace("\\", "/", $filepath);
@@ -167,6 +167,6 @@ class CI_Exceptions {
}
// END Exceptions Class
-
-/* End of file Exceptions.php */
+
+/* End of file Exceptions.php */
/* Location: ./system/libraries/Exceptions.php */ \ No newline at end of file
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 01354cf05..170ebe1c4 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.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
*
@@ -98,7 +98,7 @@ class CI_FTP {
return FALSE;
}
- if (! $this->_login())
+ if ( ! $this->_login())
{
if ($this->debug == TRUE)
{
@@ -139,7 +139,7 @@ class CI_FTP {
*/
function _is_conn()
{
- if (! is_resource($this->conn_id))
+ if ( ! is_resource($this->conn_id))
{
if ($this->debug == TRUE)
{
@@ -216,7 +216,7 @@ class CI_FTP {
}
// Set file permissions if needed
- if (! is_null($permissions))
+ if ( ! is_null($permissions))
{
$this->chmod($path, (int)$permissions);
}
@@ -237,12 +237,12 @@ class CI_FTP {
*/
function upload($locpath, $rempath, $mode = 'auto', $permissions = NULL)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
- if (! file_exists($locpath))
+ if ( ! file_exists($locpath))
{
$this->_error('ftp_no_source_file');
return FALSE;
@@ -270,7 +270,7 @@ class CI_FTP {
}
// Set file permissions if needed
- if (! is_null($permissions))
+ if ( ! is_null($permissions))
{
$this->chmod($rempath, (int)$permissions);
}
@@ -291,7 +291,7 @@ class CI_FTP {
*/
function rename($old_file, $new_file, $move = FALSE)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -338,7 +338,7 @@ class CI_FTP {
*/
function delete_file($filepath)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -369,7 +369,7 @@ class CI_FTP {
*/
function delete_dir($filepath)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -385,7 +385,7 @@ class CI_FTP {
{
// If we can't delete the item it's probaly a folder so
// we'll recursively call delete_dir()
- if (! @ftp_delete($this->conn_id, $item))
+ if ( ! @ftp_delete($this->conn_id, $item))
{
$this->delete_dir($item);
}
@@ -418,13 +418,13 @@ class CI_FTP {
*/
function chmod($path, $perm)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
// Permissions can only be set when running PHP 5
- if (! function_exists('ftp_chmod'))
+ if ( ! function_exists('ftp_chmod'))
{
if ($this->debug == TRUE)
{
@@ -457,7 +457,7 @@ class CI_FTP {
*/
function list_files($path = '.')
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -481,7 +481,7 @@ class CI_FTP {
*/
function mirror($locpath, $rempath)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -490,10 +490,10 @@ class CI_FTP {
if ($fp = @opendir($locpath))
{
// Attempt to open the remote file path.
- if (! $this->changedir($rempath, TRUE))
+ if ( ! $this->changedir($rempath, TRUE))
{
// If it doesn't exist we'll attempt to create the direcotory
- if (! $this->mkdir($rempath) OR ! $this->changedir($rempath))
+ if ( ! $this->mkdir($rempath) OR ! $this->changedir($rempath))
{
return FALSE;
}
@@ -586,7 +586,7 @@ class CI_FTP {
*/
function close()
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -613,6 +613,6 @@ class CI_FTP {
}
// END FTP Class
-
-/* End of file Ftp.php */
+
+/* End of file Ftp.php */
/* Location: ./system/libraries/Ftp.php */ \ No newline at end of file
diff --git a/system/libraries/Hooks.php b/system/libraries/Hooks.php
index d7637c39e..8c99bdd10 100644
--- a/system/libraries/Hooks.php
+++ b/system/libraries/Hooks.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
*
@@ -68,7 +68,7 @@ class CI_Hooks {
@include(APPPATH.'config/hooks'.EXT);
- if (! isset($hook) OR ! is_array($hook))
+ if ( ! isset($hook) OR ! is_array($hook))
{
return;
}
@@ -90,7 +90,7 @@ class CI_Hooks {
*/
function _call_hook($which = '')
{
- if (! $this->enabled OR ! isset($this->hooks[$which]))
+ if ( ! $this->enabled OR ! isset($this->hooks[$which]))
{
return FALSE;
}
@@ -123,7 +123,7 @@ class CI_Hooks {
*/
function _run_hook($data)
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
return FALSE;
}
@@ -144,14 +144,14 @@ class CI_Hooks {
// Set file path
// -----------------------------------
- if (! isset($data['filepath']) OR ! isset($data['filename']))
+ if ( ! isset($data['filepath']) OR ! isset($data['filename']))
{
return FALSE;
}
$filepath = APPPATH.$data['filepath'].'/'.$data['filename'];
- if (! file_exists($filepath))
+ if ( ! file_exists($filepath))
{
return FALSE;
}
@@ -196,7 +196,7 @@ class CI_Hooks {
if ($class !== FALSE)
{
- if (! class_exists($class))
+ if ( ! class_exists($class))
{
require($filepath);
}
@@ -206,7 +206,7 @@ class CI_Hooks {
}
else
{
- if (! function_exists($function))
+ if ( ! function_exists($function))
{
require($filepath);
}
@@ -221,6 +221,6 @@ class CI_Hooks {
}
// END CI_Hooks class
-
-/* End of file Hooks.php */
+
+/* End of file Hooks.php */
/* Location: ./system/libraries/Hooks.php */ \ No newline at end of file
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 4017afb13..a602b4645 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.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
*
@@ -158,7 +158,7 @@ class CI_Image_lib {
* properties using ImageMagick and NetPBM
*
*/
- if (! function_exists('getimagesize'))
+ if ( ! function_exists('getimagesize'))
{
$this->set_error('imglib_gd_required_for_props');
return FALSE;
@@ -188,7 +188,7 @@ class CI_Image_lib {
$this->source_folder = str_replace($this->source_image, '', $full_source_path);
// Set the Image Properties
- if (! $this->get_image_properties($this->source_folder.$this->source_image))
+ if ( ! $this->get_image_properties($this->source_folder.$this->source_image))
{
return FALSE;
}
@@ -226,7 +226,7 @@ class CI_Image_lib {
}
// Is there a file name?
- if (! preg_match("#[\.jpg|\.jpeg|\.gif|\.png]$#i", $full_dest_path))
+ if ( ! preg_match("#[\.jpg|\.jpeg|\.gif|\.png]$#i", $full_dest_path))
{
$this->dest_folder = $full_dest_path.'/';
$this->dest_image = $this->source_image;
@@ -478,7 +478,7 @@ class CI_Image_lib {
// we'll simply make a copy of the original with the new name
if (($this->orig_width == $this->width AND $this->orig_height == $this->height) AND ($this->source_image != $this->new_image))
{
- if (! @copy($this->full_src_path, $this->full_dst_path))
+ if ( ! @copy($this->full_src_path, $this->full_dst_path))
{
$this->set_error('imglib_copy_failed');
return FALSE;
@@ -494,7 +494,7 @@ class CI_Image_lib {
}
// Create the image handle
- if (! ($src_img = $this->image_create_gd()))
+ if ( ! ($src_img = $this->image_create_gd()))
{
return FALSE;
}
@@ -528,7 +528,7 @@ class CI_Image_lib {
else
{
// Or save it
- if (! $this->image_save_gd($dst_img))
+ if ( ! $this->image_save_gd($dst_img))
{
return FALSE;
}
@@ -564,9 +564,9 @@ class CI_Image_lib {
return FALSE;
}
- if (! eregi("convert$", $this->library_path))
+ if ( ! eregi("convert$", $this->library_path))
{
- if (! eregi("/$", $this->library_path)) $this->library_path .= "/";
+ if ( ! eregi("/$", $this->library_path)) $this->library_path .= "/";
$this->library_path .= 'convert';
}
@@ -712,14 +712,14 @@ class CI_Image_lib {
{
// Is Image Rotation Supported?
// this function is only supported as of PHP 4.3
- if (! function_exists('imagerotate'))
+ if ( ! function_exists('imagerotate'))
{
$this->set_error('imglib_rotate_unsupported');
return FALSE;
}
// Create the image handle
- if (! ($src_img = $this->image_create_gd()))
+ if ( ! ($src_img = $this->image_create_gd()))
{
return FALSE;
}
@@ -742,7 +742,7 @@ class CI_Image_lib {
else
{
// Or save it
- if (! $this->image_save_gd($dst_img))
+ if ( ! $this->image_save_gd($dst_img))
{
return FALSE;
}
@@ -771,7 +771,7 @@ class CI_Image_lib {
*/
function image_mirror_gd()
{
- if (! $src_img = $this->image_create_gd())
+ if ( ! $src_img = $this->image_create_gd())
{
return FALSE;
}
@@ -828,7 +828,7 @@ class CI_Image_lib {
else
{
// Or save it
- if (! $this->image_save_gd($src_img))
+ if ( ! $this->image_save_gd($src_img))
{
return FALSE;
}
@@ -877,7 +877,7 @@ class CI_Image_lib {
*/
function overlay_watermark()
{
- if (! function_exists('imagecolortransparent'))
+ if ( ! function_exists('imagecolortransparent'))
{
$this->set_error('imglib_gd_required');
return FALSE;
@@ -968,7 +968,7 @@ class CI_Image_lib {
}
else
{
- if (! $this->image_save_gd($src_img))
+ if ( ! $this->image_save_gd($src_img))
{
return FALSE;
}
@@ -990,7 +990,7 @@ class CI_Image_lib {
*/
function text_watermark()
{
- if (! ($src_img = $this->image_create_gd()))
+ if ( ! ($src_img = $this->image_create_gd()))
{
return FALSE;
}
@@ -1144,7 +1144,7 @@ class CI_Image_lib {
switch ($image_type)
{
case 1 :
- if (! function_exists('imagecreatefromgif'))
+ if ( ! function_exists('imagecreatefromgif'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_gif_not_supported'));
return FALSE;
@@ -1153,7 +1153,7 @@ class CI_Image_lib {
return imagecreatefromgif($path);
break;
case 2 :
- if (! function_exists('imagecreatefromjpeg'))
+ if ( ! function_exists('imagecreatefromjpeg'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_jpg_not_supported'));
return FALSE;
@@ -1162,7 +1162,7 @@ class CI_Image_lib {
return imagecreatefromjpeg($path);
break;
case 3 :
- if (! function_exists('imagecreatefrompng'))
+ if ( ! function_exists('imagecreatefrompng'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported'));
return FALSE;
@@ -1194,7 +1194,7 @@ class CI_Image_lib {
switch ($this->image_type)
{
case 1 :
- if (! function_exists('imagegif'))
+ if ( ! function_exists('imagegif'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_gif_not_supported'));
return FALSE;
@@ -1203,7 +1203,7 @@ class CI_Image_lib {
@imagegif($resource, $this->full_dst_path);
break;
case 2 :
- if (! function_exists('imagejpeg'))
+ if ( ! function_exists('imagejpeg'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_jpg_not_supported'));
return FALSE;
@@ -1217,7 +1217,7 @@ class CI_Image_lib {
@imagejpeg($resource, $this->full_dst_path, $this->quality);
break;
case 3 :
- if (! function_exists('imagepng'))
+ if ( ! function_exists('imagepng'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported'));
return FALSE;
@@ -1280,10 +1280,10 @@ class CI_Image_lib {
*/
function image_reproportion()
{
- if (! is_numeric($this->width) OR ! is_numeric($this->height) OR $this->width == 0 OR $this->height == 0)
+ if ( ! is_numeric($this->width) OR ! is_numeric($this->height) OR $this->width == 0 OR $this->height == 0)
return;
- if (! is_numeric($this->orig_width) OR ! is_numeric($this->orig_height) OR $this->orig_width == 0 OR $this->orig_height == 0)
+ if ( ! is_numeric($this->orig_width) OR ! is_numeric($this->orig_height) OR $this->orig_width == 0 OR $this->orig_height == 0)
return;
$new_width = ceil($this->orig_width*$this->height/$this->orig_height);
@@ -1328,7 +1328,7 @@ class CI_Image_lib {
if ($path == '')
$path = $this->full_src_path;
- if (! file_exists($path))
+ if ( ! file_exists($path))
{
$this->set_error('imglib_invalid_path');
return FALSE;
@@ -1382,14 +1382,14 @@ class CI_Image_lib {
*/
function size_calculator($vals)
{
- if (! is_array($vals))
+ if ( ! is_array($vals))
return;
$allowed = array('new_width', 'new_height', 'width', 'height');
foreach ($allowed as $item)
{
- if (! isset($vals[$item]) OR $vals[$item] == '')
+ if ( ! isset($vals[$item]) OR $vals[$item] == '')
$vals[$item] = 0;
}
@@ -1460,9 +1460,9 @@ class CI_Image_lib {
*/
function gd_loaded()
{
- if (! extension_loaded('gd'))
+ if ( ! extension_loaded('gd'))
{
- if (! dl('gd.so'))
+ if ( ! dl('gd.so'))
{
return FALSE;
}
diff --git a/system/libraries/Input.php b/system/libraries/Input.php
index f98757947..978d1ff34 100644
--- a/system/libraries/Input.php
+++ b/system/libraries/Input.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
*
@@ -77,9 +77,9 @@ class CI_Input {
// This is effectively the same as register_globals = off
foreach (array($_GET, $_POST, $_COOKIE, $_SERVER, $_FILES, $_ENV, (isset($_SESSION) && is_array($_SESSION)) ? $_SESSION : array()) as $global)
{
- if (! is_array($global))
+ if ( ! is_array($global))
{
- if (! in_array($global, $protected))
+ if ( ! in_array($global, $protected))
{
unset($GLOBALS[$global]);
}
@@ -88,7 +88,7 @@ class CI_Input {
{
foreach ($global as $key => $val)
{
- if (! in_array($key, $protected))
+ if ( ! in_array($key, $protected))
{
unset($GLOBALS[$key]);
}
@@ -97,7 +97,7 @@ class CI_Input {
{
foreach($val as $k => $v)
{
- if (! in_array($k, $protected))
+ if ( ! in_array($k, $protected))
{
unset($GLOBALS[$k]);
}
@@ -181,7 +181,12 @@ class CI_Input {
}
// Standardize newlines
- return preg_replace("/\015\012|\015|\012/", "\n", $str);
+ if (strpos($str, "\r") !== FALSE)
+ {
+ $str = str_replace(array("\r\n", "\r"), "\n", $str);
+ }
+
+ return $str;
}
// --------------------------------------------------------------------
@@ -199,7 +204,7 @@ class CI_Input {
*/
function _clean_input_keys($str)
{
- if (! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
+ if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
{
exit('Disallowed Key Characters.');
}
@@ -219,7 +224,7 @@ class CI_Input {
*/
function get($index = '', $xss_clean = FALSE)
{
- if (! isset($_GET[$index]))
+ if ( ! isset($_GET[$index]))
{
return FALSE;
}
@@ -254,7 +259,7 @@ class CI_Input {
*/
function post($index = '', $xss_clean = FALSE)
{
- if (! isset($_POST[$index]))
+ if ( ! isset($_POST[$index]))
{
return FALSE;
}
@@ -289,7 +294,7 @@ class CI_Input {
*/
function cookie($index = '', $xss_clean = FALSE)
{
- if (! isset($_COOKIE[$index]))
+ if ( ! isset($_COOKIE[$index]))
{
return FALSE;
}
@@ -329,7 +334,7 @@ class CI_Input {
*/
function server($index = '', $xss_clean = FALSE)
{
- if (! isset($_SERVER[$index]))
+ if ( ! isset($_SERVER[$index]))
{
return FALSE;
}
@@ -386,7 +391,7 @@ class CI_Input {
$this->ip_address = end($x);
}
- if (! $this->valid_ip($this->ip_address))
+ if ( ! $this->valid_ip($this->ip_address))
{
$this->ip_address = '0.0.0.0';
}
@@ -448,7 +453,7 @@ class CI_Input {
return $this->user_agent;
}
- $this->user_agent = (! isset($_SERVER['HTTP_USER_AGENT'])) ? FALSE : $_SERVER['HTTP_USER_AGENT'];
+ $this->user_agent = ( ! isset($_SERVER['HTTP_USER_AGENT'])) ? FALSE : $_SERVER['HTTP_USER_AGENT'];
return $this->user_agent;
}
@@ -650,8 +655,9 @@ class CI_Input {
*
*/
- if (strpos($str, "\t") !== FALSE) {
- $str = str_replace("\t", " ", $str);
+ if (strpos($str, "\t") !== FALSE)
+ {
+ $str = str_replace("\t", ' ', $str);
}
/*
diff --git a/system/libraries/Language.php b/system/libraries/Language.php
index aacc6c1f9..f97db3506 100644
--- a/system/libraries/Language.php
+++ b/system/libraries/Language.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
*
@@ -83,7 +83,7 @@ class CI_Language {
}
- if (! isset($lang))
+ if ( ! isset($lang))
{
log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile);
return;
@@ -118,6 +118,6 @@ class CI_Language {
}
// END Language Class
-
-/* End of file Language.php */
+
+/* End of file Language.php */
/* Location: ./system/libraries/Language.php */ \ No newline at end of file
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 7c6da8849..5e3819ea6 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.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
*
@@ -152,7 +152,7 @@ class CI_Loader {
$model = strtolower($model);
- if (! file_exists(APPPATH.'models/'.$path.$model.EXT))
+ if ( ! file_exists(APPPATH.'models/'.$path.$model.EXT))
{
show_error('Unable to locate the model you have specified: '.$model);
}
@@ -165,7 +165,7 @@ class CI_Loader {
$CI->load->database($db_conn, FALSE, TRUE);
}
- if (! class_exists('Model'))
+ if ( ! class_exists('Model'))
{
load_class('Model', FALSE);
}
@@ -230,7 +230,7 @@ class CI_Loader {
*/
function dbutil()
{
- if (! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB'))
{
$this->database();
}
@@ -260,7 +260,7 @@ class CI_Loader {
*/
function dbforge()
{
- if (! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB'))
{
$this->database();
}
@@ -355,7 +355,7 @@ class CI_Loader {
*/
function helper($helpers = array())
{
- if (! is_array($helpers))
+ if ( ! is_array($helpers))
{
$helpers = array($helpers);
}
@@ -376,7 +376,7 @@ class CI_Loader {
{
$base_helper = BASEPATH.'helpers/'.$helper.EXT;
- if (! file_exists($base_helper))
+ if ( ! file_exists($base_helper))
{
show_error('Unable to load the requested file: helpers/'.$helper.EXT);
}
@@ -437,7 +437,7 @@ class CI_Loader {
*/
function plugin($plugins = array())
{
- if (! is_array($plugins))
+ if ( ! is_array($plugins))
{
$plugins = array($plugins);
}
@@ -507,7 +507,7 @@ class CI_Loader {
*/
function script($scripts = array())
{
- if (! is_array($scripts))
+ if ( ! is_array($scripts))
{
$scripts = array($scripts);
}
@@ -521,7 +521,7 @@ class CI_Loader {
continue;
}
- if (! file_exists(APPPATH.'scripts/'.$script.EXT))
+ if ( ! file_exists(APPPATH.'scripts/'.$script.EXT))
{
show_error('Unable to load the requested script: scripts/'.$script.EXT);
}
@@ -546,7 +546,7 @@ class CI_Loader {
{
$CI =& get_instance();
- if (! is_array($file))
+ if ( ! is_array($file))
{
$file = array($file);
}
@@ -632,7 +632,7 @@ class CI_Loader {
// Set the default data variables
foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val)
{
- $$_ci_val = (! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
+ $$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
}
// Set the path to the requested file
@@ -648,7 +648,7 @@ class CI_Loader {
$_ci_file = end($_ci_x);
}
- if (! file_exists($_ci_path))
+ if ( ! file_exists($_ci_path))
{
show_error('Unable to load the requested file: '.$_ci_file);
}
@@ -662,7 +662,7 @@ class CI_Loader {
$_ci_CI =& get_instance();
foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var)
{
- if (! isset($this->$_ci_key))
+ if ( ! isset($this->$_ci_key))
{
$this->$_ci_key =& $_ci_CI->$_ci_key;
}
@@ -703,7 +703,7 @@ class CI_Loader {
if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
{
- echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
+ echo eval(preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
}
else
{
@@ -770,7 +770,7 @@ class CI_Loader {
{
$baseclass = BASEPATH.'libraries/'.ucfirst($class).EXT;
- if (! file_exists($baseclass))
+ if ( ! file_exists($baseclass))
{
log_message('error', "Unable to load the requested class: ".$class);
show_error("Unable to load the requested class: ".$class);
@@ -799,7 +799,7 @@ class CI_Loader {
$filepath = $path.'libraries/'.$class.EXT;
// Does the file exist? No? Bummer...
- if (! file_exists($filepath))
+ if ( ! file_exists($filepath))
{
continue;
}
@@ -860,7 +860,7 @@ class CI_Loader {
}
// Set the variable name we will assign the class to
- $classvar = (! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class];
+ $classvar = ( ! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class];
// Instantiate the class
$CI =& get_instance();
@@ -890,7 +890,7 @@ class CI_Loader {
{
include_once(APPPATH.'config/autoload'.EXT);
- if (! isset($autoload))
+ if ( ! isset($autoload))
{
return FALSE;
}
@@ -918,7 +918,7 @@ class CI_Loader {
// A little tweak to remain backward compatible
// The $autoload['core'] item was deprecated
- if (! isset($autoload['libraries']))
+ if ( ! isset($autoload['libraries']))
{
$autoload['libraries'] = $autoload['core'];
}
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 22b505906..4d64cd328 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.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
*
@@ -46,7 +46,7 @@ class CI_Log {
$this->log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/';
- if (! is_dir($this->log_path) OR ! is_really_writable($this->log_path))
+ if ( ! is_dir($this->log_path) OR ! is_really_writable($this->log_path))
{
$this->_enabled = FALSE;
}
@@ -84,7 +84,7 @@ class CI_Log {
$level = strtoupper($level);
- if (! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold))
+ if ( ! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold))
{
return FALSE;
}
@@ -92,12 +92,12 @@ class CI_Log {
$filepath = $this->log_path.'log-'.date('Y-m-d').EXT;
$message = '';
- if (! file_exists($filepath))
+ if ( ! file_exists($filepath))
{
- $message .= "<"."?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
+ $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
}
- if (! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
+ if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
{
return FALSE;
}
@@ -115,6 +115,6 @@ class CI_Log {
}
// END Log Class
-
-/* End of file Log.php */
+
+/* End of file Log.php */
/* Location: ./system/libraries/Log.php */ \ No newline at end of file
diff --git a/system/libraries/Model.php b/system/libraries/Model.php
index 1e7b9a184..5c8d43363 100644
--- a/system/libraries/Model.php
+++ b/system/libraries/Model.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
*
@@ -59,7 +59,7 @@ class Model {
$CI =& get_instance();
foreach (array_keys(get_object_vars($CI)) as $key)
{
- if (! isset($this->$key) AND $key != $this->_parent_name)
+ if ( ! isset($this->$key) AND $key != $this->_parent_name)
{
// In some cases using references can cause
// problems so we'll conditionally use them
@@ -79,6 +79,6 @@ class Model {
}
// END Model Class
-
-/* End of file Model.php */
+
+/* End of file Model.php */
/* Location: ./system/libraries/Model.php */ \ No newline at end of file
diff --git a/system/libraries/Output.php b/system/libraries/Output.php
index f76550e2b..49cfc0a28 100644
--- a/system/libraries/Output.php
+++ b/system/libraries/Output.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
*
@@ -137,7 +137,7 @@ class CI_Output {
*/
function cache($time)
{
- $this->cache_expiration = (! is_numeric($time)) ? 0 : $time;
+ $this->cache_expiration = ( ! is_numeric($time)) ? 0 : $time;
}
// --------------------------------------------------------------------
@@ -187,7 +187,7 @@ class CI_Output {
$elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
$output = str_replace('{elapsed_time}', $elapsed, $output);
- $memory = (! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';
+ $memory = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';
$output = str_replace('{memory_usage}', $memory, $output);
// --------------------------------------------------------------------
@@ -220,7 +220,7 @@ class CI_Output {
// Does the get_instance() function exist?
// If not we know we are dealing with a cache file so we'll
// simply echo out the data and exit.
- if (! function_exists('get_instance'))
+ if ( ! function_exists('get_instance'))
{
echo $output;
log_message('debug', "Final output sent to browser");
@@ -285,7 +285,7 @@ class CI_Output {
$cache_path = ($path == '') ? BASEPATH.'cache/' : $path;
- if (! is_dir($cache_path) OR ! is_really_writable($cache_path))
+ if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))
{
return;
}
@@ -296,7 +296,7 @@ class CI_Output {
$cache_path .= md5($uri);
- if (! $fp = @fopen($cache_path, 'wb'))
+ if ( ! $fp = @fopen($cache_path, 'wb'))
{
log_message('error', "Unable to write cache file: ".$cache_path);
return;
@@ -327,7 +327,7 @@ class CI_Output {
$cache_path = ($CFG->item('cache_path') == '') ? BASEPATH.'cache/' : $CFG->item('cache_path');
- if (! is_dir($cache_path) OR ! is_really_writable($cache_path))
+ if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))
{
return FALSE;
}
@@ -339,12 +339,12 @@ class CI_Output {
$filepath = $cache_path.md5($uri);
- if (! @file_exists($filepath))
+ if ( ! @file_exists($filepath))
{
return FALSE;
}
- if (! $fp = @fopen($filepath, 'rb'))
+ if ( ! $fp = @fopen($filepath, 'rb'))
{
return FALSE;
}
@@ -361,7 +361,7 @@ class CI_Output {
fclose($fp);
// Strip out the embedded timestamp
- if (! preg_match("/(\d+TS--->)/", $cache, $match))
+ if ( ! preg_match("/(\d+TS--->)/", $cache, $match))
{
return FALSE;
}
@@ -383,6 +383,6 @@ class CI_Output {
}
// END Output Class
-
-/* End of file Output.php */
+
+/* End of file Output.php */
/* Location: ./system/libraries/Output.php */ \ No newline at end of file
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index c3f6bd89c..10af3fd11 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.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
*
@@ -132,7 +132,7 @@ class CI_Pagination {
show_error('Your number of links must be a positive number.');
}
- if (! is_numeric($this->cur_page))
+ if ( ! is_numeric($this->cur_page))
{
$this->cur_page = 0;
}
@@ -215,6 +215,6 @@ class CI_Pagination {
}
}
// END Pagination Class
-
-/* End of file Pagination.php */
+
+/* End of file Pagination.php */
/* Location: ./system/libraries/Pagination.php */ \ No newline at end of file
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php
index f260b2e19..d349e26d3 100644
--- a/system/libraries/Parser.php
+++ b/system/libraries/Parser.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
*
@@ -130,7 +130,7 @@ class CI_Parser {
$temp = $match['1'];
foreach ($row as $key => $val)
{
- if (! is_array($val))
+ if ( ! is_array($val))
{
$temp = $this->_parse_single($key, $val, $temp);
}
@@ -158,7 +158,7 @@ class CI_Parser {
*/
function _match_pair($string, $variable)
{
- if (! preg_match("|".$this->l_delim . $variable . $this->r_delim."(.+)".$this->l_delim . '/' . $variable . $this->r_delim."|s", $string, $match))
+ if ( ! preg_match("|".$this->l_delim . $variable . $this->r_delim."(.+)".$this->l_delim . '/' . $variable . $this->r_delim."|s", $string, $match))
{
return FALSE;
}
@@ -168,6 +168,6 @@ class CI_Parser {
}
// END Parser Class
-
-/* End of file Parser.php */
+
+/* End of file Parser.php */
/* Location: ./system/libraries/Parser.php */ \ No newline at end of file
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index fe4fb6d62..da1fff19b 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.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
*
@@ -106,7 +106,7 @@ class CI_Profiler {
$output .= '<fieldset style="border:1px solid #0000FF;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
- if (! class_exists('CI_DB_driver'))
+ if ( ! class_exists('CI_DB_driver'))
{
$output .= '<legend style="color:#0000FF;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_queries').'&nbsp;&nbsp;</legend>';
$output .= "\n";
@@ -175,7 +175,7 @@ class CI_Profiler {
foreach ($_GET as $key => $val)
{
- if (! is_numeric($key))
+ if ( ! is_numeric($key))
{
$key = "'".$key."'";
}
@@ -225,7 +225,7 @@ class CI_Profiler {
foreach ($_POST as $key => $val)
{
- if (! is_numeric($key))
+ if ( ! is_numeric($key))
{
$key = "'".$key."'";
}
@@ -340,6 +340,6 @@ class CI_Profiler {
}
// END CI_Profiler class
-
-/* End of file Profiler.php */
+
+/* End of file Profiler.php */
/* Location: ./system/libraries/Profiler.php */ \ No newline at end of file
diff --git a/system/libraries/Router.php b/system/libraries/Router.php
index 3b2520dce..6e705f842 100644
--- a/system/libraries/Router.php
+++ b/system/libraries/Router.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
*
@@ -80,12 +80,12 @@ class CI_Router {
// Load the routes.php file.
@include(APPPATH.'config/routes'.EXT);
- $this->routes = (! isset($route) OR ! is_array($route)) ? array() : $route;
+ $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
unset($route);
// Set the default controller so we can display it in the event
// the URI doesn't correlated to a valid controller.
- $this->default_controller = (! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : strtolower($this->routes['default_controller']);
+ $this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : strtolower($this->routes['default_controller']);
// Fetch the complete URI string
$this->uri->_fetch_uri_string();
@@ -202,7 +202,7 @@ class CI_Router {
if (count($segments) > 0)
{
// Does the requested controller exist in the sub-folder?
- if (! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT))
+ if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT))
{
show_404($this->fetch_directory().$segments[0]);
}
@@ -213,7 +213,7 @@ class CI_Router {
$this->set_method('index');
// Does the default controller exist in the sub-folder?
- if (! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT))
+ if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT))
{
$this->directory = '';
return array();
@@ -374,6 +374,6 @@ class CI_Router {
}
// END Router Class
-
-/* End of file Router.php */
+
+/* End of file Router.php */
/* Location: ./system/libraries/Router.php */ \ No newline at end of file
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index ce1b75e66..31a162e81 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.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 @@ class CI_Session {
* a new one. If it does, we'll update it.
*
*/
- if (! $this->sess_read())
+ if ( ! $this->sess_read())
{
$this->sess_create();
}
@@ -214,7 +214,7 @@ class CI_Session {
$session = @unserialize($this->strip_slashes($session));
- if (! is_array($session) OR ! isset($session['last_activity']))
+ if ( ! is_array($session) OR ! isset($session['last_activity']))
{
log_message('error', 'The session cookie data did not contain a valid array. This could be a possible hacking attempt.');
return FALSE;
@@ -439,7 +439,7 @@ class CI_Session {
*/
function userdata($item)
{
- return (! isset($this->userdata[$item])) ? FALSE : $this->userdata[$item];
+ return ( ! isset($this->userdata[$item])) ? FALSE : $this->userdata[$item];
}
// --------------------------------------------------------------------
@@ -452,7 +452,7 @@ class CI_Session {
*/
function all_userdata()
{
- return (! isset($this->userdata)) ? FALSE : $this->userdata;
+ return ( ! isset($this->userdata)) ? FALSE : $this->userdata;
}
// --------------------------------------------------------------------
@@ -649,6 +649,6 @@ class CI_Session {
}
// END Session Class
-
-/* End of file Session.php */
+
+/* End of file Session.php */
/* Location: ./system/libraries/Session.php */ \ No newline at end of file
diff --git a/system/libraries/Sha1.php b/system/libraries/Sha1.php
index a7b9b98d3..71b4ccd0d 100644
--- a/system/libraries/Sha1.php
+++ b/system/libraries/Sha1.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
*
@@ -246,6 +246,6 @@ class CI_SHA {
}
}
// END CI_SHA
-
-/* End of file Sha1.php */
+
+/* End of file Sha1.php */
/* Location: ./system/libraries/Sha1.php */ \ No newline at end of file
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index f4df02e76..a803b6f69 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.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
*
@@ -53,7 +53,7 @@ class CI_Table {
*/
function set_template($template)
{
- if (! is_array($template))
+ if ( ! is_array($template))
{
return FALSE;
}
@@ -93,7 +93,7 @@ class CI_Table {
*/
function make_columns($array = array(), $col_limit = 0)
{
- if (! is_array($array) OR count($array) == 0)
+ if ( ! is_array($array) OR count($array) == 0)
{
return FALSE;
}
@@ -186,7 +186,7 @@ class CI_Table {
{
// The table data can optionally be passed to this function
// either as a database result object or an array
- if (! is_null($table_data))
+ if ( ! is_null($table_data))
{
if (is_object($table_data))
{
@@ -245,7 +245,7 @@ class CI_Table {
$i = 1;
foreach($this->rows as $row)
{
- if (! is_array($row))
+ if ( ! is_array($row))
{
break;
}
@@ -308,7 +308,7 @@ class CI_Table {
*/
function _set_from_object($query)
{
- if (! is_object($query))
+ if ( ! is_object($query))
{
return FALSE;
}
@@ -316,7 +316,7 @@ class CI_Table {
// First generate the headings from the table column names
if (count($this->heading) == 0)
{
- if (! method_exists($query, 'list_fields'))
+ if ( ! method_exists($query, 'list_fields'))
{
return FALSE;
}
@@ -346,7 +346,7 @@ class CI_Table {
*/
function _set_from_array($data, $set_heading = TRUE)
{
- if (! is_array($data) OR count($data) == 0)
+ if ( ! is_array($data) OR count($data) == 0)
{
return FALSE;
}
@@ -354,7 +354,7 @@ class CI_Table {
$i = 0;
foreach ($data as $row)
{
- if (! is_array($row))
+ if ( ! is_array($row))
{
$this->rows[] = $data;
break;
@@ -393,7 +393,7 @@ class CI_Table {
$this->temp = $this->_default_template();
foreach (array('table_open','heading_row_start', 'heading_row_end', 'heading_cell_start', 'heading_cell_end', 'row_start', 'row_end', 'cell_start', 'cell_end', 'row_alt_start', 'row_alt_end', 'cell_alt_start', 'cell_alt_end', 'table_close') as $val)
{
- if (! isset($this->template[$val]))
+ if ( ! isset($this->template[$val]))
{
$this->template[$val] = $this->temp[$val];
}
@@ -435,6 +435,6 @@ class CI_Table {
}
-
-/* End of file Table.php */
+
+/* End of file Table.php */
/* Location: ./system/libraries/Table.php */ \ No newline at end of file
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index 41ac5fca8..6696fd2da 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.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
*
@@ -56,7 +56,7 @@ class CI_Trackback {
*/
function send($tb_data)
{
- if (! is_array($tb_data))
+ if ( ! is_array($tb_data))
{
$this->set_error('The send() method must be passed an array');
return FALSE;
@@ -65,7 +65,7 @@ class CI_Trackback {
// Pre-process the Trackback Data
foreach (array('url', 'title', 'excerpt', 'blog_name', 'ping_url') as $item)
{
- if (! isset($tb_data[$item]))
+ if ( ! isset($tb_data[$item]))
{
$this->set_error('Required item missing: '.$item);
return FALSE;
@@ -102,7 +102,7 @@ class CI_Trackback {
}
// Build the Trackback data string
- $charset = (! isset($tb_data['charset'])) ? $this->charset : $tb_data['charset'];
+ $charset = ( ! isset($tb_data['charset'])) ? $this->charset : $tb_data['charset'];
$data = "url=".rawurlencode($url)."&title=".rawurlencode($title)."&blog_name=".rawurlencode($blog_name)."&excerpt=".rawurlencode($excerpt)."&charset=".rawurlencode($charset);
@@ -139,13 +139,13 @@ class CI_Trackback {
{
foreach (array('url', 'title', 'blog_name', 'excerpt') as $val)
{
- if (! isset($_POST[$val]) OR $_POST[$val] == '')
+ if ( ! isset($_POST[$val]) OR $_POST[$val] == '')
{
$this->set_error('The following required POST variable is missing: '.$val);
return FALSE;
}
- $this->data['charset'] = (! isset($_POST['charset'])) ? 'auto' : strtoupper(trim($_POST['charset']));
+ $this->data['charset'] = ( ! isset($_POST['charset'])) ? 'auto' : strtoupper(trim($_POST['charset']));
if ($val != 'url' && function_exists('mb_convert_encoding'))
{
@@ -212,7 +212,7 @@ class CI_Trackback {
*/
function data($item)
{
- return (! isset($this->data[$item])) ? '' : $this->data[$item];
+ return ( ! isset($this->data[$item])) ? '' : $this->data[$item];
}
// --------------------------------------------------------------------
@@ -233,14 +233,14 @@ class CI_Trackback {
$target = parse_url($url);
// Open the socket
- if (! $fp = @fsockopen($target['host'], 80))
+ if ( ! $fp = @fsockopen($target['host'], 80))
{
$this->set_error('Invalid Connection: '.$url);
return FALSE;
}
// Build the path
- $ppath = (! isset($target['path'])) ? $url : $target['path'];
+ $ppath = ( ! isset($target['path'])) ? $url : $target['path'];
$path = (isset($target['query']) && $target['query'] != "") ? $ppath.'?'.$target['query'] : $ppath;
@@ -261,13 +261,13 @@ class CI_Trackback {
// Was it successful?
$this->response = "";
- while(!feof($fp))
+ while( ! feof($fp))
{
$this->response .= fgets($fp, 128);
}
@fclose($fp);
- if (! eregi("<error>0</error>", $this->response))
+ if ( ! eregi("<error>0</error>", $this->response))
{
$message = 'An unknown error was encountered';
@@ -360,7 +360,7 @@ class CI_Trackback {
$tb_array = explode('/', $url);
$tb_end = $tb_array[count($tb_array)-1];
- if (! is_numeric($tb_end))
+ if ( ! is_numeric($tb_end))
{
$tb_end = $tb_array[count($tb_array)-2];
}
@@ -378,13 +378,13 @@ class CI_Trackback {
$tb_array = explode('/', $url);
$tb_id = $tb_array[count($tb_array)-1];
- if (! is_numeric($tb_id))
+ if ( ! is_numeric($tb_id))
{
$tb_id = $tb_array[count($tb_array)-2];
}
}
- if (! preg_match ("/^([0-9]+)$/", $tb_id))
+ if ( ! preg_match ("/^([0-9]+)$/", $tb_id))
{
return false;
}
@@ -439,8 +439,8 @@ class CI_Trackback {
{
return $str;
}
-
- $str = preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str));
+
+ $str = preg_replace("/\s+/", ' ', str_replace(array("\r\n", "\r", "\n"), ' ', $str));
if (strlen($str) <= $n)
{
@@ -545,6 +545,6 @@ class CI_Trackback {
}
// END Trackback Class
-
-/* End of file Trackback.php */
+
+/* End of file Trackback.php */
/* Location: ./system/libraries/Trackback.php */ \ No newline at end of file
diff --git a/system/libraries/URI.php b/system/libraries/URI.php
index 26a7b4a33..4d0cd9c17 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 @@ class CI_URI {
*/
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 @@ class CI_URI {
{
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 @@ class CI_URI {
*/
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 @@ class CI_URI {
*/
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 @@ class CI_URI {
$segment_array = 'rsegment_array';
}
- if (! is_numeric($n))
+ if ( ! is_numeric($n))
{
return $default;
}
@@ -410,7 +410,7 @@ class CI_URI {
{
foreach ($default as $val)
{
- if (! array_key_exists($val, $retval))
+ if ( ! array_key_exists($val, $retval))
{
$retval[$val] = FALSE;
}
@@ -586,6 +586,6 @@ class CI_URI {
}
// END URI Class
-
-/* End of file URI.php */
+
+/* End of file URI.php */
/* Location: ./system/libraries/URI.php */ \ No newline at end of file
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index bfa6d5dc5..e53e04c15 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.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
*
@@ -262,8 +262,8 @@ class CI_Unit_test {
{
$back = debug_backtrace();
- $file = (! isset($back['1']['file'])) ? '' : $back['1']['file'];
- $line = (! isset($back['1']['line'])) ? '' : $back['1']['line'];
+ $file = ( ! isset($back['1']['file'])) ? '' : $back['1']['file'];
+ $line = ( ! isset($back['1']['line'])) ? '' : $back['1']['line'];
return array('file' => $file, 'line' => $line);
}
@@ -302,7 +302,7 @@ class CI_Unit_test {
*/
function _parse_template()
{
- if (! is_null($this->_template_rows))
+ if ( ! is_null($this->_template_rows))
{
return;
}
@@ -313,7 +313,7 @@ class CI_Unit_test {
return;
}
- if (! preg_match("/\{rows\}(.*?)\{\/rows\}/si", $this->_template, $match))
+ if ( ! preg_match("/\{rows\}(.*?)\{\/rows\}/si", $this->_template, $match))
{
$this->_default_template();
return;
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 07cbd924b..1225ee36b 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.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
*
@@ -135,23 +135,23 @@ class CI_Upload {
function do_upload($field = 'userfile')
{
// Is $_FILES[$field] set? If not, no reason to continue.
- if (! isset($_FILES[$field]))
+ if ( ! isset($_FILES[$field]))
{
$this->set_error('upload_no_file_selected');
return FALSE;
}
// Is the upload path valid?
- if (! $this->validate_upload_path())
+ if ( ! $this->validate_upload_path())
{
// errors will already be set by validate_upload_path() so just return FALSE
return FALSE;
}
// Was the file able to be uploaded? If not, determine the reason why.
- if (! is_uploaded_file($_FILES[$field]['tmp_name']))
+ if ( ! is_uploaded_file($_FILES[$field]['tmp_name']))
{
- $error = (! isset($_FILES[$field]['error'])) ? 4 : $_FILES[$field]['error'];
+ $error = ( ! isset($_FILES[$field]['error'])) ? 4 : $_FILES[$field]['error'];
switch($error)
{
@@ -198,14 +198,14 @@ class CI_Upload {
}
// Is the file type allowed to be uploaded?
- if (! $this->is_allowed_filetype())
+ if ( ! $this->is_allowed_filetype())
{
$this->set_error('upload_invalid_filetype');
return FALSE;
}
// Is the file size within the allowed maximum?
- if (! $this->is_allowed_filesize())
+ if ( ! $this->is_allowed_filesize())
{
$this->set_error('upload_invalid_filesize');
return FALSE;
@@ -213,7 +213,7 @@ class CI_Upload {
// Are the image dimensions within the allowed size?
// Note: This can fail if the server has an open_basdir restriction.
- if (! $this->is_allowed_dimensions())
+ if ( ! $this->is_allowed_dimensions())
{
$this->set_error('upload_invalid_dimensions');
return FALSE;
@@ -253,9 +253,9 @@ class CI_Upload {
* we'll use move_uploaded_file(). One of the two should
* reliably work in most environments
*/
- if (! @copy($this->file_temp, $this->upload_path.$this->file_name))
+ if ( ! @copy($this->file_temp, $this->upload_path.$this->file_name))
{
- if (! @move_uploaded_file($this->file_temp, $this->upload_path.$this->file_name))
+ if ( ! @move_uploaded_file($this->file_temp, $this->upload_path.$this->file_name))
{
$this->set_error('upload_destination_error');
return FALSE;
@@ -350,7 +350,7 @@ class CI_Upload {
$filename = md5(uniqid(mt_rand())).$this->file_ext;
}
- if (! file_exists($path.$filename))
+ if ( ! file_exists($path.$filename))
{
return $filename;
}
@@ -360,7 +360,7 @@ class CI_Upload {
$new_filename = '';
for ($i = 1; $i < 100; $i++)
{
- if (! file_exists($path.$filename.$i.$this->file_ext))
+ if ( ! file_exists($path.$filename.$i.$this->file_ext))
{
$new_filename = $filename.$i.$this->file_ext;
break;
@@ -389,7 +389,7 @@ class CI_Upload {
*/
function set_max_filesize($n)
{
- $this->max_size = (! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_size = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
}
// --------------------------------------------------------------------
@@ -403,7 +403,7 @@ class CI_Upload {
*/
function set_max_width($n)
{
- $this->max_width = (! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_width = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
}
// --------------------------------------------------------------------
@@ -417,7 +417,7 @@ class CI_Upload {
*/
function set_max_height($n)
{
- $this->max_height = (! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_height = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
}
// --------------------------------------------------------------------
@@ -447,7 +447,7 @@ class CI_Upload {
*/
function set_image_properties($path = '')
{
- if (! $this->is_image())
+ if ( ! $this->is_image())
{
return;
}
@@ -460,7 +460,7 @@ class CI_Upload {
$this->image_width = $D['0'];
$this->image_height = $D['1'];
- $this->image_type = (! isset($types[$D['2']])) ? 'unknown' : $types[$D['2']];
+ $this->image_type = ( ! isset($types[$D['2']])) ? 'unknown' : $types[$D['2']];
$this->image_size_str = $D['3']; // string containing height and width
}
}
@@ -528,7 +528,7 @@ class CI_Upload {
*/
function is_allowed_filetype()
{
- if (count($this->allowed_types) == 0 || ! is_array($this->allowed_types))
+ if (count($this->allowed_types) == 0 OR ! is_array($this->allowed_types))
{
$this->set_error('upload_no_file_types');
return FALSE;
@@ -587,7 +587,7 @@ class CI_Upload {
*/
function is_allowed_dimensions()
{
- if (! $this->is_image())
+ if ( ! $this->is_image())
{
return TRUE;
}
@@ -636,13 +636,13 @@ class CI_Upload {
$this->upload_path = str_replace("\\", "/", realpath($this->upload_path));
}
- if (! @is_dir($this->upload_path))
+ if ( ! @is_dir($this->upload_path))
{
$this->set_error('upload_no_filepath');
return FALSE;
}
- if (! is_really_writable($this->upload_path))
+ if ( ! is_really_writable($this->upload_path))
{
$this->set_error('upload_not_writable');
return FALSE;
@@ -741,7 +741,7 @@ class CI_Upload {
return FALSE;
}
- if (! $fp = @fopen($file, FOPEN_READ_WRITE))
+ if ( ! $fp = @fopen($file, FOPEN_READ_WRITE))
{
return FALSE;
}
@@ -830,7 +830,7 @@ class CI_Upload {
}
}
- return (! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime];
+ return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime];
}
/**
@@ -875,6 +875,6 @@ class CI_Upload {
}
// END Upload Class
-
-/* End of file Upload.php */
+
+/* End of file Upload.php */
/* Location: ./system/libraries/Upload.php */ \ No newline at end of file
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index ee1839277..86b249ccd 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.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
*
@@ -63,7 +63,7 @@ class CI_User_agent {
$this->agent = trim($_SERVER['HTTP_USER_AGENT']);
}
- if (! is_null($this->agent))
+ if ( ! is_null($this->agent))
{
if ($this->_load_agent_file())
{
@@ -84,7 +84,7 @@ class CI_User_agent {
*/
function _load_agent_file()
{
- if (! @include(APPPATH.'config/user_agents'.EXT))
+ if ( ! @include(APPPATH.'config/user_agents'.EXT))
{
return FALSE;
}
@@ -339,7 +339,7 @@ class CI_User_agent {
*/
function is_referral()
{
- return (! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') ? FALSE : TRUE;
+ return ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') ? FALSE : TRUE;
}
// --------------------------------------------------------------------
@@ -429,7 +429,7 @@ class CI_User_agent {
*/
function referrer()
{
- return (! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') ? '' : trim($_SERVER['HTTP_REFERER']);
+ return ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') ? '' : trim($_SERVER['HTTP_REFERER']);
}
// --------------------------------------------------------------------
@@ -497,6 +497,6 @@ class CI_User_agent {
}
-
-/* End of file User_agent.php */
+
+/* End of file User_agent.php */
/* Location: ./system/libraries/User_agent.php */ \ No newline at end of file
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php
index a0f038c02..9654b4f4e 100644
--- a/system/libraries/Validation.php
+++ b/system/libraries/Validation.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
*
@@ -74,7 +74,7 @@ class CI_Validation {
}
else
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
$data = array($data => $field);
}
@@ -87,10 +87,10 @@ class CI_Validation {
foreach($this->_fields as $key => $val)
{
- $this->$key = (! isset($_POST[$key])) ? '' : $this->prep_for_form($_POST[$key]);
+ $this->$key = ( ! isset($_POST[$key])) ? '' : $this->prep_for_form($_POST[$key]);
$error = $key.'_error';
- if (! isset($this->$error))
+ if ( ! isset($this->$error))
{
$this->$error = '';
}
@@ -112,7 +112,7 @@ class CI_Validation {
*/
function set_rules($data, $rules = '')
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
if ($rules == '')
return;
@@ -141,7 +141,7 @@ class CI_Validation {
*/
function set_message($lang, $val = '')
{
- if (! is_array($lang))
+ if ( ! is_array($lang))
{
$lang = array($lang => $val);
}
@@ -195,9 +195,9 @@ class CI_Validation {
$ex = explode('|', $rules);
// Is the field required? If not, if the field is blank we'll move on to the next test
- if (! in_array('required', $ex, TRUE))
+ if ( ! in_array('required', $ex, TRUE))
{
- if (! isset($_POST[$field]) OR $_POST[$field] == '')
+ if ( ! isset($_POST[$field]) OR $_POST[$field] == '')
{
continue;
}
@@ -212,11 +212,11 @@ class CI_Validation {
* test for it here since there's not reason to go
* further
*/
- if (! isset($_POST[$field]))
+ if ( ! isset($_POST[$field]))
{
if (in_array('isset', $ex, TRUE) OR in_array('required', $ex))
{
- if (! isset($this->_error_messages['isset']))
+ if ( ! isset($this->_error_messages['isset']))
{
if (FALSE === ($line = $this->CI->lang->line('isset')))
{
@@ -229,7 +229,7 @@ class CI_Validation {
}
// Build the error message
- $mfield = (! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
+ $mfield = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
$message = sprintf($line, $mfield);
// Set the error variable. Example: $this->username_error
@@ -274,7 +274,7 @@ class CI_Validation {
// Call the function that corresponds to the rule
if ($callback === TRUE)
{
- if (! method_exists($this->CI, $rule))
+ if ( ! method_exists($this->CI, $rule))
{
continue;
}
@@ -282,7 +282,7 @@ class CI_Validation {
$result = $this->CI->$rule($_POST[$field], $param);
// If the field isn't required and we just processed a callback we'll move on...
- if (! in_array('required', $ex, TRUE) AND $result !== FALSE)
+ if ( ! in_array('required', $ex, TRUE) AND $result !== FALSE)
{
continue 2;
}
@@ -290,7 +290,7 @@ class CI_Validation {
}
else
{
- if (! method_exists($this, $rule))
+ if ( ! method_exists($this, $rule))
{
/*
* Run the native PHP function if called for
@@ -314,7 +314,7 @@ class CI_Validation {
// Did the rule test negatively? If so, grab the error.
if ($result === FALSE)
{
- if (! isset($this->_error_messages[$rule]))
+ if ( ! isset($this->_error_messages[$rule]))
{
if (FALSE === ($line = $this->CI->lang->line($rule)))
{
@@ -327,8 +327,8 @@ class CI_Validation {
}
// Build the error message
- $mfield = (! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
- $mparam = (! isset($this->_fields[$param])) ? $param : $this->_fields[$param];
+ $mfield = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
+ $mparam = ( ! isset($this->_fields[$param])) ? $param : $this->_fields[$param];
$message = sprintf($line, $mfield, $mparam);
// Set the error variable. Example: $this->username_error
@@ -385,13 +385,13 @@ class CI_Validation {
*/
function required($str)
{
- if (! is_array($str))
+ if ( ! is_array($str))
{
return (trim($str) == '') ? FALSE : TRUE;
}
else
{
- return (! empty($str));
+ return ( ! empty($str));
}
}
@@ -406,7 +406,7 @@ class CI_Validation {
*/
function matches($str, $field)
{
- if (! isset($_POST[$field]))
+ if ( ! isset($_POST[$field]))
{
return FALSE;
}
@@ -482,7 +482,7 @@ class CI_Validation {
*/
function valid_email($str)
{
- return (! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
+ return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
}
// --------------------------------------------------------------------
@@ -537,7 +537,7 @@ class CI_Validation {
*/
function alpha($str)
{
- return (! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
+ return ( ! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
}
// --------------------------------------------------------------------
@@ -551,7 +551,7 @@ class CI_Validation {
*/
function alpha_numeric($str)
{
- return (! preg_match("/^([a-z0-9])+$/i", $str)) ? FALSE : TRUE;
+ return ( ! preg_match("/^([a-z0-9])+$/i", $str)) ? FALSE : TRUE;
}
// --------------------------------------------------------------------
@@ -565,7 +565,7 @@ class CI_Validation {
*/
function alpha_dash($str)
{
- return (! preg_match("/^([-a-z0-9_-])+$/i", $str)) ? FALSE : TRUE;
+ return ( ! preg_match("/^([-a-z0-9_-])+$/i", $str)) ? FALSE : TRUE;
}
// --------------------------------------------------------------------
@@ -594,7 +594,7 @@ class CI_Validation {
*/
function is_numeric($str)
{
- return (! is_numeric($str)) ? FALSE : TRUE;
+ return ( ! is_numeric($str)) ? FALSE : TRUE;
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index 32d739689..1748ab833 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.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
*
@@ -13,7 +13,7 @@
* @filesource
*/
-if (! function_exists('xml_parser_create'))
+if ( ! function_exists('xml_parser_create'))
{
show_error('Your PHP installation does not support XML');
}
@@ -159,7 +159,7 @@ class CI_Xmlrpc {
$parts = parse_url($url);
- $path = (!isset($parts['path'])) ? '/' : $parts['path'];
+ $path = ( ! isset($parts['path'])) ? '/' : $parts['path'];
if (isset($parts['query']) && $parts['query'] != '')
{
@@ -176,7 +176,7 @@ class CI_Xmlrpc {
function timeout($seconds=5)
{
- if (! is_null($this->client) && is_int($seconds))
+ if ( ! is_null($this->client) && is_int($seconds))
{
$this->client->timeout = $seconds;
}
@@ -199,7 +199,7 @@ class CI_Xmlrpc {
function request($incoming)
{
- if (! is_array($incoming))
+ if ( ! is_array($incoming))
{
// Send Error
}
@@ -231,7 +231,7 @@ class CI_Xmlrpc {
{
if (is_array($value) && isset($value['0']))
{
- if (! isset($value['1']) OR ! isset($this->xmlrpcTypes[strtolower($value['1'])]))
+ if ( ! isset($value['1']) OR ! isset($this->xmlrpcTypes[strtolower($value['1'])]))
{
if (is_array($value[0]))
{
@@ -275,12 +275,12 @@ class CI_Xmlrpc {
$this->message = new XML_RPC_Message($this->method,$this->data);
$this->message->debug = $this->debug;
- if (! $this->result = $this->client->send($this->message))
+ if ( ! $this->result = $this->client->send($this->message))
{
$this->error = $this->result->errstr;
return FALSE;
}
- elseif(! is_object($this->result->val))
+ elseif( ! is_object($this->result->val))
{
$this->error = $this->result->errstr;
return FALSE;
@@ -384,7 +384,7 @@ class XML_RPC_Client extends CI_Xmlrpc
{
$fp = @fsockopen($this->server, $this->port,$this->errno, $this->errstr, $this->timeout);
- if (! is_resource($fp))
+ if ( ! is_resource($fp))
{
error_log($this->xmlrpcstr['http_error']);
$r = new XML_RPC_Response(0, $this->xmlrpcerr['http_error'],$this->xmlrpcstr['http_error']);
@@ -406,7 +406,7 @@ class XML_RPC_Client extends CI_Xmlrpc
$op .= $msg->payload;
- if (!fputs($fp, $op, strlen($op)))
+ if ( ! fputs($fp, $op, strlen($op)))
{
error_log($this->xmlrpcstr['http_error']);
$r = new XML_RPC_Response(0, $this->xmlrpcerr['http_error'], $this->xmlrpcstr['http_error']);
@@ -442,7 +442,7 @@ class XML_RPC_Response
$this->errno = $code;
$this->errstr = htmlentities($fstr);
}
- else if (!is_object($val))
+ else if ( ! is_object($val))
{
// programmer error, not an object
error_log("Invalid type '" . gettype($val) . "' (value: $val) passed to XML_RPC_Response. Defaulting to empty value.");
@@ -737,7 +737,7 @@ class XML_RPC_Message extends CI_Xmlrpc
// PARSE XML DATA
//-------------------------------------
- if (!xml_parse($parser, $data, sizeof($data)))
+ if ( ! xml_parse($parser, $data, sizeof($data)))
{
$errstr = sprintf('XML error: %s at line %d',
xml_error_string(xml_get_error_code($parser)),
@@ -765,7 +765,7 @@ class XML_RPC_Message extends CI_Xmlrpc
$r = new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'],$this->xmlrpcstr['invalid_return'].' '.$this->xh[$parser]['isf_reason']);
return $r;
}
- elseif (! is_object($this->xh[$parser]['value']))
+ elseif ( ! is_object($this->xh[$parser]['value']))
{
$r = new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'],$this->xmlrpcstr['invalid_return'].' '.$this->xh[$parser]['isf_reason']);
return $r;
@@ -862,7 +862,7 @@ class XML_RPC_Message extends CI_Xmlrpc
else
{
// not top level element: see if parent is OK
- if (!in_array($this->xh[$the_parser]['stack'][0], $this->valid_parents[$name], TRUE))
+ if ( ! in_array($this->xh[$the_parser]['stack'][0], $this->valid_parents[$name], TRUE))
{
$this->xh[$the_parser]['isf'] = 2;
$this->xh[$the_parser]['isf_reason'] = "XML-RPC element $name cannot be child of ".$this->xh[$the_parser]['stack'][0];
@@ -961,7 +961,7 @@ class XML_RPC_Message extends CI_Xmlrpc
case 'STRUCT':
case 'ARRAY':
$cur_val = array_shift($this->xh[$the_parser]['valuestack']);
- $this->xh[$the_parser]['value'] = (! isset($cur_val['values'])) ? array() : $cur_val['values'];
+ $this->xh[$the_parser]['value'] = ( ! isset($cur_val['values'])) ? array() : $cur_val['values'];
$this->xh[$the_parser]['vt'] = strtolower($name);
break;
case 'NAME':
@@ -1005,7 +1005,7 @@ class XML_RPC_Message extends CI_Xmlrpc
{
// we have a DOUBLE
// we must check that only 0123456789-.<space> are characters here
- if (! preg_match('/^[+-]?[eE0-9\t \.]+$/', $this->xh[$the_parser]['ac']))
+ if ( ! preg_match('/^[+-]?[eE0-9\t \.]+$/', $this->xh[$the_parser]['ac']))
{
$this->xh[$the_parser]['value'] = 'ERROR_NON_NUMERIC_FOUND';
}
@@ -1018,7 +1018,7 @@ class XML_RPC_Message extends CI_Xmlrpc
{
// we have an I4/INT
// we must check that only 0123456789-<space> are characters here
- if (! preg_match('/^[+-]?[0-9\t ]+$/', $this->xh[$the_parser]['ac']))
+ if ( ! preg_match('/^[+-]?[0-9\t ]+$/', $this->xh[$the_parser]['ac']))
{
$this->xh[$the_parser]['value'] = 'ERROR_NON_NUMERIC_FOUND';
}
@@ -1101,7 +1101,7 @@ class XML_RPC_Message extends CI_Xmlrpc
$this->xh[$the_parser]['lv'] = 2; // Found a value
}
- if(! @isset($this->xh[$the_parser]['ac']))
+ if( ! @isset($this->xh[$the_parser]['ac']))
{
$this->xh[$the_parser]['ac'] = '';
}
@@ -1213,7 +1213,7 @@ class XML_RPC_Values extends CI_Xmlrpc
{
parent::CI_Xmlrpc();
- if ($val != -1 || $type != '')
+ if ($val != -1 OR $type != '')
{
$type = $type == '' ? 'string' : $type;
@@ -1250,7 +1250,7 @@ class XML_RPC_Values extends CI_Xmlrpc
if ($type == $this->xmlrpcBoolean)
{
- if (strcasecmp($val,'true')==0 || $val==1 || ($val==true && strcasecmp($val,'false')))
+ if (strcasecmp($val,'true')==0 OR $val==1 OR ($val==true && strcasecmp($val,'false')))
{
$val = 1;
}
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index 754b8ae26..a9cf19d2c 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.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
*
@@ -13,12 +13,12 @@
* @filesource
*/
-if (! function_exists('xml_parser_create'))
+if ( ! function_exists('xml_parser_create'))
{
show_error('Your PHP installation does not support XML');
}
-if (! class_exists('CI_Xmlrpc'))
+if ( ! class_exists('CI_Xmlrpc'))
{
show_error('You must load the Xmlrpc class before loading the Xmlrpcs class in order to create a server.');
}
@@ -183,7 +183,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
// PARSE + PROCESS XML DATA
//-------------------------------------
- if (! xml_parse($parser, $data, 1))
+ if ( ! xml_parse($parser, $data, 1))
{
// return XML error as a faultCode
$r = new XML_RPC_Response(0,
@@ -251,7 +251,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
// Valid Method
//-------------------------------------
- if (! isset($this->methods[$methName]['function']))
+ if ( ! isset($this->methods[$methName]['function']))
{
return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
}
@@ -265,18 +265,18 @@ class CI_Xmlrpcs extends CI_Xmlrpc
if ($system_call === TRUE)
{
- if (! is_callable(array($this,$method_parts['1'])))
+ if ( ! is_callable(array($this,$method_parts['1'])))
{
return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
}
}
else
{
- if ($objectCall && !is_callable(array($method_parts['0'],$method_parts['1'])))
+ if ($objectCall && ! is_callable(array($method_parts['0'],$method_parts['1'])))
{
return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
}
- elseif (!$objectCall && !is_callable($this->methods[$methName]['function']))
+ elseif ( ! $objectCall && ! is_callable($this->methods[$methName]['function']))
{
return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
}
@@ -494,17 +494,17 @@ class CI_Xmlrpcs extends CI_Xmlrpc
{
if ($call->kindOf() != 'struct')
return $this->multicall_error('notstruct');
- elseif (!$methName = $call->me['struct']['methodName'])
+ elseif ( ! $methName = $call->me['struct']['methodName'])
return $this->multicall_error('nomethod');
list($scalar_type,$scalar_value)=each($methName->me);
$scalar_type = $scalar_type == $this->xmlrpcI4 ? $this->xmlrpcInt : $scalar_type;
- if ($methName->kindOf() != 'scalar' || $scalar_type != 'string')
+ if ($methName->kindOf() != 'scalar' OR $scalar_type != 'string')
return $this->multicall_error('notstring');
elseif ($scalar_value == 'system.multicall')
return $this->multicall_error('recursion');
- elseif (!$params = $call->me['struct']['params'])
+ elseif ( ! $params = $call->me['struct']['params'])
return $this->multicall_error('noparams');
elseif ($params->kindOf() != 'array')
return $this->multicall_error('notarray');
@@ -531,6 +531,6 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
// END XML_RPC_Server class
-
-/* End of file Xmlrpcs.php */
+
+/* End of file Xmlrpcs.php */
/* Location: ./system/libraries/Xmlrpcs.php */ \ No newline at end of file
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 5a24e4057..97695a07f 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.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
*
@@ -57,7 +57,7 @@ class CI_Zip {
{
foreach ((array)$directory as $dir)
{
- if (! preg_match("|.+/$|", $dir))
+ if ( ! preg_match("|.+/$|", $dir))
{
$dir .= '/';
}
@@ -196,7 +196,7 @@ class CI_Zip {
*/
function read_file($path, $preserve_filepath = FALSE)
{
- if (! file_exists($path))
+ if ( ! file_exists($path))
{
return FALSE;
}
@@ -301,7 +301,7 @@ class CI_Zip {
*/
function archive($filepath)
{
- if (! ($fp = @fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE)))
+ if ( ! ($fp = @fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE)))
{
return FALSE;
}
@@ -326,7 +326,7 @@ class CI_Zip {
*/
function download($filename = 'backup.zip')
{
- if (! preg_match("|.+?\.zip$|", $filename))
+ if ( ! preg_match("|.+?\.zip$|", $filename))
{
$filename .= '.zip';
}
@@ -374,6 +374,6 @@ class CI_Zip {
}
}
-
-/* End of file Zip.php */
+
+/* End of file Zip.php */
/* Location: ./system/libraries/Zip.php */ \ No newline at end of file
diff --git a/system/plugins/captcha_pi.php b/system/plugins/captcha_pi.php
index ec45309e5..df95788ee 100644
--- a/system/plugins/captcha_pi.php
+++ b/system/plugins/captcha_pi.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
*
@@ -157,16 +157,16 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
foreach ($defaults as $key => $val)
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
- if (! isset($$key) OR $$key == '')
+ if ( ! isset($$key) OR $$key == '')
{
$$key = $val;
}
}
else
{
- $$key = (! isset($data[$key])) ? $val : $data[$key];
+ $$key = ( ! isset($data[$key])) ? $val : $data[$key];
}
}
@@ -175,17 +175,17 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
return FALSE;
}
- if (! @is_dir($img_path))
+ if ( ! @is_dir($img_path))
{
return FALSE;
}
- if (! is_really_writable($img_path))
+ if ( ! is_really_writable($img_path))
{
return FALSE;
}
- if (! extension_loaded('gd'))
+ if ( ! extension_loaded('gd'))
{
return FALSE;
}
@@ -351,6 +351,6 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
return array('word' => $word, 'time' => $now, 'image' => $img);
}
-
-/* End of file captcha_pi.php */
+
+/* End of file captcha_pi.php */
/* Location: ./system/plugins/captcha_pi.php */ \ No newline at end of file
diff --git a/system/plugins/js_calendar_pi.php b/system/plugins/js_calendar_pi.php
index 6bb3b3629..964d50315 100644
--- a/system/plugins/js_calendar_pi.php
+++ b/system/plugins/js_calendar_pi.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
*
@@ -274,7 +274,7 @@ function total_days()
case 1: // Check for leap year
if (( this.date_obj.getFullYear() % 4 == 0
&& this.date_obj.getFullYear() % 100 != 0)
- || this.date_obj.getFullYear() % 400 == 0)
+ OR this.date_obj.getFullYear() % 400 == 0)
return 29;
else
return 28;
@@ -385,9 +385,9 @@ function update_calendar(id, dateValue)
var newMonth = dateParts[1];
var newDay = dateParts[2];
- if (isNaN(newDay) || newDay < 1 || (newDay.length != 1 && newDay.length != 2)) return;
- if (isNaN(newYear) || newYear < 1 || newYear.length != 4) return;
- if (isNaN(newMonth) || newMonth < 1 || (newMonth.length != 1 && newMonth.length != 2)) return;
+ if (isNaN(newDay) OR newDay < 1 OR (newDay.length != 1 && newDay.length != 2)) return;
+ if (isNaN(newYear) OR newYear < 1 OR newYear.length != 4) return;
+ if (isNaN(newMonth) OR newMonth < 1 OR (newMonth.length != 1 && newMonth.length != 2)) return;
if (newMonth > 12) newMonth = 12;
@@ -396,7 +396,7 @@ function update_calendar(id, dateValue)
switch(newMonth - 1)
{
case 1: // Check for leap year
- if ((newYear % 4 == 0 && newYear % 100 != 0) || newYear % 400 == 0)
+ if ((newYear % 4 == 0 && newYear % 100 != 0) OR newYear % 400 == 0)
{
if (newDay > 29) newDay = 29;
}
@@ -541,7 +541,7 @@ function change_month(mo, cal)
switch(newMonth)
{
case 1: // Check for leap year
- if ((newYear % 4 == 0 && newYear % 100 != 0) || newYear % 400 == 0)
+ if ((newYear % 4 == 0 && newYear % 100 != 0) OR newYear % 400 == 0)
{
if (newDate > 29) newDate = 29;
}
@@ -624,6 +624,6 @@ function js_calendar_write($field_id, $time = '', $highlight = TRUE)
</script>';
}
-
-/* End of file js_calendar_pi.php */
+
+/* End of file js_calendar_pi.php */
/* Location: ./system/plugins/js_calendar_pi.php */ \ No newline at end of file
diff --git a/system/scaffolding/Scaffolding.php b/system/scaffolding/Scaffolding.php
index 807a3d76a..89a9ed4cf 100644
--- a/system/scaffolding/Scaffolding.php
+++ b/system/scaffolding/Scaffolding.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
*
@@ -97,7 +97,7 @@ class Scaffolding {
function add()
{
$data = array(
- 'title' => (! isset($this->lang['scaff_add'])) ? 'Add Data' : $this->lang['scaff_add'],
+ 'title' => ( ! isset($this->lang['scaff_add'])) ? 'Add Data' : $this->lang['scaff_add'],
'fields' => $this->CI->db->field_data($this->current_table),
'action' => $this->base_uri.'/insert'
);
@@ -172,7 +172,7 @@ class Scaffolding {
);
$data = array(
- 'title' => (! isset($this->lang['scaff_view'])) ? 'View Data' : $this->lang['scaff_view'],
+ 'title' => ( ! isset($this->lang['scaff_view'])) ? 'View Data' : $this->lang['scaff_view'],
'query' => $query,
'fields' => $fields,
'primary' => $primary,
@@ -207,7 +207,7 @@ class Scaffolding {
$query = $this->CI->db->get_where($this->current_table, array($primary => $id));
$data = array(
- 'title' => (! isset($this->lang['scaff_edit'])) ? 'Edit Data' : $this->lang['scaff_edit'],
+ 'title' => ( ! isset($this->lang['scaff_edit'])) ? 'Edit Data' : $this->lang['scaff_edit'],
'fields' => $query->field_data(),
'query' => $query->row(),
'action' => $this->base_uri.'/update/'.$this->CI->uri->segment(4)
@@ -245,7 +245,7 @@ class Scaffolding {
*/
function delete()
{
- if (! isset($this->lang['scaff_del_confirm']))
+ if ( ! isset($this->lang['scaff_del_confirm']))
{
$message = 'Are you sure you want to delete the following row: '.$this->CI->uri->segment(4);
}
@@ -255,10 +255,10 @@ class Scaffolding {
}
$data = array(
- 'title' => (! isset($this->lang['scaff_delete'])) ? 'Delete Data' : $this->lang['scaff_delete'],
+ 'title' => ( ! isset($this->lang['scaff_delete'])) ? 'Delete Data' : $this->lang['scaff_delete'],
'message' => $message,
- 'no' => anchor(array($this->base_uri, 'view'), (! isset($this->lang['scaff_no'])) ? 'No' : $this->lang['scaff_no']),
- 'yes' => anchor(array($this->base_uri, 'do_delete', $this->CI->uri->segment(4)), (! isset($this->lang['scaff_yes'])) ? 'Yes' : $this->lang['scaff_yes'])
+ 'no' => anchor(array($this->base_uri, 'view'), ( ! isset($this->lang['scaff_no'])) ? 'No' : $this->lang['scaff_no']),
+ 'yes' => anchor(array($this->base_uri, 'do_delete', $this->CI->uri->segment(4)), ( ! isset($this->lang['scaff_yes'])) ? 'Yes' : $this->lang['scaff_yes'])
);
$this->CI->load->view('delete', $data);
@@ -286,6 +286,6 @@ class Scaffolding {
}
}
-
-/* End of file Scaffolding.php */
+
+/* End of file Scaffolding.php */
/* Location: ./system/scaffolding/Scaffolding.php */ \ No newline at end of file
diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html
index c2c600e29..c1318709f 100644
--- a/user_guide/general/creating_libraries.html
+++ b/user_guide/general/creating_libraries.html
@@ -98,7 +98,7 @@ they are initialized.</p>
<p>Classes should have this basic prototype (Note: We are using the name <kbd>Someclass</kbd> purely as an example):</p>
-<code>&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<br /><br />
class Someclass {<br />
<br />
@@ -137,7 +137,7 @@ $this->load->library('Someclass', <kbd>$params</kbd>);</code>
<p>If you use this feature you must set up your class constructor to expect data:</p>
-<code>&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');<br />
+<code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');<br />
<br />
class Someclass {<br />
<br />
diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html
index 13d0beb97..2c3dba13a 100644
--- a/user_guide/helpers/file_helper.html
+++ b/user_guide/helpers/file_helper.html
@@ -88,7 +88,7 @@ might not work if you are trying to access a file above the calling script.</p>
<code>
$data = 'Some file data';<br />
<br />
-if (! write_file('./path/to/file.php', $data))<br />
+if ( ! write_file('./path/to/file.php', $data))<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp; echo 'Unable to write the file';<br />
}<br />
diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html
index bc6bd9d83..d4990dffd 100644
--- a/user_guide/libraries/email.html
+++ b/user_guide/libraries/email.html
@@ -250,7 +250,7 @@ in a loop, permitting the data to be reset between cycles.</p>
<p>The Email sending function. Returns boolean TRUE or FALSE based on success or failure, enabling it to be used
conditionally:</p>
-<code>if (! $this->email->send())<br />
+<code>if ( ! $this->email->send())<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;// Generate error<br />
}</code>
diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html
index c8773f253..25cb51556 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -140,7 +140,7 @@ $plaintext_string = $this->encrypt->decode($encrypted_string);</code>
<p>Please visit php.net for a list of <a href="http://php.net/mcrypt">available ciphers</a>.</p>
<p>If you'd like to manually test whether your server supports Mcrypt you can use:</p>
-<code>echo (! function_exists('mcrypt_encrypt')) ? 'Nope' : 'Yup';</code>
+<code>echo ( ! function_exists('mcrypt_encrypt')) ? 'Nope' : 'Yup';</code>
<h2>$this->encrypt->set_mode();</h2>
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 6e0d10f83..277878147 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -167,7 +167,7 @@ class Upload extends Controller {
$this->load->library('upload', $config);
- if (! $this->upload->do_upload())
+ if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html
index f905b88f8..8fd751317 100644
--- a/user_guide/libraries/image_lib.html
+++ b/user_guide/libraries/image_lib.html
@@ -132,7 +132,7 @@ error message using this function:</p>
<p>A good practice is use the processing function conditionally, showing an error upon failure, like this:</p>
-<code>if (! $this->image_lib->resize())<br />
+<code>if ( ! $this->image_lib->resize())<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />
}</code>
@@ -370,7 +370,7 @@ $config['y_axis'] = '60';<br />
$this->image_lib->initialize($config);
<br />
<br />
-if (! $this->image_lib->crop())<br />
+if ( ! $this->image_lib->crop())<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />
}</code>
@@ -407,7 +407,7 @@ $config['rotation_angle'] = 'hor';<br />
$this->image_lib->initialize($config);
<br />
<br />
-if (! $this->image_lib->rotate())<br />
+if ( ! $this->image_lib->rotate())<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />
}</code>
diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html
index 311dab82f..17ed7f0ff 100644
--- a/user_guide/libraries/input.html
+++ b/user_guide/libraries/input.html
@@ -120,7 +120,7 @@ return false (boolean) if not. This lets you conveniently use data without havi
In other words, normally you might do something like this:</p>
<code>
-if (! isset($_POST['something']))<br />
+if ( ! isset($_POST['something']))<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;$something = FALSE;<br />
}<br />
@@ -178,7 +178,7 @@ else<br />
<p>Takes an IP address as input and returns TRUE or FALSE (boolean) if it is valid or not. Note: The $this->input->ip_address() function above
validates the IP automatically.</p>
-<code>if (! $this-&gt;input-&gt;valid_ip($ip))<br />
+<code>if ( ! $this-&gt;input-&gt;valid_ip($ip))<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp; echo 'Not Valid';<br />
}<br />
diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html
index 02c8852d4..f86ccca02 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -86,7 +86,7 @@ $tb_data = array(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'charset'&nbsp;&nbsp;&nbsp;=> 'utf-8'<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />
<br />
-if (! $this->trackback->send($tb_data))<br />
+if ( ! $this->trackback->send($tb_data))<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $this->trackback->display_errors();<br />
}<br />
@@ -173,7 +173,7 @@ if ($this->uri->segment(3) == FALSE)<br />
&nbsp;&nbsp;&nbsp;&nbsp;$this->trackback->send_error("Unable to determine the entry ID");<br />
}<br />
<br />
-if (! $this->trackback->receive())<br />
+if ( ! $this->trackback->receive())<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;$this->trackback->send_error("The Trackback did not contain valid data");<br />
}<br />
diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html
index b7e98f653..24bbf403b 100644
--- a/user_guide/libraries/xmlrpc.html
+++ b/user_guide/libraries/xmlrpc.html
@@ -120,7 +120,7 @@ $this->xmlrpc->method('weblogUpdates.ping');<br />
$request = array('My Photoblog', 'http://www.my-site.com/photoblog/');<br />
$this->xmlrpc->request($request);<br />
<br />
-if (! $this->xmlrpc->send_request())<br />
+if ( ! $this->xmlrpc->send_request())<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $this-&gt;xmlrpc->display_error();<br />
}</code>
@@ -336,7 +336,7 @@ class Xmlrpc_client extends Controller {
$request = array('How is it going?');
$this->xmlrpc->request($request);
- if (! $this->xmlrpc->send_request())
+ if ( ! $this->xmlrpc->send_request())
{
echo $this->xmlrpc->display_error();
}