PDA

View Full Version : Cleanup Engine Bug and Fix


Charter
03-08-2004, 11:35 AM
Hi. If you are using a charset other than ISO-8859-1 or ISO-8859-2 then cleanup_engine.php basically deletes any word that doesn't start with a [0-9a-zßðþ] character. To fix this do the following.

In cleanup_engine.php replace

//explore keywords to find bad values
$query = "SELECT key_id FROM ".PHPDIG_DB_PREFIX."keywords
WHERE twoletters REGEXP \"^[^0-9a-zßðþ]\"";

with the following:

//explore keywords to find bad values
$query = "SELECT key_id FROM ".PHPDIG_DB_PREFIX."keywords
WHERE twoletters REGEXP \"^[^".$phpdig_words_chars[PHPDIG_ENCODING]."#$]\"";

Remember to remove any "word" wrapping in the above code.