Ejemplo n.º 1
0
 public function get_consensus_count()
 {
     $this->_CI_load('library', 'search/Search_annotation_user_collection', 'search_annoation_user_collection');
     $type = 'Search_annotation_user_collection';
     $key = $this->get_id() . '_annotation_get_consensus_count';
     $value = $this->get_id();
     $search = get_cache($type, $key, $value);
     if (is_null($search)) {
         //$search = new Search_annotation_id_collection();
         $search = new Search_annotation_user_collection();
         //只算人頭
         $search->set_check_authorize(false);
         $search->set_limit(NULL);
         $search->set_target_scope($this->scope_coll);
         $search->set_exclude_annotation($this->get_id());
         //排除自己的
         $search->set_exclude_user($this->get_user());
         //回應也算是在範圍共識裡面喔!
         set_cache($search, $key, $value);
     }
     return $search->length();
 }