Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 public static function i($id = 0)
 {
     return parent::iteminstance(__CLASS__, (int) $id);
 }
Exemplo n.º 4
0
 public function request($id)
 {
     parent::request($id);
     if ($this->status == 'draft') {
         return 404;
     }
     $this->doprocessform();
 }