Index: trunk/extensions/intersection/DynamicPageList.php |
— | — | @@ -89,6 +89,8 @@ |
90 | 90 | |
91 | 91 | $bNamespace = false; |
92 | 92 | $iNamespace = 0; |
| 93 | + |
| 94 | + $bShowCurId = false; |
93 | 95 | |
94 | 96 | $bSuppressErrors = false; |
95 | 97 | $bShowNamespace = true; |
— | — | @@ -270,6 +272,13 @@ |
271 | 273 | else |
272 | 274 | $bShowNamespace = true; |
273 | 275 | } |
| 276 | + else if ('showcurid' == $sType ) |
| 277 | + { |
| 278 | + if ('false' == $sArg) |
| 279 | + $bShowCurId = false; |
| 280 | + else |
| 281 | + $bShowCurId = true; |
| 282 | + } |
274 | 283 | } |
275 | 284 | |
276 | 285 | $iCatCount = count($aCategories); |
— | — | @@ -325,7 +334,7 @@ |
326 | 335 | $dbr =& wfGetDB( DB_SLAVE ); |
327 | 336 | $sPageTable = $dbr->tableName( 'page' ); |
328 | 337 | $categorylinks = $dbr->tableName( 'categorylinks' ); |
329 | | - $sSqlSelectFrom = "SELECT page_namespace, page_title, c1.cl_timestamp FROM $sPageTable"; |
| 338 | + $sSqlSelectFrom = "SELECT page_namespace, page_title, page_id, c1.cl_timestamp FROM $sPageTable"; |
330 | 339 | |
331 | 340 | if (true == $bNamespace) |
332 | 341 | $sSqlWhere = ' WHERE page_namespace='.$iNamespace.' '; |
— | — | @@ -422,9 +431,9 @@ |
423 | 432 | if ($dbr->numRows( $res ) == 0) |
424 | 433 | { |
425 | 434 | if (false == $bSuppressErrors) |
426 | | - return htmlspecialchars( wfMsg( 'intersection_noresults' ) ); |
| 435 | + return htmlspecialchars( wfMsg( 'intersection_noresults' ) ); |
427 | 436 | else |
428 | | - return ''; |
| 437 | + return ''; |
429 | 438 | } |
430 | 439 | |
431 | 440 | //start unordered list |
— | — | @@ -438,10 +447,15 @@ |
439 | 448 | if (true == $bAddFirstCategoryDate) |
440 | 449 | $output .= $wgLang->date($row->cl_timestamp) . ': '; |
441 | 450 | |
| 451 | + $query = ''; |
| 452 | + if (true == $bShowCurId) |
| 453 | + $query = 'curid='.intval($row->page_id); |
| 454 | + |
442 | 455 | if (true == $bShowNamespace) |
443 | | - $output .= $sk->makeKnownLinkObj($title); |
| 456 | + $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getPrefixedText()),$query); |
444 | 457 | else |
445 | | - $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getText())); |
| 458 | + $output .= $sk->makeKnownLinkObj($title, htmlspecialchars($title->getText()),$query); |
| 459 | + |
446 | 460 | $output .= $sEndItem . "\n"; |
447 | 461 | } |
448 | 462 | |