mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@226 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
30127ae3e6
commit
ea69a65507
5 changed files with 13 additions and 9 deletions
|
|
@ -164,7 +164,7 @@
|
|||
$output = $this->_executeInsertAct($tables, $column, $pass_quotes);
|
||||
break;
|
||||
case 'update' :
|
||||
$output = $this->_executeUpdateAct($tables, $column, $condition, $pass_quotes);
|
||||
$output = $this->_executeUpdateAct($tables, $column, $args, $condition, $pass_quotes);
|
||||
break;
|
||||
case 'delete' :
|
||||
$output = $this->_executeDeleteAct($tables, $condition, $pass_quotes);
|
||||
|
|
|
|||
|
|
@ -287,10 +287,12 @@
|
|||
/**
|
||||
* @brief updateAct 처리
|
||||
**/
|
||||
function _executeUpdateAct($tables, $column, $condition, $pass_quotes) {
|
||||
function _executeUpdateAct($tables, $column, $args, $condition, $pass_quotes) {
|
||||
$table = array_pop($tables);
|
||||
|
||||
foreach($column as $key => $val) {
|
||||
// args에 아예 해당 key가 없으면 패스
|
||||
if(!isset($args->{$key})) continue;
|
||||
if(in_array($key, $pass_quotes)) $update_list[] = sprintf('`%s` = %s', $key, $this->addQuotes($val));
|
||||
else $update_list[] = sprintf('`%s` = \'%s\'', $key, $this->addQuotes($val));
|
||||
}
|
||||
|
|
@ -300,7 +302,8 @@
|
|||
if($condition) $condition = ' where '.$condition;
|
||||
|
||||
$query = sprintf("update `%s%s` set %s %s;", $this->prefix, $table, $update_query, $condition);
|
||||
return $this->_query($query);
|
||||
|
||||
return $this->_query($query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
/**
|
||||
* @brief debug mode = true 일때 files/_debug_message.php 에 디버그 내용이 쌓임
|
||||
**/
|
||||
define('__DEBUG__', true);
|
||||
define('__DEBUG__', false);
|
||||
if(__DEBUG__) {
|
||||
|
||||
// php5이상이면 error handling을 handleError() 로 set
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('member_srl', $args->member_srl);
|
||||
$this->setMessage($msg_code);
|
||||
}
|
||||
|
||||
|
|
@ -353,9 +354,9 @@
|
|||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||
|
||||
// 필수 변수들의 조절
|
||||
if($args->allow_mailing!='Y') $args->is_default = 'N';
|
||||
if($args->denied!='Y') $args->denied = 'N';
|
||||
if($args->is_admin!='Y') $args->use_category = 'N';
|
||||
if($args->allow_mailing!='Y') $args->allow_mailing = 'N';
|
||||
if(!$args->denied) unset($args->denied);
|
||||
if(!$args->is_admin) unset($args->is_admin);
|
||||
list($args->email_id, $args->email_host) = explode('@', $args->email_address);
|
||||
|
||||
// 아이디, 닉네임, email address 의 중복 체크
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
<column name="profile_image" var="profile_image" />
|
||||
<column name="signature" var="signature" />
|
||||
<column name="allow_mailing" var="allow_mailing" default="Y" />
|
||||
<column name="denied" var="denied" default="N" />
|
||||
<column name="is_admin" var="is_admin" default="N" />
|
||||
<column name="denied" var="denied" />
|
||||
<column name="is_admin" var="is_admin" />
|
||||
<column name="description" var="description" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
</columns>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue