summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-30 17:25:55 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-30 17:25:55 -0400
commit52c7ff9827aa815cda4d811fe76452e72ab3fe7f (patch)
tree3b998ceab50cefd1966aa31e59fe0a30ddebd3cf /lib/util.php
parent2a2992b102ebdbead08535d1a71fd9c60f979d89 (diff)
start handling fancy URLs
darcs-hash:20080530212555-84dde-213c04b9cf9048f48bf0b0b4234bcdf49546d4d9.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 2706ebda5..59f0aa10f 100644
--- a/lib/util.php
+++ b/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) {