diff --git a/scripts/alertmailer.php b/scripts/alertmailer.php index f252ab051e..fa828aed57 100644 --- a/scripts/alertmailer.php +++ b/scripts/alertmailer.php @@ -19,12 +19,17 @@ function mlog($message) { $text_banner = ''; $html_banner = ''; if ($banner) { - $text_banner = $banner->title . "\n\n" . $banner->content . "\n\n" . $banner->url . "\n\n"; - $link_text = "Read more"; - if (property_exists($banner, 'button_text')) { - $link_text = $banner->button_text; + $text_banner = $banner->title . "\n\n" . $banner->content . "\n\n"; + $html_banner = '

' . $banner->title . "

" . $banner->content . '

'; + + if (property_exists($banner, 'url') && $banner->url) { + $link_text = "Read more"; + if (property_exists($banner, 'button_text')) { + $link_text = $banner->button_text; + } + $text_banner .= $banner->url . "\n\n"; + $html_banner .= '

' . $link_text . '

'; } - $html_banner = '' . $banner->title . "

" . $banner->content . '

' . $link_text . '

'; } $global_start = getmicrotime();