summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-20 05:31:22 +0100
committerAndrew Dolgov <[email protected]>2006-08-20 05:31:22 +0100
commitda412ad3befdc3aadcd1ec2c9fc0bf8242ca0827 (patch)
tree9a74040fc7b171a0c925fac816ac83f9a1c2b217 /functions.php
parentb72c3ef80198f62ef8d7923512570a9520242c98 (diff)
implement new version checking (2)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/functions.php b/functions.php
index b62f27eaf..546a5f1d5 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 "<div class=\"notice\"><a target=\"_new\" href=\"$release_url\">
- New version of Tiny-Tiny RSS is available.</a></div>";
- }
+ New version of Tiny-Tiny RSS ($last_version) is available.</a></div>";
+ }
}
}
?>