coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Bloom on August 17, 2008, 03:01:09 PM

Title: [Solved]: How to remove orphan comments?
Post by: Bloom 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?
Title: Re: How to remove orphan comments?
Post by: Nibbler on August 17, 2008, 03:22:52 PM
Edit util.php, find


                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


                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 />";
Title: Re: How to remove orphan comments?
Post by: Bloom on August 17, 2008, 03:41:15 PM
Thanks, but where can I find util.php? I can't seem to find it  ???
Title: Re: How to remove orphan comments?
Post by: Bloom 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