if "common" prefs are not loaded, do not display page generation time

Before we queried page_generation_time common preference without a callback, which send a synchronious request to server to fetch common preferences, when it returned it looked for the preference again and send the next synchronious request to the server, in an infinit loop. Now setting _callback parameter of egw.preference() to false, just returns undefined, if common preferences are not yet loaded, but dont try to query them from server
This commit is contained in:
Ralf Becker
2016-07-20 17:13:11 +02:00
parent 748e861580
commit 45111b8cd9
2 changed files with 4 additions and 2 deletions

View File

@ -146,7 +146,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
json_request.prototype.handleResponse = function(data) {
if (data && typeof data.response != 'undefined')
{
if (egw.preference('show_generation_time', 'common') == "1")
if (egw.preference('show_generation_time', 'common', false) == "1")
{
var gen_time_div = jQuery('#divGenTime').length > 0 ? jQuery('#divGenTime')
:jQuery('<div id="divGenTime" class="pageGenTime"><span class="pageTime"></span></div>').appendTo('#egw_fw_footer');