web/html/rpc/.htaccess | 10 ----
web/html/rpc/recent-errata.pxt | 1
web/modules/sniglets/Sniglets/RSS.pm | 83 -----------------------------------
3 files changed, 94 deletions(-)
New commits:
commit bae7ab219568dfebb0c4cf5b210fad1c46f565dd
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 1 13:27:18 2010 +0100
Removal of recent-errata.pxt made Sniglets::RSS unused, removing.
diff --git a/web/modules/sniglets/Sniglets/RSS.pm b/web/modules/sniglets/Sniglets/RSS.pm
deleted file mode 100644
index 02927ad..0000000
--- a/web/modules/sniglets/Sniglets/RSS.pm
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-use strict;
-
-package Sniglets::RSS;
-
-use RHN::Errata;
-
-use Cache::FileCache;
-use XML::RSS;
-
-sub register_tags {
- my $class = shift;
- my $pxt = shift;
-
- $pxt->register_tag('rhn-rss-recent-errata' => \&rss_recent_errata);
-}
-
-sub rss_recent_errata {
- my $pxt = shift;
- my %params = @_;
-
- $pxt->content_type("text/xml");
-
- my $num = 10;
-
- my $cache = new Cache::FileCache({namespace => 'rhn_recent_errata'});
-
- # if the cache is less than 7200 seconds old, return it, no questions
- # asked
-
- my $cached_errata_mtime = $cache->get("cached_errata_mtime");
-
- if ($cached_errata_mtime and time - $cached_errata_mtime < 7200) {
- return $cache->get('cached_errata_rss');
- }
-
- my @errata = RHN::Errata->rss_recent_errata($num);
-
- my $rss = new XML::RSS(version => '0.91');
-
- $rss->channel(title => "Red Hat Errata",
- link => "http://www.redhat.com/apps/support/errata/",
- description => "The latest Red Hat errata for Red Hat Linux");
-
- foreach my $e (@errata) {
- $e->{advisory} =~ m/^(.*?):(.*?)-(.*?)$/;
- my $advisory = "$1-$2.html";
-
- my @affected_prod_lines = RHN::Errata->affected_product_lines($e->{id});
- my @cves = RHN::Errata->related_cves($e->{id});
- my $affected_prod_str = @affected_prod_lines ? join(',',
@affected_prod_lines) . ': ' : '';
- my $cve_str = @cves ? ' ' . join(", ", @cves) : '';
-
- my $description = "${affected_prod_str}$e->{topic}${cve_str}";
-
- $rss->add_item(title => "$e->{advisory}: $e->{synopsis}",
- link =>
qq{http://rhn.redhat.com/errata/$advisory},
- description => PXT::Utils->escapeHTML($description));
- }
-
- my $ret = $rss->as_string();
-
- $cache->set(cached_errata_rss => $ret);
- $cache->set(cached_errata_mtime => time);
-
- return $ret;
-}
-
-1;
commit 935b40b8dd8cf413793228a8b712b30c3ad44822
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 1 13:26:05 2010 +0100
recent-errata.pxt is not usable due to empty rhnProductChannel table; removing as dead
code.
diff --git a/web/html/rpc/.htaccess b/web/html/rpc/.htaccess
deleted file mode 100644
index 5ac3cd4..0000000
--- a/web/html/rpc/.htaccess
+++ /dev/null
@@ -1,10 +0,0 @@
-<Files api>
- ForceType text/pxt
- SetHandler perl-script
- PerlModule PXT::ApacheHandler
- PerlHandler PXT::ApacheHandler
-</Files>
-
-<Files recent-errata.pxt>
- PerlSetVar no_sessions 1
-</Files>
diff --git a/web/html/rpc/recent-errata.pxt b/web/html/rpc/recent-errata.pxt
deleted file mode 100644
index 21465cc..0000000
--- a/web/html/rpc/recent-errata.pxt
+++ /dev/null
@@ -1 +0,0 @@
-<pxt-passthrough><pxt-use class="Sniglets::RSS"
/><rhn-rss-recent-errata /></pxt-passthrough>