]> git.openstreetmap.org Git - osqa.git/commitdiff
OSQA-178, we notify the current user with a message after a node has been deleted...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 27 Mar 2011 22:32:03 +0000 (22:32 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 27 Mar 2011 22:32:03 +0000 (22:32 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@908 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/actions/meta.py

index a964ef1db289ca0ec9171441046434c2d8f75c98..e966e55034598831da35914c4c50410c11750309 100644 (file)
@@ -182,6 +182,10 @@ class DeleteAction(ActionProxy):
         if self.node.node_type == "answer":\r
             self.node.question.reset_answer_count_cache()\r
 \r
+        # We should notify the current user that the node has been successfully deleted\r
+        message = _("The <a href=\"%s\">%s</a> has been sucessfully deleted") % (self.node.get_absolute_url(), self.node.node_type)\r
+        self.user.message_set.create(message=message)\r
+\r
     def cancel_action(self):\r
         self.node.mark_deleted(None)\r
 \r