summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16ecdba)
raw | patch | inline | side by side (parent: 16ecdba)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Oct 2007 08:30:29 +0000 (08:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Oct 2007 08:30:29 +0000 (08:30 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7594 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_location.inc | patch | blob | history | |
include/class_plugin.inc | patch | blob | history | |
include/class_tabs.inc | patch | blob | history |
index 7b86a797914d0e489df6e922674effac4494ca39..a66561302e42b8ad7990d6692126002ebcc12e59 100644 (file)
"ldifimport" => "plugins/addons/ldapmanager/class_import.inc",
"ldif" => "plugins/addons/ldapmanager/class_ldif.inc",
"ldifexport" => "plugins/addons/ldapmanager/class_export.inc",
+ "bugsubmitter" => "plugins/addons/bugsubmitter/class_bugsubmitter.inc",
"gosa_logview" => "plugins/addons/logview/class_gosa_logview.inc",
"log_tabs" => "plugins/addons/logview/tabs_log.inc",
"logview" => "plugins/addons/logview/class_logview.inc",
- "bugsubmitter" => "plugins/addons/bugsubmitter/class_bugsubmitter.inc",
"acltab" => "plugins/admin/acl/tabs_acl.inc",
"aclroletab" => "plugins/admin/acl/tabs_acl_role.inc",
"aclManagement" => "plugins/admin/acl/class_aclManagement.inc",
"LDAP" => "include/class_ldap.inc",
"log" => "include/class_log.inc",
"dhcpPlugin" => "include/class_dhcpPlugin.inc",
+ "multi_plug" => "include/class_multi_plug.inc",
"Step_Ldap" => "setup/class_setupStep_Ldap.inc",
"Step_Finish" => "setup/class_setupStep_Finish.inc",
"setup_step" => "setup/class_setupStep.inc",
index ccb7e5406d772e97cd0eb290aec7ba1a32215e1e..4d753e7cc9af7aadb84123d5da8b77d83cd21f24 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
/* This variable indicates that this class can handle multiple dns at once. */
var $multiple_support = FALSE;
+ /* This aviable indicates, that we are currently in multiple edit handle */
+ var $multiple_support_active = FALSE;
+
/*! \brief plugin constructor
If 'dn' is set, the node loads the given 'dn' from LDAP
diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index 059e477002fec37f0c6f4dfdc1071a256d95926f..a39c7505b18c04306ebba071906c4252d0655390 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
var $by_object= array();
var $SubDialog = false;
- var $multiple_entries = FALSE;
-
function tabs(&$config, $data, $dn, $acl_category= "")
{
/* Save dn */
$baseobject= NULL;
- /* Check specified dn
- */
- if(is_string($dn)){
-
- }elseif(is_array($dn)&&count($dn) == 1){
- $this->dn = $dn[key($dn)];
- }elseif(is_array($dn)&&count($dn) > 1){
- $this->multiple_entries = TRUE;
- }
-
foreach ($data as &$tab){
-
- /* Check we want to handle multiple obejcts at once
- * and if this is supported by enabled plugins
- */
- $tmp = get_class_vars($tab['CLASS']);
- if($this->multiple_entries && !$tmp['multiple_support']){
- continue;
- }
-
$this->by_name[$tab['CLASS']]= $tab['NAME'];
if ($baseobject === NULL){
$this->current= $tab['CLASS'];
}
}
+ }
- /* Return false if tabs */
- if(!count($this->by_object)){
+
+ function multiple_support_available()
+ {
+ foreach($this->by_object as $name => $obj){
+ if($obj->multiple_support){
+ return(TRUE);
+ }
+ }
+ return(FALSE);
+ }
+
+ function enable_multiple_support()
+ {
+ if(!$this->multiple_support_available()){
return(FALSE);
+ }else{
+ foreach($this->by_object as $name => $obj){
+ if($obj->multiple_support){
+ $this->by_object[$name]->multiple_support_active = TRUE;
+ }else{
+ unset($this->by_object[$name]);
+ unset($this->by_name[$name]);
+ }
+ }
}
+ return(TRUE);
}
+
function execute()
{
/* Rotate current to last */
function save($ignore_account= FALSE)
{
- if($this->multiple_entries){
- foreach ($this->by_object as $key => &$obj){
- @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
- $key, "Saving");
- $obj->save();
- }
- }else{
- /* Save all plugins */
- foreach ($this->by_object as $key => &$obj){
- @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
- $key, "Saving");
+ /* Save all plugins */
+ foreach ($this->by_object as $key => &$obj){
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
+ $key, "Saving");
- $obj->dn= $this->dn;
+ $obj->dn= $this->dn;
- if ($obj->is_account || $ignore_account || $obj->ignore_account){
- if ($obj->save() == 1){
- return (1);
- }
- } else {
- $obj->remove_from_parent();
+ if ($obj->is_account || $ignore_account || $obj->ignore_account){
+ if ($obj->save() == 1){
+ return (1);
}
+ } else {
+ $obj->remove_from_parent();
}
}
return (0);
function addSpecialTabs()
{
- if(!$this->multiple_entries){
- $this->by_name['acl']= _("ACL");
- $this->by_object['acl']= new acl($this->config, $this, $this->dn);
- $this->by_object['acl']->parent= &$this;
- $this->by_name['reference']= _("References");
- $this->by_object['reference']= new reference($this->config, $this->dn);
- $this->by_object['reference']->parent= &$this;
- }
+ $this->by_name['acl']= _("ACL");
+ $this->by_object['acl']= new acl($this->config, $this, $this->dn);
+ $this->by_object['acl']->parent= &$this;
+ $this->by_name['reference']= _("References");
+ $this->by_object['reference']= new reference($this->config, $this->dn);
+ $this->by_object['reference']->parent= &$this;
}