From 546fac14e5407dc57023923d3c0bc9bc929a0a74 Mon Sep 17 00:00:00 2001 From: Mike Beck Date: Wed, 24 Jul 2002 16:21:30 +0000 Subject: [PATCH] changes by Loic: default language should be en-iso-8859-1 beautified code in relation.lib.php3 --- config.inc.php3 | 2 +- libraries/config_import.lib.php3 | 2 +- libraries/relation.lib.php3 | 60 +++++++++++++++++++++++--------- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/config.inc.php3 b/config.inc.php3 index f29d72caf..d92c11993 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -231,7 +231,7 @@ $cfg['ManualBaseShort'] = 'http://www.mysql.com/doc'; * Language and charset conversion settings */ // Default language to use, if not browser-defined or user-defined -$cfg['DefaultLang'] = 'en'; +$cfg['DefaultLang'] = 'en-iso-8859-1'; // Default charset to use for recoding of MySQL queries, does not take // any effect when charsets recoding is switched off by diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index 1a4a310d7..af1c2b306 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -387,7 +387,7 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')){ $cfg['DefaultLang'] = $cfgDefaultLang; unset($cfgDefaultLang); } else { - $cfg['DefaultLang'] = 'en'; + $cfg['DefaultLang'] = 'en-iso-8859-1'; } } diff --git a/libraries/relation.lib.php3 b/libraries/relation.lib.php3 index d8c30d213..867f9d4aa 100644 --- a/libraries/relation.lib.php3 +++ b/libraries/relation.lib.php3 @@ -58,6 +58,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ * just a copy of the functions used for relations ;-) * but added some stuff to check what will work * + * @param boolean whether to check validity of settings or not + * * @return array the relation parameters for the current user * * @global array the list of settings for servers @@ -70,7 +72,7 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ * * @author Mike Beck */ - function PMA_getRelationsParam($verbose=FALSE) + function PMA_getRelationsParam($verbose = FALSE) { global $cfg, $server, $err_url_0, $db, $table; @@ -130,8 +132,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ } } // end if - if($cfgRelation['relwork'] == TRUE && $cfgRelation['displaywork'] == TRUE - && $cfgRelation['pdfwork'] == TRUE && $cfgRelation['commwork'] == TRUE){ + if ($cfgRelation['relwork'] == TRUE && $cfgRelation['displaywork'] == TRUE + && $cfgRelation['pdfwork'] == TRUE && $cfgRelation['commwork'] == TRUE) { $cfgRelation['allworks'] = TRUE; } if ($tab_rs) { @@ -139,21 +141,45 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ } else { $cfg['Server']['pmadb'] = FALSE; } - if($verbose==TRUE){ - $shit='not OK [ ' . $GLOBALS['strDocu'] . ' ]'; - $hit ='OK'; - echo 'checking PMA Database ...',$cfg['Server']['pmadb'] == FALSE?sprintf($shit,'pmadb'):$hit,'
'; - echo 'checking relation Table ...',isset($cfgRelation['relation'])?$hit:sprintf($shit,'relation'),'
'; - echo '',$cfgRelation['relwork']==TRUE?'General Relationfeatures enabled':'General Relationfeatures disabled','
'; - echo 'checking table_info ...',$cfgRelation['displaywork'] == FALSE?sprintf($shit,'table_info'):$hit,'
'; - echo '',$cfgRelation['displaywork']==TRUE?'Displayfeatures enabled':'Displayfeatures disabled','
'; - echo 'checking table_coords ...',isset($cfgRelation['table_coords'])?$hit:sprintf($shit,'table_coords'),'
'; - echo 'checking pdf_pages ...',isset($cfgRelation['pdf_pages'])?$hit:sprintf($shit,'table_coords'),'
'; - echo '',$cfgRelation['pdfwork']==TRUE?'Creation of PDFs enabled':'Creation of PDFs disabled','
'; - echo 'checking column_comments ...',isset($cfgRelation['column_comments'])?$hit:sprintf($shit,'col_com'),'
'; - echo '',$cfgRelation['commwork']==TRUE?'Displaying Column Comments enabled':'Displaying Column Comments disabled','
'; - } + if ($verbose == TRUE) { + $shit = 'not OK [ ' . $GLOBALS['strDocu'] . ' ]'; + $hit = 'OK'; + + echo '

' . "\n"; + echo ' checking PMA Database ... ' + . (($cfg['Server']['pmadb'] == FALSE) ? sprintf($shit, 'pmadb') : $hit) + . '
' . "\n"; + echo ' checking relation Table ... ' + . ((isset($cfgRelation['relation'])) ? $hit : sprintf($shit, 'relation')) + . '
' . "\n"; + echo ' ' . (($cfgRelation['relwork'] == TRUE) ? 'General relation features enabled' : 'General relation features disabled') . '' . "\n"; + echo '

' . "\n"; + + echo '

' . "\n"; + echo ' checking table_info ... ' + . (($cfgRelation['displaywork'] == FALSE) ? sprintf($shit, 'table_info') : $hit) + . '
' . "\n"; + echo ' ' . (($cfgRelation['displaywork'] == TRUE) ? 'Display features enabled' : 'Display features disabled') . '' . "\n"; + echo '

' . "\n"; + + echo '

' . "\n"; + echo ' checking table_coords ... ' + . ((isset($cfgRelation['table_coords'])) ? $hit : sprintf($shit, 'table_coords')) + . '
' . "\n"; + echo ' checking pdf_pages ... ' + . ((isset($cfgRelation['pdf_pages'])) ? $hit : sprintf($shit, 'table_coords')) + . '
' . "\n"; + echo ' ' . (($cfgRelation['pdfwork'] == TRUE) ? 'Creation of PDFs enabled' : 'Creation of PDFs disabled') . '' . "\n"; + echo '

' . "\n"; + + echo '

' . "\n"; + echo ' checking column_comments ... ' + . ((isset($cfgRelation['column_comments'])) ? $hit : sprintf($shit, 'col_com')) + . '
' . "\n"; + echo ' ' . (($cfgRelation['commwork'] == TRUE) ? 'Displaying column comments enabled' : 'Displaying column comments disabled') . '' . "\n"; + echo '

' . "\n"; + } // end if ($verbose == TRUE) { return $cfgRelation; } // end of the 'PMA_getRelationsParam()' function