42 $purge =
$wgRequest->getVal(
'action' ) ===
'purge';
44 if ( $purge && $wgUser->isAllowed(
'purge' ) ) {
45 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
46 $cache->delete( $timekey, 1 );
61 $wgOut->addWikiMsg(
'feed-unavailable' );
66 $wgOut->addWikiMsg(
'feed-invalid' );
81 $titleObj = Title::makeTitle( $row->rc_namespace, $row->rc_title );
82 $timestamp =
wfTimestamp( TS_MW, $row->rc_timestamp );
84 if ( $row->rc_type ==
RC_LOG ) {
89 $row->rc_last_oldid, $row->rc_this_oldid,
92 ?
wfMessage(
'rev-deleted-comment' )->escaped()
93 : CommentStore::getStore()->getComment(
'rc_comment', $row )->text,
110 $comment, $actiontext =
''
115 $completeText =
'<p>' . implode(
' ',
125 $accErrors = $title->getUserPermissionsErrors(
'read', $anon,
true );
129 if ( $title->getNamespace() < 0 || $accErrors || !$newid ) {
142 $context = clone RequestContext::getMain();
145 $contentHandler =
$rev->getContentHandler();
146 $de = $contentHandler->createDifferenceEngine(
$context, $oldid, $newid );
147 $diffText = $de->getDiff(
150 $wgLang->timeanddate( $timestamp ),
152 $wgLang->time( $timestamp ) )->text() );
159 }
elseif ( $diffText ===
false ) {
161 $diffText =
"<p>Can't load revision $newid</p>";
164 $diffText = UtfNormal\Validator::cleanUp( $diffText );
170 $newContent = ContentHandler::getForTitle( $title )->makeEmptyContent();
172 $newContent =
$rev->getContent();
177 $text = $newContent->getText();
192 if (
$html ===
null ) {
197 $diffText =
'<p><b>' .
wfMessage(
'newpage' )->text() .
'</b></p>' .
198 '<div>' .
$html .
'</div>';
216 $queryParameters = [
'diff' =>
$newid ];
217 if ( $oldid !=
null ) {
218 $queryParameters[
'oldid'] = $oldid;
220 $diffUrl = $title->getFullURL( $queryParameters );
222 $diffLink = Html::element(
'a', [
'href' => $diffUrl ],
238 'diff' =>
'background-color: #fff; color: #222;',
239 'diff-otitle' =>
'background-color: #fff; color: #222; text-align: center;',
240 'diff-ntitle' =>
'background-color: #fff; color: #222; text-align: center;',
241 'diff-addedline' =>
'color: #222; font-size: 88%; border-style: solid; '
242 .
'border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; '
243 .
'vertical-align: top; white-space: pre-wrap;',
244 'diff-deletedline' =>
'color: #222; font-size: 88%; border-style: solid; '
245 .
'border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; '
246 .
'vertical-align: top; white-space: pre-wrap;',
247 'diff-context' =>
'background-color: #f8f9fa; color: #222; font-size: 88%; '
248 .
'border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; '
249 .
'border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;',
250 'diffchange' =>
'font-weight: bold; text-decoration: none;',
253 foreach ( $styles as $class => $style ) {
254 $text =
preg_replace(
"/(<[^>]+)class=(['\"])$class\\2([^>]*>)/",
255 "\\1style=\"$style\"\\3", $text );
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
$wgFeedDiffCutoff
When generating Recentchanges RSS/Atom feed, diffs will not be generated for pages larger than this s...
$wgFeedClasses
Available feeds objects.
$wgFeed
Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
if(! $wgDBerrorLogTZ) $wgRequest
Helper functions for feeds.
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 formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext='')
Really format a diff for the newsfeed.
static checkPurge( $timekey, $key)
Check whether feed's cache should be cleared; for changes feeds If the feed should be purged; $timeke...
static applyDiffStyle( $text)
Hacky application of diff styles for the feeds.
static getDiffLink(Title $title, $newid, $oldid=null)
Generates a diff link.
static formatComment( $comment, $title=null, $local=false, $wikiId=null)
This function is called by all recent changes variants, by the page history, and by the user contribu...
static newFromId( $id, $flags=0)
Load a page revision from a given revision ID number.
Content object implementation for representing flat text.
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
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 you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
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 use $formDescriptor instead 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
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))