- $row =& $bookmarks_tmp[$key];
-
- $_link = $row['bAddress'];
- // Redirection option
- if ($GLOBALS['useredir']) {
- $_link = $GLOBALS['url_redir'] . $_link;
- }
- $_pubdate = gmdate("r", strtotime($row['bDatetime']));
- // array_walk($row['tags'], 'filter');
-
- $bookmarks_tpl[] = array(
- 'title' => $row['bTitle'],
- 'link' => $_link,
- 'description' => $row['bDescription'],
- 'creator' => $row['username'],
- 'pubdate' => $_pubdate,
- 'tags' => $row['tags']
- );
+ $row =& $bookmarks_tmp[$key];
+
+ $_link = $row['bAddress'];
+ // Redirection option
+ if ($GLOBALS['useredir']) {
+ $_link = $GLOBALS['url_redir'] . $_link;
+ }
+ $_pubdate = date("r", strtotime($row['bDatetime']));
+
+ $uriparts = explode('.', $_link);
+ $extension = end($uriparts);
+ unset($uriparts);
+
+ $enclosure = array();
+ if ($keys = multi_array_search($extension, $GLOBALS['filetypes'])) {
+ $enclosure['mime'] = file_get_mimetype($_link);
+ $enclosure['length'] = file_get_filesize($_link);
+ }
+
+ $bookmarks_tpl[] = array(
+ 'title' => $row['bTitle'],
+ 'link' => $_link,
+ 'description' => $row['bDescription'],
+ 'creator' => $row['username'],
+ 'pubdate' => $_pubdate,
+ 'tags' => $row['tags'],
+ 'enclosure_mime' => $enclosure['mime'],
+ 'enclosure_length' => $enclosure['length']
+ );