Closed (fixed)
Project:
Drupal core
Version:
7.0-beta2
Component:
system.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2010 at 21:32 UTC
Updated:
10 Dec 2010 at 11:00 UTC
If the current user is not user 1, the help text on http://www.example.com/#overlay=admin/config/development/maintenance says "There are two types of actions: simple and advanced..." (see "Maintenance.png").
This is the help text of the http://www.example.com/#overlay=admin/config/system/actions page.
It's the result of a missing break in the switch statement of system_help function (system.module) :
// ...
case 'admin/config/development/maintenance':
global $user;
if ($user->uid == 1) {
return '<p>' . t('If you are upgrading to a newer version...')) . '</p>';
}
// missing "break;" here
case 'admin/config/system/actions':
case 'admin/config/system/actions/manage':
$output = '';
$output .= '<p>' . t('There are two types of actions: simple and advanced....') . '</p>';
if (module_exists('trigger')) {
$output .= '<p>' . t('You may proceed to the <a href="@url">Triggers</a>...'))) . '</p>';
}
return $output;
// ...
| Comment | File | Size | Author |
|---|---|---|---|
| break.patch | 610 bytes | jptavan | |
| Maintenance.png | 67.83 KB | jptavan |
Comments
Comment #1
betz commentedweird. i cannot reproduce this error, looks like my php installation acts diiferently.
I logged in as uid 2, and i dont get thrown the actions help text.
But indeed, case 'admin/config/development/maintenance' needs a break, as there won't be a return for sure.
Patch tested and looks like our dear friend 'simpletest' agreed.
Comment #2
webchickNice catch, jptavan!
Committed to HEAD. Thanks!