Changeset 1645


Ignore:
Timestamp:
01/22/10 07:00:22 (5 years ago)
Author:
lowjoel
Message:

The installer size must be computed from the real path, not the downloads-relative path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/website/scripts/downloads.php

    r1632 r1645  
    217217        //Find the binary that users will get to download. 
    218218        $installerPath = null; 
     219        $installerSize = 0; 
    219220         
    220221        //If $buildPath is a directory, it contains the installer. 
     
    232233                    { 
    233234                        $installerPath = sprintf('builds/%s/r%s/%s', $branch, $revision, $file); 
     235                        $installerSize = filesize($filePath); 
    234236                        break; 
    235237                    } 
     
    241243        { 
    242244            $installerPath = sprintf('builds/%s/r%s', $branch, basename($buildPath)); 
     245            $installerSize = filesize($buildPath); 
    243246        } 
    244247 
     
    255258                    \'%1$s r%2$d\', \'%4$s\' , \'build\', \'r%2$d\', 1, \'any\', %3$d, \'?%5$s\' 
    256259                )', 
    257             mysql_real_escape_string($branch), intval($revision), filesize($installerPath), 
     260            mysql_real_escape_string($branch), intval($revision), $installerSize, 
    258261            PhpToMySqlTimestamp(filemtime($buildPath)), mysql_real_escape_string($installerPath))) 
    259262                or die(mysql_error()); 
Note: See TracChangeset for help on using the changeset viewer.