Ejemplo n.º 1
0
 /**
  * @see ORM::__set()
  */
 public function __set($column, $value)
 {
     if ($column == "name") {
         $this->relative_path_cache = null;
     } else {
         if ($column == "slug") {
             if ($this->slug != $value) {
                 // Clear the relative url cache for this item and all children
                 $this->relative_url_cache = null;
                 if ($this->is_album()) {
                     Database::instance()->update("items", array("relative_url_cache" => null), array("left_ptr >" => $this->left_ptr, "right_ptr <" => $this->right_ptr));
                 }
             }
         }
     }
     parent::__set($column, $value);
 }
Ejemplo n.º 2
0
 /**
  * @see ORM::__set()
  */
 public function __set($column, $value)
 {
     if ($column == "name") {
         // Clear the relative path as it is no longer valid.
         $this->relative_path_cache = null;
     }
     parent::__set($column, $value);
 }
Ejemplo n.º 3
0
 /**
  * @see ORM::__set()
  */
 public function __set($column, $value)
 {
     if ($column == "name") {
         $this->relative_path_cache = null;
     } else {
         if ($column == "slug") {
             if ($this->slug != $value) {
                 // Clear the relative url cache for this item and all children
                 $this->relative_url_cache = null;
                 if ($this->is_album()) {
                     db::build()->update("items")->set("relative_url_cache", null)->where("left_ptr", ">", $this->left_ptr)->where("right_ptr", "<", $this->right_ptr)->execute();
                 }
             }
         }
     }
     parent::__set($column, $value);
 }