r51539 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51538‎ | r51539 | r51540 >
Date:15:45, 6 June 2009
Author:siebrand
Status:ok
Tags:
Comment:
* replace use of deprecated makeLinkObj() by link() in core
* add FIXME where makeLinkObj was used in documentation
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/parser/LinkHolderArray.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/LinkHolderArray.php
@@ -105,6 +105,7 @@
106106 }
107107
108108 /**
 109+ * FIXME: update documentation. makeLinkObj() is deprecated.
109110 * Replace <!--LINK--> link placeholders with actual links, in the buffer
110111 * Placeholders created in Skin::makeLinkObj()
111112 * Returns an array of link CSS classes, indexed by PDBK.
Index: trunk/phase3/includes/parser/Parser.php
@@ -4070,6 +4070,7 @@
40714071 }
40724072
40734073 /**
 4074+ * FIXME: update documentation. makeLinkObj() is deprecated.
40744075 * Replace <!--LINK--> link placeholders with actual links, in the buffer
40754076 * Placeholders created in Skin::makeLinkObj()
40764077 * Returns an array of link CSS classes, indexed by PDBK.
Index: trunk/phase3/includes/Linker.php
@@ -1669,9 +1669,19 @@
16701670 $protected = '';
16711671 }
16721672 if( $titleObj->quickUserCan( 'edit' ) ) {
1673 - $editLink = $this->makeLinkObj( $titleObj, wfMsg('editlink'), 'action=edit' );
 1673+ $editLink = $this->link(
 1674+ $titleObj,
 1675+ wfMsg( 'editlink' ),
 1676+ array(),
 1677+ array( 'action' => 'edit' )
 1678+ );
16741679 } else {
1675 - $editLink = $this->makeLinkObj( $titleObj, wfMsg('viewsourcelink'), 'action=edit' );
 1680+ $editLink = $this->link(
 1681+ $titleObj,
 1682+ wfMsg( 'viewsourcelink' ),
 1683+ array(),
 1684+ array( 'action' => 'edit' )
 1685+ );
16761686 }
16771687 $outText .= '<li>' . $this->link( $titleObj ) . ' (' . $editLink . ') ' . $protected . '</li>';
16781688 }
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -332,7 +332,7 @@
333333
334334 $wgOut->addHTML(
335335 Xml::openElement( 'form', array( 'method' => 'post',
336 - 'action' => $this->getTitle()->getLocalUrl( 'action=submit' ),
 336+ 'action' => $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ),
337337 'id' => 'mw-revdel-form-revisions' ) ) .
338338 Xml::openElement( 'fieldset' ) .
339339 Xml::element( 'legend', null, wfMsg( 'revdelete-legend' ) ) .
@@ -1065,8 +1065,15 @@
10661066 if ( $this->isDeleted() && !$this->canView() ) {
10671067 return $date;
10681068 }
1069 - return $this->special->skin->makeLinkObj( $this->list->title, $date,
1070 - 'oldid='.$this->revision->getId() . '&unhide=1' );
 1069+ return $this->special->skin->link(
 1070+ $this->list->title,
 1071+ $date,
 1072+ array(),
 1073+ array(
 1074+ 'oldid' => $this->revision->getId(),
 1075+ 'unhide' => 1
 1076+ )
 1077+ );
10711078 }
10721079
10731080 /**
@@ -1078,10 +1085,19 @@
10791086 return wfMsgHtml('diff');
10801087 } else {
10811088 return
1082 - $this->special->skin->makeKnownLinkObj(
 1089+ $this->special->skin->link(
10831090 $this->list->title,
10841091 wfMsgHtml('diff'),
1085 - 'diff=' . $this->revision->getId() . '&oldid=prev&unhide=1'
 1092+ array()
 1093+ array(
 1094+ 'diff' => $this->revision->getId(),
 1095+ 'oldid' => 'prev',
 1096+ 'unhide' => 1
 1097+ ),
 1098+ array(
 1099+ 'known',
 1100+ 'noclasses'
 1101+ )
10861102 );
10871103 }
10881104 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r51556Follow-up to r51539: fix syntax errorsiebrand21:58, 6 June 2009

Status & tagging log