Posted on: 03/07/08 01:48am
By: deepak1155
Hi to all,
I am using geeklog 1.4.1. In my spamx's
HTTP Header Blacklist,
IP Blacklist,
IP of URL Blacklist,
Edit SLV Whitelist
I want to add some entry in above topics, but I am unable to do so. Please anyone tell me why this happening.
Thanks
Re: SpamX not adding entry
Posted on: 03/07/08 01:57am
By: Dirk
Which language file are you using? There's a known issue with Spam-X and French, for example. It may affect other languages with special characters in the button texts as well.
bye, Dirk
Re: SpamX not adding entry
Posted on: 03/07/08 02:59am
By: deepak1155
Quote by: DirkWhich language file are you using? There's a known issue with Spam-X and French, for example. It may affect other languages with special characters in the button texts as well.
bye, Dirk
Yes Dirk, I am using "french_france" language file. Is the language file is cause of problem. If it, then how can I resolve this problem. Please guide me.
Re: SpamX not adding entry
Posted on: 03/07/08 04:17am
By: jmucchiello
The problem is COM_applyFilter cuts off anything after an apostrophe (among other symbols). So the text "Ajouter l'entrée" in LANG_SX00['addentry'] fails to compare against "Ajouter l". The simplest fix is to change $LANG_SX00['addentry'] to something without special chars in it.
Text Formatted Code
//The proper fix is to change this line (86) in plugins/spamx/EditHeader.Admin.class.php:
$display .= '<p><input type="Submit" name="paction" value="' . $LANG_SX00['addentry'] . '">';
//to
$display .= '<p><input type="Submit" name="addentry" value="' . $LANG_SX00['addentry'] . '">';
//add this after line 39
} else if (isset ($_POST['addentry'])) {
$action = 'addentry';
} // this is the old line 40
And then you have to make similar changes in all the similar spamx modules (and in various other places in Geeklog where COM_applyFilter is overly strict).
Re: SpamX not adding entry
Posted on: 03/07/08 02:14pm
By: Dirk
The fix we have in CVS is to remove the COM_applyFilter for $_GET['action'] and $_POST['action'] in all the modules who's names start with "Edit". There's no need to filter that string since it's only compared to a fixed string (from the language file) anyway.
bye, Dirk
Re: SpamX not adding entry
Posted on: 03/07/08 06:57pm
By: jmucchiello
In the older code where you get comparisons like $mode == $LANG03[32], I think isset($_POST['addentry']) is better because it is self-documenting. OTOH, $LANG_SX00['addentry'] is no less self-documenting I guess.
Re: SpamX not adding entry
Posted on: 03/08/08 04:43am
By: deepak1155
Quote by: DirkThe fix we have in CVS is to remove the COM_applyFilter for $_GET['action'] and $_POST['action'] in all the modules who's names start with "Edit". There's no need to filter that string since it's only compared to a fixed string (from the language file) anyway.
bye, Dirk
Yes, now it is working. Thanks Dirk, you are greate.