Esempio n. 1
0
 protected function initTag()
 {
     $this->tag = new BlorgTag();
     $this->tag->setDatabase($this->app->db);
     if ($this->id !== null) {
         if (!$this->tag->load($this->id)) {
             throw new AdminNotFoundException(sprintf(Blorg::_('Tag with id ‘%s’ not found.'), $this->id));
         }
         $instance_id = $this->tag->getInternalValue('instance');
         if ($instance_id !== $this->app->getInstanceId()) {
             throw new AdminNotFoundException(sprintf(Blorg::_('Tag with id ‘%d’ not found.'), $this->id));
         }
     }
 }