$wgOut->addHTML( Html::openElement(
'form',
[
- // Keep mw-editform-ooui class for backwards-compatibility temporarily
- 'class' => 'mw-editform mw-editform-ooui',
+ 'class' => 'mw-editform',
'id' => self::EDITFORM_ID,
'name' => self::EDITFORM_ID,
'method' => 'post',
if ( $this->wasDeletedSinceLastEdit() && 'save' == $this->formtype ) {
$username = $this->lastDelete->user_name;
- $comment = $this->lastDelete->log_comment;
+ $comment = CommentStore::newKey( 'log_comment' )->getComment( $this->lastDelete )->text;
// It is better to not parse the comment at all than to have templates expanded in the middle
// TODO: can the checkLabel be moved outside of the div so that wrapWikiMsg could be used?
$wgOut->addHTML( Html::hidden( 'wpStarttime', $this->starttime ) );
$wgOut->addHTML( Html::hidden( 'wpEdittime', $this->edittime ) );
$wgOut->addHTML( Html::hidden( 'editRevId', $this->editRevId ) );
- $wgOut->addHTML( Html::hidden( 'wpScrolltop', $this->scrolltop ) );
+ $wgOut->addHTML( Html::hidden( 'wpScrolltop', $this->scrolltop, [ 'id' => 'wpScrolltop' ] ) );
if ( !$this->checkUnicodeCompliantBrowser() ) {
$wgOut->addHTML( Html::hidden( 'safemode', '1' ) );
*/
protected function getLastDelete() {
$dbr = wfGetDB( DB_REPLICA );
+ $commentQuery = CommentStore::newKey( 'log_comment' )->getJoin();
$data = $dbr->selectRow(
- [ 'logging', 'user' ],
+ [ 'logging', 'user' ] + $commentQuery['tables'],
[
'log_type',
'log_action',
'log_user',
'log_namespace',
'log_title',
- 'log_comment',
'log_params',
'log_deleted',
'user_name'
- ], [
+ ] + $commentQuery['fields'], [
'log_namespace' => $this->mTitle->getNamespace(),
'log_title' => $this->mTitle->getDBkey(),
'log_type' => 'delete',
'user_id=log_user'
],
__METHOD__,
- [ 'LIMIT' => 1, 'ORDER BY' => 'log_timestamp DESC' ]
+ [ 'LIMIT' => 1, 'ORDER BY' => 'log_timestamp DESC' ],
+ [
+ 'user' => [ 'JOIN', 'user_id=log_user' ],
+ ] + $commentQuery['joins']
);
// Quick paranoid permission checks...
if ( is_object( $data ) ) {
}
if ( $data->log_deleted & LogPage::DELETED_COMMENT ) {
- $data->log_comment = $this->context->msg( 'rev-deleted-comment' )->escaped();
+ $data->log_comment_text = $this->context->msg( 'rev-deleted-comment' )->escaped();
+ $data->log_comment_data = null;
}
}
* where bool indicates the checked status of the checkbox
* @return array
*/
- protected function getCheckboxesDefinition( $checked ) {
+ public function getCheckboxesDefinition( $checked ) {
global $wgUser;
$checkboxes = [];