| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Utility class for creating and accessing recent change entries. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| File Size: | 853 lines (23 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
RecentChange:: (28 methods):
newFromRow()
parseToRCType()
parseFromRCType()
newFromId()
newFromConds()
selectFields()
setAttribs()
setExtra()
getTitle()
getPerformer()
save()
notifyRCFeeds()
getEngine()
markPatrolled()
doMarkPatrolled()
reallyMarkPatrolled()
notifyEdit()
notifyNew()
notifyLog()
newLogEntry()
loadFromRow()
getAttribute()
getAttributes()
diffLinkTrail()
getCharacterDifference()
purgeExpiredChanges()
checkIPAddress()
isInRCLifespan()
Class: RecentChange - X-Ref
Utility class for creating new RC entries| newFromRow( $row ) X-Ref |
param: mixed $row return: RecentChange |
| parseToRCType( $type ) X-Ref |
| Parsing text to RC_* constants param: string|array $type return: int|array RC_TYPE |
| parseFromRCType( $rcType ) X-Ref |
| Parsing RC_* constants to human-readable test param: int $rcType return: string $type |
| newFromId( $rcid ) X-Ref |
| Obtain the recent change with a given rc_id value param: int $rcid The rc_id value to retrieve return: RecentChange |
| newFromConds( $conds, $fname = __METHOD__, $options = array() X-Ref |
| Find the first recent change matching some specific conditions param: array $conds Array of conditions param: mixed $fname Override the method name in profiling/logs param: array $options Query options return: RecentChange |
| selectFields() X-Ref |
| Return the list of recentchanges fields that should be selected to create a new recentchanges object. return: array |
| setAttribs( $attribs ) X-Ref |
param: array $attribs |
| setExtra( $extra ) X-Ref |
param: array $extra |
| getTitle() X-Ref |
return: Title |
| getPerformer() X-Ref |
| Get the User object of the person who performed this change. return: User |
| save( $noudp = false ) X-Ref |
| Writes the data in this object to the database param: bool $noudp |
| notifyRCFeeds( array $feeds = null ) X-Ref |
| Notify all the feeds about the change. param: array $feeds Optional feeds to send to, defaults to $wgRCFeeds |
| getEngine( $uri ) X-Ref |
| Gets the stream engine object for a given URI from $wgRCEngines param: string $uri URI to get the engine object for return: RCFeedEngine The engine object |
| markPatrolled( $change, $auto = false ) X-Ref |
| Mark a given change as patrolled param: RecentChange|int $change RecentChange or corresponding rc_id param: bool $auto For automatic patrol return: array See doMarkPatrolled(), or null if $change is not an existing rc_id |
| doMarkPatrolled( User $user, $auto = false ) X-Ref |
| Mark this RecentChange as patrolled NOTE: Can also return 'rcpatroldisabled', 'hookaborted' and 'markedaspatrollederror-noautopatrol' as errors param: User $user User object doing the action param: bool $auto For automatic patrol return: array Array of permissions errors, see Title::getUserPermissionsErrors() |
| reallyMarkPatrolled() X-Ref |
| Mark this RecentChange patrolled, without error checking return: int Number of affected rows |
| notifyEdit( $timestamp, &$title, $minor, &$user, $comment, $oldId,$lastTimestamp, $bot, $ip = '', $oldSize = 0, $newSize = 0, $newId = 0, $patrol = 0 ) X-Ref |
| Makes an entry in the database corresponding to an edit param: string $timestamp param: Title $title param: bool $minor param: User $user param: string $comment param: int $oldId param: string $lastTimestamp param: bool $bot param: string $ip param: int $oldSize param: int $newSize param: int $newId param: int $patrol return: RecentChange |
| notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot,$ip = '', $size = 0, $newId = 0, $patrol = 0 ) X-Ref |
| Makes an entry in the database corresponding to page creation Note: the title object must be loaded with the new id using resetArticleID() param: string $timestamp param: Title $title param: bool $minor param: User $user param: string $comment param: bool $bot param: string $ip param: int $size param: int $newId param: int $patrol return: RecentChange |
| notifyLog( $timestamp, &$title, &$user, $actionComment, $ip, $type,$action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '') X-Ref |
param: string $timestamp param: Title $title param: User $user param: string $actionComment param: string $ip param: string $type param: string $action param: Title $target param: string $logComment param: string $params param: int $newId param: string $actionCommentIRC return: bool |
| newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip,$type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '' ) X-Ref |
param: string $timestamp param: Title $title param: User $user param: string $actionComment param: string $ip param: string $type param: string $action param: Title $target param: string $logComment param: string $params param: int $newId param: string $actionCommentIRC return: RecentChange |
| loadFromRow( $row ) X-Ref |
| Initialises the members of this object from a mysql row object param: mixed $row |
| getAttribute( $name ) X-Ref |
| Get an attribute value param: string $name Attribute name return: mixed |
| getAttributes() X-Ref |
return: array |
| diffLinkTrail( $forceCur ) X-Ref |
| Gets the end part of the diff URL associated with this object Blank if no diff link should be displayed param: bool $forceCur return: string |
| getCharacterDifference( $old = 0, $new = 0 ) X-Ref |
| Returns the change size (HTML). The lengths can be given optionally. param: int $old param: int $new return: string |
| purgeExpiredChanges() X-Ref |
| Purge expired changes from the recentchanges table |
| checkIPAddress( $ip ) X-Ref |
| No description |
| isInRCLifespan( $timestamp, $tolerance = 0 ) X-Ref |
| 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. param: mixed $timestamp MWTimestamp compatible timestamp param: int $tolerance Tolerance in seconds return: bool |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |