diff options
Diffstat (limited to 'modules/comment')
| -rw-r--r-- | modules/comment/helpers/comment.php | 6 | ||||
| -rw-r--r-- | modules/comment/models/comment.php | 2 | 
2 files changed, 3 insertions, 5 deletions
| diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 1c876f10..8352fae4 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -61,8 +61,7 @@ class Comment_Core {      $group->input("email")  ->label(_("Email"))  ->id("gEmail");      $group->textarea("text")->label(_("Text"))   ->id("gText");      $group->submit(_("Add")); - -    comment::_add_validation_rules("comment", $form); +    $form->add_rules_from(ORM::factory("comment"));      return $form;    } @@ -73,8 +72,7 @@ class Comment_Core {      $group->input("email")  ->label(_("Email"))  ->id("gEmail")  ->value($comment->email);      $group->textarea("text")->label(_("Text"))   ->id("gText")   ->value($comment->text);      $group->submit(_("Edit")); - -    comment::_add_validation_rules("comment", $form); +    $form->add_rules_from($comment);      return $form;    } diff --git a/modules/comment/models/comment.php b/modules/comment/models/comment.php index 2ed2b83c..b1eb37b7 100644 --- a/modules/comment/models/comment.php +++ b/modules/comment/models/comment.php @@ -18,7 +18,7 @@   * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.   */  class Comment_Model extends ORM { -  var $validation_rules = array( +  var $rules = array(      "author" => "required",      "email" => "required|valid_email",      "text" => "required"); | 
