summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4c7597)
raw | patch | inline | side by side (parent: c4c7597)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 16 Oct 2005 13:51:19 +0000 (13:51 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 16 Oct 2005 13:51:19 +0000 (13:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1573 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index dea5899fdd2f1881f367cf2c323c6eaa12630a83..039be7bb61fc859d9ee13e79323a369f2d79d48e 100644 (file)
*/
if((isset($this->attrs['objectClass']))&&(in_array("gotoWorkstation",$this->attrs['objectClass']))){
$this->is_terminal = "true";
- $this->dn = preg_replace("/ou=workstation/","ou=printer",$this->dn);
+ $this->dn = preg_replace("/ou=workstations,/","ou=printers,",$this->dn);
$this->type = "station";
}elseif((isset($this->attrs['objectClass']))&&(in_array("gotoTerminal",$this->attrs['objectClass']))){
$this->type = "terminal";
function remove_from_parent()
{
+ $this->dn= preg_replace('/ou=workstations,/', 'ou=printers,', $this->dn);
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
show_ldap_error($ldap->get_error());
/* Save to LDAP */
function save()
{
+ if (!$this->is_account){
+ return;
+ }
+
$dn= $this->dn;
plugin::save();
$ldap= $this->config->get_ldap_link();
if((in_array("gotoTerminal",$this->attrs['objectClass']))){
- $this->dn= preg_replace("/ou=terminal/","ou=printer",$this->dn);
+ $this->dn= preg_replace("/ou=terminals,/","ou=printers,",$this->dn);
}
if((in_array("gotoWorkstation",$this->attrs['objectClass']))){
- $this->dn= preg_replace("/ou=workstation/","ou=printer",$this->dn);
+ $this->dn= preg_replace("/ou=workstations,/","ou=printers,",$this->dn);
}
/* We are currently editing a Terminal, so we want to save a seperate printer which cn is the terminla cn
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index 17f2fbe01e6e83b0b1c21b8b6e5e8b20a3ef3e9f..e0480b3bb3535d6afacb41958fb8a25a805acb0a 100644 (file)
$this->config->data['TABS']['WORKTABS'], $this->dn);
$this->systab->set_acl ($this->acl);
$this->systab->by_object['workgeneric']->cn= "wdefault";
- $this->systab->by_object['termservice']->cn= "default";
+ $this->systab->by_object['workservice']->cn= "default";
break;
case 'server':
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 1b8775eced24032bf4e6891375fead677ad28722..062073468667b4b0858da34b2ebe4ccfc5be636c 100644 (file)
/* Generic terminal attributes */
var $gotoMode= "disabled";
- var $gotoTerminalPath= "";
- var $gotoSwapServer= "";
var $gotoSyslogServer= "";
var $gotoNtpServer= "";
var $gotoSndModule= "";
/* Needed values and lists */
var $base= "";
var $cn= "";
+ var $l= "";
var $orig_dn= "";
/* Plugin side filled */
/* attribute list for save action */
var $ignore_account= TRUE;
- var $attributes= array("gotoMode", "gotoTerminalPath", "macAddress",
- "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer",
+ var $attributes= array("gotoMode", "macAddress", "gotoSyslogServer", "gotoNtpServer",
"gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
"ghCpuType", "ghMemSize", "ghUsbSupport", "ipHostNumber",
- "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
+ "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l");
var $objectclasses= array("top", "gotoWorkstation", "GOhard");
function workgeneric ($config, $dn= NULL)
/* Fill templating stuff */
$smarty= get_smarty();
$smarty->assign("cn", $this->cn);
+ $smarty->assign("l", $this->l);
$smarty->assign("bases", $this->config->idepartments);
$smarty->assign("staticAddress", "");
$smarty->assign("ntpservers", $this->config->data['SERVERS']['NTP']);
/* Variables */
- foreach(array("base", "gotoMode", "gotoTerminalPath", "gotoSwapServer",
- "gotoSyslogServer", "gotoNtpServer") as $val){
+ foreach(array("base", "gotoMode", "gotoSyslogServer", "gotoNtpServer") as $val){
$smarty->assign($val."_select", $this->$val);
$smarty->assign($val."ACL", chkacl($this->acl, $val));
if (isset($_POST['base']) && chkacl($this->acl, "create") == ""){
$this->base= $_POST['base'];
}
-
- /* Save terminal path to parent since it is used by termstartup, too */
- $this->parent->by_object['termstartup']->gotoTerminalPath=
- $this->gotoTerminalPath;
}
plugin::save();
/* Strip out 'default' values */
- foreach (array("gotoTerminalPath", "gotoSwapServer", "gotoSyslogServer") as $val){
+ foreach (array("gotoSyslogServer") as $val){
if ($this->attrs[$val] == "default"){
$this->attrs[$val]= array();
diff --git a/plugins/admin/systems/tabs_workstation.inc b/plugins/admin/systems/tabs_workstation.inc
index 4f59e1d5685e0f424a7d3aaca32240cb626af6da..bb5b892a8bb03beccefc975df930e8e561b15b7c 100644 (file)
function save_object($save_current= FALSE)
{
+echo "Take care of the l attribute. It needs to be synced in case of workstations.";
tabs::save_object($save_current);
-
- /* Update reference, transfer variables */
- $this->by_object['termstartup']->gotoTerminalPath=
- $this->by_object['workgeneric']->gotoTerminalPath;
}
index 385a9e766c32ef6fde37add9bcbfea0ac80877d7..6ad9f4dff6efbd9c2f6ffbb9b0cfd441618c17e6 100644 (file)
</td>
{/if}
</tr>
+ <tr>
+ <td><LABEL for="cn">{t}Location{/t}</LABEL></td>
+ <td>
+ <input name="l" id="l" size=18 maxlength=60 value="{$l}">
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2> </td>
+ </tr>
<tr>
<td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
<td>
</select>
</td>
</tr>
- </table>
-
- </td>
- </tr>
- <tr>
- <td style="width:50%;">
- <table summary="">
- <tr><td colspan=2><div style="height:15px;"></div></td></tr>
- <tr>
- <td>{t}Root server{/t}</td>
- <td>
- <select name="gotoTerminalPath" title="{t}Select NFS root filesystem to use{/t}" {$gotoTerminalPathACL}>
- {html_options values=$nfsservers output=$nfsservers selected=$gotoTerminalPath_select}
- </select>
- </td>
- </tr>
- <tr>
- <td>{t}Swap server{/t}</td>
- <td>
- <select name="gotoSwapServer" title="{t}Choose NFS filesystem to place swap files on{/t}" {$gotoSwapServerACL}>
- {html_options values=$nfsservers output=$nfsservers selected=$gotoSwapServer_select}
- </select>
- </td>
- </tr>
- </table>
- </td>
- <td style="vertical-align:top;">
-
- <table summary="">
<tr><td colspan=2><div style="height:15px;"></div></td></tr>
<tr>
<td><LABEL for="gotoSyslogServer">{t}Syslog server{/t}</LABEL></td>
</td>
</tr>
</table>
-
</td>
</tr>
</table>