summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64585a6)
raw | patch | inline | side by side (parent: 64585a6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Sep 2006 08:31:41 +0000 (08:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Sep 2006 08:31:41 +0000 (08:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4722 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history | |
plugins/admin/systems/tabs_printers.inc | patch | blob | history | |
plugins/admin/systems/tabs_workstation.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 44fc8330dfdd74825da5ed5cf95439e64bebbfd6..e1f34fcebde0079fe4564d0b01bb94d6b6e57c62 100644 (file)
"gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter","gotoGroupPrinter");
var $objectclasses = array("top", "gotoPrinter");
- function printgeneric ($config, $dn,$parent)
+ var $parent;
+
+ function printgeneric ($config, $dn,$parent_init,$parent)
{
$this->config = $config;
$this->dn = $dn;
-
+
/* If parent was posted(the tabs object) we can detect the printer type. */
if($parent){
$this->parent = $parent;
$this->orig_dn = $this->dn;
/* Get printer settings, possibly dn has changed */
- plugin::plugin ($config, $this->dn);
+ plugin::plugin ($config, $this->dn,$parent_init);
/* Get is_account initially_was_account status */
$this->getTypeOfPrinter(true);
/* Detect type of printer via parent tabs.
*/
+
+ $class = get_class($this->parent);
+ echo $class;
if(isset($this->parent->by_object['workgeneric'])){
/* Exclude templates
function save_object()
{
plugin::save_object();
- $this->netConfigDNS->save_object();
+
+ if(is_object($this->netConfigDNS)){
+ $this->netConfigDNS->save_object();
+ }
/* Save base, since this is no LDAP attribute */
if((isset($_POST['base'])) && ($this->acl_is_moveable()) ) {
index 2c264234e377fc88542a3e3c6caf0b64a56ab9cb..92c9fbb33ec0c9f141e807acb8f118fec3ac1859 100644 (file)
function printtabs($config, $data, $dn,$category)
{
+
/* Save dn */
$this->dn= $dn;
$this->config= $config;
+ $baseobject= NULL;
+
foreach ($data as $tab){
- if($tab['CLASS'] == "printgeneric"){
- $this->by_name[$tab['CLASS']]= $tab['NAME'];
- $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn,$this);
- $this->by_object[$tab['CLASS']]->parent= &$this;
- $this->by_object[$tab['CLASS']]->set_acl_category($category);
- }else{
- $this->by_name[$tab['CLASS']]= $tab['NAME'];
- $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn);
- $this->by_object[$tab['CLASS']]->parent= &$this;
- $this->by_object[$tab['CLASS']]->set_acl_category($category);
+ $this->by_name[$tab['CLASS']]= $tab['NAME'];
+
+ if ($baseobject == NULL){
+ $baseobject= new $tab['CLASS']($this->config, $this->dn,NULL,$this);
+ $this->by_object[$tab['CLASS']]= $baseobject;
+ } else {
+ $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject,$this);
}
+
+ $this->by_object[$tab['CLASS']]->parent= &$this;
+ $this->by_object[$tab['CLASS']]->set_acl_category($category);
+
/* Initialize current */
if ($this->current == ""){
$this->current= $tab['CLASS'];
diff --git a/plugins/admin/systems/tabs_workstation.inc b/plugins/admin/systems/tabs_workstation.inc
index d5bab394b9dd6344d78821bd6ef71a949d5113a5..138c2d4ede2fb2b4c50040aa83abb88713cbdc38 100644 (file)
function worktabs($config, $data, $dn,$category)
{
+
/* Save dn */
$this->dn= $dn;
$this->config= $config;
+ $baseobject= NULL;
+
foreach ($data as $tab){
- if($tab['CLASS'] == "printgeneric"){
- $this->by_name[$tab['CLASS']]= $tab['NAME'];
- $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn,$this);
- $this->by_object[$tab['CLASS']]->parent= &$this;
- $this->by_object[$tab['CLASS']]->set_acl_category($category);
- }else{
- $this->by_name[$tab['CLASS']]= $tab['NAME'];
- $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn);
- $this->by_object[$tab['CLASS']]->parent= &$this;
- $this->by_object[$tab['CLASS']]->set_acl_category($category);
+ $this->by_name[$tab['CLASS']]= $tab['NAME'];
+
+ if ($baseobject == NULL){
+ $baseobject= new $tab['CLASS']($this->config, $this->dn,NULL,$this);
+ $this->by_object[$tab['CLASS']]= $baseobject;
+ } else {
+ $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject,$this);
}
+
+ $this->by_object[$tab['CLASS']]->parent= &$this;
+ $this->by_object[$tab['CLASS']]->set_acl_category($category);
+
/* Initialize current */
if ($this->current == ""){
$this->current= $tab['CLASS'];