From: Andrew Dolgov Date: Sun, 20 Aug 2006 04:31:22 +0000 (+0100) Subject: implement new version checking (2) X-Git-Tag: schema_freeze_for_1.2.2_(take_2)~16 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=da412ad3befdc3aadcd1ec2c9fc0bf8242ca0827;p=tt-rss.git implement new version checking (2) --- diff --git a/functions.php b/functions.php index b62f27ea..546a5f1d 100644 --- a/functions.php +++ b/functions.php @@ -2375,9 +2375,9 @@ if (!$items || !is_array($items)) $items = $rss->entries; if (!$items || !is_array($items)) $items = $rss; - if (!is_array($items)) { + if (!is_array($items) || count($items) == 0) { return; - } + } $last_item = $items[0]; @@ -2386,10 +2386,10 @@ $release_url = $last_item["link"]; - if ($cur_version != $last_version) { + if ($cur_version == $last_version) { return "
- New version of Tiny-Tiny RSS is available.
"; - } + New version of Tiny-Tiny RSS ($last_version) is available."; + } } } ?>