* @todo document
*/
function importFormData( &$request ) {
+ global $wgLang ;
$fname = 'EditPage::importFormData';
wfProfileIn( $fname );
$this->textbox1 = $this->safeUnicodeInput( $request, 'wpTextbox1' );
$this->textbox2 = $this->safeUnicodeInput( $request, 'wpTextbox2' );
$this->mMetaData = rtrim( $request->getText( 'metadata' ) );
- $this->summary = $request->getText( 'wpSummary' );
+ # Truncate for whole multibyte characters. +5 bytes for ellipsis
+ $this->summary = $wgLang->truncate( $request->getText( 'wpSummary' ), 250 );
$this->edittime = $request->getVal( 'wpEdittime' );
$this->starttime = $request->getVal( 'wpStarttime' );
wfProfileIn( $fname );
$previewhead = '<h2>' . htmlspecialchars( wfMsg( 'preview' ) ) . "</h2>\n" .
- "<p class='previewnote'>" . htmlspecialchars( wfMsg( 'previewnote' ) ) . "</p>\n";
+ "<p class='previewnote'><strong>" . htmlspecialchars( wfMsg( 'previewnote' ) ) . "</strong></p>\n";
if ( $this->isConflict ) {
$previewhead.='<h2>' . htmlspecialchars( wfMsg( 'previewconflict' ) ) .
"</h2>\n";
* @return string HTML
*/
function getDiff() {
+ global $wgUser;
+
require_once( 'DifferenceEngine.php' );
$oldtext = $this->mArticle->fetchContent();
$newtext = $this->mArticle->replaceSection(
$this->section, $this->textbox1, $this->summary, $this->edittime );
$oldtitle = wfMsg( 'currentrev' );
$newtitle = wfMsg( 'yourtext' );
- if ( $oldtext != wfMsg( 'noarticletext' ) || $newtext != '' ) {
+ if ( $oldtext != wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ) || $newtext != '' ) {
$difftext = DifferenceEngine::getDiff( $oldtext, $newtext, $oldtitle, $newtitle );
}