From 55a2b9f04b1a6620722a66281754602f77c8b6f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 May 2010 11:27:29 +0000 Subject: [PATCH] Can disable JQUERY --- htdocs/main.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bb569028f26..ea6945a23b6 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -795,7 +795,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs } } - if ($conf->global->MAIN_USE_JQUERY) + if (! defined('DISABLE_JQUERY') && $conf->global->MAIN_USE_JQUERY) { print ''."\n"; print ''."\n"; @@ -843,7 +843,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } - if ($conf->global->MAIN_USE_JQUERY) + if (! defined('DISABLE_JQUERY') && $conf->global->MAIN_USE_JQUERY) { print ''."\n"; print ''."\n"; @@ -857,7 +857,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; foreach($arrayofjs as $jsfile) { - print ''."\n"; + if (! preg_match('/^\//',$jsfile)) $jsfile='/'.$jsfile; // For backward compatibility + print ''."\n"; } }