function menu_position_edit_rule_form in Menu Position 6
Same name and namespace in other branches
- 7.2 menu_position.admin.inc \menu_position_edit_rule_form()
- 7 menu_position.admin.inc \menu_position_edit_rule_form()
Menu callback; Edits rules.
1 string reference to 'menu_position_edit_rule_form'
- _menu_position_menu in ./
menu_position.admin.inc - Implements hook_menu().
File
- ./
menu_position.admin.inc, line 329 - Provides infrequently used functions and hooks for menu_position.
Code
function menu_position_edit_rule_form(&$form_state, $rid = 0) {
// Make sure rid is set.
if ($rid == 0) {
drupal_goto('admin/build/menu-position');
return;
}
// Grab the rule from the database.
$form_state['#menu-position-rule'] = db_fetch_array(db_query('SELECT * FROM {menu_position_rules} WHERE rid = %d', $rid));
$form_state['#menu-position-rule']['conditions'] = unserialize($form_state['#menu-position-rule']['conditions']);
return menu_position_rule_form($form_state);
}