From 13ba9ef0037656b1e12d627f767fc2fc8781632a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Jun 2014 21:21:50 -0700 Subject: merge the app menus --- include/apps.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'include/apps.php') diff --git a/include/apps.php b/include/apps.php index 777664c7f..df62ba774 100644 --- a/include/apps.php +++ b/include/apps.php @@ -62,18 +62,21 @@ function parse_app_description($f) { } - if(! $ret['photo']) $ret['photo'] = $baseurl . '/' . get_default_profile_photo(80); + $ret['type'] = 'system'; foreach($ret as $k => $v) { if(strpos($v,'http') === 0) $ret[$k] = zid($v); } - if(array_key_exists('hover',$ret)) - $ret['hover'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['hover']); + if(array_key_exists('desc',$ret)) + $ret['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['desc']); + + if(array_key_exists('target',$ret)) + $ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']); if(array_key_exists('requires',$ret)) { $require = trim(strtolower($ret['requires'])); @@ -270,6 +273,11 @@ function app_list($uid) { $r = q("select * from app where app_channel = %d order by app_name asc", intval($uid) ); + if($r) { + for($x = 0; $x < count($r); $x ++) { + $r[$x]['type'] = 'personal'; + } + } return($r); } @@ -391,6 +399,8 @@ function app_encode($app,$embed = false) { $ret = array(); + $ret['type'] = 'personal'; + if($app['app_id']) $ret['guid'] = $app['app_id']; -- cgit v1.2.3