Commit 6e4c36e3 authored by Chris Graham's avatar Chris Graham

Fixed MANTIS-3983 (Error creating duplicate 'file' in Commandr database directory)

parent 97481cb5
......@@ -156,8 +156,8 @@ class Hook_commandr_fs_database
$where[$field['m_name']] = $this->unescape_name($value);
}
}
$test = $GLOBALS['SITE_DB']->query_select_value_if_there($meta_dir[0], $where);
if ($test !== null) {
$test = $GLOBALS['SITE_DB']->query_select($meta_dir[0], ['*'], $where);
if (!empty($test)) {
return false; // Directory exists
}
$GLOBALS['SITE_DB']->query_insert($meta_dir[0], $where);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment