Index: trunk/extensions/intersection/DynamicPageList.php |
— | — | @@ -642,7 +642,7 @@ |
643 | 643 | if ( $inlineMode ) { |
644 | 644 | $output .= $wgContLang->commaList( $articleList ); |
645 | 645 | } else { |
646 | | - $output .= implode( "$endItem \n $startItem", $articleList ); |
| 646 | + $output .= implode( "$endItem \n$startItem", $articleList ); |
647 | 647 | } |
648 | 648 | $output .= $endItem; |
649 | 649 | $output .= $endList . "\n"; |
Index: trunk/extensions/intersection/DynamicPageList.tests.txt |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | ## varries depending on today's date. |
17 | 17 | ## *gallery stuff (lack of images) |
18 | 18 | ## *some order methods, due to lack of flexibity in page creation |
| 19 | +## googlehack (dpl_id) stuff because page_id changes depending on other tests. |
19 | 20 | |
20 | 21 | !! article |
21 | 22 | DPLTest1 |
— | — | @@ -68,8 +69,8 @@ |
69 | 70 | !!result |
70 | 71 | <ul> |
71 | 72 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
72 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
73 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 73 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 74 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
74 | 75 | |
75 | 76 | !!end |
76 | 77 | |
— | — | @@ -84,30 +85,32 @@ |
85 | 86 | !!result |
86 | 87 | <ul> |
87 | 88 | <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li> |
88 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
89 | | - <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li></ul> |
| 89 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 90 | +<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li></ul> |
90 | 91 | |
91 | 92 | !!end |
92 | 93 | |
93 | 94 | # Depnds on page id of other pages |
94 | 95 | # so could break depending on other tests |
95 | 96 | # if they get different page id |
96 | | -!!test |
97 | | -dpl_id |
98 | | -!!input |
99 | | -<DynamicPageList> |
100 | | -category=DPLtest |
101 | | -googlehack=true |
102 | | -</DynamicPageList> |
103 | | -!!result |
104 | | -<ul> |
105 | | -<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!?dpl_id=53">Yet another DPL test page!</a></li> |
106 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2?dpl_id=51">Talk:DPLTest2</a></li> |
107 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1?dpl_id=50">DPLTest1</a></li></ul> |
| 97 | +# |
| 98 | +# Low and behold that actually does happen. Commenting out. |
| 99 | +#!!test |
| 100 | +#dpl_id |
| 101 | +#!!input |
| 102 | +#<DynamicPageList> |
| 103 | +#category=DPLtest |
| 104 | +#googlehack=true |
| 105 | +#</DynamicPageList> |
| 106 | +#!!result |
| 107 | +#<ul> |
| 108 | +#<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!?dpl_id=53">Yet another DPL test page!</a></li> |
| 109 | +#<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2?dpl_id=51">Talk:DPLTest2</a></li> |
| 110 | +#<li><a href="https://www.mediawiki.org/wiki/DPLTest1?dpl_id=50">DPLTest1</a></li></ul> |
| 111 | +# |
| 112 | +#!!end |
108 | 113 | |
109 | | -!!end |
110 | 114 | |
111 | | - |
112 | 115 | !!test |
113 | 116 | nofollow |
114 | 117 | !!input |
— | — | @@ -118,8 +121,8 @@ |
119 | 122 | !!result |
120 | 123 | <ul> |
121 | 124 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!" rel="nofollow">Yet another DPL test page!</a></li> |
122 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2" rel="nofollow">Talk:DPLTest2</a></li> |
123 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1" rel="nofollow">DPLTest1</a></li></ul> |
| 125 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2" rel="nofollow">Talk:DPLTest2</a></li> |
| 126 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1" rel="nofollow">DPLTest1</a></li></ul> |
124 | 127 | |
125 | 128 | !!end |
126 | 129 | |
— | — | @@ -237,7 +240,7 @@ |
238 | 241 | !!result |
239 | 242 | <ul> |
240 | 243 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
241 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 244 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
242 | 245 | |
243 | 246 | !!end |
244 | 247 | |
— | — | @@ -265,9 +268,9 @@ |
266 | 269 | !!result |
267 | 270 | <ul> |
268 | 271 | <li><a href="https://www.mediawiki.org/wiki/DPLRedir" class="mw-redirect">DPLRedir</a></li> |
269 | | - <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
270 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
271 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 272 | +<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
| 273 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 274 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
272 | 275 | |
273 | 276 | !!end |
274 | 277 | |
— | — | @@ -297,8 +300,8 @@ |
298 | 301 | !!result |
299 | 302 | <ul> |
300 | 303 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
301 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
302 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 304 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 305 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
303 | 306 | |
304 | 307 | !!end |
305 | 308 | |
— | — | @@ -312,8 +315,8 @@ |
313 | 316 | !!result |
314 | 317 | <ul> |
315 | 318 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
316 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
317 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 319 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 320 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
318 | 321 | |
319 | 322 | !!end |
320 | 323 | |
— | — | @@ -328,8 +331,8 @@ |
329 | 332 | !!result |
330 | 333 | <ul> |
331 | 334 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
332 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
333 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 335 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 336 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
334 | 337 | |
335 | 338 | !!end |
336 | 339 | !!test |
— | — | @@ -342,8 +345,8 @@ |
343 | 346 | !!result |
344 | 347 | <ul> |
345 | 348 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
346 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
347 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 349 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 350 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
348 | 351 | |
349 | 352 | !!end |
350 | 353 | |
— | — | @@ -357,8 +360,8 @@ |
358 | 361 | !!result |
359 | 362 | <ol> |
360 | 363 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
361 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
362 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ol> |
| 364 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 365 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ol> |
363 | 366 | |
364 | 367 | !!end |
365 | 368 | |
— | — | @@ -371,10 +374,10 @@ |
372 | 375 | mode=none |
373 | 376 | </DynamicPageList> |
374 | 377 | !!result |
375 | | -<a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a><br /> |
| 378 | +<p><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a><br /> |
376 | 379 | <a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a><br /> |
377 | 380 | <a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a><br /> |
378 | | - |
| 381 | +</p> |
379 | 382 | !!end |
380 | 383 | |
381 | 384 | !!test |
— | — | @@ -395,7 +398,6 @@ |
396 | 399 | !!input |
397 | 400 | <DynamicPageList> |
398 | 401 | category=DPLtest |
399 | | -addfirstcategorydate=ymd |
400 | 402 | imagewidth=70 |
401 | 403 | galleryshowfilesize=yes |
402 | 404 | galleryshowfilename=yes |
— | — | @@ -410,7 +412,7 @@ |
411 | 413 | <div style="height: 150px;">Yet another DPL test page!</div> |
412 | 414 | <div class="gallerytext"> |
413 | 415 | <p><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!" title="Yet another DPL test page!">Yet another DPL test...</a><br /> |
414 | | -<span class="mw-formatted-date" title="2011-03-07">2011 March 7</span> File missing<br /> |
| 416 | +File missing<br /> |
415 | 417 | </p> |
416 | 418 | </div> |
417 | 419 | </div></li> |
— | — | @@ -418,7 +420,7 @@ |
419 | 421 | <div style="height: 150px;">DPLTest2</div> |
420 | 422 | <div class="gallerytext"> |
421 | 423 | <p><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2" title="Talk:DPLTest2">DPLTest2</a><br /> |
422 | | -<span class="mw-formatted-date" title="2011-03-07">2011 March 7</span> File missing<br /> |
| 424 | +File missing<br /> |
423 | 425 | </p> |
424 | 426 | </div> |
425 | 427 | </div></li> |
— | — | @@ -426,7 +428,7 @@ |
427 | 429 | <div style="height: 150px;">DPLTest1</div> |
428 | 430 | <div class="gallerytext"> |
429 | 431 | <p><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a><br /> |
430 | | -<span class="mw-formatted-date" title="2011-03-07">2011 March 7</span> File missing<br /> |
| 432 | +File missing<br /> |
431 | 433 | </p> |
432 | 434 | </div> |
433 | 435 | </div></li> |
— | — | @@ -555,8 +557,8 @@ |
556 | 558 | !!result |
557 | 559 | <ul> |
558 | 560 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
559 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
560 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 561 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 562 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
561 | 563 | |
562 | 564 | !!end |
563 | 565 | |
— | — | @@ -589,8 +591,8 @@ |
590 | 592 | !!result |
591 | 593 | <ul> |
592 | 594 | <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
593 | | - <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
594 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 595 | +<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
| 596 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
595 | 597 | |
596 | 598 | !!end |
597 | 599 | |
— | — | @@ -604,8 +606,8 @@ |
605 | 607 | !!result |
606 | 608 | <ul> |
607 | 609 | <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
608 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
609 | | - <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 610 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 611 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
610 | 612 | |
611 | 613 | !!end |
612 | 614 | |
— | — | @@ -621,8 +623,27 @@ |
622 | 624 | !!result |
623 | 625 | <ul> |
624 | 626 | <li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li> |
625 | | - <li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
626 | | - <li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li></ul> |
| 627 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 628 | +<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li></ul> |
627 | 629 | |
628 | 630 | !!end |
629 | 631 | |
| 632 | +# Check {{PAGENAME}} in category clause (dates variables are somewhat more common, but |
| 633 | +# this is easier to check. |
| 634 | +# |
| 635 | +# using {{PAGENAME:DPLtest}} because dpl uses a weird (and probably wrong way) of |
| 636 | +# expanding {{PAGENAME}} and friends, which doesn't work with parsertests and |
| 637 | +# the title= option. |
| 638 | +!!test |
| 639 | +Magic word in category clause |
| 640 | +!!input |
| 641 | +<DynamicPageList> |
| 642 | +category={{PAGENAME:DPLtest}} |
| 643 | +</DynamicPageList> |
| 644 | +!!result |
| 645 | +<ul> |
| 646 | +<li><a href="https://www.mediawiki.org/wiki/Yet_another_DPL_test_page!">Yet another DPL test page!</a></li> |
| 647 | +<li><a href="https://www.mediawiki.org/wiki/Talk:DPLTest2">Talk:DPLTest2</a></li> |
| 648 | +<li><a href="https://www.mediawiki.org/wiki/DPLTest1">DPLTest1</a></li></ul> |
| 649 | + |
| 650 | +!!end |