diff options
author | mward | 2018-11-16 20:07:03 +0000 |
---|---|---|
committer | mward | 2018-11-16 20:07:03 +0000 |
commit | 06fb4603f38f9def19af8ae0783c20a338566f30 (patch) | |
tree | b1bc7b2e4302e8043511b93a1bbfdf1b425bb1d6 | |
parent | 7dec1391afaebc8099843651d3c93a6612332b7f (diff) | |
download | downloads-06fb4603f38f9def19af8ae0783c20a338566f30.tar.gz downloads-06fb4603f38f9def19af8ae0783c20a338566f30.tar.xz downloads-06fb4603f38f9def19af8ae0783c20a338566f30.zip |
Remove the broken rss feed generator.
Bug 541260
This relies on data that hasn't been updated in years.
Signed-off-by: mward <matt@eclipse.org>
-rw-r--r-- | index.php | 1 | ||||
-rwxr-xr-x | rss.php | 159 |
2 files changed, 0 insertions, 160 deletions
@@ -29,7 +29,6 @@ $Downloads->hideBannerAd(FALSE); // @todo: We should probably move these functions to Theme(). $App->Promotion = TRUE; -$App->PageRSS = "/downloads/rss.php"; $App->PageRSSTitle = "Eclipse Releases"; $App->AddExtraJSFooter('<script type="text/javascript" src="/downloads/assets/public/javascript/downloads.min.js"></script>'); diff --git a/rss.php b/rss.php deleted file mode 100755 index 11db0117..00000000 --- a/rss.php +++ /dev/null @@ -1,159 +0,0 @@ -<?php - require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_projectinfo_ro.class.php"; - require_once "/home/data/httpd/eclipse-php-classes/system/app.class.php"; - - #***************************************************************************** - # - # rssfeed_downloads.php - # - # Author: Karl Matthias - # Date: 2006-11-16 - # - # Description: Controller for RSS v2 feed - # - # HISTORY: 2007-08-30 - Now hits the ProjectInfo table to generate the feed - # 2007-09-10 - Moved to /downloads from committertools - # - #***************************************************************************** - - $App = new App(); - $App->runStdWebAppCacheable(); - $ErrorMessage = ""; - - function globalDisplayErrorHandler($errno, $errmsg, $filename, $linenum, $vars) { - $errortype = array ( - E_ERROR => 'Error', - E_WARNING => 'Warning', - E_PARSE => 'Parsing Error', - E_NOTICE => 'Notice', - E_CORE_ERROR => 'Core Error', - E_CORE_WARNING => 'Core Warning', - E_COMPILE_ERROR => 'Compile Error', - E_COMPILE_WARNING => 'Compile Warning', - E_USER_ERROR => 'User Error', - E_USER_WARNING => 'User Warning', - E_USER_NOTICE => 'User Notice', - E_STRICT => 'Runtime Notice', - E_RECOVERABLE_ERROR => 'Catchable Fatal Error'); - switch($errno) { - case E_NOTICE: // discard NOTICEs - case E_STRICT: // discard RUNTIME notices for deprecated usages - return; - default: - ob_end_clean(); - echo "<p><table cellpadding=10 width=400 bgcolor=#ffcccc><tr><td><font size=+2>Trouble: </font>"; - echo "PHP $errortype[$errno]:<br>$errmsg<br>$filename ($linenum)"; - $mysql_error_func = 'mysql_error_check'; - if(function_exists($mysql_error_func)) { - $mysql_error_func(); - } - echo "</table></p>\n"; - } - } - - # Set a real error handler - set_error_handler("globalDisplayErrorHandler"); - - # Start output buffering so we can print errors in HTML and output in XML - ob_start(); - - # Start of XML - echo "<?xml version=\"1.0\"?>"; - -?> -<rss version="2.0"> - <channel> - <title>Eclipse.org Downloads</title> - <link>http://www.eclipse.org/downloads/</link> - <description>New downloads from Eclipse.org in the last 2 weeks.</description> - <language>en-us</language> - <pubDate><?= date("D, j M Y H:i:s T", time()); ?></pubDate> - <lastBuildDate><?= date("D, j M Y H:i:s T", time()); ?></lastBuildDate> - <generator>org.eclipse.php.rssfeed_downloads</generator> - <managingEditor>webmaster@eclipse.org</managingEditor> - <webMaster>webmaster@eclipse.org</webMaster> - -<?php - - # Connect to database - $dbc = new DBConnectionProjectInfo(); - $dbh = $dbc->connect(); - - # Find the list of ProjectInfoIDs where a release was noted in the last 6 months - $sql = "SELECT ProjectID, ProjectInfo.ProjectInfoID AS ID FROM ProjectInfo, ProjectInfoValues - WHERE ProjectInfo.ProjectInfoID = ProjectInfoValues.ProjectInfoID - AND MainKey = 'release' - AND date(Value) > now() - interval 183 day - ORDER BY date(Value)"; - - # Fetch complete resultset - $result = mysql_query($sql, $dbh); - - # Iterate the resultset and output each record - while($row = mysql_fetch_assoc($result)) { - if(getProjInfValue($row['ID'], 'release', 'status') == 'completed') { - $name = getProjInfValue($row['ID'], 'release', 'name'); - $url = getProjInfValue($row['ID'], 'release', 'download'); - $date = date("D, j M Y H:i:s T", strtotime(getProjInfValue($row['ID'], 'release', 'date'))); - - if(!preg_match('/http:\/\//', $url)) { - $url = "http://www.eclipse.org/$url"; - } -?> - <item> - <title> - <?= $row['ProjectID'] . " " . $name ?> - </title> - <link><?= $url ?></link> - <description>New file download for the <?= $row['ProjectID'] ?> project. - <?= $url ?> - </description> - <pubDate><?= $date ?></pubDate> - <guid><?= $url ?></guid> - </item> -<?php - } - } - - # We're done with the DB - mysql_free_result($result); - $dbc->disconnect(); -?> - </channel> -</rss> -<?php - - # Clean up - $rs = null; - $rs_info = null; - $dbh = null; - $dbc = null; - - # We need to output XML, not HTML - header('Content-type: application/xml'); - - # Send the buffer - ob_end_flush(); - - # Return the requested ProjectInfoValue - function getProjInfValue($ProjectInfoID, $MainKey, $SubKey) { - global $dbh; - - if($SubKey != NULL) { - $SubKey = "AND SubKey = '$SubKey'"; - } - $query = "SELECT Value FROM ProjectInfo as PI, ProjectInfoValues as PIV " . - "WHERE PI.ProjectInfoID = PIV.ProjectInfoID " . - "AND MainKey = '$MainKey' $SubKey " . - "AND PI.ProjectInfoID = $ProjectInfoID"; - $result = mysql_query($query, $dbh); - if(!$result) { - ob_end_clean(); - echo "busted! $query"; - } - $row = mysql_fetch_assoc($result); - return $row['Value']; - } - -?> - |