source: trunk/Modules/Wiki/ModuleWiki.php

Last change on this file was 893, checked in by chronos, 22 months ago
  • Fixed: Class types casting for better type checking.
  • Fixed: XML direct export.
  • Modified: User class instance moved from Core class to ModuleUser class.
File size: 906 bytes
Line 
1<?php
2
3class ModuleWiki extends Module
4{
5 function __construct(System $System)
6 {
7 parent::__construct($System);
8 $this->Name = 'Wiki';
9 $this->Version = '1.0';
10 $this->Creator = 'Chronos';
11 $this->License = 'GNU/GPLv3';
12 $this->Description = 'Mediawiki style page management';
13 $this->Dependencies = array();
14 }
15
16 function DoStart(): void
17 {
18 $this->LoadPages();
19 }
20
21 function LoadPages()
22 {
23 $DbResult = $this->Database->select('WikiPage', '*', '`VisibleInMenu`=1');
24 while ($DbRow = $DbResult->fetch_assoc())
25 {
26 $this->System->RegisterPage($DbRow['NormalizedName'], 'PageWiki');
27 Core::Cast($this->System)->RegisterMenuItem(array(
28 'Title' => $DbRow['Name'],
29 'Hint' => '',
30 'Link' => $this->System->Link('/'.$DbRow['NormalizedName'].'/'),
31 'Permission' => LICENCE_ANONYMOUS,
32 'Icon' => '',
33 ), 6);
34 }
35 }
36}
Note: See TracBrowser for help on using the repository browser.