Mercurial > hg > mgallery
changeset 75:441d5338960e
Image control not needed when prev/next image does not exist.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 14 Sep 2016 17:33:55 +0300 |
parents | f2ba5a9f0aa8 |
children | f2e923f84e1b |
files | mgallery.php |
diffstat | 1 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mgallery.php Wed Sep 14 17:33:14 2016 +0300 +++ b/mgallery.php Wed Sep 14 17:33:55 2016 +0300 @@ -191,17 +191,16 @@ { global $galTNPath; - $img = "<div class=\"imageCtrl ".$class."\">"; - if ($url !== FALSE) { - $img .= - "<a href=\"".$url."\"><img src=\"". - mgGetImageURL($galTNPath, $galIndex[$index]). - "\" alt=\"".$galIndex[$index]."\" /></a>"; + return + "<div class=\"imageCtrl ".$class."\">". + "<a href=\"".$url."\"><img src=\"". + mgGetImageURL($galTNPath, $galIndex[$index]). + "\" alt=\"".$galIndex[$index]."\" /></a></div>\n"; } - - return $img."</div>\n"; + else + return ""; }