From 8248a7b6a8a4f0ee413b5eeb6d8fafee65465f3f Mon Sep 17 00:00:00 2001 From: Ian Grigg Date: Fri, 23 Jul 2010 05:34:28 +0000 Subject: [PATCH] slight tidyup git-svn-id: http://svn.cacert.org/CAcert/Policies@1976 14b1bab8-4ef6-0310-b690-991c95c89dfd --- code/pd.php | 11 +++++++++-- code/policydecisions.class.php | 9 +++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/code/pd.php b/code/pd.php index a237acd..6b6eba3 100644 --- a/code/pd.php +++ b/code/pd.php @@ -1,6 +1,13 @@ $svn/policy_group_decisions_summary.html + cd $svn + svn commit -m 'update' policy_group_decisions_summary.html +*/ + require_once("policydecisions.class.php"); $pd = new \Misc\PolicyDecisions(); -$pd->load_from_webpage(); // this one, -$pd->html(); // see this for options on output +$pd->load_from_webpage(); +$pd->html(); ?> diff --git a/code/policydecisions.class.php b/code/policydecisions.class.php index 5cd99ba..b7e8290 100644 --- a/code/policydecisions.class.php +++ b/code/policydecisions.class.php @@ -5,6 +5,7 @@ * It reads in the entire PolicyDecisions page, extracts the acts, * and prepares summaries. * + * // PHP use code Example: * require_once("policydecisions.class.php"); // adjust path... * $pd = new \Misc\PolicyDecisions(); * $pd->load_from_webpage(); // read in the data @@ -14,7 +15,7 @@ */ namespace Misc { - class PolicyDecisions { // if you change name, also do XOXOX below + class PolicyDecisions { const WIKIURL = 'wiki.cacert.org/'; const HTTP = 'http:'; @@ -142,7 +143,7 @@ namespace Misc { $this->cache_prefix = $prefix; } - public function &name_to_filename($name) + private function &name_to_filename($name) { return $this->cache_prefix . $name . '.txt'; } @@ -499,7 +500,7 @@ namespace Misc { } // echo "OK, class name is " . get_class($this) . "
\n"; - usort($sort, array(get_class($this), "cmp")); // XOXOX class name + usort($sort, array(get_class($this), "cmp")); // class name return $sort; } @@ -601,7 +602,7 @@ namespace Misc { } } -/* +/* local test code... $pd = new PolicyDecisions(); $pd->load_from_webpage(); // $pd->save_to_cache_files();