Index: includes/Linker.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Linker.php,v
retrieving revision 1.70
diff -u -r1.70 Linker.php
--- includes/Linker.php	1 Feb 2006 04:34:47 -0000	1.70
+++ includes/Linker.php	5 Feb 2006 14:20:19 -0000
@@ -270,15 +276,16 @@
 	 * it doesn't have to do a database query. It's also valid for interwiki titles and special
 	 * pages.
 	 *
-	 * @param object Title of target page
-	 * @param string Text to replace the title
-	 * @param string Link target
-	 * @param string Text after link
-	 * @param string Text before link text
-	 * @param string Extra attributes to the a-element
+	 * @param object $nt Title of target page
+	 * @param string $text Text to replace the title
+	 * @param string $query Link target
+	 * @param string $trail Text after link
+	 * @param string $prefix Text before link text
+	 * @param string $aprops Extra attributes to the a-element
+	 * @param string $style Style to apply - if an empty string, use getInternalLinkAttributesObj instead
 	 * @return the a-element
 	 */
-	function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '' ) {
+	function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) {
 
 		$fname = 'Linker::makeKnownLinkObj';
 		wfProfileIn( $fname );
@@ -306,7 +313,9 @@
 		if ( '' == $text ) {
 			$text = htmlspecialchars( $nt->getPrefixedText() );
 		}
-		$style = $this->getInternalLinkAttributesObj( $nt, $text );
+		if ( '' == $style ) {
+			$style = $this->getInternalLinkAttributesObj( $nt, $text );
+		}
 
 		if ( $aprops !== '' ) $aprops = ' ' . $aprops;
 
@@ -892,12 +901,17 @@
 
 	}
 
-	/** @todo document */
-	function editSectionLink( $nt, $section ) {
+	/** 
+	 * @param Title $title
+	 * @param integer $section
+	 * @param string $hint Link title, or default if omitted or empty
+	 */
+	function editSectionLink( $nt, $section, $hint='' ) {
 		global $wgContLang;
 
 		$editurl = '&section='.$section;
-		$url = $this->makeKnownLinkObj( $nt, wfMsg('editsection'), 'action=edit'.$editurl );
+		$hint = ( $hint=='' ) ? '' : ' title="' . wfMsg( 'editsectionhint', htmlspecialchars( $hint ) ) . '"';
+		$url = $this->makeKnownLinkObj( $nt, wfMsg('editsection'), 'action=edit'.$editurl, '', '', '',  $hint );
 
 		if( $wgContLang->isRTL() ) {
 			$farside = 'left';
Index: includes/Parser.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Parser.php,v
retrieving revision 1.588
diff -u -r1.588 Parser.php
--- includes/Parser.php	3 Feb 2006 18:22:53 -0000	1.588
+++ includes/Parser.php	5 Feb 2006 14:20:25 -0000
@@ -3006,6 +3006,8 @@
 			# strip out HTML
 			$canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
 			$tocline = trim( $canonized_headline );
+			# Save headline before it's url-escaped etc for hint
+			$headline_hint=$canonized_headline; 
 			$canonized_headline = Sanitizer::escapeId( $tocline );
 			$refers[$headlineCount] = $canonized_headline;
 
@@ -3034,7 +3036,7 @@
 				if( $istemplate )
 					$head[$headlineCount] .= $sk->editSectionLinkForOther($templatetitle, $templatesection);
 				else
-					$head[$headlineCount] .= $sk->editSectionLink($this->mTitle, $sectionCount+1);
+					$head[$headlineCount] .= $sk->editSectionLink($this->mTitle, $sectionCount+1, $headline_hint);
 			}
 
 			# give headline the correct <h#> tag
Index: languages/Messages.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/languages/Messages.php,v
retrieving revision 1.3
diff -u -r1.3 Messages.php
--- languages/Messages.php	4 Feb 2006 18:42:43 -0000	1.3
+++ languages/Messages.php	5 Feb 2006 14:20:25 -0000
@@ -238,6 +238,7 @@
 'newmessageslink' => 'new messages',
 'newmessagesdifflink' => 'diff to penultimate revision',
 'editsection'=>'edit',
+'editsectionhint' => 'Edit section: $1',
 'toc' => 'Contents',
 'showtoc' => 'show',
 'hidetoc' => 'hide',
