forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Nibbler on September 22, 2004, 01:45:54 am

Title: Ban expiry
Post by: Nibbler on September 22, 2004, 01:45:54 am
Bans don't seem to be expiring for some reason. I think it's to do with different date formats or something else beyond my comprehension. Anyone else getting this problem ?
Title: Re: Ban expiry
Post by: Tranz on September 23, 2004, 02:18:14 am
I tested banning by choosing yesterday for the expiration date. When I logged in as the banned user, I got the banned message both in v. 1.3.2 and 1.4.
Title: Re: Ban expiry
Post by: Joachim Müller on October 23, 2004, 11:26:58 am
fixed in devel cvs by editing include/init.inc.php and changing the ban expiry part of the code to
Code: [Select]
// Remove expired bans
$now = date('Y-m-d H:i:s');
cpg_db_query("DELETE FROM {$CONFIG['TABLE_BANNED']} WHERE expiry < '$now'");
Committed changes to devel cvs. Please check out and confirm. If fix works for you, changes should be applied to stable as well.

Joachim
Title: Re: Ban expiry
Post by: Tranz on October 23, 2004, 09:45:24 pm
It works now.

I would suggest that if someone selects a date that is either today or earlier, they get a notification telling them they must select a date in the future. As it is, the page just sits there. When I went back to the ban page, that ban entry had disappeared.
Title: Re: Ban expiry
Post by: Joachim Müller on October 24, 2004, 03:24:50 pm
"intelligent" date selection is a feature that should be considered, that's why I added it to the todo list (http://forum.coppermine-gallery.net/index.php?topic=6681.msg46342#msg46342). As the initial bug this thread was about is solved I tagged this thread as "fixed".
I committed the changes mentioned above to the stable cvs as well.

Joachim