[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_4-5781-g75593e3

Michal Čihař nijel at users.sourceforge.net
Tue Jul 20 12:09:43 CEST 2010


The branch, master has been updated
       via  75593e3603b87ced82cfdf34a5cf03ea129db7e0 (commit)
       via  42532065ab19a92b0c4513c7916a27353b3c1122 (commit)
      from  11e53fb1418f57529ef2fdd88bff7f7b41600ffe (commit)


- Log -----------------------------------------------------------------
commit 75593e3603b87ced82cfdf34a5cf03ea129db7e0
Author: Michal Čihař <mcihar at novell.com>
Date:   Tue Jul 20 12:09:22 2010 +0200

    Do not die if RecodingEngine is auto and no engine is found.

commit 42532065ab19a92b0c4513c7916a27353b3c1122
Author: Michal Čihař <mcihar at novell.com>
Date:   Tue Jul 20 12:08:43 2010 +0200

    No section for loading extensions.
    
    The dl has been deprecated long time and the code for it removed as well
    so we can simplify loading much.

-----------------------------------------------------------------------

Summary of changes:
 libraries/charset_conversion.lib.php |   45 ++++------------------------------
 1 files changed, 5 insertions(+), 40 deletions(-)

diff --git a/libraries/charset_conversion.lib.php b/libraries/charset_conversion.lib.php
index 6254e67..9bdfd5b 100644
--- a/libraries/charset_conversion.lib.php
+++ b/libraries/charset_conversion.lib.php
@@ -10,38 +10,6 @@ if (! defined('PHPMYADMIN')) {
     exit;
 }
 
-/**
- * Failure on loading recode/iconv extensions.
- */
-function PMA_failRecoding() {
-    PMA_fatalError(__('Couldn\'t load the iconv or recode extension needed for charset conversion. Either configure PHP to enable these extensions or disable charset conversion in phpMyAdmin.'));
-}
-
-/**
- * Loads the recode or iconv extensions if any of it is not loaded yet
- */
-if ($cfg['RecodingEngine'] == 'recode') {
-    if (!@extension_loaded('recode')) {
-        PMA_failRecoding();
-    }
-    $PMA_recoding_engine             = 'recode';
-} elseif ($cfg['RecodingEngine'] == 'iconv') {
-    if (!@extension_loaded('iconv')) {
-        PMA_failRecoding();
-    }
-    $PMA_recoding_engine             = 'iconv';
-} elseif ($cfg['RecodingEngine'] == 'auto') {
-    if (@extension_loaded('iconv')) {
-        $PMA_recoding_engine         = 'iconv';
-    } elseif (@extension_loaded('recode')) {
-        $PMA_recoding_engine         = 'recode';
-    } else {
-        $PMA_recoding_engine         = 'none';
-    }
-} else {
-    $PMA_recoding_engine         = 'none';
-}
-
 define('PMA_CHARSET_NONE', 0);
 define('PMA_CHARSET_ICONV', 1);
 define('PMA_CHARSET_LIBICONV', 2);
@@ -53,7 +21,7 @@ if (!isset($cfg['IconvExtraParams'])) {
 }
 
 // Finally detect which function we will use:
-if ($PMA_recoding_engine == 'iconv') {
+if ($cfg['RecodingEngine'] == 'iconv') {
     if (@function_exists('iconv')) {
         if ((@stristr(PHP_OS, 'AIX')) && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) {
             $PMA_recoding_engine = PMA_CHARSET_ICONV_AIX;
@@ -72,7 +40,7 @@ if ($PMA_recoding_engine == 'iconv') {
         require_once './libraries/footer.inc.php';
         exit();
     }
-} elseif ($PMA_recoding_engine == 'recode') {
+} elseif ($cfg['RecodingEngine'] == 'recode') {
     if (@function_exists('recode_string')) {
         $PMA_recoding_engine = PMA_CHARSET_RECODE;
     } else {
@@ -83,7 +51,7 @@ if ($PMA_recoding_engine == 'iconv') {
         require_once './libraries/footer.inc.php';
         exit;
     }
-} else {
+} elseif ($cfg['RecodingEngine'] == 'auto') {
     if (@function_exists('iconv')) {
         if ((@stristr(PHP_OS, 'AIX')) && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) {
             $PMA_recoding_engine = PMA_CHARSET_ICONV_AIX;
@@ -96,12 +64,9 @@ if ($PMA_recoding_engine == 'iconv') {
         $PMA_recoding_engine = PMA_CHARSET_RECODE;
     } else {
         $PMA_recoding_engine = PMA_CHARSET_NONE;
-
-        require_once './libraries/header.inc.php';
-        echo __('Couldn\'t use the iconv, libiconv, or recode_string functions, although the necessary extensions appear to be loaded. Check your PHP configuration.');
-        require_once './libraries/footer.inc.php';
-        exit;
     }
+} else {
+    $PMA_recoding_engine = PMA_CHARSET_NONE;
 }
 
 /* Load AIX iconv wrapper if needed */


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list