From 24d68bed062ae2c953ee4c6defc6145de2d11ac6 Mon Sep 17 00:00:00 2001 From: nikrou Date: Wed, 23 Jun 2010 18:35:21 +0000 Subject: Fix bug 1743 : comment form is not visible because of boolean management merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6592 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/dblayer/functions_pgsql.inc.php | 4 ++++ picture.php | 1 + 2 files changed, 5 insertions(+) diff --git a/include/dblayer/functions_pgsql.inc.php b/include/dblayer/functions_pgsql.inc.php index 3c68f7816..a9f033fc3 100644 --- a/include/dblayer/functions_pgsql.inc.php +++ b/include/dblayer/functions_pgsql.inc.php @@ -512,6 +512,10 @@ function boolean_to_string($var) { return $var ? 'true' : 'false'; } + elseif ($var=='t' || $var=='f') + { + return ($var=='t') ? 'true' : 'false'; + } else { return $var; diff --git a/picture.php b/picture.php index 80679b19f..9b94d8c73 100644 --- a/picture.php +++ b/picture.php @@ -410,6 +410,7 @@ $result = pwg_query($query); $related_categories = array(); while ($row = pwg_db_fetch_assoc($result)) { + $row['commentable'] = boolean_to_string($row['commentable']); array_push($related_categories, $row); } usort($related_categories, 'global_rank_compare'); -- cgit v1.2.3