[documentation] [Documentation bug] Wrong instructions for updating module from 4.7 to 4.8 at hook setting

Rok Žlender drupal-docs at drupal.org
Tue Aug 29 17:23:34 UTC 2006


Issue status update for 
http://drupal.org/node/81346
Post a follow up: 
http://drupal.org/project/comments/add/81346

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Rok Žlender
 Updated by:   Rok Žlender
 Status:       active

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:
<?php
 $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:
<?php
 $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.




Rok Žlender



More information about the documentation mailing list