summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-08-27 03:52:51 +0200
committeradmin <devnull@localhost>2006-08-27 03:52:51 +0200
commit141808ad31d4eefad4c6c3dbaf8306fac2342668 (patch)
tree25c40e5e4e18fb27bb2826ac6ce8fbffd844281c
parentb071bb5a92aade551345a495fb13f5678f3978d0 (diff)
-rw-r--r--system/drivers/DB_mysql.php4
-rw-r--r--system/drivers/DB_mysqli.php4
-rw-r--r--system/drivers/DB_postgre.php4
-rw-r--r--system/drivers/DB_sqlite.php4
-rw-r--r--system/helpers/form_helper.php9
-rw-r--r--system/libraries/Encrypt.php2
-rw-r--r--system/libraries/Language.php2
-rw-r--r--system/libraries/Log.php2
-rw-r--r--system/libraries/Validation.php8
-rw-r--r--user_guide/general/changelog.html6
-rw-r--r--user_guide/libraries/pagination.html2
11 files changed, 20 insertions, 27 deletions
diff --git a/system/drivers/DB_mysql.php b/system/drivers/DB_mysql.php
index 82e677a1a..a90d84268 100644
--- a/system/drivers/DB_mysql.php
+++ b/system/drivers/DB_mysql.php
@@ -126,10 +126,6 @@ class CI_DB_mysql extends CI_DB {
*/
function escape_str($str)
{
- if (get_magic_quotes_gpc())
- {
- $str = stripslashes($str);
- }
return mysql_real_escape_string($str);
}
diff --git a/system/drivers/DB_mysqli.php b/system/drivers/DB_mysqli.php
index 32c4c0f89..75c01e7f8 100644
--- a/system/drivers/DB_mysqli.php
+++ b/system/drivers/DB_mysqli.php
@@ -128,10 +128,6 @@ class CI_DB_mysqli extends CI_DB {
*/
function escape_str($str)
{
- if (get_magic_quotes_gpc())
- {
- $str = stripslashes($str);
- }
return mysqli_real_escape_string($this->conn_id, $str);
}
diff --git a/system/drivers/DB_postgre.php b/system/drivers/DB_postgre.php
index 3829b04af..cf59f0fdc 100644
--- a/system/drivers/DB_postgre.php
+++ b/system/drivers/DB_postgre.php
@@ -110,10 +110,6 @@ class CI_DB_postgre extends CI_DB {
*/
function escape_str($str)
{
- if (get_magic_quotes_gpc())
- {
- $str = stripslashes($str);
- }
return pg_escape_string($str);
}
diff --git a/system/drivers/DB_sqlite.php b/system/drivers/DB_sqlite.php
index 1192e6dc7..b2c31a8ba 100644
--- a/system/drivers/DB_sqlite.php
+++ b/system/drivers/DB_sqlite.php
@@ -131,10 +131,6 @@ class CI_DB_sqlite extends CI_DB {
*/
function escape_str($str)
{
- if (get_magic_quotes_gpc())
- {
- $str = stripslashes($str);
- }
return sqlite_escape_string($str);
}
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index d4e45a0af..069101063 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -38,11 +38,16 @@
* @param array a key/value pair hidden data
* @return string
*/
-function form_open($action, $attributes = array(), $hidden = array())
+function form_open($action = '', $attributes = array(), $hidden = array())
{
$obj =& get_instance();
- $form = '<form method="post" action="'.$obj->config->site_url($action).'"';
+ $form = '<form action="'.$obj->config->site_url($action).'"';
+
+ if ( ! isset($attributes['method']))
+ {
+ $form .= ' method="post"';
+ }
if (is_array($attributes) AND count($attributes) > 0)
{
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index 532bfe1f1..bcffdf1ab 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -322,7 +322,7 @@ class CI_Encrypt {
*/
function set_hash($type = 'sha1')
{
- $this->_hash_type = ($type != 'sha1' OR $type != 'md5') ? 'sha1' : $type;
+ $this->_hash_type = ($type != 'sha1' AND $type != 'md5') ? 'sha1' : $type;
}
// END set_hash()
diff --git a/system/libraries/Language.php b/system/libraries/Language.php
index b668aa060..328d53e46 100644
--- a/system/libraries/Language.php
+++ b/system/libraries/Language.php
@@ -68,7 +68,7 @@ class CI_Language {
if ( ! file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile))
{
- show_error('Unable to load the requested language file: language/'.$langfile.EXT);
+ show_error('Unable to load the requested language file: language/'.$langfile);
}
include_once(BASEPATH.'language/'.$idiom.'/'.$langfile);
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 35e30b64c..17b96b2c2 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -88,7 +88,7 @@ class CI_Log {
return FALSE;
}
- $filepath = $this->log_path.'log-'.date('Y-m-d').'.php';
+ $filepath = $this->log_path.'log-'.date('Y-m-d').EXT;
$message = '';
if ( ! file_exists($filepath))
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php
index df8c70ee8..e037e69c5 100644
--- a/system/libraries/Validation.php
+++ b/system/libraries/Validation.php
@@ -252,12 +252,12 @@ class CI_Validation {
// Strip the parameter (if exists) from the rule
// Rules can contain a parameter: max_length[5]
$param = FALSE;
- if (preg_match("/.*?(\[.*?\]).*/", $rule, $match))
+ if (preg_match("/(.*?)\[(.*?)\]/", $rule, $match))
{
- $param = substr(substr($match['1'], 1), 0, -1);
- $rule = str_replace($match['1'], '', $rule);
+ $rule = $match[1];
+ $param = $match[2];
}
-
+
// Call the function that corresponds to the rule
if ($callback === TRUE)
{
diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html
index 5721bc866..bf79a14d8 100644
--- a/user_guide/general/changelog.html
+++ b/user_guide/general/changelog.html
@@ -75,7 +75,8 @@ Change Log
<li>Added support for % character in URL.</li>
<li>Added the ability to supply full URLs using the <dfn>anchor()</dfn> helper function.</li>
<li>Moved the MIME type array out of the Upload class and into its own file in the applications/comfig/ folder.</li>
-<li>Tweaked the URI Protocol code to allow more options so that URLs will work more reliably in different environments.</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>Removed a strtolower() call that was changing URL segments to lower case.</li>
<li>Removed some references that were interfering with PHP 4.4.1 compatibility.</li>
<li>Removed backticks from Postgre class since these are not needed.</li>
@@ -89,6 +90,9 @@ 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 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 <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 some MS SQL bugs.</li>
<li>Fixed some doc typos.</li>
</ul>
diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html
index 3f4e56935..ac71d78b3 100644
--- a/user_guide/libraries/pagination.html
+++ b/user_guide/libraries/pagination.html
@@ -91,7 +91,7 @@ minimum you need the three shown. Here is a description of what those items rep
<ul>
<li><strong>base_url</strong> This is the full URL to the controller class/function containing your pagination. In the example
- above, it is pointing to a controller called "Page" and a function called "test". Keep in mind that you can
+ above, it is pointing to a controller called "Test" and a function called "page". Keep in mind that you can
<a href="../general/routing.html">re-route your URI</a> if you need a different structure.</li>
<li><strong>total_rows</strong> This number represents the total rows in the result set you are creating pagination for.
Typically this number will be the total rows that your database query returned.