12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class ManagedAction extends Action
- {
- protected function prepare(array $args=array())
- {
- if (!parent::prepare($args)) {
- return false;
- }
- $this->doPreparation();
- return true;
- }
- protected function doPreparation()
- {
-
- }
-
- protected function handle()
- {
- parent::handle();
- if ($this->canPost && $this->isPost()) {
- try {
- $this->msg = $this->handlePost();
- } catch (Exception $e) {
- $this->error = $e->getMessage();
- }
- }
- $this->showPage();
- }
- protected function handlePost()
- {
-
- assert($this->canPost);
- }
- }
|