diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index d61f07593c3..c232b23c77d 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -349,7 +349,7 @@ if (! session_id() || ! isset($_SESSION["dol_login"]))
require_once DOL_DOCUMENT_ROOT.'/../external-libs/Artichow/Artichow.cfg.php';
require_once ARTICHOW."/AntiSpam.class.php";
- // On créé l'objet anti-spam
+ // On crê§ l'objet anti-spam
$object = new AntiSpam();
// Verifie code
@@ -676,7 +676,7 @@ else
* \brief Affiche en-tete HTML
* \param head Lignes d'en-tete head optionnelles
* \param title Titre page web
- * \param disablejs N'affiche pas les liens vers les js (Ex: qd fonction utilis�e par sous formulaire Ajax)
+ * \param disablejs N'affiche pas les liens vers les js (Ex: qd fonction utilisee par sous formulaire Ajax)
*/
function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
{
@@ -729,7 +729,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
print ''."\n";
// Style sheets pour la class Window
- if (! empty($conf->global->MAIN_CONFIRM_AJAX))
+ if (! $disablejs && ($conf->use_javascript && $conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX))
{
print ''."\n";
print ''."\n";
@@ -754,6 +754,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
}
if (! $disablejs && $conf->use_ajax)
{
+ require_once DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php';
+
print ''."\n";
print ''."\n";
print ''."\n";