|
From: FlorinCB <ory...@us...> - 2008-10-06 04:40:23
|
Update of /cvsroot/mxbb/core/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28356 Modified Files: admin_mx_portal.php Log Message: query upgraded using latest features compatible with UTF-8 Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** admin_mx_portal.php 4 Oct 2008 07:04:24 -0000 1.46 --- admin_mx_portal.php 6 Oct 2008 04:37:41 -0000 1.47 *************** *** 93,106 **** $new['smtp_username'] = $mx_request_vars->post('smtp_username', MX_TYPE_NO_TAGS, '0'); $new['smtp_password'] = $mx_request_vars->post('smtp_password', MX_TYPE_NO_TAGS, '0'); ! $sql = "UPDATE " . PORTAL_TABLE . " ! SET "; ! ! $is_first = true; ! foreach ($new as $key => $value) ! { ! $sql .= ($is_first ? "" : ", ") . $key . " = '" . str_replace("\'", "''", $value) . "'"; ! $is_first = false; ! } if( !($db->sql_query($sql)) ) --- 93,99 ---- $new['smtp_username'] = $mx_request_vars->post('smtp_username', MX_TYPE_NO_TAGS, '0'); $new['smtp_password'] = $mx_request_vars->post('smtp_password', MX_TYPE_NO_TAGS, '0'); + ! $sql = "UPDATE " . PORTAL_TABLE . " SET " . $db->sql_build_array('UPDATE', utf8_normalize_nfc($new)); if( !($db->sql_query($sql)) ) |