aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/identity.php21
-rw-r--r--include/network.php2
-rw-r--r--include/photo/photo_driver.php6
3 files changed, 25 insertions, 4 deletions
diff --git a/include/identity.php b/include/identity.php
index 6bbf193c1..4d38b2828 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1109,3 +1109,24 @@ function get_theme_uid() {
}
return $uid;
}
+
+/**
+ * @function get_default_profile_photo($size = 175)
+ * Retrieves the path of the default_profile_photo for this system
+ * with the specified size.
+ * @param int $size
+ * one of (175, 80, 48)
+ * @returns string
+ *
+ */
+
+function get_default_profile_photo($size = 175) {
+ $scheme = get_config('system','default_profile_photo');
+ if(! $scheme)
+ $scheme = 'rainbow_man';
+ return 'images/default_profile_photos/' . $scheme . '/' . $size . 'jpg';
+}
+
+
+
+ \ No newline at end of file
diff --git a/include/network.php b/include/network.php
index 7446c2384..3fe7f5400 100644
--- a/include/network.php
+++ b/include/network.php
@@ -548,7 +548,7 @@ function avatar_img($email) {
call_hooks('avatar_lookup', $avatar);
if(! $avatar['success'])
- $avatar['url'] = $a->get_baseurl() . '/images/default_profile_photos/rainbow_man/175.jpg';
+ $avatar['url'] = $a->get_baseurl() . '/' . get_default_profile_photo();
logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);
return $avatar['url'];
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 8730b4298..3d8ee2196 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -576,9 +576,9 @@ function import_profile_photo($photo,$xchan) {
$photo_failure = true;
}
if($photo_failure) {
- $photo = $a->get_baseurl() . '/images/default_profile_photos/rainbow_man/175.jpg';
- $thumb = $a->get_baseurl() . '/images/default_profile_photos/rainbow_man/80.jpg';
- $micro = $a->get_baseurl() . '/images/default_profile_photos/rainbow_man/48.jpg';
+ $photo = $a->get_baseurl() . '/' . get_default_profile_photo();
+ $thumb = $a->get_baseurl() . '/' . get_default_profile_photo(80);
+ $micro = $a->get_baseurl() . '/' . get_default_profile_photo(48);
$type = 'image/jpeg';
}