diff --git a/www/pages/api.php b/www/pages/api.php index b8091b960..820f5c7c6 100644 --- a/www/pages/api.php +++ b/www/pages/api.php @@ -115,20 +115,11 @@ if ($uid != '') { $releases = new Releases(['Settings' => $page->settings]); -if (isset($_GET['extended']) && $_GET['extended'] == 1) { - $page->smarty->assign('extended', '1'); -} -if (isset($_GET['del']) && $_GET['del'] == 1) { - $page->smarty->assign('del', '1'); -} +$page->smarty->assign('extended', (isset($_GET['extended']) && $_GET['extended'] == 1 ? '1' : '0')); +$page->smarty->assign('del', (isset($_GET['del']) && $_GET['del'] == 1 ? '1' : '0')); // Output is either json or xml. -$outputXML = true; -if (isset($_GET['o'])) { - if ($_GET['o'] == 'json') { - $outputXML = false; - } -} +$outputXML = (isset($_GET['o']) && $_GET['o'] == 'json' ? false : true); switch ($function) { // Search releases. diff --git a/www/templates/nntmux/views/frontend/apiresult.tpl b/www/templates/nntmux/views/frontend/apiresult.tpl index c3ea28b5d..b23c6444f 100644 --- a/www/templates/nntmux/views/frontend/apiresult.tpl +++ b/www/templates/nntmux/views/frontend/apiresult.tpl @@ -29,10 +29,10 @@ {/foreach} - {if $release.coverurl != ""} + {if isset($release.coverurl) && $release.coverurl != ""} {/if} - {if $extended=="1"} + {if $extended == "1"} {if $release.season != ""} diff --git a/www/templates/nntmux/views/frontend/forgottenpassword.tpl b/www/templates/nntmux/views/frontend/forgottenpassword.tpl index c0f6c9087..832275407 100644 --- a/www/templates/nntmux/views/frontend/forgottenpassword.tpl +++ b/www/templates/nntmux/views/frontend/forgottenpassword.tpl @@ -4,11 +4,11 @@ {if $error != ''}
{$error}
{/if} -{if $notice != ''} +{if isset($notice) && $notice != ''}
{$notice}
{/if} -{if $confirmed == '' && $sent == ''} +{if isset($confirmed) && $confirmed == '' && isset($sent) && $sent == ''}

Please enter the email address you used to register and we will send an email to reset your password. If you cannot remember your email, or no longer have access to it, please contact us.