summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-29 21:24:11 +0100
committeradmin <devnull@localhost>2006-10-29 21:24:11 +0100
commitf3a6204bb0f4538d6a77d9c85c56545be73ecd64 (patch)
tree5f355ad88be33a1f5d35e542984d17b6b6bfb18c
parent23b8f61fe500a179e6f71b07c32752b80eac2e1a (diff)
-rw-r--r--system/database/DB_driver.php9
-rw-r--r--system/helpers/smiley_helper.php2
-rw-r--r--system/helpers/url_helper.php21
-rw-r--r--system/libraries/Config.php2
-rw-r--r--system/libraries/Exceptions.php4
-rw-r--r--system/libraries/Language.php5
-rw-r--r--system/libraries/Loader.php20
-rw-r--r--system/libraries/Router.php2
-rw-r--r--system/libraries/Table.php2
-rw-r--r--user_guide/changelog.html1
-rw-r--r--user_guide/installation/upgrade_150.html1
-rw-r--r--user_guide/libraries/table.html23
-rw-r--r--user_guide/overview/features.html8
13 files changed, 61 insertions, 39 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 49ac8ab24..77069d1a8 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -372,8 +372,8 @@ class CI_DB_driver {
if ( ! class_exists($driver))
{
- include_once(BASEPATH.'database/DB_result'.EXT);
- include_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result'.EXT);
+ include(BASEPATH.'database/DB_result'.EXT);
+ include(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result'.EXT);
}
return $driver;
@@ -998,7 +998,7 @@ class CI_DB_driver {
return TRUE;
}
- if ( ! @include_once(BASEPATH.'database/DB_cache'.EXT))
+ if ( ! @include(BASEPATH.'database/DB_cache'.EXT))
{
return $this->cache_off();
}
@@ -1054,13 +1054,12 @@ class CI_DB_driver {
if ( ! class_exists('CI_Exceptions'))
{
- include_once(BASEPATH.'libraries/Exceptions'.EXT);
+ include(BASEPATH.'libraries/Exceptions'.EXT);
}
$error = new CI_Exceptions();
echo $error->show_error('An Error Was Encountered', $message, 'error_db');
exit;
-
}
}
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 0f426d609..a07337246 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -149,7 +149,7 @@ function _get_smiley_array()
return FALSE;
}
- include_once(APPPATH.'config/smileys'.EXT);
+ include(APPPATH.'config/smileys'.EXT);
if ( ! isset($smileys) OR ! is_array($smileys))
{
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index cd628c6ae..9010a06a3 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -110,10 +110,7 @@ function anchor($uri = '', $title = '', $attributes = '')
}
else
{
- if (is_array($attributes))
- {
- $attributes = parse_url_attributes($attributes);
- }
+ $attributes = _parse_attributes($attributes);
}
return '<a href="'.$site_url.'"'.$attributes.'>'.$title.'</a>';
@@ -157,7 +154,7 @@ function anchor_popup($uri = '', $title = '', $attributes = FALSE)
$atts[$key] = ( ! isset($attributes[$key])) ? $val : $attributes[$key];
}
- return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '".parse_url_attributes($atts, TRUE)."');\">".$title."</a>";
+ return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\">".$title."</a>";
}
// ------------------------------------------------------------------------
@@ -178,10 +175,7 @@ function mailto($email, $title = '', $attributes = '')
$title = $email;
}
- if (is_array($attributes))
- {
- $attributes = parse_url_attributes($attributes);
- }
+ $attributes = _parse_attributes($attributes);
return '<a href="mailto:'.$email.'"'.$attributes.'>'.$title.'</a>';
}
@@ -468,8 +462,13 @@ function redirect($uri = '', $method = 'location')
* @param bool
* @return string
*/
-function parse_url_attributes($attributes, $javascript = FALSE)
+function _parse_attributes($attributes, $javascript = FALSE)
{
+ if (is_string($attributes))
+ {
+ return ($attributes != '') ? ' '.$attributes : '';
+ }
+
$att = '';
foreach ($attributes as $key => $val)
{
@@ -483,7 +482,7 @@ function parse_url_attributes($attributes, $javascript = FALSE)
}
}
- if ($javascript == TRUE)
+ if ($javascript == TRUE AND $att != '')
{
$att = substr($att, 0, -1);
}
diff --git a/system/libraries/Config.php b/system/libraries/Config.php
index aa26c9203..c4ea9b4ee 100644
--- a/system/libraries/Config.php
+++ b/system/libraries/Config.php
@@ -75,7 +75,7 @@ class CI_Config {
show_error('The configuration file '.$file.EXT.' does not exist.');
}
- include_once(APPPATH.'config/'.$file.EXT);
+ include(APPPATH.'config/'.$file.EXT);
if ( ! isset($config) OR ! is_array($config))
{
diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php
index 6d58ee6b9..8f90ff8f9 100644
--- a/system/libraries/Exceptions.php
+++ b/system/libraries/Exceptions.php
@@ -120,7 +120,7 @@ class CI_Exceptions {
ob_end_flush();
}
ob_start();
- include_once(APPPATH.'errors/'.$template.EXT);
+ include(APPPATH.'errors/'.$template.EXT);
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
@@ -156,7 +156,7 @@ class CI_Exceptions {
ob_end_flush();
}
ob_start();
- include_once(APPPATH.'errors/error_php'.EXT);
+ include(APPPATH.'errors/error_php'.EXT);
$buffer = ob_get_contents();
ob_end_clean();
echo $buffer;
diff --git a/system/libraries/Language.php b/system/libraries/Language.php
index 37a5c7e99..faf516ea5 100644
--- a/system/libraries/Language.php
+++ b/system/libraries/Language.php
@@ -66,16 +66,15 @@ class CI_Language {
}
// Determine where the language file is and load it
-
if (file_exists(APPPATH.'language/'.$idiom.'/'.$langfile))
{
- include_once(APPPATH.'language/'.$idiom.'/'.$langfile);
+ include(APPPATH.'language/'.$idiom.'/'.$langfile);
}
else
{
if (file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile))
{
- include_once(BASEPATH.'language/'.$idiom.'/'.$langfile);
+ include(BASEPATH.'language/'.$idiom.'/'.$langfile);
}
else
{
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index f243a2879..709d9fe3d 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -315,13 +315,13 @@ class CI_Loader {
if (file_exists(APPPATH.'helpers/'.$helper.EXT))
{
- include_once(APPPATH.'helpers/'.$helper.EXT);
+ include(APPPATH.'helpers/'.$helper.EXT);
}
else
{
if (file_exists(BASEPATH.'helpers/'.$helper.EXT))
{
- include_once(BASEPATH.'helpers/'.$helper.EXT);
+ include(BASEPATH.'helpers/'.$helper.EXT);
}
else
{
@@ -381,13 +381,13 @@ class CI_Loader {
if (file_exists(APPPATH.'plugins/'.$plugin.EXT))
{
- include_once(APPPATH.'plugins/'.$plugin.EXT);
+ include(APPPATH.'plugins/'.$plugin.EXT);
}
else
{
if (file_exists(BASEPATH.'plugins/'.$plugin.EXT))
{
- include_once(BASEPATH.'plugins/'.$plugin.EXT);
+ include(BASEPATH.'plugins/'.$plugin.EXT);
}
else
{
@@ -454,7 +454,7 @@ class CI_Loader {
show_error('Unable to load the requested script: scripts/'.$script.EXT);
}
- include_once(APPPATH.'scripts/'.$script.EXT);
+ include(APPPATH.'scripts/'.$script.EXT);
$this->_ci_scripts[$script] = TRUE;
}
@@ -675,8 +675,8 @@ class CI_Loader {
show_error("Unable to load the requested class: ".$class);
}
- include_once(BASEPATH.'libraries/'.ucfirst($class).EXT);
- include_once(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT);
+ include(BASEPATH.'libraries/'.ucfirst($class).EXT);
+ include(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT);
return $this->_ci_init_class($class, config_item('subclass_prefix'), $params);
}
@@ -687,7 +687,7 @@ class CI_Loader {
$path = ($i % 2) ? APPPATH : BASEPATH;
if (file_exists($path.'libraries/'.$class.EXT))
{
- include_once($path.'libraries/'.$class.EXT);
+ include($path.'libraries/'.$class.EXT);
return $this->_ci_init_class($class, '', $params);
}
}
@@ -715,7 +715,7 @@ class CI_Loader {
$config = NULL;
if (file_exists(APPPATH.'config/'.$class.EXT))
{
- include_once(APPPATH.'config/'.$class.EXT);
+ include(APPPATH.'config/'.$class.EXT);
}
}
@@ -758,7 +758,7 @@ class CI_Loader {
*/
function _ci_autoloader()
{
- include_once(APPPATH.'config/autoload'.EXT);
+ include(APPPATH.'config/autoload'.EXT);
if ( ! isset($autoload))
{
diff --git a/system/libraries/Router.php b/system/libraries/Router.php
index 886433f37..6d925a1c0 100644
--- a/system/libraries/Router.php
+++ b/system/libraries/Router.php
@@ -81,7 +81,7 @@ class CI_Router {
}
// Load the routes.php file.
- @include_once(APPPATH.'config/routes'.EXT);
+ @include(APPPATH.'config/routes'.EXT);
$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
unset($route);
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 183e8895a..1b25a441a 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -268,7 +268,7 @@ class CI_Table {
* @access public
* @return void
*/
- function clear_data()
+ function clear()
{
$this->rows = array();
$this->heading = array();
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 593a1f2a8..1d48e1258 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -85,6 +85,7 @@ Change Log
<li>Added <a href="./database/helpers.html">$this->db->platform()</a> function</li>
<li>Added new <a href="./helpers/file_helper.html">File Helper</a>: get_filenames()</li>
<li>Added new helper: <a href="./helpers/smiley_helper.html">Smiley Helper</a></li>
+<li>Added support for &lt;ul> and &lt;ol> lists in the <a href="./helpers/html_helper.html">HTML Helper</a></li>
<li>Added more thorough initialization in the upload class so that all class variables are reset.</li>
<li>Added "is_numeric" to validation, which uses the native PHP is_numeric function.</li>
<li>Improved the URI handler to make it more reliable when the $config['uri_protocol'] item is set to AUTO.</li>
diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html
index 828dfd499..6ebc331d6 100644
--- a/user_guide/installation/upgrade_150.html
+++ b/user_guide/installation/upgrade_150.html
@@ -76,6 +76,7 @@ have not upgraded to that version please do so first.</p>
<ul>
<li><dfn>application/config/user_agents.php</dfn> (new file for 1.5)</li>
+<li><dfn>application/config/smileys.php</dfn> (new file for 1.5)</li>
<li><dfn>codeigniter/</dfn></li>
<li><dfn>database/</dfn> (new folder for 1.5. Replaces the "drivers" folder)</li>
<li><dfn>helpers/</dfn></li>
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html
index 715848a82..410bd405a 100644
--- a/user_guide/libraries/table.html
+++ b/user_guide/libraries/table.html
@@ -248,11 +248,30 @@ $this->table->set_template($tmpl);
$this->table->set_empty("&amp;nbsp;");
</code>
-<h2>$this->table->clear_data()</h2>
+<h2>$this->table->clear()</h2>
<p>Lets you clear the table heading and row data. If you need to show multiple tables with different data you should
-to call this function after each table has been generated to empty the previous table information.</p>
+to call this function after each table has been generated to empty the previous table information. Example:</p>
+<code>
+$this->load->library('table');<br />
+<br />
+$this->table->set_heading('Name', 'Color', 'Size');<br />
+$this->table->add_row('Fred', 'Blue', 'Small');<br />
+$this->table->add_row('Mary', 'Red', 'Large');<br />
+$this->table->add_row('John', 'Green', 'Medium');<br />
+<br />
+echo $this->table->generate();<br />
+<br />
+<kbd>$this->table->clear();</kbd><br />
+<br />
+$this->table->set_heading('Name', 'Day', 'Delivery');<br />
+$this->table->add_row('Fred', 'Wednesday', 'Express');<br />
+$this->table->add_row('Mary', 'Monday', 'Air');<br />
+$this->table->add_row('John', 'Saturday', 'Overnight');<br />
+<br />
+echo $this->table->generate();
+</code>
</div>
<!-- END CONTENT -->
diff --git a/user_guide/overview/features.html b/user_guide/overview/features.html
index 44ca4b147..5d8ae7347 100644
--- a/user_guide/overview/features.html
+++ b/user_guide/overview/features.html
@@ -81,22 +81,26 @@ Code Igniter is child's play so we encourage you to do just that. In the mean t
<li>Email Sending Class. Supports Attachments, HTML/Text email, multiple protocols (sendmail, SMTP, and Mail) and more.</li>
<li>Image Manipulation Library (cropping, resizing, rotating, etc.). Supports GD, ImageMagick, and NetPBM</li>
<li>File Uploading Class</li>
+<li>FTP Class</li>
<li>Localization</li>
<li>Pagination</li>
<li>Data Encryption</li>
<li>Benchmarking</li>
<li>Full Page Caching</li>
<li>Error Logging</li>
+<li>Application Profiling</li>
<li>Scaffolding</li>
<li>Calendaring Class</li>
+<li>User Agent Class</li>
+<li>Zip Encoding Class</li>
<li>Template Engine Class</li>
<li>Trackback Class</li>
<li>XML-RPC Library</li>
<li>Unit Testing Class</li>
<li>Search-engine Friendly URLs</li>
<li>Flexible URI Routing</li>
-<li>Library of "helper" functions</li>
-<li>Plugin Support</li>
+<li>Support for Hooks, Class Extensions, and Plugins</li>
+<li>Large library of "helper" functions</li>
</ul>