display Never if directory was never synced
This commit is contained in:
@ -111,6 +111,7 @@ public class AdvancedSharingServlet extends HttpServlet {
|
||||
sb.append("<Directory>").append(Util.escapeHTMLinXML(directory)).append("</Directory>");
|
||||
sb.append("<AutoWatch>").append(autoWatch).append("</AutoWatch>");
|
||||
sb.append("<LastSync>").append(DataHelper.formatTime(lastSync)).append("</LastSync>");
|
||||
sb.append("<LastSyncTS>").append(lastSync).append("</LastSyncTS>");
|
||||
sb.append("<SyncInterval>").append(syncInterval).append("</SyncInterval>");
|
||||
sb.append("</WatchedDir>");
|
||||
}
|
||||
|
@ -87,6 +87,7 @@ public class Util {
|
||||
_x("MuWire Status"),
|
||||
_x("must be greater than zero"),
|
||||
_x("Name"),
|
||||
_x("Never"),
|
||||
_x("Number of items to keep on disk (-1 means unlimited)"),
|
||||
_x("Outgoing Connections"),
|
||||
// verb
|
||||
|
@ -5,6 +5,7 @@ class Directory {
|
||||
this.autoWatch = xmlNode.getElementsByTagName("AutoWatch")[0].childNodes[0].nodeValue
|
||||
this.syncInterval = xmlNode.getElementsByTagName("SyncInterval")[0].childNodes[0].nodeValue
|
||||
this.lastSync = xmlNode.getElementsByTagName("LastSync")[0].childNodes[0].nodeValue
|
||||
this.lastSyncTS = parseInt(xmlNode.getElementsByTagName("LastSyncTS")[0].childNodes[0].nodeValue)
|
||||
}
|
||||
|
||||
getMapping() {
|
||||
@ -20,7 +21,11 @@ class Directory {
|
||||
|
||||
mapping.set("Directory", this.directory + divRight)
|
||||
mapping.set("Auto Watch", this.autoWatch)
|
||||
mapping.set("Last Sync", this.lastSync)
|
||||
|
||||
if (this.lastSyncTS == 0)
|
||||
mapping.set("Last Sync", _t("Never"))
|
||||
else
|
||||
mapping.set("Last Sync", this.lastSync)
|
||||
mapping.set("Sync Interval", this.syncInterval)
|
||||
|
||||
return mapping
|
||||
|
Reference in New Issue
Block a user