summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-05-13 04:01:47 +0200
committerDerek Allard <derek.allard@ellislab.com>2008-05-13 04:01:47 +0200
commit0fd8f0201d843b0b4a2de614c9be2b060d1787fc (patch)
tree1a9dd3f534cd179a197392cc34fc5f3ce355f7c4 /system
parent459a8b8569f0a9ad68e928e7a3096923e6df0f2f (diff)
minor source formatting
Diffstat (limited to 'system')
-rw-r--r--system/codeigniter/CodeIgniter.php5
-rw-r--r--system/codeigniter/Common.php22
-rw-r--r--system/libraries/Benchmark.php12
-rw-r--r--system/libraries/Config.php32
4 files changed, 35 insertions, 36 deletions
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 4eb31cbcd..5a01eb86c 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -229,8 +229,8 @@ else
}
// Call the requested method.
- // Any URI segments present (besides the class/function) will be passed to the method for convenience
- call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));
+ // Any URI segments present (besides the class/function) will be passed to the method for convenience
+ call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));
}
}
@@ -273,6 +273,5 @@ if (class_exists('CI_DB') AND isset($CI->db))
}
-
/* End of file CodeIgniter.php */
/* Location: ./system/codeigniter/CodeIgniter.php */ \ No newline at end of file
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index d4c88c15f..8b80b42b1 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -39,18 +39,18 @@
*
* @access private
* @return void
- */
+ */
function is_really_writable($file)
{
if (is_dir($file))
{
$file = rtrim($file, '/').'/'.md5(rand(1,100));
-
+
if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
{
return FALSE;
}
-
+
fclose($fp);
@chmod($file, DIR_WRITE_MODE);
@unlink($file);
@@ -88,7 +88,7 @@ function &load_class($class, $instantiate = TRUE)
{
return $objects[$class];
}
-
+
// If the requested class does not exist in the application/libraries
// folder we'll load the native class from the system/libraries folder.
if (file_exists(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT))
@@ -116,7 +116,7 @@ function &load_class($class, $instantiate = TRUE)
$objects[$class] = TRUE;
return $objects[$class];
}
-
+
if ($is_subclass == TRUE)
{
$name = config_item('subclass_prefix').$class;
@@ -139,16 +139,16 @@ function &load_class($class, $instantiate = TRUE)
function &get_config()
{
static $main_conf;
-
+
if (! isset($main_conf))
{
if (! file_exists(APPPATH.'config/config'.EXT))
{
exit('The configuration file config'.EXT.' does not exist.');
}
-
+
require(APPPATH.'config/config'.EXT);
-
+
if (! isset($config) OR ! is_array($config))
{
exit('Your config file does not appear to be formatted correctly.');
@@ -172,7 +172,7 @@ function config_item($item)
if (! isset($config_item[$item]))
{
$config =& get_config();
-
+
if (! isset($config[$item]))
{
return FALSE;
@@ -295,6 +295,6 @@ function _exception_handler($severity, $message, $filepath, $line)
}
-
-/* End of file Common.php */
+
+/* End of file Common.php */
/* Location: ./system/codeigniter/Common.php */ \ No newline at end of file
diff --git a/system/libraries/Benchmark.php b/system/libraries/Benchmark.php
index f83e86482..899350bf7 100644
--- a/system/libraries/Benchmark.php
+++ b/system/libraries/Benchmark.php
@@ -70,23 +70,23 @@ class CI_Benchmark {
{
return '{elapsed_time}';
}
-
+
if (! isset($this->marker[$point1]))
{
return '';
}
-
+
if (! isset($this->marker[$point2]))
{
$this->marker[$point2] = microtime();
}
-
+
list($sm, $ss) = explode(' ', $this->marker[$point1]);
list($em, $es) = explode(' ', $this->marker[$point2]);
return number_format(($em + $es) - ($sm + $ss), $decimals);
}
-
+
// --------------------------------------------------------------------
/**
@@ -108,6 +108,6 @@ class CI_Benchmark {
}
// END CI_Benchmark class
-
-/* End of file Benchmark.php */
+
+/* End of file Benchmark.php */
/* Location: ./system/libraries/Benchmark.php */ \ No newline at end of file
diff --git a/system/libraries/Config.php b/system/libraries/Config.php
index b1a9defe0..06e1cbe80 100644
--- a/system/libraries/Config.php
+++ b/system/libraries/Config.php
@@ -82,10 +82,10 @@ class CI_Config {
if ($fail_gracefully === TRUE)
{
return FALSE;
- }
+ }
show_error('Your '.$file.EXT.' file does not appear to contain a valid configuration array.');
}
-
+
if ($use_sections === TRUE)
{
if (isset($this->config[$file]))
@@ -120,16 +120,16 @@ class CI_Config {
* @param string the index name
* @param bool
* @return string
- */
+ */
function item($item, $index = '')
- {
+ {
if ($index == '')
{
if (! isset($this->config[$item]))
{
return FALSE;
}
-
+
$pref = $this->config[$item];
}
else
@@ -138,12 +138,12 @@ class CI_Config {
{
return FALSE;
}
-
+
if (! isset($this->config[$index][$item]))
{
return FALSE;
}
-
+
$pref = $this->config[$index][$item];
}
@@ -162,18 +162,18 @@ class CI_Config {
* @param string the config item name
* @param bool
* @return string
- */
+ */
function slash_item($item)
{
if (! isset($this->config[$item]))
{
return FALSE;
}
-
+
$pref = $this->config[$item];
-
+
if ($pref != '' && substr($pref, -1) != '/')
- {
+ {
$pref .= '/';
}
@@ -188,21 +188,21 @@ class CI_Config {
* @access public
* @param string the URI string
* @return string
- */
+ */
function site_url($uri = '')
{
if (is_array($uri))
{
$uri = implode('/', $uri);
}
-
+
if ($uri == '')
{
return $this->slash_item('base_url').$this->item('index_page');
}
else
{
- $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
+ $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
return $this->slash_item('base_url').$this->slash_item('index_page').preg_replace("|^/*(.+?)/*$|", "\\1", $uri).$suffix;
}
}
@@ -214,7 +214,7 @@ class CI_Config {
*
* @access public
* @return string
- */
+ */
function system_url()
{
$x = explode("/", preg_replace("|/*(.+?)/*$|", "\\1", BASEPATH));
@@ -230,7 +230,7 @@ class CI_Config {
* @param string the config item key
* @param string the config item value
* @return void
- */
+ */
function set_item($item, $value)
{
$this->config[$item] = $value;