Remove unused hooks

This commit is contained in:
Luqgreg 2018-08-06 18:33:16 +02:00
parent 443669effa
commit 9c2295c98d
2 changed files with 1 additions and 29 deletions

View file

@ -14,17 +14,6 @@ class PortableInfoboxHooks {
return true;
}
public static function onImageServingCollectImages( &$imageNamesArray, $articleTitle ) {
if ( $articleTitle ) {
$infoboxImages = PortableInfoboxDataService::newFromTitle( $articleTitle )->getImages();
if ( !empty( $infoboxImages ) ) {
$imageNamesArray = array_merge( $infoboxImages, (array)$imageNamesArray );
}
}
return true;
}
public static function onWgQueryPages( &$queryPages = [ ] ) {
$queryPages[] = [ 'AllinfoboxesQueryPage', 'AllInfoboxes' ];
@ -72,21 +61,6 @@ class PortableInfoboxHooks {
return true;
}
/**
* Purge articles memcache when template is edited
*
* @param $articles Array of Titles
*
* @return bool
*/
public static function onBacklinksPurge( Array $articles ) {
foreach ( $articles as $title ) {
PortableInfoboxDataService::newFromTitle( $title )->delete();
}
return true;
}
/**
* Insert a newly created infobox into querycache, and purge the list of
* infoboxes.

View file

@ -89,14 +89,12 @@
},
"Hooks": {
"ParserFirstCallInit": "PortableInfoboxParserTagController::parserTagInit",
"ParserAfterTidy": "PortableInfoboxParserTagController::replaceInfoboxMarkers",
"BeforePageDisplay": "PortableInfoboxHooks::onBeforePageDisplay",
"BeforePageDisplayMobile": "PortableInfoboxHooks::onBeforePageDisplayMobile",
"ParserAfterTidy": "PortableInfoboxParserTagController::replaceInfoboxMarkers",
"ImageServing::buildAndGetIndex": "PortableInfoboxHooks::onImageServingCollectImages",
"wgQueryPages": "PortableInfoboxHooks::onWgQueryPages",
"AllInfoboxesQueryRecached": "PortableInfoboxHooks::onAllInfoboxesQueryRecached",
"ArticlePurge": "PortableInfoboxHooks::onArticlePurge",
"BacklinksPurge": "PortableInfoboxHooks::onBacklinksPurge",
"PageContentInsertComplete": "PortableInfoboxHooks::onPageContentInsertComplete",
"PageContentSave": "PortableInfoboxHooks::onPageContentSave"
},