public function setid($id) { if ($id != $this->id) { $name = $this->instancename; if (!isset(self::$instances)) { self::$instances = array(); } if (!isset(self::$instances[$name])) { self::$instances[$name] = array(); } $a =& self::$instances[$this->instancename]; if (isset($a[$this->id])) { unset($a[$this->id]); } if (isset($a[$id])) { $a[$id] = 0; } $a[$id] = $this; $this->data['id'] = $id; } }
public function request($id) { parent::request((int) $id); if ($this->status != 'published') { if (!litepublisher::$options->show_draft_post) { return 404; } $groupname = litepublisher::$options->group; if ($groupname == 'admin' || $groupname == 'editor') { return; } if ($this->author == litepublisher::$options->user) { return; } return 404; } }
public static function i($id = 0) { return parent::iteminstance(__CLASS__, (int) $id); }
public function request($id) { parent::request($id); if ($this->status == 'draft') { return 404; } $this->doprocessform(); }