common_local_url() second parameter optional
darcs-hash:20080517160908-84dde-c176f1fa4c4026a84efac994e65db0158935cb11.gz
This commit is contained in:
parent
76c0575ad0
commit
1d9e45fb9b
@ -264,13 +264,15 @@ function common_avatar_url($filename) {
|
||||
return $config['avatar']['path'] . '/' . $filename;
|
||||
}
|
||||
|
||||
function common_local_url($action, $args) {
|
||||
function common_local_url($action, $args=NULL) {
|
||||
global $config;
|
||||
/* XXX: pretty URLs */
|
||||
$extra = '';
|
||||
if ($args) {
|
||||
foreach ($args as $key => $value) {
|
||||
$extra .= "&${key}=${value}";
|
||||
}
|
||||
}
|
||||
return "http://".$config['site']['server'].'/'.$config['site']['path']."/index.php?action=${action}${extra}";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user