From ad7ace9b72532512c67953d7149854312b6b195d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 19 Nov 2008 02:31:20 +0000 Subject: The continuing evolution of the slideshow... 1) added a mime_type property to the item module(no database change) 2) created a media_rss module 3) moved most of the functionality for the downloading the images to the media_rss module --- core/models/item.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/models/item.php b/core/models/item.php index 485975cb..0b576d2c 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -175,6 +175,11 @@ class Item_Model extends ORM_MPTT { $real_column = substr($column, 0, strlen($column) - 5); return "id}-{$real_column}\">" . "{$this->$real_column}"; + } else if ($column == "mime_type") { + if ($this->is_album() || ($mime_type = file::mime()) === false) { + $mime_type = "application/unknown"; + } + return $mime_type; } else if ($column == "owner") { // This relationship depends on an outside module, which may not be present so handle // failures gracefully. -- cgit v1.2.3