coding standards, comments...

This commit is contained in:
Loïc Chapeaux
2002-06-01 16:31:17 +00:00
parent 3060f40b9e
commit 263829ffb3
3 changed files with 17 additions and 15 deletions

View File

@@ -24,7 +24,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
* no delete link...);
* - the next characters are boolean values (1/0) and respectively stand
* for sorting links, navigation bar, "insert a new row" link, the
* bookmark feature and the expand/collapse text/blob fields button.
* bookmark feature, the expand/collapse text/blob fields button and
* the "display printable view" option.
* Of course '0'/'1' means the feature won't/will be enabled.
*
* @param string the synthetic value for display_mode (see <20>1 a few
@@ -139,13 +140,13 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
// TODO: May be problematic with same fields names in
// two joined table.
// $do_display['sort_lnk'] = (string) '0';
$do_display['ins_row'] = (string) '0';
$do_display['ins_row'] = (string) '0';
if ($do_display['text_btn'] == '1') {
break;
}
} // end if (2.3.2)
// 2.3.3 Always display print view link
$do_display['pview_lnk'] = (string) '1';
$do_display['pview_lnk'] = (string) '1';
$prev_table = $fields_meta[$i]->table;
} // end for
} // end if..elseif...else (2.1 -> 2.3)
@@ -798,7 +799,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if ($GLOBALS['cfg']['BrowseMarkerColor'] != '') {
$on_mouse .= ' onmousedown="setPointer(this, ' . $row_no . ', \'click\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\')"';
}
}
} // end if
?>
<tr<?php echo $on_mouse; ?>>
<?php
@@ -1344,7 +1345,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
// 2. ----- Displays the top of the page -----
// 2.1 Displays a messages with position informations
if ($is_display['nav_bar'] == '1' && isset($pos_next) && (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1')) {
if ($is_display['nav_bar'] == '1' && isset($pos_next)) {
if (isset($unlim_num_rows) && $unlim_num_rows != $total) {
$selectstring = ', ' . $unlim_num_rows . ' ' . $GLOBALS['strSelectNumRows'];
} else {

View File

@@ -27,16 +27,16 @@ $FPDF_font_path = './libraries/fpdf/font/';
*/
if (PMA_PHP_INT_VERSION < 40005) {
function array_search($needle, $haystack) {
$match = FALSE;
$match = FALSE;
reset($haystack);
while (list($key, $value) = each($haystack)) {
if ($value == $needle) {
$match = $key;
}
} // end while
if ($value == $needle) {
$match = $key;
}
} // end while
return $match;
return $match;
} // end of the "array_search" function
} // end if

View File

@@ -412,7 +412,8 @@ else {
PMA_displayTable($result, $disp_mode);
mysql_free_result($result);
if ($disp_mode[6] == '1' || $disp_mode[9] =='1') {
if ($disp_mode[6] == '1' || $disp_mode[9] == '1') {
echo "\n";
echo '<p>' . "\n";
// Displays "Insert a new row" link if required
@@ -446,7 +447,7 @@ else {
echo "\n";
} // end insert new row
// Displays "print view" link if required
// Displays "printable view" link if required
if ($disp_mode[9] == '1') {
$url_query = '?lang=' . $lang
. '&amp;server=' . $server
@@ -460,8 +461,8 @@ else {
. (($dontlimitchars == '1') ? '&amp;dontlimitchars=1' : '')
. '&amp;sql_query=' . urlencode($sql_query);
echo ' <!-- Print view -->' . "\n"
. ' <a href="sql.php3' . $url_query . '" target="_blank">' . $strPrintView . '</a>' . "\n";
}
. ' <a href="sql.php3' . $url_query . '" target="print_view">' . $strPrintView . '</a>' . "\n";
} // end displays "printable view"
echo '</p>' . "\n";
}