drupal_get_path_map
- Versions
- 4.6
drupal_get_path_map($action = '')
Return an array mapping path aliases to their internal Drupal paths.
Code
includes/bootstrap.inc, line 353
<?php
function drupal_get_path_map($action = '') {
static $map = NULL;
if ($action == 'rebuild') {
$map = NULL;
}
if (is_null($map)) {
$map = array(); // Make $map non-null in case no aliases are defined.
$result = db_query('SELECT * FROM {url_alias}');
while ($data = db_fetch_object($result)) {
$map[$data->dst] = $data->src;
}
}
return $map;
}
?>Login or register to post comments 