123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class ShowbookmarkAction extends ShownoticeAction
- {
- protected $bookmark = null;
- function getNotice()
- {
- $this->id = $this->trimmed('id');
- $this->bookmark = Bookmark::getKV('id', $this->id);
- if (empty($this->bookmark)) {
-
- throw new ClientException(_m('No such bookmark.'), 404);
- }
- $notice = Notice::getKV('uri', $this->bookmark->uri);
- if (empty($notice)) {
-
-
- throw new ClientException(_m('No such bookmark.'), 404);
- }
- return $notice;
- }
-
- function title()
- {
-
-
- return sprintf(_m('%1$s\'s bookmark for "%2$s"'),
- $this->user->nickname,
- $this->bookmark->title);
- }
-
- function showPageTitle()
- {
- $this->elementStart('h1');
- $this->element('a',
- array('href' => $this->bookmark->url),
- $this->bookmark->title);
- $this->elementEnd('h1');
- }
- }
|