* replace use of deprecated makeLinkObj() by link() in core
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 6 Jun 2009 15:45:43 +0000 (15:45 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 6 Jun 2009 15:45:43 +0000 (15:45 +0000)
* add FIXME where makeLinkObj was used in documentation

includes/Linker.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
includes/specials/SpecialRevisiondelete.php

index 1578bd7..b5975ba 100644 (file)
@@ -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 .= '<li>' . $this->link( $titleObj ) . ' (' . $editLink . ') ' . $protected . '</li>';
                        }
index 35b672b..e760ee0 100644 (file)
@@ -105,6 +105,7 @@ class LinkHolderArray {
        }
 
        /**
+        * FIXME: update documentation. makeLinkObj() is deprecated.
         * Replace <!--LINK--> link placeholders with actual links, in the buffer
         * Placeholders created in Skin::makeLinkObj()
         * Returns an array of link CSS classes, indexed by PDBK.
index 9d6e98e..e9c33c6 100644 (file)
@@ -4070,6 +4070,7 @@ class Parser
        }
 
        /**
+        * FIXME: update documentation. makeLinkObj() is deprecated.
         * Replace <!--LINK--> link placeholders with actual links, in the buffer
         * Placeholders created in Skin::makeLinkObj()
         * Returns an array of link CSS classes, indexed by PDBK.
index 1ab9d99..d4cbca8 100644 (file)
@@ -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'
+                                       )
                                );
                }
        }