When reading from meta's interwiki map, *.wikimedia.org should be set as local (e...
[lhc/web/wiklou.git] / includes / SkinTemplate.php
index a018e84..ac215ce 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if ( ! defined( 'MEDIAWIKI' ) )
-       die();
+       die( -1 );
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -538,12 +538,12 @@ class SkinTemplate extends Skin {
                        $classes[] = 'new';
                        $query = 'action=edit';
                }
-               
+
                $text = wfMsg( $message );
                if ( $text == "&lt;$message&gt;" ) {
                        $text = html_entity_decode($text);
                }
-               
+
                return array(
                        'class' => implode( ' ', $classes ),
                        'text' => $text,
@@ -700,7 +700,7 @@ class SkinTemplate extends Skin {
                                        );
                                }
                        }
-                       
+
                        wfRunHooks( 'SkinTemplateTabs', array( &$this , &$content_actions ) )   ;
                } else {
                        /* show special page tab */
@@ -738,7 +738,7 @@ class SkinTemplate extends Skin {
                }
 
                wfRunHooks( 'SkinTemplateContentActions', array( &$content_actions ) );
-               
+
                wfProfileOut( $fname );
                return $content_actions;
        }
@@ -764,15 +764,7 @@ class SkinTemplate extends Skin {
                $diff = $wgRequest->getVal( 'diff' );
 
                $nav_urls = array();
-               $nav_urls['mainpage'] = array('href' => $this->makeI18nUrl('mainpage'));
-               $nav_urls['randompage'] = array('href' => $this->makeSpecialUrl('Random'));
-               $nav_urls['recentchanges'] = array('href' => $this->makeSpecialUrl('Recentchanges'));
-               $nav_urls['currentevents'] = (wfMsgForContent('currentevents') != '-') ? array('href' => $this->makeI18nUrl('currentevents')) : false;
-               $nav_urls['portal'] =  (wfMsgForContent('portal') != '-') ? array('href' => $this->makeI18nUrl('portal-url')) : false;
-               $nav_urls['bugreports'] = array('href' => $this->makeI18nUrl('bugreportspage'));
-               // $nav_urls['sitesupport'] = array('href' => $this->makeI18nUrl('sitesupportpage'));
-               $nav_urls['sitesupport'] = array('href' => $wgSiteSupportPage);
-               $nav_urls['help'] = array('href' => $this->makeI18nUrl('helppage'));
+                $nav_urls['mainpage'] = array('href' => $this->makeI18nUrl('mainpage'));
                if( $wgEnableUploads ) {
                        if ($wgUploadNavigationUrl) {
                                $nav_urls['upload'] = array('href' => $wgUploadNavigationUrl );
@@ -811,7 +803,7 @@ class SkinTemplate extends Skin {
                                                'href' => $wgTitle->getLocalURL( "oldid=$revid" )
                                        );
                        }
-                       
+
                        wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', array( &$this, &$nav_urls, &$oldid, &$revid ) );
                }
 
@@ -934,9 +926,9 @@ class SkinTemplate extends Skin {
 
                # If we use the site's dynamic CSS, throw that in, too
                if ( $wgUseSiteCss ) {
-                       $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";            
+                       $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
                        $sitecss .= '@import "' . $this->makeNSUrl('Common.css', $query, NS_MEDIAWIKI) . '";' . "\n";
-                       $sitecss .= '@import "' . $this->makeNSUrl(ucfirst($this->skinname) . '.css', $query, NS_MEDIAWIKI) . '";' . "\n";                      
+                       $sitecss .= '@import "' . $this->makeNSUrl(ucfirst($this->skinname) . '.css', $query, NS_MEDIAWIKI) . '";' . "\n";
                        $sitecss .= '@import "' . $this->makeUrl('-','action=raw&gen=css' . $siteargs) . '";' . "\n";
                }
 
@@ -979,7 +971,8 @@ class SkinTemplate extends Skin {
                $fname = 'SkinTemplate::setupPageCss';
                wfProfileIn( $fname );
                $out = false;
-               wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out, $this->mTitle->isProtected() ) );
+               wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) );
+               
                wfProfileOut( $fname );
                return $out;
        }