Skip to content
Snippets Groups Projects
Commit 5151a96f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #13828 by Moshe: tidied up the story module.

- Updated the help text a bit.
parent 6a95a002
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -26,7 +26,7 @@ function story_help($section) { ...@@ -26,7 +26,7 @@ function story_help($section) {
case 'node/add/story': case 'node/add/story':
return variable_get('story_help', ''); return variable_get('story_help', '');
case 'node/add#story': case 'node/add#story':
return t("A story is similar to a newspaper article. If stories are moderated, the post will be submitted to the attention of other users and be queued in the submission queue. Users and moderators vote on the posts they like or dislike, promoting or demoting them. When a post gets above a certain threshold it automatically gets promoted to the front page."); return t('A story is similar to an article and usually gets promoted to the front page after approval or moderation.');
} }
} }
...@@ -71,22 +71,6 @@ function story_access($op, $node) { ...@@ -71,22 +71,6 @@ function story_access($op, $node) {
} }
} }
/**
* Implementation of hook_link().
*/
function story_link($type, $node = 0, $main) {
$links = array();
if ($type == 'node' && $node->type == 'story') {
// Don't display a redundant edit link if they are node administrators.
if (story_access('update', $node) && !user_access('administer nodes')) {
$links[] = l(t('edit this story'), "node/$node->nid/edit");
}
}
return $links;
}
/** /**
* Implementation of hook_menu(). * Implementation of hook_menu().
*/ */
...@@ -95,7 +79,7 @@ function story_menu($may_cache) { ...@@ -95,7 +79,7 @@ function story_menu($may_cache) {
if ($may_cache) { if ($may_cache) {
$items[] = array('path' => 'node/add/story', 'title' => t('story'), $items[] = array('path' => 'node/add/story', 'title' => t('story'),
'access' => story_access('create', NULL)); 'access' => user_access('create stories'));
} }
return $items; return $items;
......
...@@ -26,7 +26,7 @@ function story_help($section) { ...@@ -26,7 +26,7 @@ function story_help($section) {
case 'node/add/story': case 'node/add/story':
return variable_get('story_help', ''); return variable_get('story_help', '');
case 'node/add#story': case 'node/add#story':
return t("A story is similar to a newspaper article. If stories are moderated, the post will be submitted to the attention of other users and be queued in the submission queue. Users and moderators vote on the posts they like or dislike, promoting or demoting them. When a post gets above a certain threshold it automatically gets promoted to the front page."); return t('A story is similar to an article and usually gets promoted to the front page after approval or moderation.');
} }
} }
...@@ -71,22 +71,6 @@ function story_access($op, $node) { ...@@ -71,22 +71,6 @@ function story_access($op, $node) {
} }
} }
/**
* Implementation of hook_link().
*/
function story_link($type, $node = 0, $main) {
$links = array();
if ($type == 'node' && $node->type == 'story') {
// Don't display a redundant edit link if they are node administrators.
if (story_access('update', $node) && !user_access('administer nodes')) {
$links[] = l(t('edit this story'), "node/$node->nid/edit");
}
}
return $links;
}
/** /**
* Implementation of hook_menu(). * Implementation of hook_menu().
*/ */
...@@ -95,7 +79,7 @@ function story_menu($may_cache) { ...@@ -95,7 +79,7 @@ function story_menu($may_cache) {
if ($may_cache) { if ($may_cache) {
$items[] = array('path' => 'node/add/story', 'title' => t('story'), $items[] = array('path' => 'node/add/story', 'title' => t('story'),
'access' => story_access('create', NULL)); 'access' => user_access('create stories'));
} }
return $items; return $items;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment