From 52c7ff9827aa815cda4d811fe76452e72ab3fe7f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 30 May 2008 17:25:55 -0400 Subject: start handling fancy URLs darcs-hash:20080530212555-84dde-213c04b9cf9048f48bf0b0b4234bcdf49546d4d9.gz --- lib/util.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/util.php') 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) { -- cgit v1.2.3-54-g00ecf