From: Siebrand Mazeland Date: Sat, 6 Jun 2009 15:45:43 +0000 (+0000) Subject: * replace use of deprecated makeLinkObj() by link() in core X-Git-Tag: 1.31.0-rc.0~41478 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=055fcbd7cb72319516d545a7aa11f41561827b0f;p=lhc%2Fweb%2Fwiklou.git * replace use of deprecated makeLinkObj() by link() in core * add FIXME where makeLinkObj was used in documentation --- diff --git a/includes/Linker.php b/includes/Linker.php index 1578bd7b3a..b5975ba1ea 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1669,9 +1669,19 @@ class Linker { $protected = ''; } if( $titleObj->quickUserCan( 'edit' ) ) { - $editLink = $this->makeLinkObj( $titleObj, wfMsg('editlink'), 'action=edit' ); + $editLink = $this->link( + $titleObj, + wfMsg( 'editlink' ), + array(), + array( 'action' => 'edit' ) + ); } else { - $editLink = $this->makeLinkObj( $titleObj, wfMsg('viewsourcelink'), 'action=edit' ); + $editLink = $this->link( + $titleObj, + wfMsg( 'viewsourcelink' ), + array(), + array( 'action' => 'edit' ) + ); } $outText .= '
  • ' . $this->link( $titleObj ) . ' (' . $editLink . ') ' . $protected . '
  • '; } diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 35b672b94f..e760ee0566 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -105,6 +105,7 @@ class LinkHolderArray { } /** + * FIXME: update documentation. makeLinkObj() is deprecated. * Replace link placeholders with actual links, in the buffer * Placeholders created in Skin::makeLinkObj() * Returns an array of link CSS classes, indexed by PDBK. diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 9d6e98eb97..e9c33c619a 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4070,6 +4070,7 @@ class Parser } /** + * FIXME: update documentation. makeLinkObj() is deprecated. * Replace link placeholders with actual links, in the buffer * Placeholders created in Skin::makeLinkObj() * Returns an array of link CSS classes, indexed by PDBK. diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 1ab9d99f87..d4cbca8ab9 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -332,7 +332,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalUrl( 'action=submit' ), + 'action' => $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ), 'id' => 'mw-revdel-form-revisions' ) ) . Xml::openElement( 'fieldset' ) . Xml::element( 'legend', null, wfMsg( 'revdelete-legend' ) ) . @@ -1065,8 +1065,15 @@ class RevDel_RevisionItem extends RevDel_Item { if ( $this->isDeleted() && !$this->canView() ) { return $date; } - return $this->special->skin->makeLinkObj( $this->list->title, $date, - 'oldid='.$this->revision->getId() . '&unhide=1' ); + return $this->special->skin->link( + $this->list->title, + $date, + array(), + array( + 'oldid' => $this->revision->getId(), + 'unhide' => 1 + ) + ); } /** @@ -1078,10 +1085,19 @@ class RevDel_RevisionItem extends RevDel_Item { return wfMsgHtml('diff'); } else { return - $this->special->skin->makeKnownLinkObj( + $this->special->skin->link( $this->list->title, wfMsgHtml('diff'), - 'diff=' . $this->revision->getId() . '&oldid=prev&unhide=1' + array() + array( + 'diff' => $this->revision->getId(), + 'oldid' => 'prev', + 'unhide' => 1 + ), + array( + 'known', + 'noclasses' + ) ); } }