From 55d90fd01845d31425625b8afb3e009d7dc6efa5 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Fri, 17 Oct 2014 12:49:18 +0530 Subject: [PATCH] Bug #4561 PHP error in transformations Signed-off-by: Madhura Jayaratne --- libraries/DisplayResults.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index fed3eab3f9..1f3046bfd5 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -211,6 +211,12 @@ class PMA_DisplayResults */ public function __construct($db, $table, $goto, $sql_query) { + if ($GLOBALS['cfgRelation']['mimework'] + && $GLOBALS['cfg']['BrowseMIME'] + ) { + include_once './libraries/transformations.lib.php'; + } + $this->_setDefaultTransformations(); $this->__set('db', $db); @@ -1107,7 +1113,6 @@ class PMA_DisplayResults && $GLOBALS['cfg']['BrowseMIME'] && ! $_SESSION['tmpval']['hide_transformation'] ) { - include_once './libraries/transformations.lib.php'; $this->__set( 'mime_map', PMA_getMIME($this->__get('db'), $this->__get('table'))