From 2fe609148c126122edbf573dd60c6c39aeea87ae Mon Sep 17 00:00:00 2001 From: Universal Omega <54654040+Universal-Omega@users.noreply.github.com> Date: Sat, 2 Oct 2021 15:00:01 -0600 Subject: [PATCH] Fix fatal "Class 'DynamicPageListHooks' not found" --- includes/Parse.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Parse.php b/includes/Parse.php index f9de2fb..25fa769 100644 --- a/includes/Parse.php +++ b/includes/Parse.php @@ -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'] ) {