mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 11:59:56 +00:00
Remove unused hooks
This commit is contained in:
parent
443669effa
commit
9c2295c98d
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue