summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc30a23)
raw | patch | inline | side by side (parent: cc30a23)
| author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
| Tue, 7 Oct 2008 13:18:10 +0000 (13:18 +0000) | ||
| committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
| Tue, 7 Oct 2008 13:18:10 +0000 (13:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12619 594d385d-05f5-0310-b6e9-bd551577e9d8
| gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc | patch | blob | history | |
| gosa-plugins/goto/admin/systems/goto/terminalStartup.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc
index 8bac77b7512888c6c373a241503b2f0eb5806c08..f48b2aabac3c68379e797e143b4396f980eecd79 100644 (file)
{
/* Generic terminal attributes */
var $goLdapServerList= array();
- var $gotoBootKernel= "default";
+ var $gotoBootKernel= "default-inherited";
var $gotoKernelParameters= "";
- var $gotoLdapServer= "";
+ var $gotoLdapServer= "default-inherited";
var $gotoModules= array();
var $gotoTerminalPath= "";
var $gotoBootKernels= array();
var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters","gotoModules");
var $objectclasses= array("GOhard");
var $view_logged = FALSE;
+ var $member_of_ogroup = FALSE;
+ var $o_group_dn = "";
/* Helper */
var $orig_dn= "";
$this->gotoLdapServers[] = preg_replace("/^[0-9]*:/","",$value);
}
}
- if(!count($this->gotoLdapServers)){
+ natcasesort($this->gotoLdapServerList);
+
+ if(!count($this->gotoLdapServers) && $this->member_of_ogroup){
$this->gotoLdap_inherit = TRUE;
}
+
/* Load hardware list */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
}
switch ($name){
case 'gotoBootKernel':
- $this->gotoBootKernels["default"] = "["._("inherited")."]";
+ /* Handle inheritance value "default" */
+ if ($this->member_of_ogroup){
+ $this->gotoBootKernels= array("default-inherited" => '['._("inherited").']');
+ }
break;
case 'gotoLdapServer':
$this->goLdapServerList= array_merge(array('default-inherit' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
break;
}
}
+
+ $this->member_of_ogroup = TRUE;
+ $this->o_group_dn = $attrs['dn'];
}
}
$smarty->assign($name."ACL",$this->getacl($name));
}
+ $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
- /* In this section server shares will be defined
+ /* In this section server shares will be defined
* A user can select one of the given shares and a mount point
* and attach this combination to his setup.
*/
}
/* Strip out 'default' values */
- foreach(array("gotoBootKernel") as $value){
- if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default"){
- $this->attrs[$value] = array();
- }
+ if ($this->attrs['gotoBootKernel'] == "default-inherited"){
+ $this->attrs['gotoBootKernel']= array();
}
/* prepare share settings */
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
}
$this->handle_post_events("modify");
-
- /* Check if LDAP server has changed */
- if (isset($this->attrs['gotoLdapServer']) && class_available("DaemonEvent")){
- $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
- $o_queue = new gosaSupportDaemon();
- if(isset($events['TRIGGERED']['DaemonEvent_reload_ldap_config'])){
- $evt = $events['TRIGGERED']['DaemonEvent_reload_ldap_config'];
- $macs = array($this->parent->by_object['termgeneric']->netConfigDNS->macAddress);
-
- /* Trigger event for all member objects
- */
- foreach($macs as $mac){
- $tmp = new $evt['CLASS_NAME']($this->config);
- $tmp->set_type(TRIGGERED_EVENT);
- $tmp->add_targets(array($mac));
- if(!$o_queue->append($tmp)){
- msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
- }
- }
- }
- }
}
/* Add value to array, check if unique */
diff --git a/gosa-plugins/goto/admin/systems/goto/terminalStartup.tpl b/gosa-plugins/goto/admin/systems/goto/terminalStartup.tpl
index bd3c0413c048e34ce50a092927273d75e064dee6..c2ce19b982fd5afbbe4da6cd55d7a20d812ff068 100644 (file)
<tr>
<td colspan="2" style='vertical-align:top;padding-top:3px;width:100%'><LABEL for="gotoLdapServer">{t}LDAP server{/t}</LABEL>
{render acl=$gotoLdapServerACL}
+{if $member_of_ogroup}
(<input type='checkbox' name='gotoLdap_inherit' {if $gotoLdap_inherit} checked {/if} value="1"
onClick="document.mainform.submit();" class='center'>
{t}inherit from group{/t})
{if !$JS}
<input type='image' src="images/lists/reload.png" alt='{t}Reload{/t}' class='center'>
{/if}
+{/if}
{/render}
{render acl=$gotoLdapServerACL_inherit}
{$gotoLdapServers}