You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
764 B

  1. <?php
  2. namespace App\Controllers;
  3. use App\Post;
  4. use Movim\Controller\Base;
  5. class CommunityController extends Base
  6. {
  7. public function dispatch()
  8. {
  9. $this->js_check = false;
  10. if ($this->user && $this->fetchGet('i')) {
  11. $this->page->setTitle(__('page.explore'));
  12. $post = Post::where('server', $this->fetchGet('s'))
  13. ->where('node', $this->fetchGet('n'))
  14. ->where('nodeid', $this->fetchGet('i'))
  15. ->first();
  16. if ($post) {
  17. $this->redirect('post', [
  18. 's' => $this->fetchGet('s'),
  19. 'n' => $this->fetchGet('n'),
  20. 'i' => $this->fetchGet('i'),
  21. ]);
  22. }
  23. }
  24. }
  25. }