PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Submissions

Reply
 
Thread Tools
Old 12-03-2003, 12:58 AM   #1
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Regular Expression Fix

Hi. A regex used in PhpDig versions 1.6.3 and 1.6.4 does not permit certain characters like ß in a search. To fix this do the following.

In search_function.php find:
PHP Code:
if (eregi("[^[:alnum:]^ +^-]+",$query_to_parse)) { $query_to_parse eregi_replace("[^[:alnum:]^ ]+"," ",$query_to_parse); } 
and replace with the following:
PHP Code:
$what_query_chars "[^".$phpdig_words_chars[PHPDIG_ENCODING]." -]+";
if (
eregi($what_query_chars,$query_to_parse)) {
    
$query_to_parse eregi_replace($what_query_chars," ",$query_to_parse);

Also in search_function.php find:
PHP Code:
// init variables 
and right after add the following:
PHP Code:
global $phpdig_words_chars
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
phpdigSessionRemove() fix zas Mod Submissions 0 05-14-2007 07:09 AM
do i need to use the radio buttons or just the regular expressions? Fking How-to Forum 1 10-04-2004 11:18 AM
Quick continue after accident and regular spiderind time. sf44 Troubleshooting 2 07-07-2004 04:59 PM
Bug fix for pdftohtml alivin70 Mod Submissions 0 02-25-2004 08:19 AM
1.6.2 fix for logs table Charter Mod Submissions 0 09-13-2003 02:49 PM


All times are GMT -8. The time now is 11:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.