|
35 | 35 |
|
36 | 36 | if (empty($post_id)) |
37 | 37 | { |
38 | | - redirect_header(ICMS_URL.'/modules/'.basename(dirname(__FILE__ ) ).'/index.php', 2, _MD_ERRORTOPIC); |
| 38 | + redirect_header(ICMS_URL.'/modules/'.basename(__DIR__).'/index.php', 2, _MD_ERRORTOPIC); |
39 | 39 | exit(); |
40 | 40 | } |
41 | 41 |
|
42 | 42 | // Not exists |
43 | | -$post_handler = icms_getmodulehandler('post', basename(dirname(__FILE__ ) ), 'iforum' ); |
| 43 | +$post_handler = icms_getmodulehandler('post', basename(__DIR__), 'iforum' ); |
44 | 44 | $post = $post_handler->get($post_id); |
45 | 45 | if (empty($post) ) |
46 | 46 | { |
47 | | - redirect_header(ICMS_URL.'/modules/'.basename(dirname(__FILE__ ) ).'/index.php', 2, _MD_NORIGHTTOVIEW); |
| 47 | + redirect_header(ICMS_URL.'/modules/'.basename(__DIR__).'/index.php', 2, _MD_NORIGHTTOVIEW); |
48 | 48 | exit(); |
49 | 49 | } |
50 | 50 | // Not yet approved |
51 | | -$post_handler = icms_getmodulehandler('post', basename(dirname(__FILE__ ) ), 'iforum' ); |
| 51 | +$post_handler = icms_getmodulehandler('post', basename(__DIR__), 'iforum' ); |
52 | 52 | $post = $post_handler->get($post_id); |
53 | 53 | if (!$approved = $post->getVar('approved') ) |
54 | 54 | { |
55 | | - redirect_header(ICMS_URL.'/modules/'.basename(dirname(__FILE__ ) ).'/index.php', 2, _MD_NORIGHTTOVIEW); |
| 55 | + redirect_header(ICMS_URL.'/modules/'.basename(__DIR__).'/index.php', 2, _MD_NORIGHTTOVIEW); |
56 | 56 | exit(); |
57 | 57 | } |
58 | 58 |
|
59 | | -$topic_handler = icms_getmodulehandler('topic', basename(dirname(__FILE__ ) ), 'iforum' ); |
| 59 | +$topic_handler = icms_getmodulehandler('topic', basename(__DIR__), 'iforum' ); |
60 | 60 | $forumtopic = $topic_handler->getByPost($post_id); |
61 | 61 | $topic_id = $forumtopic->getVar('topic_id'); |
62 | 62 | if (!$approved = $forumtopic->getVar('approved') ) |
63 | 63 | { |
64 | | - redirect_header(ICMS_URL.'/modules/'.basename(dirname(__FILE__ ) ).'/index.php', 2, _MD_NORIGHTTOVIEW); |
| 64 | + redirect_header(ICMS_URL.'/modules/'.basename(__DIR__).'/index.php', 2, _MD_NORIGHTTOVIEW); |
65 | 65 | exit(); |
66 | 66 | } |
67 | 67 |
|
68 | | -$forum_handler = icms_getmodulehandler('forum', basename(dirname(__FILE__ ) ), 'iforum' ); |
| 68 | +$forum_handler = icms_getmodulehandler('forum', basename(__DIR__), 'iforum' ); |
69 | 69 | $forum = ($forum)?$forum: |
70 | 70 | $forumtopic->getVar('forum_id'); |
71 | 71 | $viewtopic_forum = $forum_handler->get($forum); |
72 | 72 | if (!$forum_handler->getPermission($viewtopic_forum) ) |
73 | 73 | { |
74 | | - redirect_header(ICMS_URL.'/modules/'.basename(dirname(__FILE__ ) ).'/index.php', 2, _MD_NORIGHTTOACCESS); |
| 74 | + redirect_header(ICMS_URL.'/modules/'.basename(__DIR__).'/index.php', 2, _MD_NORIGHTTOACCESS); |
75 | 75 | exit(); |
76 | 76 | } |
77 | 77 |
|
78 | 78 | if (!$topic_handler->getPermission($viewtopic_forum, $forumtopic->getVar('topic_status'), "view") ) |
79 | 79 | { |
80 | | - redirect_header(ICMS_URL.'/modules/'.basename(dirname(__FILE__ ) ).'/index.php', 2, _MD_NORIGHTTOVIEW); |
| 80 | + redirect_header(ICMS_URL.'/modules/'.basename(__DIR__).'/index.php', 2, _MD_NORIGHTTOVIEW); |
81 | 81 | exit(); |
82 | 82 | } |
83 | 83 | require_once ICMS_ROOT_PATH.'/include/pdf.php'; |
|
0 commit comments