diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2011-05-12 23:48:54 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2011-05-12 23:48:54 +0000 |
| commit | 2ad445441974c64599df496ba4a585415aa41169 (patch) | |
| tree | 49b2860fdac2d2ff16134bfa2aa8d8a972b93301 /modules/gallery/libraries/InPlaceEdit.php | |
| parent | 1f7c1f18c651c58048e92d615c71ac0fe6691c10 (diff) | |
| parent | 9aeb824aa1d15bd94bd7cef0a322c4e8a667e67b (diff) | |
Manually merged a conflict after pulling from upstream.
Diffstat (limited to 'modules/gallery/libraries/InPlaceEdit.php')
| -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); } |
