r87916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87915‎ | r87916 | r87917 >
Date:16:55, 12 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
small fix to category handling code
Modified paths:
  • /trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php (modified) (history)
  • /trunk/extensions/SemanticWatchlist/includes/SWL_Group.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticWatchlist/includes/SWL_Group.php
@@ -167,8 +167,11 @@
168168 return false;
169169 }
170170
 171+ global $wgContLang;
 172+ $catPrefix = $wgContLang->getNSText( NS_CATEGORY ) . ':';
 173+
171174 foreach ( $this->categories as $groupCategory ) {
172 - $foundMatch = in_array( $groupCategory, $cats );
 175+ $foundMatch = in_array( $catPrefix . $groupCategory, $cats );
173176
174177 if ( $foundMatch ) {
175178 break;
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php
@@ -28,7 +28,6 @@
2929 $title = Title::makeTitle( $changes->getSubject()->getNamespace(), $changes->getSubject()->getDBkey() );
3030
3131 foreach ( SWLGroups::getMatchingWatchGroups( $title ) as /* SWLGroup */ $group ) {
32 - var_dump($group);exit;
3332 $group->notifyWatchingUsers( $changes );
3433 }
3534
@@ -57,7 +56,8 @@
5857 }
5958
6059 protected static function notifyUser( SWLGroup $group, User $user, SMWChangeSet $changes ) {
61 - var_dump($group);var_dump($user);var_dump($changes);exit;
 60+ // TODO
 61+ //var_dump($group);var_dump($user);var_dump($changes);exit;
6262 }
6363
6464 /**

Status & tagging log