some useless calls / unitialized $matches arrays
[lhc/web/wiklou.git] / includes / SkinTemplate.php
index 4c432d2..96fb4b1 100644 (file)
@@ -144,8 +144,8 @@ class SkinTemplate extends Skin {
         */
        function outputPage( &$out ) {
                global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
-               global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
-               global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
+               global $wgScript, $wgStylePath, $wgContLanguageCode;
+               global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest;
                global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgHideInterlanguageLinks;
                global $wgMaxCredits, $wgShowCreditsIfMax;
                global $wgPageShowWatchingUsers;
@@ -357,6 +357,7 @@ class SkinTemplate extends Skin {
                $tpl->set( 'copyrightico', $this->getCopyrightIcon() );
                $tpl->set( 'poweredbyico', $this->getPoweredBy() );
                $tpl->set( 'disclaimer', $this->disclaimerLink() );
+               $tpl->set( 'privacy', $this->privacyLink() );
                $tpl->set( 'about', $this->aboutLink() );
 
                $tpl->setRef( 'debug', $out->mDebugtext );
@@ -581,8 +582,6 @@ class SkinTemplate extends Skin {
                global $wgUser, $wgRequest;
                $action = $wgRequest->getText( 'action' );
                $section = $wgRequest->getText( 'section' );
-               $oldid = $wgRequest->getVal( 'oldid' );
-               $diff = $wgRequest->getVal( 'diff' );
                $content_actions = array();
 
                if( $this->iscontent ) {
@@ -605,13 +604,12 @@ class SkinTemplate extends Skin {
 
                        wfProfileIn( "$fname-edit" );
                        if ( $this->mTitle->userCanEdit() ) {
-                               $oid = ( $oldid && ! isset( $diff ) ) ? '&oldid='.intval( $oldid ) : false;
                                $istalk = $this->mTitle->isTalkPage();
                                $istalkclass = $istalk?' istalk':'';
                                $content_actions['edit'] = array(
                                        'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ? 'selected' : '').$istalkclass,
                                        'text' => wfMsg('edit'),
-                                       'href' => $this->mTitle->getLocalUrl( 'action=edit'.$oid )
+                                       'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() )
                                );
 
                                if ( $istalk ) {
@@ -622,11 +620,10 @@ class SkinTemplate extends Skin {
                                        );
                                }
                        } else {
-                               $oid = ( $oldid && ! isset( $diff ) ) ? '&oldid='.intval( $oldid ) : '';
                                $content_actions['viewsource'] = array(
                                        'class' => ($action == 'edit') ? 'selected' : false,
                                        'text' => wfMsg('viewsource'),
-                                       'href' => $this->mTitle->getLocalUrl( 'action=edit'.$oid )
+                                       'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() )
                                );
                        }
                        wfProfileOut( "$fname-edit" );
@@ -703,7 +700,7 @@ class SkinTemplate extends Skin {
                        if( $this->loggedin || $wgValidationForAnons ) { # and $action != 'submit' ) {
                                # Validate tab. TODO: add validation to logged-in user rights
                                if($wgUseValidation && ( $action == "" || $action=='view' ) ){ # && $wgUser->isAllowed('validate')){
-                                       if ( $oldid ) $oid = intval( $oldid ) ; # Use the oldid
+                                       if ( $this->mRevisionId ) $oid = intval( $this->mRevisionId ) ; # Use the oldid
                                        else
                                                {# Trying to get the current article revision through this weird stunt
                                                $tid = $this->mTitle->getArticleID();
@@ -831,6 +828,8 @@ class SkinTemplate extends Skin {
                                                'href' => $wgTitle->getLocalURL( "oldid=$revid" )
                                        );
                        }
+                       
+                       wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', array( &$this, &$nav_urls, &$oldid, &$revid ) );
                }
 
                if( $this->mTitle->getNamespace() != NS_SPECIAL) {
@@ -987,7 +986,7 @@ class SkinTemplate extends Skin {
 
        /**
         * Code for extensions to hook into to provide per-page CSS, see
-        * extension/PageCSS/PageCSS.php for an implementation of this.
+        * extensions/PageCSS/PageCSS.php for an implementation of this.
         *
         * @access private
         */
@@ -1118,7 +1117,7 @@ class QuickTemplate {
         * @access private
         */
        function msgWiki( $str ) {
-               global $wgParser, $wgTitle, $wgOut, $wgUseTidy;
+               global $wgParser, $wgTitle, $wgOut;
 
                $text = $this->translator->translate( $str );
                $parserOutput = $wgParser->parse( $text, $wgTitle,