* - wrap String Wrap the message in html (usually something like "<div ...>$1</div>").
* - flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
* - useRequestParams boolean Set true to use Pager-related parameters in the WebRequest
+ * - useMaster boolean Use master DB
* @return int Number of total log items (not limited by $lim)
*/
public static function showLogExtract(
'wrap' => "$1",
'flags' => 0,
'useRequestParams' => false,
+ 'useMaster' => false,
);
# The + operator appends elements of remaining keys from the right
# handed array to the left handed, whereas duplicated keys are NOT overwritten.
$pager->mIsBackwards = false;
}
+ if ( $param['useMaster'] ) {
+ $pager->mDb = wfGetDB( DB_MASTER );
+ }
if ( isset( $param['offset'] ) ) { # Tell pager to ignore WebRequest offset
$pager->setOffset( $param['offset'] );
}
/** The RevDel_List object, storing the list of items to be deleted/undeleted */
var $list;
+ /** Was the DB modified in this request */
+ protected $wasSaved = false;
+
/**
* UI labels for each type.
*/
# Show relevant lines from the deletion log
$deleteLogPage = new LogPage( 'delete' );
$output->addHTML( "<h2>" . $deleteLogPage->getName()->escaped() . "</h2>\n" );
- LogEventsList::showLogExtract( $output, 'delete',
- $this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
+ LogEventsList::showLogExtract(
+ $output,
+ 'delete',
+ $this->targetObj,
+ '', /* user */
+ array( 'lim' => 25, 'conds' => $qc, 'useMaster' => $this->wasSaved )
+ );
# Show relevant lines from the suppression log
if ( $user->isAllowed( 'suppressionlog' ) ) {
$suppressLogPage = new LogPage( 'suppress' );
$output->addHTML( "<h2>" . $suppressLogPage->getName()->escaped() . "</h2>\n" );
- LogEventsList::showLogExtract( $output, 'suppress',
- $this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
+ LogEventsList::showLogExtract(
+ $output,
+ 'suppress',
+ $this->targetObj,
+ '',
+ array( 'lim' => 25, 'conds' => $qc, 'useMaster' => $this->wasSaved )
+ );
}
}
protected function success() {
$this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
$this->getOutput()->wrapWikiMsg( "<span class=\"success\">\n$1\n</span>", $this->typeLabels['success'] );
+ $this->wasSaved = true;
$this->list->reloadFromMaster();
$this->showForm();
}