From 67eacc422309aea4915a33f53a83fbcd6d8ed3c0 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 17 Jul 2002 16:21:08 +0000 Subject: [PATCH] commit for Loic --- ChangeLog | 3 +++ Documentation.html | 30 ++++++++++++++------------ chk_rel.php3 | 8 ++++++- db_details_structure.php3 | 11 +++++----- libraries/select_lang.lib.php3 | 10 ++++----- pdf_pages.php3 | 39 +++++++++++++++++----------------- pdf_schema.php3 | 36 ++++++++++++++++++------------- 7 files changed, 79 insertions(+), 58 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8971a985..fc9a494b4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ $Source$ * lang/japanese* updates, thanks to Yukihiro Kawada * lang/french updates * lang/lithuanian updates, thanks to Vilius Zigmantas + * chk_rel.php3, db_details_structure.php3, Documentation.html, + pdf_pages.php3, pdf_shema.php3, libraries/select_lang.lib.php3: + commits for Loic 2002-07-17 Alexander M. Turek * libraries/common.lib.php3, libraries/config_import.lib.php3: Added diff --git a/Documentation.html b/Documentation.html index a85ed8efb..bd51c7d3f 100755 --- a/Documentation.html +++ b/Documentation.html @@ -556,7 +556,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
- $cfg['Servers'][$i]['pmadb'] string
+ $cfg['Servers'][$i]['pmadb'] string +
Starting with version 2.3.0 phpMyAdmin offers a lot of features to work with master / foreign - tables. To use those as well as @@ -781,7 +782,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
- $cfg['Servers'][$i]['column_comments'] string
+ $cfg['Servers'][$i]['column_comments'] string +
Since release 2.3.0 you can store comments to describe each column for each table. These will then be shown on the "printview". @@ -1340,18 +1342,20 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

-
$cfg['PmaNoRelation_DisableWarning'] bool
+
$cfg['PmaNoRelation_DisableWarning'] boolean
- Starting with version 2.3.0 phpMyAdmin offers a lot of features - to work with master / foreign - tables. These features require the - PMA Administrator to set up a special Database for PMA. - (see $cfg['Servers'][$i]['pmadb']) Its Contents - and use will be explained further down. If you tried to set this up and - it does not work for you have a look on the Structure page of one Database - where you would like to use it. You will find a link that will analyze - why those features have been disabled.
- If you do not want to use those features set this variable to TRUE - to stop this Message from appearing.

+ Starting with version 2.3.0 phpMyAdmin offers a lot of features to work + with master / foreign - tables. These features require the PMA + administrator to set up a special database for PMA (see + $cfg['Servers'][$i]['pmadb']). + Its contents and use will be explained further down.
+ If you tried to set this up and it does not work for you have a look on + the "Structure" page of one database where you would like to + use it. You will find a link that will analyze why those features have + been disabled.
+ If you do not want to use those features set this variable to + TRUE to stop this message from appearing. +

diff --git a/chk_rel.php3 b/chk_rel.php3 index 4600002cb..e5cd9cefe 100644 --- a/chk_rel.php3 +++ b/chk_rel.php3 @@ -1,19 +1,25 @@ diff --git a/db_details_structure.php3 b/db_details_structure.php3 index b7e64f567..7aacc119f 100644 --- a/db_details_structure.php3 +++ b/db_details_structure.php3 @@ -449,11 +449,12 @@ echo ' ' . ' ' . "\n"; 0 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE){ - echo '' . $strError . '
'; - $urltogoto = ''; - echo sprintf($strRelationNotWorking,$urltogoto,''); -} +if ($num_tables > 0 + && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) { + echo '' . $strError . '
' . "\n"; + $url_to_goto = ''; + echo sprintf($strRelationNotWorking, $url_to_goto, '') . "\n"; +} // end if // is this OK to check for 'class' support? if ($cfgRelation['pdfwork'] && $num_tables > 0) { diff --git a/libraries/select_lang.lib.php3 b/libraries/select_lang.lib.php3 index ed3c5439c..68f6014e1 100644 --- a/libraries/select_lang.lib.php3 +++ b/libraries/select_lang.lib.php3 @@ -218,17 +218,17 @@ if (!isset($cfg['DefaultLang']) && isset($cfgDefaultLang)) { // Disable UTF-8 if $cfg['AllowAnywhereRecoding'] has been set to FALSE. if (!isset($cfg['AllowAnywhereRecoding']) || !$cfg['AllowAnywhereRecoding']) { - $available_language_files = $available_languages; - $available_languages = array(); - foreach ($available_language_files as $tmp_lang => $tmp_lang_data) { + $available_language_files = $available_languages; + $available_languages = array(); + while (list($tmp_lang, $tmp_lang_data) = each($available_language_files)) { if (substr($tmp_lang, -5) != 'utf-8') { $available_languages[$tmp_lang] = $tmp_lang_data; } - } + } // end while unset($tmp_lang); unset($tmp_lang_data); unset($available_language_files); -} +} // end if // Lang forced if (!empty($cfg['Lang'])) { diff --git a/pdf_pages.php3 b/pdf_pages.php3 index ebda38559..094ce4a36 100755 --- a/pdf_pages.php3 +++ b/pdf_pages.php3 @@ -252,27 +252,28 @@ if ($cfgRelation['pdfwork']) { echo "\n" . ' '; echo "\n" . '' . "\n\n"; } // end if - if($do=="edcoord" || $do == "choosepage"){ + + if ($do == "edcoord" || $do == "choosepage") { ?> -
- - - - - -  :
- -
- -
- -
- - -    -
+
+ + + + + +  :
+ +
+ +
+ +
+ + +    +
' . $strError . '
'; - $urltogoto = ''; - echo sprintf($strRelationNotWorking,$urltogoto,''); + echo '' . $strError . '
' . "\n"; + $url_to_goto = ''; + echo sprintf($strRelationNotWorking, $url_to_goto, '') . "\n"; } @@ -371,20 +371,23 @@ class PMA_RT_Table * * @param boolean Whether to display table position or not * @param integer The font size + * @param boolean Whether all tables should have the same width or not * * @global object The current PDF document + * @global object The current relation table object * * @access private * * @see PMA_PDF */ - function PMA_RT_Table_draw($show_info, $ff, $same_wide=0) + function PMA_RT_Table_draw($show_info, $ff, $same_wide = 0) { global $pdf, $rt; - if(isset($rt->tablewidth)&& $rt->tablewidth>0 && $same_wide==1){ - $this->width=$rt->tablewidth; + if (isset($rt->tablewidth) && $rt->tablewidth > 0 && $same_wide == 1){ + $this->width = $rt->tablewidth; } + $pdf->PMA_PDF_setXyScale($this->x, $this->y); $pdf->SetFont($ff, 'B'); $pdf->SetTextColor(200); @@ -425,6 +428,7 @@ class PMA_RT_Table * @param integer The font size * * @global object The current PDF document + * @global object The current relation table object * @global integer The current page number (from the * $cfg['Servers'][$i]['table_coords'] table) * @global array The relations settings @@ -437,7 +441,7 @@ class PMA_RT_Table */ function PMA_RT_Table($table_name, $ff) { - global $rt, $pdf, $pdf_page_number, $cfgRelation, $db; + global $pdf, $rt, $pdf_page_number, $cfgRelation, $db; $this->table_name = $table_name; $sql = 'DESCRIBE ' . PMA_backquote($table_name); @@ -453,9 +457,10 @@ class PMA_RT_Table //height and width $this->PMA_RT_Table_setWidth($ff); $this->PMA_RT_Table_setHeight(); - if($rt->tablewidth<$this->width){ - $rt->tablewidth=$this->width; + if ($rt->tablewidth < $this->width) { + $rt->tablewidth = $this->width; } + //x and y $sql = 'SELECT x, y FROM ' . PMA_backquote($cfgRelation['table_coords']) @@ -774,7 +779,7 @@ class PMA_RT { reset($this->tables); while (list(, $table) = each($this->tables)) { - $table->PMA_RT_Table_draw($show_info, $this->ff,$this->same_wide); + $table->PMA_RT_Table_draw($show_info, $this->ff, $this->same_wide); } } // end of the "PMA_RT_drawTables()" method @@ -810,6 +815,7 @@ class PMA_RT * @param boolean Whether to display table position or not * @param boolean Whether to use one color per relation or not * @param boolean Whether to draw grids or not + * @param boolean Whether all tables should have the same width or not * * @global object The current PDF document * @global string The current db name @@ -824,9 +830,10 @@ class PMA_RT global $pdf, $db, $cfgRelation;; // Font face depends on the current language - $this->ff = str_replace('"', '', substr($GLOBALS['right_font_family'], 0, strpos($GLOBALS['right_font_family'], ','))); + $this->ff = str_replace('"', '', substr($GLOBALS['right_font_family'], 0, strpos($GLOBALS['right_font_family'], ','))); $this->same_wide = $all_tab_same_wide; - // Initializes a new document + + // Initializes a new document $pdf = new PMA_PDF('L'); $pdf->title = sprintf($GLOBALS['strPdfDbSchema'], $GLOBALS['db'], $which_rel); $pdf->cMargin = 0; @@ -871,9 +878,8 @@ class PMA_RT } else { reset ($alltables); while (list(, $table) = each ($alltables)) { - $this->tables[$table] = new PMA_RT_Table($table, $this->ff); - $curr_table_obj =&$this->tables[$table]; - $this->PMA_RT_setMinMax($curr_table_obj); + $this->tables[$table] = new PMA_RT_Table($table, $this->ff); + $this->PMA_RT_setMinMax($this->tables[$table]); } $norelations = TRUE; } // end if... else...