public function deleteVotes() {
		$access = elgg_set_ignore_access(true);
		$access_status = access_get_show_hidden_status();
		access_show_hidden_entities(true);

		$river_items = new ElggBatch('elgg_get_river', array(
			'action_type' => 'vote',
			'object_guid' => $this->guid,
			'limit' => false,
			'wheres' => array("rv.view = \"river/object/poll/vote\""),
		));

		$river_items->setIncrementOffset(false);
		foreach ($river_items as $river_item) {
			$river_item->delete();
		}

		access_show_hidden_entities($access_status);
		elgg_set_ignore_access($access);

		elgg_delete_annotations(array(
			'guid' => $this->guid,
			'type' => "object",
			'subtype' => "poll",
			'annotation_name' => "vote",
		));

		$this->responses_by_choice = array();
		$this->response_count = 0;
		$this->voter_count = 0;
	}
public function deleteVotes() {
		$access = elgg_set_ignore_access(true);
		$access_status = access_get_show_hidden_status();
		access_show_hidden_entities(true);

		$river_items = new ElggBatch('elgg_get_river', array(
			'action_type' => 'vote',
			'object_guid' => $this->guid,
			'limit' => false,
			'wheres' => array("rv.view = \"river/object/poll/vote\""),
		));

		$river_items->setIncrementOffset(false);
		foreach ($river_items as $river_item) {
			$river_item->delete();
		}

		access_show_hidden_entities($access_status);
		elgg_set_ignore_access($access);

		elgg_delete_annotations(array(
			'guid' => $this->guid,
			'type' => "object",
			'subtype' => "poll",
			'annotation_name' => "vote",
		));

		$this->responses_by_choice = array();
		$this->response_count = 0;
		$this->voter_count = 0;
	}
public function deleteVotes ( ) { $ access = elgg_set_ignore_access ( true ) ; $ access_status = access_get_show_hidden_status ( ) ; access_show_hidden_entities ( true ) ; $ river_items = new ElggBatch ( 'elgg_get_river' , array ( 'action_type' => 'vote' , 'object_guid' => $ this -> guid , 'limit' => false , 'wheres' => array ( "rv.view = \"river/object/poll/vote\"" ) , ) ) ; $ river_items -> setIncrementOffset ( false ) ; foreach ( $ river_items as $ river_item ) { $ river_item -> delete ( ) ; } access_show_hidden_entities ( $ access_status ) ; elgg_set_ignore_access ( $ access ) ; elgg_delete_annotations ( array ( 'guid' => $ this -> guid , 'type' => "object" , 'subtype' => "poll" , 'annotation_name' => "vote" , ) ) ; $ this -> responses_by_choice = array ( ) ; $ this -> response_count = 0 ; $ this -> voter_count = 0 ; }
Delete all votes associated with this poll, reset vote counters and delete associated vote river items
Delete all votes associated with this poll reset vote counters and delete associated vote river items