function kfm_getFileDetails($filename) { include_once KFM_BASE_PATH . 'includes/files.php'; return _getFileDetails($filename); }
function _tagRemove($recipients, $tagList) { global $kfmdb, $kfm; if (!$kfm->setting('allow_file_edit')) { return kfm_error(kfm_lang('permissionDeniedEditFile')); } if (!is_array($recipients)) { $recipients = array($recipients); } $arr = explode(',', $tagList); $tagList = array(); foreach ($arr as $tag) { $tag = ltrim(rtrim($tag)); if ($tag) { $r = db_fetch_row("select id from " . KFM_DB_PREFIX . "tags where name='" . sql_escape($tag) . "'"); if (count($r)) { $tagList[] = $r['id']; } } } if (count($tagList)) { $kfmdb->exec("delete from " . KFM_DB_PREFIX . "tagged_files where (file_id=" . join(' or file_id=', $recipients) . ") and (tag_id=" . join(' or tag_id="', $tagList) . ")"); } return _getFileDetails($recipients[0]); }