[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Helper functions for feeds. 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: | 270 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
FeedUtils:: (6 methods):
checkPurge()
checkFeedOutput()
formatDiff()
formatDiffRow()
getDiffLink()
applyDiffStyle()
checkPurge( $timekey, $key ) X-Ref |
Check whether feed's cache should be cleared; for changes feeds If the feed should be purged; $timekey and $key will be removed from $messageMemc param: string $timekey Cache key of the timestamp of the last item param: string $key Cache key of feed's content |
checkFeedOutput( $type ) X-Ref |
Check whether feeds can be used and that $type is a valid feed type param: string $type Feed type, as requested by the user return: bool |
formatDiff( $row ) X-Ref |
Format a diff for the newsfeed param: object $row Row from the recentchanges table return: string |
formatDiffRow( $title, $oldid, $newid, $timestamp,$comment, $actiontext = '') X-Ref |
Really format a diff for the newsfeed param: Title $title Title object param: int $oldid Old revision's id param: int $newid New revision's id param: int $timestamp New revision's timestamp param: string $comment New revision's comment param: string $actiontext Text of the action; in case of log event return: string |
getDiffLink( Title $title, $newid, $oldid = null ) X-Ref |
Generates a diff link. Used when the full diff is not wanted for example when $wgFeedDiffCutoff is 0. param: Title $title Title object: used to generate the diff URL param: int $newid Newid for this diff param: int|null $oldid Oldid for the diff. Null means it is a new article return: string |
applyDiffStyle( $text ) X-Ref |
Hacky application of diff styles for the feeds. Might be 'cleaner' to use DOM or XSLT or something, but *gack* it's a pain in the ass. param: string $text Diff's HTML output return: string Modified HTML |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |