coding standards
This commit is contained in:
@@ -9,12 +9,18 @@ if (!isset($selected_tbl)) {
|
||||
include('./libraries/grab_globals.lib.php3');
|
||||
include('./header.inc.php3');
|
||||
}
|
||||
require('./libraries/relation.lib.php3');
|
||||
|
||||
|
||||
/**
|
||||
* Gets the relations settings
|
||||
*/
|
||||
require('./libraries/relation.lib.php3');
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['commwork']) {
|
||||
$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 '<b>'. $strShowTables . ' : ' . $tbl_list . '</b>' . "\n";
|
||||
echo '<hr />' . "\n";
|
||||
} // end if
|
||||
reset($the_tables);
|
||||
|
||||
$tablecount = count($the_tables);
|
||||
$tables_cnt = count($the_tables);
|
||||
reset($the_tables);
|
||||
$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,8 +154,7 @@ 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)
|
||||
|
||||
// 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
|
||||
|
@@ -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,6 +47,7 @@ else {
|
||||
mysql_free_result($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Work on the table
|
||||
*/
|
||||
@@ -83,7 +85,8 @@ require('./tbl_properties_table_info.php3');
|
||||
<?php
|
||||
echo "\n";
|
||||
for ($i = 0 ; $i < $fields_cnt; $i++) {
|
||||
echo ' <option value="' . urlencode($fields_list[$i]) . '">' . htmlspecialchars($fields_list[$i]) . '</option>' . "\n";
|
||||
echo ' '
|
||||
. '<option value="' . urlencode($fields_list[$i]) . '">' . htmlspecialchars($fields_list[$i]) . '</option>' . "\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
@@ -26,9 +26,15 @@ $err_url = 'tbl_properties.php3'
|
||||
. '&table=' . urlencode($table);
|
||||
|
||||
|
||||
/**
|
||||
* Ensures the database and the table exist (else move to the "parent" script)
|
||||
*/
|
||||
require('./libraries/db_table_exists.lib.php3');
|
||||
|
||||
// Displays headers
|
||||
|
||||
/**
|
||||
* Displays headers
|
||||
*/
|
||||
if (!isset($message)) {
|
||||
$js_to_run = 'functions.js';
|
||||
include('./header.inc.php3');
|
||||
@@ -36,6 +42,7 @@ if (!isset($message)) {
|
||||
PMA_showMessage($message);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set parameters for links
|
||||
*/
|
||||
|
Reference in New Issue
Block a user