Commit 451821ab authored by Dries's avatar Dries

- Patch #10110 by JonBob: code improvement: looks like we have an artifact from before clean URLs in node.module. This patch removes the global variable $mod, which is no longer set and not necessary here anyway.
parent 50cd3048
......@@ -7,8 +7,6 @@
* Implementation of hook_help().
*/
function node_help($section) {
global $mod;
switch ($section) {
case 'admin/help#node':
$output = t("
......@@ -33,12 +31,11 @@ function node_help($section) {
<dt>Published</dt><dd>When using Drupal's moderation system a node remains unpublished -- unavailable to non-moderators -- until it is marked Published.</dd></dl>
<p>Now that you know what is in a node, here are some of the types of nodes available.</p>", array("%teaser" => url("admin/node/configure/settings")));
if ($mod == 'admin') {
foreach (node_list() as $type) {
$output .= '<h3>'. t('Node type: %module', array('%module' => node_invoke($type, 'node_name'))). '</h3>';
$output .= implode("\n", module_invoke_all('help', 'node/add#'. $type));
}
foreach (node_list() as $type) {
$output .= '<h3>'. t('Node type: %module', array('%module' => node_invoke($type, 'node_name'))). '</h3>';
$output .= implode("\n", module_invoke_all('help', 'node/add#'. $type));
}
return $output;
case 'admin/modules#description':
......
......@@ -7,8 +7,6 @@
* Implementation of hook_help().
*/
function node_help($section) {
global $mod;
switch ($section) {
case 'admin/help#node':
$output = t("
......@@ -33,12 +31,11 @@ function node_help($section) {
<dt>Published</dt><dd>When using Drupal's moderation system a node remains unpublished -- unavailable to non-moderators -- until it is marked Published.</dd></dl>
<p>Now that you know what is in a node, here are some of the types of nodes available.</p>", array("%teaser" => url("admin/node/configure/settings")));
if ($mod == 'admin') {
foreach (node_list() as $type) {
$output .= '<h3>'. t('Node type: %module', array('%module' => node_invoke($type, 'node_name'))). '</h3>';
$output .= implode("\n", module_invoke_all('help', 'node/add#'. $type));
}
foreach (node_list() as $type) {
$output .= '<h3>'. t('Node type: %module', array('%module' => node_invoke($type, 'node_name'))). '</h3>';
$output .= implode("\n", module_invoke_all('help', 'node/add#'. $type));
}
return $output;
case 'admin/modules#description':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment