From d1b9f50b9418d8b01c7fda0ccfbc6dab0980f6f7 Mon Sep 17 00:00:00 2001 From: lulabad Date: Sat, 15 Mar 2008 10:37:20 +0000 Subject: [PATCH] added "delete Release" to Update Page git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4564 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/ConfigUpdate_p.html | 4 +++- htroot/ConfigUpdate_p.java | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/htroot/ConfigUpdate_p.html b/htroot/ConfigUpdate_p.html index eae57247b..1e1496655 100644 --- a/htroot/ConfigUpdate_p.html +++ b/htroot/ConfigUpdate_p.html @@ -1,5 +1,6 @@ +#(forwardToSteering)#::#(/forwardToSteering)# YaCy '#[clientname]#': System Update #%env/templates/metas.template%# @@ -29,7 +30,7 @@   

Downloaded Releases
-
+
  #(deployenabled)#::no automated installation on development environments::    +    #(/deployenabled)#

Automatic Update
diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.java index 0c3eca869..895e899c4 100644 --- a/htroot/ConfigUpdate_p.java +++ b/htroot/ConfigUpdate_p.java @@ -49,6 +49,12 @@ public class ConfigUpdate_p { prop.put("candeploy_autoUpdate", "0"); if (post != null) { + if (post.containsKey("update")) { + prop.put("forwardToSteering", "1"); + prop.put("forwardToSteering_release",post.get("releaseinstall", "")); + return prop; + } + if (post.containsKey("downloadRelease")) { // download a release String release = post.get("releasedownload", ""); @@ -65,6 +71,16 @@ public class ConfigUpdate_p { if (post.containsKey("checkRelease")) { yacyVersion.allReleases(true); } + if (post.containsKey("deleteRelease")) { + String release = post.get("releaseinstall", ""); + if(release.length() > 0) { + try { + new File(sb.releasePath, release).delete(); + } catch (NullPointerException e) { + sb.getLog().logSevere("AUTO-UPDATE: could not delete release " + release + ": " + e.getMessage()); + } + } + } if (post.containsKey("autoUpdate")) { yacyVersion updateVersion = yacyVersion.rulebasedUpdateInfo(true);