X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FPrefixSearch.php;h=2885679c4706cd046622e3ba3863ecc8c1712e83;hb=a7f7f8cbcb14a2ca597b5510d2549e74b3617667;hp=4df6a9e51e1a3958707cf6cf85abefba35e9899a;hpb=04f27a07a181e903497024a4fdbc2c6d24f974c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 4df6a9e51e..2885679c47 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -65,7 +65,7 @@ abstract class PrefixSearch { $search = $title->getText(); if ( $ns[0] == NS_MAIN ) { $ns = $namespaces; // no explicit prefix, use default namespaces - wfRunHooks( 'PrefixSearchExtractNamespace', array( &$ns, &$search ) ); + Hooks::run( 'PrefixSearchExtractNamespace', array( &$ns, &$search ) ); } return $this->searchBackend( $ns, $search, $limit, $offset ); } @@ -79,7 +79,7 @@ abstract class PrefixSearch { $namespaces = array( $title->getNamespace() ); $search = ''; } else { - wfRunHooks( 'PrefixSearchExtractNamespace', array( &$namespaces, &$search ) ); + Hooks::run( 'PrefixSearchExtractNamespace', array( &$namespaces, &$search ) ); } return $this->searchBackend( $namespaces, $search, $limit, $offset ); @@ -95,7 +95,6 @@ abstract class PrefixSearch { * @return array */ public function searchWithVariants( $search, $limit, array $namespaces, $offset = 0 ) { - wfProfileIn( __METHOD__ ); $searches = $this->search( $search, $limit, $namespaces, $offset ); // if the content language has variants, try to retrieve fallback results @@ -116,7 +115,6 @@ abstract class PrefixSearch { } } } - wfProfileOut( __METHOD__ ); return $searches; } @@ -157,7 +155,7 @@ abstract class PrefixSearch { } } $srchres = array(); - if ( wfRunHooks( 'PrefixSearchBackend', array( $namespaces, $search, $limit, &$srchres, $offset ) ) ) { + if ( Hooks::run( 'PrefixSearchBackend', array( $namespaces, $search, $limit, &$srchres, $offset ) ) ) { return $this->titles( $this->defaultSearchBackend( $namespaces, $search, $limit, $offset ) ); } return $this->strings( $this->handleResultFromHook( $srchres, $namespaces, $search, $limit ) );