Permalink
Browse files

1) Made _ion_select a true array and it now behaves as intended

2) Changed the way error and information messages are pulled from the language file. If the entry does not exist it will display the key surrounded by ## instead of a big fat error :)
  • Loading branch information...
axelay committed Jan 15, 2012
1 parent 99607ca commit c198db265ef0717c83fb518533e2872a13614deb
Showing with 11 additions and 4 deletions.
  1. +11 −4 models/ion_auth_model.php
View
@@ -743,7 +743,7 @@ public function select($select)
{
$this->trigger_events('select');
- $this->_ion_select = $select;
+ $this->_ion_select[] = $select;
return $this;
}
@@ -810,7 +810,12 @@ public function users()
if (isset($this->_ion_select))
{
- $this->db->select($this->_ion_select);
+ foreach ($this->_ion_select as $select)
+ {
+ $this->db->select($select);
+ }
+
+ $this->_ion_select = array();
}
$this->trigger_events('extra_where');
@@ -1311,7 +1316,8 @@ public function messages()
$_output = '';
foreach ($this->messages as $message)
{
- $_output .= $this->message_start_delimiter . $this->lang->line($message) . $this->message_end_delimiter;
+ $messageLang = $this->lang->line($message) ? $this->lang->line($message) : '##' . $message . '##';
+ $_output .= $this->message_start_delimiter . $messageLang . $this->message_end_delimiter;
}
return $_output;
@@ -1345,7 +1351,8 @@ public function errors()
$_output = '';
foreach ($this->errors as $error)
{
- $_output .= $this->error_start_delimiter . $this->lang->line($error) . $this->error_end_delimiter;
+ $errorLang = $this->lang->line($error) ? $this->lang->line($error) : '##' . $error . '##';
+ $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter;
}
return $_output;

0 comments on commit c198db2

Please sign in to comment.