|
@@ -803,6 +803,8 @@ function chado_update_record($table, $match, $values, $options = NULL) {
|
|
*/
|
|
*/
|
|
function chado_delete_record($table, $match, $options = NULL) {
|
|
function chado_delete_record($table, $match, $options = NULL) {
|
|
|
|
|
|
|
|
+ $print_errors = (isset($options['print_errors'])) ? $options['print_errors'] : FALSE;
|
|
|
|
+
|
|
if (!is_array($match)) {
|
|
if (!is_array($match)) {
|
|
tripal_report_error('tripal_core', TRIPAL_ERROR,
|
|
tripal_report_error('tripal_core', TRIPAL_ERROR,
|
|
'Cannot pass non array as values for matching.', array());
|
|
'Cannot pass non array as values for matching.', array());
|
|
@@ -826,7 +828,7 @@ function chado_delete_record($table, $match, $options = NULL) {
|
|
$table_desc = chado_get_schema($table);
|
|
$table_desc = chado_get_schema($table);
|
|
$fields = $table_desc['fields'];
|
|
$fields = $table_desc['fields'];
|
|
if (empty($table_desc)) {
|
|
if (empty($table_desc)) {
|
|
- tripal_report_error('tripal_core', TRIPAL_WARNING,
|
|
|
|
|
|
+ chado_delete_record('tripal_core', TRIPAL_WARNING,
|
|
'chado_insert_record; There is no table description for !table_name',
|
|
'chado_insert_record; There is no table description for !table_name',
|
|
array('!table_name' => $table), array('print' => $print_errors)
|
|
array('!table_name' => $table), array('print' => $print_errors)
|
|
);
|
|
);
|