/**
  * Check if keyword name is not duplicated
  * 
  * @param resource &$db [ref] database connection
  * 
  * @return integer returns tl::OK on success, error code else
  */
 protected function checkKeyword(&$db)
 {
     $this->name = trim($this->name);
     $this->notes = trim($this->notes);
     $result = tlKeyword::doesKeywordExist($db, $this->name, $this->testprojectID, $this->dbID);
     if ($result >= tl::OK) {
         $result = tlKeyword::checkKeywordName($this->name);
     }
     return $result;
 }