From: Michael M Slusarz Date: Mon, 22 Nov 2010 01:53:03 +0000 (-0700) Subject: Consolidate into a single feed XSL file - accessed via Horde_Themes::getFeedXsl() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5904ea44ddba2b0a01522624a9e38e4b5c36fcd6;p=horde.git Consolidate into a single feed XSL file - accessed via Horde_Themes::getFeedXsl() --- diff --git a/ansel/rss.php b/ansel/rss.php index a75535bc0..970582e8b 100644 --- a/ansel/rss.php +++ b/ansel/rss.php @@ -263,7 +263,7 @@ if (empty($rss)) { } } - $xsl = $registry->get('themesuri') . '/feed-rss.xsl'; + $xsl = Horde_Themes::getFeedXsl(); $stream_name = htmlspecialchars($params['name']); $stream_desc = htmlspecialchars($params['desc']); $stream_updated = htmlspecialchars(date('r', $params['last_modified'])); diff --git a/ansel/themes/default/feed-rss.xsl b/ansel/themes/default/feed-rss.xsl deleted file mode 100644 index 018a71fb0..000000000 --- a/ansel/themes/default/feed-rss.xsl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - <xsl:value-of select="/rss/channel/title"/> - - - - -

- You're viewing an XML content feed which is - intended to be viewed within a feed aggregator. -

- - -

Subscribe to

- -
- -

- Subscribe now in your favorite RSS aggregator: -

- - - - - -

-

Preview

-

- - - - - -
- - - -

- - - -
- -

-
- -
diff --git a/framework/Core/lib/Horde/Themes.php b/framework/Core/lib/Horde/Themes.php index 2808d5c65..cff21a91d 100644 --- a/framework/Core/lib/Horde/Themes.php +++ b/framework/Core/lib/Horde/Themes.php @@ -139,4 +139,16 @@ class Horde_Themes return $sounds; } + /** + * Return the location of the feed XSL file. + * + * As of now, this file MUST live in horde/themes/default/feed-rss.xsl. + * + * @return string Path to the feed file. + */ + static public function getFeedXsl() + { + return $GLOBALS['registry']->get('themesuri', 'horde') . '/default/feed-rss.xsl'; + } + } diff --git a/horde/themes/default/feed-rss.xsl b/horde/themes/default/feed-rss.xsl new file mode 100644 index 000000000..018a71fb0 --- /dev/null +++ b/horde/themes/default/feed-rss.xsl @@ -0,0 +1,84 @@ + + + + + + + + + + + <xsl:value-of select="/rss/channel/title"/> + + + + +

+ You're viewing an XML content feed which is + intended to be viewed within a feed aggregator. +

+ + +

Subscribe to

+ +
+ +

+ Subscribe now in your favorite RSS aggregator: +

+ + + + + +

+

Preview

+

+ + + + + +
+ + + +

+ + + +
+ +

+
+ +
diff --git a/imp/rss.php b/imp/rss.php index a706306f4..b5cc21bab 100644 --- a/imp/rss.php +++ b/imp/rss.php @@ -85,7 +85,7 @@ $description = ($total_num == 0) $t = $injector->createInstance('Horde_Template'); $t->set('charset', 'UTF-8'); -$t->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$t->set('xsl', Horde_Themes::getFeedXsl()); $t->set('pubDate', htmlspecialchars(date('r'))); $t->set('desc', htmlspecialchars($description)); $t->set('title', htmlspecialchars($registry->get('name') . ' - ' . IMP::getLabel($mailbox))); diff --git a/imp/themes/default/feed-rss.xsl b/imp/themes/default/feed-rss.xsl deleted file mode 100644 index 211493e0c..000000000 --- a/imp/themes/default/feed-rss.xsl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - <xsl:value-of select="/rss/channel/title"/> - - - - -

- You're viewing an XML content feed which is - intended to be viewed within a feed aggregator. -

- -

Subscribe to

- -

- Subscribe now in your favorite RSS aggregator: -

- - - - - -

-

Preview

-

- - - - - -
- - - -

- - - -

-
- -
diff --git a/jonah/delivery/rss.php b/jonah/delivery/rss.php index d72a3a87f..af1c2311e 100644 --- a/jonah/delivery/rss.php +++ b/jonah/delivery/rss.php @@ -68,7 +68,7 @@ try { // Build the template (@TODO: Use Horde_View) $template = new Horde_Template(); $template->set('jonah', 'Jonah ' . $registry->getVersion() . ' (http://www.horde.org/jonah/)'); -$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$template->set('xsl', Horde_Themes::getFeedXsl()); if (!empty($criteria['tag_id'])) { $template->set('channel_name', sprintf(_("Stories tagged with %s in %s"), $tag_name, htmlspecialchars($channel['channel_name']))); } else { diff --git a/jonah/themes/default/feed-rss.xsl b/jonah/themes/default/feed-rss.xsl deleted file mode 100644 index 51d3c8677..000000000 --- a/jonah/themes/default/feed-rss.xsl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - <xsl:value-of select="/rss/channel/title"/> - - - - -

- You're viewing an XML content feed which is - intended to be viewed within a feed aggregator. -

- - -

Subscribe to

- -
-

- Subscribe now in your favorite RSS aggregator: -

- - - - - -

-

Preview

-

- - - - - -
- - - -

- - - -
- -

-
- -
diff --git a/kronolith/feed/index.php b/kronolith/feed/index.php index 6f5ffeee4..128139cfc 100644 --- a/kronolith/feed/index.php +++ b/kronolith/feed/index.php @@ -96,7 +96,7 @@ $template->set('kronolith_name', 'Kronolith'); $template->set('kronolith_version', $registry->getVersion()); $template->set('kronolith_uri', 'http://www.horde.org/kronolith/'); $template->set('kronolith_icon', Horde::url(Horde_Themes::img('kronolith.png'), true, -1)); -$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$template->set('xsl', Horde_Themes::getFeedXsl()); $template->set('calendar_name', htmlspecialchars($share->get('name'))); $template->set('calendar_desc', htmlspecialchars($share->get('desc')), true); $template->set('calendar_owner', htmlspecialchars($identity->getValue('fullname'))); diff --git a/kronolith/themes/default/feed-rss.xsl b/kronolith/themes/default/feed-rss.xsl deleted file mode 100644 index f625d5cf0..000000000 --- a/kronolith/themes/default/feed-rss.xsl +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - <xsl:value-of select="/rss/channel/title"/> - - - - -

- You're viewing an XML content feed which is - intended to be viewed within a feed aggregator. -

- - -

Subscribe to

- -
-

- Subscribe now in your favorite RSS aggregator: -

- - - - - -

-

Preview

-

- - - - - -
- - - -

- - - -
- -

-
- -
diff --git a/whups/query/rss.php b/whups/query/rss.php index e86188595..5e27d2c28 100644 --- a/whups/query/rss.php +++ b/whups/query/rss.php @@ -55,7 +55,7 @@ foreach (array_keys($tickets) as $i) { } $template = $injector->createInstance('Horde_Template'); -$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$template->set('xsl', Horde_Themes::getFeedXsl()); $template->set('pubDate', htmlspecialchars(date('r'))); $template->set('title', htmlspecialchars($whups_query->name ? $whups_query->name : _("Query Results"))); $template->set('items', $items, true); diff --git a/whups/queue/rss.php b/whups/queue/rss.php index 7a6ea0b49..5331c7ba4 100644 --- a/whups/queue/rss.php +++ b/whups/queue/rss.php @@ -86,7 +86,7 @@ foreach (array_keys($tickets) as $i) { } $template = $injector->createInstance('Horde_Template'); -$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$template->set('xsl', Horde_Themes::getFeedXsl()); $template->set('pubDate', htmlspecialchars(date('r'))); if (isset($type) && isset($queue['name'])) { $rss_title = sprintf(_("%s %s tickets in %s"), diff --git a/whups/search/rss.php b/whups/search/rss.php index bdb59ef26..7845a6f1f 100644 --- a/whups/search/rss.php +++ b/whups/search/rss.php @@ -47,7 +47,7 @@ foreach (array_keys($tickets) as $i) { } $template = $injector->createInstance('Horde_Template'); -$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$template->set('xsl', Horde_Themes::getFeedXsl()); $template->set('pubDate', htmlspecialchars(date('r'))); $template->set('title', _("Search Results")); $template->set('items', $items, true); diff --git a/whups/themes/default/feed-rss.xsl b/whups/themes/default/feed-rss.xsl deleted file mode 100644 index 211493e0c..000000000 --- a/whups/themes/default/feed-rss.xsl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - <xsl:value-of select="/rss/channel/title"/> - - - - -

- You're viewing an XML content feed which is - intended to be viewed within a feed aggregator. -

- -

Subscribe to

- -

- Subscribe now in your favorite RSS aggregator: -

- - - - - -

-

Preview

-

- - - - - -
- - - -

- - - -

-
- -
diff --git a/whups/ticket/rss.php b/whups/ticket/rss.php index 12cec5ea2..08f410799 100644 --- a/whups/ticket/rss.php +++ b/whups/ticket/rss.php @@ -42,7 +42,7 @@ foreach (array_keys($history) as $i) { } $template = $injector->createInstance('Horde_Template'); -$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); +$template->set('xsl', Horde_Themes::getFeedXsl()); $template->set('pubDate', htmlspecialchars(date('r'))); $template->set('title', htmlspecialchars($details['summary'])); $template->set('items', $items, true);