Index: intersection/DynamicPageList.php
===================================================================
--- intersection/DynamicPageList.php (revisjon 33116)
+++ intersection/DynamicPageList.php (arbeidskopi)
@@ -62,6 +62,8 @@
// The callback function for converting the input text to HTML output
function DynamicPageList( $input ) {
+ global $wgParser;
+ global $wgMessageCache;
global $wgUser;
global $wgLang;
global $wgContLang;
@@ -70,6 +72,7 @@
$aParams = array();
$bCountSet = false;
+ $bLinkObject = true;
$sStartList = '
';
@@ -160,12 +163,28 @@
$sEndItem = '';
break;
case 'unordered':
- default:
$sStartList = '';
$sStartItem = '';
$sEndItem = '';
break;
+ default:
+ if ($sArg) {
+ $tpl = $wgMessageCache->getMsgFromNamespace('Intersection-' . $sArg);
+ if (!$tpl) $tpl = '<' . $sArg . '>';
+ $sStartList = '';
+ $sEndList = '';
+ $sStartItem = '{{' . $tpl . '|';
+ $sEndItem = '}}';
+ $bLinkObject = false;
+ }
+ else {
+ $sStartList = '';
+ $sStartItem = '';
+ $sEndItem = '';
+ }
+ break;
}
}
else if ('order' == $sType)
@@ -367,18 +386,28 @@
while ($row = $dbr->fetchObject( $res ) ) {
$title = Title::makeTitle( $row->page_namespace, $row->page_title);
$output .= $sStartItem;
- if (true == $bAddFirstCategoryDate)
- $output .= $wgLang->date($row->cl_timestamp) . ': ';
- if (true == $bShowNamespace)
- $output .= $sk->makeKnownLinkObj($title);
- else
- $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getText()));
+ if (true == $bLinkObject) {
+ if (true == $bAddFirstCategoryDate)
+ $output .= $wgLang->date($row->cl_timestamp) . ': ';
+ if (true == $bShowNamespace)
+ $output .= $sk->makeKnownLinkObj($title);
+ else
+ $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getText()));
+ }
+ else {
+ if (true == $bShowNamespace)
+ $output .= $title;
+ else
+ $output .= $title->getText();
+ if (true == $bAddFirstCategoryDate)
+ $output .= '|' . $wgLang->date($row->cl_timestamp);
+ }
$output .= $sEndItem . "\n";
}
//end unordered list
$output .= $sEndList . "\n";
- return $output;
+ return (true == $bLinkObject ? $output : $wgParser->recursiveTagParse($output));
}