/** @var bool */
public $isConflict = false;
- /**
- * @deprecated since 1.30 use Title::isUserConfigPage()
- * @var bool
- */
- public $isCssJsSubpage = false;
-
- /**
- * @deprecated since 1.30 use Title::isUserCssConfigPage()
- * @var bool
- */
- public $isCssSubpage = false;
-
- /**
- * @deprecated since 1.30 use Title::isUserJsConfigPage()
- * @var bool
- */
- public $isJsSubpage = false;
-
- /**
- * @deprecated since 1.30
- * @var bool
- */
- public $isWrongCaseCssJsPage = false;
-
/** @var bool New page or new section */
public $isNew = false;
}
$this->isConflict = false;
- // css / js subpages of user pages get a special treatment
- // The following member variables are deprecated since 1.30,
- // the functions should be used instead.
- $this->isCssJsSubpage = $this->mTitle->isUserConfigPage();
- $this->isCssSubpage = $this->mTitle->isUserCssConfigPage();
- $this->isJsSubpage = $this->mTitle->isUserJsConfigPage();
- $this->isWrongCaseCssJsPage = $this->isWrongCaseUserConfigPage();
# Show applicable editing introductions
if ( $this->formtype == 'initial' || $this->firsttime ) {
* @return array
*/
private function getSummaryInputAttributes( array $inputAttrs = null ) {
- // Note: the maxlength is overridden in JS to 255 and to make it use UTF-8 bytes, not characters.
+ $conf = $this->context->getConfig();
+ $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
+ // HTML maxlength uses "UTF-16 code units", which means that characters outside BMP
+ // (e.g. emojis) count for two each. This limit is overridden in JS to instead count
+ // Unicode codepoints (or 255 UTF-8 bytes for old schema).
return ( is_array( $inputAttrs ) ? $inputAttrs : [] ) + [
'id' => 'wpSummary',
'name' => 'wpSummary',
- 'maxlength' => '200',
+ 'maxlength' => $oldCommentSchema ? 200 : CommentStore::COMMENT_CHARACTER_LIMIT,
'tabindex' => 1,
'size' => 60,
'spellcheck' => 'true',
$out->addHTML( $this->editFormTextAfterWarn );
$out->addHTML( "<div class='editButtons'>\n" );
- $out->addHTML( implode( $this->getEditButtons( $tabindex ), "\n" ) . "\n" );
+ $out->addHTML( implode( "\n", $this->getEditButtons( $tabindex ) ) . "\n" );
$cancel = $this->getCancelLink();
protected function getLastDelete() {
$dbr = wfGetDB( DB_REPLICA );
$commentQuery = CommentStore::getStore()->getJoin( 'log_comment' );
+ $actorQuery = ActorMigration::newMigration()->getJoin( 'log_user' );
$data = $dbr->selectRow(
- [ 'logging', 'user' ] + $commentQuery['tables'],
+ array_merge( [ 'logging' ], $commentQuery['tables'], $actorQuery['tables'], [ 'user' ] ),
[
'log_type',
'log_action',
'log_timestamp',
- 'log_user',
'log_namespace',
'log_title',
'log_params',
'log_deleted',
'user_name'
- ] + $commentQuery['fields'], [
+ ] + $commentQuery['fields'] + $actorQuery['fields'],
+ [
'log_namespace' => $this->mTitle->getNamespace(),
'log_title' => $this->mTitle->getDBkey(),
'log_type' => 'delete',
'log_action' => 'delete',
- 'user_id=log_user'
],
__METHOD__,
[ 'LIMIT' => 1, 'ORDER BY' => 'log_timestamp DESC' ],
[
- 'user' => [ 'JOIN', 'user_id=log_user' ],
- ] + $commentQuery['joins']
+ 'user' => [ 'JOIN', 'user_id=' . $actorQuery['fields']['log_user'] ],
+ ] + $commentQuery['joins'] + $actorQuery['joins']
);
// Quick paranoid permission checks...
if ( is_object( $data ) ) {