Simplify the assembling of SQL in XMLHashSearch(). Add check for empty condition list.
Simplify the assembling of SQL in XMLHashSearch().
Add check for empty condition list.

mburggraf/otrs,vlascoder/otrs,rudy500/otrs,noritnk/otrs,balazj/otrs,PortgasDAce/otrs,brandonshults01/otrs,StCyr/otrs,MBRG/otrs,balazj/otrs,crythias/otrs,s7design/otrs,PortgasDAce/otrs,mbeijen/otrs-1,s7design/otrs,noritnk/otrs,thorsteneckel/otrs,thorsteneckel/otrs,balazj/otrs,muehlbauer/otrs,eliasp/otrs,brandonshults01/otrs,moritz/otrs,PortgasDAce/otrs,crythias/otrs,rudy500/otrs,muehlbauer/otrs,moritz/otrs,vlascoder/otrs,s7design/otrs,nilei/otrs,StCyr/otrs,mburggraf/otrs,brandonshults01/otrs,balazj/otrs,vlascoder/otrs,MBRG/otrs,MBRG/otrs,mburggraf/otrs,capeit-tto/otrs,muehlbauer/otrs,StCyr/otrs,eliasp/otrs,oiami/otrs,crythias/otrs,StCyr/otrs,eliasp/otrs,thorsteneckel/otrs,rudy500/otrs,moritz/otrs,linearregression/otrs,mbeijen/otrs-1,nilei/otrs,oiami/otrs,xhoy/otrs,mburggraf/otrs,linearregression/otrs,xhoy/otrs,linearregression/otrs,oiami/otrs,linearregression/otrs,mburggraf/otrs,thorsteneckel/otrs,capeit-tto/otrs,oiami/otrs,moritz/otrs,nilei/otrs,rudy500/otrs,capeit-tto/otrs,MBRG/otrs,StCyr/otrs,nilei/otrs,linearregression/otrs,eliasp/otrs,eliasp/otrs,xhoy/otrs,rudy500/otrs,oiami/otrs,brandonshults01/otrs,crythias/otrs,xhoy/otrs,moritz/otrs,thorsteneckel/otrs,noritnk/otrs,balazj/otrs,MBRG/otrs,muehlbauer/otrs,nilei/otrs,mbeijen/otrs-1,crythias/otrs,brandonshults01/otrs,s7design/otrs,PortgasDAce/otrs,xhoy/otrs,muehlbauer/otrs,s7design/otrs,PortgasDAce/otrs