can edit file metadata.
This commit is contained in:
parent
2a37140c4d
commit
0cf89713a9
6 changed files with 136 additions and 19 deletions
|
@ -537,6 +537,21 @@ class StoredFile {
|
|||
$this->loadMetadata();
|
||||
}
|
||||
|
||||
public function replaceDbMetadata($p_values)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
foreach ($p_values as $category => $value) {
|
||||
$escapedValue = pg_escape_string($value);
|
||||
$columnName = $category;
|
||||
if (!is_null($columnName)) {
|
||||
$sql = "UPDATE ".$CC_CONFIG["filesTable"]
|
||||
." SET $columnName='$escapedValue'"
|
||||
." WHERE gunid = '".$this->gunid."'";
|
||||
$CC_DBC->query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function clearMetadata()
|
||||
{
|
||||
$metadataColumns = array("format", "bit_rate", "sample_rate", "length",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue