Ignore:
Timestamp:
Sep 10, 2015, 9:51:23 PM (9 years ago)
Author:
chronos
Message:
  • Added: More appmodule install/uninstallation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Wiki/Wiki.php

    r738 r745  
    1818  {
    1919    parent::Install();
    20     $this->Database->Query("'CREATE TABLE IF NOT EXISTS `WikiPage` (
     20    $this->Database->Query('CREATE TABLE IF NOT EXISTS `WikiPage` (
    2121    `Id` int(11) NOT NULL AUTO_INCREMENT,
    2222    `Name` varchar(255) NOT NULL,
     
    2626    UNIQUE KEY `Name` (`Name`),
    2727    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` (
    3030    `Id` int(11) NOT NULL AUTO_INCREMENT,
    3131    `Page` int(11) NOT NULL,
     
    3636    KEY `User` (`User`),
    3737    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`
    4040ADD CONSTRAINT `WikiPageContent_ibfk_2` FOREIGN KEY (`Page`) REFERENCES `WikiPage` (`Id`),
    41 ADD CONSTRAINT `WikiPageContent_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`);'");
     41ADD CONSTRAINT `WikiPageContent_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`)');
    4242  }
    4343
    4444  function DoUnInstall()
    4545  {
    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`;');
    4948  }
    5049
     
    6564      $this->System->RegisterPage($DbRow['NormalizedName'], 'PageWiki');
    6665      $this->System->RegisterMenuItem(array(
    67           'Title' => $DbRow['Name'],
    68           'Hint' => '',
    69           'Link' => $this->System->Link('/'.$DbRow['NormalizedName'].'/'),
    70           'Permission' => LICENCE_ANONYMOUS,
    71           'Icon' => '',
     66        'Title' => $DbRow['Name'],
     67        'Hint' => '',
     68        'Link' => $this->System->Link('/'.$DbRow['NormalizedName'].'/'),
     69        'Permission' => LICENCE_ANONYMOUS,
     70        'Icon' => '',
    7271      ), 2);
    7372    }
Note: See TracChangeset for help on using the changeset viewer.