diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index c982e3d4bb2..56d3b5e29fb 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -869,7 +869,7 @@ class FormFile
else $this->infofiles['extensions'][$ext]++;
// Preview
- if (! empty($conf->use_javascript_ajax) && ! empty($conf->browser->layout != 'phone'))
+ if (! empty($conf->use_javascript_ajax) && ($conf->browser->layout != 'phone'))
{
$tmparray = getAdvancedPreviewUrl($modulepart, $relativepath, 1);
if ($tmparray && $tmparray['url']) $tmpout.= '
'.img_picto('','detail').' '.$langs->trans("Preview").' '.$ext.'';
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 8fe2125251c..5e015cd9f62 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1899,7 +1899,7 @@ if (! function_exists("llxFooter"))
if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent;
- // TODO Move this in lib_head.js
+ // TODO Move this in lib_head.js.php
// Wrapper to show tooltips (html or onclick popup)
if (! empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover))
@@ -1922,7 +1922,7 @@ if (! function_exists("llxFooter"))
}
// Wrapper to manage document_preview
- if (! empty($conf->use_javascript_ajax) && ! empty($conf->browser->layout != 'phone'))
+ if (! empty($conf->use_javascript_ajax) && ($conf->browser->layout != 'phone'))
{
print "\n\n";
print '