From fabda9ad3168e67130facdfa2992c2fc961febc8 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 21 Sep 2011 23:33:44 +0000 Subject: [PATCH] added script that can be used to delete a single url from the index call: bin/deleteurl.sh git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7969 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- bin/deleteurl.sh | 3 +++ htroot/IndexControlURLs_p.java | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100755 bin/deleteurl.sh diff --git a/bin/deleteurl.sh b/bin/deleteurl.sh new file mode 100755 index 000000000..4820ac185 --- /dev/null +++ b/bin/deleteurl.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "`dirname $0`" +./apicall.sh "/IndexControlURLs_p.html?urlhashdeleteall=&urlstring=$1" > /dev/null diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java index 3ea3cb078..bd002dc17 100644 --- a/htroot/IndexControlURLs_p.java +++ b/htroot/IndexControlURLs_p.java @@ -129,6 +129,12 @@ public class IndexControlURLs_p { // post values that are set on numerous input fields with same name String urlstring = post.get("urlstring", "").trim(); String urlhash = post.get("urlhash", "").trim(); + if (urlhash.length() == 0 && urlstring.length() > 0) { + try { + urlhash = ASCII.String(new DigestURI(urlstring, null).hash()); + } catch (final MalformedURLException e) { + } + } if (!urlstring.startsWith("http://") && !urlstring.startsWith("https://") &&