Jump to content

Extension talk:BypassSearch/1.0.1

Add topic
From mediawiki.org
Latest comment: 15 years ago by 212.204.96.39

212.204.96.39 09:26, 24 February 2009 (UTC)Reply
I have implemented this extension on my wiki.
It was intended to replace LocalSettings.php: $wgGoToEdit = true;
Therefore I added following line LocalSettings.php: $wgDefaultUserOptions['bypasssearch'] = 1;

However it did not work as intended because of an unchecked case in the extension.
All existing users were migrated to 'bypasssearch' = 0;

I have added following lines:

function init() { 
global $wgUser, $wgHooks, $wgDefaultUserOptions;

/** Tweak by wagner: Default option korrekt uebernehmen
*/
if ( $wgUser->getOption('bypasssearch') == '' ) {
$wgUser->setOption('bypasssearch', $wgDefaultUserOptions['bypasssearch']);
}

// is it enabled? more importantly, do they have enough 's'es to sound like a snake?
if ( ! $wgUser->getOption('bypasssearch') ) {
return;
}


not nice, but powerful :o))