Skip to content

Commit

Permalink
changing to before validate so that the admin variable is set when do…
Browse files Browse the repository at this point in the history
…ing validation
  • Loading branch information
dogmatic69 committed Jul 9, 2012
1 parent e96ea64 commit dd3c26c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Modules/Model/Module.php
Expand Up @@ -264,12 +264,12 @@ public function afterFind($results, $primary = false) {
* @param type $options array
* @return boolean
*/
public function beforeSave($options = array()) {
public function beforeValidate($options = array()) {
if(!empty($this->data[$this->alias]['module'])) {
$this->data[$this->alias]['admin'] = strstr($this->data[$this->alias]['module'], 'admin/') ? 1 : 0;
}

return true;
return parent::beforeValidate($options);
}

/**
Expand Down

0 comments on commit dd3c26c

Please sign in to comment.