| Conditions | 3 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | public function create_forum() |
||
| 43 | { |
||
| 44 | $forum = $this->container->get('blitze.sitemaker.forum.manager'); |
||
| 45 | |||
| 46 | $forum_data = array( |
||
| 47 | 'forum_type' => FORUM_CAT, |
||
| 48 | 'forum_name' => 'Sitemaker Content', |
||
| 49 | ); |
||
| 50 | |||
| 51 | if (!empty($this->config['blitze_content_forum_id'])) |
||
| 52 | { |
||
| 53 | $forum_data['forum_id'] = (int) $this->config['blitze_content_forum_id']; |
||
| 54 | } |
||
| 55 | |||
| 56 | $errors = $forum->add($forum_data); |
||
| 57 | |||
| 58 | if (!sizeof($errors)) |
||
| 59 | { |
||
| 60 | $forum_id = (int) $forum_data['forum_id']; |
||
| 61 | $this->config->set('blitze_content_forum_id', $forum_id); |
||
| 62 | } |
||
| 65 |