diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index ed2b25cce..c57948fef 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -313,7 +313,7 @@ class Apps { static public function translate_system_apps(&$arr) { $apps = array( 'Apps' => t('Apps'), - 'Affinity Tool' => t('Affinity Tool'), + 'Friend Zoom' => t('Friend Zoom'), 'Articles' => t('Articles'), 'Cards' => t('Cards'), 'Calendar' => t('Calendar'), diff --git a/Zotlabs/Module/Affinity.php b/Zotlabs/Module/Affinity.php index 18af20f7a..afdf1dd8d 100644 --- a/Zotlabs/Module/Affinity.php +++ b/Zotlabs/Module/Affinity.php @@ -9,7 +9,7 @@ class Affinity extends \Zotlabs\Web\Controller { function post() { - if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Affinity Tool'))) { + if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Friend Zoom'))) { return; } @@ -23,7 +23,7 @@ class Affinity extends \Zotlabs\Web\Controller { set_pconfig(local_channel(),'affinity','cmin',0); set_pconfig(local_channel(),'affinity','cmax',$cmax); - info( t('Affinity Tool settings updated.') . EOL); + info( t('Friend Zoom settings updated.') . EOL); } @@ -34,11 +34,11 @@ class Affinity extends \Zotlabs\Web\Controller { function get() { - $desc = t('This app (when installed) presents a slider control in your connection editor and also on your network page. The slider represents your degree of friendship or affinity with each connection. It allows you to zoom in or out and display conversations from only your closest friends or everybody in your stream.'); + $desc = t('This app (when installed) presents a slider control in your connection editor and also on your network page. The slider represents your degree of friendship with each connection. It allows you to zoom in or out and display conversations from only your closest friends or everybody in your stream.'); $text = '
' . $desc . '
'; - if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Affinity Tool'))) { + if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Friend Zoom'))) { return $text; } @@ -52,7 +52,7 @@ class Affinity extends \Zotlabs\Web\Controller { // '$field' => array('affinity_cmax', t('Default maximum affinity level'), $cmax, t('0-99 default 99')) // )); - if(Apps::system_app_installed(local_channel(),'Affinity Tool')) { + if(Apps::system_app_installed(local_channel(),'Friend Zoom')) { $labels = array( 0 => t('Me'), @@ -80,7 +80,7 @@ class Affinity extends \Zotlabs\Web\Controller { } $s .= replace_macros(get_markup_template('generic_app_settings.tpl'), array( - '$addon' => array('affinity', '' . t('Affinity Tool Settings'), '', t('Submit')), + '$addon' => array('affinity', '' . t('Friend Zoom Settings'), '', t('Submit')), '$content' => $setting_fields )); diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index c0f62bd0d..3f290dc25 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -637,13 +637,13 @@ class Connedit extends Controller { $tpl = get_markup_template("abook_edit.tpl"); - if(Apps::system_app_installed(local_channel(),'Affinity Tool')) { + if(Apps::system_app_installed(local_channel(),'Friend Zoom')) { $sections['affinity'] = [ - 'label' => t('Affinity'), + 'label' => t('Friend Zoom'), 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/?f=§ion=affinity', 'sel' => '', - 'title' => t('Open Set Affinity section by default'), + 'title' => t('Open Friend Zoom section by default'), ]; $labels = [ @@ -714,13 +714,13 @@ class Connedit extends Controller { $multiprofs = ((feature_enabled(local_channel(),'multi_profiles')) ? true : false); if($slide && !$multiprofs) - $affinity = t('Set Affinity'); + $affinity = t('Set Friend Zoom'); if(!$slide && $multiprofs) $affinity = t('Set Profile'); if($slide && $multiprofs) - $affinity = t('Set Affinity & Profile'); + $affinity = t('Set Friend Zoom & Profile'); $theirs = get_abconfig(local_channel(),$contact['abook_xchan'],'system','their_perms',EMPTY_STR); diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 7413ca719..837951a90 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -122,8 +122,8 @@ class Network extends Controller { $def_acl = [ 'allow_gid' => '<' . $r[0]['hash'] . '>' ]; } - $default_cmin = ((Apps::system_app_installed(local_channel(),'Affinity Tool')) ? get_pconfig(local_channel(),'affinity','cmin',0) : (-1)); - $default_cmax = ((Apps::system_app_installed(local_channel(),'Affinity Tool')) ? get_pconfig(local_channel(),'affinity','cmax',99) : (-1)); + $default_cmin = ((Apps::system_app_installed(local_channel(),'Friend Zoom')) ? get_pconfig(local_channel(),'affinity','cmin',0) : (-1)); + $default_cmax = ((Apps::system_app_installed(local_channel(),'Friend Zoom')) ? get_pconfig(local_channel(),'affinity','cmax',99) : (-1)); $cid = ((x($_GET,'cid')) ? intval($_GET['cid']) : 0); $star = ((x($_GET,'star')) ? intval($_GET['star']) : 0); diff --git a/Zotlabs/Widget/Affinity.php b/Zotlabs/Widget/Affinity.php index e9f087f68..bcd54f9cf 100644 --- a/Zotlabs/Widget/Affinity.php +++ b/Zotlabs/Widget/Affinity.php @@ -11,14 +11,14 @@ class Affinity { if(! local_channel()) return ''; - $default_cmin = ((Apps::system_app_installed(local_channel(),'Affinity Tool')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0); - $default_cmax = ((Apps::system_app_installed(local_channel(),'Affinity Tool')) ? get_pconfig(local_channel(),'affinity','cmax',99) : 99); + $default_cmin = ((Apps::system_app_installed(local_channel(),'Friend Zoom')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0); + $default_cmax = ((Apps::system_app_installed(local_channel(),'Friend Zoom')) ? get_pconfig(local_channel(),'affinity','cmax',99) : 99); $cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : $default_cmin); $cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : $default_cmax); - if(Apps::system_app_installed(local_channel(),'Affinity Tool')) { + if(Apps::system_app_installed(local_channel(),'Friend Zoom')) { $labels = array( 0 => t('Me'), diff --git a/app/affinity.apd b/app/affinity.apd index f56f28ae0..5ad78f846 100644 --- a/app/affinity.apd +++ b/app/affinity.apd @@ -1,6 +1,6 @@ version: 1 url: $baseurl/affinity requires: local_channel -name: Affinity Tool +name: Friend Zoom photo: icon:arrows-h categories: Networking diff --git a/include/text.php b/include/text.php index 80e88f11b..8fe508666 100644 --- a/include/text.php +++ b/include/text.php @@ -2120,13 +2120,13 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) { if(count($arr)) { if($abook) { $chans = q("select * from xchan left join hubloc on hubloc_hash = xchan_hash left join abook on abook_xchan = xchan_hash and abook_channel = %d - where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_primary = 1", + where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") order by hubloc_primary desc", intval($item['uid']) ); } else { $chans = q("select xchan.*,hubloc.* from xchan left join hubloc on hubloc_hash = xchan_hash - where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_primary = 1"); + where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") order by hubloc_primary desc"); } $xchans = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$arr)) . ") and xchan_network in ('rss','unknown', 'anon')"); if(! $chans)