public static function votes_against($url, $modifier = 1) { if (!class_exists('midgard_query_select')) { return self::prepare_return(0, $modifier); } try { $item = com_meego_planet_utils::get_item($url); } catch (Exception $e) { return self::prepare_return(0, $modifier); } $votes = com_meego_planet_votes::get($item); return self::prepare_return($votes['-1'], $modifier); }
public function get_item(array $args) { $this->item = com_meego_planet_utils::get_item($args['item']); $this->data['votes'] = com_meego_planet_votes::get($this->item); }