r41411 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41410‎ | r41411 | r41412 >
Date:02:01, 30 September 2008
Author:mattj
Status:old (Comments)
Tags:
Comment:
Update showcurid feature to use article path. Also update to use new link functions rather than old deprecated ones.
Modified paths:
  • /trunk/extensions/intersection/DynamicPageList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/intersection/DynamicPageList.php
@@ -447,14 +447,14 @@
448448 if (true == $bAddFirstCategoryDate)
449449 $output .= $wgLang->date($row->cl_timestamp) . ': ';
450450
451 - $query = '';
 451+ $query = array();
452452 if (true == $bShowCurId)
453 - $query = 'curid='.intval($row->page_id);
 453+ $query = array( 'curid' => intval($row->page_id) );
454454
455455 if (true == $bShowNamespace)
456 - $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getPrefixedText()),$query);
 456+ $output .= $sk->link($title, htmlspecialchars($title->getPrefixedText()), array(), $query, array( 'forcearticlepath', 'known' ) );
457457 else
458 - $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getText()),$query);
 458+ $output .= $sk->link($title, htmlspecialchars($title->getText()), array(), $query, array( 'forcearticlepath', 'known' ) );
459459
460460 $output .= $sEndItem . "\n";
461461 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r41462Simplify ugly code a bit i noticed in r41411brion01:29, 1 October 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   01:20, 1 October 2008

(Uses r41410 updates)

Note that use of new Linker::link() means this version of the extension won't work on old MediaWiki anymore, but that's why we have extension branches! :)

Probably would be good here to cleanup the code a little to avoid the extra duplication of params in the call.

#Comment by Brion VIBBER (talk | contribs)   01:29, 1 October 2008

done in r41462

Status & tagging log