public function process() { if (!$this->is_moderator()) { $item_id = (int) $this->get('id'); $author = $this->db->get_field('art_artist', 'id_user', $item_id); if ($this->get_user() != $author) { throw new ErrorApi(ErrorApi::INSUFFICIENT_RIGHTS); } } parent::process(); }
protected function get_count_insert_data($tag, $id) { return array_merge(parent::get_count_insert_data($tag, $id), array('name' => $tag, 'original' => 1)); }