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/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 <rabus@users.sourceforge.net>
* libraries/common.lib.php3, libraries/config_import.lib.php3: Added

View File

@@ -556,7 +556,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<dt>
<a name="pmadb"></a>
<b>$cfg['Servers'][$i]['pmadb']</b> string</dt>
<b>$cfg['Servers'][$i]['pmadb']</b> string
</dt>
<dd>
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') . '://'
<dt>
<a name="col_com"></a>
<b>$cfg['Servers'][$i]['column_comments']</b> string</dt>
<b>$cfg['Servers'][$i]['column_comments']</b> string
</dt>
<dd>
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;.
@@ -1340,18 +1342,20 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<br /><br />
</dd>
<dt><b>$cfg['PmaNoRelation_DisableWarning']</b> bool</dt>
<dt><b>$cfg['PmaNoRelation_DisableWarning']</b> boolean</dt>
<dd>
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 <a href="#pmadb">$cfg['Servers'][$i]['pmadb']</a>) 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.<br />
If you do not want to use those features set this variable to TRUE
to stop this Message from appearing.<br /><br />
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
<a class="navigation" href="#pmadb">$cfg['Servers'][$i]['pmadb']</a>).
Its contents and use will be explained further down.<br />
If you tried to set this up and it does not work for you have a look on
the &quot;Structure&quot; 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.<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>
</dl>

View File

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

View File

@@ -449,11 +449,12 @@ echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n";
</li>
<?php
if($num_tables>0 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE){
echo '<font color="red">' . $strError . '</font><br />';
$urltogoto = '<a href="'.$cfg['PmaAbsoluteUri'].'chk_rel.php3?'.$url_query.'">';
echo sprintf($strRelationNotWorking,$urltogoto,'</a>');
}
if ($num_tables > 0
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
echo '<font color="red">' . $strError . '</font><br />' . "\n";
$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?
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.
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'])) {

View File

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

View File

@@ -29,9 +29,9 @@ $cfgRelation = PMA_getRelationsParam();
* complain ;-)
*/
if (!$cfgRelation['allworks']) {
echo '<font color="red">' . $strError . '</font><br />';
$urltogoto = '<a href="'.$cfg['PmaAbsoluteUri'].'chk_rel.php3?'.$url_query.'">';
echo sprintf($strRelationNotWorking,$urltogoto,'</a>');
echo '<font color="red">' . $strError . '</font><br />' . "\n";
$url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php3?' . $url_query . '">';
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 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...