* Removed some obsolete UTF-8 converter functions
* Fix function comment in debug dump of SQL statements
* (bug 2275) Update search index more or less right on page move
+* (bug 2053) Move comment whitespace trimming from edit page to save;
+ leaves the whitespace from the section comment there on preview.
=== Caveats ===
$this->textbox1 = rtrim( $request->getText( 'wpTextbox1' ) );
$this->textbox2 = rtrim( $request->getText( 'wpTextbox2' ) );
$this->mMetaData = rtrim( $request->getText( 'metadata' ) );
- $this->summary = trim( $request->getText( 'wpSummary' ) );
+ $this->summary = $request->getText( 'wpSummary' );
$this->edittime = $request->getVal( 'wpEdittime' );
if( is_null( $this->edittime ) ) {
$this->mId = isset( $row['id'] ) ? IntVal( $row['id'] ) : null;
$this->mPage = isset( $row['page'] ) ? IntVal( $row['page'] ) : null;
$this->mTextId = isset( $row['text_id'] ) ? IntVal( $row['text_id'] ) : null;
- $this->mComment = isset( $row['comment'] ) ? StrVal( $row['comment'] ) : null;
$this->mUserText = isset( $row['user_text'] ) ? StrVal( $row['user_text'] ) : $wgUser->getName();
$this->mUser = isset( $row['user'] ) ? IntVal( $row['user'] ) : $wgUser->getId();
$this->mMinorEdit = isset( $row['minor_edit'] ) ? IntVal( $row['minor_edit'] ) : 0;
$this->mTimestamp = isset( $row['timestamp'] ) ? StrVal( $row['timestamp'] ) : wfTimestamp( TS_MW );
$this->mDeleted = isset( $row['deleted'] ) ? IntVal( $row['deleted'] ) : 0;
- $this->mText = isset( $row['text'] ) ? StrVal( $row['text'] ) : null;
+
+ // Enforce spacing trimming on supplied text
+ $this->mComment = isset( $row['comment'] ) ? trim( StrVal( $row['comment'] ) ) : null;
+ $this->mText = isset( $row['text'] ) ? rtrim( StrVal( $row['text'] ) ) : null;
$this->mTitle = null; # Load on demand if needed
$this->mCurrent = false;