bug 9860 : listIsos - make the parameter - name work properly.

status 9860: resolved fixed
This commit is contained in:
nit 2011-06-09 14:29:55 +05:30 committed by Nitin
parent 50b665d713
commit b7f16b8b34
1 changed files with 9 additions and 1 deletions

View File

@ -434,7 +434,15 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
&& !(templateFilter == TemplateFilter.self && !BaseCmd.isRootAdmin(account.getType())) ){ //evaluates to true If root admin and filter=self
List<VMTemplateVO> publicIsos = publicIsoSearch(bootable);
for( int i=0; i < publicIsos.size(); i++){
templateZonePairList.add(new Pair<Long,Long>(publicIsos.get(i).getId(), null));
if (keyword != null && publicIsos.get(i).getName().contains(keyword)) {
templateZonePairList.add(new Pair<Long,Long>(publicIsos.get(i).getId(), null));
continue;
} else if (name != null && publicIsos.get(i).getName().contains(name)) {
templateZonePairList.add(new Pair<Long,Long>(publicIsos.get(i).getId(), null));
continue;
}else if (keyword == null && name == null){
templateZonePairList.add(new Pair<Long,Long>(publicIsos.get(i).getId(), null));
}
}
}
} catch (Exception e) {