|
From: FlorinCB <ory...@us...> - 2008-10-07 04:29:48
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17868 Modified Files: functions.php Log Message: update Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** functions.php 24 Sep 2008 19:12:17 -0000 1.50 --- functions.php 7 Oct 2008 04:24:51 -0000 1.51 *************** *** 1790,1796 **** if ( !$field_id ) { ! $sql = "INSERT INTO " . $this->custom_table . " (custom_name, custom_description, data, regex, field_type) ! VALUES('" . $field_name . "', '" . $field_desc . "', '" . $data . "', '" . $regex . "', '" . $field_type . "')"; ! if ( !( $db->sql_query( $sql ) ) ) { --- 1790,1803 ---- if ( !$field_id ) { ! $sql_array = array( ! 'custom_name' => utf8_normalize_nfc($field_name), ! 'custom_description' => utf8_normalize_nfc($field_desc), ! 'data' => $data, ! 'regex' => $regex, ! 'field_type' => $field_type, ! ); ! ! $sql = "INSERT INTO " . $this->custom_table . $db->sql_build_array('INSERT', $sql_array); ! if ( !( $db->sql_query( $sql ) ) ) { *************** *** 1799,1803 **** $field_id = $db->sql_nextid(); ! $sql = "UPDATE " . $this->custom_table . " SET field_order = '$field_id' --- 1806,1810 ---- $field_id = $db->sql_nextid(); ! $sql = "UPDATE " . $this->custom_table . " SET field_order = '$field_id' *************** *** 1811,1817 **** else { ! $sql = "UPDATE " . $this->custom_table . " ! SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' ! WHERE custom_id = $field_id"; if ( !( $db->sql_query( $sql ) ) ) --- 1818,1832 ---- else { ! ! $sql_array = array( ! 'custom_name' => utf8_normalize_nfc($field_name), ! 'custom_description' => utf8_normalize_nfc($field_desc), ! 'data' => $data, ! 'regex' => $regex, ! 'field_order' => (int) $field_order, ! ); ! ! $sql = "UPDATE " . $this->custom_table . "SET " . $db->sql_build_array('UPDATE', $sql_array) . " ! WHERE custom_id = '" . $db->sql_escape($field_id) . "'"; if ( !( $db->sql_query( $sql ) ) ) |