From aad9b2332ee4070efc1658e68daefd8885fe2137 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Apr 2008 11:34:08 +0000 Subject: [PATCH] Disable preview option if PHP does not support it. --- htdocs/admin/ihm.php | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index e228cfa3e97..397126c6fbc 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -162,14 +162,17 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') print ' '; print ''; - // Activer onglet preview - $var=!$var; - print ''.$langs->trans("UsePreviewTabs").''; - print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); - print ''; - print ' '; - print ''; - + // Activate previeuw tab on element card + if (function_exists("imagick_readimage")) + { + $var=!$var; + print ''.$langs->trans("UsePreviewTabs").''; + print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); + print ''; + print ' '; + print ''; + } + print '
'; @@ -294,13 +297,16 @@ else print ' '; print ""; - // Activer onglet preview - $var=!$var; - print ''.$langs->trans("UsePreviewTabs").''; - print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0).""; - print ' '; - print ""; - + // Activate previeuw tab on element card + if (function_exists("imagick_readimage")) + { + $var=!$var; + print ''.$langs->trans("UsePreviewTabs").''; + print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0).""; + print ' '; + print ""; + } + print '
';