summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8a768e)
raw | patch | inline | side by side (parent: d8a768e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Sep 2009 12:05:37 +0000 (12:05 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Sep 2009 12:05:37 +0000 (12:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14407 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc
index 55c6d772a9e5e1e613fe5e30cd86358cf9c86e23..b5986c37484d3087cf9cac7228185e847c2aa64f 100644 (file)
$this->config = $config;
$this->dn = $this->orig_dn = $dn;
+ // initialize gosa-si handle for opsi licenses
$this->si = new opsiLicenceHandler($this->config);
+ // Detect if this is a new or existings license
$this->is_account=TRUE;
if($this->dn == "new"){
$this->initially_was_account = FALSE;
}else{
$this->initially_was_account = TRUE;
+
+ // Extract pool name out of the fake dn.
$this->cn = $this->orig_cn = preg_replace("/^opsi:cn=([^,]*),.*$/","\\1",$dn);
}
- // Extract pool name out of the fake dn.
$this->init();
}
if(!$this->initially_was_account){
$this->init_successfull = TRUE;
}else{
-
$res = $this->si->getPool($this->cn);
-
if($this->si->is_error()){
$this->init_successfull = FALSE;
msg_dialog::display(_("Error"),msgPool::siError($this->si->get_error()),ERROR_DIALOG);
$upper = strtoupper($license['LICENSEPOOLIDS'][0]['VALUE']);
$license['LICENSEKEYS'] = $license['LICENSEKEYS'][0][$upper];
+ // Map license attributes to a useable format
$entry = array();
foreach($this->licenseMap as $source => $target){
$entry[$target] = "";
}
}
+ // Extract contract data
$lData= $license['LICENSECONTRACTDATA'][0];
foreach($this->licenseContractMap as $source => $target){
if(isset($lData[$source])){
}
+ // Creates a divSelectBox and fills it with license entries
function getLicenseList()
{
$list = new divSelectBox("test");
$list->setHeight(100);
-
if($this->acl_is_readable("licenses")){
foreach($this->licenses as $i => $license){
$link = "<input type='image' class='center' src='images/lists/edit.png' name='editLicense_{$i}'>";
// Save license modifications
if($this->dialog instanceOf plugin && isset($_POST['license_finish'])){
$this->dialog->save_object();
-
$msgs = $this->dialog->check();
if(count($msgs)){
msg_dialog::displayChecks($msgs);