Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
a925e77b
Unverified
Commit
a925e77b
authored
5 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
feat(hooks) Rename hooks to triggers in the interface
issue
#6037
parent
f55e80bf
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
include/class_msgPool.inc
+1
-1
include/class_msgPool.inc
include/simpleplugin/class_simplePlugin.inc
+1
-1
include/simpleplugin/class_simplePlugin.inc
plugins/admin/departments/class_department.inc
+0
-1
plugins/admin/departments/class_department.inc
plugins/config/class_hooksConfig.inc
+12
-12
plugins/config/class_hooksConfig.inc
plugins/config/class_mainPluginsConfig.inc
+1
-1
plugins/config/class_mainPluginsConfig.inc
with
15 additions
and
16 deletions
+15
-16
include/class_msgPool.inc
+
1
−
1
View file @
a925e77b
...
@@ -293,7 +293,7 @@ class msgPool
...
@@ -293,7 +293,7 @@ class msgPool
*/
*/
public
static
function
cmdnotfound
(
$type
,
$plugin
)
public
static
function
cmdnotfound
(
$type
,
$plugin
)
{
{
return
sprintf
(
_
(
"
Command specified as %s
hook
for plugin
'
%s
'
does not exist!
"
),
$type
,
$plugin
);
return
sprintf
(
_
(
'
Command specified as %s
trigger
for plugin
"
%s
"
does not exist!
'
),
$type
,
$plugin
);
}
}
/*!
/*!
...
...
This diff is collapsed.
Click to expand it.
include/simpleplugin/class_simplePlugin.inc
+
1
−
1
View file @
a925e77b
...
@@ -1535,7 +1535,7 @@ class simplePlugin implements SimpleTab
...
@@ -1535,7 +1535,7 @@ class simplePlugin implements SimpleTab
$str
=
implode
(
"
\n
"
,
$arr
);
$str
=
implode
(
"
\n
"
,
$arr
);
@
DEBUG
(
DEBUG_SHELL
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$command
,
"Result: "
.
$str
);
@
DEBUG
(
DEBUG_SHELL
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$command
,
"Result: "
.
$str
);
if
(
!
empty
(
$str
)
&&
$config
->
get_cfg_value
(
"displayHookOutput"
,
"FALSE"
)
==
"TRUE"
)
{
if
(
!
empty
(
$str
)
&&
$config
->
get_cfg_value
(
"displayHookOutput"
,
"FALSE"
)
==
"TRUE"
)
{
msg_dialog
::
display
(
'['
.
get_class
(
$this
)
.
' '
.
strtolower
(
$cmd
)
.
"hook]
$command
"
,
$str
,
INFO_DIALOG
);
msg_dialog
::
display
(
'['
.
get_class
(
$this
)
.
' '
.
strtolower
(
$cmd
)
.
'trigger] '
.
$command
,
$str
,
INFO_DIALOG
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
plugins/admin/departments/class_department.inc
+
0
−
1
View file @
a925e77b
...
@@ -162,7 +162,6 @@ class department extends simplePlugin
...
@@ -162,7 +162,6 @@ class department extends simplePlugin
/* Check values */
/* Check values */
function
check
():
array
function
check
():
array
{
{
/* Call common method to give check the hook */
$message
=
parent
::
check
();
$message
=
parent
::
check
();
$namingAttr
=
static
::
$namingAttr
;
$namingAttr
=
static
::
$namingAttr
;
...
...
This diff is collapsed.
Click to expand it.
plugins/config/class_hooksConfig.inc
+
12
−
12
View file @
a925e77b
...
@@ -24,8 +24,8 @@ class hooksConfig extends simplePlugin
...
@@ -24,8 +24,8 @@ class hooksConfig extends simplePlugin
static
function
plInfo
():
array
static
function
plInfo
():
array
{
{
return
[
return
[
'plShortName'
=>
_
(
'
Hook
s'
),
'plShortName'
=>
_
(
'
Trigger
s'
),
'plTitle'
=>
_
(
'
Hook
s configuration'
),
'plTitle'
=>
_
(
'
Trigger
s configuration'
),
'plPriority'
=>
1
,
'plPriority'
=>
1
,
'plObjectType'
=>
[
'configuration'
],
'plObjectType'
=>
[
'configuration'
],
...
@@ -44,41 +44,41 @@ class hooksConfig extends simplePlugin
...
@@ -44,41 +44,41 @@ class hooksConfig extends simplePlugin
sort
(
$plugins
);
sort
(
$plugins
);
return
[
return
[
'
hook
s'
=>
[
'
trigger
s'
=>
[
'name'
=>
_
(
'
Hook
s'
),
'name'
=>
_
(
'
Trigger
s'
),
'class'
=>
[
'fullwidth'
],
'class'
=>
[
'fullwidth'
],
'attrs'
=>
[
'attrs'
=>
[
new
BooleanAttribute
(
new
BooleanAttribute
(
_
(
'Display
hook
output'
),
_
(
'Display
trigger
output'
),
_
(
'When enabled successful
hook
execution output is displayed to the user using a dialog.'
),
_
(
'When enabled successful
trigger
execution output is displayed to the user using a dialog.'
),
'fdDisplayHookOutput'
'fdDisplayHookOutput'
),
),
new
OrderedArrayAttribute
(
new
OrderedArrayAttribute
(
new
CompositeAttribute
(
new
CompositeAttribute
(
_
(
'
Hook
s that are called when specific actions happens'
),
_
(
'
Trigger
s that are called when specific actions happens'
),
'fdTabHook'
,
'fdTabHook'
,
[
[
new
SelectAttribute
(
new
SelectAttribute
(
_
(
'Tab'
),
_
(
'The tab that this
hook
concerns'
),
_
(
'Tab'
),
_
(
'The tab that this
trigger
concerns'
),
'
hook
Tab'
,
TRUE
,
'
trigger
Tab'
,
TRUE
,
$plugins
$plugins
),
),
new
SelectAttribute
(
new
SelectAttribute
(
_
(
'Mode'
),
_
(
'When to call this command'
),
_
(
'Mode'
),
_
(
'When to call this command'
),
'
hook
Mode'
,
TRUE
,
'
trigger
Mode'
,
TRUE
,
[
'postcreate'
,
'postremove'
,
'postmodify'
,
[
'postcreate'
,
'postremove'
,
'postmodify'
,
'precreate'
,
'preremove'
,
'premodify'
,
'check'
,
'precreate'
,
'preremove'
,
'premodify'
,
'check'
,
'prelock'
,
'postlock'
,
'preunlock'
,
'postunlock'
]
'prelock'
,
'postlock'
,
'preunlock'
,
'postunlock'
]
),
),
new
TextAreaAttribute
(
new
TextAreaAttribute
(
_
(
'Command'
),
_
(
'The command that will be called'
),
_
(
'Command'
),
_
(
'The command that will be called'
),
'
hook
Cmd'
,
TRUE
'
trigger
Cmd'
,
TRUE
)
)
],
],
'/^([^\\|]+)\\|([^\\|]+)\\|(.*)$/'
,
'/^([^\\|]+)\\|([^\\|]+)\\|(.*)$/'
,
'%s|%s|%s'
,
'%s|%s|%s'
,
''
,
// acl
''
,
// acl
_
(
'
Hook
s'
)
_
(
'
Trigger
s'
)
),
),
FALSE
,
// non-ordered
FALSE
,
// non-ordered
[],
[],
...
...
This diff is collapsed.
Click to expand it.
plugins/config/class_mainPluginsConfig.inc
+
1
−
1
View file @
a925e77b
...
@@ -51,7 +51,7 @@ class mainPluginsConfig extends simplePlugin
...
@@ -51,7 +51,7 @@ class mainPluginsConfig extends simplePlugin
'name'
=>
_
(
'SASL'
),
'name'
=>
_
(
'SASL'
),
'attrs'
=>
[
'attrs'
=>
[
new
BooleanAttribute
(
new
BooleanAttribute
(
_
(
'Force to ask for password'
),
_
(
'Useful if you add a
hook
using password value when SASL user passwords are edited'
),
_
(
'Force to ask for password'
),
_
(
'Useful if you add a
trigger
using password value when SASL user passwords are edited'
),
'fdForceSaslPasswordAsk'
,
TRUE
,
'fdForceSaslPasswordAsk'
,
TRUE
,
FALSE
FALSE
),
),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets