From a5402ad4b6053da93109dfaa9575b03c90027624 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 27 Mar 2019 11:57:20 -0600 Subject: [PATCH] Admin - Make statistics locked only when date requires it, access through sidebox menu does not lock --- admin/inc/class.admin_ui.inc.php | 2 ++ admin/js/app.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/admin/inc/class.admin_ui.inc.php b/admin/inc/class.admin_ui.inc.php index ed0d1d43ce..a0003e3510 100644 --- a/admin/inc/class.admin_ui.inc.php +++ b/admin/inc/class.admin_ui.inc.php @@ -45,6 +45,8 @@ class admin_ui if (admin_statistics::check(false)) { $_GET['load'] = 'admin.admin_statistics.submit'; + $_GET['ajax'] = 'false'; + $_GET['required'] = 'true'; } $tpl = new Etemplate('admin.index'); diff --git a/admin/js/app.js b/admin/js/app.js index 993cda85ce..c0af9b6874 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -134,7 +134,7 @@ app.classes.admin = AppJS.extend( load: function(_url) { if (this.iframe && this.iframe.getDOMNode().contentDocument.location.href - .match(/menuaction=admin.admin_statistics.submit/) && ( !_url || + .match(/menuaction=admin.admin_statistics.submit.+required=true/) && ( !_url || !_url.match(/statistics=(postpone|canceled|submitted)/))) { this.egw.message(this.egw.lang('Please submit (or postpone) statistic first'), 'info'); @@ -176,7 +176,7 @@ app.classes.admin = AppJS.extend( this.iframe.set_src(_url); } var m = _url.match(/menuaction=([^&]+)(?:.*appname=(\w+))?/); - if(m.length >= 2) + if(m && m.length >= 2) { var app = m[2] ? m[2] : m[1].split('.')[0]; this.tree.set_value('/apps/'+app+'/'+m[1]);