59 $this->format =
'atom';
62 $feedTitle =
"$wgSitename - {$title} [$wgLanguageCode]";
64 $feedTitle, htmlspecialchars( $description ), $url );
87 $this->
type, $this->format,
$wgLang->getCode(), $optionsHash,
'timestamp' );
97 $cachedFeed = $this->
loadFromCache( $lastmod, $timekey, $key );
98 if ( is_string( $cachedFeed ) ) {
99 wfDebug(
"RC: Outputting cached feed\n" );
100 $feed->httpHeaders();
103 wfDebug(
"RC: rendering new feed and caching it\n" );
106 $cachedFeed = ob_get_contents();
121 $cache = ObjectCache::getMainWANInstance();
122 $cache->set( $key, $feed, $cache::TTL_DAY );
137 $cache = ObjectCache::getMainWANInstance();
138 $feedLastmod =
$cache->get( $timekey );
148 $feedAge = time() -
wfTimestamp( TS_UNIX, $feedLastmod );
149 $feedLastmodUnix =
wfTimestamp( TS_UNIX, $feedLastmod );
152 if ( $feedAge < $wgFeedCacheTimeout || $feedLastmodUnix > $lastmodUnix ) {
153 wfDebug(
"RC: loading feed from cache ($key; $feedLastmod; $lastmod)...\n" );
154 if ( $feedLastmodUnix < $lastmodUnix ) {
155 $wgOut->setLastModified( $feedLastmod );
157 return $cache->get( $key );
159 wfDebug(
"RC: cached feed timestamp check failed ($feedLastmod; $lastmod)\n" );
173 foreach ( $items as $item ) {
174 $feed->outItem( $item );
187 # Merge adjacent edits by one user
190 foreach (
$rows as $obj ) {
197 $obj->rc_namespace >= 0 &&
198 $obj->rc_cur_id == $sorted[$n - 1]->rc_cur_id &&
199 $obj->rc_user_text == $sorted[$n - 1]->rc_user_text ) {
200 $sorted[$n - 1]->rc_last_oldid = $obj->rc_last_oldid;
207 foreach ( $sorted as $obj ) {
208 $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
209 $talkpage = MWNamespace::canTalk( $obj->rc_namespace )
210 ? $title->getTalkPage()->getFullURL()
214 if ( $obj->rc_deleted ) {
218 if ( $obj->rc_this_oldid ) {
219 $url = $title->getFullURL( [
220 'diff' => $obj->rc_this_oldid,
221 'oldid' => $obj->rc_last_oldid,
225 $url = $title->getFullURL();
229 $title->getPrefixedText(),
234 ?
wfMessage(
'rev-deleted-user' )->escaped() : $obj->rc_user_text,
$wgLanguageCode
Site language code.
$wgFeedCacheTimeout
Minimum timeout for cached Recentchanges feed, in seconds.
$wgRenderHashAppend
Append a configured value to the parser cache and the sitenotice key so that they can be kept separat...
$wgSitename
Name of the site.
$wgFeedClasses
Available feeds objects.
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfMemcKey()
Make a cache key for the local wiki.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Feed to Special:RecentChanges and Special:RecentChangesLiked.
execute( $feed, $rows, $lastmod, $opts)
Generates feed's content.
getFeedObject( $title, $description, $url)
Get a ChannelFeed subclass object to use.
static generateFeed( $rows, &$feed)
Generate the feed items given a row from the database, printing the feed.
saveToCache( $feed, $timekey, $key)
Save to feed result to cache.
static buildItems( $rows)
Generate the feed items given a row from the database.
__construct( $format, $type)
loadFromCache( $lastmod, $timekey, $key)
Try to load the feed result from cache.
A base class for basic support for outputting syndication feeds in RSS and other formats.
static formatDiff( $row)
Format a diff for the newsfeed.
static checkFeedOutput( $type)
Check whether feeds can be used and that $type is a valid feed type.
static checkPurge( $timekey, $key)
Check whether feed's cache should be cleared; for changes feeds If the feed should be purged; $timeke...
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type