changes by Loic:

default language should be en-iso-8859-1
beautified code in relation.lib.php3
This commit is contained in:
Mike Beck
2002-07-24 16:21:30 +00:00
parent 86efec66f7
commit 546fac14e5
3 changed files with 45 additions and 19 deletions

View File

@@ -231,7 +231,7 @@ $cfg['ManualBaseShort'] = 'http://www.mysql.com/doc';
* Language and charset conversion settings * Language and charset conversion settings
*/ */
// Default language to use, if not browser-defined or user-defined // 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 // Default charset to use for recoding of MySQL queries, does not take
// any effect when charsets recoding is switched off by // any effect when charsets recoding is switched off by

View File

@@ -387,7 +387,7 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')){
$cfg['DefaultLang'] = $cfgDefaultLang; $cfg['DefaultLang'] = $cfgDefaultLang;
unset($cfgDefaultLang); unset($cfgDefaultLang);
} else { } else {
$cfg['DefaultLang'] = 'en'; $cfg['DefaultLang'] = 'en-iso-8859-1';
} }
} }

View File

@@ -58,6 +58,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
* just a copy of the functions used for relations ;-) * just a copy of the functions used for relations ;-)
* but added some stuff to check what will work * 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 * @return array the relation parameters for the current user
* *
* @global array the list of settings for servers * @global array the list of settings for servers
@@ -70,7 +72,7 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
* *
* @author Mike Beck <mikebeck@users.sourceforge.net> * @author Mike Beck <mikebeck@users.sourceforge.net>
*/ */
function PMA_getRelationsParam($verbose=FALSE) function PMA_getRelationsParam($verbose = FALSE)
{ {
global $cfg, $server, $err_url_0, $db, $table; global $cfg, $server, $err_url_0, $db, $table;
@@ -130,8 +132,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
} }
} // end if } // end if
if($cfgRelation['relwork'] == TRUE && $cfgRelation['displaywork'] == TRUE if ($cfgRelation['relwork'] == TRUE && $cfgRelation['displaywork'] == TRUE
&& $cfgRelation['pdfwork'] == TRUE && $cfgRelation['commwork'] == TRUE){ && $cfgRelation['pdfwork'] == TRUE && $cfgRelation['commwork'] == TRUE) {
$cfgRelation['allworks'] = TRUE; $cfgRelation['allworks'] = TRUE;
} }
if ($tab_rs) { if ($tab_rs) {
@@ -139,21 +141,45 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
} else { } else {
$cfg['Server']['pmadb'] = FALSE; $cfg['Server']['pmadb'] = FALSE;
} }
if($verbose==TRUE){
$shit='<font color="red">not OK</font> [ <a href="Documentation.html#%s">' . $GLOBALS['strDocu'] . '</a> ]';
$hit ='<font color="green">OK</font>';
echo 'checking PMA Database ...',$cfg['Server']['pmadb'] == FALSE?sprintf($shit,'pmadb'):$hit,'<br />';
echo 'checking relation Table ...',isset($cfgRelation['relation'])?$hit:sprintf($shit,'relation'),'<br />';
echo '<b>',$cfgRelation['relwork']==TRUE?'General Relationfeatures enabled':'General Relationfeatures disabled','</b><br />';
echo 'checking table_info ...',$cfgRelation['displaywork'] == FALSE?sprintf($shit,'table_info'):$hit,'<br />';
echo '<b>',$cfgRelation['displaywork']==TRUE?'Displayfeatures enabled':'Displayfeatures disabled','</b><br />';
echo 'checking table_coords ...',isset($cfgRelation['table_coords'])?$hit:sprintf($shit,'table_coords'),'<br />';
echo 'checking pdf_pages ...',isset($cfgRelation['pdf_pages'])?$hit:sprintf($shit,'table_coords'),'<br />';
echo '<b>',$cfgRelation['pdfwork']==TRUE?'Creation of PDFs enabled':'Creation of PDFs disabled','</b><br />';
echo 'checking column_comments ...',isset($cfgRelation['column_comments'])?$hit:sprintf($shit,'col_com'),'<br />';
echo '<b>',$cfgRelation['commwork']==TRUE?'Displaying Column Comments enabled':'Displaying Column Comments disabled','</b><br />';
}
if ($verbose == TRUE) {
$shit = '<font color="red">not OK</font> [ <a href="Documentation.html#%s">' . $GLOBALS['strDocu'] . '</a> ]';
$hit = '<font color="green">OK</font>';
echo '<p>' . "\n";
echo ' checking PMA Database ... '
. (($cfg['Server']['pmadb'] == FALSE) ? sprintf($shit, 'pmadb') : $hit)
. '<br />' . "\n";
echo ' checking relation Table ... '
. ((isset($cfgRelation['relation'])) ? $hit : sprintf($shit, 'relation'))
. '<br />' . "\n";
echo ' <b>' . (($cfgRelation['relwork'] == TRUE) ? 'General relation features enabled' : 'General relation features disabled') . '</b>' . "\n";
echo '</p>' . "\n";
echo '<p>' . "\n";
echo ' checking table_info ... '
. (($cfgRelation['displaywork'] == FALSE) ? sprintf($shit, 'table_info') : $hit)
. '<br />' . "\n";
echo ' <b>' . (($cfgRelation['displaywork'] == TRUE) ? 'Display features enabled' : 'Display features disabled') . '</b>' . "\n";
echo '</p>' . "\n";
echo '<p>' . "\n";
echo ' checking table_coords ... '
. ((isset($cfgRelation['table_coords'])) ? $hit : sprintf($shit, 'table_coords'))
. '<br />' . "\n";
echo ' checking pdf_pages ... '
. ((isset($cfgRelation['pdf_pages'])) ? $hit : sprintf($shit, 'table_coords'))
. '<br />' . "\n";
echo ' <b>' . (($cfgRelation['pdfwork'] == TRUE) ? 'Creation of PDFs enabled' : 'Creation of PDFs disabled') . '</b>' . "\n";
echo '</p>' . "\n";
echo '<p>' . "\n";
echo ' checking column_comments ... '
. ((isset($cfgRelation['column_comments'])) ? $hit : sprintf($shit, 'col_com'))
. '<br />' . "\n";
echo ' <b>' . (($cfgRelation['commwork'] == TRUE) ? 'Displaying column comments enabled' : 'Displaying column comments disabled') . '</b>' . "\n";
echo '</p>' . "\n";
} // end if ($verbose == TRUE) {
return $cfgRelation; return $cfgRelation;
} // end of the 'PMA_getRelationsParam()' function } // end of the 'PMA_getRelationsParam()' function