From: BenoƮt Pin Date: Wed, 27 Oct 2010 16:06:24 +0000 (+0200) Subject: Ajout de la supression des photos. X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/commitdiff_plain/3c8d6d0806a542a7337c121c2ba06d2824b7e074?hp=55b32ee1cd6aed41a70cd3f5b37d814c2000695a Ajout de la supression des photos. --- diff --git a/skins/lrservice.py b/skins/lrservice.py index 821bad1..fad05e8 100644 --- a/skins/lrservice.py +++ b/skins/lrservice.py @@ -43,3 +43,9 @@ elif method == 'uploadPhoto' : photo = portfolio[photoId] uid = uidtool.register(photo) return '%s %s' % (uid, photo.absolute_url()) + +elif method == 'deletePhoto' : + photo = uidtool.queryObject(fg('uid')) + if photo : + parent = photo.getParentNode() + parent.manage_delObjects([photo.getId()])