original_string: public function getmodulescounts_forgroups($groupids){
  		if(!$db=BFactory::getDBO()){
  			return array();
  			}
  		$qr='select count(pageid)as cnt,pageid from soft_modules_rules ';
  		$qr.=' where pageid in ('.implode(',',$groupids).')';
  		$qr.='group by pageid';
  		$q=$db->Query($qr);
  		$counts=array();
  		while($l=$db->fetch($q)){
  			$counts[$l['pageid']]=$l['cnt'];
  			}
  		return $counts;
  		}
code: public function getmodulescounts_forgroups($groupids){
  		if(!$db=BFactory::getDBO()){
  			return array();
  			}
  		$qr='select count(pageid)as cnt,pageid from soft_modules_rules ';
  		$qr.=' where pageid in ('.implode(',',$groupids).')';
  		$qr.='group by pageid';
  		$q=$db->Query($qr);
  		$counts=array();
  		while($l=$db->fetch($q)){
  			$counts[$l['pageid']]=$l['cnt'];
  			}
  		return $counts;
  		}
code_tokens: public function getmodulescounts_forgroups ( $ groupids ) { if ( ! $ db = BFactory :: getDBO ( ) ) { return array ( ) ; } $ qr = 'select count(pageid)as cnt,pageid from soft_modules_rules ' ; $ qr .= ' where pageid in (' . implode ( ',' , $ groupids ) . ')' ; $ qr .= 'group by pageid' ; $ q = $ db -> Query ( $ qr ) ; $ counts = array ( ) ; while ( $ l = $ db -> fetch ( $ q ) ) { $ counts [ $ l [ 'pageid' ] ] = $ l [ 'cnt' ] ; } return $ counts ; }
docstring: end of get
docstring_tokens: end of get