]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
unique key on a boolean value is not scalable
[quix0rs-gnu-social.git] / lib / util.php
index b6ff34fb7cc1dde3a7faf4832d9226cfe88adee9..97a36296cffc548d111556b364767d54e3fe4f8e 100644 (file)
@@ -724,6 +724,8 @@ function common_fancy_url($action, $args=NULL) {
                return common_path('settings/'.$action);
         case 'profilesettings':
                return common_path('settings/profile');
+        case 'emailsettings':
+               return common_path('settings/email');
         case 'openidsettings':
                return common_path('settings/openid');
         case 'newnotice':
@@ -1269,3 +1271,13 @@ function common_markup_to_html($c) {
        $c = preg_replace('/%%(\w+).(\w+)%%/e', 'common_config(\'\\1\', \'\\2\')', $c);
        return Markdown($c);
 }
+
+function common_profile_avatar_url($profile, $size=AVATAR_PROFILE_SIZE) {
+       $avatar = $profile->getAvatar($size);
+       if ($avatar) {
+               return common_avatar_display_url($avatar);
+       } else {
+               return common_default_avatar($size);
+       }
+}
+       
\ No newline at end of file