summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-23 13:16:27 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-23 13:16:27 -0700
commitb57b229543aeab096e8574e9f27cff5d6a9ed07c (patch)
treea9e9595ef6f3a88b3c33e94068191cc148b7160b /modules/gallery
parentc1779a9e8f1a2c3cbda576815a37fd9b67b3c82c (diff)
parentc101151616033d53587d1435881dae0fa45aeefa (diff)
Merge branch 'alindeman/1628' of git://github.com/alindeman/gallery3 into andy
Diffstat (limited to 'modules/gallery')
-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);
}