Changeset 1766


Ignore:
Timestamp:
02/08/10 06:54:30 (5 years ago)
Author:
lowjoel
Message:
  • Fixed naming of the download: Just add Eraser to the version number, and there's no need for branch name since it's implicit in the full version number
  • Fixed the algorithm to set superseded status on old builds
File:
1 edited

Legend:

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

    r1762 r1766  
    257257        mysql_query(sprintf('INSERT INTO downloads (Name, Released, `Type`, Version, PublisherID, Architecture, Filesize, Link) 
    258258                VALUES ( 
    259                     \'%1$s %2$s.%3$d\', \'%5$s\' , \'build\', \'%2$s.%3$d\', 1, \'any\', %4$d, \'?%6$s\' 
     259                    \'Eraser %1$s.%2$d\', \'%4$s\' , \'build\', \'%1$s.%2$d\', 1, \'any\', %3$d, \'?%5$s\' 
    260260                )', 
    261             mysql_real_escape_string($branch), mysql_real_escape_string($version), intval($revision), 
     261            mysql_real_escape_string($version), intval($revision), 
    262262            $installerSize, PhpToMySqlTimestamp(filemtime($buildPath)), 
    263263            mysql_real_escape_string($installerPath))) 
     
    293293        mysql_query(sprintf('UPDATE downloads SET Superseded=1 
    294294            WHERE DownloadID IN ( 
    295                 SELECT DownloadID FROM builds 
     295                SELECT downloads.DownloadID FROM downloads 
     296                    INNER JOIN builds ON downloads.DownloadID=builds.DownloadID 
    296297                    WHERE Branch=\'%s\' AND 
    297298                    Superseded=0 AND 
    298                     DownloadID NOT IN (%s) 
     299                    downloads.DownloadID NOT IN (%s) 
    299300            )', 
    300301            mysql_real_escape_string($branch), $ignoredBuilds)); 
Note: See TracChangeset for help on using the changeset viewer.