summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/helpers/gallery_event.php1
-rw-r--r--modules/gallery/helpers/theme.php5
-rw-r--r--modules/gallery/hooks/init_gallery.php1
-rw-r--r--modules/rss/controllers/rss.php8
-rw-r--r--modules/rss/views/feed.mrss.php2
5 files changed, 9 insertions, 8 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index e0de2152..d45f5316 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -23,6 +23,7 @@ class gallery_event_Core {
* Initialization.
*/
static function gallery_ready() {
+ theme::load_themes(Input::instance()->server("PATH_INFO"));
user::load_user();
locales::set_request_locale();
}
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php
index fb8f7ca7..5588fbce 100644
--- a/modules/gallery/helpers/theme.php
+++ b/modules/gallery/helpers/theme.php
@@ -28,14 +28,13 @@ class theme_Core {
* Load the active theme. This is called at bootstrap time. We will only ever have one theme
* active for any given request.
*/
- static function load_themes() {
+ static function load_themes($path) {
$modules = Kohana::config("core.modules");
- if (Router::$controller == "admin") {
+ if (strpos($path, "/admin") === 0) {
array_unshift($modules, THEMEPATH . module::get_var("gallery", "active_admin_theme"));
} else {
array_unshift($modules, THEMEPATH . module::get_var("gallery", "active_site_theme"));
}
-
Kohana::config_set("core.modules", $modules);
}
diff --git a/modules/gallery/hooks/init_gallery.php b/modules/gallery/hooks/init_gallery.php
index da7eeb0f..b2d9c4de 100644
--- a/modules/gallery/hooks/init_gallery.php
+++ b/modules/gallery/hooks/init_gallery.php
@@ -27,7 +27,6 @@ if (!file_exists(VARPATH . "database.php")) {
Event::add("system.ready", array("I18n", "instance"));
Event::add("system.ready", array("module", "load_modules"));
Event::add("system.ready", array("gallery", "ready"));
-Event::add("system.post_routing", array("theme", "load_themes"));
Event::add("system.post_routing", array("url", "parse_url"));
Event::add("system.post_routing", array("gallery", "maintenance_mode"));
Event::add("system.shutdown", array("gallery", "shutdown"));
diff --git a/modules/rss/controllers/rss.php b/modules/rss/controllers/rss.php
index 015d6032..1ecec9af 100644
--- a/modules/rss/controllers/rss.php
+++ b/modules/rss/controllers/rss.php
@@ -52,12 +52,14 @@ class Rss_Controller extends Controller {
$view->feed = $feed;
$view->pub_date = date("D, d M Y H:i:s T");
- $feed->uri = url::abs_site(Router::$current_uri);
+ $feed->uri = url::abs_site(str_replace("&", "&", url::merge($_GET)));
if ($page > 1) {
- $feed->previous_page_uri = url::abs_site(url::merge(array("page" => $page - 1)));
+ $feed->previous_page_uri =
+ url::abs_site(str_replace("&", "&", url::merge(array("page" => $page - 1))));
}
if ($page < $feed->max_pages) {
- $feed->next_page_uri = url::abs_site(url::merge(array("page" => $page + 1)));
+ $feed->next_page_uri =
+ url::abs_site(str_replace("&", "&amp;", url::merge(array("page" => $page + 1))));
}
rest::http_content_type(rest::RSS);
diff --git a/modules/rss/views/feed.mrss.php b/modules/rss/views/feed.mrss.php
index 3612cbc0..89ba9f14 100644
--- a/modules/rss/views/feed.mrss.php
+++ b/modules/rss/views/feed.mrss.php
@@ -26,6 +26,7 @@
<link><?= url::abs_site("{$child->type}s/{$child->id}") ?></link>
<guid isPermaLink="true"><?= url::abs_site("{$child->type}s/{$child->id}") ?></guid>
<pubDate><?= date("D, d M Y H:i:s T", $child->created); ?></pubDate>
+ <description><?= html::purify($child->description) ?></description>
<content:encoded>
<![CDATA[
<span><?= html::purify($child->description) ?></span>
@@ -45,7 +46,6 @@
]]>
</content:encoded>
<media:thumbnail url="<?= $child->thumb_url(true) ?>"
- fileSize="<?= @filesize($child->thumb_path()) ?>"
height="<?= $child->thumb_height ?>"
width="<?= $child->thumb_width ?>"
/>