* integrating UniversalEditButton extension into core (enabled by default, set $wgUniversalEditButton = false; in LocalSettings to disable)
This commit is contained in:
parent
ef18086102
commit
82d9b72bbd
3 changed files with 22 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ The following extensions are migrated into MediaWiki 1.14:
|
|||
* NoMoveUserPages
|
||||
* Special:Nuke to mass delete all pages created by a user
|
||||
* Poem (patch by Nathaniel Herman)
|
||||
* UniversalEditButton
|
||||
|
||||
=== New features in 1.14 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -3462,3 +3462,10 @@ $wgPasswordAttemptThrottle = array( 'count' => 5, 'seconds' => 300 );
|
|||
* Don't bump this, instead bump the number on [[MediaWiki:Sitenotice id]]
|
||||
*/
|
||||
$wgMajorSiteNoticeID = 1;
|
||||
|
||||
/**
|
||||
* Enable the UniversalEditButton for browsers that support it
|
||||
* (currently only Firefox with an extension)
|
||||
* See http://universaleditbutton.org for more background information
|
||||
*/
|
||||
$wgUniversalEditButton = true;
|
||||
|
|
@ -794,7 +794,8 @@ class OutputPage {
|
|||
global $wgUser, $wgOutputEncoding, $wgRequest;
|
||||
global $wgContLanguageCode, $wgDebugRedirects, $wgMimeType;
|
||||
global $wgJsMimeType, $wgUseAjax, $wgAjaxWatch;
|
||||
global $wgEnableMWSuggest;
|
||||
global $wgEnableMWSuggest, $wgUniversalEditButton;
|
||||
global $wgArticle, $wgTitle;
|
||||
|
||||
if( $this->mDoNothing ){
|
||||
return;
|
||||
|
|
@ -901,6 +902,18 @@ class OutputPage {
|
|||
$this->addScriptFile( 'rightclickedit.js' );
|
||||
}
|
||||
|
||||
if( $wgUniversalEditButton ) {
|
||||
if( isset( $wgArticle ) && isset( $wgTitle ) && $wgTitle->quickUserCan( 'edit' )
|
||||
&& ( $wgTitle->exists() || $wgTitle->quickUserCan( 'create' ) ) ) {
|
||||
$this->addLink( array(
|
||||
'rel' => 'alternate',
|
||||
'type' => 'application/x-wiki',
|
||||
'title' => wfMsg( 'edit' ),
|
||||
'href' => $wgTitle->getFullURL( 'action=edit' )
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
# Buffer output; final headers may depend on later processing
|
||||
ob_start();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue