Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rules-3349546
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
rules-3349546
Commits
89fe792b
Commit
89fe792b
authored
16 years ago
by
fago
Browse files
Options
Downloads
Patches
Plain Diff
added previously missing upgrade support for the workflow-ng custom php code condition and action
parent
92b22541
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rules/modules/php.rules_forms.inc
+17
-0
17 additions, 0 deletions
rules/modules/php.rules_forms.inc
with
17 additions
and
0 deletions
rules/modules/php.rules_forms.inc
+
17
−
0
View file @
89fe792b
...
...
@@ -99,3 +99,20 @@ function rules_condition_custom_php_submit(&$settings, $form, $form_state) {
$variables
=
$form_state
[
'proxy'
]
->
get_available_variables
(
$form_state
[
'element'
][
'#id'
]);
$settings
[
'vars'
]
=
rules_input_evaluator_php_prepare
(
'<?'
.
$settings
[
'code'
],
$variables
);
}
/**
* The following functions help converting the workflow-ng php condition/actions
* when upgrading from workflow-ng
*/
function
workflow_ng_action_custom_php_upgrade
(
&
$element
)
{
$element
[
'#name'
]
=
'rules_action_custom_php'
;
$old_settings
=
$element
[
'#settings'
];
$element
[
'#settings'
]
=
array
(
'code'
=>
$old_settings
[
'php'
]);
$element
[
'#settings'
][
'code_args'
]
=
$old_settings
[
'used_arguments'
];
$element
[
'#settings'
][
'vars'
]
=
$old_settings
[
'used_php_arguments'
];
}
function
workflow_ng_condition_custom_php_upgrade
(
&
$element
)
{
workflow_ng_action_custom_php_upgrade
(
$element
);
$element
[
'#name'
]
=
'rules_condition_custom_php'
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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