summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-04-23 17:57:38 +0200
committerTimothy Warren <tim@timshomepage.net>2012-04-23 17:57:38 +0200
commitc8a2a60c1075e5f725967962663127dad0f9e2e1 (patch)
treed877440f9c3ba20f132ad1c91f70600b77ada409 /system/core
parent31d30bcf206ed2e9168b93f74511708d6bc4b505 (diff)
parent274f7d1b42d6ed83c3b22106c945590c05599cdc (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into patch
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/Benchmark.php11
-rwxr-xr-xsystem/core/CodeIgniter.php14
2 files changed, 11 insertions, 14 deletions
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php
index f6b634deb..39027e809 100755
--- a/system/core/Benchmark.php
+++ b/system/core/Benchmark.php
@@ -61,7 +61,7 @@ class CI_Benchmark {
*/
public function mark($name)
{
- $this->marker[$name] = microtime();
+ $this->marker[$name] = microtime(TRUE);
}
// --------------------------------------------------------------------
@@ -93,13 +93,10 @@ class CI_Benchmark {
if ( ! isset($this->marker[$point2]))
{
- $this->marker[$point2] = microtime();
+ $this->marker[$point2] = microtime(TRUE);
}
- list($sm, $ss) = explode(' ', $this->marker[$point1]);
- list($em, $es) = explode(' ', $this->marker[$point2]);
-
- return number_format(($em + $es) - ($sm + $ss), $decimals);
+ return number_format($this->marker[$point2] - $this->marker[$point1], $decimals);
}
// --------------------------------------------------------------------
@@ -122,4 +119,4 @@ class CI_Benchmark {
}
/* End of file Benchmark.php */
-/* Location: ./system/core/Benchmark.php */
+/* Location: ./system/core/Benchmark.php */ \ No newline at end of file
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 7deccd048..293582243 100755
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -280,12 +280,12 @@
{
$x = explode('/', $RTR->routes['404_override'], 2);
$class = $x[0];
- $method = (isset($x[1]) ? $x[1] : 'index');
+ $method = isset($x[1]) ? $x[1] : 'index';
if ( ! class_exists($class))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
@@ -293,7 +293,7 @@
}
else
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
}
@@ -342,12 +342,12 @@
{
$x = explode('/', $RTR->routes['404_override'], 2);
$class = $x[0];
- $method = (isset($x[1]) ? $x[1] : 'index');
+ $method = isset($x[1]) ? $x[1] : 'index';
if ( ! class_exists($class))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
@@ -357,7 +357,7 @@
}
else
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
}
@@ -398,7 +398,7 @@
* Close the DB connection if one exists
* ------------------------------------------------------
*/
- if (class_exists('CI_DB') && isset($CI->db))
+ if (class_exists('CI_DB') && isset($CI->db) && ! $CI->db->pconnect)
{
$CI->db->close();
}