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";
}
}