tweak new version notification stuff
This commit is contained in:
parent
6906f14591
commit
73495fd16f
|
@ -3699,7 +3699,7 @@
|
||||||
return array($tmp, $headlines_count, $affected_ids, $tmp_t);
|
return array($tmp, $headlines_count, $affected_ids, $tmp_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_for_update($link, $brief_fmt = true) {
|
function check_for_update($link) {
|
||||||
$releases_feed = "http://tt-rss.org/releases.rss";
|
$releases_feed = "http://tt-rss.org/releases.rss";
|
||||||
|
|
||||||
if (!CHECK_FOR_NEW_VERSION || $_SESSION["access_level"] < 10) {
|
if (!CHECK_FOR_NEW_VERSION || $_SESSION["access_level"] < 10) {
|
||||||
|
@ -3753,18 +3753,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version_compare(VERSION, $latest_version) == -1) {
|
if (version_compare(VERSION, $latest_version) == -1) {
|
||||||
if ($brief_fmt) {
|
return sprintf("New version of Tiny-Tiny RSS (%s) is available:",
|
||||||
return format_notice("<a href=\"javascript:showBlockElement('milestoneDetails')\">
|
$latest_version)."<div class='milestoneDetails'>$content</div>";
|
||||||
New version of Tiny-Tiny RSS ($latest_version) is available (click for details)</a>
|
} else {
|
||||||
<div id=\"milestoneDetails\">$content</div>");
|
return false;
|
||||||
} else {
|
}
|
||||||
return "New version of Tiny-Tiny RSS ($latest_version) is available:
|
|
||||||
<div class='milestoneDetails'>$content</div>
|
|
||||||
Visit <a target=\"_blank\" href=\"http://tt-rss.org/\">official site</a> for
|
|
||||||
download and update information.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 625 B |
|
@ -8,10 +8,10 @@
|
||||||
print "<div id=\"infoBoxTitle\">".__('Notice')."</div>";
|
print "<div id=\"infoBoxTitle\">".__('Notice')."</div>";
|
||||||
print "<div class=\"infoBoxContents\">";
|
print "<div class=\"infoBoxContents\">";
|
||||||
|
|
||||||
|
print "<div class=\"errorExplained\">";
|
||||||
|
|
||||||
if ($param == 1) {
|
if ($param == 1) {
|
||||||
print __("Update daemon is enabled in configuration, but daemon
|
print __("Update daemon is enabled in configuration, but daemon process is not running, which prevents all feeds from updating. Please start the daemon process or contact instance owner.");
|
||||||
process is not running, which prevents all feeds from updating. Please
|
|
||||||
start the daemon process or contact instance owner.");
|
|
||||||
|
|
||||||
$stamp = (int)read_stampfile("update_daemon.stamp");
|
$stamp = (int)read_stampfile("update_daemon.stamp");
|
||||||
|
|
||||||
|
@ -20,11 +20,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($param == 2) {
|
if ($param == 2) {
|
||||||
$msg = check_for_update($link, false);
|
$msg = check_for_update($link);
|
||||||
|
|
||||||
if (!$msg) {
|
if (!$msg) {
|
||||||
print __("You are running the latest version of Tiny Tiny RSS. The
|
print __("You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug.");
|
||||||
fact that you are seeing this dialog is probably a bug.");
|
|
||||||
} else {
|
} else {
|
||||||
print $msg;
|
print $msg;
|
||||||
}
|
}
|
||||||
|
@ -32,10 +31,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($param == 3) {
|
if ($param == 3) {
|
||||||
print __("TT-RSS has detected that update daemon is taking too long to
|
print __("Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner.");
|
||||||
perform a feed update. This could indicate a problem like crash
|
|
||||||
or a hang. Please check the daemon process or contact instance
|
|
||||||
owner.");
|
|
||||||
|
|
||||||
$stamp = (int)read_stampfile("update_daemon.stamp");
|
$stamp = (int)read_stampfile("update_daemon.stamp");
|
||||||
|
|
||||||
|
@ -44,14 +40,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
print "<div align='center'>";
|
print "<div align='center'>";
|
||||||
|
|
||||||
|
print "<input class=\"button\"
|
||||||
|
type=\"submit\" onclick=\"return visitOfficialSite()\"
|
||||||
|
value=\"".__('Visit official site')."\"> ";
|
||||||
|
|
||||||
print "<input class=\"button\"
|
print "<input class=\"button\"
|
||||||
type=\"submit\" onclick=\"return closeInfoBox()\"
|
type=\"submit\" onclick=\"return closeInfoBox()\"
|
||||||
value=\"".__('Close this window')."\">";
|
value=\"".__('Close this window')."\">";
|
||||||
|
|
||||||
print "</div>";
|
print "</div></div>";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,8 +186,6 @@
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// print check_for_update($link);
|
|
||||||
|
|
||||||
set_pref($link, "_PREFS_ACTIVE_TAB", "genConfig");
|
set_pref($link, "_PREFS_ACTIVE_TAB", "genConfig");
|
||||||
|
|
||||||
if (!SINGLE_USER_MODE) {
|
if (!SINGLE_USER_MODE) {
|
||||||
|
|
|
@ -1156,6 +1156,13 @@ div.tagCloudContainer {
|
||||||
text-align : center;
|
text-align : center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.errorExplained {
|
||||||
|
border : 1px solid #99d67a;
|
||||||
|
background-color : white;
|
||||||
|
margin : 5px 0px 5px 0px;
|
||||||
|
padding : 5px;
|
||||||
|
}
|
||||||
|
|
||||||
ul.feedErrorsList {
|
ul.feedErrorsList {
|
||||||
height : 300px;
|
height : 300px;
|
||||||
overflow : auto;
|
overflow : auto;
|
||||||
|
@ -1728,6 +1735,7 @@ a.feedUpdErrLink {
|
||||||
#newVersionIcon {
|
#newVersionIcon {
|
||||||
vertical-align : middle;
|
vertical-align : middle;
|
||||||
cursor : pointer;
|
cursor : pointer;
|
||||||
|
margin-left : 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.helpLinkPic {
|
a.helpLinkPic {
|
||||||
|
|
|
@ -1419,4 +1419,6 @@ function addLabel() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function visitOfficialSite() {
|
||||||
|
window.open("http://tt-rss.org/");
|
||||||
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ window.onload = init;
|
||||||
|
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div class="topLinks">
|
<div class="topLinks">
|
||||||
|
|
||||||
<?php if (!SINGLE_USER_MODE) { ?>
|
<?php if (!SINGLE_USER_MODE) { ?>
|
||||||
<?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
|
<?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
@ -123,8 +124,9 @@ window.onload = init;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)"
|
<img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)"
|
||||||
src="images/new_version.png" title="New version is available!"
|
src="images/new_version.png" title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
|
||||||
alt="new_version_icon"/>
|
alt="new_version_icon"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
|
<img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue