@@ -249,7 +249,7 @@ public function execute()
249249
250250							case  'TOOLBOX ' :
251251								$ this  ->buildBox ('tb ' , $ this  ->get ('sidebar ' )['TOOLBOX ' ], 'toolbox ' , 'SkinTemplateToolboxEnd '  );
252- 								Hooks:: run ( 'smfCurve2AfterToolbox '  );
252+ 								(MediaWikiServices:: getInstance ()-> getHookContainer ())-> run ( 'smfCurve2AfterToolbox '  );
253253								break ;
254254
255255							case  'LANGUAGES ' :
@@ -326,7 +326,7 @@ public function execute()
326326		</div> 
327327		<!-- #footerfix --> ' ;
328328
329- 		Hooks:: run ( 'smfcurve2BeforeFooter '  );
329+ 		(MediaWikiServices:: getInstance ()-> getHookContainer ())-> run ( 'smfcurve2BeforeFooter '  );
330330
331331		if  (method_exists ($ this  , 'customPagePreFooter ' ))
332332			$ this  ->customPagePreFooter ();
@@ -404,9 +404,11 @@ public function userMenu($limitUrls = [], $inverseLimit = false, $menuID = 'u')
404404								continue ;
405405							elseif  (!empty ($ limitUrls ) && !empty ($ inverseLimit ) && in_array ($ key , $ limitUrls ))
406406								continue ;
407+ 							elseif  (empty ($ item ['href ' ]))
408+ 								continue ;
407409
408410							echo  ' 
409- 							<li data-key=" ' , $ key , '" id=" ' , Sanitizer::escapeIdForAttribute ('pt- '  . $ key ), '" ' , ($ item ['active ' ] ? ' class="active" '  : '' ), '>  
411+ 							<li data-key=" ' , $ key , '" id=" ' , Sanitizer::escapeIdForAttribute ('pt- '  . $ key ), '" ' , (! empty ( $ item ['active ' ])  ? ' class="active" '  : '' ), '>  
410412								<a href=" ' , htmlspecialchars ($ item ['href ' ]) , '" ' , (!empty ($ item ['class ' ]) ? ' class=" '  . htmlspecialchars ($ item ['class ' ]) . '" '  : '' ), '><span class="generic_icons  ' .Sanitizer::escapeIdForAttribute ($ key ).'"></span><span class="pt-itemText"> ' , htmlspecialchars ($ item ['text ' ]), '</span></a>  
411413							</li> ' ;
412414						}
@@ -542,7 +544,7 @@ function toolbox()
542544					echo  ' 
543545					<li id="t-ispermalink"> ' , $ this  ->getMsg ('permalink ' )->text (), '</li> ' ;
544546
545- 				Hooks:: run ('smfCurve2AfterToolboxEnd ' );
547+ 				(MediaWikiServices:: getInstance ()-> getHookContainer ())-> run ('smfCurve2AfterToolboxEnd ' );
546548
547549				echo  ' 
548550				</ul> 
@@ -587,7 +589,7 @@ protected function buildBox($boxName, $cont, $msg = null, $hook = null)
587589					if  ($ hook  !== null ) {
588590						// Avoid PHP 7.1 warning 
589591						$ skin  = $ this  ;
590- 						Hooks:: run ($ hook , [ &$ skin , true  ]);
592+ 						(MediaWikiServices:: getInstance ()-> getHookContainer ())-> run ($ hook , [ &$ skin , true  ]);
591593					}
592594
593595					echo  ' 
0 commit comments