Commit 832b98b3 authored by aaronwinborn's avatar aaronwinborn

* Begin implementation of media_metadata_by_fid() (aaron).

parent 6379d9d7
......@@ -4,6 +4,7 @@
August 2009
-----------
* Begin implementation of media_metadata_by_fid() (aaron).
* Remove return value in media_metadata_delete documentation (aaron).
* Implement media_metadata_delete() (aaron).
* Rewrite media_metadata_add() to use new dbtng (aaron).
......
......@@ -114,7 +114,15 @@ function media_metadata_form_submit($form, &$form_state) {
* An empty array is returned if there are no results.
*/
function media_metadata_by_fid($fid, $unhandled = FALSE) {
// TODO: Implement
$metadata = array();
$result = db_query("SELECT name, data FROM {media_metadata} WHERE fid = :fid", array(
':fid' => $fid,
));
foreach ($result as $record) {
// @TODO: Honor $unhandled. This currently returns the raw result from the query.
$metadata[$record->name] = $record->data;
}
return $metadata;
}
/**
......
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