Changeset 885


Ignore:
Timestamp:
Sep 8, 2020, 5:57:23 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: MimeTypes for file download was not working as global variable with newer PHP 7.4.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r882 r885  
    21282128{
    21292129  $Manager->Execute('ALTER TABLE `FinanceMonthlyOverall` CHANGE `Investment` `Investment` INT(11) NOT NULL DEFAULT "0";');
     2130}
     2131
     2132function UpdateTo885($Manager)
     2133{
     2134  $Manager->Execute('ALTER TABLE `FinanceOperation` CHANGE `Value` `Value` FLOAT NOT NULL DEFAULT "0";');
    21302135}
    21312136
     
    22332238      878 => array('Revision' => 880, 'Function' => 'UpdateTo880'),
    22342239      880 => array('Revision' => 882, 'Function' => 'UpdateTo882'),
     2240      882 => array('Revision' => 885, 'Function' => 'UpdateTo885'),
    22352241    );
    22362242  }
  • trunk/Application/Version.php

    r884 r885  
    11<?php
    22
    3 $Revision = 884; // Subversion revision
    4 $DatabaseRevision = 882; // SQL structure revision
     3$Revision = 885; // Subversion revision
     4$DatabaseRevision = 885; // SQL structure revision
    55$ReleaseTime = strtotime('2020-09-08');
  • trunk/Modules/File/File.php

    r876 r885  
    4343  function DetectMimeType($FileName)
    4444  {
    45     global $MimeTypes;
    46 
    47     $Result = $MimeTypes[pathinfo($FileName, PATHINFO_EXTENSION)][0];
     45    $MimeTypes = GetMimeTypes();
     46    $MimeType = pathinfo($FileName, PATHINFO_EXTENSION);
     47    $Result = $MimeTypes[$MimeType][0];
    4848    return $Result;
    4949  }
  • trunk/Modules/File/MimeTypes.php

    r738 r885  
    11<?php
    22
    3 $MimeTypes = array(
     3function GetMimeTypes()
     4{
     5  return array(
    46  '7z'    => array('application/x-7z-compressed'),
    57  'ai'    => array('application/postscript'),
     
    123125  'xsl'   => array('text/xml'),
    124126  'zip'   => array('application/x-zip', 'application/zip', 'application/x-zip-compressed')
    125 );
     127  );
     128}
Note: See TracChangeset for help on using the changeset viewer.