Commit 5a09fc07 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#166644 by pwolanin: path module was incorrectly using drupal_get_form

parent c17499b6
......@@ -64,14 +64,14 @@ function path_admin_overview($keys = NULL) {
/**
* Menu callback; handles pages for creating and editing URL aliases.
*/
function path_admin_edit($form_state, $pid = 0) {
function path_admin_edit($pid = 0) {
if ($pid) {
$alias = path_load($pid);
drupal_set_title(check_plain($alias['dst']));
$output = path_admin_form($form_state, $alias);
$output = drupal_get_form('path_admin_form', $alias);
}
else {
$output = path_admin_form();
$output = drupal_get_form('path_admin_form');
}
return $output;
......@@ -85,8 +85,7 @@ function path_admin_edit($form_state, $pid = 0) {
* @see path_admin_form_submit().
*/
function path_admin_form(&$form_state, $edit = array('src' => '', 'dst' => '', 'language' => '', 'pid' => NULL)) {
$form['#submit'][] = 'path_admin_form_submit';
$form['#validate'][] = 'path_admin_form_validate';
$form['#alias'] = $edit;
$form['src'] = array(
......
......@@ -45,8 +45,7 @@ function path_menu() {
);
$items['admin/build/path/edit'] = array(
'title' => 'Edit alias',
'page callback' => 'drupal_get_form',
'page arguments' => array('path_admin_edit'),
'page callback' => 'path_admin_edit',
'type' => MENU_CALLBACK,
'file' => 'path.admin.inc',
);
......@@ -64,8 +63,7 @@ function path_menu() {
);
$items['admin/build/path/add'] = array(
'title' => 'Add alias',
'page callback' => 'drupal_get_form',
'page arguments' => array('path_admin_edit'),
'page callback' => 'path_admin_edit',
'access arguments' => array('administer url aliases'),
'type' => MENU_LOCAL_TASK,
'file' => 'path.admin.inc',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment