function path_delete in Redis 7.2
Same name and namespace in other branches
- 7.3 redis.path.inc \path_delete()
Delete a URL alias.
Parameters
$criteria: A number representing the pid or an array of criteria.
File
- ./
redis.path.inc, line 463 - Drupal default includes/path.inc file copy which only differs in:
Code
function path_delete($criteria) {
if (!is_array($criteria)) {
$criteria = array(
'pid' => $criteria,
);
}
$path = path_load($criteria);
$query = db_delete('url_alias');
foreach ($criteria as $field => $value) {
$query
->condition($field, $value);
}
$query
->execute();
module_invoke_all('path_delete', $path);
redis_path_backend_get()
->deleteAlias($path['source'], $path['alias'], $path['language']);
drupal_clear_path_cache($path['source']);
}