Merge branch 'master' of https://github.com/jgoodman/Freeside
[freeside.git] / rt / lib / RT / Interface / Web / Request.pm
index d086511..13d6672 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -142,6 +142,10 @@ sub callback {
     }
     return @rv;
 }
+
+sub clear_callback_cache {
+    %cache = %called = ();
+}
 }
 
 =head2 request_path
@@ -165,4 +169,21 @@ sub request_path {
     return $path;
 }
 
+=head2 abort
+
+Logs any recorded SQL statements for this request before calling the standard
+abort.
+
+=cut
+
+sub abort {
+    my $self = shift;
+    RT::Interface::Web::LogRecordedSQLStatements(
+        RequestData => {
+            Path => $self->request_path,
+        },
+    );
+    return $self->SUPER::abort(@_);
+}
+
 1;