<?php
+/**
+ *
+ * @package MediaWiki
+ */
+/**
+ *
+ * @package MediaWiki
+ */
class WatchedItem {
var $mTitle, $mUser;
return $wl;
}
- # Returns the memcached key for this item
+ /**
+ * Returns the memcached key for this item
+ */
function watchKey() {
global $wgDBname;
return "$wgDBname:watchlist:user:$this->id:page:$this->ns:$this->ti";
}
- # Is mTitle being watched by mUser?
+ /**
+ * Is mTitle being watched by mUser?
+ */
function isWatched()
{
# Pages and their talk pages are considered equivalent for watching;
return $iswatched;
}
- function addWatch()
- {
+ function addWatch() {
$fname = "WatchedItem::addWatch";
# REPLACE instead of INSERT because occasionally someone
# accidentally reloads a watch-add operation.
return true;
}
- function removeWatch()
- {
+ function removeWatch() {
+ $fname = 'WatchedItem::removeWatch';
+
$dbw =& wfGetDB( DB_MASTER );
$dbw->delete( 'watchlist',
array(
}
}
- /* static */ function duplicateEntries( $ot, $nt ) {
+ /**
+ * @static
+ */
+ function duplicateEntries( $ot, $nt ) {
$fname = "WatchedItem::duplicateEntries";
global $wgMemc, $wgDBname;
$oldnamespace = $ot->getNamespace() & ~1;