diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-05-13 06:22:33 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-05-13 06:22:33 +0200 |
commit | 0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch) | |
tree | 1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd /system/database/DB_utility.php | |
parent | 5cf664748ee295867f593d7eb7991bd35fe8eca6 (diff) |
Some sweeping syntax changes for consistency:
(! foo) changed to ( ! foo)
|| changed to OR
changed newline standardization code in various places from preg_replace to str_replace
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r-- | system/database/DB_utility.php | 16 |
1 files changed, 8 insertions, 8 deletions
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 |