Just looked at the code...


Some hints:

please use this convention for else:

if(true) {

else {


Getting the item could have been implemented much shorter as:

        ### query string is a number? ###
        if(preg_match("/^\s*(\d+)!?\s*$/", $search_query, $matches)) {
          if($item= DbProjectItem::getVisibleById(intval($matches[1]))) {
            if($item->item == ITEM_TASK) {
              $PH->messages[]=__("Jumped to the only result found.");
              $PH->show( 'taskView',array('tsk'=>$tasks[0]->id));
            else if {
                #... and so on

This would be valid since the fulltext search engine for mySQL wouldn't allow searching for numbers anyway. So we could guess the entering a valid id is meant as a direct jump.