diff options
Diffstat (limited to 'modules/gallery/libraries')
| -rw-r--r-- | modules/gallery/libraries/InPlaceEdit.php | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/modules/gallery/libraries/InPlaceEdit.php b/modules/gallery/libraries/InPlaceEdit.php index 88c30494..739cbb61 100644 --- a/modules/gallery/libraries/InPlaceEdit.php +++ b/modules/gallery/libraries/InPlaceEdit.php @@ -56,8 +56,12 @@ class InPlaceEdit_Core {    }    public function validate() { -    $post = Validation::factory($_POST) -      ->add_callbacks("input", $this->callback); +    $post = Validation::factory($_POST); + +    if (!empty($this->callback)) { +      $post->add_callbacks("input", $this->callback); +    } +      foreach ($this->rules as $rule) {        $post->add_rules("input", $rule);      } | 
