From afb3fa71b9aea16a02c13f75d7999069a4ae9d21 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 17 Jan 2010 16:58:47 -0800 Subject: Get rid of internal_only designation -- it's too hard to enforce cleanly. --- modules/gallery/models/item.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'modules') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 04120f10..453a3525 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -756,14 +756,11 @@ class Item_Model extends ORM_MPTT { $this->rules = array( "album_cover_item_id" => array("callbacks" => array(array($this, "valid_item"))), "description" => array("rules" => array("length[0,65535]")), - "left_ptr" => array("callbacks" => array(array($this, "internal_only"))), - "level" => array("callbacks" => array(array($this, "internal_only"))), "mime_type" => array("callbacks" => array(array($this, "valid_field"))), "name" => array("rules" => array("length[0,255]", "required"), "callbacks" => array(array($this, "valid_name"))), "parent_id" => array("callbacks" => array(array($this, "valid_parent"))), "rand_key" => array("rule" => array("decimal")), - "right_ptr" => array("callbacks" => array(array($this, "internal_only"))), "slug" => array("rules" => array("length[0,255]", "required"), "callbacks" => array(array($this, "valid_slug"))), "sort_column" => array("callbacks" => array(array($this, "valid_field"))), @@ -926,16 +923,6 @@ class Item_Model extends ORM_MPTT { } } - /** - * This field cannot be changed externally, it can only be changed inside save() after - * validation has been performed. - */ - public function internal_only(Validation $v, $field) { - if ($this->original()->$field != $this->$field) { - $v->add_error($field, "internal_only"); - } - } - /** * This field cannot be changed after it's been set. */ -- cgit v1.2.3