apps: provide a default photo if none was set. For now it's the default profile photo until we have a default app photo
This commit is contained in:
parent
e68bb132a7
commit
99d97170de
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user