start handling fancy URLs
darcs-hash:20080530212555-84dde-213c04b9cf9048f48bf0b0b4234bcdf49546d4d9.gz
This commit is contained in:
parent
2a2992b102
commit
52c7ff9827
|
@ -36,7 +36,8 @@ $config =
|
|||
array('site' =>
|
||||
array('name' => 'Just another Laconica microblog',
|
||||
'server' => 'localhost',
|
||||
'path' => '/'),
|
||||
'path' => '/',
|
||||
'fancy' => false),
|
||||
'tag' =>
|
||||
array('authority' => 'INVALID TAG',
|
||||
'date' => 'PUT A DATE HERE',
|
||||
|
|
17
lib/util.php
17
lib/util.php
|
@ -431,6 +431,23 @@ function common_default_avatar($size) {
|
|||
}
|
||||
|
||||
function common_local_url($action, $args=NULL) {
|
||||
global $config;
|
||||
if ($config['site']['fancy']) {
|
||||
return common_fancy_url($action, $args);
|
||||
} else {
|
||||
return common_simple_url($action, $args);
|
||||
}
|
||||
}
|
||||
|
||||
function common_fancy_url($action, $args=NULL) {
|
||||
switch (strtolower($action)) {
|
||||
default:
|
||||
return common_simple_url($action, $args);
|
||||
}
|
||||
}
|
||||
|
||||
function common_simple_url($action, $args=NULL) {
|
||||
global $config;
|
||||
/* XXX: pretty URLs */
|
||||
$extra = '';
|
||||
if ($args) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user