summaryrefslogtreecommitdiff
path: root/modules/trigger
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-20 18:51:36 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-20 18:51:36 +0000
commitd24d954479320116bc01f332c28a8eaab28c3ccd (patch)
tree1c791703bde5429b500e91cabb5845a80e13aff3 /modules/trigger
parent999d76e7aa9d9fb1b79b0be171e18e705d9ab7ff (diff)
downloadbrdo-d24d954479320116bc01f332c28a8eaab28c3ccd.tar.gz
brdo-d24d954479320116bc01f332c28a8eaab28c3ccd.tar.bz2
- Patch #521474 by bangpound, JuliaKM et al: rename admin/site-building to admin/structure.
Diffstat (limited to 'modules/trigger')
-rw-r--r--modules/trigger/trigger.admin.inc12
-rw-r--r--modules/trigger/trigger.module26
-rw-r--r--modules/trigger/trigger.test14
3 files changed, 26 insertions, 26 deletions
diff --git a/modules/trigger/trigger.admin.inc b/modules/trigger/trigger.admin.inc
index 5bfea18ee..22f26a704 100644
--- a/modules/trigger/trigger.admin.inc
+++ b/modules/trigger/trigger.admin.inc
@@ -18,7 +18,7 @@ function trigger_assign($type = NULL) {
// If no type is specified we default to node actions, since they
// are the most common.
if (!isset($type)) {
- drupal_goto('admin/build/trigger/node');
+ drupal_goto('admin/structure/trigger/node');
}
$build = array();
@@ -46,7 +46,7 @@ function trigger_assign($type = NULL) {
*/
function trigger_unassign($form_state, $hook = NULL, $op = NULL, $aid = NULL) {
if (!($hook && $op && $aid)) {
- drupal_goto('admin/build/trigger/assign');
+ drupal_goto('admin/structure/trigger/assign');
}
$form['hook'] = array(
@@ -65,7 +65,7 @@ function trigger_unassign($form_state, $hook = NULL, $op = NULL, $aid = NULL) {
$action = actions_function_lookup($aid);
$actions = actions_get_all_actions();
- $destination = 'admin/build/trigger/' . ($hook == 'node' ? 'node' : $hook);
+ $destination = 'admin/structure/trigger/' . ($hook == 'node' ? 'node' : $hook);
return confirm_form($form,
t('Are you sure you want to unassign the action %title?', array('%title' => $actions[$action]['description'])),
@@ -88,10 +88,10 @@ function trigger_unassign_submit($form, &$form_state) {
watchdog('actions', 'Action %action has been unassigned.', array('%action' => check_plain($actions[$aid]['description'])));
drupal_set_message(t('Action %action has been unassigned.', array('%action' => $actions[$aid]['description'])));
$hook = $form_values['hook'] == 'node' ? 'node' : $form_values['hook'];
- $form_state['redirect'] = 'admin/build/trigger/' . $hook;
+ $form_state['redirect'] = 'admin/structure/trigger/' . $hook;
}
else {
- drupal_goto('admin/build/trigger');
+ drupal_goto('admin/structure/trigger');
}
}
@@ -152,7 +152,7 @@ function trigger_assign_form($form_state, $hook, $op, $description) {
foreach ($actions as $aid => $description) {
$form[$op]['assigned']['#value'][$aid] = array(
'description' => $description,
- 'link' => l(t('unassign'), "admin/build/trigger/unassign/$hook/$op/" . md5($aid))
+ 'link' => l(t('unassign'), "admin/structure/trigger/unassign/$hook/$op/" . md5($aid))
);
}
diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module
index 19493066b..61c7c6d03 100644
--- a/modules/trigger/trigger.module
+++ b/modules/trigger/trigger.module
@@ -13,15 +13,15 @@
function trigger_help($path, $arg) {
$explanation = '<p>' . t('Triggers are system events, such as when new content is added or when a user logs in. Trigger module combines these triggers with actions (functional tasks), such as unpublishing content or e-mailing an administrator. The <a href="@url">Actions settings page</a> contains a list of existing actions and provides the ability to create and configure additional actions.', array('@url' => url('admin/settings/actions'))) . '</p>';
switch ($path) {
- case 'admin/build/trigger/comment':
+ case 'admin/structure/trigger/comment':
return $explanation . '<p>' . t('Below you can assign actions to run when certain comment-related triggers happen. For example, you could promote a post to the front page when a comment is added.') . '</p>';
- case 'admin/build/trigger/node':
+ case 'admin/structure/trigger/node':
return $explanation . '<p>' . t('Below you can assign actions to run when certain content-related triggers happen. For example, you could send an e-mail to an administrator when a post is created or updated.') . '</p>';
- case 'admin/build/trigger/cron':
+ case 'admin/structure/trigger/cron':
return $explanation . '<p>' . t('Below you can assign actions to run during each pass of a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status'))) . '</p>';
- case 'admin/build/trigger/taxonomy':
+ case 'admin/structure/trigger/taxonomy':
return $explanation . '<p>' . t('Below you can assign actions to run when certain taxonomy-related triggers happen. For example, you could send an e-mail to an administrator when a term is deleted.') . '</p>';
- case 'admin/build/trigger/user':
+ case 'admin/structure/trigger/user':
return $explanation . '<p>' . t("Below you can assign actions to run when certain user-related triggers happen. For example, you could send an e-mail to an administrator when a user account is deleted.") . '</p>';
case 'admin/help#trigger':
$output = '<p>' . t('The Trigger module provides the ability to trigger <a href="@actions">actions</a> upon system events, such as when new content is added or when a user logs in.', array('@actions' => url('admin/settings/actions'))) . '</p>';
@@ -35,7 +35,7 @@ function trigger_help($path, $arg) {
* Implement hook_menu().
*/
function trigger_menu() {
- $items['admin/build/trigger'] = array(
+ $items['admin/structure/trigger'] = array(
'title' => 'Triggers',
'description' => 'Tell Drupal when to execute actions.',
'page callback' => 'trigger_assign',
@@ -44,7 +44,7 @@ function trigger_menu() {
);
// We don't use a menu wildcard here because these are tabs,
// not invisible items.
- $items['admin/build/trigger/node'] = array(
+ $items['admin/structure/trigger/node'] = array(
'title' => 'Content',
'page callback' => 'trigger_assign',
'page arguments' => array('node'),
@@ -52,7 +52,7 @@ function trigger_menu() {
'access arguments' => array('node'),
'type' => MENU_LOCAL_TASK,
);
- $items['admin/build/trigger/user'] = array(
+ $items['admin/structure/trigger/user'] = array(
'title' => 'Users',
'page callback' => 'trigger_assign',
'page arguments' => array('user'),
@@ -60,7 +60,7 @@ function trigger_menu() {
'access arguments' => array('user'),
'type' => MENU_LOCAL_TASK,
);
- $items['admin/build/trigger/comment'] = array(
+ $items['admin/structure/trigger/comment'] = array(
'title' => 'Comments',
'page callback' => 'trigger_assign',
'page arguments' => array('comment'),
@@ -68,7 +68,7 @@ function trigger_menu() {
'access arguments' => array('comment'),
'type' => MENU_LOCAL_TASK,
);
- $items['admin/build/trigger/taxonomy'] = array(
+ $items['admin/structure/trigger/taxonomy'] = array(
'title' => 'Taxonomy',
'page callback' => 'trigger_assign',
'page arguments' => array('taxonomy'),
@@ -76,7 +76,7 @@ function trigger_menu() {
'access arguments' => array('taxonomy'),
'type' => MENU_LOCAL_TASK,
);
- $items['admin/build/trigger/cron'] = array(
+ $items['admin/structure/trigger/cron'] = array(
'title' => 'Cron',
'page callback' => 'trigger_assign',
'page arguments' => array('cron'),
@@ -98,7 +98,7 @@ function trigger_menu() {
->fetchField();
$info = unserialize($info);
$nice_name = $info['name'];
- $items["admin/build/trigger/$module"] = array(
+ $items["admin/structure/trigger/$module"] = array(
'title' => $nice_name,
'page callback' => 'trigger_assign',
'page arguments' => array($module),
@@ -106,7 +106,7 @@ function trigger_menu() {
'type' => MENU_LOCAL_TASK,
);
}
- $items['admin/build/trigger/unassign'] = array(
+ $items['admin/structure/trigger/unassign'] = array(
'title' => 'Unassign',
'description' => 'Unassign an action from a trigger.',
'page callback' => 'drupal_get_form',
diff --git a/modules/trigger/trigger.test b/modules/trigger/trigger.test
index a22ea04ab..5c1691b32 100644
--- a/modules/trigger/trigger.test
+++ b/modules/trigger/trigger.test
@@ -32,7 +32,7 @@ class TriggerContentTestCase extends DrupalWebTestCase {
$test_user = $this->drupalCreateUser(array('administer actions'));
$this->drupalLogin($test_user);
$edit = array('aid' => $hash);
- $this->drupalPost('admin/build/trigger/node', $edit, t('Assign'));
+ $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
// Create an unpublished node.
$web_user = $this->drupalCreateUser(array('create page content', 'access content', 'administer nodes'));
$this->drupalLogin($web_user);
@@ -52,13 +52,13 @@ class TriggerContentTestCase extends DrupalWebTestCase {
$test_user = $this->drupalCreateUser(array('administer actions'));
$this->drupalLogin($test_user);
$edit = array('aid' => $hash);
- $this->drupalPost('admin/build/trigger/node', $edit, t('Assign'));
+ $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
$edit = array('aid' => $hash);
- $this->drupalPost('admin/build/trigger/node', $edit, t('Assign'));
+ $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
$this->assertRaw(t('The action you chose is already assigned to that trigger.'), t('Check to make sure an error occurs when assigning an action to a trigger twice.'));
// Test 3: The action should be able to be unassigned from a trigger.
- $this->drupalPost('admin/build/trigger/unassign/node/presave/' . $hash, array(), t('Unassign'));
+ $this->drupalPost('admin/structure/trigger/unassign/node/presave/' . $hash, array(), t('Unassign'));
$this->assertRaw(t('Action %action has been unassigned.', array('%action' => ucfirst($info['name']))), t('Check to make sure the @action action can be unassigned from the trigger.', array('@action' => $info['name'])));
$assigned = db_result(db_query("SELECT COUNT(*) FROM {trigger_assignments} WHERE aid IN ('" . implode("','", $content_actions) . "')"));
$this->assertFalse($assigned, t('Check to make sure unassign worked properly at the database level.'));
@@ -140,7 +140,7 @@ class TriggerCronTestCase extends DrupalWebTestCase {
// Assign a non-configurable action to the cron run trigger.
$edit = array('aid' => md5('trigger_test_system_cron_action'));
- $this->drupalPost('admin/build/trigger/cron', $edit, t('Assign'));
+ $this->drupalPost('admin/structure/trigger/cron', $edit, t('Assign'));
// Assign a configurable action to the cron trigger.
$hash = md5('trigger_test_system_cron_conf_action');
@@ -151,7 +151,7 @@ class TriggerCronTestCase extends DrupalWebTestCase {
);
$this->drupalPost('admin/settings/actions/configure/' . $hash, $edit, t('Save'));
$edit = array('aid' => md5('1'));
- $this->drupalPost('admin/build/trigger/cron', $edit, t('Assign'));
+ $this->drupalPost('admin/structure/trigger/cron', $edit, t('Assign'));
// Add a second configurable action to the cron trigger.
$action_description = $this->randomName();
@@ -161,7 +161,7 @@ class TriggerCronTestCase extends DrupalWebTestCase {
);
$this->drupalPost('admin/settings/actions/configure/' . $hash, $edit, t('Save'));
$edit = array('aid' => md5('2'));
- $this->drupalPost('admin/build/trigger/cron', $edit, t('Assign'));
+ $this->drupalPost('admin/structure/trigger/cron', $edit, t('Assign'));
// Force a cron run.
drupal_cron_run();