function update($text, $target, $comments, $catalogue = 'messages')
{
$details = $this->getCatalogueDetails($catalogue);
if ($details) {
list($cat_id, $variant, $count) = $details;
} else {
return false;
}
$comments = sqlite_escape_string($comments);
$target = sqlite_escape_string($target);
$text = sqlite_escape_string($text);
$time = time();
$db = sqlite_open($this->source);
$statement = "UPDATE trans_unit SET\n\t\t\t\t\t\ttarget = '{$target}',\n\t\t\t\t\t\tcomments = '{$comments}',\n\t\t\t\t\t\tdate_modified = '{$time}'\n\t\t\t\t\tWHERE cat_id = {$cat_id} \n\t\t\t\t\t\tAND source = '{$text}'";
$updated = false;
if (sqlite_query($statement, $db)) {
$updated = $this->updateCatalogueTime($cat_id, $variant, $db);
}
sqlite_close($db);
return $updated;
}