Skip to content

Commit

Permalink
We don't care about the name and slug for the root album so don't bot…
Browse files Browse the repository at this point in the history
…her enforcing them.
  • Loading branch information
bharat committed Jul 30, 2010
1 parent ebbb737 commit 3f48f17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/gallery/models/item.php
Expand Up @@ -760,9 +760,9 @@ public function validate(Validation $array=null) {

// Conditional rules
if ($this->id == 1) {
// Root album can't have a name or slug so replace the rules
$this->rules["name"] = array("rules" => array("length[0]"));
$this->rules["slug"] = array("rules" => array("length[0]"));
// We don't care about the name and slug for the root album.
$this->rules["name"] = array();
$this->rules["slug"] = array();
}

// Movies and photos must have data files
Expand Down

0 comments on commit 3f48f17

Please sign in to comment.