summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rwxr-xr-xsystem/core/Benchmark.php11
-rwxr-xr-xsystem/core/CodeIgniter.php14
-rw-r--r--system/database/DB_driver.php8
-rw-r--r--system/helpers/download_helper.php3
-rw-r--r--system/libraries/Email.php1
5 files changed, 19 insertions, 18 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();
}
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 61b05d52b..cb04c7103 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -335,7 +335,7 @@ abstract class CI_DB_driver {
}
// Start the Query Timer
- $time_start = list($sm, $ss) = explode(' ', microtime());
+ $time_start = microtime(TRUE);
// Run the Query
if (FALSE === ($this->result_id = $this->simple_query($sql)))
@@ -370,12 +370,12 @@ abstract class CI_DB_driver {
}
// Stop and aggregate the query time results
- $time_end = list($em, $es) = explode(' ', microtime());
- $this->benchmark += ($em + $es) - ($sm + $ss);
+ $time_end = microtime(TRUE);
+ $this->benchmark += $time_end - $time_start;
if ($this->save_queries == TRUE)
{
- $this->query_times[] = ($em + $es) - ($sm + $ss);
+ $this->query_times[] = $time_end - $time_start;
}
// Increment the query counter
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 19192a147..8b87f8179 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -100,6 +100,9 @@ if ( ! function_exists('force_download'))
$x[count($x) - 1] = strtoupper($extension);
$filename = implode('.', $x);
}
+
+ // Clean output buffer
+ ob_clean();
// Generate the server headers
header('Content-Type: '.$mime);
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 48c3bf3ab..103c3cb25 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1891,6 +1891,7 @@ class CI_Email {
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => 'text/css',
+ 'ics' => 'text/calendar',
'html' => 'text/html',
'htm' => 'text/html',
'shtml' => 'text/html',