diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-07-01 17:41:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-07-01 17:41:16 +0000 |
commit | e59852d336467e7269853724a28d80bc070bcbf6 (patch) | |
tree | 5be53c3b52d923476e8be517f15251f1487efa9c /modules/path/path.module | |
parent | c11cb4ec24479e801076c094f043f2084b344d0c (diff) | |
download | brdo-e59852d336467e7269853724a28d80bc070bcbf6.tar.gz brdo-e59852d336467e7269853724a28d80bc070bcbf6.tar.bz2 |
- Rollback of patch #147723: delete API. Talked to Steven and Gabor and we
unanimously agreed to rollback the deletion API. We all support the
features this patch added, yet not its actual design and implementation.
After some talk, we decided that it would be better for Drupal -- in the
long term -- not to go with a solution that isn't 100%. We also recognize
that in the short term, this patch would have been useful addition. So
let's figure out how we can implement this properly in D7.
Diffstat (limited to 'modules/path/path.module')
-rw-r--r-- | modules/path/path.module | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index e709df0e8..cd0643402 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -89,14 +89,13 @@ function path_admin_edit($pid = 0) { /** * Menu callback; confirms deleting an URL alias **/ -function path_admin_delete_confirm(&$form_state, $pid) { +function path_admin_delete_confirm($pid) { $path = path_load($pid); if (user_access('administer url aliases')) { $form['pid'] = array('#type' => 'value', '#value' => $pid); - $options = array('cancel' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path'); $output = confirm_form($form, t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])), - 'admin/build/path', $options); + isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path'); } return $output; } @@ -126,12 +125,12 @@ function path_admin_delete($pid = 0) { function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = '') { if ($path && !$alias) { // Delete based on path - drupal_delete_add_query("DELETE FROM {url_alias} WHERE src = '%s' AND language = '%s'", $path, $language); + db_query("DELETE FROM {url_alias} WHERE src = '%s' AND language = '%s'", $path, $language); drupal_clear_path_cache(); } else if (!$path && $alias) { // Delete based on alias - drupal_delete_add_query("DELETE FROM {url_alias} WHERE dst = '%s' AND language = '%s'", $alias, $language); + db_query("DELETE FROM {url_alias} WHERE dst = '%s' AND language = '%s'", $alias, $language); drupal_clear_path_cache(); } else if ($path && $alias) { |