diff options
-rw-r--r-- | system/database/drivers/oci8/oci8_result.php | 16 | ||||
-rw-r--r-- | system/libraries/Email.php | 74 | ||||
-rw-r--r-- | system/libraries/Output.php | 3 | ||||
-rw-r--r-- | user_guide/changelog.html | 8 | ||||
-rw-r--r-- | user_guide/libraries/file_uploading.html | 2 | ||||
-rw-r--r-- | user_guide/nav/nav.js | 1 |
6 files changed, 46 insertions, 58 deletions
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 947a76109..efb2f7bed 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -38,18 +38,14 @@ class CI_DB_oci8_result extends CI_DB_result { */ function num_rows() { - // get the results, count them, - // rerun query - otherwise we - // won't have data after calling - // num_rows() - $this->result_array(); - $rowcount = count($this->result_array); - @ociexecute($this->stmt_id); - if ($this->curs_id) + if (function_exists('oci_num_rows')) + { + return @oci_num_rows($this->stmt_id); + } + else { - @ociexecute($this->curs_id); + return @ocirowcount($this->stmt_id) } - return $rowcount; } // -------------------------------------------------------------------- diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 92f2e73fa..158c82af2 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -321,14 +321,7 @@ class CI_Email { */ function message($body) { - $body = rtrim(str_replace("\r", "", $body)); - - if ($this->wordwrap === TRUE AND $this->mailtype != 'html') - $this->_body = $this->word_wrap($body); - else - $this->_body = $body; - - $this->_body = stripslashes($this->_body); + $this->_body = stripslashes(rtrim(str_replace("\r", "", $body))); } // -------------------------------------------------------------------- @@ -758,59 +751,53 @@ class CI_Email { function word_wrap($str, $chars = '') { if ($chars == '') + { $chars = ($this->wrapchars == "") ? "76" : $this->wrapchars; + } - $lines = split("\n", $str); - - $output = ""; + $str = preg_replace("| +|", " ", $str); - while (list(, $thisline) = each($lines)) + $str = preg_replace("|(\[url.+\])|", "{unwrap}\\1{/unwrap}", $str); + + $output = ""; + foreach (split("\n", $str) as $current_line) { - if (strlen($thisline) > $chars) + if (strlen($current_line) > $chars) { $line = ""; - - $words = split(" ", $thisline); - - while(list(, $thisword) = each($words)) + + foreach (split(" ", $current_line) as $words) { - while((strlen($thisword)) > $chars) + while((strlen($words)) > $chars) { - if (stristr($thisword, '{unwrap}') !== FALSE OR stristr($thisword, '{/unwrap}') !== FALSE) + if (stristr($words, '{unwrap}') !== FALSE OR stristr($words, '{/unwrap}') !== FALSE) { break; } - - $cur_pos = 0; - - for($i=0; $i < $chars - 1; $i++) - { - $output .= $thisword[$i]; - $cur_pos++; - } - - $output .= "\n"; - - $thisword = substr($thisword, $cur_pos, (strlen($thisword) - $cur_pos)); + + $output .= substr($words, 0, $chars-1); + $words = substr($words, $chars-1); + + $output .= $this->newline; } - if ((strlen($line) + strlen($thisword)) > $chars) + if ((strlen($line) + strlen($words)) > $chars) { - $output .= $line."\n"; + $output .= $line.$this->newline; - $line = $thisword." "; - } - else + $line = $words." "; + } + else { - $line .= $thisword." "; + $line .= $words." "; } } - $output .= $line."\n"; - } - else + $output .= $line.$this->newline; + } + else { - $output .= $thisline."\n"; + $output .= $current_line.$this->newline; } } @@ -878,6 +865,11 @@ class CI_Email { */ function _build_message() { + if ($this->wordwrap === TRUE AND $this->mailtype != 'html') + { + $this->_body = $this->word_wrap($this->_body); + } + $this->_set_boundaries(); $this->_write_headers(); diff --git a/system/libraries/Output.php b/system/libraries/Output.php index 0c2620df7..e53627408 100644 --- a/system/libraries/Output.php +++ b/system/libraries/Output.php @@ -201,7 +201,8 @@ class CI_Output { { echo $output; log_message('debug', "Final output sent to browser"); - log_message('debug', "Total execution time: ".$elapsed); + log_message('debug', "Total execution time: ".$elapsed); + return TRUE; } // -------------------------------------------------------------------- diff --git a/user_guide/changelog.html b/user_guide/changelog.html index c8e113547..c47972247 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -64,10 +64,7 @@ Change Log <h2>Version 1.5.0 Beta 3</h2>
-<p>Release Date: October 25, 2006</p>
-
-<p class="important"><strong>Important:</strong> In Beta 3, the way native libraries are extended has changed slightly thanks to
-a suggestion offered by coolfactor in our forums. Please check the documentation below if you are extending classes.</p>
+<p>Release Date: October 30, 2006</p>
<ul>
<li>Added <a href="./database/utilities.html">DB utility class</a>, permitting DB backups, CVS or XML files from DB results, and various other functions.</li>
@@ -76,7 +73,8 @@ a suggestion offered by coolfactor in our forums. Please check the documentatio <li>Added <a href="./general/profiling.html">Profiler Class</a> which generates a report of Benchmark execution times, queries, and POST data at the bottom of your pages.</li>
<li>Added <a href="./libraries/user_agent.html">User Agent Library</a> which allows browsers, robots, and mobile devises to be identified.</li>
<li>Added <a href="./libraries/table.html">HTML Table Class</a> , enabling tables to be generated from arrays or database results.</li>
-<li>Added <a href="./libraries/Zip.html">Zip Encoding Library</a>.</li>
+<li>Added <a href="./libraries/zip.html">Zip Encoding Library</a>.</li>
+<li>Added <a href="./libraries/ftp.html">FTP Library</a>.</li>
<li>Added the ability to <a href="./general/creating_libraries.html">extend libraries</a> and <a href="./general/core_classes.html">extend core classes</a>, in addition to being able to replace them.</li>
<li>Added support for storing <a href="./general/models.html">models within sub-folders</a>.</li>
<li>Added <a href="./helpers/download_helper.html">Download Helper</a>.</li>
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index 730dd0545..6a7deee42 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -426,7 +426,7 @@ Previous Topic: <a href="encryption.html">Encryption Class</a> ·
<a href="#top">Top of Page</a> ·
<a href="../index.html">User Guide Home</a> ·
-Next Topic: <a href="table.html">HTML Table Class</a>
+Next Topic: <a href="ftp.html">FTP Class</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> · Copyright © 2006 · <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>
diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js index 3906038d9..511149201 100644 --- a/user_guide/nav/nav.js +++ b/user_guide/nav/nav.js @@ -71,6 +71,7 @@ function create_menu(basepath) '<li><a href="'+base+'libraries/email.html">Email Class</a></li>' + '<li><a href="'+base+'libraries/encryption.html">Encryption Class</a></li>' + '<li><a href="'+base+'libraries/file_uploading.html">File Uploading Class</a></li>' + + '<li><a href="'+base+'libraries/ftp.html">FTP Class</a></li>' + '<li><a href="'+base+'libraries/table.html">HTML Table Class</a></li>' + '<li><a href="'+base+'libraries/image_lib.html">Image Manipulation Class</a></li>' + '<li><a href="'+base+'libraries/input.html">Input and Security Class</a></li>' + |