slight tidyup

git-svn-id: http://svn.cacert.org/CAcert/Policies@1976 14b1bab8-4ef6-0310-b690-991c95c89dfd
pull/1/head
Ian Grigg 14 years ago
parent a47e080a60
commit 8248a7b6a8

@ -1,6 +1,13 @@
<?php <?php
/*
svn=~/wp/cacert/CAcert/Policies
php -C pd.php > $svn/policy_group_decisions_summary.html
cd $svn
svn commit -m 'update' policy_group_decisions_summary.html
*/
require_once("policydecisions.class.php"); require_once("policydecisions.class.php");
$pd = new \Misc\PolicyDecisions(); $pd = new \Misc\PolicyDecisions();
$pd->load_from_webpage(); // this one, $pd->load_from_webpage();
$pd->html(); // see this for options on output $pd->html();
?> ?>

@ -5,6 +5,7 @@
* It reads in the entire PolicyDecisions page, extracts the acts, * It reads in the entire PolicyDecisions page, extracts the acts,
* and prepares summaries. * and prepares summaries.
* *
* // PHP use code Example:
* require_once("policydecisions.class.php"); // adjust path... * require_once("policydecisions.class.php"); // adjust path...
* $pd = new \Misc\PolicyDecisions(); * $pd = new \Misc\PolicyDecisions();
* $pd->load_from_webpage(); // read in the data * $pd->load_from_webpage(); // read in the data
@ -14,7 +15,7 @@
*/ */
namespace Misc { namespace Misc {
class PolicyDecisions { // if you change name, also do XOXOX below class PolicyDecisions {
const WIKIURL = 'wiki.cacert.org/'; const WIKIURL = 'wiki.cacert.org/';
const HTTP = 'http:'; const HTTP = 'http:';
@ -142,7 +143,7 @@ namespace Misc {
$this->cache_prefix = $prefix; $this->cache_prefix = $prefix;
} }
public function &name_to_filename($name) private function &name_to_filename($name)
{ {
return $this->cache_prefix . $name . '.txt'; return $this->cache_prefix . $name . '.txt';
} }
@ -499,7 +500,7 @@ namespace Misc {
} }
// echo "OK, class name is " . get_class($this) . "<br/>\n"; // echo "OK, class name is " . get_class($this) . "<br/>\n";
usort($sort, array(get_class($this), "cmp")); // XOXOX class name usort($sort, array(get_class($this), "cmp")); // class name
return $sort; return $sort;
} }
@ -601,7 +602,7 @@ namespace Misc {
} }
} }
/* /* local test code...
$pd = new PolicyDecisions(); $pd = new PolicyDecisions();
$pd->load_from_webpage(); $pd->load_from_webpage();
// $pd->save_to_cache_files(); // $pd->save_to_cache_files();

Loading…
Cancel
Save