summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0864eeb)
raw | patch | inline | side by side (parent: 0864eeb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Nov 2006 06:30:31 +0000 (06:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Nov 2006 06:30:31 +0000 (06:30 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5202 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 5350eb7469ba5a8b810ac0ce70b8cf048a71990b..7544aceaef882cc5ee5d91f64f64a1b6890a8109 100644 (file)
}
if(isset($val['message'])){
- $display.= " (".$val['message']." '".$this->config->idepartments[$_SESSION['CurrentMainBase']]."' )";
+ $display.= " (".$val['message'].")";
}
$img = $this->parent->convert_list($val);
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 7076727f3859c7371d4d98aa2b95118e68495e1c..4a475c6dedce506ad658693936939ecafe0c65c7 100644 (file)
}
/* Update dn, to ensure storing as printer instead of WS / terminal */
- if($this->BelongsTo == "Terminal"){
+ if($this->BelongsTo == "Terminal" || $this->BelongsTo == "TerminalTemplate"){
$this->dn= preg_replace("/ou=terminals,/","ou=printers,",$this->dn);
}
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index 5a2b8d8345fe57a9fc66783c98563618b84efac6..5d655f75e4c88e4724198d0c361c04b157b2eef3 100644 (file)
}
}
+ /* Create a string containing the last part of the department. */
+ $dn_name = preg_replace("#^([^/]+/)*#","",convert_department_dn(@LDAP::fix($tmp)));
+ if(empty($dn_name)){
+ $dn_name = "/";
+ }
+
/* check if current object is a new one */
if (preg_match ("/,ou=incoming,/i", $tmp)){
if (in_array_ics('gotoTerminal', $value['objectClass'])){
} else {
$terminal = $value;
$terminal['type'] = "D";
- $terminal['message'] = _("Terminal template for");
+ $terminal['message'] = _("Terminal template for")." '".$dn_name."' ";
$terminal['location'] = array_search($tmp, $this->config->departments);
}
}
$terminal = $value;
$terminal['type'] = "D";
$terminal['location'] = array_search($tmp, $this->config->departments);
- $terminal['message'] = _("Workstation template for");
+ $terminal['message'] = _("Workstation template for")." '".$dn_name."' ";
}
if (isset($value["FAIstate"][0])){
$terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]);
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 8d9c539e9aa4b96faa55dc78c46facdfa8fc20ce..ba256af50ece884b3a9d8b79452f48286895549b 100644 (file)
{
/* Call common method to give check the hook */
$message= plugin::check();
- $message= array_merge($message, $this->netConfigDNS->check());
+
+ /* Skip IP & Mac checks if this is a template */
+ if($this->cn != "default"){
+ $message= array_merge($message, $this->netConfigDNS->check());
+ }
/* Permissions for that base? */
$this->dn= "cn=".$this->cn."ou=terminals,ou=systems,".$this->base;
if ($this->orig_dn == 'new'){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
- $ldap->search ("(&(objectClass=gotoTerminal)(cn=".$this->cn."))", array("cn"));
+
+ /* It is possible to have a 'default' terminal on every base */
+ if($this->cn == "default"){
+ $ldap->cat($this->dn);
+ }else{
+ $ldap->search ("(&(objectClass=gotoTerminal)(cn=".$this->cn."))", array("cn"));
+ }
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if (preg_match ("/,ou=incoming,/", $ldap->getDN())){
$this->handle_post_events("modify");
}
+
+ /* cn=default and macAddress=- indicates that this is a template */
+ if($this->cn == "default"){
+ $this->netConfigDNS->macAddress = "-";
+ }
+
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/generic with dn '%s' failed."),$this->dn));
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index e096867f73a08e60f3e0f6a56c8825827143a65a..8b34d8278bc664254873358c65f8810cde67120e 100644 (file)
{
/* Call common method to give check the hook */
$message= plugin::check();
- $message= array_merge($message, $this->netConfigDNS->check());
+
+ /* Skip IP & Mac checks if this is a template */
+ if($this->cn != "wdefault"){
+ $message= array_merge($message, $this->netConfigDNS->check());
+ }
$this->dn= "cn=".$this->cn.",ou=workstations,ou=systems,".$this->base;
if ($this->orig_dn != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
- $ldap->search ("(&(cn=".$this->cn.")(objectClass=gotoWorkstation))", array("cn"));
+
+ if($this->cn == "wdefault"){
+ $ldap->cat($this->dn);
+ }else{
+ $ldap->search ("(&(cn=".$this->cn.")(objectClass=gotoWorkstation))", array("cn"));
+ }
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if (preg_match ("/,ou=incoming,/", $ldap->getDN())){
}
}
}
-
+
/* Check for valid ntpServer selection */
if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
$message[]= _("There must be at least one NTP server selected, or the inherit mode activated.");
$this->handle_post_events("modify");
}
}
+
+ /* cn=default and macAddress=- indicates that this is a template */
+ if($this->cn == "wdefault"){
+ $this->netConfigDNS->macAddress = "-";
+ }
+
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
index fde61c6bb1717011c2ff9bf4b7e9dd75ee24120c..cbbb965a55d2206f56fb0d05555a621e526cddf5 100644 (file)
</td>
</tr>
</table>
+
+{if $cn neq 'default'}
<p class="plugbottom" style="margin-bottom:0px; padding:0px;"> </p>
{$netconfig}
-
+{/if}
<p class="plugbottom" style="margin-bottom:0px; padding:0px;"> </p>
<h2><img class="center" alt="" align="middle" src="images/rocket.png"> {t}Action{/t}</h2>
<table summary="">
index 378c7c1266d66caed7b0781601fcb5e8be03e063..df95ee5b954999ba34c5fdc8e589e2bc05707e68 100644 (file)
</td>
</tr>
</table>
+{if $cn neq 'wdefault'}
<p class="plugbottom" style="margin-bottom:0px; padding:0px;"> </p>
{$netconfig}
-
+{/if}
<p class="plugbottom" style="margin-bottom:0px; padding:0px;"> </p>
<h2><img class="center" alt="" align="middle" src="images/rocket.png"> {t}Action{/t}</h2>
<table summary="">