summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-19 03:17:56 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-19 03:17:56 +0000
commitdf4832bf6f73d9587de603ad8a151853a962ba84 (patch)
tree64defee95153607ee3945b5ec7e405878969b68c /core
parent693080669a95d9b875252f5bf9f2719c594df2f5 (diff)
Change Media_RSS_Controller so that it does not extend REST_Controller, since it
doesn't refer to a fixed resource or collection of resources. Fix some minor bugs in the code so that we can actually generate a feed. It looks pretty cool! Improved pagination links, but didn't actually test them.
Diffstat (limited to 'core')
-rw-r--r--core/config/routes.php1
-rw-r--r--core/models/item.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/core/config/routes.php b/core/config/routes.php
index 4da97654..0e2aa887 100644
--- a/core/config/routes.php
+++ b/core/config/routes.php
@@ -22,6 +22,7 @@
// The problem is that we're routing all requests to /{controllername} to Rest_Controller,
// even requests to controllers that do not implement Rest_Controller.
$config['^welcome$'] = 'welcome';
+$config['^media_rss/feed/(\d+)'] = 'media_rss/feed/$1';
// REST configuration
// Any resource requests (eg: album/1 or comment/3) get dispatched to the REST
diff --git a/core/models/item.php b/core/models/item.php
index 0b576d2c..950be499 100644
--- a/core/models/item.php
+++ b/core/models/item.php
@@ -176,7 +176,7 @@ class Item_Model extends ORM_MPTT {
return "<span class=\"gInPlaceEdit gEditField-{$this->id}-{$real_column}\">" .
"{$this->$real_column}</span>";
} else if ($column == "mime_type") {
- if ($this->is_album() || ($mime_type = file::mime()) === false) {
+ if ($this->is_album() || ($mime_type = file::mime($this->file_path())) === false) {
$mime_type = "application/unknown";
}
return $mime_type;