Some sweeping syntax changes for consistency:

(! foo) changed to ( ! foo)
|| changed to OR
changed newline standardization code in various places from preg_replace to str_replace
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 5d4c2de..d273df1 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 @@
 	 */

 	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 @@
 	 */

 	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 @@
 		// 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 @@
 		// ------------------------------------------------------

 

 		// 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 @@
 			}

 			

 			// 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 @@
 

 }

 

-
-/* End of file DB_utility.php */
+

+/* End of file DB_utility.php */

 /* Location: ./system/database/DB_utility.php */
\ No newline at end of file