Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -794,7 +794,8 @@ |
795 | 795 | global $wgUser, $wgOutputEncoding, $wgRequest; |
796 | 796 | global $wgContLanguageCode, $wgDebugRedirects, $wgMimeType; |
797 | 797 | global $wgJsMimeType, $wgUseAjax, $wgAjaxWatch; |
798 | | - global $wgEnableMWSuggest; |
| 798 | + global $wgEnableMWSuggest, $wgUniversalEditButton; |
| 799 | + global $wgArticle, $wgTitle; |
799 | 800 | |
800 | 801 | if( $this->mDoNothing ){ |
801 | 802 | return; |
— | — | @@ -901,6 +902,18 @@ |
902 | 903 | $this->addScriptFile( 'rightclickedit.js' ); |
903 | 904 | } |
904 | 905 | |
| 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 | + |
905 | 918 | # Buffer output; final headers may depend on later processing |
906 | 919 | ob_start(); |
907 | 920 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3462,3 +3462,10 @@ |
3463 | 3463 | * Don't bump this, instead bump the number on [[MediaWiki:Sitenotice id]] |
3464 | 3464 | */ |
3465 | 3465 | $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 @@ |
62 | 62 | * NoMoveUserPages |
63 | 63 | * Special:Nuke to mass delete all pages created by a user |
64 | 64 | * Poem (patch by Nathaniel Herman) |
| 65 | +* UniversalEditButton |
65 | 66 | |
66 | 67 | === New features in 1.14 === |
67 | 68 | |