diff --git a/tbl_printview.php3 b/tbl_printview.php3 index 29a8d4519..cbf1926c0 100755 --- a/tbl_printview.php3 +++ b/tbl_printview.php3 @@ -9,12 +9,18 @@ if (!isset($selected_tbl)) { include('./libraries/grab_globals.lib.php3'); include('./header.inc.php3'); } -require('./libraries/relation.lib.php3'); -$cfgRelation = PMA_getRelationsParam(); + +/** + * Gets the relations settings + */ +require('./libraries/relation.lib.php3'); +$cfgRelation = PMA_getRelationsParam(); if ($cfgRelation['commwork']) { - $comments = getComments($db,$table); + $comments = getComments($db, $table); } + + /** * Defines the url to return to in case of error in a sql statement */ @@ -60,15 +66,14 @@ if ($multi_tables) { echo ''. $strShowTables . ' : ' . $tbl_list . '' . "\n"; echo '
' . "\n"; } // end if -reset($the_tables); -$tablecount = count($the_tables); +$tables_cnt = count($the_tables); reset($the_tables); -$counter = 0; +$counter = 0; while (list($key, $table) = each($the_tables)) { $table = urldecode($table); - if($counter+1>=$tablecount) { + if ($counter + 1 >= $tables_cnt) { $breakstyle = ''; } else { $breakstyle = ' style="page-break-after: always;"'; @@ -141,6 +146,7 @@ while (list($key, $table) = each($the_tables)) { mysql_free_result($result); } + /** * Gets fields properties */ @@ -148,12 +154,11 @@ while (list($key, $table) = each($the_tables)) { $result = PMA_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) - - if ( $cfgRelation['relation']) { + // Check if we can use Relations (Mike Beck) + if ($cfgRelation['relation']) { // Find which tables are related with the current one and write it in // an array - $res_rel = getForeigners($db,$table); + $res_rel = getForeigners($db, $table); if (count($res_rel) > 0) { $have_rel = TRUE; @@ -188,7 +193,7 @@ while (list($key, $table) = each($the_tables)) { if ($have_rel) { echo '' . ucfirst($strLinksTo) . ''; } - if($cfgRelation['commwork']) { + if ($cfgRelation['commwork']) { echo '' . ucfirst($strComments) . ''; } echo "\n"; diff --git a/tbl_properties.php3 b/tbl_properties.php3 index d5d7db388..10b0c6433 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -30,7 +30,8 @@ if (isset($show_query) && $show_query == 'y') { } unset($sql_query); -/* + +/** * Get the list and number of fields */ $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table); @@ -46,13 +47,14 @@ else { mysql_free_result($result); } + /** * Work on the table */ // loic1: defines wether file upload is available or not // lem9: we should check if PHP 4.0.0 really implements the "file_uploads" // variable, because I got a support request and his 4.0.0 did not have it - + $is_upload = (PMA_PHP_INT_VERSION >= 40000 && function_exists('ini_get')) ? ((strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) && intval(ini_get('upload_max_filesize'))) // loic1: php 3.0.15 and lower bug -> always enabled @@ -80,15 +82,16 @@ require('./tbl_properties_table_info.php3'); - -
+' . htmlspecialchars($fields_list[$i]) . '' . "\n"; +} +?> + + +