Gossamer Forum
Home : Products : DBMan : Customization :

Auth_Modify_Own / Delete Problem Question

Quote Reply
Auth_Modify_Own / Delete Problem Question
Well, I'm at my wits end here. I've looked every where for an answer and mangled a few test databases in the process.

Here's the scoop. I have a free photo classified ads thing set up with the Validate mod. It all works like a charm EXCEPT, when a user logs in to delete an item, half the time it will not only delete that item, but everything below it in default.db file, even if when is not that user's records.

The files are posted at:

http://www.hoofingit.com/forumfiles/db.txt

http://www.hoofingit.com/forumfiles/html.txt

http://www.hoofingit.com/forumfiles/default.txt

Also, when a user deletes a record, the success message will say: Record deleted 190, 190190, 190190190 and so on. I'm pretty sure this has something to do with the whole snafu, but I sure couldn't find it.

I looked through a ton of posts here, and tried several things, but nothing worked...

If anyone has any ideas or can point me to a post that addresses this, I sure would appreciate it!

Thanks!
Quote Reply
Re: [bassador] Auth_Modify_Own / Delete Problem Question In reply to
In your db.cgi file sub delete_records

After:

rmdir "$SAVE_DIRECTORY/$data[$db_key_pos]";
}
}
}
else { $output .= $line . "\n";
}

Add another :
}

before:

foreach $key (keys %delete_list) {

and see if that makes a difference. I believe that extra closing bracket is needed.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [bassador] Auth_Modify_Own / Delete Problem Question In reply to
I guess it's to do with brackets: try removing one of the two closing curly brackets at the very end of db.cgi. Then add one in sub delete_records, after this line:

else { $output .= $line . "\n"; }
kellner
Quote Reply
Re: [kellner] Auth_Modify_Own / Delete Problem Question In reply to
That did the trick! Lois was on the right track, but the bracket at the end of db.cgi also had to be deleted else it returned an Internal Server Error.

Oh Happy Day! I can stop gnashing my teeth and pulling out hair!! (my husband will be happy... I didn't say I was pulling out my *own* hair eh?)

I would have never found that, I was just sure my db_key was messed up or something like that.

thx bunches!!