Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- CacheAdmin: no exception if cached file was not available - fix for http://www.yacy-forum.de/viewtopic.php?t=3412

karlchenofhell3863f2dd2413
diff --git a/htroot/CacheAdmin_p.java b/htroot/CacheAdmin_p.java
index bbe2f0ee0..0b644b556 100644
--- a/htroot/CacheAdmin_p.java
+++ b/htroot/CacheAdmin_p.java
@@ -174,7 +174,6 @@ public class CacheAdmin_p {
}
} catch (Exception e) {
prop.put("info_type", NotCached);
- e.printStackTrace();
}
} else {
prop.put("info", TypeDIR);
diff --git a/htroot/IndexMonitor.html b/htroot/IndexMonitor.html
index 86203202d..38f744d9f 100644
--- a/htroot/IndexMonitor.html
+++ b/htroot/IndexMonitor.html
@@ -125,7 +125,13 @@
<td>#[moddate]#</td>
<td>#[wordcount]#</td>
<td>#[urldescr]#</td>
- <td>#[url]#</td>
+ <td>
+ #(available)#
+ <span class="tt">-not cached-</span>
+ ::
+ <a href="CacheAdmin_p.html?action=info&amp;path=#[cachepath]#" class="small" title="#[urltitle]#">#[url]#</a>
+ #(/available)#
+ </td>
</tr>
#{/indexed}#
</table>
diff --git a/htroot/IndexMonitor.java b/htroot/IndexMonitor.java
index eb4ff2acd..02d6a0f8d 100644
--- a/htroot/IndexMonitor.java
+++ b/htroot/IndexMonitor.java
@@ -47,6 +47,7 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
+import de.anomic.data.wikiCode;
import de.anomic.http.httpHeader;
import de.anomic.index.indexURLEntry;
import de.anomic.net.URL;
@@ -181,7 +182,14 @@ public class IndexMonitor {
prop.put("table_indexed_" + cnt + "_moddate", daydate(urle.moddate()));
prop.put("table_indexed_" + cnt + "_wordcount", urle.wordCount());
prop.put("table_indexed_" + cnt + "_urldescr", comp.descr());
- prop.put("table_indexed_" + cnt + "_url", (cachepath == null) ? "-not-cached-" : "<a href=\"CacheAdmin_p.html?action=info&amp;path=" + cachepath + "\" class=\"small\" title=\"" + de.anomic.data.wikiCode.replaceXMLEntities(urlstr) + "\">" + de.anomic.data.wikiCode.replaceXMLEntities(urltxt) + "</a>");
+ if (cachepath == null) {
+ prop.put("table_indexed_" + cnt + "_available", 0);
+ } else {
+ prop.put("table_indexed_" + cnt + "_available", 1);
+ prop.put("table_indexed_" + cnt + "_available_cachepath", cachepath);
+ prop.put("table_indexed_" + cnt + "_available_urltitle", wikiCode.replaceXMLEntities(urlstr));
+ prop.put("table_indexed_" + cnt + "_available_url", wikiCode.replaceXMLEntities(urltxt));
+ }
dark = !dark;
cnt++;
} catch (Exception e) {