*) Status page now has button to install updates (1/2)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3670 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
(no author) 18 years ago
parent cb43ae11ba
commit b25bc6c36d

@ -38,24 +38,24 @@
#(hintVersionAvailable)#::
<dt><img src="env/grafics/start.gif"></dt>
<dd>latest public version is #[latestVersion]#.
You can download a more recent version of YaCy. Click here to aquire a direct download location:
<dd>Latest public version is v#[latestVersion]#.
You can download a more recent version of YaCy. Click here to install this update and restart YaCy:
<form action="Status.html" method="get" class="PeerControl">
<button type="submit" name="aquirerelease" value="aquire release information">
<button type="submit" name="aquirerelease" value="Update YaCy">
<img src="/env/grafics/lock.gif"/>
aquire download location
Install YaCy v#[latestVersion]#
</button>
</form>
</dd>
#(/hintVersionAvailable)#
<!--
#(hintVersionDownload)#::
<dt><img src="env/grafics/start.gif"></dt>
<dd>You can download the latest releases here:
#[versionResMain]# or #[versionResDev]#
</dd>
#(/hintVersionDownload)#
-->
#(hintStatusVirgin)#::
<dt><img src="env/grafics/start.gif"></dt>
<dd>You have not published your peer seed yet. This happens automatically, just wait.

@ -154,6 +154,16 @@ public class Status {
double thisVersion = Double.parseDouble(env.getConfig("version","0.1"));
// cut off the SVN Rev in the Version
try {thisVersion = Math.round(thisVersion*1000.0)/1000.0;} catch (NumberFormatException e) {}
if ((adminaccess) && !(((plasmaSwitchboard) env).updaterCallback == null) && (((plasmaSwitchboard) env).updaterCallback.updateYaCyIsPossible() == true)){
prop.put("hintVersionAvailable", 1);
prop.put("hintVersionAvailable_latestVersion", ((plasmaSwitchboard) env).updaterCallback.getYaCyUpdateReleaseVersion());
if ((post != null) && (post.containsKey("aquirerelease"))) {
((plasmaSwitchboard) env).updaterCallback.grantYaCyUpdate();
}
}
/*
if ((adminaccess) && (yacyVersion.latestRelease >= (thisVersion+0.01))) { // only new Versions(not new SVN)
if ((yacyVersion.latestMainRelease != null) ||
(yacyVersion.latestDevRelease != null)) {
@ -168,7 +178,8 @@ public class Status {
prop.putASIS("hintVersionDownload_versionResMain", (yacyVersion.latestMainRelease == null) ? "-" : yacyVersion.latestMainRelease.toAnchor());
prop.putASIS("hintVersionDownload_versionResDev", (yacyVersion.latestDevRelease == null) ? "-" : yacyVersion.latestDevRelease.toAnchor());
prop.put("hintVersionAvailable_latestVersion", Double.toString(yacyVersion.latestRelease));
*/
// hostname and port
String extendedPortString = env.getConfig("port", "8080");
int pos = extendedPortString.indexOf(":");

Loading…
Cancel
Save