Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2006 at 17:23 UTC
Updated:
12 Sep 2006 at 22:46 UTC
Hi
I noticed that instructions for updating module from 4.7 to 4.8 at http://drupal.org/node/64279#hook-settings are not correct. The code that is writtne there does not work.
Wrong:
$items[] = array(
'path' => 'admin/settings/your-module',
'title' => t('your ole ola'),
'callback' => 'yourmodule_admin_settings',
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
Correct:
$items[] = array(
'path' => 'admin/settings/your-module',
'title' => t('your ole ola'),
'callback' => 'drupal_get_form',
'callback arguments' => array('yourmodule_admin_settings'),
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
I hope I put it right.
Comments
Comment #1
pwolanin commentedFor the example code that's given, i think you are correct and I'll update it. Obviously, in general, a callback can be any function, not just drupal_get_form.
Comment #2
pwolanin commentedalso corrected the call to system_settings_form, which now only takes $form as an argument.
Comment #3
(not verified) commented