Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: How to remove orphan comments?  (Read 2151 times)

0 Members and 1 Guest are viewing this topic.

Bloom

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
[Solved]: How to remove orphan comments?
« on: August 17, 2008, 03:01:09 pm »

Okay, so I went to Admin Tools, checked the right box, and clicked on Submit... however, this is all that comes up:

Searching for orphans, please wait...



1 orphan comments found


back to main


I don't see a button to tell me how to delete it, and the orphaned comment still won't go away. Is there a different way to fix this?
« Last Edit: August 17, 2008, 04:02:29 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: How to remove orphan comments?
« Reply #1 on: August 17, 2008, 03:22:52 pm »

Edit util.php, find

Code: [Select]
                if (isset($_POST['del'])){
                        cpg_db_query("DELETE FROM {$CONFIG['TABLE_COMMENTS']} WHERE msg_id= $msg_id");
                        echo "{$lang_util_php['comment']} $msg_body {$lang_util_php['nonexist']} $pid - <a href=\"util.php?action=del_orphans&amp;single=$msg_id\">{$lang_util_php['delete']}</a><br />";
        }

change to

Code: [Select]
                if (isset($_POST['del'])){
                        cpg_db_query("DELETE FROM {$CONFIG['TABLE_COMMENTS']} WHERE msg_id= $msg_id");
        }
                        echo "{$lang_util_php['comment']} $msg_body {$lang_util_php['nonexist']} $pid - <a href=\"util.php?action=del_orphans&amp;single=$msg_id\">{$lang_util_php['delete']}</a><br />";
Logged

Bloom

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: How to remove orphan comments?
« Reply #2 on: August 17, 2008, 03:41:15 pm »

Thanks, but where can I find util.php? I can't seem to find it  ???
Logged

Bloom

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: How to remove orphan comments?
« Reply #3 on: August 17, 2008, 03:58:21 pm »

never mind, I found it! Thanks so much for that code, it worked like a charm  ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.