Converting 4.2.x modules to 4.3.x
- Database table prefix
- On 2003 Jul 10, Dries committed Slavica's table prefix patch which allows for a configurable "
prefix to each drupal mysql table to easily share one database for multiply applications on server with only one database allowed.
" This patch requires all table names in SQL-queries to be enclosed in {curly brackets}, eg.
- db_query("DELETE FROM book WHERE nid = %d", $node->nid);
+ db_query("DELETE FROM {book} WHERE nid = %d", $node->nid);
so that the table prefix can be dynamically prepended to the table name. See the original feature request and the corresponding discussion at the mailing list for details.
- New help system
- From Michael Frankowski message:
There is a block of text placed at the top of each admin page by
the admin_page function. After 4.3.0 is out the door the function
menu_get_active_help() should probably be renamed/moved into the help module and be attached -- somehow -- to every _page hook (probably in the node module) so that we can use this system through out Drupal but for now, there is a block of text displayed at the top of every admin page. This is the active help block. (context sensitive help?)
If the URL of the admin page matches a URL in a _help hook then the text from that _help hook is displayed on the top of the admin page. If there is no match, the block it not displayed. Because Drupal matches URLs in order to stick "other" stuff in the _help hook we have taken to sticking descriptors after a "#" sign. So far, the following descriptors are recognised:
| Descriptor | Function |
|---|---|
| admin/system/modules#name | The name of a module (unused, but there) |
| admin/system/modules#description | The description found on the admin/system/modules page. |
| admin/help#modulename | The module's help text, displayed on the admin/help page and through the module's individual help link. |
| user/help#modulename | The help for a distrbuted authorization module |
In the future we will probably recognise #block for the text needed
in a block displayed by the help system.
