| Conditions | 4 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | function newbbWelcome() |
||
| 26 | { |
||
| 27 | global $forumObject; |
||
| 28 | $ret = ''; |
||
| 29 | |||
| 30 | $forumId = @$GLOBALS['xoopsModuleConfig']['welcome_forum']; |
||
| 31 | if (!$forumId) { |
||
| 32 | return false; |
||
| 33 | } |
||
| 34 | /** @var Newbb\ForumHandler $forumHandler */ |
||
| 35 | $forumHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Forum'); |
||
| 36 | $forumObject = $forumHandler->get($forumId); |
||
| 37 | if (!$forumObject || !$forumHandler->getPermission($forumObject)) { |
||
|
|
|||
| 38 | unset($forumObject); |
||
| 39 | |||
| 40 | return false; |
||
| 41 | } |
||
| 42 | |||
| 43 | require_once __DIR__ . '/functions.welcome.inc.php'; |
||
| 44 | unset($forumObject); |
||
| 45 | |||
| 46 | return $ret; |
||
| 47 | } |
||
| 51 |