[Zapp-cvs-commit] ZApp ZApp_CMFBase.py,1.38,1.39
Brought to you by:
sspickle
|
From: Steve S. <ssp...@us...> - 2004-03-22 17:34:41
|
Update of /cvsroot/zapp/ZApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7200 Modified Files: ZApp_CMFBase.py Log Message: fixed bug in zapp_cmf_image copy/paste Index: ZApp_CMFBase.py =================================================================== RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ZApp_CMFBase.py 21 Mar 2004 13:33:56 -0000 1.38 --- ZApp_CMFBase.py 22 Mar 2004 17:24:21 -0000 1.39 *************** *** 332,336 **** oldPath = oldSelf.fs_object_path newPath = self.fs_object_path ! os.system("cp %s %s" % (oldPath, newPath)) def zcmf_moveToCurrPath( self, oldSelf ): --- 332,350 ---- oldPath = oldSelf.fs_object_path newPath = self.fs_object_path ! ! oldDir, oldFile = os.path.split(oldPath) ! newDir, newFile = os.path.split(newPath) ! ! oldMetaPath = os.path.join(oldDir, ".%s,z" % oldFile) ! newMetaPath = os.path.join(newDir, ".%s,z" % newFile) ! ! if os.path.isfile(oldPath): ! if not os.path.isdir(newDir): ! os.makedirs( newDir ) ! ! os.system("cp %s %s" % (oldPath, newPath)) ! ! if os.path.isfile(oldMetaPath): ! os.system("cp %s %s" % (oldMetaPath, newMetaPath)) def zcmf_moveToCurrPath( self, oldSelf ): *************** *** 338,351 **** for move operation.... copy old fs object to new location. """ oldPath = oldSelf.fs_object_path newPath = self.fs_object_path oldDir, oldFile = os.path.split(oldPath) newDir, newFile = os.path.split(newPath) ! ! if not os.path.isDir(newDir): ! os.makedirs( newDIr ) ! ! os.system("mv %s %s" % (oldPath, newPath)) ! extendProperties(ZApp_CMF_FSObject, []) --- 352,374 ---- for move operation.... copy old fs object to new location. """ + oldPath = oldSelf.fs_object_path newPath = self.fs_object_path + oldDir, oldFile = os.path.split(oldPath) newDir, newFile = os.path.split(newPath) ! ! oldMetaPath = os.path.join(oldDir, ".%s,z" % oldFile) ! newMetaPath = os.path.join(newDir, ".%s,z" % newFile) ! ! if os.path.isfile(oldPath): ! if not os.path.isdir(newDir): ! os.makedirs( newDir ) ! ! os.system("mv %s %s" % (oldPath, newPath)) ! ! if os.path.isfile(oldMetaPath): ! os.system("mv %s %s" % (oldMetaPath, newMetaPath)) ! extendProperties(ZApp_CMF_FSObject, []) *************** *** 384,396 **** 'name': 'View', 'action': 'zapp_image_view', ! 'permissions': (CMFCorePermissions.View,)}, {'id': 'edit', 'name': 'Edit', 'action': 'zapp_image_edit_form', ! 'permissions': (CMFCorePermissions.ModifyPortalContent,)}, { 'id' : 'metadata' , 'name' : 'Metadata' , 'action': 'string:${object_url}/metadata_edit_form' ! , 'permissions' : (CMFCorePermissions.ModifyPortalContent,)}, ), }, --- 407,434 ---- 'name': 'View', 'action': 'zapp_image_view', ! 'permissions': (CMFCorePermissions.View,), ! }, {'id': 'edit', 'name': 'Edit', 'action': 'zapp_image_edit_form', ! 'permissions': (CMFCorePermissions.ModifyPortalContent,), ! }, { 'id' : 'metadata' , 'name' : 'Metadata' , 'action': 'string:${object_url}/metadata_edit_form' ! , 'permissions' : (CMFCorePermissions.ModifyPortalContent,), ! }, ! { 'id' : 'xml' ! , 'name' : 'XML' ! , 'action': 'string:${object_url}/zapp_cmf_xml_form' ! , 'permissions' : (CMFCorePermissions.ManagePortal,) ! , 'visible' : 1, ! }, ! { 'id' : 'relations' ! , 'name' : 'Relationships' ! , 'action': 'string:${object_url}/zapp_cmf_view_relations' ! , 'permissions' : (CMFCorePermissions.ManagePortal,) ! , 'visible' : 1, ! }, ), }, |