From a678ccb5df37ba4678848df5372899d18a49b975 Mon Sep 17 00:00:00 2001
From: Rainer Hihn
Date: Tue, 23 Oct 2012 15:17:02 +0200
Subject: [PATCH 01/16] added parameter 'proxy_type'
---
wikisync/plugin.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/wikisync/plugin.py b/wikisync/plugin.py
index f1483be..c435743 100644
--- a/wikisync/plugin.py
+++ b/wikisync/plugin.py
@@ -173,6 +173,7 @@ def render_admin_panel(self, req, cat, page, path_info):
username = req.args.get("username", "")
password = req.args.get("password", "")
proxy = req.args.get("proxy", "")
+ proxy_type = req.args.get("proxy_type", "")
if password == password_stud:
password = self._get_config("password")
ignorelist = req.args.get("ignorelist", "")
@@ -185,7 +186,7 @@ def render_admin_panel(self, req, cat, page, path_info):
if server_info_changed and url:
# remote server info has changed, test connection
try:
- wc = WebClient(url, username, password, proxy, True)
+ wc = WebClient(url, username, password, proxy, proxy_type, True)
wc.test()
except Exception, e:
if hasattr(e, "code") and e.code == 401:
@@ -201,6 +202,7 @@ def render_admin_panel(self, req, cat, page, path_info):
self._set_config("password", password)
self._set_config("ignorelist", ignorelist)
self._set_config("proxy", proxy)
+ self._set_config("proxy_type", proxy_type)
self._save_config(req)
if not url:
add_warning(req, "Remote server not set, "
@@ -217,6 +219,7 @@ def render_admin_panel(self, req, cat, page, path_info):
"url": self._get_config("url", ""),
"username": self._get_config("username", ""),
"proxy": self._get_config("proxy", ""),
+ "proxy_type": self._get_config("proxy_type", ""),
"password": password,
"ignorelist": self._get_config("ignorelist", ""),
}
@@ -458,10 +461,11 @@ def _get_web_client(self):
username = self._get_config("username")
password = self._get_config("password")
proxy = self._get_config("proxy")
+ proxy_type = self._get_config("proxy_type")
if password:
try:
password = str_unmask(password)
except ValueError:
# assume its in clear text
pass
- return WebClient(baseurl, username, password, proxy, debug=False)
+ return WebClient(baseurl, username, password, proxy, proxy_type, debug=False)
From 4ef4f2a686da7ae24be71c844cdb99932cdfda98 Mon Sep 17 00:00:00 2001
From: rain0r
Date: Tue, 23 Oct 2012 15:18:10 +0200
Subject: [PATCH 02/16] added select-field 'proxy_type' and some js to
enable/disabled fields
---
wikisync/templates/wikisync_admin.html | 63 ++++++++++++++++++++++++--
1 file changed, 59 insertions(+), 4 deletions(-)
diff --git a/wikisync/templates/wikisync_admin.html b/wikisync/templates/wikisync_admin.html
index 19af22f..e149e6a 100644
--- a/wikisync/templates/wikisync_admin.html
+++ b/wikisync/templates/wikisync_admin.html
@@ -19,10 +19,6 @@ Wiki Synchronization
-
-
-
-
:
@@ -35,6 +31,24 @@
Wiki Synchronization
+