diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-02-11 16:53:01 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-02-11 16:53:01 +0000 |
commit | 012288bdf6f4ad41c861504c05b2ac1cee834dd3 (patch) | |
tree | 39482829b98bcf1ac9e6e8b1ce74d8c80afc5a25 /lib/action.php | |
parent | fc293545be13473d992b512141be233c2963f6da (diff) | |
parent | 22b10399aaa97061ed940f92f5b15f6aacfb1093 (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'lib/action.php')
-rw-r--r-- | lib/action.php | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/lib/action.php b/lib/action.php index ce92addf5..bd38bf79c 100644 --- a/lib/action.php +++ b/lib/action.php @@ -225,9 +225,19 @@ class Action extends HTMLOutputter // lawsuit * * @return nothing */ + function showFeeds() { - // does nothing by default + $feeds = $this->getFeeds(); + + if ($feeds) { + foreach ($feeds as $feed) { + $this->element('link', array('rel' => $feed->rel(), + 'href' => $feed->url, + 'type' => $feed->mimeType(), + 'title' => $feed->title)); + } + } } /** @@ -540,15 +550,16 @@ class Action extends HTMLOutputter // lawsuit /** * Show export data feeds. * - * MAY overload if there are feeds - * - * @return nothing + * @return void */ + function showExportData() { - // is there structure to this? - // list of (visible!) feed links - // can we reuse list of feeds from showFeeds() ? + $feeds = $this->getFeeds(); + if ($feeds) { + $fl = new FeedList($this); + $fl->show($feeds); + } } /** @@ -924,4 +935,17 @@ class Action extends HTMLOutputter // lawsuit $this->elementEnd('div'); } } + + /** + * An array of feeds for this action. + * + * Returns an array of potential feeds for this action. + * + * @return array Feed object to show in head and links + */ + + function getFeeds() + { + return null; + } } |