changeset 368:cbe2693a3cd1

Error handling improvements.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 03 Dec 2013 14:07:47 +0200
parents 843f4cf318f3
children a3caded43f6d
files usrajax.php
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usrajax.php	Tue Dec 03 13:29:49 2013 +0200
+++ b/usrajax.php	Tue Dec 03 14:07:47 2013 +0200
@@ -112,11 +112,16 @@
           }
         }
       }
-      if (!$errorSet)
+
+      if ($errorSet)
       {
+        stSetSessionItem("mode", "error");
+        stSetSessionItem("error", $errorMsgs);
+      }
+      else
         stSetSessionItem("mode", "done");
-        header("Location: ".stGetRequestItem("goto", "vote"));
-      }
+
+      header("Location: ".stGetRequestItem("goto", "vote"));
     }
     break;