diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-18 18:58:47 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-18 18:58:47 +0000 |
commit | 7de41539df93abeea427c1aa83ee7e13684a4fc6 (patch) | |
tree | cbe403960892b0f34dbc2674bd068686b6b22693 /modules/path/path.module | |
parent | e2f42cf3d544bc90accaab9eff800277ac60c9f1 (diff) | |
download | brdo-7de41539df93abeea427c1aa83ee7e13684a4fc6.tar.gz brdo-7de41539df93abeea427c1aa83ee7e13684a4fc6.tar.bz2 |
- Patch #77919 by chx, eaton, moshe, et al: enable programmaticaly submitted forms via the pull model.
Diffstat (limited to 'modules/path/path.module')
-rw-r--r-- | modules/path/path.module | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index 54f6ee771..5809c981d 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -55,17 +55,20 @@ function path_menu($may_cache) { 'callback' => 'path_admin', 'access' => user_access('administer url aliases')); $items[] = array('path' => 'admin/build/path/edit', 'title' => t('edit alias'), - 'callback' => 'path_admin_edit', + 'callback' => 'drupal_get_form', + 'callback arguments' => array('path_admin_edit'), 'access' => user_access('administer url aliases'), 'type' => MENU_CALLBACK); $items[] = array('path' => 'admin/build/path/delete', 'title' => t('delete alias'), - 'callback' => 'path_admin_delete_confirm', + 'callback' => 'drupal_get_form', + 'callback arguments' => array('path_admin_delete_confirm'), 'access' => user_access('administer url aliases'), 'type' => MENU_CALLBACK); $items[] = array('path' => 'admin/build/path/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/build/path/add', 'title' => t('add alias'), - 'callback' => 'path_admin_edit', + 'callback' => 'drupal_get_form', + 'callback arguments' => array('path_admin_edit'), 'access' => user_access('administer url aliases'), 'type' => MENU_LOCAL_TASK); } @@ -103,7 +106,7 @@ function path_admin_delete_confirm($pid) { $path = path_load($pid); if (user_access('administer url aliases')) { $form['pid'] = array('#type' => 'value', '#value' => $pid); - $output = confirm_form('path_admin_delete_confirm', $form, + $output = confirm_form($form, t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])), $_GET['destination'] ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'), t('Delete'), t('Cancel') ); @@ -193,7 +196,7 @@ function path_form($edit = '') { $form['submit'] = array('#type' => 'submit', '#value' => t('Create new alias')); } - return drupal_get_form('path_form', $form); + return $form; } /** |