summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rwxr-xr-xsystem/core/Config.php2
-rwxr-xr-xsystem/core/URI.php18
-rw-r--r--system/database/DB_active_rec.php1
-rw-r--r--system/helpers/date_helper.php7
-rw-r--r--system/helpers/inflector_helper.php2
-rw-r--r--system/libraries/Table.php4
6 files changed, 25 insertions, 9 deletions
diff --git a/system/core/Config.php b/system/core/Config.php
index 1e149d005..91826bd41 100755
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -76,7 +76,7 @@ class CI_Config {
log_message('debug', 'Config Class Initialized');
// Set the base_url automatically if none was provided
- if ($this->config['base_url'] == '')
+ if (empty($this->config['base_url']))
{
if (isset($_SERVER['HTTP_HOST']))
{
diff --git a/system/core/URI.php b/system/core/URI.php
index 4a2e87c2a..48bb7ae3c 100755
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -22,7 +22,6 @@
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 1.0
- * @filesource
*/
// ------------------------------------------------------------------------
@@ -93,7 +92,7 @@ class CI_URI {
if (strtoupper($this->config->item('uri_protocol')) === 'AUTO')
{
// Is the request coming from the command line?
- if (php_sapi_name() === 'cli' OR defined('STDIN'))
+ if ($this->_is_cli_request())
{
$this->_set_uri_string($this->_parse_cli_args());
return;
@@ -227,6 +226,21 @@ class CI_URI {
}
// --------------------------------------------------------------------
+
+ /**
+ * Is cli Request?
+ *
+ * Duplicate of function from the Input class to test to see if a request was made from the command line
+ *
+ * @return boolean
+ */
+ protected function _is_cli_request()
+ {
+ return (php_sapi_name() == 'cli') OR defined('STDIN');
+ }
+
+
+ // --------------------------------------------------------------------
/**
* Parse cli arguments
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 756709698..35164a79c 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -214,6 +214,7 @@ class CI_DB_active_record extends CI_DB_driver {
$sql = $this->protect_identifiers($type.'('.trim($select).')').' AS '.$this->protect_identifiers(trim($alias));
$this->ar_select[] = $sql;
+ $this->ar_no_escape[] = NULL;
if ($this->ar_caching === TRUE)
{
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 2a34cf93e..7e60cccf8 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -128,15 +128,16 @@ if ( ! function_exists('standard_date'))
function standard_date($fmt = 'DATE_RFC822', $time = '')
{
$formats = array(
- 'DATE_ATOM' => '%Y-%m-%dT%H:%i:%s%Q',
+ 'DATE_ATOM' => '%Y-%m-%dT%H:%i:%s%O',
'DATE_COOKIE' => '%l, %d-%M-%y %H:%i:%s UTC',
- 'DATE_ISO8601' => '%Y-%m-%dT%H:%i:%s%Q',
+ 'DATE_ISO8601' => '%Y-%m-%dT%H:%i:%s%O',
'DATE_RFC822' => '%D, %d %M %y %H:%i:%s %O',
'DATE_RFC850' => '%l, %d-%M-%y %H:%i:%s UTC',
'DATE_RFC1036' => '%D, %d %M %y %H:%i:%s %O',
'DATE_RFC1123' => '%D, %d %M %Y %H:%i:%s %O',
+ 'DATE_RFC2822' => '%D, %d %M %Y %H:%i:%s %O',
'DATE_RSS' => '%D, %d %M %Y %H:%i:%s %O',
- 'DATE_W3C' => '%Y-%m-%dT%H:%i:%s%Q'
+ 'DATE_W3C' => '%Y-%m-%dT%H:%i:%s%O'
);
if ( ! isset($formats[$fmt]))
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index 9cf015d2b..485806b20 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -170,7 +170,7 @@ if ( ! function_exists('camelize'))
{
function camelize($str)
{
- return str_replace(' ', '', ucwords(preg_replace('/[\s_]+/', ' ', strtolower($str))));
+ return strtolower($str[0]).substr(str_replace(' ', '', ucwords(preg_replace('/[\s_]+/', ' ', $str))), 1);
}
}
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 99d001ce5..11a4858a9 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -112,7 +112,7 @@ class CI_Table {
*/
public function make_columns($array = array(), $col_limit = 0)
{
- if ( ! is_array($array) OR count($array) === 0)
+ if ( ! is_array($array) OR count($array) === 0 OR ! is_int($col_limit))
{
return FALSE;
}
@@ -405,7 +405,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 ( ! is_callable(array($query, 'list_fields')))
{
return FALSE;
}