Moving 2.0 development version to main trunk.
[fa-stable.git] / sales / includes / sales_ui.inc
index a8abacab896ac79f81c51e770ccfeebcf4578bd3..64045bb155e78faddc5b1d1c2604bc30a5549cf7 100644 (file)
@@ -5,4 +5,27 @@ include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/banking.inc");
 
+//----------------------------------------------------------------------------
+// helper functions for script execution control
+//
+function processing_start()
+{
+    processing_end();
+    $_SESSION['Processing'] = $_SERVER['PHP_SELF'];
+}
+
+function processing_end()
+{
+    unset($_SESSION['Processing']);
+    if ( isset($_SESSION['Items']) ) {
+               unset($_SESSION['Items']->line_items);
+               unset($_SESSION['Items']);
+    }
+}
+
+function processing_active()
+{
+    return (isset($_SESSION['Processing']) && $_SESSION['Processing']==$_SERVER['PHP_SELF']);
+}
+
 ?>
\ No newline at end of file