aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-15 17:15:22 -0700
committerfriendica <info@friendica.com>2014-05-15 17:15:22 -0700
commit99d97170deb1d2b04e649b8f7a3170145ff2a19d (patch)
tree73ab2e53622c2a407c6ab615a69fe242a4e23618
parente68bb132a701d170ef1e13752a8f64107eac7353 (diff)
downloadvolse-hubzilla-99d97170deb1d2b04e649b8f7a3170145ff2a19d.tar.gz
volse-hubzilla-99d97170deb1d2b04e649b8f7a3170145ff2a19d.tar.bz2
volse-hubzilla-99d97170deb1d2b04e649b8f7a3170145ff2a19d.zip
apps: provide a default photo if none was set. For now it's the default profile photo until we have a default app photo
-rw-r--r--include/apps.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/apps.php b/include/apps.php
index 38812ef83..244c2adb7 100644
--- a/include/apps.php
+++ b/include/apps.php
@@ -40,14 +40,27 @@ function get_system_apps() {
function parse_app_description($f) {
$ret = array();
+ $baseurl = z_root();
+ $channel = get_app()->get_channel();
+ $address = (($channel) ? $channel['channel_address'] : '');
+
+ //future expansion
+
+ $observer = get_observer();
+
+
+
$lines = @file($f);
if($lines) {
foreach($lines as $x) {
if(preg_match('/^([a-zA-Z].*?):(.*?)$/ism',$x,$matches)) {
- $ret[$matches[1]] = trim($matches[2]);
+ $ret[$matches[1]] = trim(str_replace(array('$baseurl','$nick'),array($baseurl,$address),$matches[2]));
}
}
}
+ if(! $ret['photo'])
+ $ret['photo'] = $baseurl . '/' . get_default_profile_photo(80);
+
return $ret;
}