Mercurial > hg > fapweb
changeset 802:e5bbb01f2dd4
Improve error handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 22 Nov 2014 23:29:23 +0200 |
parents | 736a78005a64 |
children | ddb30c989b47 |
files | showajax.php |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/showajax.php Sat Nov 22 00:45:15 2014 +0200 +++ b/showajax.php Sat Nov 22 23:29:23 2014 +0200 @@ -233,16 +233,18 @@ "SELECT * FROM compos WHERE id=%d", $compo_id)); - $prev = stFetchSQL(stPrepareSQL( - "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d AND show_id<>0", - $compo_id, stGetDisplayVar("compoPrevEntry"))); + if ($compo !== false) + { + $prev = stFetchSQL(stPrepareSQL( + "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d AND show_id<>0", + $compo_id, stGetDisplayVar("compoPrevEntry"))); - $entry = stFetchSQL(stPrepareSQL( - "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d AND show_id<>0", - $compo_id, stGetDisplayVar("compoCurrEntry"))); + $entry = stFetchSQL(stPrepareSQL( + "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d AND show_id<>0", + $compo_id, stGetDisplayVar("compoCurrEntry"))); - if ($compo !== false) stPrintCompoSlide($compo, $entry, $prev); + } break; default: