/**
  * Run the query to obtain the list of installed types as specified by the type param
  *
  * @param type	an array of types you would like to search for
  * 				type options include (theme, langpack, module, patch)
  *
  * @return an array of installed upgrade_history objects
  */
 function getInstalled($types = array('module'))
 {
     $uh = new UpgradeHistory();
     $in = "";
     for ($i = 0; $i < count($types); $i++) {
         $in .= "'" . $types[$i] . "'";
         if ($i + 1 < count($types)) {
             $in .= ",";
         }
     }
     $query = "SELECT * FROM " . $uh->table_name . "\t WHERE type IN (" . $in . ")";
     return $uh->getList($query);
 }