Changeset 745 for trunk/Modules/Wiki/Wiki.php
- Timestamp:
- Sep 10, 2015, 9:51:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Wiki/Wiki.php
r738 r745 18 18 { 19 19 parent::Install(); 20 $this->Database->Query( "'CREATE TABLE IF NOT EXISTS `WikiPage` (20 $this->Database->Query('CREATE TABLE IF NOT EXISTS `WikiPage` ( 21 21 `Id` int(11) NOT NULL AUTO_INCREMENT, 22 22 `Name` varchar(255) NOT NULL, … … 26 26 UNIQUE KEY `Name` (`Name`), 27 27 KEY `VisibleInMenu` (`VisibleInMenu`) 28 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 29 CREATE TABLE IF NOT EXISTS `WikiPageContent` (28 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1'); 29 $this->Database->Query('CREATE TABLE IF NOT EXISTS `WikiPageContent` ( 30 30 `Id` int(11) NOT NULL AUTO_INCREMENT, 31 31 `Page` int(11) NOT NULL, … … 36 36 KEY `User` (`User`), 37 37 KEY `Page` (`Page`) 38 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 39 ALTER TABLE `WikiPageContent`38 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1'); 39 $this->Database->Query('ALTER TABLE `WikiPageContent` 40 40 ADD CONSTRAINT `WikiPageContent_ibfk_2` FOREIGN KEY (`Page`) REFERENCES `WikiPage` (`Id`), 41 ADD CONSTRAINT `WikiPageContent_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`) ;'");41 ADD CONSTRAINT `WikiPageContent_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`)'); 42 42 } 43 43 44 44 function DoUnInstall() 45 45 { 46 $this->Database->query("DELETE TABLE `WikiPageContent`; '. 47 'DELETE TABLE `WikiPage`;"); 48 parent::UnInstall(); 46 $this->Database->query('DELETE TABLE `WikiPageContent`'); 47 $this->Database->query('DELETE TABLE `WikiPage`;'); 49 48 } 50 49 … … 65 64 $this->System->RegisterPage($DbRow['NormalizedName'], 'PageWiki'); 66 65 $this->System->RegisterMenuItem(array( 67 68 69 70 71 66 'Title' => $DbRow['Name'], 67 'Hint' => '', 68 'Link' => $this->System->Link('/'.$DbRow['NormalizedName'].'/'), 69 'Permission' => LICENCE_ANONYMOUS, 70 'Icon' => '', 72 71 ), 2); 73 72 }
Note:
See TracChangeset
for help on using the changeset viewer.