- Patch #35621 by asimmonds: URL path settings on node/add/* did not work.

4.7.x
Dries Buytaert 2005-11-01 10:11:36 +00:00
parent f3d0fed0e6
commit 3f4d18fafc
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ function path_nodeapi(&$node, $op, $arg) {
case 'form': case 'form':
$form['path'] = array('#type' => 'fieldset', '#title' => t('URL path settings'), '#collapsible' => TRUE, '#collapsed' => TRUE); $form['path'] = array('#type' => 'fieldset', '#title' => t('URL path settings'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['path']['alias'] = array('#type' => 'textfield', '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.')); $form['path']['path'] = array('#type' => 'textfield', '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if ($node->path) { if ($node->path) {
$form['path']['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path))); $form['path']['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path)));
} }

View File

@ -193,7 +193,7 @@ function path_nodeapi(&$node, $op, $arg) {
case 'form': case 'form':
$form['path'] = array('#type' => 'fieldset', '#title' => t('URL path settings'), '#collapsible' => TRUE, '#collapsed' => TRUE); $form['path'] = array('#type' => 'fieldset', '#title' => t('URL path settings'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['path']['alias'] = array('#type' => 'textfield', '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.')); $form['path']['path'] = array('#type' => 'textfield', '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if ($node->path) { if ($node->path) {
$form['path']['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path))); $form['path']['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path)));
} }