Revision 7914
Added by Aaron Marcuse-Kubitza almost 12 years ago
web/vegpath/index.php | ||
---|---|---|
33 | 33 |
} |
34 | 34 |
} |
35 | 35 |
|
36 |
function custom_separator($url, $sep) |
|
36 |
function custom_separator($url, $sep, $main_url)
|
|
37 | 37 |
{ |
38 |
return function($path) use($url, $sep) |
|
38 |
if (!isset($main_url)) $main_url = $url; |
|
39 |
|
|
40 |
return function($path) use($url, $sep, $main_url) |
|
39 | 41 |
{ |
42 |
if ($path === "") return $main_url; |
|
40 | 43 |
$path = parse_dot_path($path); |
41 | 44 |
return $url.join_non_empty($sep, array($path->head, $path->tail)); |
42 | 45 |
}; |
Also available in: Unified diff
web/vegpath/index.php: custom_separator(): Added $main_url param like in by_prefix(), for use when there is no path