Changeset 1760 for trunk/website/scripts/downloads.php
- Timestamp:
- 2/8/2010 4:51:14 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/website/scripts/downloads.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/website/scripts/downloads.php
r1647 r1760 148 148 $result = array(); 149 149 $builds = array('Eraser5' => 'Eraser 5', 'Eraser6' => 'Eraser 6.0', 'Eraser6.2' => 'Eraser 6.2'); 150 $versions = array('Eraser5' => '5.8.9', 'Eraser6' => '6.0.6', 'Eraser6.2' => '6.1.0'); 150 151 foreach ($builds as $branchName => $buildName) 151 152 { … … 167 168 { 168 169 $result[$buildName][] = Build::GetBuildFromID( 169 Build::InsertBuild($branchName, $ revisionID,170 Build::InsertBuild($branchName, $versions[$branchName], $revisionID, 170 171 Build::GetPath($branchName) . '/' . $revision)); 171 172 } … … 213 214 } 214 215 215 private static function InsertBuild($branch, $ revision, $buildPath)216 private static function InsertBuild($branch, $version, $revision, $buildPath) 216 217 { 217 218 //Find the binary that users will get to download. … … 256 257 mysql_query(sprintf('INSERT INTO downloads (Name, Released, `Type`, Version, PublisherID, Architecture, Filesize, Link) 257 258 VALUES ( 258 \'%1$s r%2$d\', \'%4$s\' , \'build\', \'r%2$d\', 1, \'any\', %3$d, \'?%5$s\'259 \'%1$s %2$s.%3$d\', \'%5$s\' , \'build\', \'%2$s.%3$d\', 1, \'any\', %4$d, \'?%6$s\' 259 260 )', 260 mysql_real_escape_string($branch), intval($revision), $installerSize, 261 PhpToMySqlTimestamp(filemtime($buildPath)), mysql_real_escape_string($installerPath))) 261 mysql_real_escape_string($branch), mysql_real_escape_string($version), intval($revision), 262 $installerSize, PhpToMySqlTimestamp(filemtime($buildPath)), 263 mysql_real_escape_string($installerPath))) 262 264 or die(mysql_error()); 263 265 mysql_query(sprintf('INSERT INTO builds (DownloadID, Branch, Revision)
Note: See TracChangeset
for help on using the changeset viewer.
