From 9698c80fcff3ca34de0b7bacaaeaec245e264d98 Mon Sep 17 00:00:00 2001 From: rub Date: Fri, 26 Sep 2008 23:58:00 +0000 Subject: Fix issue on AMM plugin when there are no public available. It's necessary to remove status public for a selection of available pictures (public or private) git-svn-id: http://piwigo.org/svn/trunk@2605 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/AMenuManager/amm_pip.class.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/AMenuManager') diff --git a/plugins/AMenuManager/amm_pip.class.inc.php b/plugins/AMenuManager/amm_pip.class.inc.php index 6a195b052..98c9730ec 100644 --- a/plugins/AMenuManager/amm_pip.class.inc.php +++ b/plugins/AMenuManager/amm_pip.class.inc.php @@ -60,10 +60,9 @@ WHERE c.status='public' ORDER BY rndvalue LIMIT 0,1 "; - $result=pwg_query($sql); - if($result) + $result = pwg_query($sql); + if($result and $nfo = mysql_fetch_array($result)) { - $nfo = mysql_fetch_array($result); $nfo['section']='category'; $nfo['category']=array( 'id' => $nfo['catid'], -- cgit v1.2.3