123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class ShowPollAction extends ShownoticeAction
- {
- protected $poll = null;
- public function getNotice()
- {
- $this->id = $this->trimmed('id');
- $this->poll = Poll::getKV('id', $this->id);
- if (empty($this->poll)) {
-
- throw new ClientException(_m('No such poll.'), 404);
- }
- $notice = $this->poll->getNotice();
- if (empty($notice)) {
-
-
- throw new ClientException(_m('No such poll notice.'), 404);
- }
- return $notice;
- }
-
- public function title()
- {
-
-
- return sprintf(
- _m('%1$s\'s poll: %2$s'),
- $this->user->nickname,
- $this->poll->question
- );
- }
-
- public function lastModified()
- {
- return Action::lastModified();
- }
-
- public function etag()
- {
- return Action::etag();
- }
- }
|