NEW Can add autorefresh=X in any URLs to refresh page after X seconds

This commit is contained in:
Laurent Destailleur 2018-08-16 14:47:12 +02:00
parent f7da76e1c0
commit 7075fdf8f5

View File

@ -1170,12 +1170,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
$ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION);
print "<head>\n";
if (GETPOST('dol_basehref','alpha')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref','alpha')).'">'."\n";
// Displays meta
print '<meta charset="UTF-8">'."\n";
print '<meta name="robots" content="noindex'.($disablenofollow?'':',nofollow').'">'."\n"; // Do not index
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n"; // Scale for mobile device
print '<meta name="author" content="Dolibarr Development Team">'."\n";
// Favicon
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
@ -1184,6 +1187,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
//if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
//if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="author" title="Dolibarr Development Team" href="https://www.dolibarr.org">'."\n";
// Auto refresh page
if (GETPOST('autorefresh','int') > 0) print '<meta http-equiv="refresh" content="'.GETPOST('autorefresh','int').'">';
// Displays title
$appli=constant('DOL_APPLICATION_TITLE');
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;