Changeset 514


Ignore:
Timestamp:
Apr 8, 2013, 10:40:40 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Detekce typu stahovaných souborů se nyní provádí přímo přes pole MIME typů.
  • Opraveno: Chyba dělení nulou při zobrazení tarifů a počítání agregace rychlosti.
  • Opraveno: Řazení služeb v tabulce dle jména a až pak dle rychlosti stahování.
Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Version.php

    r513 r514  
    11<?php
    22
    3 $Revision = 513; // Subversion revision
     3$Revision = 514; // Subversion revision
    44$DatabaseRevision = 507;
    55$ReleaseTime = '2013-04-08';
  • trunk/Modules/File/File.php

    r507 r514  
    11<?php
     2
     3include_once(dirname(__FILE__).'/MimeTypes.php');
    24
    35class File extends Module
     
    4143  function DetectMimeType($FileName)
    4244  {
    43     // For proper mime-type detection php-pecl-Fileinfo package should be installed on *nix systems
    44     $FileInfo = new finfo(FILEINFO_MIME, '/usr/share/misc/magic');
    45     $Result = $FileInfo->file($FileName);
    46     //$FileInfo->close();
     45        global $MimeTypes;
     46       
     47    $Result = $MimeTypes[pathinfo($FileName, PATHINFO_EXTENSION)][0];
    4748    return($Result);
    4849  }
  • trunk/finance/finance.php

    r507 r514  
    3333  {
    3434    $this->Tariffs = array();
    35     $DbResult = $this->Database->select('Service', '*', '`ReplaceId` IS NULL ORDER BY `InternetSpeedMax`');
     35    $DbResult = $this->Database->select('Service', '*', '`ReplaceId` IS NULL ORDER BY `Name`, `InternetSpeedMax`');
    3636    while($Tariff = $DbResult->fetch_array())
    3737    {
  • trunk/finance/tarify.php

    r509 r514  
    2424    foreach($Finance->Tariffs as $Index => $Tariff)
    2525    {
    26       $Tariff['Aggregation'] = '1:'.round($Tariff['InternetSpeedMax'] / $Tariff['InternetSpeedMin']);
     26      if($Tariff['InternetSpeedMin'] != 0)
     27        $Tariff['Aggregation'] = '1:'.round($Tariff['InternetSpeedMax'] / $Tariff['InternetSpeedMin']);
     28        else $Tariff['Aggregation'] = '1:1';
    2729      $Output .= '<tr><td style="color: blue;">'.$Tariff['Name'].'</td><td align="center">'.round($Tariff['InternetSpeedMin'] / 1000).'</td><td align="center" style="color: blue;">'.round($Tariff['InternetSpeedMax'] / 1000).'</td><td align="center">'.$Tariff['Aggregation'].'</td><td align="center">'.$Tariff['CustomerCount'].'</td><td align="center" style="color: blue;">'.$Tariff['Price'].'</td><td align="center">'.$Tariff['CustomerCount'] * $Tariff['Price'].'</td></tr>';
    2830      $TotalPrice = $TotalPrice + $Tariff['Price'] * $Tariff['CustomerCount'];
  • trunk/form_classes.php

    r508 r514  
    148148      'Directory' => array('Type' => 'TDirectory', 'Caption' => 'Adresář', 'Default' => '', 'Null' => true),
    149149      'Size' => array('Type' => 'Integer', 'Caption' => 'Velikost', 'Default' => ''),
     150      'Time' => array('Type' => 'Time', 'Caption' => 'Čas vytvoření', 'Default' => ''),
    150151    ),
    151152    'ItemActions' => array(
Note: See TracChangeset for help on using the changeset viewer.