// Run hook for extension authorization plugins
/** @var $result array */
$result = null;
- if ( !wfRunHooks( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
+ if ( !Hooks::run( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) );
return;
}
private function benchHooks( $trials = 10 ) {
$start = microtime( true );
for ( $i = 0; $i < $trials; $i++ ) {
- wfRunHooks( 'Test' );
+ Hooks::run( 'Test' );
}
$delta = microtime( true ) - $start;
$pertrial = $delta / $trials;
$blacklist = $checkBlacklist;
- wfRunHooks( 'LocalisationChecksBlacklist', array( &$blacklist ) );
+ Hooks::run( 'LocalisationChecksBlacklist', array( &$blacklist ) );
return $blacklist;
}
* files in the languages directory.
*/
function __construct() {
- wfRunHooks( 'LocalisationIgnoredOptionalMessages',
+ Hooks::run( 'LocalisationIgnoredOptionalMessages',
array( &$this->mIgnoredMessages, &$this->mOptionalMessages ) );
$this->mLanguages = array_keys( Language::fetchLanguageNames( null, 'mwfile' ) );
}
// Give extensions a chance to optimize settings
- wfRunHooks( 'MaintenanceRefreshLinksInit', array( $this ) );
+ Hooks::run( 'MaintenanceRefreshLinksInit', array( $this ) );
# Don't generate extension images (e.g. Timeline)
$wgParser->clearTagHooks();
// Allow hooks to override the suggestion URL settings in a more
// general way than overriding the whole search engine...
-wfRunHooks( 'OpenSearchUrls', array( &$urls ) );
+Hooks::run( 'OpenSearchUrls', array( &$urls ) );
foreach ( $urls as $attribs ) {
print Xml::element( 'Url', $attribs );
unset( $params['thumbName'] );
// Do the hook first for older extensions that rely on it.
- if ( !wfRunHooks( 'ExtractThumbParameters', array( $thumbname, &$params ) ) ) {
+ if ( !Hooks::run( 'ExtractThumbParameters', array( $thumbname, &$params ) ) ) {
// Check hooks if parameters can be extracted
// Hooks return false if they manage to *resolve* the parameters
// This hook should be considered deprecated