Use named placeholders in "update_group" function

This commit is contained in:
Dmitriy Simushev 2014-10-27 10:27:37 +00:00
parent d6084f035f
commit 28270d7d18

View File

@ -381,24 +381,24 @@ function update_group($group)
$db = Database::getInstance(); $db = Database::getInstance();
$db->query( $db->query(
("UPDATE {opgroup} SET " ("UPDATE {opgroup} SET "
. "parent = ?, vclocalname = ?, vclocaldescription = ?, " . "parent = :parent, vclocalname = :name, vclocaldescription = :desc, "
. "vccommonname = ?, vccommondescription = ?, " . "vccommonname = :common_name, vccommondescription = :common_desc, "
. "vcemail = ?, vctitle = ?, vcchattitle = ?, " . "vcemail = :email, vctitle = :title, vcchattitle = :chat_title, "
. "vchosturl = ?, vclogo = ?, iweight = ? " . "vchosturl = :host_url, vclogo = :logo, iweight = :weight "
. "where groupid = ?"), . "where groupid = :id"),
array( array(
($group['parent'] ? (int) $group['parent'] : null), ':parent' => ($group['parent'] ? (int) $group['parent'] : null),
$group['vclocalname'], ':name' => $group['vclocalname'],
$group['vclocaldescription'], ':desc' => $group['vclocaldescription'],
$group['vccommonname'], ':common_name' => $group['vccommonname'],
$group['vccommondescription'], ':common_desc' => $group['vccommondescription'],
$group['vcemail'], ':email' => $group['vcemail'],
$group['vctitle'], ':title' => $group['vctitle'],
$group['vcchattitle'], ':chat_title' => $group['vcchattitle'],
$group['vchosturl'], ':host_url' => $group['vchosturl'],
$group['vclogo'], ':logo' => $group['vclogo'],
$group['iweight'], ':weight' => $group['iweight'],
$group['groupid'] ':id' => $group['groupid'],
) )
); );