Removed bug fixes from this branch. Will recommit them on a separate branch
Signed-off-by: David Woods <d.woods92@gmail.com>
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 32ea4b1..05de596 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1091,12 +1091,14 @@
* Match one field to another
*
* @param string $str string to compare against
- * @param string $param The string desired
+ * @param string $field
* @return bool
*/
- public function matches($str, $param)
+ public function matches($str, $field)
{
- return ($str === $param);
+ return isset($this->_field_data[$field], $this->_field_data[$field]['postdata'])
+ ? ($str === $this->_field_data[$field]['postdata'])
+ : FALSE;
}
// --------------------------------------------------------------------
@@ -1105,12 +1107,12 @@
* Differs from another field
*
* @param string
- * @param string param is the value provided in the form
+ * @param string field
* @return bool
*/
- public function differs($str, $param)
+ public function differs($str, $field)
{
- return ($str !== $param);
+ return ! (isset($this->_field_data[$field]) && $this->_field_data[$field]['postdata'] === $str);
}
// --------------------------------------------------------------------
@@ -1491,7 +1493,7 @@
*/
public function valid_base64($str)
{
- return (base64_decode($str, true) !== false);
+ return (base64_encode(base64_decode($str)) === $str);
}
// --------------------------------------------------------------------