Refactor create_group function a little

This commit is contained in:
Dmitriy Simushev 2014-10-20 11:50:45 +00:00
parent 1aec37b6f6
commit 34341ef01c

View File

@ -320,19 +320,22 @@ function create_group($group)
. "parent, vclocalname, vclocaldescription, vccommonname, " . "parent, vclocalname, vclocaldescription, vccommonname, "
. "vccommondescription, vcemail, vctitle, vcchattitle, vchosturl, " . "vccommondescription, vcemail, vctitle, vcchattitle, vchosturl, "
. "vclogo, iweight" . "vclogo, iweight"
. ") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"), . ") values ("
. ":parent, :name, :desc, :common_name, "
. ":common_desc, :email, :title, :chat_title, :url, "
. ":logo, :weight)"),
array( array(
($group['parent'] ? (int) $group['parent'] : null), ':parent' => ($group['parent'] ? (int) $group['parent'] : null),
$group['name'], ':name' => $group['name'],
$group['description'], ':desc' => $group['description'],
$group['commonname'], ':common_name' => $group['commonname'],
$group['commondescription'], ':common_desc' => $group['commondescription'],
$group['email'], ':email' => $group['email'],
$group['title'], ':title' => $group['title'],
$group['chattitle'], ':chat_title' => $group['chattitle'],
$group['hosturl'], ':url' => $group['hosturl'],
$group['logo'], ':logo' => $group['logo'],
$group['weight'], ':weight' => $group['weight'],
) )
); );
$id = $db->insertedId(); $id = $db->insertedId();