@@ -131,12 +131,20 @@ public function execute() {
131131 }
132132 // Output HTML Page
133133 $ this ->html ( 'headelement ' );
134+
135+ global $ Cppreference2SkinRootLink ;
136+ $ root_link = '/ ' ;
137+ if (isset ($ Cppreference2SkinRootLink )) {
138+ $ root_link = htmlspecialchars ($ Cppreference2SkinRootLink );
139+ }
134140?>
135141 <!-- header -->
136142 <div id="mw-head" class="noprint">
137143 <div id="cpp-head-first-base">
138144 <div id="cpp-head-first">
139- <h5><a href="/"><?php global $ wgSitename ; echo $ wgSitename ;?> </a></h5>
145+ <h5><a href="<?php echo $ root_link ; ?> ">
146+ <?php global $ wgSitename ; echo $ wgSitename ;?>
147+ </a></h5>
140148 <div id="cpp-head-search">
141149 <?php $ this ->renderNavigation ( 'SEARCH ' ); ?>
142150 </div>
@@ -230,7 +238,7 @@ public function execute() {
230238 </div>
231239 <!-- /footer -->
232240 <?php $ this ->printTrail (); ?>
233-
241+
234242 </body>
235243</html>
236244<?php
@@ -239,13 +247,13 @@ public function execute() {
239247 private function renderToolbox ()
240248 {
241249 $ name = 'tb ' ;
242-
250+
243251 $ content = $ this ->getToolbox ();
244252
245253 $ msg = 'toolbox ' ;
246254 $ msg_obj = wfMessage ( $ msg );
247255 $ message = htmlspecialchars ($ msg_obj ->exists () ? $ msg_obj ->text () : $ msg );
248-
256+
249257 ?>
250258 <div id="cpp-toolbox">
251259 <h5><span><?php echo $ message ; ?> </span><a href="#"></a></h5>
@@ -259,15 +267,15 @@ private function renderToolbox()
259267 </div>
260268<?php
261269 }
262-
270+
263271 private function renderBottomNavigation ()
264272 {
265273 $ content = $ this ->data ['sidebar ' ]['navigation ' ];
266274
267275 $ msg = 'navigation ' ;
268276 $ msg_obj = wfMessage ( $ msg );
269277 $ message = htmlspecialchars ($ msg_obj ->exists () ? $ msg_obj ->text () : $ msg );
270-
278+
271279 ?>
272280 <div id="cpp-navigation">
273281 <h5><?php echo $ message ; ?> </h5>
@@ -279,15 +287,15 @@ private function renderBottomNavigation()
279287 </div>
280288<?php
281289 }
282-
290+
283291 private function renderLanguages ()
284292 {
285293 $ content = $ this ->data ['language_urls ' ];
286294
287295 $ msg = 'otherlanguages ' ;
288296 $ msg_obj = wfMessage ( $ msg );
289297 $ message = htmlspecialchars ($ msg_obj ->exists () ? $ msg_obj ->text () : $ msg );
290-
298+
291299 ?>
292300 <div id="cpp-languages">
293301 <div><ul><li><?php echo $ message ; ?> </li></ul></div>
@@ -426,8 +434,8 @@ private function renderNavigation( $elements ) {
426434?>
427435 <div class="menu">
428436 <ul<?php $ this ->html ( 'userlangattributes ' ) ?> >
429- <?php foreach ( $ tools as $ key => $ item ) {
430- echo $ this ->makeListItem ( $ key , $ item );
437+ <?php foreach ( $ tools as $ key => $ item ) {
438+ echo $ this ->makeListItem ( $ key , $ item );
431439 } ?>
432440 </ul>
433441 </div>
0 commit comments