summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2006-11-20 18:29:05 +0100
committerRick Ellis <rick.ellis@ellislab.com>2006-11-20 18:29:05 +0100
commit325197e700564f8e4e0ba7c9fc82abfd85f451b0 (patch)
treec109f0c96f187dc3b919aca591daf5767de4c982
parentebfa686046bb98c757d1b41c81eb867478036e68 (diff)
-rw-r--r--system/application/config/config.php4
-rw-r--r--system/codeigniter/Common.php8
-rw-r--r--system/database/drivers/oci8/oci8_result.php24
-rw-r--r--system/libraries/Exceptions.php6
-rw-r--r--system/libraries/Input.php6
-rw-r--r--system/libraries/User_agent.php1
-rw-r--r--user_guide/changelog.html3
-rw-r--r--user_guide/database/caching.html2
-rw-r--r--user_guide/database/helpers.html4
-rw-r--r--user_guide/database/utilities.html2
-rw-r--r--user_guide/general/caching.html2
-rw-r--r--user_guide/general/core_classes.html8
-rw-r--r--user_guide/general/views.html8
-rw-r--r--user_guide/helpers/date_helper.html2
-rw-r--r--user_guide/helpers/smiley_helper.html2
-rw-r--r--user_guide/helpers/text_helper.html8
-rw-r--r--user_guide/installation/downloads.html2
-rw-r--r--user_guide/libraries/config.html2
-rw-r--r--user_guide/libraries/file_uploading.html2
-rw-r--r--user_guide/libraries/ftp.html4
-rw-r--r--user_guide/libraries/sessions.html2
-rw-r--r--user_guide/libraries/unit_testing.html2
-rw-r--r--user_guide/libraries/xmlrpc.html2
23 files changed, 65 insertions, 41 deletions
diff --git a/system/application/config/config.php b/system/application/config/config.php
index 2f385a6ef..b1598b341 100644
--- a/system/application/config/config.php
+++ b/system/application/config/config.php
@@ -223,9 +223,9 @@ $config['encryption_key'] = "";
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie'] = FALSE;
-$config['sess_use_database'] = TRUE;
+$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_sessions';
-$config['sess_match_ip'] = TRUE;
+$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
/*
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index 41e13bee6..4576cd964 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -106,14 +106,14 @@ function &get_config()
{
if ( ! file_exists(APPPATH.'config/config'.EXT))
{
- show_error('The configuration file config'.EXT.' does not exist.');
+ exit('The configuration file config'.EXT.' does not exist.');
}
require(APPPATH.'config/config'.EXT);
if ( ! isset($config) OR ! is_array($config))
{
- show_error('Your config file does not appear to be formatted correctly.');
+ exit('Your config file does not appear to be formatted correctly.');
}
$main_conf[0] =& $config;
@@ -210,8 +210,8 @@ function log_message($level = 'error', $message, $php_error = FALSE)
/**
* Exception Handler
*
-* This is the custom exception handler we defined at the
-* top of this file. The main reason we use this is permit
+* This is the custom exception handler that is declaired at the top
+* of Codeigniter.php. The main reason we use this is permit
* PHP errors to be logged in our own log files since we may
* not have access to server logs. Since this function
* effectively intercepts PHP errors, however, we also need
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index af30457b3..fb4ed1f0d 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.php
@@ -31,21 +31,24 @@ class CI_DB_oci8_result extends CI_DB_result {
var $limit_used;
/**
- * Number of rows in the result set
+ * Number of rows in the result set.
+ *
+ * Oracle doesn't have a graceful way to retun the number of rows
+ * so we have to use what amounts to a hack.
+ *
*
* @access public
* @return integer
*/
function num_rows()
{
- if (function_exists('oci_num_rows'))
- {
- return @oci_num_rows($this->stmt_id);
- }
- else
+ $rowcount = count($this->result_array());
+ @ociexecute($this->stmt_id);
+ if ($this->curs_id)
{
- return @ocirowcount($this->stmt_id);
+ @ociexecute($this->curs_id);
}
+ return $rowcount;
}
// --------------------------------------------------------------------
@@ -175,12 +178,7 @@ class CI_DB_oci8_result extends CI_DB_result {
{
$id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;
- while ($row = oci_fetch_object($id))
- {
- $result[] = $row;
- }
-
- return $result;
+ return @oci_fetch_object($id);
}
// If PHP 4 is being used we have to build our own result
diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php
index 8f90ff8f9..839093911 100644
--- a/system/libraries/Exceptions.php
+++ b/system/libraries/Exceptions.php
@@ -30,6 +30,7 @@ class CI_Exceptions {
var $message;
var $filename;
var $line;
+ var $ob_level;
var $levels = array(
E_ERROR => 'Error',
@@ -53,6 +54,7 @@ class CI_Exceptions {
*/
function CI_Exceptions()
{
+ $this->ob_level = ob_get_level();
// Note: Do not log messages from this constructor.
}
@@ -115,7 +117,7 @@ class CI_Exceptions {
{
$message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
- if (ob_get_level() > 1)
+ if (ob_get_level() > $this->ob_level + 1)
{
ob_end_flush();
}
@@ -151,7 +153,7 @@ class CI_Exceptions {
$filepath = $x[count($x)-2].'/'.end($x);
}
- if (ob_get_level() > 1)
+ if (ob_get_level() > $this->ob_level + 1)
{
ob_end_flush();
}
diff --git a/system/libraries/Input.php b/system/libraries/Input.php
index b630bf6b8..801762073 100644
--- a/system/libraries/Input.php
+++ b/system/libraries/Input.php
@@ -73,13 +73,15 @@ class CI_Input {
{
if ( ! is_array($global))
{
- unset($$global);
+ global $global;
+ $$global = NULL;
}
else
{
foreach ($global as $key => $val)
{
- unset($$key);
+ global $$key;
+ $$key = NULL;
}
}
}
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 8d160672f..95eccd124 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -186,6 +186,7 @@ class CI_User_agent {
$this->is_browser = TRUE;
$this->version = $match[1];
$this->browser = $val;
+ $this->_set_mobile();
return TRUE;
}
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 477814d7c..461142fd9 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -69,6 +69,9 @@ Change Log
<li>Added support for naming custom library files in lower or uppercase.</li>
<li>Fixed a bug in the active record class that was not resetting query data after a completed query.</li>
<li>Fixed a bug that was supressing errors in controllers.</li>
+<li>Fixed a problem that can cause a loop to occur when the config file is missing.</li>
+<li>Fixed some bugs in the Oracle DB driver.</li>
+<li>Fixed some doc typos.</li>
</ul>
diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html
index 9a16a8f8d..615f74c9d 100644
--- a/user_guide/database/caching.html
+++ b/user_guide/database/caching.html
@@ -216,7 +216,7 @@ Previous Topic:&nbsp;&nbsp;<a href="call_function.html">Custom Function Calls</a
&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="export.html">Database Export Class</a>
+Next Topic:&nbsp;&nbsp;<a href="utilities.html">Database Utilities Class</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>
diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html
index 2b552f1c3..5ffe0c85c 100644
--- a/user_guide/database/helpers.html
+++ b/user_guide/database/helpers.html
@@ -117,6 +117,8 @@ $str = $this->db->insert_string('table_name', $data);
<p>The first parameter is the table name, the second is an associative array with the data to be inserted. The above example produces:</p>
<code>INSERT INTO table_name (name, email, url) VALUES ('Rick', 'rick@your-site.com', 'www.your-site.com')</code>
+<p class="important">Note: Values are automatically escaped, producing safer queries.</p>
+
<h2>$this->db->update_string(); </h2>
@@ -132,7 +134,7 @@ $str = $this->db->update_string('table_name', $data, $where);
<p>The first parameter is the table name, the second is an associative array with the data to be inserted, and the third parameter is the "where" clause. The above example produces:</p>
<code> UPDATE exp_weblog SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active'</code>
-
+<p class="important">Note: Values are automatically escaped, producing safer queries.</p>
</div>
diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html
index a9227ab26..3027b68ed 100644
--- a/user_guide/database/utilities.html
+++ b/user_guide/database/utilities.html
@@ -325,7 +325,7 @@ $this->dbutil->backup($prefs);
<div id="footer">
<p>
-Previous Topic:&nbsp;&nbsp;<a href="call_function.html">Custom Function Calls</a>
+Previous Topic:&nbsp;&nbsp;<a href="caching.html">DB Caching Class</a>
&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html
index b4b3dab73..f62c53db9 100644
--- a/user_guide/general/caching.html
+++ b/user_guide/general/caching.html
@@ -94,7 +94,7 @@ most logical to you. Once the tag is in place, your pages will begin being cache
<h2>Deleting Caches</h2>
-<p>If you no longer wish to cache a file you can remove the caching tag and it will not longer be refreshed when it expires. Note:
+<p>If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires. Note:
Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you
will need to manually delete it from your cache folder.</p>
diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html
index f7e308acd..92c35c706 100644
--- a/user_guide/general/core_classes.html
+++ b/user_guide/general/core_classes.html
@@ -144,6 +144,14 @@ class MY_Input extends CI_Input {<br />
This allows you to substantially alter the Code Igniter core.</p>
+<h3>Setting Your Own Prefix</h3>
+
+<p>To set your own sub-class prefix, open your <dfn>application/config/config.php</dfn> file and look for this item:</p>
+
+<code>$config['subclass_prefix'] = 'MY_';</code>
+
+<p>Please note that all native Code Igniter libraries are prefixed with <kbd>CI_</kbd> so DO NOT use that as your prefix.</p>
+
diff --git a/user_guide/general/views.html b/user_guide/general/views.html
index 147667ce2..fa7f5eb78 100644
--- a/user_guide/general/views.html
+++ b/user_guide/general/views.html
@@ -97,6 +97,7 @@ you should do so before continuing.</p>
<p>Where <var>name</var> is the name of your view file. Note: The .php file extension does not need to be specified unless you use something other then <kbd>.php</kbd>.</p>
+
<p>Now, open the controller file you made earlier called <dfn>blog.php</dfn>, and replace the echo statement with the view loading function:</p>
@@ -117,6 +118,13 @@ class Blog extends Controller {
<code>www.your-site.com/index.php/<var>blog</var>/</code>
+<h2>Storing Views within Sub-folders</h2>
+
+<p>Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need
+to include the folder name loading the view. Example:</p>
+
+<code>$this->load->view('<kbd>folder_name</kbd>/<var>file_name</var>');</code>
+
<h2>Adding Dynamic Data to the View</h2>
diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html
index 68e306827..0cf78848e 100644
--- a/user_guide/helpers/date_helper.html
+++ b/user_guide/helpers/date_helper.html
@@ -315,7 +315,7 @@ echo timespan($post_date, $now);</code>
</tr><tr>
<td class="td">UM1</td><td class="td">(UTC - 1:00) Azores, Cape Verde Islands</td>
</tr><tr>
-<td class="td">(UTC</td><td class="td">(UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</td>
+<td class="td">UTC</td><td class="td">(UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</td>
</tr><tr>
<td class="td">UP1</td><td class="td">(UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome</td>
</tr><tr>
diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html
index d818d008c..36ea26216 100644
--- a/user_guide/helpers/smiley_helper.html
+++ b/user_guide/helpers/smiley_helper.html
@@ -84,7 +84,7 @@ Your users can click a desired smiley and with the help of some JavaScript it wi
<h2>Clickable Smileys Tutorial</h2>
-<p>Here is an example demonstrating how you might create a set of clickale smileys next to a form field. This example
+<p>Here is an example demonstrating how you might create a set of clickable smileys next to a form field. This example
requires that you first download and install the smiley images, then create a controller and the View as described.</p>
<p class="important"><strong>Important:</strong> Before you begin, please <a href="http://www.codeigniter.com/downloads/smileys.zip">download the smiley images</a> and put them in
diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html
index f84acce95..9cdada2db 100644
--- a/user_guide/helpers/text_helper.html
+++ b/user_guide/helpers/text_helper.html
@@ -79,7 +79,7 @@ Text Helper
<p>Truncates a string to the number of <strong>words</strong> specified. Example:</p>
<code>
-$str = "Here is a nice text string consisting of eleven words.";<br />
+$string = "Here is a nice text string consisting of eleven words.";<br />
<br />
$string = word_limiter($string, 4);<br /><br />
@@ -95,9 +95,9 @@ $string = word_limiter($string, 4);<br /><br />
of words so the character count may be slightly more or less then what you specify. Example:</p>
<code>
-$str = "Here is a nice text string consisting of eleven words.";<br />
+$string = "Here is a nice text string consisting of eleven words.";<br />
<br />
-$string = char_limiter($string, 20);<br /><br />
+$string = character_limiter($string, 20);<br /><br />
// Returns: Here is a nice text string&#8230;
</code>
@@ -149,7 +149,7 @@ contain the phrase you wish to highlight. The third and fourth parameters will
you would like the phrase wrapped in. Example:</p>
<code>
-$str = "Here is a nice text string about nothing in particular.";<br />
+$string = "Here is a nice text string about nothing in particular.";<br />
<br />
$string = highlight_phrase($string, "nice text", '&lt;span style="color:#990000">', '&lt;/span>');
</code>
diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html
index 1f84a4058..ca0e58292 100644
--- a/user_guide/installation/downloads.html
+++ b/user_guide/installation/downloads.html
@@ -64,7 +64,7 @@ Downloading Code Igniter
<ul>
<li><a href="http://www.codeigniter.com/download.php">Code Igniter V 1.5.0 (Current version)</a></li>
-<li><a href="http://www.codeigniter.com/CodeIgniter_1.4.0.zip">Code Igniter V 1.4.0</a></li>
+<li><a href="http://www.codeigniter.com/downloads/CodeIgniter_1.4.1.zip">Code Igniter V 1.4.1</a></li>
<li><a href="http://www.codeigniter.com/downloads/CodeIgniter_1.3.3.zip">Code Igniter V 1.3.3</a></li>
<li><a href="http://www.codeigniter.com/downloads/CodeIgniter_1.3.2.zip">Code Igniter V 1.3.2</a></li>
<li><a href="http://www.codeigniter.com/downloads/CodeIgniter_1.3.1.zip">Code Igniter V 1.3.1</a></li>
diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html
index d22881fa6..c88b5d671 100644
--- a/user_guide/libraries/config.html
+++ b/user_guide/libraries/config.html
@@ -179,7 +179,7 @@ Previous Topic:&nbsp;&nbsp;<a href="calendar.html">Calendaring Class</a>
&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="database/index.html">Database Class</a>
+Next Topic:&nbsp;&nbsp;<a href="../database/index.html">Database Class</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 1fa93bf17..25054c7e4 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -230,7 +230,7 @@ $config['max_size'] = '100';<br />
$config['max_width'] = '1024';<br />
$config['max_height'] = '768';<br />
<br />
-$this->load->library('ftp', $config);<br /><br />
+$this->load->library('upload', $config);<br /><br />
// Alternately you can set preferences by calling the initialize function. Useful if you auto-load the class:<br />
$this->upload->initialize($config);</code>
diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html
index 0bec3a828..014b94d2a 100644
--- a/user_guide/libraries/ftp.html
+++ b/user_guide/libraries/ftp.html
@@ -63,8 +63,8 @@ FTP Class
<h1>FTP Class</h1>
-<p>Code Igniter's FTP Class permits files to be uploaded, moved, renamed, and deleted on your server. It also includes a "mirroring" function
-that permits a local directory to be recreated remotely via FTP.</p>
+<p>Code Igniter's FTP Class permits files to be transfered to a remote server. Remote files can also be moved, renamed,
+and deleted. The FTP class also includes a "mirroring" function that permits an entire local directory to be recreated remotely via FTP.</p>
<p class="important"><strong>Note:</strong>&nbsp; SFTP and SSL FTP protocols are not supported, only standard FTP.</p>
diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html
index ed6260f44..017965288 100644
--- a/user_guide/libraries/sessions.html
+++ b/user_guide/libraries/sessions.html
@@ -238,7 +238,7 @@ If you would like a non-expiring session set the value to zero: 0</td>
</tr><tr>
<td class="td"><strong>sess_encrypt_cookie</strong></td>
-<td class="td">TRUE</td>
+<td class="td">FALSE</td>
<td class="td">TRUE/FALSE (boolean)</td>
<td class="td">Whether to encrypt the session data.</td>
diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html
index 692df0031..0ebb40116 100644
--- a/user_guide/libraries/unit_testing.html
+++ b/user_guide/libraries/unit_testing.html
@@ -155,7 +155,7 @@ will evaluate the above code as TRUE using a normal equality test:</p>
<p>To enable strict mode use this:</p>
-<code>$this->unit->strict(TRUE);</code>
+<code>$this->unit->use_strict(TRUE);</code>
<h2>Enabling/Disabling Unit Testing</h2>
diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html
index 9421e0fea..01a88d78c 100644
--- a/user_guide/libraries/xmlrpc.html
+++ b/user_guide/libraries/xmlrpc.html
@@ -485,7 +485,7 @@ Previous Topic:&nbsp;&nbsp;<a href="validation.html">Validation Class</a>
&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="../helpers/array_helper.html">Array Helper</a>
+Next Topic:&nbsp;&nbsp;<a href="zip.html">Zip Encoding Class</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>