Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ctools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
ctools
Commits
9fbd59d7
Commit
9fbd59d7
authored
15 years ago
by
Earl Miles
Browse files
Options
Downloads
Patches
Plain Diff
Fix invalid context ID creation.
parent
a9c6812e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
delegator/plugins/tasks/page.inc
+6
-3
6 additions, 3 deletions
delegator/plugins/tasks/page.inc
includes/context.inc
+4
-2
4 additions, 2 deletions
includes/context.inc
with
10 additions
and
5 deletions
delegator/plugins/tasks/page.inc
+
6
−
3
View file @
9fbd59d7
...
...
@@ -56,7 +56,11 @@ function delegator_page_delegator_tasks() {
// 'page callback' => 'delegator_page_execute',
// context only items
'handler type'
=>
'context'
,
'get arguments'
=>
'delegator_page_get_arguments'
,
'get arguments'
=>
array
(
'file'
=>
'page.admin.inc'
,
'path'
=>
drupal_get_path
(
'module'
,
'delegator'
)
.
'/plugins/tasks'
,
'function'
=>
'delegator_page_get_arguments'
,
),
'get context placeholders'
=>
'delegator_page_get_contexts'
,
'access restrictions'
=>
'delegator_page_access_restrictions'
,
'uses handlers'
=>
TRUE
,
...
...
@@ -333,13 +337,12 @@ function delegator_page_execute($subtask_id) {
* Return a list of arguments used by this task.
*/
function
delegator_page_get_arguments
(
$task
,
$subtask_id
)
{
$page
=
delegator_page_
load
(
$subtask_id
);
$page
=
delegator_page_
get_page_cache
(
$subtask_id
);
return
_delegator_page_get_arguments
(
$page
);
}
function
_delegator_page_get_arguments
(
$page
)
{
$arguments
=
array
();
if
(
!
empty
(
$page
->
arguments
))
{
foreach
(
$page
->
arguments
as
$keyword
=>
$argument
)
{
if
(
isset
(
$argument
[
'name'
]))
{
...
...
This diff is collapsed.
Click to expand it.
includes/context.inc
+
4
−
2
View file @
9fbd59d7
...
...
@@ -619,9 +619,10 @@ function ctools_context_id($context, $type = 'context') {
* The name being used.
*/
function
ctools_context_next_id
(
$objects
,
$name
)
{
$id
=
0
;
// Figure out which instance of this argument we're creating
if
(
!
$objects
)
{
return
$id
;
return
$id
+
1
;
}
foreach
(
$objects
as
$object
)
{
...
...
@@ -631,7 +632,8 @@ function ctools_context_next_id($objects, $name) {
}
}
}
return
$id
;
return
$id
+
1
;
}
...
...
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