Ajout de la supression des photos.
authorBenoît Pin <benoit.pin@gmail.com>
Wed, 27 Oct 2010 16:06:24 +0000 (18:06 +0200)
committerBenoît Pin <benoit.pin@gmail.com>
Wed, 27 Oct 2010 16:06:24 +0000 (18:06 +0200)
skins/lrservice.py

index 821bad1..fad05e8 100644 (file)
@@ -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()])