123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class RedirecturlAction extends ManagedAction
- {
- protected $file = null;
- protected function doPreparation()
- {
- $this->file = File::getByID($this->int('id'));
- return true;
- }
- public function showPage()
- {
- common_redirect($this->file->getUrl(true), 301);
- }
- function isReadOnly($args)
- {
- return true;
- }
- function lastModified()
- {
-
-
- return strtotime($this->file->modified);
- }
-
- function etag()
- {
- return 'W/"' . implode(':', array($this->getActionName(),
- common_user_cache_hash(),
- common_language(),
- $this->file->getID())) . '"';
- }
- }
|