summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-17 16:58:47 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-17 16:58:47 -0800
commitafb3fa71b9aea16a02c13f75d7999069a4ae9d21 (patch)
tree21f12125239b2b8f6d7ca09f5e53a092e93d5c12
parentfafa7f277f0591c74bd3d162c4c39a01604b55ae (diff)
Get rid of internal_only designation -- it's too hard to enforce cleanly.
-rw-r--r--modules/gallery/models/item.php13
1 files changed, 0 insertions, 13 deletions
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"))),
@@ -927,16 +924,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.
*/
public function read_only(Validation $v, $field) {