path_save(&$path)Save a path alias to the database.
$path An associative array containing the following keys:
includes/path.inc, line 468
<?php
function path_save(&$path) {
$path += array('pid' => NULL, 'language' => LANGUAGE_NONE);
// Insert or update the alias.
$status = drupal_write_record('url_alias', $path, (!empty($path['pid']) ? 'pid' : NULL));
// Verify that a record was written.
if (isset($status) && $status) {
if ($status === SAVED_NEW) {
module_invoke_all('path_insert', $path);
}
else {
module_invoke_all('path_update', $path);
}
drupal_clear_path_cache($path['source']);
}
}
?>