Commit c55aca1b authored by Leigh Stoller's avatar Leigh Stoller

Add helper functions.

parent a02feb17
......@@ -67,7 +67,8 @@ class Instance
function manifest() { return $this->field('manifest'); }
function admin_lockdown() { return $this->field('admin_lockdown'); }
function user_lockdown(){ return $this->field('user_lockdown'); }
function extension_reason() { return $this->field('extension_reason'); }
function extension_reason() { return $this->field('extension_reason'); }
function extension_lockout() { return $this->field('extension_adminonly'); }
function servername() { return $this->field('servername'); }
function aggregate_urn(){ return $this->field('aggregate_urn'); }
function IsAPT() {
......@@ -267,6 +268,14 @@ class Instance
}
return $am_array;
}
# helper
function ParseURN($urn)
{
if (preg_match("/^[^+]*\+([^+]+)\+([^+]+)\+(.+)$/", $urn, $matches)) {
return array($matches[1], $matches[2], $matches[3]);
}
return array();
}
function SetExtensionReason($reason)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment