From 8aed4f5400b690cd6c9130bb77abd62c81a574df Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 29 Jun 2010 12:49:45 +0000 Subject: [PATCH] Removed uni-stuff git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18862 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/uniBonnSoFS/accountSoFS.tpl | 1 - .../uniBonnSoFS/class_accountSoFS.inc | 109 ------------- .../plugins/personal/uniBonnSoFS/main.inc | 150 ------------------ 3 files changed, 260 deletions(-) delete mode 100644 gosa-core/plugins/personal/uniBonnSoFS/accountSoFS.tpl delete mode 100644 gosa-core/plugins/personal/uniBonnSoFS/class_accountSoFS.inc delete mode 100644 gosa-core/plugins/personal/uniBonnSoFS/main.inc diff --git a/gosa-core/plugins/personal/uniBonnSoFS/accountSoFS.tpl b/gosa-core/plugins/personal/uniBonnSoFS/accountSoFS.tpl deleted file mode 100644 index 9daeafb98..000000000 --- a/gosa-core/plugins/personal/uniBonnSoFS/accountSoFS.tpl +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/gosa-core/plugins/personal/uniBonnSoFS/class_accountSoFS.inc b/gosa-core/plugins/personal/uniBonnSoFS/class_accountSoFS.inc deleted file mode 100644 index c7e6e33e4..000000000 --- a/gosa-core/plugins/personal/uniBonnSoFS/class_accountSoFS.inc +++ /dev/null @@ -1,109 +0,0 @@ -fetch(get_template_path('accountQuota.tpl',TRUE,dirname(__FILE__)))); - } - - - function save_object() - { - plugin::save_object(); - } - - - function check() - { - $messages = plugin::check(); - return($messages); - } - - - function save() - { - plugin::save(); - $this->cleanup(); - } - - - /* remove object from parent */ - function remove_from_parent() - { - $ui=get_userinfo(); - - /* Remove and write to LDAP */ - if(!$this->initially_was_account) return(false); - - plugin::remove_from_parent(); - - @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->attributes, "Save"); - $ldap= $this->config->get_ldap_link(); - $ldap->cd($this->dn); - $this->cleanup(); - $ldap->modify ($this->attrs); - - new log("remove","uniBonnAccount/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); - - if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class())); - }else{ - $this->handle_post_events("remove",array("uid" => $uid, "userdn" => $ui->dn)); - } - } - - function multiple_execute(){ return($this->execute()); } - - static function plInfo() - { - return (array( - "plDescription" => _("SoFS-Disk space"), - "plSelfModify" => TRUE, - "plDepends" => array("user"), - "plPriority" => 2, - "plSection" => array("personal" => _("My account")), - "plCategory" => array("uniBonnAccount"), - "plOptions" => array(), - - "plProvidedAcls" => array( - "test" => _("Test")) - )); - } -} -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-core/plugins/personal/uniBonnSoFS/main.inc b/gosa-core/plugins/personal/uniBonnSoFS/main.inc deleted file mode 100644 index dfc54c630..000000000 --- a/gosa-core/plugins/personal/uniBonnSoFS/main.inc +++ /dev/null @@ -1,150 +0,0 @@ -dn); - } -} - -/* Remove this plugin from session -*/ -if ( $cleanup ){ - session::un_set('accountSoFS'); - session::un_set('edit'); - -}else{ - - /* Reset requested? */ - if (isset($_POST['edit_cancel'])){ - session::un_set ('edit'); - session::un_set ('accountSoFS'); - } - - /* Create accountSoFS object on demand */ - if (!session::is_set('accountSoFS') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ - $accountSoFS= new accountSoFS ($config, $ui->dn); - $accountSoFS->enable_CSN_check(); - $accountSoFS->set_acl_base($ui->dn); - $accountSoFS->set_acl_category("uniBonnAccount"); - - uniBonnAccount::propagateRoleAttributes($config, NULL, $accountSoFS, NULL); - - session::set('accountSoFS',$accountSoFS); - } - $accountSoFS = session::get('accountSoFS'); - - /* save changes back to object */ - if (session::is_set('edit')){ - $accountSoFS->save_object (); - } - - /* Enter edit mode? */ - if ((isset($_POST['edit'])) && (!session::is_set('edit'))){ - - /* Check locking */ - if (($username= get_lock($ui->dn)) != ""){ - session::set('back_plugin',$plug); - session::set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/")); - $lock_msg = gen_locked_message ($username, $ui->dn); - - }else{ - - /* Lock the current entry */ - add_lock ($ui->dn, $ui->dn); - session::set('edit',TRUE); - } - } - - /* save changes to LDAP and disable edit mode */ - $info= ""; - if (isset($_POST['edit_finish'])){ - - /* Perform checks */ - $message= $accountSoFS->check (); - - /* No errors, save object */ - if (count ($message) == 0){ - $accountSoFS->save (); - del_lock ($ui->dn); - session::un_set ('edit'); - - /* Remove from session */ - session::un_set ('accountSoFS'); - } else { - /* Errors found, show message */ - msg_dialog::displayChecks($message); - } - } - - /* Execute formular */ - if($lock_msg){ - $display = $lock_msg; - }else{ - $display.= $accountSoFS->execute (); - } - - /* Store changes in session */ - if (session::is_set('edit')){ - session::set('accountSoFS',$accountSoFS); - } - - /* Show page footer depending on the mode */ - if ($accountSoFS->initially_was_account && empty($lock_msg)){ - - $display.= "

"; - - /* Are we in edit mode? */ - if (session::is_set('edit')){ - $display.= "\n"; - $display.= " "; - $display.= "\n"; - $info= "\"\" ".$ui->dn." "; - } else { - $info= "\"\" ".$ui->dn." "; - - /* Only display edit button if there is at least one attribute editable */ - if(preg_match("/w/",$ui->get_permissions($ui->dn,"uniBonnAccount/accountSoFS"))){ - $info.= "\"\" ". - msgPool::clickEditToChange(); - - $display.= "\n"; - } - $display.= "\n"; - } - $display.= "

\n"; - } - - /* Page header*/ - $display= print_header(get_template_path('plugins/uniBonnSoFS/images/plugin.png'), - _("Disk space"), $info).$display; - -} - -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> -- 2.30.2