Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
7a1aca77
Commit
7a1aca77
authored
Oct 28, 2015
by
Côme Chilliet
Browse files
Fixes #4261 Fixed premodify hook system
parent
f58fed73
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/class_management.inc
View file @
7a1aca77
...
...
@@ -661,7 +661,6 @@ class management
// Check locking & lock entry if required
$this
->
displayApplyBtn
=
FALSE
;
$this
->
dn
=
"new"
;
$this
->
is_new
=
TRUE
;
$this
->
is_single_edit
=
FALSE
;
set_object_info
(
$this
->
dn
);
...
...
@@ -736,7 +735,6 @@ class management
// Single edit - we only got one object dn.
if
(
count
(
$target
)
==
1
)
{
$this
->
is_new
=
FALSE
;
$this
->
is_single_edit
=
TRUE
;
// Get the dn of the object and creates lock
...
...
include/class_plugin.inc
View file @
7a1aca77
...
...
@@ -104,7 +104,6 @@ class plugin
/* attribute list for save action */
var
$attributes
=
array
();
var
$objectclasses
=
array
();
var
$is_new
=
TRUE
;
var
$saved_attributes
=
array
();
var
$acl_base
=
""
;
...
...
@@ -470,7 +469,7 @@ class plugin
unset
(
$oc
[
'count'
]);
}
}
$
this
->
is_new
=
!
empty
(
$oc
);
$is_new
=
empty
(
$oc
);
/* Load (minimum) attributes, add missing ones */
$this
->
attrs
[
'objectClass'
]
=
array_merge_unique
(
$oc
,
$this
->
objectclasses
);
...
...
@@ -479,15 +478,15 @@ class plugin
foreach
(
$this
->
attributes
as
$val
)
{
if
(
$this
->
$val
!=
""
)
{
$this
->
attrs
[
"
$val
"
]
=
$this
->
$val
;
}
elseif
(
!
$
this
->
is_new
)
{
}
elseif
(
!
$is_new
)
{
$this
->
attrs
[
"
$val
"
]
=
array
();
}
}
if
(
$this
->
is_new
)
{
$this
->
handle_pre_events
(
'add'
);
}
else
{
if
(
$this
->
initially_was_account
)
{
$this
->
handle_pre_events
(
'modify'
);
}
else
{
$this
->
handle_pre_events
(
'add'
);
}
}
...
...
include/simpleplugin/class_simpleManagement.inc
View file @
7a1aca77
...
...
@@ -433,7 +433,6 @@ class simpleManagement extends management
$this
->
displayApplyBtn
=
FALSE
;
$this
->
dn
=
'new'
;
$this
->
is_new
=
TRUE
;
$this
->
is_single_edit
=
FALSE
;
set_object_info
(
$this
->
dn
);
...
...
@@ -584,7 +583,6 @@ class simpleManagement extends management
$type
=
preg_replace
(
'/^template_/'
,
''
,
$type
);
}
$this
->
is_new
=
FALSE
;
$this
->
is_single_edit
=
TRUE
;
// Get the dn of the object and creates lock
...
...
include/simpleplugin/class_simplePlugin.inc
View file @
7a1aca77
...
...
@@ -666,11 +666,11 @@ class simplePlugin extends plugin
{
/* Propagate and log the event */
if
(
$this
->
initially_was_account
)
{
$this
->
handle_post_events
(
"
modify
"
);
new
log
(
"
modify
"
,
"
plugin/
"
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$this
->
ldap_error
);
$this
->
handle_post_events
(
'
modify
'
);
new
log
(
'
modify
'
,
'
plugin/
'
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$this
->
ldap_error
);
}
else
{
$this
->
handle_post_events
(
"
add
"
);
new
log
(
"
create
"
,
"
plugin/
"
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$this
->
ldap_error
);
$this
->
handle_post_events
(
'
add
'
);
new
log
(
'
create
'
,
'
plugin/
'
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$this
->
ldap_error
);
}
}
...
...
include/simpleplugin/class_simpleTabs.inc
View file @
7a1aca77
...
...
@@ -33,7 +33,6 @@ class simpleTabs
var
$config
;
var
$acl
;
var
$is_template
;
var
$is_new
=
FALSE
;
public
$objectType
=
FALSE
;
protected
$specialTabs
=
TRUE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment