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: Cannot edit comments  (Read 2971 times)

0 Members and 1 Guest are viewing this topic.

Halfhidden

  • Guest
Cannot edit comments
« on: May 22, 2008, 11:25:18 pm »

I had to move our coppermine site to a dedicated server and whilst we were at that we converted the back end PHPBB3 forum to SMF. all when well.... ish but we have noticed that when a comment is posted beneath a picture the user cannot edit any longer. The link is visible and in all intent and purposes the user goes through the process of the edit, but when they click ok the changes are ignored. The only option is to delete the comment and re type it..... any ideas?

Regards,
Steff
Logged

Halfhidden

  • Guest
Re: Cannot edit comments
« Reply #1 on: May 22, 2008, 11:37:05 pm »

I've created a test account with limited rights:
User name: The bin pirate
Password: 123456
 Gallery: www.picturepenzance.co.uk

Hope this helps?
Logged

Nibbler

  • Guest
Re: Cannot edit comments
« Reply #2 on: May 23, 2008, 12:22:53 am »

Please attach your db_input.php.
Logged

Halfhidden

  • Guest
Re: Cannot edit comments
« Reply #3 on: May 23, 2008, 12:26:17 am »

OK here it is....
Logged

Nibbler

  • Guest
Re: Cannot edit comments
« Reply #4 on: May 23, 2008, 12:30:35 am »

The comment update code in that file is all wrong. Use a clean copy or review the validity of your changes.
Logged

Halfhidden

  • Guest
Re: Cannot edit comments
« Reply #5 on: May 23, 2008, 12:33:38 am »

Ok, I'll use a clean copy.... Thanks for your help :)
Regards,
Steff
Logged

Halfhidden

  • Guest
Re: Cannot edit comments
« Reply #6 on: May 23, 2008, 12:55:53 am »

Just completed winmerge and the db_input.php is unchanged from Stramm mod pack. So the db_imput.php on my site is the same as the one in Stramm's mod pack. I guess I'll loose the mod (or part of it) if I replace db_imput with a native from 1.4.18?
I suppose I should study the differences between the modded version and the un modded version

Regards,
Steff
Logged

Nibbler

  • Guest
Re: Cannot edit comments
« Reply #7 on: May 23, 2008, 01:07:42 am »

This is the modpack:

Code: [Select]
        if (GALLERY_ADMIN_MODE) {
            $update = cpg_db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body', msg_author='$msg_author' WHERE msg_id='$msg_id'");
        } elseif (USER_ID) {
            $update = cpg_db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body' WHERE msg_id='$msg_id' AND author_id ='" . USER_ID . "' LIMIT 1");
        } else {
            $update = cpg_db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body' WHERE msg_id='$msg_id' AND author_md5_id ='{$USER['ID']}' AND author_id = '0' LIMIT 1");
        }

Which is fine.

This is what you attached:

Code: [Select]
        if (GALLERY_ADMIN_MODE) {
            $moderator_group = $_POST['moderator_group'];
            $query = "UPDATE {$CONFIG['TABLE_ALBUMS']} SET title='$title', description='$description', category='$category', thumb='$thumb', uploads='$uploads', comments='$comments', votes='$votes', visibility='$visibility', moderator_group='$moderator_group' WHERE aid='$aid' LIMIT 1";
        } else {
            $update = cpg_db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body' WHERE msg_id='$msg_id' AND author_md5_id ='{$USER['ID']}' AND author_id = '0' LIMIT 1");
        }

Which is nonsense.
Logged

Halfhidden

  • Guest
Re: Cannot edit comments
« Reply #8 on: May 23, 2008, 01:48:36 am »

I agree it's nonsense... I only have a couple of mods that alter db_input.php  so I'll check to see what has happened. I've since downloaded the Stramm mod and you are correct the db_input.php is coded as it should..... I am puzzled because I've not done any changes that involves this file of late. And it's only recently (today) that this problem appeared.
Still the point is that I'm running a corrupt php file and I'll upload a fresh.
thanks for your help again.
Regards,
Steff
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 18 queries.