public function removeAll($id, $sid = NULL) {
  $user = new User;
  $current = $user->current($sid);
  if ($current['type'] < 2) throw new \JohnVanOrange\Core\Exception\NotAllowed('Must be an admin to access method', 401);

  $query = new \Peyote\Delete('resources');
  $query->where('value', '=', $id)
        ->where('type', '=', 'tag');
  $this->db->fetch($query);

  $query = new \Peyote\Delete('tag_list');
  $query->where('id', '=', $id);
  $this->db->fetch($query);

  return [
   'message' => 'Completely removed tag'
  ];
 }
public function removeAll($id, $sid = NULL) {
  $user = new User;
  $current = $user->current($sid);
  if ($current['type'] < 2) throw new \JohnVanOrange\Core\Exception\NotAllowed('Must be an admin to access method', 401);

  $query = new \Peyote\Delete('resources');
  $query->where('value', '=', $id)
        ->where('type', '=', 'tag');
  $this->db->fetch($query);

  $query = new \Peyote\Delete('tag_list');
  $query->where('id', '=', $id);
  $this->db->fetch($query);

  return [
   'message' => 'Completely removed tag'
  ];
 }
public function removeAll ( $ id , $ sid = NULL ) { $ user = new User ; $ current = $ user -> current ( $ sid ) ; if ( $ current [ 'type' ] < 2 ) throw new \ JohnVanOrange \ Core \ Exception \ NotAllowed ( 'Must be an admin to access method' , 401 ) ; $ query = new \ Peyote \ Delete ( 'resources' ) ; $ query -> where ( 'value' , '=' , $ id ) -> where ( 'type' , '=' , 'tag' ) ; $ this -> db -> fetch ( $ query ) ; $ query = new \ Peyote \ Delete ( 'tag_list' ) ; $ query -> where ( 'id' , '=' , $ id ) ; $ this -> db -> fetch ( $ query ) ; return [ 'message' => 'Completely removed tag' ] ; }
Remove tag from all images

Completely removes a specific tag from all images it is on. Must be an admin to access.

@api

@param int $id Tag id.
@param string $sid Session ID that is provided when logged in. This is also set as a cookie. If sid cookie headers are sent, this value is not required.
Remove tag from all images