Changeset 901 for trunk/Application


Ignore:
Timestamp:
Feb 17, 2021, 9:27:32 PM (4 years ago)
Author:
chronos
Message:
  • Added: Documents section accessible from users panel.
  • Added: Contract model moved to separate module Contract.
  • Added: New action to generate PDF from Contract.
  • Fixed: Allow users to download files only by hash instead of direct id.
  • Added: Support for SHA1 as allowed mysql function.
Location:
trunk/Application
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/DefaultConfig.php

    r897 r901  
    5353        array('Name' => 'MainRouter/ConnectTimeout', 'Type' => 'Integer', 'Default' => '5', 'Title' => 'Vypršení času'),
    5454        array('Name' => 'MainRouter/MangleRuleSubgroupMinPrefix', 'Type' => 'Integer', 'Default' => '28', 'Title' => 'Nejmenší prefix podsítě pro mangle pravidla'),
     55        array('Name' => 'Contract/DirectoryId', 'Type' => 'Integer', 'Default' => '19', 'Title' => 'Id adresáře souborů smluv'),
    5556    );
    5657  }
  • trunk/Application/UpdateTrace.php

    r890 r901  
    21342134  $Manager->Execute('ALTER TABLE `FinanceOperation` CHANGE `Value` `Value` FLOAT NOT NULL DEFAULT "0";');
    21352135  $Manager->Execute('ALTER TABLE `NetworkInterface` CHANGE `OnlineNotify` `OnlineNotify` INT(11) NOT NULL DEFAULT "0";');
     2136}
     2137
     2138function UpdateTo901(UpdateManager $Manager): void
     2139{
     2140  $Manager->Execute('ALTER TABLE `Member` ADD `Contract` INT NULL DEFAULT NULL AFTER `ChangeReplaceId`;');
     2141  $Manager->Execute('ALTER TABLE `Member` ADD FOREIGN KEY (`Contract`) REFERENCES `Contract`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     2142  $Manager->Execute("INSERT INTO `Module` (`Id`, `Name`, `Title`, `Version`, `Creator`, `License`, `Installed`, `HomePage`, `Description`) VALUES (NULL, 'Contract', '', '', '', '', '0', '', '');");
     2143  $Manager->Execute("INSERT INTO `Module` (`Id`, `Name`, `Title`, `Version`, `Creator`, `License`, `Installed`, `HomePage`, `Description`) VALUES (NULL, 'Document', '', '', '', '', '0', '', '');");
     2144  $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (NULL, '1', 'DisplayCustomerDocuments', '', '0');");
     2145  $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (NULL, '3', NULL, '52');");
     2146  $Manager->Execute('ALTER TABLE `File` ADD `Hash` VARCHAR(255) NOT NULL AFTER `Time`;');
     2147  $Manager->Execute("UPDATE `File` SET `Hash` = SHA1(CONCAT(Id,Name,Size,Time))");
     2148  $Manager->Execute("ALTER TABLE `Contract` ADD `Generate` INT NOT NULL DEFAULT '0' AFTER `File`;");
     2149  $Manager->Execute("ALTER TABLE `Contract` DROP `BillCodeText`;");
     2150  $Manager->Execute("INSERT INTO `FileDirectory` (`Id`, `Name`, `Parent`) VALUES (NULL, 'smlouvy', NULL);");
     2151  $Manager->Execute("ALTER TABLE `Log` CHANGE `Value` `Value` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
     2152  $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (NULL, '4', 'DownloadById', '', '0');");
     2153  $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (NULL, '4', NULL, '53');");
    21362154}
    21372155
     
    22402258      880 => array('Revision' => 882, 'Function' => 'UpdateTo882'),
    22412259      882 => array('Revision' => 885, 'Function' => 'UpdateTo885'),
     2260      885 => array('Revision' => 901, 'Function' => 'UpdateTo901'),
    22422261    );
    22432262  }
  • trunk/Application/Version.php

    r899 r901  
    11<?php
    22
    3 $Revision = 899; // Subversion revision
    4 $DatabaseRevision = 885; // SQL structure revision
     3$Revision = 901; // Subversion revision
     4$DatabaseRevision = 901; // SQL structure revision
    55$ReleaseTime = strtotime('2021-02-17');
Note: See TracChangeset for help on using the changeset viewer.