From ef74c0a1783428b1065e2ff03bf97a3468053316 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 17 Feb 2011 18:41:44 +0000 Subject: [PATCH] Followup bug #27447 and r82308 and r82328 with patch supplied by Carsten Nielsen to take care of the warning and supply some documentation. Also fixed up language in the comments. --- includes/EditPage.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 9db10d76e8..e8bfd95b25 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2256,16 +2256,19 @@ HTML $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos ); /** - - * toolarray an array of arrays which each include the filename of - * the button image (without path), the opening tag, the closing tag, - * and optionally a sample text that is inserted between the two when no - * selection is highlighted. - * The tip text is shown when the user moves the mouse over the button. + * $toolarray is an array of arrays each of which includes the + * filename of the button image (without path), the opening + * tag, the closing tag, optionally a sample text that is + * inserted between the two when no selection is highlighted + * and an option to select which switches the automatic + * selection of inserted text (default is true, see + * mw-editbutton-image). The tip text is shown when the user + * moves the mouse over the button. * - * Already here are accesskeys (key), which are not used yet until someone - * can figure out a way to make them work in IE. However, we should make - * sure these keys are not defined on the edit page. + * Also here: accesskeys (key), which are not used yet until + * someone can figure out a way to make them work in + * IE. However, we should make sure these keys are not defined + * on the edit page. */ $toolarray = array( array( @@ -2320,7 +2323,8 @@ HTML 'close' => ']]', 'sample' => wfMsg( 'image_sample' ), 'tip' => wfMsg( 'image_tip' ), - 'key' => 'D' + 'key' => 'D', + 'select' => true ) : false, $imagesAvailable ? array( 'image' => $wgLang->getImageFile( 'button-media' ), @@ -2376,6 +2380,10 @@ HTML continue; } + if( !isset( $tool['select'] ) ) { + $tool['select'] = true; + } + $params = array( $image = $wgStylePath . '/common/images/' . $tool['image'], // Note that we use the tip both for the ALT tag and the TITLE tag of the image. -- 2.20.1