X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWatchedItem.php;h=01376a09d197608ad3bd7380283b049184dcf169;hb=0db5107fd221bf70a0f050724d7359c2f35d86f2;hp=ffdc285481bcb52e45b0a3ba3b7866ee3c8d744a;hpb=a4adef8658dd18442dafeb0d226f8d90446bcb75;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index ffdc285481..01376a09d1 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -162,22 +162,22 @@ class WatchedItem { // if there's already an entry for this page $dbw = wfGetDB( DB_MASTER ); $dbw->insert( 'watchlist', - array( - 'wl_user' => $this->getUserId(), - 'wl_namespace' => MWNamespace::getSubject($this->getTitleNs()), - 'wl_title' => $this->getTitleDBkey(), - 'wl_notificationtimestamp' => null - ), __METHOD__, 'IGNORE' ); + array( + 'wl_user' => $this->getUserId(), + 'wl_namespace' => MWNamespace::getSubject( $this->getTitleNs() ), + 'wl_title' => $this->getTitleDBkey(), + 'wl_notificationtimestamp' => null + ), __METHOD__, 'IGNORE' ); // Every single watched page needs now to be listed in watchlist; // namespace:page and namespace_talk:page need separate entries: $dbw->insert( 'watchlist', - array( - 'wl_user' => $this->getUserId(), - 'wl_namespace' => MWNamespace::getTalk($this->getTitleNs()), - 'wl_title' => $this->getTitleDBkey(), - 'wl_notificationtimestamp' => null - ), __METHOD__, 'IGNORE' ); + array( + 'wl_user' => $this->getUserId(), + 'wl_namespace' => MWNamespace::getTalk( $this->getTitleNs() ), + 'wl_title' => $this->getTitleDBkey(), + 'wl_notificationtimestamp' => null + ), __METHOD__, 'IGNORE' ); $this->watched = true; @@ -197,7 +197,7 @@ class WatchedItem { $dbw->delete( 'watchlist', array( 'wl_user' => $this->getUserId(), - 'wl_namespace' => MWNamespace::getSubject($this->getTitleNs()), + 'wl_namespace' => MWNamespace::getSubject( $this->getTitleNs() ), 'wl_title' => $this->getTitleDBkey(), ), __METHOD__ ); @@ -205,14 +205,14 @@ class WatchedItem { $success = true; } - # the following code compensates the new behaviour, introduced by the + # the following code compensates the new behavior, introduced by the # enotif patch, that every single watched page needs now to be listed # in watchlist namespace:page and namespace_talk:page had separate # entries: clear them $dbw->delete( 'watchlist', array( 'wl_user' => $this->getUserId(), - 'wl_namespace' => MWNamespace::getTalk($this->getTitleNs()), + 'wl_namespace' => MWNamespace::getTalk( $this->getTitleNs() ), 'wl_title' => $this->getTitleDBkey(), ), __METHOD__ ); @@ -268,7 +268,7 @@ class WatchedItem { ); } - if( empty( $values ) ) { + if ( empty( $values ) ) { // Nothing to do return true; }