Index: trunk/extensions/Wikilog/SpecialWikilog.php |
— | — | @@ -403,7 +403,12 @@ |
404 | 404 | $query = new WikilogItemQuery(); |
405 | 405 | $query->setPubStatus( $opts['show'] ); |
406 | 406 | if ( ( $t = $opts['wikilog'] ) ) { |
407 | | - $query->setWikilogTitle( Title::newFromText( $t ) ); |
| 407 | + $t = Title::newFromText( $t ); |
| 408 | + if ( $t->getText() == '*' ) { |
| 409 | + $query->setNamespace( $t->getNamespace() ); |
| 410 | + } else { |
| 411 | + $query->setWikilogTitle( $t ); |
| 412 | + } |
408 | 413 | } |
409 | 414 | if ( ( $t = $opts['category'] ) ) { |
410 | 415 | $query->setCategory( $t ); |
Index: trunk/extensions/Wikilog/WikilogQuery.php |
— | — | @@ -158,6 +158,7 @@ |
159 | 159 | |
160 | 160 | # Local variables. |
161 | 161 | private $mWikilogTitle = null; ///< Filter by wikilog. |
| 162 | + private $mNamespace = false; ///< Filter by namespace. |
162 | 163 | private $mPubStatus = self::PS_ALL; ///< Filter by published status. |
163 | 164 | private $mCategory = false; ///< Filter by category. |
164 | 165 | private $mAuthor = false; ///< Filter by author. |
— | — | @@ -195,6 +196,14 @@ |
196 | 197 | } |
197 | 198 | |
198 | 199 | /** |
| 200 | + * Sets the wikilog namespace to query for. |
| 201 | + * @param $ns Namespace to query for. |
| 202 | + */ |
| 203 | + public function setNamespace( $ns ) { |
| 204 | + $this->mNamespace = $ns; |
| 205 | + } |
| 206 | + |
| 207 | + /** |
199 | 208 | * Sets the publish status to query for. |
200 | 209 | * @param $pubStatus Publish status, string or integer. |
201 | 210 | */ |
— | — | @@ -273,12 +282,13 @@ |
274 | 283 | /** |
275 | 284 | * Accessor functions. |
276 | 285 | */ |
277 | | - public function getWikilogTitle() { return $this->mWikilogTitle; } |
278 | | - public function getPubStatus() { return $this->mPubStatus; } |
279 | | - public function getCategory() { return $this->mCategory; } |
280 | | - public function getAuthor() { return $this->mAuthor; } |
281 | | - public function getTag() { return $this->mTag; } |
282 | | - public function getDate() { return $this->mDate; } |
| 286 | + public function getWikilogTitle() { return $this->mWikilogTitle; } |
| 287 | + public function getNamespace() { return $this->mNamespace; } |
| 288 | + public function getPubStatus() { return $this->mPubStatus; } |
| 289 | + public function getCategory() { return $this->mCategory; } |
| 290 | + public function getAuthor() { return $this->mAuthor; } |
| 291 | + public function getTag() { return $this->mTag; } |
| 292 | + public function getDate() { return $this->mDate; } |
283 | 293 | |
284 | 294 | /** |
285 | 295 | * Organizes all the query information and constructs the table and |
— | — | @@ -305,6 +315,8 @@ |
306 | 316 | # Filter by wikilog name. |
307 | 317 | if ( $this->mWikilogTitle !== null ) { |
308 | 318 | $q_conds['wlp_parent'] = $this->mWikilogTitle->getArticleId(); |
| 319 | + } elseif ( $this->mNamespace ) { |
| 320 | + $q_conds['p.page_namespace'] = $this->mNamespace; |
309 | 321 | } |
310 | 322 | |
311 | 323 | # Filter by published status. |
— | — | @@ -368,6 +380,8 @@ |
369 | 381 | |
370 | 382 | if ( $this->mNeedWikilogParam && $this->mWikilogTitle ) { |
371 | 383 | $query['wikilog'] = $this->mWikilogTitle->getPrefixedDBKey(); |
| 384 | + } elseif ( $this->mNamespace ) { |
| 385 | + $query['wikilog'] = Title::makeTitle( $this->mNamespace, "*" )->getPrefixedDBKey(); |
372 | 386 | } |
373 | 387 | |
374 | 388 | if ( $this->mPubStatus == self::PS_ALL ) { |
— | — | @@ -442,6 +456,7 @@ |
443 | 457 | |
444 | 458 | # Local variables. |
445 | 459 | private $mModStatus = self::MS_ALL; ///< Filter by moderation status. |
| 460 | + private $mNamespace = false; ///< Filter by namespace. |
446 | 461 | private $mWikilog = null; ///< Filter by wikilog. |
447 | 462 | private $mItem = null; ///< Filter by wikilog item (article). |
448 | 463 | private $mThread = false; ///< Filter by thread. |
— | — | @@ -505,8 +520,18 @@ |
506 | 521 | } |
507 | 522 | |
508 | 523 | /** |
| 524 | + * Set the namespace to query for. Only comments for articles published |
| 525 | + * in the given namespace are returned. The wikilog and item filters have |
| 526 | + * precedence over this filter. |
| 527 | + * @param $ns Namespace to query for. |
| 528 | + */ |
| 529 | + public function setNamespace ( $ns ) { |
| 530 | + $this->mNamespace = $ns; |
| 531 | + } |
| 532 | + |
| 533 | + /** |
509 | 534 | * Set the wikilog to query for. Only comments for articles published in |
510 | | - * the given wikilog is returned. The item filter has precedence over this |
| 535 | + * the given wikilog are returned. The item filter has precedence over this |
511 | 536 | * filter. |
512 | 537 | * @param $wikilogTitle Wikilog title object to query for (Title). |
513 | 538 | */ |
— | — | @@ -583,6 +608,7 @@ |
584 | 609 | * Accessor functions. |
585 | 610 | */ |
586 | 611 | public function getModStatus() { return $this->mModStatus; } |
| 612 | + public function getNamespace() { return $this->mNamespace; } |
587 | 613 | public function getWikilog() { return $this->mWikilog; } |
588 | 614 | public function getItem() { return $this->mItem; } |
589 | 615 | public function getThread() { return $this->mThread; } |
— | — | @@ -632,6 +658,8 @@ |
633 | 659 | } elseif ( $this->mWikilog !== null ) { |
634 | 660 | $join_wlp = true; |
635 | 661 | $q_conds['wlp_parent'] = $this->mWikilog->getArticleId(); |
| 662 | + } elseif ( $this->mNamespace ) { |
| 663 | + $q_conds['c.page_namespace'] = $this->mNamespace; |
636 | 664 | } |
637 | 665 | |
638 | 666 | # Filter by author. |
— | — | @@ -678,6 +706,8 @@ |
679 | 707 | $query['item'] = $this->mItem->mTitle->getPrefixedDBKey(); |
680 | 708 | } elseif ( $this->mWikilog ) { |
681 | 709 | $query['wikilog'] = $this->mWikilog->getPrefixedDBKey(); |
| 710 | + } elseif ( $this->mNamespace ) { |
| 711 | + $query['wikilog'] = Title::makeTitle( $this->mNamespace, "*" )->getPrefixedDBKey(); |
682 | 712 | } |
683 | 713 | |
684 | 714 | if ( $this->mModStatus != self::MS_ALL ) { |
Index: trunk/extensions/Wikilog/RELEASE-NOTES |
— | — | @@ -43,6 +43,9 @@ |
44 | 44 | * Comment syndication feeds are now available. Currently, there is one feed |
45 | 45 | per wikilog article, that lists comments made to that article. In the |
46 | 46 | future, feeds per thread, per wikilog and global may be provided. |
| 47 | +* Added support for MediaWiki 1.16 Vector skin. |
| 48 | +* Special:Wikilog now allows quering by namespace, with the "Namespace:*" |
| 49 | + syntax. |
47 | 50 | |
48 | 51 | === Bug fixes === |
49 | 52 | |
— | — | @@ -56,6 +59,7 @@ |
57 | 60 | Noted by Vitaliy Filippov. |
58 | 61 | * Don't croak in Wikilog::getWikilogInfo() if $title is NULL. Patch by |
59 | 62 | Vitaliy Filippov. |
| 63 | +* Improved consistency of edit links with the rest of MediaWiki. |
60 | 64 | |
61 | 65 | |
62 | 66 | == Wikilog 1.0.1 == |