From 1abd2d97a1650fdfc4465a1f8c16ea2acbc335fd Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 4 Jul 2012 18:46:58 +0000
Subject: [PATCH] Swipe the File Libararies link "feature" from the stock web.

---
 web/root/ecWeb/sidebar/004-fileLibraries.ssjs | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 web/root/ecWeb/sidebar/004-fileLibraries.ssjs

diff --git a/web/root/ecWeb/sidebar/004-fileLibraries.ssjs b/web/root/ecWeb/sidebar/004-fileLibraries.ssjs
new file mode 100644
index 0000000000..7e803aae18
--- /dev/null
+++ b/web/root/ecWeb/sidebar/004-fileLibraries.ssjs
@@ -0,0 +1,18 @@
+var ftp_url="ftp://";
+if(user.number && !(user.security.restrictions&UFLAG_G))
+	ftp_url += user.alias + ":" + user.security.password + "&#064;";
+var host = http_request.host;
+if(!host || !host.length)
+	host = system.host_name;
+var port = host.indexOf(':');
+if(port>=0)
+	host=host.slice(0,port);
+ftp_url += host;
+ftp_port=webIni.ftpPort;
+var ftp_port;
+if(ftp_port==undefined)
+	ftp_port=21;
+if(ftp_port!=21)
+	ftp_url += ftp_port;
+ftp_url +="/00index.html?$" + new Date().valueOf().toString(36);
+print('<a class="link" href="'+encodeURI(ftp_url)+'">File Libraries</a>');
-- 
GitLab