MediaWiki REL1_28
Go to the documentation of this file.
31 public function getPreloadTitles() {
32 $params = $this->extractParameters();
34 return [ Title::newFromText( $params[3] ) ];
35 }
37 protected function getMessageParameters() {
38 $params = parent::getMessageParameters();
39 $oldname = $this->makePageLink( $this->entry->getTarget(), [ 'redirect' => 'no' ] );
40 $newname = $this->makePageLink( Title::newFromText( $params[3] ) );
41 $params[2] = Message::rawParam( $oldname );
42 $params[3] = Message::rawParam( $newname );
43 $params[4] = $this->context->getLanguage()
44 ->userTimeAndDate( $params[4], $this->context->getUser() );
45 return $params;
46 }
48 public function getActionLinks() {
49 if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
50 || !$this->context->getUser()->isAllowed( 'mergehistory' )
51 ) {
52 return '';
53 }
55 // Show unmerge link
56 $params = $this->extractParameters();
58 SpecialPage::getTitleFor( 'MergeHistory' ),
59 $this->msg( 'revertmerge' )->escaped(),
60 [],
61 [
62 'target' => $params[3],
63 'dest' => $this->entry->getTarget()->getPrefixedDBkey(),
64 'mergepoint' => $params[4],
65 'submitted' => 1 // show the revisions immediately
66 ]
67 );
69 return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
70 }
72 protected function getParametersForApi() {
76 static $map = [
77 '4:title:dest',
78 '5:timestamp:mergepoint',
79 '4::dest' => '4:title:dest',
80 '5::mergepoint' => '5:timestamp:mergepoint',
81 ];
82 foreach ( $map as $index => $key ) {
83 if ( isset( $params[$index] ) ) {
84 $params[$key] = $params[$index];
85 unset( $params[$index] );
86 }
87 }
89 return $params;
90 }
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:255
Implements the default log formatting.
LogEntryBase $entry
msg( $key)
Shortcut for wfMessage which honors local context.
makePageLink(Title $title=null, $parameters=[], $html=null)
Helper to make a link to the page, taking the plaintext value in consideration.
Extracts the optional extra parameters for use in action messages.
Definition LogPage.php:33
This class formats merge log entries.
Returns extra links that comes after the action text, like "revert", etc.
Formats parameters intented for action message from array of all parameters.
Get the array of parameters, converted from legacy format if necessary.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
returning false will NOT prevent logging a wrapping ErrorException instead of letting the login form give the generic error message that the account does not exist For when the account has been renamed or deleted or an array to pass a message key and parameters create2 Corresponds to logging log_action database field and which is displayed in the UI & $revert
Definition hooks.txt:2140
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37
Get the extra parameters stored for this message.