UniversalEditButton microoptimization :)
authorDomas Mituzas <midom@users.mediawiki.org>
Mon, 7 Sep 2009 18:54:58 +0000 (18:54 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Mon, 7 Sep 2009 18:54:58 +0000 (18:54 +0000)
includes/OutputPage.php

index ca5ea6d..3adb63b 100644 (file)
@@ -1120,16 +1120,17 @@ class OutputPage {
                        if( isset( $wgArticle ) && $this->getTitle() && $this->getTitle()->quickUserCan( 'edit' )
                                && ( $this->getTitle()->exists() || $this->getTitle()->quickUserCan( 'create' ) ) ) {
                                // Original UniversalEditButton
+                               $msg = wfMsg('edit');
                                $this->addLink( array(
                                        'rel' => 'alternate',
                                        'type' => 'application/x-wiki',
-                                       'title' => wfMsg( 'edit' ),
+                                       'title' => $msg,
                                        'href' => $this->getTitle()->getLocalURL( 'action=edit' )
                                ) );
                                // Alternate edit link
                                $this->addLink( array(
                                        'rel' => 'edit',
-                                       'title' => wfMsg( 'edit' ),
+                                       'title' => $msg,
                                        'href' => $this->getTitle()->getLocalURL( 'action=edit' )
                                ) );
                        }