diff options
author | admin <devnull@localhost> | 2006-09-02 04:39:45 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-02 04:39:45 +0200 |
commit | eb6db84333c40ed8d15dec5014564120ee0c60e6 (patch) | |
tree | 550ed1822d36fa35469ad4d7cc60a116789b1213 | |
parent | 671dc754ef954eecf4c2e8301dde5b3aba6bfedc (diff) |
-rw-r--r-- | system/codeigniter/CodeIgniter.php | 5 | ||||
-rw-r--r-- | system/drivers/DB_postgre.php | 7 | ||||
-rw-r--r-- | system/helpers/date_helper.php | 2 | ||||
-rw-r--r-- | system/libraries/Validation.php | 2 | ||||
-rw-r--r-- | user_guide/general/changelog.html | 6 | ||||
-rw-r--r-- | user_guide/libraries/config.html | 32 |
6 files changed, 48 insertions, 6 deletions
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php index 872f4c049..1f7850ecf 100644 --- a/system/codeigniter/CodeIgniter.php +++ b/system/codeigniter/CodeIgniter.php @@ -188,6 +188,11 @@ if ($RTR->scaffolding_request === TRUE) } else { + if ($method == $class) + { + $method = 'index'; + } + if ( ! method_exists($CI, $method)) { show_404(); diff --git a/system/drivers/DB_postgre.php b/system/drivers/DB_postgre.php index cf59f0fdc..fd98ec78b 100644 --- a/system/drivers/DB_postgre.php +++ b/system/drivers/DB_postgre.php @@ -211,7 +211,8 @@ class CI_DB_postgre extends CI_DB { * Escape Table Name * * This function adds backticks if the table name has a period - * in it. Some DBs will get cranky unless periods are escaped + * in it. Some DBs will get cranky unless periods are escaped. + * NOT NEEDED FOR POSTGRE * * @access public * @param string the table name @@ -219,10 +220,12 @@ class CI_DB_postgre extends CI_DB { */ function escape_table($table) { + /* if (stristr($table, '.')) { - $table = preg_replace("/\./", ".", $table); + $table = preg_replace("/\./", "`.`", $table); } + */ return $table; } diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 2a3d50859..c8205bb7d 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -189,7 +189,7 @@ function timespan($seconds = 1, $time = '') { if ($minutes > 0) { - $str .= $minutes.' '.$obj->lang->line((($minutes > 1) ? 'date_minutes' : 'date_minutes')).', '; + $str .= $minutes.' '.$obj->lang->line((($minutes > 1) ? 'date_minutes' : 'date_minute')).', '; } $seconds -= $minutes * 60; diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php index e037e69c5..30faa85ed 100644 --- a/system/libraries/Validation.php +++ b/system/libraries/Validation.php @@ -208,7 +208,7 @@ class CI_Validation { { if (in_array('isset', $ex) OR in_array('required', $ex)) { - if ( ! isset($this->messages['isset'])) + if ( ! isset($this->_error_messages['isset'])) { if (FALSE === ($line = $this->obj->lang->line('isset'))) { diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html index ef344ffc9..a77077235 100644 --- a/user_guide/general/changelog.html +++ b/user_guide/general/changelog.html @@ -65,7 +65,7 @@ Change Log <h2>Version 1.4.0</h2>
-<p>Release Date: August 25, 2006</p>
+<p>Release Date: Septemer 01, 2006</p>
<ul>
<li>Added <a href="hooks.html">Hooks</a> feature, enabling you to tap into and modify the inner workings of the framework without hacking the core files.</li>
@@ -76,6 +76,7 @@ Change Log <li>Added the ability to supply full URLs using the <dfn>anchor()</dfn> helper function.</li>
<li>Moved the list of "allowed URI characters" out of the Router class and into the config file.</li>
<li>Moved the MIME type array out of the Upload class and into its own file in the applications/config/ folder.</li>
+<li>Updated the <a href="../libraries/config.html">Config Library</a> to be able to load config files silently.</li>
<li>Updated the URI Protocol code to allow more options so that URLs will work more reliably in different environments.</li>
<li>Updated the <dfn>form_open()</dfn> helper to allow the GET method to be used.</li>
<li>Updated the MySQLi <dfn>execute()</dfn> function with some code to help prevent lost connection errors.</li>
@@ -96,12 +97,15 @@ Change Log <li>Fixed a bug that was causing the Loader class to incorrectly identify the file extension.</li>
<li>Fixed a typo in the Calendar class (cal_november).</li>
<li>Fixed a bug in the <dfn>form_checkbox()</dfn> helper.</li>
+<li>Fixed a bug that was allowing the second segment of the URI to be identical to the class name.</li>
<li>Fixed an evaluation bug in the database initialization function.</li>
<li>Fixed a minor bug in one of the error messages in the language class.</li>
+<li>Fixed a bug in the date helper <dfn>timespan</dfn> function.</li>
<li>Fixed an undefined variable in the DB Driver class.</li>
<li>Fixed a bug in which dollar signs used as binding replacemnt values in the DB class would be treated as RegEx back-references.</li>
<li>Fixed a bug in the <dfn>set_hash()</dfn> function which was preventing MD5 from being used.</li>
<li>Fixed a couple bugs in the Unit Testing class.</li>
+<li>Fixed an incorrectlyl named variable in the Validation class.</li>
<li>Fixed some MS SQL bugs.</li>
<li>Fixed some doc typos.</li>
</ul>
diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html index c173f5690..ca4773d24 100644 --- a/user_guide/libraries/config.html +++ b/user_guide/libraries/config.html @@ -97,6 +97,22 @@ so you will only need to load a config file if you have created your own.</p> <p>Where <var>filename</var> is the name of your config file, without the .php file extension.</p>
+<p>If you need to load multiple config files normally they will be merged into one master config array. Name collisions can occur, however, if
+you have identically named array indexes in different config files. To avoid collisions you can set the second parameter to <kbd>TRUE</kbd>
+and each config file will be stored in an array index corresponding to the name of the config file. Example:
+
+<code>
+// Stored in an array with this prototype: $this->config['blog_settings'] = $config<br />
+$this->config->load('<var>blog_settings</var>', <kbd>TRUE</kbd>);</code>
+
+<p>Please see the section entitled <dfn>Fetching Config Items</dfn> below to learn how to retrieve config items set this way.</p>
+
+<p>The third parameter allows you to suppress errors in the event that a config file does not exist:</p>
+
+<code>$this->config->load('<var>blog_settings</var>', <dfn>FALSE</dfn>, <kbd>TRUE</kbd>);</code>
+
+
+
</li>
<li><strong>Auto-loading</strong></li>
@@ -109,7 +125,7 @@ indicated in the file.</p> <h2>Fetching Config Items</h2>
-<p>To retrive an item from your config file, use the following function:</p>
+<p>To retrieve an item from your config file, use the following function:</p>
<code>$this->config->item('<var>item name</var>');</code>
@@ -119,6 +135,20 @@ indicated in the file.</p> <p>The function returns FALSE (boolean) if the item you are trying to fetch does not exist.</p>
+<p>If you are using the second parameter of the <kbd>$this->config->load</kbd> function in order to assign your config items to a specific index
+you can retrieve it by specifying the index name in the second parameter of the <kbd>$this->config->item()</kbd> function. Example:
+
+<code>
+// Loads a config file named blog_settings.php and assigns it to an index named "blog_settings"<br />
+$this->config->load('<var>blog_settings</var>', '<kbd>TRUE</kbd>');<br /><br />
+
+// Retrieve a config item named site_name contained within the blog_settings array<br />
+$site_name = $this->config->item('<dfn>site_name</dfn>', '<var>blog_settings</var>');<br /><br />
+
+// An alternate way to specify the same item:<br />
+$blog_config = $this->config->item('<var>blog_settings</var>');<br />
+$site_name = $blog_config['site_name'];</code>
+
<h2>Setting a Config Item</h2>
<p>If you would like to dynamically set a config item or change an existing one, you can so so using:</p>
|