// 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;
$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__
);
$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__
);
);
}
- if( empty( $values ) ) {
+ if ( empty( $values ) ) {
// Nothing to do
return true;
}