summaryrefslogtreecommitdiff
path: root/modules/trigger
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-10-24 11:56:33 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-10-24 11:56:33 +0000
commitc1445ac3c2fa5e1ba166f296d7af6487589b520b (patch)
tree34ed42cd72605ba6b91e7b7da9d10e46be956514 /modules/trigger
parent7e963c13ff54ebef2ebc90cdecb18c5f1480f339 (diff)
downloadbrdo-c1445ac3c2fa5e1ba166f296d7af6487589b520b.tar.gz
brdo-c1445ac3c2fa5e1ba166f296d7af6487589b520b.tar.bz2
#184722 by hazexp: only return a value from trigger_help() if there was a page which the function provides any help for
Diffstat (limited to 'modules/trigger')
-rw-r--r--modules/trigger/trigger.module22
1 files changed, 7 insertions, 15 deletions
diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module
index 8140e442a..c7be7bb01 100644
--- a/modules/trigger/trigger.module
+++ b/modules/trigger/trigger.module
@@ -11,32 +11,24 @@
* Implementation of hook_help().
*/
function trigger_help($path, $arg) {
- $output = '';
$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':
- $output .= $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>';
- break;
+ 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':
- $output .= $explanation .'<p>'. t('Below you can assign actions to run when certain content-related triggers happen. For example, you could remove a post from the front page when the post is updated.') .'</p>';
- break;
+ return $explanation .'<p>'. t('Below you can assign actions to run when certain content-related triggers happen. For example, you could remove a post from the front page when the post is updated.') .'</p>';
case 'admin/build/trigger/cron':
- $output .= $explanation .'<p>'. t('Below you can assign actions to run when cron runs. More information on cron is available in the <a href="@system">System module help page</a>.', array('@system' => url('admin/help/system'))) .'</p>';
- break;
+ return $explanation .'<p>'. t('Below you can assign actions to run when cron runs. More information on cron is available in the <a href="@system">System module help page</a>.', array('@system' => url('admin/help/system'))) .'</p>';
case 'admin/build/trigger/taxonomy':
- $output .= $explanation .'<p>'. t('Below you can assign actions to run when certain category-related triggers happen. For example, you could send an e-mail to an administrator when a category is deleted.') .'</p>';
- break;
+ return $explanation .'<p>'. t('Below you can assign actions to run when certain category-related triggers happen. For example, you could send an e-mail to an administrator when a category is deleted.') .'</p>';
case 'admin/build/trigger/user':
- $output .= $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>';
- break;
+ 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>';
+ $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>';
$output .= '<p>'. t('The combination of actions and triggers can perform many useful tasks, such as e-mailing an administrator if a user account is deleted, or automatically unpublishing comments that contain certain words. By default, there are five "contexts" of events (Categories, Comments, Content, Cron, and Users), but more may be added by additional modules.') .'</p>';
$output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@trigger">Trigger</a> page.', array('@trigger' => 'http://drupal.org/handbook/modules/trigger/')) .'</p>';
- break;
+ return $output;
}
-
- return $output;
}
/**