diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-04-04 20:35:59 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-04-04 20:35:59 +0000 |
commit | 0eb3fc8c6fa5085f709b9279af958ed4242b75e4 (patch) | |
tree | 4e5353f21fe4b3932075f9e3d2e63e1578f47ec9 /sql | |
parent | 516f2cac8297abb49abe655b8c45dfac153c401f (diff) |
form_check now deletes the row, allowing for real enforcement.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2126 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r-- | sql/modules/Session.sql | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/modules/Session.sql b/sql/modules/Session.sql index f8f0500e..4adf20d8 100644 --- a/sql/modules/Session.sql +++ b/sql/modules/Session.sql @@ -5,7 +5,12 @@ BEGIN SELECT * FROM open_forms WHERE session_id = in_session_id AND id = in_form_id; - IF FOUND THEN RETURN TRUE; + IF FOUND THEN + DELETE FROM open_forms + WHERE session_id = in_session_id AND id = in_form_id; + + RETURN TRUE; + ELSE RETURN FALSE; END; $$ language plpgsql; |