We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: I'll be modifying the CMS Made Simple Comments module for a community review website. I'll plan on pushing my changes here.
Clone URL: git://github.com/elijahlofgren/cmsms-comments-elijahlofgren.git
cmsms-comments-elijahlofgren / action.deletecomment.php
100644 24 lines (18 sloc) 0.585 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
    if (!isset($gCms)) exit;
 
 
    if (!$this->CheckPermission('Manage Comments'))
    {
      echo '<p class="error">'.$this->Lang('needpermission', array('Manage Comments')).'</p>';
      return;
    }
 
    $commentid = '';
    if (isset($params['commentid']))
    {
      $commentid = $params['commentid'];
    }
 
    //Now remove the article
    $query = "DELETE FROM ".cms_db_prefix()."module_comments WHERE comment_id = ?";
    $db->Execute($query, array($commentid));
 
$params = array('tab_message'=> 'comment_deleted', 'active_tab' => 'comments');
$this->Redirect($id, 'defaultadmin', '', $params);
?>