Changeset 646


Ignore:
Timestamp:
11/30/2008 10:09:33 AM (6 years ago)
Author:
lowjoel
Message:

Okay, I finally tested the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/website/updates/index.php

    r645 r646  
    1212 
    1313//Output the list of mirrors 
    14 $query = mysql_query('SELECT * FROM updater_mirrors ORDER By Continent, Country, City'); 
     14$query = mysql_query('SELECT * FROM mirrors ORDER By Continent, Country, City'); 
    1515echo '  <mirrors> 
    16     <mirror location="(automatically decide)">http://downloads.sourceforge.net/eraser/</mirror>' . "\n"; 
     16        <mirror location="(automatically decide)">http://downloads.sourceforge.net/eraser/</mirror>' . "\n"; 
    1717while ($row = mysql_fetch_array($query)) 
    1818{ 
     
    2323 
    2424//Prepare the list of updates 
    25 $query = mysql_query(sprintf('SELECT updater_downloads.*, updater_publishers.Name as PublisherName 
    26     FROM updater_downloads 
    27     INNER JOIN updater_publishers ON 
    28         updater_downloads.PublisherID=updater_publishers.PublisherID 
     25$query = mysql_query(sprintf('SELECT downloads.*, publishers.Name as PublisherName 
     26    FROM downloads 
     27    INNER JOIN publishers ON 
     28        downloads.PublisherID=publishers.PublisherID 
    2929    WHERE 
    3030        (MinVersion IS NULL AND MaxVersion IS NULL) OR 
     
    4646 
    4747    printf('        <item name="%s" version="%s" publisher="%s" architecture="%s" filesize="%d">%s</item> 
    48 ', htmlentities($row['Name']), $row['Version'], htmlentities($row['Publisher']), $row['Architecture'], 
     48', htmlentities($row['Name']), $row['Version'], htmlentities($row['PublisherName']), $row['Architecture'], 
    4949            $row['Filesize'], htmlentities($row['Link'])); 
    5050} 
    5151 
     52if (!empty($lastItemType)) 
     53    printf('    </%s>' . "\n", $lastItemType); 
    5254echo '</updateList> 
    5355'; 
Note: See TracChangeset for help on using the changeset viewer.