MediaWiki  1.23.8
SpecialMergeHistory.php
Go to the documentation of this file.
1 <?php
32 
37 
38  public function __construct() {
39  parent::__construct( 'MergeHistory', 'mergehistory' );
40  }
41 
45  private function loadRequestParams() {
46  $request = $this->getRequest();
47  $this->mAction = $request->getVal( 'action' );
48  $this->mTarget = $request->getVal( 'target' );
49  $this->mDest = $request->getVal( 'dest' );
50  $this->mSubmitted = $request->getBool( 'submitted' );
51 
52  $this->mTargetID = intval( $request->getVal( 'targetID' ) );
53  $this->mDestID = intval( $request->getVal( 'destID' ) );
54  $this->mTimestamp = $request->getVal( 'mergepoint' );
55  if ( !preg_match( '/[0-9]{14}/', $this->mTimestamp ) ) {
56  $this->mTimestamp = '';
57  }
58  $this->mComment = $request->getText( 'wpComment' );
59 
60  $this->mMerge = $request->wasPosted() && $this->getUser()->matchEditToken( $request->getVal( 'wpEditToken' ) );
61  // target page
62  if ( $this->mSubmitted ) {
63  $this->mTargetObj = Title::newFromURL( $this->mTarget );
64  $this->mDestObj = Title::newFromURL( $this->mDest );
65  } else {
66  $this->mTargetObj = null;
67  $this->mDestObj = null;
68  }
69  $this->preCacheMessages();
70  }
71 
76  function preCacheMessages() {
77  // Precache various messages
78  if ( !isset( $this->message ) ) {
79  $this->message['last'] = $this->msg( 'last' )->escaped();
80  }
81  }
82 
83  public function execute( $par ) {
84  $this->checkPermissions();
85  $this->checkReadOnly();
86 
87  $this->loadRequestParams();
88 
89  $this->setHeaders();
90  $this->outputHeader();
91 
92  if ( $this->mTargetID && $this->mDestID && $this->mAction == 'submit' && $this->mMerge ) {
93  $this->merge();
94 
95  return;
96  }
97 
98  if ( !$this->mSubmitted ) {
99  $this->showMergeForm();
100 
101  return;
102  }
103 
104  $errors = array();
105  if ( !$this->mTargetObj instanceof Title ) {
106  $errors[] = $this->msg( 'mergehistory-invalid-source' )->parseAsBlock();
107  } elseif ( !$this->mTargetObj->exists() ) {
108  $errors[] = $this->msg( 'mergehistory-no-source', array( 'parse' ),
109  wfEscapeWikiText( $this->mTargetObj->getPrefixedText() )
110  )->parseAsBlock();
111  }
112 
113  if ( !$this->mDestObj instanceof Title ) {
114  $errors[] = $this->msg( 'mergehistory-invalid-destination' )->parseAsBlock();
115  } elseif ( !$this->mDestObj->exists() ) {
116  $errors[] = $this->msg( 'mergehistory-no-destination', array( 'parse' ),
117  wfEscapeWikiText( $this->mDestObj->getPrefixedText() )
118  )->parseAsBlock();
119  }
120 
121  if ( $this->mTargetObj && $this->mDestObj && $this->mTargetObj->equals( $this->mDestObj ) ) {
122  $errors[] = $this->msg( 'mergehistory-same-destination' )->parseAsBlock();
123  }
124 
125  if ( count( $errors ) ) {
126  $this->showMergeForm();
127  $this->getOutput()->addHTML( implode( "\n", $errors ) );
128  } else {
129  $this->showHistory();
130  }
131  }
132 
133  function showMergeForm() {
134  global $wgScript;
135 
136  $this->getOutput()->addWikiMsg( 'mergehistory-header' );
137 
138  $this->getOutput()->addHTML(
139  Xml::openElement( 'form', array(
140  'method' => 'get',
141  'action' => $wgScript ) ) .
142  '<fieldset>' .
143  Xml::element( 'legend', array(),
144  $this->msg( 'mergehistory-box' )->text() ) .
145  Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) .
146  Html::hidden( 'submitted', '1' ) .
147  Html::hidden( 'mergepoint', $this->mTimestamp ) .
148  Xml::openElement( 'table' ) .
149  '<tr>
150  <td>' . Xml::label( $this->msg( 'mergehistory-from' )->text(), 'target' ) . '</td>
151  <td>' . Xml::input( 'target', 30, $this->mTarget, array( 'id' => 'target' ) ) . '</td>
152  </tr><tr>
153  <td>' . Xml::label( $this->msg( 'mergehistory-into' )->text(), 'dest' ) . '</td>
154  <td>' . Xml::input( 'dest', 30, $this->mDest, array( 'id' => 'dest' ) ) . '</td>
155  </tr><tr><td>' .
156  Xml::submitButton( $this->msg( 'mergehistory-go' )->text() ) .
157  '</td></tr>' .
158  Xml::closeElement( 'table' ) .
159  '</fieldset>' .
160  '</form>'
161  );
162  }
163 
164  private function showHistory() {
165  $this->showMergeForm();
166 
167  # List all stored revisions
168  $revisions = new MergeHistoryPager(
169  $this, array(), $this->mTargetObj, $this->mDestObj
170  );
171  $haveRevisions = $revisions && $revisions->getNumRows() > 0;
172 
173  $out = $this->getOutput();
174  $titleObj = $this->getPageTitle();
175  $action = $titleObj->getLocalURL( array( 'action' => 'submit' ) );
176  # Start the form here
177  $top = Xml::openElement(
178  'form',
179  array(
180  'method' => 'post',
181  'action' => $action,
182  'id' => 'merge'
183  )
184  );
185  $out->addHTML( $top );
186 
187  if ( $haveRevisions ) {
188  # Format the user-visible controls (comment field, submission button)
189  # in a nice little table
190  $table =
191  Xml::openElement( 'fieldset' ) .
192  $this->msg( 'mergehistory-merge', $this->mTargetObj->getPrefixedText(),
193  $this->mDestObj->getPrefixedText() )->parse() .
194  Xml::openElement( 'table', array( 'id' => 'mw-mergehistory-table' ) ) .
195  '<tr>
196  <td class="mw-label">' .
197  Xml::label( $this->msg( 'mergehistory-reason' )->text(), 'wpComment' ) .
198  '</td>
199  <td class="mw-input">' .
200  Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment' ) ) .
201  '</td>
202  </tr>
203  <tr>
204  <td>&#160;</td>
205  <td class="mw-submit">' .
206  Xml::submitButton( $this->msg( 'mergehistory-submit' )->text(), array( 'name' => 'merge', 'id' => 'mw-merge-submit' ) ) .
207  '</td>
208  </tr>' .
209  Xml::closeElement( 'table' ) .
210  Xml::closeElement( 'fieldset' );
211 
212  $out->addHTML( $table );
213  }
214 
215  $out->addHTML(
216  '<h2 id="mw-mergehistory">' .
217  $this->msg( 'mergehistory-list' )->escaped() . "</h2>\n"
218  );
219 
220  if ( $haveRevisions ) {
221  $out->addHTML( $revisions->getNavigationBar() );
222  $out->addHTML( '<ul>' );
223  $out->addHTML( $revisions->getBody() );
224  $out->addHTML( '</ul>' );
225  $out->addHTML( $revisions->getNavigationBar() );
226  } else {
227  $out->addWikiMsg( 'mergehistory-empty' );
228  }
229 
230  # Show relevant lines from the merge log:
231  $mergeLogPage = new LogPage( 'merge' );
232  $out->addHTML( '<h2>' . $mergeLogPage->getName()->escaped() . "</h2>\n" );
233  LogEventsList::showLogExtract( $out, 'merge', $this->mTargetObj );
234 
235  # When we submit, go by page ID to avoid some nasty but unlikely collisions.
236  # Such would happen if a page was renamed after the form loaded, but before submit
237  $misc = Html::hidden( 'targetID', $this->mTargetObj->getArticleID() );
238  $misc .= Html::hidden( 'destID', $this->mDestObj->getArticleID() );
239  $misc .= Html::hidden( 'target', $this->mTarget );
240  $misc .= Html::hidden( 'dest', $this->mDest );
241  $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() );
242  $misc .= Xml::closeElement( 'form' );
243  $out->addHTML( $misc );
244 
245  return true;
246  }
247 
248  function formatRevisionRow( $row ) {
249  $rev = new Revision( $row );
250 
251  $stxt = '';
252  $last = $this->message['last'];
253 
254  $ts = wfTimestamp( TS_MW, $row->rev_timestamp );
255  $checkBox = Xml::radio( 'mergepoint', $ts, false );
256 
257  $user = $this->getUser();
258 
259  $pageLink = Linker::linkKnown(
260  $rev->getTitle(),
261  htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) ),
262  array(),
263  array( 'oldid' => $rev->getId() )
264  );
265  if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
266  $pageLink = '<span class="history-deleted">' . $pageLink . '</span>';
267  }
268 
269  # Last link
270  if ( !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
271  $last = $this->message['last'];
272  } elseif ( isset( $this->prevId[$row->rev_id] ) ) {
274  $rev->getTitle(),
275  $this->message['last'],
276  array(),
277  array(
278  'diff' => $row->rev_id,
279  'oldid' => $this->prevId[$row->rev_id]
280  )
281  );
282  }
283 
284  $userLink = Linker::revUserTools( $rev );
285 
286  $size = $row->rev_len;
287  if ( !is_null( $size ) ) {
289  }
291 
292  return Html::rawElement( 'li', array(),
293  $this->msg( 'mergehistory-revisionrow' )->rawParams( $checkBox, $last, $pageLink, $userLink, $stxt, $comment )->escaped() );
294  }
295 
296  function merge() {
297  # Get the titles directly from the IDs, in case the target page params
298  # were spoofed. The queries are done based on the IDs, so it's best to
299  # keep it consistent...
300  $targetTitle = Title::newFromID( $this->mTargetID );
301  $destTitle = Title::newFromID( $this->mDestID );
302  if ( is_null( $targetTitle ) || is_null( $destTitle ) ) {
303  return false; // validate these
304  }
305  if ( $targetTitle->getArticleID() == $destTitle->getArticleID() ) {
306  return false;
307  }
308  # Verify that this timestamp is valid
309  # Must be older than the destination page
310  $dbw = wfGetDB( DB_MASTER );
311  # Get timestamp into DB format
312  $this->mTimestamp = $this->mTimestamp ? $dbw->timestamp( $this->mTimestamp ) : '';
313  # Max timestamp should be min of destination page
314  $maxtimestamp = $dbw->selectField(
315  'revision',
316  'MIN(rev_timestamp)',
317  array( 'rev_page' => $this->mDestID ),
318  __METHOD__
319  );
320  # Destination page must exist with revisions
321  if ( !$maxtimestamp ) {
322  $this->getOutput()->addWikiMsg( 'mergehistory-fail' );
323 
324  return false;
325  }
326  # Get the latest timestamp of the source
327  $lasttimestamp = $dbw->selectField(
328  array( 'page', 'revision' ),
329  'rev_timestamp',
330  array( 'page_id' => $this->mTargetID, 'page_latest = rev_id' ),
331  __METHOD__
332  );
333  # $this->mTimestamp must be older than $maxtimestamp
334  if ( $this->mTimestamp >= $maxtimestamp ) {
335  $this->getOutput()->addWikiMsg( 'mergehistory-fail' );
336 
337  return false;
338  }
339  # Update the revisions
340  if ( $this->mTimestamp ) {
341  $timewhere = "rev_timestamp <= {$this->mTimestamp}";
342  $timestampLimit = wfTimestamp( TS_MW, $this->mTimestamp );
343  } else {
344  $timewhere = "rev_timestamp <= {$maxtimestamp}";
345  $timestampLimit = wfTimestamp( TS_MW, $lasttimestamp );
346  }
347  # Do the moving...
348  $dbw->update(
349  'revision',
350  array( 'rev_page' => $this->mDestID ),
351  array( 'rev_page' => $this->mTargetID, $timewhere ),
352  __METHOD__
353  );
354 
355  $count = $dbw->affectedRows();
356  # Make the source page a redirect if no revisions are left
357  $haveRevisions = $dbw->selectField(
358  'revision',
359  'rev_timestamp',
360  array( 'rev_page' => $this->mTargetID ),
361  __METHOD__,
362  array( 'FOR UPDATE' )
363  );
364  if ( !$haveRevisions ) {
365  if ( $this->mComment ) {
366  $comment = $this->msg(
367  'mergehistory-comment',
368  $targetTitle->getPrefixedText(),
369  $destTitle->getPrefixedText(),
371  )->inContentLanguage()->text();
372  } else {
373  $comment = $this->msg(
374  'mergehistory-autocomment',
375  $targetTitle->getPrefixedText(),
376  $destTitle->getPrefixedText()
377  )->inContentLanguage()->text();
378  }
379 
380  $contentHandler = ContentHandler::getForTitle( $targetTitle );
381  $redirectContent = $contentHandler->makeRedirectContent( $destTitle );
382 
383  if ( $redirectContent ) {
384  $redirectPage = WikiPage::factory( $targetTitle );
385  $redirectRevision = new Revision( array(
386  'title' => $targetTitle,
387  'page' => $this->mTargetID,
388  'comment' => $comment,
389  'content' => $redirectContent ) );
390  $redirectRevision->insertOn( $dbw );
391  $redirectPage->updateRevisionOn( $dbw, $redirectRevision );
392 
393  # Now, we record the link from the redirect to the new title.
394  # It should have no other outgoing links...
395  $dbw->delete( 'pagelinks', array( 'pl_from' => $this->mDestID ), __METHOD__ );
396  $dbw->insert( 'pagelinks',
397  array(
398  'pl_from' => $this->mDestID,
399  'pl_namespace' => $destTitle->getNamespace(),
400  'pl_title' => $destTitle->getDBkey() ),
401  __METHOD__
402  );
403  } else {
404  // would be nice to show a warning if we couldn't create a redirect
405  }
406  } else {
407  $targetTitle->invalidateCache(); // update histories
408  }
409  $destTitle->invalidateCache(); // update histories
410  # Check if this did anything
411  if ( !$count ) {
412  $this->getOutput()->addWikiMsg( 'mergehistory-fail' );
413 
414  return false;
415  }
416  # Update our logs
417  $log = new LogPage( 'merge' );
418  $log->addEntry(
419  'merge', $targetTitle, $this->mComment,
420  array( $destTitle->getPrefixedText(), $timestampLimit ), $this->getUser()
421  );
422 
423  $this->getOutput()->addWikiMsg( 'mergehistory-success',
424  $targetTitle->getPrefixedText(), $destTitle->getPrefixedText(), $count );
425 
426  wfRunHooks( 'ArticleMergeComplete', array( $targetTitle, $destTitle ) );
427 
428  return true;
429  }
430 
431  protected function getGroupName() {
432  return 'pagetools';
433  }
434 }
435 
437  public $mForm, $mConds;
438 
439  function __construct( $form, $conds = array(), $source, $dest ) {
440  $this->mForm = $form;
441  $this->mConds = $conds;
442  $this->title = $source;
443  $this->articleID = $source->getArticleID();
444 
445  $dbr = wfGetDB( DB_SLAVE );
446  $maxtimestamp = $dbr->selectField(
447  'revision',
448  'MIN(rev_timestamp)',
449  array( 'rev_page' => $dest->getArticleID() ),
450  __METHOD__
451  );
452  $this->maxTimestamp = $maxtimestamp;
453 
454  parent::__construct( $form->getContext() );
455  }
456 
457  function getStartBody() {
458  wfProfileIn( __METHOD__ );
459  # Do a link batch query
460  $this->mResult->seek( 0 );
461  $batch = new LinkBatch();
462  # Give some pointers to make (last) links
463  $this->mForm->prevId = array();
464  foreach ( $this->mResult as $row ) {
465  $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
466  $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) );
467 
468  $rev_id = isset( $rev_id ) ? $rev_id : $row->rev_id;
469  if ( $rev_id > $row->rev_id ) {
470  $this->mForm->prevId[$rev_id] = $row->rev_id;
471  } elseif ( $rev_id < $row->rev_id ) {
472  $this->mForm->prevId[$row->rev_id] = $rev_id;
473  }
474 
475  $rev_id = $row->rev_id;
476  }
477 
478  $batch->execute();
479  $this->mResult->seek( 0 );
480 
481  wfProfileOut( __METHOD__ );
482 
483  return '';
484  }
485 
486  function formatRow( $row ) {
487  return $this->mForm->formatRevisionRow( $row );
488  }
489 
490  function getQueryInfo() {
491  $conds = $this->mConds;
492  $conds['rev_page'] = $this->articleID;
493  $conds[] = "rev_timestamp < {$this->maxTimestamp}";
494 
495  return array(
496  'tables' => array( 'revision', 'page', 'user' ),
497  'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
498  'conds' => $conds,
499  'join_conds' => array(
500  'page' => Revision::pageJoinCond(),
501  'user' => Revision::userJoinCond() )
502  );
503  }
504 
505  function getIndexField() {
506  return 'rev_timestamp';
507  }
508 }
SpecialPage\getPageTitle
getPageTitle( $subpage=false)
Get a self-referential title object.
Definition: SpecialPage.php:488
DB_MASTER
const DB_MASTER
Definition: Defines.php:56
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
MergeHistoryPager\getIndexField
getIndexField()
This function should be overridden to return the name of the index fi- eld.
Definition: SpecialMergeHistory.php:504
Revision\pageJoinCond
static pageJoinCond()
Return the value of a select() page conds array for the page table.
Definition: Revision.php:396
SpecialMergeHistory\merge
merge()
Definition: SpecialMergeHistory.php:295
LinkBatch
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:30
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
$last
$last
Definition: profileinfo.php:365
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3659
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
SpecialMergeHistory\$mTimestamp
$mTimestamp
Definition: SpecialMergeHistory.php:31
$form
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Definition: hooks.txt:2573
MergeHistoryPager\$mForm
$mForm
Definition: SpecialMergeHistory.php:436
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2483
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
SpecialMergeHistory\showMergeForm
showMergeForm()
Definition: SpecialMergeHistory.php:132
SpecialPage\checkPermissions
checkPermissions()
Checks if userCanExecute, and if not throws a PermissionsError.
Definition: SpecialPage.php:287
MergeHistoryPager\__construct
__construct( $form, $conds=array(), $source, $dest)
Definition: SpecialMergeHistory.php:438
SpecialMergeHistory\showHistory
showHistory()
Definition: SpecialMergeHistory.php:163
SpecialMergeHistory\$mTargetID
$mTargetID
Definition: SpecialMergeHistory.php:31
ContentHandler\getForTitle
static getForTitle(Title $title)
Returns the appropriate ContentHandler singleton for the given title.
Definition: ContentHandler.php:259
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:662
SpecialMergeHistory\__construct
__construct()
Definition: SpecialMergeHistory.php:37
SpecialPage\getLanguage
getLanguage()
Shortcut to get user's language.
Definition: SpecialPage.php:578
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:109
Linker\linkKnown
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
Definition: Linker.php:264
SpecialMergeHistory\$mAction
$mAction
Definition: SpecialMergeHistory.php:31
MergeHistoryPager\$mConds
$mConds
Definition: SpecialMergeHistory.php:436
$dbr
$dbr
Definition: testCompression.php:48
Revision
Definition: Revision.php:26
title
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
Definition: All_system_messages.txt:2703
SpecialMergeHistory\$mDest
$mDest
Definition: SpecialMergeHistory.php:31
$out
$out
Definition: UtfNormalGenerate.php:167
SpecialMergeHistory\preCacheMessages
preCacheMessages()
As we use the same small set of messages in various methods and that they are called often,...
Definition: SpecialMergeHistory.php:75
WikiPage\factory
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
Definition: WikiPage.php:103
SpecialMergeHistory\$mTarget
$mTarget
Definition: SpecialMergeHistory.php:31
Linker\revUserTools
static revUserTools( $rev, $isPublic=false)
Generate a user tool link cluster if the current user is allowed to view it.
Definition: Linker.php:1219
SpecialMergeHistory\$mDestObj
Title $mDestObj
Definition: SpecialMergeHistory.php:35
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
LogPage
Class to simplify the use of log pages.
Definition: LogPage.php:32
SpecialMergeHistory\formatRevisionRow
formatRevisionRow( $row)
Definition: SpecialMergeHistory.php:247
Xml\element
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Definition: Xml.php:39
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4010
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:352
SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition: SpecialPage.php:545
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
$comment
$comment
Definition: importImages.php:107
MergeHistoryPager\getQueryInfo
getQueryInfo()
This function should be overridden to provide all parameters needed for the main paged query.
Definition: SpecialMergeHistory.php:489
MergeHistoryPager\getStartBody
getStartBody()
Hook into getBody(), allows text to be inserted at the start.
Definition: SpecialMergeHistory.php:456
TS_MW
const TS_MW
MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
Definition: GlobalFunctions.php:2431
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
Linker\revComment
static revComment(Revision $rev, $local=false, $isPublic=false)
Wrap and format the given revision's comment block, if the current user is allowed to view it.
Definition: Linker.php:1578
NS_USER_TALK
const NS_USER_TALK
Definition: Defines.php:82
$size
$size
Definition: RandomTest.php:75
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
SpecialPage
Parent class for all special pages.
Definition: SpecialPage.php:33
SpecialMergeHistory\loadRequestParams
loadRequestParams()
Definition: SpecialMergeHistory.php:44
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
Title\newFromURL
static newFromURL( $url)
THIS IS NOT THE FUNCTION YOU WANT.
Definition: Title.php:241
Linker\formatRevisionSize
static formatRevisionSize( $size)
Definition: Linker.php:1600
wfEscapeWikiText
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
Definition: GlobalFunctions.php:2077
MergeHistoryPager\formatRow
formatRow( $row)
Abstract formatting function.
Definition: SpecialMergeHistory.php:485
SpecialMergeHistory\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialMergeHistory.php:430
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:237
$count
$count
Definition: UtfNormalTest2.php:96
$rev
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
Definition: hooks.txt:1337
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
Title
Represents a title within MediaWiki.
Definition: Title.php:35
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:118
SpecialMergeHistory\$mComment
$mComment
Definition: SpecialMergeHistory.php:31
Xml\radio
static radio( $name, $value, $checked=false, $attribs=array())
Convenience function to build an HTML radio button.
Definition: Xml.php:357
as
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
Definition: distributors.txt:9
Revision\userJoinCond
static userJoinCond()
Return the value of a select() JOIN conds array for the user table.
Definition: Revision.php:386
NS_USER
const NS_USER
Definition: Defines.php:81
$source
if(PHP_SAPI !='cli') $source
Definition: mwdoc-filter.php:18
$batch
$batch
Definition: linkcache.txt:23
Xml\submitButton
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
Definition: Xml.php:463
ReverseChronologicalPager
IndexPager with a formatted navigation bar.
Definition: Pager.php:829
Revision\selectUserFields
static selectUserFields()
Return the list of user fields that should be selected from user table.
Definition: Revision.php:493
SpecialPage\checkReadOnly
checkReadOnly()
If the wiki is currently in readonly mode, throws a ReadOnlyError.
Definition: SpecialPage.php:300
MergeHistoryPager
Definition: SpecialMergeHistory.php:435
Xml\input
static input( $name, $size=false, $value=false, $attribs=array())
Convenience function to build an HTML text input field.
Definition: Xml.php:294
Html\rawElement
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
Definition: Html.php:124
Revision\selectFields
static selectFields()
Return the list of revision fields that should be selected to create a new revision.
Definition: Revision.php:405
Xml\label
static label( $label, $id, $attribs=array())
Convenience function to build an HTML form label.
Definition: Xml.php:374
Title\newFromID
static newFromID( $id, $flags=0)
Create a new Title from an article ID.
Definition: Title.php:297
SpecialMergeHistory
Special page allowing users with the appropriate permissions to merge article histories,...
Definition: SpecialMergeHistory.php:30
message
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 after processing after in associative array form externallinks including delete and has completed for all link tables 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 message
Definition: hooks.txt:1624
SpecialMergeHistory\$mDestID
$mDestID
Definition: SpecialMergeHistory.php:31
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:443
Revision\DELETED_TEXT
const DELETED_TEXT
Definition: Revision.php:65
SpecialMergeHistory\$mTargetObj
Title $mTargetObj
Definition: SpecialMergeHistory.php:35
LogEventsList\showLogExtract
static showLogExtract(&$out, $types=array(), $page='', $user='', $param=array())
Show log extract.
Definition: LogEventsList.php:507
SpecialMergeHistory\execute
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
Definition: SpecialMergeHistory.php:82