From eb6db84333c40ed8d15dec5014564120ee0c60e6 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 2 Sep 2006 02:39:45 +0000 Subject: --- system/codeigniter/CodeIgniter.php | 5 +++++ system/drivers/DB_postgre.php | 7 +++++-- system/helpers/date_helper.php | 2 +- system/libraries/Validation.php | 2 +- user_guide/general/changelog.html | 6 +++++- 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

Version 1.4.0

-

Release Date: August 25, 2006

+

Release Date: Septemer 01, 2006

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.

Where filename is the name of your config file, without the .php file extension.

+

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 TRUE +and each config file will be stored in an array index corresponding to the name of the config file. Example: + + +// Stored in an array with this prototype: $this->config['blog_settings'] = $config
+$this->config->load('blog_settings', TRUE);
+ +

Please see the section entitled Fetching Config Items below to learn how to retrieve config items set this way.

+ +

The third parameter allows you to suppress errors in the event that a config file does not exist:

+ +$this->config->load('blog_settings', FALSE, TRUE); + + +
  • Auto-loading
  • @@ -109,7 +125,7 @@ indicated in the file.

    Fetching Config Items

    -

    To retrive an item from your config file, use the following function:

    +

    To retrieve an item from your config file, use the following function:

    $this->config->item('item name'); @@ -119,6 +135,20 @@ indicated in the file.

    The function returns FALSE (boolean) if the item you are trying to fetch does not exist.

    +

    If you are using the second parameter of the $this->config->load 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 $this->config->item() function. Example: + + +// Loads a config file named blog_settings.php and assigns it to an index named "blog_settings"
    +$this->config->load('blog_settings', 'TRUE');

    + +// Retrieve a config item named site_name contained within the blog_settings array
    +$site_name = $this->config->item('site_name', 'blog_settings');

    + +// An alternate way to specify the same item:
    +$blog_config = $this->config->item('blog_settings');
    +$site_name = $blog_config['site_name'];
    +

    Setting a Config Item

    If you would like to dynamically set a config item or change an existing one, you can so so using:

    -- cgit v1.2.3-24-g4f1b