Cleanup: removed all closing tags in php files.
[fa-stable.git] / sales / includes / sales_ui.inc
index 8e2048cf21eb69d608da3b6c73d7b05c360c3b70..378f336127fc3fe22d417cc954b1587abb785e90 100644 (file)
@@ -42,15 +42,14 @@ function processing_active()
        Check if the cart was not destroyed during opening the edition page in
        another browser tab.
 */
-function check_edit_conflicts($cartname='Items')
+function check_edit_conflicts($cart_id, $cartname='Items')
 {
-       global $Ajax;
-       
-       if (isset($_POST['cart_id']) && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) {
+       global $Ajax, $no_check_edit_conflicts;
+
+       if ((!isset($no_check_edit_conflicts) || $no_check_edit_conflicts==0) && get_post('cart_id') && $cart_id != $_SESSION[$cartname]->cart_id) {
                display_error(_('This edit session has been abandoned by opening sales document in another browser tab. You cannot edit more than one sales document at once.'));
                $Ajax->activate('_page_body');
                display_footer_exit();
        }
 }
 
-?>
\ No newline at end of file