commit for Loic

This commit is contained in:
Marc Delisle
2002-07-17 16:21:08 +00:00
parent 9aea928341
commit 67eacc4223
7 changed files with 79 additions and 58 deletions

View File

@@ -15,6 +15,9 @@ $Source$
* lang/japanese* updates, thanks to Yukihiro Kawada * lang/japanese* updates, thanks to Yukihiro Kawada
* lang/french updates * lang/french updates
* lang/lithuanian updates, thanks to Vilius Zigmantas * 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 <rabus@users.sourceforge.net> 2002-07-17 Alexander M. Turek <rabus@users.sourceforge.net>
* libraries/common.lib.php3, libraries/config_import.lib.php3: Added * libraries/common.lib.php3, libraries/config_import.lib.php3: Added

View File

@@ -556,7 +556,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<dt> <dt>
<a name="pmadb"></a> <a name="pmadb"></a>
<b>$cfg['Servers'][$i]['pmadb']</b> string</dt> <b>$cfg['Servers'][$i]['pmadb']</b> string
</dt>
<dd> <dd>
Starting with version 2.3.0 phpMyAdmin offers a lot of features Starting with version 2.3.0 phpMyAdmin offers a lot of features
to work with master / foreign - tables. To use those as well as to work with master / foreign - tables. To use those as well as
@@ -781,7 +782,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<dt> <dt>
<a name="col_com"></a> <a name="col_com"></a>
<b>$cfg['Servers'][$i]['column_comments']</b> string</dt> <b>$cfg['Servers'][$i]['column_comments']</b> string
</dt>
<dd> <dd>
Since release 2.3.0 you can store comments to describe each column Since release 2.3.0 you can store comments to describe each column
for each table. These will then be shown on the &quot;printview&quot;. for each table. These will then be shown on the &quot;printview&quot;.
@@ -1340,18 +1342,20 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfg['PmaNoRelation_DisableWarning']</b> bool</dt> <dt><b>$cfg['PmaNoRelation_DisableWarning']</b> boolean</dt>
<dd> <dd>
Starting with version 2.3.0 phpMyAdmin offers a lot of features Starting with version 2.3.0 phpMyAdmin offers a lot of features to work
to work with master / foreign - tables. These features require the with master / foreign - tables. These features require the PMA
PMA Administrator to set up a special Database for PMA. administrator to set up a special database for PMA (see
(see <a href="#pmadb">$cfg['Servers'][$i]['pmadb']</a>) Its Contents <a class="navigation" href="#pmadb">$cfg['Servers'][$i]['pmadb']</a>).
and use will be explained further down. If you tried to set this up and Its contents and use will be explained further down.<br />
it does not work for you have a look on the Structure page of one Database If you tried to set this up and it does not work for you have a look on
where you would like to use it. You will find a link that will analyze the &quot;Structure&quot; page of one database where you would like to
why those features have been disabled.<br /> use it. You will find a link that will analyze why those features have
If you do not want to use those features set this variable to TRUE been disabled.<br />
to stop this Message from appearing.<br /><br /> If you do not want to use those features set this variable to
<tt>TRUE</tt> to stop this message from appearing.
<br /><br />
</dd> </dd>
</dl> </dl>

View File

@@ -1,19 +1,25 @@
<?php <?php
/* $Id$ */ /* $Id$ */
/** /**
* Gets some core libraries * Gets some core libraries
*/ */
require('./libraries/grab_globals.lib.php3'); require('./libraries/grab_globals.lib.php3');
require('./libraries/common.lib.php3'); require('./libraries/common.lib.php3');
include('./db_details_common.php3'); require('./db_details_common.php3');
require('./libraries/relation.lib.php3'); require('./libraries/relation.lib.php3');
/** /**
* Gets the relation settings * Gets the relation settings
*/ */
$cfgRelation = PMA_getRelationsParam(TRUE); $cfgRelation = PMA_getRelationsParam(TRUE);
/**
* Displays the footer
*/
echo "\n"; echo "\n";
require('./footer.inc.php3'); require('./footer.inc.php3');
?> ?>

View File

@@ -449,11 +449,12 @@ echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n";
</li> </li>
<?php <?php
if($num_tables>0 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE){ if ($num_tables > 0
echo '<font color="red">' . $strError . '</font><br />'; && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
$urltogoto = '<a href="'.$cfg['PmaAbsoluteUri'].'chk_rel.php3?'.$url_query.'">'; echo '<font color="red">' . $strError . '</font><br />' . "\n";
echo sprintf($strRelationNotWorking,$urltogoto,'</a>'); $url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php3?' . $url_query . '">';
} echo sprintf($strRelationNotWorking, $url_to_goto, '</a>') . "\n";
} // end if
// is this OK to check for 'class' support? // is this OK to check for 'class' support?
if ($cfgRelation['pdfwork'] && $num_tables > 0) { if ($cfgRelation['pdfwork'] && $num_tables > 0) {

View File

@@ -218,17 +218,17 @@ if (!isset($cfg['DefaultLang']) && isset($cfgDefaultLang)) {
// Disable UTF-8 if $cfg['AllowAnywhereRecoding'] has been set to FALSE. // Disable UTF-8 if $cfg['AllowAnywhereRecoding'] has been set to FALSE.
if (!isset($cfg['AllowAnywhereRecoding']) || !$cfg['AllowAnywhereRecoding']) { if (!isset($cfg['AllowAnywhereRecoding']) || !$cfg['AllowAnywhereRecoding']) {
$available_language_files = $available_languages; $available_language_files = $available_languages;
$available_languages = array(); $available_languages = array();
foreach ($available_language_files as $tmp_lang => $tmp_lang_data) { while (list($tmp_lang, $tmp_lang_data) = each($available_language_files)) {
if (substr($tmp_lang, -5) != 'utf-8') { if (substr($tmp_lang, -5) != 'utf-8') {
$available_languages[$tmp_lang] = $tmp_lang_data; $available_languages[$tmp_lang] = $tmp_lang_data;
} }
} } // end while
unset($tmp_lang); unset($tmp_lang);
unset($tmp_lang_data); unset($tmp_lang_data);
unset($available_language_files); unset($available_language_files);
} } // end if
// Lang forced // Lang forced
if (!empty($cfg['Lang'])) { if (!empty($cfg['Lang'])) {

View File

@@ -252,27 +252,28 @@ if ($cfgRelation['pdfwork']) {
echo "\n" . ' <input type="submit" value="' . $strGo . '" />'; echo "\n" . ' <input type="submit" value="' . $strGo . '" />';
echo "\n" . '</form>' . "\n\n"; echo "\n" . '</form>' . "\n\n";
} // end if } // end if
if($do=="edcoord" || $do == "choosepage"){
if ($do == "edcoord" || $do == "choosepage") {
?> ?>
<form method="post" action="pdf_schema.php3"> <form method="post" action="pdf_schema.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" /> <input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" /> <input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" /> <input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" />
<?php echo $strDisplayPDF; ?>&nbsp;:<br /> <?php echo $strDisplayPDF; ?>&nbsp;:<br />
<input type="checkbox" name="show_grid" id="show_grid_opt" /> <input type="checkbox" name="show_grid" id="show_grid_opt" />
<label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br /> <label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
<input type="checkbox" name="show_color" id="show_color_opt" checked="checked" /> <input type="checkbox" name="show_color" id="show_color_opt" checked="checked" />
<label for="show_color_opt"><?php echo $strShowColor; ?></label><br /> <label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
<input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" /> <input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" />
<label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br /> <label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />
<input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" /> <input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" />
<label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label> <label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label>
&nbsp;&nbsp;<input type="submit" value="<?php echo $strGo; ?>" /> &nbsp;&nbsp;<input type="submit" value="<?php echo $strGo; ?>" />
</form> </form>
<?php <?php
} } // end if
} // end if ($cfgRelation['pdfwork']) } // end if ($cfgRelation['pdfwork'])

View File

@@ -29,9 +29,9 @@ $cfgRelation = PMA_getRelationsParam();
* complain ;-) * complain ;-)
*/ */
if (!$cfgRelation['allworks']) { if (!$cfgRelation['allworks']) {
echo '<font color="red">' . $strError . '</font><br />'; echo '<font color="red">' . $strError . '</font><br />' . "\n";
$urltogoto = '<a href="'.$cfg['PmaAbsoluteUri'].'chk_rel.php3?'.$url_query.'">'; $url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php3?' . $url_query . '">';
echo sprintf($strRelationNotWorking,$urltogoto,'</a>'); echo sprintf($strRelationNotWorking, $url_to_goto, '</a>') . "\n";
} }
@@ -371,20 +371,23 @@ class PMA_RT_Table
* *
* @param boolean Whether to display table position or not * @param boolean Whether to display table position or not
* @param integer The font size * @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 PDF document
* @global object The current relation table object
* *
* @access private * @access private
* *
* @see PMA_PDF * @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; global $pdf, $rt;
if(isset($rt->tablewidth)&& $rt->tablewidth>0 && $same_wide==1){ if (isset($rt->tablewidth) && $rt->tablewidth > 0 && $same_wide == 1){
$this->width=$rt->tablewidth; $this->width = $rt->tablewidth;
} }
$pdf->PMA_PDF_setXyScale($this->x, $this->y); $pdf->PMA_PDF_setXyScale($this->x, $this->y);
$pdf->SetFont($ff, 'B'); $pdf->SetFont($ff, 'B');
$pdf->SetTextColor(200); $pdf->SetTextColor(200);
@@ -425,6 +428,7 @@ class PMA_RT_Table
* @param integer The font size * @param integer The font size
* *
* @global object The current PDF document * @global object The current PDF document
* @global object The current relation table object
* @global integer The current page number (from the * @global integer The current page number (from the
* $cfg['Servers'][$i]['table_coords'] table) * $cfg['Servers'][$i]['table_coords'] table)
* @global array The relations settings * @global array The relations settings
@@ -437,7 +441,7 @@ class PMA_RT_Table
*/ */
function PMA_RT_Table($table_name, $ff) 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; $this->table_name = $table_name;
$sql = 'DESCRIBE ' . PMA_backquote($table_name); $sql = 'DESCRIBE ' . PMA_backquote($table_name);
@@ -453,9 +457,10 @@ class PMA_RT_Table
//height and width //height and width
$this->PMA_RT_Table_setWidth($ff); $this->PMA_RT_Table_setWidth($ff);
$this->PMA_RT_Table_setHeight(); $this->PMA_RT_Table_setHeight();
if($rt->tablewidth<$this->width){ if ($rt->tablewidth < $this->width) {
$rt->tablewidth=$this->width; $rt->tablewidth = $this->width;
} }
//x and y //x and y
$sql = 'SELECT x, y FROM ' $sql = 'SELECT x, y FROM '
. PMA_backquote($cfgRelation['table_coords']) . PMA_backquote($cfgRelation['table_coords'])
@@ -774,7 +779,7 @@ class PMA_RT
{ {
reset($this->tables); reset($this->tables);
while (list(, $table) = each($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 } // 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 display table position or not
* @param boolean Whether to use one color per relation or not * @param boolean Whether to use one color per relation or not
* @param boolean Whether to draw grids 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 object The current PDF document
* @global string The current db name * @global string The current db name
@@ -824,9 +830,10 @@ class PMA_RT
global $pdf, $db, $cfgRelation;; global $pdf, $db, $cfgRelation;;
// Font face depends on the current language // 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; $this->same_wide = $all_tab_same_wide;
// Initializes a new document
// Initializes a new document
$pdf = new PMA_PDF('L'); $pdf = new PMA_PDF('L');
$pdf->title = sprintf($GLOBALS['strPdfDbSchema'], $GLOBALS['db'], $which_rel); $pdf->title = sprintf($GLOBALS['strPdfDbSchema'], $GLOBALS['db'], $which_rel);
$pdf->cMargin = 0; $pdf->cMargin = 0;
@@ -871,9 +878,8 @@ class PMA_RT
} else { } else {
reset ($alltables); reset ($alltables);
while (list(, $table) = each ($alltables)) { while (list(, $table) = each ($alltables)) {
$this->tables[$table] = new PMA_RT_Table($table, $this->ff); $this->tables[$table] = new PMA_RT_Table($table, $this->ff);
$curr_table_obj =&$this->tables[$table]; $this->PMA_RT_setMinMax($this->tables[$table]);
$this->PMA_RT_setMinMax($curr_table_obj);
} }
$norelations = TRUE; $norelations = TRUE;
} // end if... else... } // end if... else...