Mercurial > hg > fapweb
comparison usrajax.php @ 787:8f570449f9e7
Improve error handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 21 Nov 2014 07:18:59 +0200 |
parents | 62a98cb255f7 |
children | 24bbd1f89794 |
comparison
equal
deleted
inserted
replaced
786:85f5f569f6fc | 787:8f570449f9e7 |
---|---|
53 { | 53 { |
54 stSetupCacheControl(); | 54 stSetupCacheControl(); |
55 | 55 |
56 stSessionEnd(SESS_USER); | 56 stSessionEnd(SESS_USER); |
57 | 57 |
58 header("Location: ".stGetSetting("defaultPage")); | 58 stError("You are not authenticated currently. Try to login again."); |
59 stSetStatus(902, "Not authenticated."); | |
60 stDumpAJAXStatusErrors(); | |
59 exit; | 61 exit; |
60 } | 62 } |
61 | 63 |
62 ob_start(); | 64 ob_start(); |
63 | 65 |
131 header("Location: ".stGetRequestItem("goto", "vote")); | 133 header("Location: ".stGetRequestItem("goto", "vote")); |
132 } | 134 } |
133 break; | 135 break; |
134 | 136 |
135 default: | 137 default: |
136 stSetStatus(902, "Not Found"); | 138 stSetStatus(902, "Operation not supported."); |
137 break; | 139 break; |
138 } | 140 } |
139 | 141 |
140 if ($errorSet) | 142 if ($errorSet) |
141 { | 143 { |