Extension talk:BypassSearch/1.0.1

From MediaWiki.org
Jump to navigation Jump to search 09:26, 24 February 2009 (UTC)
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') ) {

not nice, but powerful :o))