path_form_validate($form_id, $form_values)
path/path.module, line 330
Verify that a new URL alias is valid
<?php
function path_form_validate($form_id, $form_values) {
$src = $form_values['src'];
$dst = $form_values['dst'];
$pid = $form_values['pid'];
if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid != %d AND dst = '%s'", $pid, $dst))) {
form_set_error('dst', t('The alias %alias is already in use.', array('%alias' => $dst)));
}
}
?>