diff --git a/ChangeLog b/ChangeLog index f7095087b..9b8eb0129 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-04-23 Marc Delisle + * tbl_printview.php3, lang/*.php3: Relation links in printview, + thanks to Mike Beck (mike.beck at ibmiller.de) + 2002-04-23 Alexander M. Turek * libraries/common.lib.php3: fixed bug #547605 using Loïc's patch. diff --git a/lang/arabic.inc.php3 b/lang/arabic.inc.php3 index 2c863197a..22e5a7b33 100644 --- a/lang/arabic.inc.php3 +++ b/lang/arabic.inc.php3 @@ -354,4 +354,5 @@ $strZip = '"zipped" " // To translate $strCardinality = 'Cardinality'; -?> \ No newline at end of file +$strLinksTo = 'Links to'; //to translate +?> diff --git a/lang/brazilian_portuguese.inc.php3 b/lang/brazilian_portuguese.inc.php3 index 4fd34fc05..9f7325b0c 100644 --- a/lang/brazilian_portuguese.inc.php3 +++ b/lang/brazilian_portuguese.inc.php3 @@ -348,4 +348,5 @@ $strZip = '"compactado com zip"'; $strBookmarkDeleted = 'The bookmark has been deleted.'; $strChangePassword = 'Change password'; //to translate $strPmaUriError = 'The $cfgPmaAbsoluteUri directive MUST be set in your configuration file!'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/bulgarian-koi8.inc.php3 b/lang/bulgarian-koi8.inc.php3 index 82797cb34..959c8c5af 100644 --- a/lang/bulgarian-koi8.inc.php3 +++ b/lang/bulgarian-koi8.inc.php3 @@ -353,4 +353,5 @@ $strYes = ' $strZip = '"zip-ÎÁÔÏ"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/bulgarian-win1251.inc.php3 b/lang/bulgarian-win1251.inc.php3 index 55aca6efa..9698c1ef3 100644 --- a/lang/bulgarian-win1251.inc.php3 +++ b/lang/bulgarian-win1251.inc.php3 @@ -353,4 +353,5 @@ $strYes = ' $strZip = '"zip-íàòî"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/catala.inc.php3 b/lang/catala.inc.php3 index 7540330ba..c7863d191 100644 --- a/lang/catala.inc.php3 +++ b/lang/catala.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Si'; $strZip = '"comprimit amb zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/chinese_big5.inc.php3 b/lang/chinese_big5.inc.php3 index 4d1a8d34a..cc3600a12 100644 --- a/lang/chinese_big5.inc.php3 +++ b/lang/chinese_big5.inc.php3 @@ -350,4 +350,5 @@ $strYes = ' $strZip = '"zipped"'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/chinese_gb.inc.php3 b/lang/chinese_gb.inc.php3 index 2d12221f5..05e2c516a 100644 --- a/lang/chinese_gb.inc.php3 +++ b/lang/chinese_gb.inc.php3 @@ -346,4 +346,5 @@ $strWrongUser = ' $strYes = 'ÊÇ'; $strZip = '"zipped"'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/czech-iso.inc.php3 b/lang/czech-iso.inc.php3 index d70a70118..1a940fab5 100644 --- a/lang/czech-iso.inc.php3 +++ b/lang/czech-iso.inc.php3 @@ -349,4 +349,5 @@ $strYes = 'Ano'; $strZip = '"zazipováno"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/czech-win1250.inc.php3 b/lang/czech-win1250.inc.php3 index cf14c5db8..0462bd7f2 100644 --- a/lang/czech-win1250.inc.php3 +++ b/lang/czech-win1250.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Ano'; $strZip = '"zazipováno"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/danish.inc.php3 b/lang/danish.inc.php3 index 8a011937e..e8fd77e62 100644 --- a/lang/danish.inc.php3 +++ b/lang/danish.inc.php3 @@ -347,4 +347,5 @@ $strYes = 'Ja'; $strZip = '"zipped"'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/dutch.inc.php3 b/lang/dutch.inc.php3 index e49cb75c1..658b782fe 100644 --- a/lang/dutch.inc.php3 +++ b/lang/dutch.inc.php3 @@ -345,4 +345,5 @@ $strWrongUser = 'Verkeerde gebruikersnaam/wachtwoord. Toegang geweigerd.'; $strYes = 'Ja'; $strZip = '"Gezipt"'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/english.inc.php3 b/lang/english.inc.php3 index 3a9f0a74d..40f85d1da 100644 --- a/lang/english.inc.php3 +++ b/lang/english.inc.php3 @@ -172,6 +172,7 @@ $strLimitNumRows = 'Number of rows per page'; $strLineFeed = 'Linefeed: \\n'; $strLines = 'Lines'; $strLinesTerminatedBy = 'Lines terminated by'; +$strLinksTo = 'Links to'; $strLocationTextfile = 'Location of the textfile'; $strLogin = 'Login'; $strLogout = 'Log out'; diff --git a/lang/estonian.inc.php3 b/lang/estonian.inc.php3 index eb810931d..087874024 100644 --- a/lang/estonian.inc.php3 +++ b/lang/estonian.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Jah'; $strZip = '"zipitud"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/finnish.inc.php3 b/lang/finnish.inc.php3 index d5c098d76..6bd767aff 100644 --- a/lang/finnish.inc.php3 +++ b/lang/finnish.inc.php3 @@ -352,4 +352,5 @@ $strYes = 'Kyll $strZip = '"zip-pakattu"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/french.inc.php3 b/lang/french.inc.php3 index 23a3efbdf..5f1a67053 100644 --- a/lang/french.inc.php3 +++ b/lang/french.inc.php3 @@ -172,6 +172,7 @@ $strLimitNumRows = 'Nombre d\'enregistrements par page'; $strLineFeed = 'Saut de ligne : \\n'; $strLines = 'Lignes'; $strLinesTerminatedBy = 'Lignes terminées par'; +$strLinksTo = 'Relié à'; $strLocationTextfile = 'Emplacement du fichier texte'; $strLogin = 'Entrer'; $strLogout = 'Quitter'; diff --git a/lang/galician.inc.php3 b/lang/galician.inc.php3 index 950b742ed..0cd9f5eb2 100644 --- a/lang/galician.inc.php3 +++ b/lang/galician.inc.php3 @@ -352,4 +352,5 @@ $strYes = 'Si'; $strZip = 'comprimido no formato "zipped"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/georgian.inc.php3 b/lang/georgian.inc.php3 index 881fce0d5..a1a514a23 100644 --- a/lang/georgian.inc.php3 +++ b/lang/georgian.inc.php3 @@ -357,4 +357,5 @@ $strNoIndexPartsDefined = 'No index parts defined!'; $strPrimaryKeyHasBeenDropped = 'The primary key has been dropped'; $strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!'; $strPrimaryKeyWarning = '("PRIMARY" must be the name of and only of a primary key!)'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/german.inc.php3 b/lang/german.inc.php3 index 69f924fbc..664f8b5f1 100644 --- a/lang/german.inc.php3 +++ b/lang/german.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Ja'; $strZip = '"Zip komprimiert"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/greek.inc.php3 b/lang/greek.inc.php3 index 51db7044e..15ef0a968 100644 --- a/lang/greek.inc.php3 +++ b/lang/greek.inc.php3 @@ -349,4 +349,5 @@ $strYes = ' $strZip = 'óõìðßåóç «zip»'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/hebrew.inc.php3 b/lang/hebrew.inc.php3 index e5d190fd7..9e4f71279 100644 --- a/lang/hebrew.inc.php3 +++ b/lang/hebrew.inc.php3 @@ -348,4 +348,5 @@ $strYes = ' $strZip = '"Zipped"'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/hungarian.inc.php3 b/lang/hungarian.inc.php3 index 4e4c392f0..60676b427 100644 --- a/lang/hungarian.inc.php3 +++ b/lang/hungarian.inc.php3 @@ -349,5 +349,6 @@ $strYes = 'Igen'; $strZip = '"zippel tömörítve"'; // To translate -?> +$strLinksTo = 'Links to'; //to translate +?> diff --git a/lang/indonesian.inc.php3 b/lang/indonesian.inc.php3 index 0220596c1..6f717fb63 100644 --- a/lang/indonesian.inc.php3 +++ b/lang/indonesian.inc.php3 @@ -347,4 +347,5 @@ $strYes = 'Ya'; $strZip = '"Dikompress dengan Zip"'; +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/italian.inc.php3 b/lang/italian.inc.php3 index 3b3473855..ce94265bf 100644 --- a/lang/italian.inc.php3 +++ b/lang/italian.inc.php3 @@ -355,4 +355,5 @@ $strZip = '"compresso con zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/japanese-euc.inc.php3 b/lang/japanese-euc.inc.php3 index fc126f589..282a675ff 100644 --- a/lang/japanese-euc.inc.php3 +++ b/lang/japanese-euc.inc.php3 @@ -357,4 +357,5 @@ $strKanjiEncodConvert = ' $strXkana = 'Á´³Ñ¥«¥Ê¤ØÊÑ´¹¤¹¤ë'; // convert to X208-kana // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/japanese-sjis.inc.php3 b/lang/japanese-sjis.inc.php3 index 7d39670fb..a146f5d8c 100644 --- a/lang/japanese-sjis.inc.php3 +++ b/lang/japanese-sjis.inc.php3 @@ -357,4 +357,5 @@ $strKanjiEncodConvert = ' $strXkana = '‘SŠpƒJƒi‚Ö•ÏŠ·‚·‚é'; // convert to X208-kana // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/korean.inc.php3 b/lang/korean.inc.php3 index bb073436e..cc4dc961d 100644 --- a/lang/korean.inc.php3 +++ b/lang/korean.inc.php3 @@ -349,4 +349,5 @@ $strYes = ' $strZip = 'zip ¾ÐÃà'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/latvian.inc.php3 b/lang/latvian.inc.php3 index 59ceb226b..28a29b609 100644 --- a/lang/latvian.inc.php3 +++ b/lang/latvian.inc.php3 @@ -352,4 +352,5 @@ $strYes = 'J $strZip = 'arhivçts ar zip'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/lithuanian.inc.php3 b/lang/lithuanian.inc.php3 index f742256e3..521f15952 100644 --- a/lang/lithuanian.inc.php3 +++ b/lang/lithuanian.inc.php3 @@ -348,4 +348,5 @@ $strZip = '"zip"'; //to translate: $strReferentialIntegrity = 'Check referential integrity:'; //to translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/norwegian.inc.php3 b/lang/norwegian.inc.php3 index c9463d089..d9dddd0bb 100644 --- a/lang/norwegian.inc.php3 +++ b/lang/norwegian.inc.php3 @@ -347,4 +347,5 @@ $strYes = 'Ja'; $strZip = '"komprimert (zip)"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/polish.inc.php3 b/lang/polish.inc.php3 index d821d6271..100dce717 100644 --- a/lang/polish.inc.php3 +++ b/lang/polish.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Tak'; $strZip = '".zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/portuguese.inc.php3 b/lang/portuguese.inc.php3 index a9aa0e36a..a67d72dfb 100644 --- a/lang/portuguese.inc.php3 +++ b/lang/portuguese.inc.php3 @@ -355,4 +355,5 @@ $strZip = '"Compress // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/romanian.inc.php3 b/lang/romanian.inc.php3 index 236ad9e6d..fbabb116f 100644 --- a/lang/romanian.inc.php3 +++ b/lang/romanian.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Da'; $strZip = '"arhivat"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/russian-koi8.inc.php3 b/lang/russian-koi8.inc.php3 index efccb4b2e..c9f7cb070 100644 --- a/lang/russian-koi8.inc.php3 +++ b/lang/russian-koi8.inc.php3 @@ -353,4 +353,5 @@ $strYes = ' $strZip = 'ÕÐÁËÏ×ÁÔØ × "zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/russian-win1251.inc.php3 b/lang/russian-win1251.inc.php3 index 5dcd22eb5..72c24bf48 100644 --- a/lang/russian-win1251.inc.php3 +++ b/lang/russian-win1251.inc.php3 @@ -353,4 +353,5 @@ $strYes = ' $strZip = 'óïàêîâàòü â "zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/serbian-win1250.inc.php3 b/lang/serbian-win1250.inc.php3 index 2ec2d4a95..6ce223918 100644 --- a/lang/serbian-win1250.inc.php3 +++ b/lang/serbian-win1250.inc.php3 @@ -354,4 +354,5 @@ $strYes = 'Da'; $strZip = '"zip-ovano"'; // To translate -?> \ No newline at end of file +$strLinksTo = 'Links to'; //to translate +?> diff --git a/lang/slovak-iso.inc.php3 b/lang/slovak-iso.inc.php3 index 6a592d5b5..542e447ac 100644 --- a/lang/slovak-iso.inc.php3 +++ b/lang/slovak-iso.inc.php3 @@ -351,4 +351,5 @@ $strZip = '"zo zipovan // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/slovak-win1250.inc.php3 b/lang/slovak-win1250.inc.php3 index 995eb0428..c27bca35d 100644 --- a/lang/slovak-win1250.inc.php3 +++ b/lang/slovak-win1250.inc.php3 @@ -351,4 +351,5 @@ $strZip = '"zozipovan // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/spanish.inc.php3 b/lang/spanish.inc.php3 index 1027e23c2..7980100ad 100644 --- a/lang/spanish.inc.php3 +++ b/lang/spanish.inc.php3 @@ -346,4 +346,5 @@ $strYes = 'Si'; $strZip = '"comprimido con zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/swedish.inc.php3 b/lang/swedish.inc.php3 index 3a1b4d047..0c866a4db 100644 --- a/lang/swedish.inc.php3 +++ b/lang/swedish.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Ja'; $strZip = '"zippad"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/thai.inc.php3 b/lang/thai.inc.php3 index 3e8763009..627108efe 100644 --- a/lang/thai.inc.php3 +++ b/lang/thai.inc.php3 @@ -354,4 +354,5 @@ $strNoIndex = 'No index defined!'; $strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!'; $strPrimaryKeyWarning = '("PRIMARY" must be the name of and only of a primary key!)'; $strReferentialIntegrity = 'Check referential integrity:'; //to translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/turkish.inc.php3 b/lang/turkish.inc.php3 index 2a9411e60..249ec384d 100644 --- a/lang/turkish.inc.php3 +++ b/lang/turkish.inc.php3 @@ -348,4 +348,5 @@ $strYes = 'Evet'; $strZip = '"ziplenmiþ"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/lang/ukrainian-win1251.inc.php3 b/lang/ukrainian-win1251.inc.php3 index b1c4a9195..25bc41d9d 100644 --- a/lang/ukrainian-win1251.inc.php3 +++ b/lang/ukrainian-win1251.inc.php3 @@ -348,4 +348,5 @@ $strYes = ' $strZip = 'çàïàêóâàòè â "zip"'; // To translate +$strLinksTo = 'Links to'; //to translate ?> diff --git a/tbl_printview.php3 b/tbl_printview.php3 index 04bb714c8..2a5059f0a 100755 --- a/tbl_printview.php3 +++ b/tbl_printview.php3 @@ -134,6 +134,35 @@ while (list($key, $table) = each($the_tables)) { $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); $fields_cnt = mysql_num_rows($result); + // check if we can use Relations (Mike Beck) + $rel_work=FALSE; + $rel_query = 'SHOW TABLES'; + $tables = @mysql_query($rel_query) or PMA_mysqlDie('', $rel_query, '', $err_url); + while($ctable = @mysql_fetch_array($tables)){ + if($ctable[0] == $cfgServer['relation']){ + $rel_work=TRUE; + } + } + if($rel_work){ + unset($res_rel); + // Find which tables are related with the current one and write it in an array + $rel_query = 'SELECT src_column,concat(dest_table,\'->\',dest_column) as rel '; + $rel_query .= 'FROM ' . PMA_backquote($cfgServer['relation']); + $rel_query .= ' WHERE src_table = \'' . urldecode($table) .'\''; + + $relations = @mysql_query($rel_query) or PMA_mysqlDie('', $rel_query, '', $err_url); + while ($relrow = @mysql_fetch_array($relations)){ + $col = $relrow['src_column']; + $res_rel[$col]=$relrow['rel']; + //debug echo "col: ".$col." - ". $relrow['rel']."
"; + } + if(count($res_rel)>0){ + $have_rel=TRUE; + }else{ + $have_rel=FALSE; + } + } + // /** @@ -157,6 +186,11 @@ while (list($key, $table) = each($the_tables)) { + '. ucfirst($strLinksTo).''; + } + ?> ">      + +   +