mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
Fix #1853 move non-BMP character encoding before multilang juggling
This commit is contained in:
parent
df1438ea04
commit
a30647d988
1 changed files with 4 additions and 12 deletions
|
|
@ -909,6 +909,10 @@ class documentController extends document
|
||||||
$obj->content = removeHackTag($obj->content);
|
$obj->content = removeHackTag($obj->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix encoding of non-BMP UTF-8 characters.
|
||||||
|
$obj->title = utf8_mbencode($obj->title);
|
||||||
|
$obj->content = utf8_mbencode($obj->content);
|
||||||
|
|
||||||
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
|
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
|
||||||
if($source_obj->get('lang_code') != Context::getLangType())
|
if($source_obj->get('lang_code') != Context::getLangType())
|
||||||
{
|
{
|
||||||
|
|
@ -937,18 +941,6 @@ class documentController extends document
|
||||||
// if temporary document, regdate is now setting
|
// if temporary document, regdate is now setting
|
||||||
if($source_obj->get('status') == $this->getConfigStatus('temp')) $obj->regdate = date('YmdHis');
|
if($source_obj->get('status') == $this->getConfigStatus('temp')) $obj->regdate = date('YmdHis');
|
||||||
|
|
||||||
// Fix encoding of non-BMP UTF-8 characters.
|
|
||||||
if (isset($extra_content))
|
|
||||||
{
|
|
||||||
$extra_content->title = utf8_mbencode($extra_content->title);
|
|
||||||
$extra_content->content = utf8_mbencode($extra_content->content);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$obj->title = utf8_mbencode($obj->title);
|
|
||||||
$obj->content = utf8_mbencode($obj->content);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insert data into the DB
|
// Insert data into the DB
|
||||||
$output = executeQuery('document.updateDocument', $obj);
|
$output = executeQuery('document.updateDocument', $obj);
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue