PDA

View Full Version : SEARCH_DEFAULT_MODE Ignored


stsopswen4
03-04-2004, 02:19 PM
I'm new to PhpDig so forgive me if I just don't understand.

I've modified my config and set the SEARCH_DEFAULT_MODE to any but it does not seem to work. Looking at the code, function phpdigMakeForm, it really doesn't matter what you specify because it's the default is 'start' because of the default value in the method. Since that is the case it's always defined and never grabs the value from SEARCH_DEFAULT_MODE.

Can someone show me the way? Thanks.

manfred
03-05-2004, 01:13 AM
Hi

I noticed this also and corrected that in my admin panel mod. You can download it from mod submission forum. Only required file is search.php but by using the hole mod you can control several things directly from admin page.

-m-

stsopswen4
03-05-2004, 11:12 AM
For now I just passed 'any' for $option and that seems to work for now. I'll see if I can log this as a bug.

Actually, can we confirm this is a bug and i'm not going too crazy? And if so can the moderator move this thread over the to bug tracker forum?

Thanks.

Charter
03-05-2004, 12:19 PM
Hi. In search_function.php replace:

if (($option != "start") && ($option != "any") && ($option != "exact")) { $option = "start"; }

with the following:

if (($option != "start") && ($option != "any") && ($option != "exact")) { $option = SEARCH_DEFAULT_MODE; }

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

stsopswen4
03-11-2004, 04:08 PM
Will this make it into the next revision?

Charter
03-11-2004, 04:39 PM
>> Will this make it into the next revision?

Hi. Sure, if I remember to stick it in. :D Humor aside, it's on the list so I should remember.

stsopswen4
03-12-2004, 08:33 AM
Thanks.

manfred
06-05-2004, 06:17 AM
Also search default limit must be changed. How about code a little bit later, obsolete or not? What I understand it never get parsed.


if (($option != "start") && ($option != "any") && ($option != "exact")) { $option = SEARCH_DEFAULT_MODE; }
if (($limite != 10) && ($limite != 30) && ($limite != 100)) { $limite = SEARCH_DEFAULT_LIMIT; }

//if (!$option) {
// $option = SEARCH_DEFAULT_MODE;
//}

//if ($limite) {
// settype ($limite,"integer");
//}
//else {
// $limite = SEARCH_DEFAULT_LIMIT;
//}