[0005209] Reports: fixed broken reports after session timeout.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 5 Oct 2020 17:50:31 +0000 (19:50 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 5 Oct 2020 17:54:59 +0000 (19:54 +0200)
includes/page/header.inc
includes/session.inc
js/inserts.js
js/reports.js
reporting/includes/reports_classes.inc
reporting/includes/tcpdf.php

index 7777dae422e66241483f09f5f2800e6160442949..8db8fe9ba5ae8f3b42cbea08022b42b6e48bd558 100644 (file)
@@ -92,7 +92,7 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
        // titles and screen header
        global $path_to_root, $SysPrefs, $db_connections;
 
-       if (in_ajax())
+       if (in_ajax() || isset($_POST['REP_ID']))
                return; // just for speed up
 
        $theme = user_theme();
index 21c402e0033284c54b7ce832efe32acc8256a451..71206521fda2bd2d89471b85e868862fed4b4e99 100644 (file)
@@ -561,7 +561,7 @@ if (!defined('FA_LOGOUT_PHP_FILE')){
                        {
                                // in case of GET request redirect to avoid confirmation dialog 
                                // after return from menu option
-                               header("HTTP/1.1 303 See Other");
+                               header("HTTP/1.1 307 Temporary Redirect");
                                header("Location: ".$_SESSION['timeout']['uri']);
                                exit();
                        }
index 40337e7a94a68e7bc2df0c3fa0bfc02e36c289a2..d0722250769dcb4d3cb25be45586979d34f77f23 100644 (file)
@@ -314,7 +314,7 @@ var inserts = {
                e.onclick = function(){
                        if (validate(e)) {
                                setTimeout(function() { var asp = e.getAttribute('aspect');
-                                       if (asp && asp.indexOf('download') === -1)
+                                       if (asp && asp.indexOf('download') === -1 && asp.indexOf('popup') === -1)
                                                set_mark((asp && ((asp.indexOf('process') !== -1) || (asp.indexOf('nonajax') !== -1))) ? 'progressbar.gif' : 'ajax-loader.gif');
                                }, 100);
                                return true;
index 1c24875edabb8e09f44c9816f049e591f395fe56..bd7d0a438ab93bce485b722b1551d995cf72564b 100644 (file)
@@ -34,7 +34,13 @@ var replinks = {
                        showClass(this.id.substring(5)); // id=classX
                        return false;
                }
-       }
+       },
+       'button': function(e) {
+               e.onclick = function() {
+                       window.open('', 'formpopup', 'toolbar=no,scrollbars=yes,resizable=yes,menubar=no');
+                       e.form.target='formpopup';
+               }
+       },
 }
 
 function set_options(e)
index 125cf5f87dd95255771b6898419a348d52b48d42..dd76d84de2cb71a260bbde7d21c7c37b73235cfe 100644 (file)
@@ -100,7 +100,7 @@ class BoxReports
                                                . "<form method='POST' action='$action' target='_blank'>\n";
                                        $st_params .= submit('Rep'.$report->id,  
                                                _("Display: ") . access_string($report->name, true),
-                                               false, '', $SysPrefs->pdf_debug ? false : 'default process') . hidden('REP_ID', $report->id, false).'<br><br>';
+                                               false, '', $SysPrefs->pdf_debug ? false : 'default popup') . hidden('REP_ID', $report->id, false).'<br><br>';
                                        $st_params .= $this->getOptions($report->get_controls(), $report->id);
                                        $st_params .= "\n<input type=hidden name='Class' value=".$cur_class.">"
                                                ."\n</form></td></tr></table>\n";
index 01d15527f598cb1bd827d563cc2af5180ebdee6f..60d9e39a518784dc68cf321cb5e23ba374b62f99 100644 (file)
@@ -1,4 +1,4 @@
-4527<?php
+<?php
 //============================================================+
 // File name   : tcpdf.php
 // Begin       : 2002-08-03