r41916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41915‎ | r41916 | r41917 >
Date:01:15, 10 October 2008
Author:skizzerz
Status:old
Tags:extension merge 
Comment:
* integrating UniversalEditButton extension into core (enabled by default, set $wgUniversalEditButton = false; in LocalSettings to disable)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -794,7 +794,8 @@
795795 global $wgUser, $wgOutputEncoding, $wgRequest;
796796 global $wgContLanguageCode, $wgDebugRedirects, $wgMimeType;
797797 global $wgJsMimeType, $wgUseAjax, $wgAjaxWatch;
798 - global $wgEnableMWSuggest;
 798+ global $wgEnableMWSuggest, $wgUniversalEditButton;
 799+ global $wgArticle, $wgTitle;
799800
800801 if( $this->mDoNothing ){
801802 return;
@@ -901,6 +902,18 @@
902903 $this->addScriptFile( 'rightclickedit.js' );
903904 }
904905
 906+ if( $wgUniversalEditButton ) {
 907+ if( isset( $wgArticle ) && isset( $wgTitle ) && $wgTitle->quickUserCan( 'edit' )
 908+ && ( $wgTitle->exists() || $wgTitle->quickUserCan( 'create' ) ) ) {
 909+ $this->addLink( array(
 910+ 'rel' => 'alternate',
 911+ 'type' => 'application/x-wiki',
 912+ 'title' => wfMsg( 'edit' ),
 913+ 'href' => $wgTitle->getFullURL( 'action=edit' )
 914+ ) );
 915+ }
 916+ }
 917+
905918 # Buffer output; final headers may depend on later processing
906919 ob_start();
907920
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3462,3 +3462,10 @@
34633463 * Don't bump this, instead bump the number on [[MediaWiki:Sitenotice id]]
34643464 */
34653465 $wgMajorSiteNoticeID = 1;
 3466+
 3467+/**
 3468+* Enable the UniversalEditButton for browsers that support it
 3469+* (currently only Firefox with an extension)
 3470+* See http://universaleditbutton.org for more background information
 3471+*/
 3472+$wgUniversalEditButton = true;
\ No newline at end of file
Index: trunk/phase3/RELEASE-NOTES
@@ -61,6 +61,7 @@
6262 * NoMoveUserPages
6363 * Special:Nuke to mass delete all pages created by a user
6464 * Poem (patch by Nathaniel Herman)
 65+* UniversalEditButton
6566
6667 === New features in 1.14 ===
6768

Status & tagging log