Fix importer module not saving documents/comments with empty password fields

This commit is contained in:
Kijin Sung 2021-01-29 15:01:26 +09:00
parent 957be16a25
commit 41ed1d7bec
5 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,7 @@
<column name="content" var="content" notnull="notnull" />
<column name="voted_count" var="voted_count" default="0" />
<column name="blamed_count" var="blamed_count" default="0" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="password" var="password" maxlength="60" />
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
<column name="user_id" var="user_id" default="" />
<column name="user_name" var="user_name" default="" />

View file

@ -9,7 +9,7 @@
<column name="is_secret" var="is_secret" default="N" />
<column name="notify_message" var="notify_message" default="N" />
<column name="content" var="content" notnull="notnull" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="password" var="password" maxlength="60" />
<column name="user_id" var="user_id" />
<column name="user_name" var="user_name" default="" />
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />

View file

@ -18,7 +18,7 @@
<column name="comment_count" var="comment_count" default="0" />
<column name="trackback_count" var="trackback_count" default="0" />
<column name="uploaded_count" var="uploaded_count" default="0" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="password" var="password" maxlength="60" />
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
<column name="member_srl" var="member_srl" default="0" filter="number" />
<column name="user_id" var="user_id" default="" />

View file

@ -11,7 +11,7 @@
<column name="title_color" var="title_color" default="N" />
<column name="content" var="content" notnull="notnull" />
<column name="uploaded_count" var="uploaded_count" default="0" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="password" var="password" maxlength="60" />
<column name="nick_name" var="nick_name" minlength="1" maxlength="40" />
<column name="member_srl" var="member_srl" />
<column name="user_id" var="user_id" />

View file

@ -765,7 +765,7 @@ class importerAdminController extends importer
$obj->readed_count = base64_decode($xmlDoc->post->readed_count->body);
$obj->voted_count = base64_decode($xmlDoc->post->voted_count->body);
$obj->blamed_count = base64_decode($xmlDoc->post->blamed_count->body);
$obj->password = base64_decode($xmlDoc->post->password->body);
$obj->password = base64_decode($xmlDoc->post->password->body) ?: null;
$obj->user_name = base64_decode($xmlDoc->post->user_name->body);
$obj->nick_name = base64_decode($xmlDoc->post->nick_name->body);
if(!$obj->user_name) $obj->user_name = $obj->nick_name;
@ -974,7 +974,7 @@ class importerAdminController extends importer
$obj->content = base64_decode($xmlDoc->comment->content->body);
$obj->voted_count = base64_decode($xmlDoc->comment->voted_count->body);
$obj->blamed_count = base64_decode($xmlDoc->comment->blamed_count->body);
$obj->password = base64_decode($xmlDoc->comment->password->body);
$obj->password = base64_decode($xmlDoc->comment->password->body) ?: null;
$obj->user_name =base64_decode($xmlDoc->comment->user_name->body);
$obj->nick_name = base64_decode($xmlDoc->comment->nick_name->body);
if(!$obj->user_name) $obj->user_name = $obj->nick_name;