mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
회원/게시물 import시 로그를 보이도록 하고 회원 등록시 잘못된 부분 코드 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1908 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b6b2c27986
commit
fc2bb871de
4 changed files with 27 additions and 20 deletions
|
|
@ -22,6 +22,7 @@
|
|||
var $module_srl = 0;
|
||||
var $category_srl = 0;
|
||||
var $category_list = array();
|
||||
var $msg = null;
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
|
|
@ -123,7 +124,10 @@
|
|||
} else {
|
||||
$this->add('position', $this->imported_count);
|
||||
$this->add('is_finished', 'N');
|
||||
$this->setMessage( sprintf(Context::getLang('msg_importing'), $this->total_count, $this->imported_count) );
|
||||
|
||||
$message = sprintf(Context::getLang('msg_importing'), $this->total_count, $this->imported_count);
|
||||
if($this->msg) $message .= "<br />".$this->msg;
|
||||
$this->setMessage( $message );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +182,7 @@
|
|||
$args->regdate = $xml_doc->member->regdate->body;
|
||||
$args->allow_mailing = $xml_doc->member->allow_mailing->body;
|
||||
$args->allow_message = 'Y';
|
||||
$output = $this->oMemberController->insertMember($args);
|
||||
$output = $this->oMemberController->insertMember($args, true);
|
||||
if($output->toBool()) {
|
||||
$member_srl = $output->get('member_srl');
|
||||
if($xml_doc->member->image_nickname->body) {
|
||||
|
|
@ -196,9 +200,10 @@
|
|||
if($xml_doc->member->signature->body) {
|
||||
$this->oMemberController->putSignature($member_srl, base64_decode($xml_doc->member->signature->body));
|
||||
}
|
||||
|
||||
$this->imported_count ++;
|
||||
} else {
|
||||
$this->msg .= $args->user_id." : ".$output->getMessage()."<br />";
|
||||
}
|
||||
$this->imported_count ++;
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
@ -339,6 +344,8 @@
|
|||
$this->oTrackbackController->insertTrackback($trackback_args, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->msg .= $sequence." : ".$output->getMessage()."<br />";
|
||||
}
|
||||
|
||||
$this->imported_count ++;
|
||||
|
|
@ -393,7 +400,6 @@
|
|||
if($this->category_list[$title]) continue;
|
||||
|
||||
$output = $oDocumentController->insertCategory($this->module_srl, $title);
|
||||
debugPrint($output);
|
||||
$this->category_list[$title] = $output->get('category_srl');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@
|
|||
<span class="button"><input type="submit" value="{$lang->cmd_next}" /></span>
|
||||
</div>
|
||||
|
||||
<div id="step2_status" style="display:none" class="gap1">
|
||||
<div id="step2_position" class="desc"></div>
|
||||
<div id="step2_status" style="display:none;" class="gap1">
|
||||
<div id="step2_position" style="height:150px;overflow-y:scroll;border:2px solid #DDDDDD;padding:10px;" class="desc"></div>
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="button" value="{$lang->cmd_continue}" onclick="doManualProcess(); return false" /></span>
|
||||
</div>
|
||||
|
|
@ -114,5 +114,4 @@
|
|||
</div>
|
||||
|
||||
<!-- final step. 진행 완료 또는 실패 메세지 -->
|
||||
<div id="step_finish" style="display:none">
|
||||
</div>
|
||||
<div id="step_finish" style="display:none;"></div>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ function completeImport(ret_obj) {
|
|||
} else {
|
||||
var fo_obj = xGetElementById('fo_step2');
|
||||
fo_obj.position.value = position;
|
||||
xInnerHtml('step2_position', message);
|
||||
message = message.replace(/</g,"<").replace(/>/g,">");
|
||||
xInnerHtml('step2_position', xInnerHtml('step2_position')+"<br />"+message);
|
||||
procFilter(fo_obj, import_xml);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -856,7 +856,7 @@
|
|||
/**
|
||||
* @brief member 테이블에 사용자 추가
|
||||
**/
|
||||
function insertMember($args) {
|
||||
function insertMember($args, $password_is_hashed = false) {
|
||||
// 멤버 설정 정보에서 가입약관 부분을 재확인
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
|
|
@ -905,8 +905,8 @@
|
|||
|
||||
// DB에 입력
|
||||
$args->member_srl = getNextSequence();
|
||||
if($args->password) $args->password = md5($args->password);
|
||||
else unset($args->password);
|
||||
if($args->password && !$password_is_hashed) $args->password = md5($args->password);
|
||||
elseif(!$args->password) unset($args->password);
|
||||
|
||||
$output = executeQuery('member.insertMember', $args);
|
||||
if(!$output->toBool()) {
|
||||
|
|
@ -1145,16 +1145,17 @@
|
|||
$add = 7;
|
||||
$nr2 = 0x12345671;
|
||||
|
||||
$password_len = strlen($password);
|
||||
for($i=0;$i<$password_len;$i++) {
|
||||
$char = substr($password,$i,1);
|
||||
if($char == ' ' || $char == '\t') continue;
|
||||
$tmp = ord($char);
|
||||
$nr ^= ((($nr & 63) + $add) * $tmp) + ($nr << 8);
|
||||
settype($password, "string");
|
||||
|
||||
for ($i=0; $i<strlen($password); $i++) {
|
||||
if ($password[$i] == ' ' || $password[$i] == '\t') continue;
|
||||
$tmp = ord($password[$i]);
|
||||
$nr ^= ((($nr & 63) + $add) * $tmp) + ($nr << 8);
|
||||
$nr2 += ($nr2 << 8) ^ $nr;
|
||||
$add += $tmp;
|
||||
}
|
||||
return sprintf('%08x%08x', $nr, $nr2);
|
||||
$nr2 += 0x80000000;
|
||||
return sprintf("%08lx%08lx", $nr, $nr2);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue