From 20ea744d8af65e196d17e5dd3e91b9ee2edb8eda Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 4 Mar 2011 12:27:40 +0000 Subject: [PATCH] Fix: reencoding preview tabs, Imagick is a class today --- htdocs/admin/ihm.php | 4 ++-- htdocs/comm/propal/apercu.php | 12 ++++++------ htdocs/commande/apercu.php | 2 +- htdocs/compta/facture/apercu.php | 4 ++-- htdocs/compta/prelevement/bon.php | 2 +- htdocs/fichinter/apercu.php | 2 +- htdocs/langs/en_US/other.lang | 2 +- htdocs/langs/fr_FR/other.lang | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 4ef41861e74..5854ebe0838 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -219,7 +219,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit print ''; // Activate preview tab on element card - if (function_exists("imagick_readimage")) + if (class_exists("Imagick")) { $var=!$var; print ''.$langs->trans("UsePreviewTabs").''; @@ -420,7 +420,7 @@ else // Show print ""; // Activate preview tab on element card - if (function_exists("imagick_readimage")) + if (class_exists("Imagick")) { $var=!$var; print ''.$langs->trans("UsePreviewTabs").''; diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index afd31a97531..09684625354 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,10 +20,10 @@ */ /** - \file htdocs/comm/propal/apercu.php - \ingroup propal - \brief Page de l'onglet apercu d'une propal - \version $Id$ + * \file htdocs/comm/propal/apercu.php + * \ingroup propal + * \brief Page de l'onglet apercu d'une propal + * \version $Id$ */ require("../../main.inc.php"); @@ -176,7 +176,7 @@ if ($_GET["id"] > 0) // Conversion du PDF en image png si fichier png non existant if (! file_exists($fileimage) && ! file_exists($fileimagebis)) { - if (function_exists("imagick_readimage")) + if (class_exists("Imagick")) { $handle = imagick_readimage( $file ) ; if ( imagick_iserror( $handle ) ) diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 9053d1afd45..4868df5e9be 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -171,7 +171,7 @@ if ($_GET["id"] > 0) { // Conversion du PDF en image png si fichier png non existant if (! file_exists($fileimage) && ! file_exists($fileimagebis)) { - if (function_exists("imagick_readimage")) + if (class_exists("Imagick")) { $handle = imagick_readimage( $file ) ; if ( imagick_iserror( $handle ) ) diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 2fefe7998c4..653f963a0ef 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -181,8 +181,8 @@ if ($_GET["facid"] > 0) // Conversion du PDF en image png si fichier png non existant if (! file_exists($fileimage) && ! file_exists($fileimagebis)) { - if (function_exists("imagick_readimage")) - { + if (class_exists("Imagick")) + { $handle = imagick_readimage( $file ) ; if ( imagick_iserror( $handle ) ) { diff --git a/htdocs/compta/prelevement/bon.php b/htdocs/compta/prelevement/bon.php index 487767b5877..cbafdbd4ccc 100644 --- a/htdocs/compta/prelevement/bon.php +++ b/htdocs/compta/prelevement/bon.php @@ -71,7 +71,7 @@ if ($_GET["id"]) if (!file_exists($fileimage)) { print $fileimage; - if (function_exists(imagick_readimage)) + if (class_exists("Imagick")) { $handle = imagick_readimage( $fileps ) ; diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 3126c3b3bd5..ccb8f9cf715 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -139,7 +139,7 @@ if ($_GET["id"] > 0) { // Conversion du PDF en image png si fichier png non existant if (! file_exists($fileimage) && ! file_exists($fileimagebis)) { - if (function_exists("imagick_readimage")) + if (class_exists("Imagick")) { $handle = imagick_readimage( $file ) ; if ( imagick_iserror( $handle ) ) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index d1d475d11d3..31758bfc87f 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -4,7 +4,7 @@ ErrorPasswordDiffers=Passwords differs, please type them again. ErrorForbidden=Access denied.
You try to access to a page, area or feature without being in an authenticated session or that is not allowed to your user. ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s. ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...). -ErrorNoImagickReadimage=Function imagick_readimage is not found in this PHP. No preview can be available. Administrators can disable this tab from menu Setup - Display. +ErrorNoImagickReadimage=Class Imagick is not found in this PHP. No preview can be available. Administrators can disable this tab from menu Setup - Display. ErrorRecordAlreadyExists=Record already exists ErrorCantReadFile=Failed to read file '%s' ErrorCantReadDir=Failed to read directory '%s' diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 968709c4635..2da9153626d 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -4,7 +4,7 @@ ErrorPasswordDiffers=Les mots de passe ne sont pas identiques, veuillez les sais ErrorForbidden=Accès non autorisé.
Vous essayez d'accéder à une page, zone ou fonction sans être au sein d'une session authentifiée ou qui n'est pas autorisée pour votre compte utilisateur. ErrorForbidden2=Les permissions pour ce login peuvent être attribuées par l'administrateur Dolibarr via le menu %s -> %s. ErrorForbidden3=Dolibarr ne semble pas fonctionner au sein d'une session authentifiée. Consultez la documentation d'installation de Dolibarr pour savoir comment gérer les authentifications (htaccess, mod_auth ou autre...). -ErrorNoImagickReadimage=La fonction imagick_readimage n'est pas présente sur cette installation de PHP. L'aperçu n'est donc pas disponible. Les administrateurs peuvent désactiver cet onglet dans le menu Configuration - Affichage. +ErrorNoImagickReadimage=La classe Imagick n'est pas présente sur cette installation de PHP. L'aperçu n'est donc pas disponible. Les administrateurs peuvent désactiver cet onglet dans le menu Configuration - Affichage. ErrorRecordAlreadyExists=Enregistrement déjà existant ErrorCantReadFile=Échec de lecture du fichier '%s' ErrorCantReadDir=Échec de lecture du répertoire '%s'