Coding style

This commit is contained in:
Michal Čihař 2011-07-21 13:18:46 +02:00
parent a7b1a56b28
commit 07487b01b4

View File

@ -80,11 +80,10 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
$do_display['bkm_form'] = (string) '0';
$do_display['text_btn'] = (string) '0';
$do_display['pview_lnk'] = (string) '0';
}
// 2.1 Statement is a "SELECT COUNT", a
// "CHECK/ANALYZE/REPAIR/OPTIMIZE", an "EXPLAIN" one or
// contains a "PROC ANALYSE" part
elseif ($GLOBALS['is_count'] || $GLOBALS['is_analyse'] || $GLOBALS['is_maint'] || $GLOBALS['is_explain']) {
} elseif ($GLOBALS['is_count'] || $GLOBALS['is_analyse'] || $GLOBALS['is_maint'] || $GLOBALS['is_explain']) {
$do_display['edit_lnk'] = 'nn'; // no edit link
$do_display['del_lnk'] = 'nn'; // no delete link
$do_display['sort_lnk'] = (string) '0';
@ -97,9 +96,8 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
$do_display['text_btn'] = (string) '0';
}
$do_display['pview_lnk'] = (string) '1';
}
// 2.2 Statement is a "SHOW..."
elseif ($GLOBALS['is_show']) {
} elseif ($GLOBALS['is_show']) {
/**
* 2.2.1
* @todo defines edit/delete links depending on show statement
@ -120,11 +118,10 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
$do_display['bkm_form'] = (string) '1';
$do_display['text_btn'] = (string) '1';
$do_display['pview_lnk'] = (string) '1';
}
// 2.3 Other statements (ie "SELECT" ones) -> updates
// $do_display['edit_lnk'], $do_display['del_lnk'] and
// $do_display['text_btn'] (keeps other default values)
else {
} else {
$prev_table = $fields_meta[0]->table;
$do_display['text_btn'] = (string) '1';
for ($i = 0; $i < $GLOBALS['fields_cnt']; $i++) {
@ -310,7 +307,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
$pageNow = @floor($_SESSION['tmp_user_values']['pos'] / $_SESSION['tmp_user_values']['max_rows']) + 1;
$nbTotalPage = @ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows']);
if ($nbTotalPage > 1){ //if2
if ($nbTotalPage > 1) { //if2
?>
<td>
<?php
@ -388,7 +385,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
} // end move toward
// show separator if pagination happen
if ($nbTotalPage > 1){
if ($nbTotalPage > 1) {
echo '<td><div class="navigation_separator">|</div></td>';
}
?>