Partial revert of r32982; old Title method is fine here
[lhc/web/wiklou.git] / includes / SkinTemplate.php
index 0178b86..afa96c3 100644 (file)
@@ -139,10 +139,6 @@ class SkinTemplate extends Skin {
                $fname = 'SkinTemplate::outputPage';
                wfProfileIn( $fname );
 
-               // Hook that allows last minute changes to the output page, e.g.
-               // adding of CSS or Javascript by extensions.
-               wfRunHooks( 'BeforePageDisplay', array( &$out ) );
-
                $oldid = $wgRequest->getVal( 'oldid' );
                $diff = $wgRequest->getVal( 'diff' );
 
@@ -397,7 +393,7 @@ class SkinTemplate extends Skin {
                $tpl->set( 'about', $this->aboutLink() );
 
                $tpl->setRef( 'debug', $out->mDebugtext );
-               $tpl->set( 'reporttime', $out->reportTime() );
+               $tpl->set( 'reporttime', wfReportTime() );
                $tpl->set( 'sitenotice', wfGetSiteNotice() );
                $tpl->set( 'bottomscripts', $this->bottomScripts() );
 
@@ -596,7 +592,7 @@ class SkinTemplate extends Skin {
                $text = wfMsg( $message );
                if ( wfEmptyMsg( $message, $text ) ) {
                        global $wgContLang;
-                       $text = $wgContLang->getFormattedNsText( Namespace::getSubject( $title->getNamespace() ) );
+                       $text = $wgContLang->getFormattedNsText( MWNamespace::getSubject( $title->getNamespace() ) );
                }
                
                $result = array();
@@ -677,7 +673,9 @@ class SkinTemplate extends Skin {
                                $istalkclass = $istalk?' istalk':'';
                                $content_actions['edit'] = array(
                                        'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ? 'selected' : '').$istalkclass,
-                                       'text' => wfMsg('edit'),
+                                       'text' => $this->mTitle->exists()
+                                               ? wfMsg( 'edit' )
+                                               : wfMsg( 'create' ),
                                        'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() )
                                );
 
@@ -836,14 +834,12 @@ class SkinTemplate extends Skin {
         * @private
         */
        function buildNavUrls () {
-               global $wgUseTrackbacks, $wgTitle, $wgArticle;
+               global $wgUseTrackbacks, $wgTitle, $wgUser, $wgRequest;
+               global $wgEnableUploads, $wgUploadNavigationUrl;
 
                $fname = 'SkinTemplate::buildNavUrls';
                wfProfileIn( $fname );
 
-               global $wgUser, $wgRequest;
-               global $wgEnableUploads, $wgUploadNavigationUrl;
-
                $action = $wgRequest->getText( 'action' );
 
                $nav_urls = array();