From: Andrew Dolgov Date: Wed, 6 Feb 2013 16:13:44 +0000 (+0400) Subject: new version dialog: display error when no version info available X-Git-Tag: 1.7.0~11 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ed47e3c418a8d23403ea10c433cbcd017cb877be;p=tt-rss.git new version dialog: display error when no version info available --- diff --git a/classes/dlg.php b/classes/dlg.php index 30dfa1ce..74eb9f63 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -585,26 +585,42 @@ class Dlg extends Handler_Protected { $version = $version_data['version']; $id = $version_data['version_id']; - print "
"; + if ($version && $id) { + print "
"; - print T_sprintf("New version of Tiny Tiny RSS is available (%s).", - "$version"); + print T_sprintf("New version of Tiny Tiny RSS is available (%s).", + "$version"); - print "
"; + print "
"; - $details = "http://tt-rss.org/redmine/versions/$id"; - $download = "http://tt-rss.org/#Download"; + $details = "http://tt-rss.org/redmine/versions/$id"; + $download = "http://tt-rss.org/#Download"; - print "

".__("You can update using built-in updater in the Preferences or by using update.php")."

"; + print "

".__("You can update using built-in updater in the Preferences or by using update.php")."

"; - print "
"; - print ""; - print ""; - print ""; + print "
"; + print ""; + print ""; + print ""; + + } else { + print "
"; + + print "

".__("Error receiving version information or no new version available.")."

"; + + print "
"; + + print "
"; + print ""; + print "
"; + + } print "
"; }