From: umherirrender Date: Fri, 12 Oct 2012 19:52:16 +0000 (+0200) Subject: EditPage: Use content language to truncate for database X-Git-Tag: 1.31.0-rc.0~22041^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=1d440ca3d292590ff5e5ed3c6f89668057477234;p=lhc%2Fweb%2Fwiklou.git EditPage: Use content language to truncate for database Change-Id: I53e5b2304f8b8a8787b30d9c4717f39bfe96a127 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index f2bab7dcf6..2f212704a8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -588,7 +588,7 @@ class EditPage { * @param $request WebRequest */ function importFormData( &$request ) { - global $wgLang, $wgUser; + global $wgContLang, $wgUser; wfProfileIn( __METHOD__ ); @@ -612,7 +612,7 @@ class EditPage { } # Truncate for whole multibyte characters - $this->summary = $wgLang->truncate( $request->getText( 'wpSummary' ), 255 ); + $this->summary = $wgContLang->truncate( $request->getText( 'wpSummary' ), 255 ); # If the summary consists of a heading, e.g. '==Foobar==', extract the title from the # header syntax, e.g. 'Foobar'. This is mainly an issue when we are using wpSummary for @@ -624,7 +624,7 @@ class EditPage { # currently doing double duty as both edit summary and section title. Right now this # is just to allow API edits to work around this limitation, but this should be # incorporated into the actual edit form when EditPage is rewritten (Bugs 18654, 26312). - $this->sectiontitle = $wgLang->truncate( $request->getText( 'wpSectionTitle' ), 255 ); + $this->sectiontitle = $wgContLang->truncate( $request->getText( 'wpSectionTitle' ), 255 ); $this->sectiontitle = preg_replace( '/^\s*=+\s*(.*?)\s*=+\s*$/', '$1', $this->sectiontitle ); $this->edittime = $request->getVal( 'wpEdittime' );