Fetches a specific URL alias from the database.
$conditions: A string representing the source, a number representing the pid, or an array of query conditions.
FALSE if no alias was found or an associative array containing the following keys:
function path_load($conditions) {
if (is_numeric($conditions)) {
$conditions = array(
'pid' => $conditions,
);
}
elseif (is_string($conditions)) {
$conditions = array(
'source' => $conditions,
);
}
elseif (!is_array($conditions)) {
return FALSE;
}
$select = db_select('url_alias');
foreach ($conditions as $field => $value) {
$select
->condition($field, $value);
}
return $select
->fields('url_alias')
->execute()
->fetchAssoc();
}