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$$
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 */
24 /* Remove locks created by this plugin
25 */
26 if ($remove_lock){
27 if(session::is_set('gotomasses')){
28 // Nothing to unlock here
29 }
30 }
32 /* Remove this plugin from session
33 */
34 if ( $cleanup ){
35 session::un_set('gotomasses');
36 }else{
39 /* Create gotomasses object on demand */
40 if (!session::is_set('gotomasses') || isset($_POST['reload_gotomass_data'])){
41 $gotomasses= new gotomasses ($config);
42 $gotomasses->set_acl_category("gotomasses");
44 /* Check root dn and user dn for acl informations */
45 $gotomasses->set_acl_base($config->current['BASE']);
46 if($gotomasses->getacl("") == ""){
47 $gotomasses->set_acl_base($ui->dn);
48 }
50 /* Check if we have acl on our own base */
51 if($gotomasses->getacl("") == ""){
52 $gotomasses->set_acl_base(dn2base($ui->dn));
53 }
54 session::set("gotomasses",$gotomasses);
55 }
56 $gotomasses = session::get('gotomasses');
58 /* Execute formular */
59 $display= $gotomasses->save_object();
60 if(isset($_POST['save_gotomass_changes'])){
61 $gotomasses->save();
62 }
63 $display= $gotomasses->execute ();
65 /* Page header*/
66 $display= print_header(get_template_path('plugins/goto/images/goto.png'), _("System deployment status")).$display;
68 /* Store changes in session */
69 session::set('gotomasses',$gotomasses);
70 }