From a32ffd69c3da1188f45e3e591d6ad1dd07ed9817 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 12 Jun 2003 14:50:05 +0000 Subject: [PATCH] enable more features when relation is broken --- ChangeLog | 4 +++ libraries/relation.lib.php3 | 58 ++++++++++++++++++------------------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4460f2f12..d4557797a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-06-12 Marc Delisle + * libraries/relation.lib.php3: bug 751787: should not disable all + the features, when the relation feature is broken + 2003-06-11 Marc Delisle * libraries/auth/cookie.auth.lib.php3: undefined scheme * main.php3: undefined scheme diff --git a/libraries/relation.lib.php3 b/libraries/relation.lib.php3 index 4f888cfed..433e389cd 100644 --- a/libraries/relation.lib.php3 +++ b/libraries/relation.lib.php3 @@ -137,41 +137,41 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ if (isset($cfgRelation['relation'])) { $cfgRelation['relwork'] = TRUE; if (isset($cfgRelation['table_info'])) { - $cfgRelation['displaywork'] = TRUE; + $cfgRelation['displaywork'] = TRUE; } - if (isset($cfgRelation['table_coords']) && isset($cfgRelation['pdf_pages'])) { - $cfgRelation['pdfwork'] = TRUE; - } - if (isset($cfgRelation['column_info'])) { - $cfgRelation['commwork'] = TRUE; - - if ($cfg['Server']['verbose_check']) { - $mime_query = 'SHOW FIELDS FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']); - $mime_rs = PMA_query_as_cu($mime_query, FALSE); + } + if (isset($cfgRelation['table_coords']) && isset($cfgRelation['pdf_pages'])) { + $cfgRelation['pdfwork'] = TRUE; + } + if (isset($cfgRelation['column_info'])) { + $cfgRelation['commwork'] = TRUE; + + if ($cfg['Server']['verbose_check']) { + $mime_query = 'SHOW FIELDS FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']); + $mime_rs = PMA_query_as_cu($mime_query, FALSE); - $mime_field_mimetype = FALSE; - $mime_field_transformation = FALSE; - $mime_field_transformation_options = FALSE; - while ($curr_mime_field = @PMA_mysql_fetch_array($mime_rs)) { - if ($curr_mime_field[0] == 'mimetype') { - $mime_field_mimetype = TRUE; - } else if ($curr_mime_field[0] == 'transformation') { - $mime_field_transformation = TRUE; - } else if ($curr_mime_field[0] == 'transformation_options') { - $mime_field_transformation_options = TRUE; - } + $mime_field_mimetype = FALSE; + $mime_field_transformation = FALSE; + $mime_field_transformation_options = FALSE; + while ($curr_mime_field = @PMA_mysql_fetch_array($mime_rs)) { + if ($curr_mime_field[0] == 'mimetype') { + $mime_field_mimetype = TRUE; + } else if ($curr_mime_field[0] == 'transformation') { + $mime_field_transformation = TRUE; + } else if ($curr_mime_field[0] == 'transformation_options') { + $mime_field_transformation_options = TRUE; } - - if ($mime_field_mimetype == TRUE - && $mime_field_transformation == TRUE - && $mime_field_transformation_options == TRUE) { - $cfgRelation['mimework'] = TRUE; - } - } else { + } + + if ($mime_field_mimetype == TRUE + && $mime_field_transformation == TRUE + && $mime_field_transformation_options == TRUE) { $cfgRelation['mimework'] = TRUE; } + } else { + $cfgRelation['mimework'] = TRUE; } - } // end if + } if (isset($cfgRelation['history'])) { $cfgRelation['historywork'] = TRUE;