r43003 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43002‎ | r43003 | r43004 >
Date:17:55, 1 November 2008
Author:brion
Status:old
Tags:
Comment:
use makeLinkObj() instead of link() so it works on 1.13
Modified paths:
  • /branches/CentralNotice-SpecialPage-Integration/SpecialCentralNotice.php (modified) (history)
  • /branches/CentralNotice-SpecialPage-Integration/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: branches/CentralNotice-SpecialPage-Integration/SpecialCentralNotice.php
@@ -205,7 +205,7 @@
206206 }
207207
208208 $htmlOut .= Xml::tags( 'td', $style,
209 - $sk->link( $title, htmlspecialchars( $msg ) )
 209+ $sk->makeLinkObj( $title, htmlspecialchars( $msg ) )
210210 );
211211 }
212212 $htmlOut .= Xml::closeElement( 'tr' );
@@ -364,12 +364,9 @@
365365 $fields = array();
366366
367367 // Name
368 - $fields[] = $sk->link( $this->getTitle(),
 368+ $fields[] = $sk->makeLinkObj( $this->getTitle(),
369369 htmlspecialchars( $row->not_name ),
370 - array(),
371 - array(
372 - 'method' => 'listNoticeDetail',
373 - 'notice' => $row->not_name ) );
 370+ 'method=listNoticeDetail&notice=' . urlencode( $row->not_name ) );
374371
375372 // Project
376373 $fields[] = htmlspecialchars( $this->getProjectName( $row->not_project ) );
@@ -724,10 +721,9 @@
725722 global $wgRequest;
726723 $render->language = $wgRequest->getVal( 'wpUserLanguage' );
727724 $htmlOut .= Xml::tags( 'td', null,
728 - $sk->link( $viewPage,
 725+ $sk->makeLinkObj( $viewPage,
729726 htmlspecialchars( $row->tmp_name ),
730 - array(),
731 - array( 'template' => $row->tmp_name ) ) .
 727+ 'template=' . urlencode( $row->tmp_name ) ) .
732728 Xml::fieldset( wfMsg( 'centralnotice-preview' ),
733729 $render->getHtmlNotice( $row->tmp_name )
734730 )
@@ -808,10 +804,9 @@
809805 global $wgRequest;
810806 $render->language = $wgRequest->getVal( 'wpUserLanguage' );
811807 $htmlOut .= Xml::tags( 'td', null,
812 - $sk->link( $viewPage,
 808+ $sk->makeLinkObj( $viewPage,
813809 htmlspecialchars( $row->tmp_name ),
814 - array(),
815 - array( 'template' => $row->tmp_name ) ) .
 810+ 'template=' . urlencode( $row->tmp_name ) ) .
816811 Xml::fieldset( wfMsg( 'centralnotice-preview' ),
817812 $render->getHtmlNotice( $row->tmp_name )
818813 )
Index: branches/CentralNotice-SpecialPage-Integration/SpecialNoticeTemplate.php
@@ -147,10 +147,9 @@
148148 $render->project = 'wikipedia';
149149 $render->language = $wgRequest->getVal( 'wpUserLanguage' );
150150 $htmlOut .= Xml::tags( 'td', null,
151 - $sk->link( $viewPage,
 151+ $sk->makeLinkObj( $viewPage,
152152 htmlspecialchars( $templateName ),
153 - array(),
154 - array( 'template' => $templateName ) ) .
 153+ 'template=' . urlencode( $templateName ) ) .
155154 Xml::fieldset( wfMsg( 'centralnotice-preview' ),
156155 $render->getHtmlNotice( $templateName )
157156 )
@@ -174,7 +173,7 @@
175174
176175 // Show add link
177176 $newPage = SpecialPage::getTitleFor( 'NoticeTemplate/add' );
178 - $htmlOut .= $sk->link( $newPage, wfMsgHtml( 'centralnotice-add-template' ) );
 177+ $htmlOut .= $sk->makeLinkObj( $newPage, wfMsgHtml( 'centralnotice-add-template' ) );
179178
180179 // Output HTML
181180 $wgOut->addHtml( $htmlOut );
@@ -270,7 +269,7 @@
271270
272271 $title = Title::newFromText( "MediaWiki:{$message}" );
273272 $htmlOut .= Xml::tags( 'td', null,
274 - $sk->link( $title, htmlspecialchars( $field ) )
 273+ $sk->makeLinkObj( $title, htmlspecialchars( $field ) )
275274 );
276275
277276 $htmlOut .= Xml::element( 'td', null, $count);

Status & tagging log