provide /locs link on settings page if there is more than one hubloc for this channnel *that isn't deleted*.

This commit is contained in:
zotlabs 2016-11-05 03:31:50 -07:00
parent b541351a0a
commit 8811ca9e9e
5 changed files with 301 additions and 304 deletions

View File

@ -80,7 +80,7 @@ class Locs extends \Zotlabs\Web\Controller {
function get() {
function get() {
if(! local_channel()) {

View File

@ -324,10 +324,6 @@ class Ping extends \Zotlabs\Web\Controller {
if($r) {
foreach($r as $rr) {
if($rr['adjust'])
$md = datetime_convert('UTC', date_default_timezone_get(), $rr['dtstart'], 'Y/m');
else
$md = datetime_convert('UTC', 'UTC', $rr['dtstart'], 'Y/m');
$strt = datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['dtstart']);
$today = ((substr($strt, 0, 10) === datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d')) ? true : false);

View File

@ -162,7 +162,7 @@ function channel_total() {
* Also creates the related xchan, hubloc, profile, and "self" abook records,
* and an empty "Friends" group/collection for the new channel.
*
* @param array $arr assoziative array with:
* @param array $arr associative array with:
* * \e string \b name full name of channel
* * \e string \b nickname "email/url-compliant" nickname
* * \e int \b account_id to attach with this channel

View File

@ -581,11 +581,11 @@ function widget_settings_menu($arr) {
if($abk)
$abook_self_id = $abk[0]['abook_id'];
$hublocs = q("select count(*) as total from hubloc where hubloc_hash = '%s'",
$x = q("select count(*) as total from hubloc where hubloc_hash = '%s' and hubloc_deleted = 0 ",
dbesc($channel['channel_hash'])
);
$hublocs = (($hublocs[0]['total'] > 1) ? true : false);
$hublocs = (($x && $x[0]['total'] > 1) ? true : false);
$tabs = array(
array(

File diff suppressed because it is too large Load Diff