Skip to content

Commit 7f91f3b

Browse files
committed
Fix for showing user defined fields when they are not there
Also fix for showing when just one country is there
1 parent 0ddeca7 commit 7f91f3b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

classes.inc.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ function get_userdefined()
855855
$globals['logid'] = $this->result['ID'];
856856
$this->userdefined = parse_mysql_query('userdefined.sql');
857857
$count = $globals['sql_num_rows'];
858-
if ($count == '0') {
858+
if ($count == 0) {
859859
$this->userdefined_count = 0;
860860
} else {
861861
$this->userdefined_count = 1;
@@ -4028,7 +4028,12 @@ function get_divecountry_overview_table($sql)
40284028
} else {
40294029
$cpage = $this->requested_page;
40304030
}
4031-
$paged_data = parse_mysql_query('', $countrylist_query);
4031+
$paged_data_temp = parse_mysql_query('', $countrylist_query);
4032+
if (isset($paged_data_temp[0])) {
4033+
$paged_data = $paged_data_temp;
4034+
} else {
4035+
$paged_data[] = $paged_data_temp;
4036+
}
40324037
$t->assign('cells', $paged_data);
40334038
}
40344039
}

0 commit comments

Comments
 (0)