12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class RepeatAction extends FormAction
- {
- protected $notice = null;
- protected $repeat = null;
- function title()
- {
- return _m('TITLE', 'Repeat notice');
- }
- protected function doPreparation()
- {
- $id = $this->trimmed('notice');
- if (empty($id)) {
-
- $this->clientError(_('No notice specified.'));
- }
- $this->notice = Notice::getKV('id', $id);
- if (!$this->notice instanceof Notice) {
-
- $this->clientError(_('Notice not found.'));
- }
- $this->repeat = $this->notice->repeat($this->scoped, 'web');
- if (!$this->repeat instanceof Notice) {
-
- $this->clientError(_('Could not repeat notice for unknown reason. Please contact the webmaster!'));
- }
- return true;
- }
-
- protected function showContent()
- {
- $this->element('p', array('id' => 'repeat_response',
- 'class' => 'repeated'),
-
- _('Repeated!'));
- }
- }
|