Some sweeping syntax changes for consistency:
(! foo) changed to ( ! foo)
|| changed to OR
changed newline standardization code in various places from preg_replace to str_replace
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 5a24e40..97695a0 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 @@
{
foreach ((array)$directory as $dir)
{
- if (! preg_match("|.+/$|", $dir))
+ if ( ! preg_match("|.+/$|", $dir))
{
$dir .= '/';
}
@@ -196,7 +196,7 @@
*/
function read_file($path, $preserve_filepath = FALSE)
{
- if (! file_exists($path))
+ if ( ! file_exists($path))
{
return FALSE;
}
@@ -301,7 +301,7 @@
*/
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 @@
*/
function download($filename = 'backup.zip')
{
- if (! preg_match("|.+?\.zip$|", $filename))
+ if ( ! preg_match("|.+?\.zip$|", $filename))
{
$filename .= '.zip';
}
@@ -374,6 +374,6 @@
}
}
-
-/* End of file Zip.php */
+
+/* End of file Zip.php */
/* Location: ./system/libraries/Zip.php */
\ No newline at end of file