diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Connedit.php | 46 | ||||
-rw-r--r-- | Zotlabs/Module/Profiles.php | 1 | ||||
-rw-r--r-- | Zotlabs/Storage/Browser.php | 4 | ||||
-rw-r--r-- | Zotlabs/Storage/Directory.php | 2 |
4 files changed, 52 insertions, 1 deletions
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 7a753c286..5b7c23028 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -441,6 +441,34 @@ class Connedit extends \Zotlabs\Web\Controller { goaway(z_root() . '/connedit/' . $contact_id); } + + if($cmd === 'fetchvc') { + $url = str_replace('/channel/','/profile/',$orig_record[0]['xchan_url']) . '/vcard'; + $recurse = 0; + $x = z_fetch_url(zid($url),false,$recurse,['session' => true]); + if($x['success']) { + $h = new \Zotlabs\Web\HTTPHeaders($x['header']); + $fields = $h->fetch(); + if($fields) { + foreach($fields as $y) { + if(array_key_exists('content-type',$y)) { + $type = explode(';',trim($y['content-type'])); + if($type && $type[0] === 'text/vcard' && $x['body']) { + $vc = \Sabre\VObject\Reader::read($x['body']); + $vcard = $vc->serialize(); + if($vcard) { + set_abconfig(local_channel(),$orig_record[0]['abook_xchan'],'system','vcard',$vcard); + $this->connedit_clone($a); + } + } + } + } + } + } + goaway(z_root() . '/connedit/' . $contact_id); + } + + if($cmd === 'resetphoto') { q("update xchan set xchan_photo_date = '2001-01-01 00:00:00' where xchan_hash = '%s'", dbesc($orig_record[0]['xchan_hash']) @@ -582,6 +610,13 @@ class Connedit extends \Zotlabs\Web\Controller { 'sel' => '', 'title' => t('Fetch updated permissions'), ), + + 'rephoto' => array( + 'label' => t('Refresh Photo'), + 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/resetphoto', + 'sel' => '', + 'title' => t('Fetch updated photo'), + ), 'recent' => array( 'label' => t('Recent Activity'), @@ -631,6 +666,17 @@ class Connedit extends \Zotlabs\Web\Controller { ); + + if($contact['xchan_network'] === 'zot') { + $tools['fetchvc'] = [ + 'label' => t('Fetch Vcard'), + 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/fetchvc', + 'sel' => '', + 'title' => t('Fetch electronic calling card for this connection') + ]; + } + + $sections = []; $sections['perms'] = [ diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index d6c9d6570..f6e8b11ed 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -785,6 +785,7 @@ class Profiles extends \Zotlabs\Web\Controller { '$contact' => array('contact', t('Contact information and social networks'), $r[0]['contact']), '$channels' => array('channels', t('My other channels'), $r[0]['channels']), '$extra_fields' => $extra_fields, + '$comms' => t('Communications'), '$tel_label' => t('Phone'), '$email_label' => t('Email'), '$impp_label' => t('Instant messenger'), diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index f527a6a44..21e91d2a2 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -322,12 +322,16 @@ class Browser extends DAV\Browser\Plugin { if(strpos($path,$special) === 0) $path = trim(substr($path,$count),'/'); + $info = t('Please use DAV to upload large (video, audio) files.<br>See <a class="zrl" href="help/member/member_guide#Cloud_Desktop_Clients">Cloud Desktop Clients</a>'); + + $output .= replace_macros(get_markup_template('cloud_actionspanel.tpl'), array( '$folder_header' => t('Create new folder'), '$folder_submit' => t('Create'), '$upload_header' => t('Upload file'), '$upload_submit' => t('Upload'), '$quota' => $quota, + '$info' => $info, '$channick' => $this->auth->owner_nick, '$aclselect' => $aclselect, '$allow_cid' => acl2json($channel_acl['allow_cid']), diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 5d078b04e..51540735c 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -687,7 +687,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { $ret = array(); $r = q("SELECT channel_id, channel_address FROM channel WHERE channel_removed = 0 - AND channel_system = 0 AND NOT (channel_pageflags & %d)>0", + AND channel_system = 0 AND (channel_pageflags & %d) = 0", intval(PAGE_HIDDEN) ); |