1. Leisa King
  2. CodeIgniter Reactor

Commits

admin  committed 4393403

  • Participants
  • Parent commits c86d7b2
  • Branches default

Comments (0)

Files changed (11)

File system/drivers/DB_mysql.php

View file
 	 */
 	function escape_str($str)	
 	{	
-		if (get_magic_quotes_gpc())
-		{
-			$str = stripslashes($str); 
-		}
 		return mysql_real_escape_string($str);
 	}
 	

File system/drivers/DB_mysqli.php

View file
 	 */
 	function escape_str($str)	
 	{	
-		if (get_magic_quotes_gpc())
-		{
-			$str = stripslashes($str); 
-		}
 		return mysqli_real_escape_string($this->conn_id, $str);
 	}
 	

File system/drivers/DB_postgre.php

View file
 	 */
 	function escape_str($str)	
 	{	
-		if (get_magic_quotes_gpc())
-		{
-			$str = stripslashes($str); 
-		}
 		return pg_escape_string($str);
 	}
 	

File system/drivers/DB_sqlite.php

View file
 	 */
 	function escape_str($str)	
 	{
-		if (get_magic_quotes_gpc())
-		{
-			$str = stripslashes($str); 
-		}
 		return sqlite_escape_string($str);
 	}
 	

File system/helpers/form_helper.php

View file
  * @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)
 	{

File system/libraries/Encrypt.php

View file
 	 */		
 	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()
   	

File system/libraries/Language.php

View file
 	
 		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);

File system/libraries/Log.php

View file
 			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))

File system/libraries/Validation.php

View file
 				// 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)
 				{

File user_guide/general/changelog.html

View file
 <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>
 <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>

File user_guide/libraries/pagination.html

View file
 
 <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.