From f8f8dd2cb25c187a1171ab79dc6df975dfe031dc Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 27 May 2009 20:35:16 +0000 Subject: [PATCH] Fix a usability issue on protect and [file ]delete forms. "Edit ... reasons" link now contains action=edit to save a click. --- includes/Article.php | 8 +++++++- includes/FileDeleteForm.php | 8 +++++++- includes/ProtectionForm.php | 9 +++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 033ecfc0aa..ac038ddc48 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2469,7 +2469,13 @@ class Article { if( $wgUser->isAllowed( 'editinterface' ) ) { $skin = $wgUser->getSkin(); - $link = $skin->makeLink ( 'MediaWiki:Deletereason-dropdown', wfMsgHtml( 'delete-edit-reasonlist' ) ); + $title = Title::newFromText( 'Deletereason-dropdown', NS_MEDIAWIKI ); + $link = $skin->link( + $title, + wfMsgHtml( 'delete-edit-reasonlist' ), + array(), + array( 'action' => 'edit' ) + ); $form .= '

' . $link . '

'; } diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 5177d35fe7..9491fd23b7 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -194,7 +194,13 @@ class FileDeleteForm { if ( $wgUser->isAllowed( 'editinterface' ) ) { $skin = $wgUser->getSkin(); - $link = $skin->makeLink ( 'MediaWiki:Filedelete-reason-dropdown', wfMsgHtml( 'filedelete-edit-reasonlist' ) ); + $title = Title::newFromText( 'filedelete-reason-dropdown', NS_MEDIAWIKI ); + $link = $skin->link( + $title, + wfMsgHtml( 'filedelete-edit-reasonlist' ), + array(), + array( 'action' => 'edit' ) + ); $form .= '

' . $link . '

'; } diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index ce7bf54bd1..ec23046ab7 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -447,8 +447,13 @@ class ProtectionForm { $out .= Xml::closeElement( 'fieldset' ); if ( $wgUser->isAllowed( 'editinterface' ) ) { - $linkTitle = Title::makeTitleSafe( NS_MEDIAWIKI, 'protect-dropdown' ); - $link = $wgUser->getSkin()->Link ( $linkTitle, wfMsgHtml( 'protect-edit-reasonlist' ) ); + $title = Title::newFromText( 'protect-dropdown', NS_MEDIAWIKI ); + $link = $wgUser->getSkin()->link( + $title, + wfMsgHtml( 'protect-edit-reasonlist' ), + array(), + array( 'action' => 'edit' ) + ); $out .= '

' . $link . '

'; } -- 2.20.1