summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2011-04-23 23:26:40 -0400
committerChad Kieffer <ckieffer@gmail.com>2011-04-23 23:26:40 -0400
commitbbb2a3a30c57592b1baed17533bc3a2e7edb2e8a (patch)
tree8cac738aace3d4ae1d237fcd619a5e2e33275948 /modules/gallery/libraries
parent342be9818f8c35dd13c8159960a9f71ae33d4c72 (diff)
parent4c7f27a1a6a4fc71873093dd787de05a8ee6c079 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/InPlaceEdit.php8
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);
}