123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class ShowrsvpAction extends ShownoticeAction
- {
- protected $rsvp = null;
- protected $event = null;
- function getNotice()
- {
- $this->id = $this->trimmed('id');
- $this->rsvp = RSVP::getKV('id', $this->id);
- if (empty($this->rsvp)) {
-
-
- throw new ClientException(_m('No such RSVP.'), 404);
- }
- $this->event = $this->rsvp->getEvent();
- if (empty($this->event)) {
-
- throw new ClientException(_m('No such event.'), 404);
- }
- $notice = $this->rsvp->getNotice();
- if (empty($notice)) {
-
-
-
- throw new ClientException(_m('No such RSVP.'), 404);
- }
- return $notice;
- }
-
- function title()
- {
-
-
- return sprintf(_m('%1$s\'s RSVP for "%2$s"'),
- $this->user->nickname,
- $this->event->title);
- }
- }
|