Ban expiry Ban expiry
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Ban expiry

Started by Nibbler, September 22, 2004, 01:45:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nibbler

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 ?

Tranz

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.

Joachim Müller

fixed in devel cvs by editing include/init.inc.php and changing the ban expiry part of the code to // 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

Tranz

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.

Joachim Müller

"intelligent" date selection is a feature that should be considered, that's why I added it to the todo list. 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