X-Git-Url: http://git.hcoop.net/bpt/portal.git/blobdiff_plain/4d46d3eb69817c559335bd3620022fbbf3d8909a..81200ec225a9441fb9a5673f2098674b58a5dcfe:/support.sml diff --git a/support.sml b/support.sml index b82175b..43bb9fb 100644 --- a/support.sml +++ b/support.sml @@ -157,8 +157,8 @@ fun modIssue (iss : issue) = val db = getDb () in case #status iss of - PENDING => ignore (C.dml db ($`UPDATE SupIssue SET pstamp = CURRENT_TIMESTAMP`)) - | CLOSED => ignore (C.dml db ($`UPDATE SupIssue SET cstamp = CURRENT_TIMESTAMP`)) + PENDING => ignore (C.dml db ($`UPDATE SupIssue SET pstamp = CURRENT_TIMESTAMP WHERE id = ^(C.intToSql (#id iss))`)) + | CLOSED => ignore (C.dml db ($`UPDATE SupIssue SET cstamp = CURRENT_TIMESTAMP WHERE id = ^(C.intToSql (#id iss))`)) | _ => (); ignore (C.dml db ($`UPDATE SupIssue SET usr = ^(C.intToSql (#usr iss)), cat = ^(C.intToSql (#cat iss)), @@ -240,7 +240,7 @@ fun unsubscribe {usr, cat} = ignore (C.dml (getDb ()) ($`DELETE FROM SupSubscription WHERE usr = ^(C.intToSql usr) AND cat = ^(C.intToSql cat)`)) -val okChars = [#" ", #"-", #".", #"!", #"?", #":", #";", #"'", #"\"", #"/"] +val okChars = [#" ", #"-", #".", #"!", #"?", #":", #",", #";", #"'", #"\"", #"/", #"(", #")", #"{", #"}", #"[", #"]"] fun validTitle s = CharVector.exists (fn ch => not (Char.isSpace ch)) s andalso CharVector.all (fn ch => Char.isAlphaNum ch orelse List.exists (fn ch' => ch = ch') okChars) s