From d3c9447c83c59d674132d801f4fc5278a9875162 Mon Sep 17 00:00:00 2001 From: Kevin King Date: Thu, 12 Apr 2012 13:46:20 -0300 Subject: Adding in .ics MIME type for calendar invites. --- system/libraries/Email.php | 1 + 1 file changed, 1 insertion(+) 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', -- cgit v1.2.3-24-g4f1b From ab3cab5a8f2afdd45ec8c6c365e43722781e54e6 Mon Sep 17 00:00:00 2001 From: dixy Date: Sat, 21 Apr 2012 00:58:00 +0200 Subject: Use parameter 'get_as_float' of microtime() --- system/core/Benchmark.php | 11 ++++------- system/database/DB_driver.php | 8 ++++---- 2 files changed, 8 insertions(+), 11 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/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 -- cgit v1.2.3-24-g4f1b From b3f774bbbb81293326136e3e13297c3b8d49dfa4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Apr 2012 12:57:57 +0300 Subject: Fix issue #1265 --- system/core/CodeIgniter.php | 16 ++++++++-------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 4885f310c..92187fa16 100755 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -275,12 +275,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'); @@ -288,7 +288,7 @@ } else { - show_404("{$class}/{$method}"); + show_404($class.'/'.$method); } } @@ -337,12 +337,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'); @@ -352,7 +352,7 @@ } else { - show_404("{$class}/{$method}"); + show_404($class.'/'.$method); } } @@ -393,10 +393,10 @@ * 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(); } /* End of file CodeIgniter.php */ -/* Location: ./system/core/CodeIgniter.php */ +/* Location: ./system/core/CodeIgniter.php */ \ No newline at end of file diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0cac8aea0..f9b087e83 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -207,6 +207,7 @@ Bug fixes for 3.0 - Fixed a bug (#798) - update() used to ignore LIKE conditions that were set with like(). - Fixed a bug in Oracle's and MSSQL's delete() methods where an erroneous SQL statement was generated when used with limit(). - Fixed a bug in SQLSRV's delete() method where like() and limit() conditions were ignored. +- Fixed a bug (#1265) - Database connections were always closed, regardless of the 'pconnect' option value. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From d52e3b19eb03bcd38f89ccbf5aae68364f715343 Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 23 Apr 2012 23:04:35 +0800 Subject: Added fix for issue: https://github.com/EllisLab/CodeIgniter/issues/1277 --- system/helpers/download_helper.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 19192a147..18fe96223 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); -- cgit v1.2.3-24-g4f1b From bbd9dd3df9d373fbac8560db926a9f70a5bde3b7 Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 23 Apr 2012 23:13:46 +0800 Subject: Tweak to comments to conform to style guide. --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 18fe96223..8b87f8179 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -101,7 +101,7 @@ if ( ! function_exists('force_download')) $filename = implode('.', $x); } - //Clean output buffer + // Clean output buffer ob_clean(); // Generate the server headers -- cgit v1.2.3-24-g4f1b