X-Git-Url: http://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/1365f9a0ae028c304929cc93582a0a8ad4dc5100..a84e2e3b909b98fd1c7538d02ed86fc10183b9c6:/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