Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
224
Merge Requests
224
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
45c60ea0
Commit
45c60ea0
authored
Apr 03, 2013
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1939024
follow-up by tim.plunkett: Small clean-ups to code.
parent
eebd0637
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
20 deletions
+6
-20
core/modules/action/action.admin.inc
core/modules/action/action.admin.inc
+3
-3
core/modules/action/action.module
core/modules/action/action.module
+0
-7
core/modules/action/action.routing.yml
core/modules/action/action.routing.yml
+0
-7
core/modules/action/lib/Drupal/action/Tests/ConfigurationTest.php
...ules/action/lib/Drupal/action/Tests/ConfigurationTest.php
+3
-3
No files found.
core/modules/action/action.admin.inc
View file @
45c60ea0
...
...
@@ -121,7 +121,7 @@ function action_admin_configure_submit($form, &$form_state) {
action_save
(
$function
,
$form_state
[
'values'
][
'action_type'
],
$params
,
$form_state
[
'values'
][
'action_label'
],
$aid
);
drupal_set_message
(
t
(
'The action has been successfully saved.'
));
$form_state
[
'redirect'
]
=
'admin/config/system/actions
/manage
'
;
$form_state
[
'redirect'
]
=
'admin/config/system/actions'
;
}
/**
...
...
@@ -137,7 +137,7 @@ function action_admin_delete_form($form, &$form_state, $action) {
);
return
confirm_form
(
$form
,
t
(
'Are you sure you want to delete the action %action?'
,
array
(
'%action'
=>
$action
->
label
)),
'admin/config/system/actions
/manage
'
,
'admin/config/system/actions'
,
t
(
'This cannot be undone.'
),
t
(
'Delete'
),
t
(
'Cancel'
)
...
...
@@ -153,7 +153,7 @@ function action_admin_delete_form_submit($form, &$form_state) {
action_delete
(
$aid
);
watchdog
(
'user'
,
'Deleted action %aid (%action)'
,
array
(
'%aid'
=>
$aid
,
'%action'
=>
$action
->
label
));
drupal_set_message
(
t
(
'Action %action was deleted'
,
array
(
'%action'
=>
$action
->
label
)));
$form_state
[
'redirect'
]
=
'admin/config/system/actions
/manage
'
;
$form_state
[
'redirect'
]
=
'admin/config/system/actions'
;
}
/**
...
...
core/modules/action/action.module
View file @
45c60ea0
...
...
@@ -66,7 +66,6 @@ function action_menu() {
'title'
=>
'Manage actions'
,
'description'
=>
'Manage the actions defined for your site.'
,
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
'route_name'
=>
'action_admin_manage'
,
);
$items
[
'admin/config/system/actions/configure'
]
=
array
(
'title'
=>
'Configure an advanced action'
,
...
...
@@ -84,12 +83,6 @@ function action_menu() {
'access arguments'
=>
array
(
'administer actions'
),
'file'
=>
'action.admin.inc'
,
);
$items
[
'admin/config/system/actions/orphan'
]
=
array
(
'title'
=>
'Remove orphans'
,
'description'
=>
'Remove actions that are in the database but not supported by any enabled module.'
,
'route_name'
=>
'action_admin_orphans_remove'
,
'type'
=>
MENU_CALLBACK
,
);
return
$items
;
}
...
...
core/modules/action/action.routing.yml
View file @
45c60ea0
...
...
@@ -5,13 +5,6 @@ action_admin:
requirements
:
_permission
:
'
administer
actions'
action_admin_manage
:
pattern
:
'
/admin/config/system/actions/manage'
defaults
:
_content
:
'
\Drupal\action\Controller\ActionController::adminManage'
requirements
:
_permission
:
'
administer
actions'
action_admin_orphans_remove
:
pattern
:
'
/admin/config/system/actions/orphan'
defaults
:
...
...
core/modules/action/lib/Drupal/action/Tests/ConfigurationTest.php
View file @
45c60ea0
...
...
@@ -37,10 +37,10 @@ function testActionConfiguration() {
$user
=
$this
->
drupalCreateUser
(
array
(
'administer actions'
));
$this
->
drupalLogin
(
$user
);
// Make a POST request to admin/config/system/actions
/manage
.
// Make a POST request to admin/config/system/actions.
$edit
=
array
();
$edit
[
'action'
]
=
drupal_hash_base64
(
'action_goto_action'
);
$this
->
drupalPost
(
'admin/config/system/actions
/manage
'
,
$edit
,
t
(
'Create'
));
$this
->
drupalPost
(
'admin/config/system/actions'
,
$edit
,
t
(
'Create'
));
// Make a POST request to the individual action configuration page.
$edit
=
array
();
...
...
@@ -75,7 +75,7 @@ function testActionConfiguration() {
// Make sure that the action was actually deleted.
$this
->
assertRaw
(
t
(
'Action %action was deleted'
,
array
(
'%action'
=>
$new_action_label
)),
'Make sure that we get a delete confirmation message.'
);
$this
->
drupalGet
(
'admin/config/system/actions
/manage
'
);
$this
->
drupalGet
(
'admin/config/system/actions'
);
$this
->
assertNoText
(
$new_action_label
,
"Make sure the action label does not appear on the overview page after we've deleted the action."
);
$exists
=
db_query
(
'SELECT aid FROM {actions} WHERE callback = :callback'
,
array
(
':callback'
=>
'drupal_goto_action'
))
->
fetchField
();
$this
->
assertFalse
(
$exists
,
'Make sure the action is gone from the database after being deleted.'
);
...
...
Write
Preview
Markdown
is supported
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