[ZPatterns] SkinScript: manage_FTPput / manage_FTPget (for ZedPatterns)

Jean Jordaan [email protected]
Wed, 19 Dec 2001 09:09:34 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C1886C.E08B36F0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi Steve

Here's Roche Compaan's patch to add 'manage_FTPget' and 
'manage_FTPput' for SkinScript, applied against 
ZedPatterns-0-4-3p2-transactionagents-004 (from 'version.txt').

This is very useful if you do your editing on the filesystem 
using sitecopy, for instance.

Here's the patch against ZPatterns-0-4-3p2:
http://lists.zope.org/pipermail/zope/2001-November/102964.html

Regards,
Jean Jordaan
------=_NextPart_000_000F_01C1886C.E08B36F0
Content-Type: application/octet-stream;
	name="Methods.py.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Methods.py.patch"

--- =
/usr/local/zope/creme/2-4-3/lib/python/Products/ZPatterns/SkinScript/Meth=
ods.py~	Wed Dec 19 08:42:40 2001=0A=
+++ =
/usr/local/zope/creme/2-4-3/lib/python/Products/ZPatterns/SkinScript/Meth=
ods.py	Wed Dec 19 08:49:14 2001=0A=
@@ -115,9 +115,10 @@=0A=
 =0A=
 =0A=
 =0A=
-=0A=
-=0A=
-=0A=
+    def manage_FTPget(self):=0A=
+        "Get source for FTP download"=0A=
+        self.REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain')=0A=
+        return self.read()=0A=
 =0A=
     def PrincipiaSearchSource(self):=0A=
         "Support for searching - the document's contents are searched."=0A=
@@ -133,6 +134,12 @@=0A=
         RESPONSE.setStatus(204)=0A=
         return RESPONSE=0A=
 =0A=
+    manage_FTPput =3D PUT=0A=
+=0A=
+    def read(self): return self.text=0A=
+    def get_size(self): return len(self.text)=0A=
+    getSize =3D get_size=0A=
+=0A=
     def manage_proxy(self, roles=3D(), REQUEST=3DNone):=0A=
         "Change Proxy Roles"=0A=
         r =3D ProxyManager.manage_proxy.im_func(self,roles,REQUEST)=0A=
@@ -146,7 +153,7 @@=0A=
     __ac_permissions__ =3D (=0A=
         ('Change proxy roles', ('manage_proxy')),=0A=
         ('View management screens',  =
('manage_uploadForm','manage_main', 'PrincipiaSearchSource')),=0A=
-        ('Change SkinScript =
methods',('manage_upload','PUT','manage_edit')),=0A=
+        ('Change SkinScript =
methods',('manage_upload','PUT','manage_edit','manage_FTPget','body')),=0A=
     )=0A=
 =0A=
 =0A=

------=_NextPart_000_000F_01C1886C.E08B36F0--