Code

8cdea72c8d80dcd719cf0895b82f35510c5c7f9f
[gosa.git] / gosa-core / plugins / personal / myaccount / MyAccountTabs.inc
1 <?php
2 /*
3  * This code is part of GOsa (http://www.gosa-project.org)
4  * Copyright (C) 2003-2008 GONICUS GmbH
5  *
6  * ID: $$Id: tabs_user.inc 14136 2009-08-26 08:02:49Z hickert $$
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
23 class MyAccountTabs extends tabs
24 {
26   function remove_lock()
27   {
28     echo "Implement remove Lock !!!!!";;
29   }
31 # var $base;
32 #
33 # /* Template adaption variables
34 #  */
35 # var $uid  ="";
36 # var $givenName = "";
37 # var $sn;
38 #
39 # function usertabs($config, $data, $dn, $cat = "", $hide_refs = FALSE, $hide_acls = FALSE)
40 # {
41 #   tabs::tabs($config, $data, $dn, 'users',$hide_refs, $hide_acls);
42 #   $this->base= $this->by_object['user']->base;
43 #
44 #   $this->uid = &$this->by_object['user']->uid;
45 #   $this->sn = &$this->by_object['user']->sn;
46 #   $this->givenName = &$this->by_object['user']->givenName;
47 #
48 #   /* Add references/acls/snapshots */
49 #   $this->addSpecialTabs();
50 #
51 # }
52 #
53 # function save_object($save_current= FALSE)
54 # {
55 #   tabs::save_object($save_current);
56 #
57 #   /* Update reference, transfer variables */
58 #   $baseobject= $this->by_object['user'];
59 #   foreach ($this->by_object as $name => $obj){
60 #
61 #     /* Adding uid to sub plugins of connectivity */
62 #     if($name == "connectivity"){
63 #       foreach ($obj->plugin_name as $plg_name){
64 #         if(isset($obj->plugin[$plg_name]->uid)){
65 #           $obj->plugin[$plg_name]->uid = $baseobject->uid;
66 #         }
67 #       }
68 #     }
69 #
70 #     /* Don't touch base object */
71 #     if ($name != 'user'){
72 #       $obj->parent= &$this;
73 #       $obj->uid= $baseobject->uid;
74 #       $obj->sn= $baseobject->uid;
75 #       $obj->givenName= $baseobject->uid;
76 #     }
77 #
78 #     /* Copy mail if needed */
79 #     if ($name == "gofaxAccount"){
80 #       if (isset($this->by_object['mailAccount']) && $this->by_object['mailAccount']->is_account){
81 #         $obj->mail= $this->by_object['mailAccount']->mail;
82 #       }
83 #     }
84 #
85 #     $this->by_object[$name]= $obj;
86 #
87 #     /* Update parent in base object */
88 #     $this->by_object['user']->parent= &$this;
89 #   }
90 #
91 #   /* Move facsimile / phone number if nessecary */
92 #   if ($this->last == "user" && isset($this->by_object['gofaxAccount'])){
93 #
94 #     /* Move number to fax plugin */
95 #     $this->by_object['gofaxAccount']->facsimileTelephoneNumber=
96 #       $this->by_object['user']->facsimileTelephoneNumber;
97 #
98 #     /* Move phone number if plugin exists */
99 #     if (isset($this->by_object['phoneAccount']) && 
100 #         !$this->by_object['phoneAccount']->is_account){
101 #       $this->by_object['phoneAccount']->phoneNumbers= array();
102 #       if ($this->by_object['user']->telephoneNumber != ""){
103 #         $this->by_object['phoneAccount']->phoneNumbers[$this->by_object['user']->telephoneNumber]= $this->by_object['user']->telephoneNumber;
104 #       }
105 #     }
106 #   }
108 #   /* Move number from fax plugin */
109 #   if ($this->last == "gofaxAccount"){
111 #     $this->by_object['user']->facsimileTelephoneNumber=
112 #       $this->by_object['gofaxAccount']->facsimileTelephoneNumber;
113 #   }
115 #   /* Move number from fax plugin */
116 #   if ($this->last == "phoneAccount" && $this->by_object['phoneAccount']->is_account){
117 #     reset($this->by_object['phoneAccount']->phoneNumbers);
118 #     $number= key($this->by_object['phoneAccount']->phoneNumbers);
120 #     /* Only the first phoneAccount number, if it is not empty */
121 #     if(!empty($number)){
122 #       $this->by_object['user']->telephoneNumber= $number;
123 #     }
124 #   }
126 #   /* Possibly change acl base */
127 #   $this->set_acl_base();
128 # }
130 # function save($ignore_account= FALSE)
131 # {
132 #   /* Check for new 'dn', in order to propagate the
133 #      'dn' to all plugins */
134 #   $baseobject= $this->by_object['user'];
135 #   $baseobject->update_new_dn();
136 #   if ($this->dn != 'new'){
138 #     $new_dn= $baseobject->new_dn;
140 #     if ($this->dn != $new_dn){
142 #       /* Udpate acls */
143 #       $baseobject->update_acls($this->dn,$new_dn);
144 #       $baseobject->move($this->dn, $new_dn);
145 #       $this->by_object['user']= $baseobject;
147 #       /* Did we change ourselves? Update ui object. */
148 #       change_ui_dn($this->dn, $new_dn);
149 #     }
150 #   }
152 #   $this->dn= $baseobject->new_dn;
154 #   return tabs::save();
155 # }
158 # function set_template_mode()
159 # {
160 #   foreach ($this->by_object as $key => $obj){
161 #     $this->by_object[$key]->is_template= TRUE;
162 #   }
163 # }
164
165 # function saveCopyDialog()
166 # {
167 #   tabs::saveCopyDialog();
168 #   $baseobject= $this->by_object['user'];
169 #   $uid = $baseobject->uid;
170 #   foreach($this->by_object as  $name => $obj){
171 #     $this->by_object[$name]->uid = $uid;
172 #   }
173 # }
177 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
178 ?>