https://bugzilla.wikimedia.org/show_bug.cgi?id=37342

       Web browser: ---
             Bug #: 37342
           Summary: [SpecialSearch.php] [patch] [hook] to determine
                    default search profile
           Product: MediaWiki
           Version: 1.20-git
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: Special pages
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


Not really relates to 32970 but rather it extends its purpose that since search
profiles can be specified to allow a hook to determine a search profile to be
used as default profile as long as no ($request->getVal( 'profile', $profile
=== null ) user action has taken place.

## SpecialSearch.php

Line 135: 
$profile = $request->getVal( 'profile', $profile );

+ // Determine a search profile where no user interaction has taken place
+ if ( $profile === null ){
+     wfRunHooks( 'SpecialSearchDefaultProfile', array( &$profile ) );
+}

We use this hook to make sure that users don't have to switch manually to an
already implemented search profile form
(https://github.com/mwjames/projects/tree/master/smw-searchprofile)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to