Admin - Make statistics locked only when date requires it, access through sidebox menu does not lock

This commit is contained in:
nathangray 2019-03-27 11:57:20 -06:00
parent 484ec5aaa7
commit a5402ad4b6
2 changed files with 4 additions and 2 deletions

View File

@ -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');

View File

@ -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]);