Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=homepage-ng.git;a=commitdiff;h=07f50e43caa1dfee0b96fd1a34f2b111aa867f65

commit 07f50e43caa1dfee0b96fd1a34f2b111aa867f65
Author: Russell Dickenson (phayz) <[email protected]>
Date:   Mon Jul 27 07:25:21 2009 +1000

gen-newsletter-security.php

* (Finally) committing an 'improved' version of the original script

diff --git a/frugalware/gen-newsletter-security.php 
b/frugalware/gen-newsletter-security.php
deleted file mode 100644
index a23370d..0000000
--- a/frugalware/gen-newsletter-security.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/**
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License v2 as published by
- the Free Software Foundation
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
- GNU General Public License for more details.
- */
-
-/**
- * Frugalware Linux Homepage - New Generation
- *
- * @author Alex Smith <[email protected]>
- * @copyright Copyright (C) 2007 Alex Smith
- */
-
-if (isset($argv[1]))
-        $from = $argv[1];
-else
-       die("Need an argument stating which FSA to start on\n");
-
-// This includes the XML parser
-include('xml.inc.php');
-
-// Let's see whether the security file exist or not
-if (file_exists('xml/security.xml'))
-       $xmlfile = 'xml/security.xml';
-else
-       die("Sorry, a security file has not been written yet.\n");
-
-print "Check the description outputted by this script, it cannot always be 
reliable.\n\n";
-
-print "<ul>\n";
-
-$xml = file_get_contents($xmlfile);
-$parser = new XMLParser($xml);
-$parser->Parse();
-$security = $parser->document->fsa;
-
-// The parser creates too long and unuseful object hierarchy, so create a 
better-readable one.
-for ( $i = 0; $i < count($security); $i++) {
-
-       $fsas[$i][id] = $security[$i]->id[0]->tagData;
-       $fsas[$i][date] = $security[$i]->date[0]->tagData;
-       $fsas[$i][author] = $security[$i]->author[0]->tagData;
-       $fsas[$i][package] = $security[$i]->package[0]->tagData;
-       $fsas[$i][vulnerable] = $security[$i]->vulnerable[0]->tagData;
-       $fsas[$i][unaffected] = $security[$i]->unaffected[0]->tagData;
-       $fsas[$i][bts] = $security[$i]->bts[0]->tagData;
-       $fsas[$i][cve] = $security[$i]->cve[0]->tagData;
-       $fsas[$i][desc] = $security[$i]->desc[0]->tagData;
-       $fsas[$i][shortdesc] = explode(". ", $security[$i]->desc[0]->tagData);
-       $fsas[$i][shortdesc] = explode(".\n", $fsas[$i][shortdesc][0]);
-       $fsas[$i][shortdesc] = $fsas[$i][shortdesc][0];
-}
-
-// Let's write out details of each FSA in a separate box
-for( $i = 0; $i < count($fsas); $i++ ) {
-
-       if ($fsas[$i][id] >= $from)
-               print "\t<li>FSA" . $fsas[$i][id] . " - " . $fsas[$i][package] 
. ": " . $fsas[$i][shortdesc] . ". Please upgrade to " . $fsas[$i][package] . 
"-" . $fsas[$i][unaffected] . ".</li>\n";
-
-}
-
-print "</ul>\n";
-?>
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to