]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
repeat submission identification
[maypole.git] / lib / Maypole.pm
index cb5e50ea04f38211eabfdf5787f4053b24a6767f..536e1a6689ac2c0329beb1d43ea4255555c2865d 100644 (file)
@@ -222,6 +222,13 @@ sub send_output {
     die "Do not use Maypole directly; use Apache::MVC or similar";
 }
 
+# Session and Repeat Submission Handling
+
+sub make_random_id {
+    use Maypole::Session;
+    return Maypole::Session::generate_unique_id();
+}
+
 =head1 NAME
 
 Maypole - MVC web application framework
@@ -464,6 +471,9 @@ This method first checks if the relevant model class
 can handle exceptions the user, or falls back to the default
 exception method of your Maypole application.
 
+=head3 make_random_id
+
+returns a unique id for this request can be used to prevent or detect repeat submissions.
 
 =head3 handler