]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
public indexers in config file
[quix0rs-gnu-social.git] / lib / util.php
index 1b672561fce85c30a81f030d045f9f2ed48eb7c9..1aa9d2944c9b044da1930fdfb3cb37639bf3cfa2 100644 (file)
@@ -998,13 +998,6 @@ function common_notice_form($action=NULL, $content=NULL) {
        common_element_end('form');
 }
 
-function common_mint_tag($extra) {
-       global $config;
-       return
-         'tag:'.$config['tag']['authority'].','.
-         $config['tag']['date'].':'.$config['tag']['prefix'].$extra;
-}
-
 # Should make up a reasonable root URL
 
 function common_root_url() {
@@ -1292,4 +1285,20 @@ function common_profile_avatar_url($profile, $size=AVATAR_PROFILE_SIZE) {
                return common_default_avatar($size);
        }
 }
-       
\ No newline at end of file
+
+function common_profile_uri($profile) {
+       if (!$profile) {
+               return NULL;
+       }
+       $user = User::staticGet($profile->id);
+       if ($user) {
+               return $user->uri;
+       }
+       
+       $remote = Remote_profile::staticGet($profile->id);
+       if ($remote) {
+               return $remote->uri;
+       }
+       # XXX: this is a very bad profile!
+       return NULL;
+}
\ No newline at end of file