issue 661, modify for cafeXE

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9742 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2011-10-26 01:26:50 +00:00
parent 82d5ad0cf2
commit 632b92c21a
3 changed files with 15 additions and 4 deletions

View file

@ -732,11 +732,14 @@
function insertGroup($args) {
if(!$args->site_srl) $args->site_srl = 0;
// Check the value of is_default.
if($args->is_default!='Y') $args->is_default = 'N';
if($args->is_default!='Y') {
$args->is_default = 'N';
} else {
$output = executeQuery('member.updateGroupDefaultClear', $args);
if(!$output->toBool()) return $output;
}
if (!$args->group_srl) $args->group_srl = getNextSequence();
if (!$args->group_srl) $args->group_srl = getNextSequence();
return executeQuery('member.insertGroup', $args);
}
@ -745,7 +748,13 @@
**/
function updateGroup($args) {
// Check the value of is_default.
if($args->is_default!='Y') $args->is_default = 'N';
if(!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
if($args->is_default!='Y') {
$args->is_default = 'N';
} else {
$output = executeQuery('member.updateGroupDefaultClear', $args);
if(!$output->toBool()) return $output;
}
return executeQuery('member.updateGroup', $args);
}