X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fadmin%2Fogroups%2Fmain.inc;h=e8df9c6bbcaa2df99b2bdbde43c80b3e5e4f4ffe;hb=2274d64c94b69218e890419926ba10548cc2d098;hp=918c970aaf5f70714e55f565bc675a4a0c15e668;hpb=434959652679c3a0bccca42ce9e858b4d595be30;p=gosa.git diff --git a/gosa-core/plugins/admin/ogroups/main.inc b/gosa-core/plugins/admin/ogroups/main.inc index 918c970aa..e8df9c6bb 100644 --- a/gosa-core/plugins/admin/ogroups/main.inc +++ b/gosa-core/plugins/admin/ogroups/main.inc @@ -20,41 +20,36 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - +/* Remove locks created by this plugin +*/ if ($remove_lock){ - if(session::is_set('ogroup')){ - $ogroup = session::get('ogroup'); - $ogroup->remove_lock(); - session::un_set ('ogroup'); - } -} else { - - /* Create object object on demand */ - if (!session::is_set('ogroup') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ - session::set('ogroup',new ogroupManagement ($config)); + if(session::is_set('ogroupManagement')){ + $macl = session::get('ogroupManagement'); + $macl->remove_lock(); } - $ogroup = session::get('ogroup'); +} - /* Execute formular */ - $ogroup->save_object(); - $output= $ogroup->execute (); +/* Remove this plugin from session +*/ +if ( $cleanup ){ + session::un_set('ogroupManagement'); +}else{ - /* Page header*/ - if (session::is_set('objectinfo')){ - $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), - _("Object groups"), - "\"\" ".LDAP::fix(session::get('objectinfo'))); - } else { - $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups")); + /* Create ogroupmanagement object on demand */ + if (!session::is_set('ogroupManagement')){ + $ogroupManagement= new ogroupManagement ($config, $ui); + session::set('ogroupManagement',$ogroupManagement); } + $ogroupManagement = session::get('ogroupManagement'); + $display= $ogroupManagement->execute(); - $display.= $output; + /* Reset requested? */ + if (isset($_GET['reset']) && $_GET['reset'] == 1){ + session::un_set ('ogroupManagement'); + } - /* Store changes in session */ - session::set('ogroup',$ogroup); + /* Show and save dialog */ + session::set('ogroupManagement',$ogroupManagement); } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: