Changeset 1173


Ignore:
Timestamp:
02/19/10 13:01:12 (3 years ago)
Author:
nick_ramsay
Message:

[Branch 1.0] Fix for deleting comments from Comment Manager. (Ticket #115)

Location:
branches/1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/content/plugins/comment_manager/comment_manager_settings.php

    r1170 r1173  
    9595                 
    9696                // Akismet uses this to report Akismet mistakes  
    97                 $h->pluginHook('com_man_delete_comment', true, '', array($h->comment)); 
     97                $h->pluginHook('com_man_delete_comment', '', array($h->comment)); 
    9898                 
    9999                $h->comment->deleteComment($h); // delete this comment 
  • branches/1.0/libs/Comment.php

    r1170 r1173  
    312312    public function deleteComment($h, $comment_id = 0) 
    313313    { 
     314        if (!$comment_id) { $comment_id = $this->id; } 
    314315        if (!$comment_id) { return false; } 
    315          
     316 
    316317        $sql = "DELETE FROM " . TABLE_COMMENTS . " WHERE comment_id = %d"; 
    317318        $h->db->query($h->db->prepare($sql, $comment_id)); 
    318319         
    319320        // delete any votes for this comment 
    320         //$sql = "DELETE FROM " . TABLE_COMMENTVOTES . " WHERE cvote_comment_id = %d"; 
    321         //$h->db->query($h->db->prepare($sql, $this->id)); 
     321        $sql = "DELETE FROM " . TABLE_COMMENTVOTES . " WHERE cvote_comment_id = %d"; 
     322        $h->db->query($h->db->prepare($sql, $this->id)); 
    322323         
    323324        $h->comment->id = $comment_id; // a small hack to get the id for use in plugins. 
Note: See TracChangeset for help on using the changeset viewer.