MediaWiki
REL1_22
|
Utility class for creating new RC entries. More...
Public Member Functions | |
diffLinkTrail ($forceCur) | |
Gets the end part of the diff URL associated with this object Blank if no diff link should be displayed. | |
doMarkPatrolled (User $user, $auto=false) | |
Mark this RecentChange as patrolled. | |
getAttribute ($name) | |
Get an attribute value. | |
getAttributes () | |
getCharacterDifference ($old=0, $new=0) | |
Returns the change size (HTML). | |
getPerformer () | |
Get the User object of the person who performed this change. | |
& | getTitle () |
loadFromCurRow ($row) | |
Makes a pseudo-RC entry from a cur row. | |
loadFromRow ($row) | |
Initialises the members of this object from a mysql row object. | |
notifyRC2UDP () | |
notifyRCFeeds () | |
Notify all the feeds about the change. | |
reallyMarkPatrolled () | |
Mark this RecentChange patrolled, without error checking. | |
save ($noudp=false) | |
Writes the data in this object to the database. | |
setAttribs ($attribs) | |
setExtra ($extra) | |
Static Public Member Functions | |
static | cleanupForIRC ($text) |
static | isInRCLifespan ($timestamp, $tolerance=0) |
Check whether the given timestamp is new enough to have a RC row with a given tolerance as the recentchanges table might not be cleared out regularly (so older entries might exist) or rows which will be deleted soon shouldn't be included. | |
static | markPatrolled ($change, $auto=false) |
Mark a given change as patrolled. | |
static | newFromConds ($conds, $fname=__METHOD__, $options=array()) |
Find the first recent change matching some specific conditions. | |
static | newFromCurRow ($row) |
static | newFromId ($rcid) |
Obtain the recent change with a given rc_id value. | |
static | newFromRow ($row) |
static | newLogEntry ($timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC= '') |
static | notifyEdit ($timestamp, &$title, $minor, &$user, $comment, $oldId, $lastTimestamp, $bot, $ip= '', $oldSize=0, $newSize=0, $newId=0, $patrol=0) |
Makes an entry in the database corresponding to an edit. | |
static | notifyLog ($timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC= '') |
static | notifyNew ($timestamp, &$title, $minor, &$user, $comment, $bot, $ip= '', $size=0, $newId=0, $patrol=0) |
Makes an entry in the database corresponding to page creation Note: the title object must be loaded with the new id using resetArticleID() | |
static | purgeExpiredChanges () |
Purge expired changes from the recentchanges table. | |
static | selectFields () |
Return the list of recentchanges fields that should be selected to create a new recentchanges object. | |
static | sendToUDP ($line, $address= '', $prefix= '', $port= '') |
Send some text to UDP. | |
Public Attributes | |
$mAttribs = array() | |
$mExtra = array() | |
Title | $mMovedToTitle = false |
Title | $mTitle = false |
$notificationtimestamp | |
$numberofWatchingusers = 0 | |
Static Private Member Functions | |
static | checkIPAddress ($ip) |
static | getEngine ($uri) |
Gets the stream engine object for a given URI from $wgRCEngines. | |
Private Attributes | |
User | $mPerformer = false |
Utility class for creating new RC entries.
mAttribs: rc_id id of the row in the recentchanges table rc_timestamp time the entry was made rc_cur_time timestamp on the cur row rc_namespace namespace # rc_title non-prefixed db key rc_type is new entry, used to determine whether updating is necessary rc_minor is minor rc_cur_id page_id of associated page entry rc_user user id who made the entry rc_user_text user name who made the entry rc_comment edit summary rc_this_oldid rev_id associated with this entry (or zero) rc_last_oldid rev_id associated with the entry before this one (or zero) rc_bot is bot, hidden rc_ip IP address of the user in dotted quad notation rc_new obsolete, use rc_type==RC_NEW rc_patrolled boolean whether or not someone has marked this edit as patrolled rc_old_len integer byte length of the text before the edit rc_new_len the same after the edit rc_deleted partial deletion rc_logid the log_id value for this log entry (or zero) rc_log_type the log type (or null) rc_log_action the log action (or null) rc_params log params
mExtra: prefixedDBkey prefixed db key, used by external app via msg queue lastTimestamp timestamp of previous entry, used in WHERE clause during update lang the interwiki prefix, automatically set in save() oldSize text size before the change newSize text size after the change pageStatus status of the page: created, deleted, moved, restored, changed
temporary: not stored in the database notificationtimestamp numberofWatchingusers
Definition at line 66 of file RecentChange.php.
static RecentChange::checkIPAddress | ( | $ | ip | ) | [static, private] |
Definition at line 815 of file RecentChange.php.
static RecentChange::cleanupForIRC | ( | $ | text | ) | [static] |
Definition at line 371 of file RecentChange.php.
RecentChange::diffLinkTrail | ( | $ | forceCur | ) |
Gets the end part of the diff URL associated with this object Blank if no diff link should be displayed.
$forceCur |
Definition at line 757 of file RecentChange.php.
RecentChange::doMarkPatrolled | ( | User $ | user, |
$ | auto = false |
||
) |
Mark this RecentChange as patrolled.
NOTE: Can also return 'rcpatroldisabled', 'hookaborted' and 'markedaspatrollederror-noautopatrol' as errors
$user | User object doing the action |
$auto | Boolean: for automatic patrol |
Definition at line 404 of file RecentChange.php.
RecentChange::getAttribute | ( | $ | name | ) |
Get an attribute value.
string | $name | Attribute name |
Definition at line 740 of file RecentChange.php.
Definition at line 747 of file RecentChange.php.
Referenced by IRCColourfulRCFeedFormatter\getLine(), and JSONRCFeedFormatter\getLine().
RecentChange::getCharacterDifference | ( | $ | old = 0 , |
$ | new = 0 |
||
) |
Returns the change size (HTML).
The lengths can be given optionally.
$old | int |
$new | int |
Definition at line 779 of file RecentChange.php.
static RecentChange::getEngine | ( | $ | uri | ) | [static, private] |
Gets the stream engine object for a given URI from $wgRCEngines.
$uri | string URI to get the engine object for |
Definition at line 353 of file RecentChange.php.
Get the User object of the person who performed this change.
Definition at line 203 of file RecentChange.php.
& RecentChange::getTitle | ( | ) |
Definition at line 191 of file RecentChange.php.
Referenced by IRCColourfulRCFeedFormatter\getLine(), and JSONRCFeedFormatter\getLine().
static RecentChange::isInRCLifespan | ( | $ | timestamp, |
$ | tolerance = 0 |
||
) | [static] |
Check whether the given timestamp is new enough to have a RC row with a given tolerance as the recentchanges table might not be cleared out regularly (so older entries might exist) or rows which will be deleted soon shouldn't be included.
$timestamp | mixed MWTimestamp compatible timestamp |
$tolerance | integer Tolerance in seconds |
Definition at line 839 of file RecentChange.php.
RecentChange::loadFromCurRow | ( | $ | row | ) |
Makes a pseudo-RC entry from a cur row.
in 1.22
$row |
Definition at line 704 of file RecentChange.php.
RecentChange::loadFromRow | ( | $ | row | ) |
Initialises the members of this object from a mysql row object.
$row |
Definition at line 692 of file RecentChange.php.
static RecentChange::markPatrolled | ( | $ | change, |
$ | auto = false |
||
) | [static] |
Mark a given change as patrolled.
$change | Mixed: RecentChange or corresponding rc_id |
$auto | Boolean: for automatic patrol |
Definition at line 383 of file RecentChange.php.
static RecentChange::newFromConds | ( | $ | conds, |
$ | fname = __METHOD__ , |
||
$ | options = array() |
||
) | [static] |
Find the first recent change matching some specific conditions.
array | $conds | of conditions |
$fname | Mixed: override the method name in profiling/logs | |
$options | Array Query options |
Definition at line 127 of file RecentChange.php.
static RecentChange::newFromCurRow | ( | $ | row | ) | [static] |
$row |
Definition at line 100 of file RecentChange.php.
static RecentChange::newFromId | ( | $ | rcid | ) | [static] |
Obtain the recent change with a given rc_id value.
int | $rcid | rc_id value to retrieve |
Definition at line 115 of file RecentChange.php.
Referenced by MarkpatrolledAction\onView(), and PatrolLog\record().
static RecentChange::newFromRow | ( | $ | row | ) | [static] |
$row |
Definition at line 89 of file RecentChange.php.
Referenced by SpecialWatchlist\execute(), ApiQueryRecentChanges\extractRowInfo(), and SpecialRecentChanges\webOutput().
static RecentChange::newLogEntry | ( | $ | timestamp, |
&$ | title, | ||
&$ | user, | ||
$ | actionComment, | ||
$ | ip, | ||
$ | type, | ||
$ | action, | ||
$ | target, | ||
$ | logComment, | ||
$ | params, | ||
$ | newId = 0 , |
||
$ | actionCommentIRC = '' |
||
) | [static] |
$timestamp | |
$title | Title |
$user | User |
$actionComment | |
$ip | string |
$type | |
$action | |
$target | Title |
$logComment | |
$params | |
$newId | int |
$actionCommentIRC | string |
Definition at line 623 of file RecentChange.php.
Referenced by ManualLogEntry\publish().
static RecentChange::notifyEdit | ( | $ | timestamp, |
&$ | title, | ||
$ | minor, | ||
&$ | user, | ||
$ | comment, | ||
$ | oldId, | ||
$ | lastTimestamp, | ||
$ | bot, | ||
$ | ip = '' , |
||
$ | oldSize = 0 , |
||
$ | newSize = 0 , |
||
$ | newId = 0 , |
||
$ | patrol = 0 |
||
) | [static] |
Makes an entry in the database corresponding to an edit.
$timestamp | |
$title | Title |
$minor | |
$user | User |
$comment | |
$oldId | |
$lastTimestamp | |
$bot | |
$ip | string |
$oldSize | int |
$newSize | int |
$newId | int |
$patrol | int |
Definition at line 478 of file RecentChange.php.
static RecentChange::notifyLog | ( | $ | timestamp, |
&$ | title, | ||
&$ | user, | ||
$ | actionComment, | ||
$ | ip, | ||
$ | type, | ||
$ | action, | ||
$ | target, | ||
$ | logComment, | ||
$ | params, | ||
$ | newId = 0 , |
||
$ | actionCommentIRC = '' |
||
) | [static] |
$timestamp | |
$title | |
$user | |
$actionComment | |
$ip | string |
$type | |
$action | |
$target | |
$logComment | |
$params | |
$newId | int |
$actionCommentIRC | string |
Definition at line 594 of file RecentChange.php.
static RecentChange::notifyNew | ( | $ | timestamp, |
&$ | title, | ||
$ | minor, | ||
&$ | user, | ||
$ | comment, | ||
$ | bot, | ||
$ | ip = '' , |
||
$ | size = 0 , |
||
$ | newId = 0 , |
||
$ | patrol = 0 |
||
) | [static] |
Makes an entry in the database corresponding to page creation Note: the title object must be loaded with the new id using resetArticleID()
$timestamp | |
$title | Title |
$minor | |
$user | User |
$comment | |
$bot | |
$ip | string |
$size | int |
$newId | int |
$patrol | int |
Definition at line 537 of file RecentChange.php.
Definition at line 287 of file RecentChange.php.
Notify all the feeds about the change.
Definition at line 319 of file RecentChange.php.
static RecentChange::purgeExpiredChanges | ( | ) | [static] |
Purge expired changes from the recentchanges table.
Definition at line 796 of file RecentChange.php.
Mark this RecentChange patrolled, without error checking.
Definition at line 442 of file RecentChange.php.
RecentChange::save | ( | $ | noudp = false | ) |
Writes the data in this object to the database.
$noudp | bool |
Definition at line 218 of file RecentChange.php.
static RecentChange::selectFields | ( | ) | [static] |
Return the list of recentchanges fields that should be selected to create a new recentchanges object.
Definition at line 142 of file RecentChange.php.
Referenced by SpecialRecentchangeslinked\doMainQuery(), SpecialRecentChanges\doMainQuery(), and SpecialWatchlist\execute().
static RecentChange::sendToUDP | ( | $ | line, |
$ | address = '' , |
||
$ | prefix = '' , |
||
$ | port = '' |
||
) | [static] |
RecentChange::setAttribs | ( | $ | attribs | ) |
$attribs | array |
Definition at line 176 of file RecentChange.php.
RecentChange::setExtra | ( | $ | extra | ) |
$extra | array |
Definition at line 183 of file RecentChange.php.
RecentChange::$mAttribs = array() |
Definition at line 67 of file RecentChange.php.
RecentChange::$mExtra = array() |
Definition at line 67 of file RecentChange.php.
Definition at line 79 of file RecentChange.php.
Definition at line 75 of file RecentChange.php.
Definition at line 71 of file RecentChange.php.
RecentChange::$notificationtimestamp |
Definition at line 81 of file RecentChange.php.
RecentChange::$numberofWatchingusers = 0 |
Definition at line 80 of file RecentChange.php.