From 0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Tue, 13 May 2008 04:22:33 +0000 Subject: 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 --- system/libraries/Output.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'system/libraries/Output.php') 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 @@ -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 -- cgit v1.2.3-24-g4f1b