Fix fatal "Class 'DynamicPageListHooks' not found"

This commit is contained in:
Universal Omega 2021-10-02 15:00:01 -06:00 committed by GitHub
parent 2c04dafb37
commit 2fe609148c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -961,15 +961,15 @@ class Parse {
}
// Register a hook to reset links which were produced during parsing DPL output.
if ( !isset( $wgHooks['ParserAfterTidy'] ) || !is_array( $wgHooks['ParserAfterTidy'] ) || !in_array( 'DynamicPageListHooks::endReset', $wgHooks['ParserAfterTidy'] ) ) {
$wgHooks['ParserAfterTidy'][] = 'DynamicPageListHooks::endReset';
if ( !isset( $wgHooks['ParserAfterTidy'] ) || !is_array( $wgHooks['ParserAfterTidy'] ) || !in_array( 'DPL\\DynamicPageListHooks::endReset', $wgHooks['ParserAfterTidy'] ) ) {
$wgHooks['ParserAfterTidy'][] = 'DPL\\DynamicPageListHooks::endReset';
}
}
if ( array_sum( $eliminate ) ) {
// Register a hook to reset links which were produced during parsing DPL output
if ( !isset( $wgHooks['ParserAfterTidy'] ) || !is_array( $wgHooks['ParserAfterTidy'] ) || !in_array( 'DynamicPageListHooks::endEliminate', $wgHooks['ParserAfterTidy'] ) ) {
$wgHooks['ParserAfterTidy'][] = 'DynamicPageListHooks::endEliminate';
if ( !isset( $wgHooks['ParserAfterTidy'] ) || !is_array( $wgHooks['ParserAfterTidy'] ) || !in_array( 'DPL\\DynamicPageListHooks::endEliminate', $wgHooks['ParserAfterTidy'] ) ) {
$wgHooks['ParserAfterTidy'][] = 'DPL\\DynamicPageListHooks::endEliminate';
}
if ( isset( $eliminate['links'] ) && $eliminate['links'] ) {