diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-20 03:17:00 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-20 03:17:00 -0400 |
commit | 15a09c5d694f720ef50f9c82860193545233bcf1 (patch) | |
tree | 3a8383fa79071b4fd61c31e00f0aae66d49988b9 /lib | |
parent | 03dba4270a6f4fe53582d1cce9d6c713cdcaa115 (diff) |
change from using tag uris to http urls for identifiers
Weirdly, I got in an argument with Tim Berners-Lee in #swig about the
tag URIs I was using in FOAF documents. Eventually, I was convinced
that it's a better thing to use HTTP URLs instead. So, now we have
HTTP URLs.
The tricky thing was for users. Since they can change their names, we
can't use their profile URL, since it includes the name. Instead, I
made up a new action, which simply redirects from a user ID to their
current profile URL. This should be sufficiently long-term.
darcs-hash:20080620071700-84dde-c6145243dc45dd2dff621aff421375d05796057e.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index e137799f2..ae6752653 100644 --- a/lib/util.php +++ b/lib/util.php @@ -572,6 +572,8 @@ function common_fancy_url($action, $args=NULL) { } case 'confirmemail': return common_path('main/confirmemail/'.$args['code']); + case 'userbyid': + return common_path('user/'.$args['id']); default: return common_simple_url($action, $args); } @@ -897,3 +899,12 @@ function common_copy_args($from) { } return $to; } + +function common_user_uri(&$user) { + return common_local_url('userbyid', array('id' => $user->id)); +} + +function common_notice_uri(&$notice) { + return common_local_url('shownotice', + array('notice' => $notice->id)); +} |