From 1c07880c0178bbda875bbe2cda5d19ae7fb5e1c4 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 28 Feb 2018 18:01:51 -0800 Subject: important bugfix: if logged in locally and mod_display returns nothing owned by your uid, retry with known public uids rather than issue 'permission denied'. Affects the ability to view search results for otherwise public posts 'in context'. --- Zotlabs/Module/Display.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index 11dd0d174..8e8a1ed24 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -215,6 +215,7 @@ class Display extends \Zotlabs\Web\Controller { $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']),intval(\App::$pager['start'])); if($load || ($checkjs->disabled()) || ($module_format !== 'html')) { + $r = null; require_once('include/channel.php'); @@ -235,7 +236,7 @@ class Display extends \Zotlabs\Web\Controller { } } - if($r === null) { + if(! $r) { // in case somebody turned off public access to sys channel content using permissions // make that content unsearchable by ensuring the owner uid can't match @@ -281,7 +282,7 @@ class Display extends \Zotlabs\Web\Controller { } } - if($r === null) { + if(! $r) { // in case somebody turned off public access to sys channel content using permissions // make that content unsearchable by ensuring the owner_xchan can't match if(! perm_is_allowed($sysid,$observer_hash,'view_stream')) -- cgit v1.2.3 From 14e14c6c92dadf4c95900978135a161f5da696d9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 28 Feb 2018 19:49:33 -0800 Subject: provide new member widget which sits beneath the notifications for the first 60 days after an account creation. --- Zotlabs/Module/Go.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Go.php b/Zotlabs/Module/Go.php index d23e940c3..d33136d9e 100644 --- a/Zotlabs/Module/Go.php +++ b/Zotlabs/Module/Go.php @@ -36,7 +36,7 @@ class Go extends \Zotlabs\Web\Controller { 'cover_photo' => t('Upload a cover photo'), 'profiles' => t('Edit your default profile'), 'suggest' => t('View friend suggestions'), - 'directory' => t('View the directory to find other interesting channels'), + 'directory' => t('View the channel directory'), 'settings' => t('View/edit your channel settings'), 'help' => t('View the site or project documentation'), 'channel/' . $channel['channel_address'] => t('Visit your channel homepage'), -- cgit v1.2.3 From 2b910eb5aa204e1914c8c73afe369c443bd1ff49 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 28 Feb 2018 20:31:06 -0800 Subject: Create one and only one 'registration successful, check your email' popup. --- Zotlabs/Module/Register.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index c7fa1cee8..5356669e9 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -123,9 +123,6 @@ class Register extends \Zotlabs\Web\Controller { if($policy == REGISTER_OPEN ) { if($email_verify) { $res = verify_email_address($result); - if($res) { - info( t('Registration successful. Please check your email for validation instructions.') . EOL ) ; - } } else { $res = send_register_success_email($result['email'],$result['password']); @@ -133,7 +130,8 @@ class Register extends \Zotlabs\Web\Controller { if($res) { if($invite_code) { info( t('Registration successful. Continue to create your first channel...') . EOL ) ; - } else { + } + else { info( t('Registration successful. Please check your email for validation instructions.') . EOL ) ; } } -- cgit v1.2.3 From 01015bc0d54343831189ce1b09a69b70a6371fd5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 28 Feb 2018 21:15:26 -0800 Subject: several email validation issues --- Zotlabs/Module/Email_validation.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Email_validation.php b/Zotlabs/Module/Email_validation.php index b8bb720cd..c1ba9a01a 100644 --- a/Zotlabs/Module/Email_validation.php +++ b/Zotlabs/Module/Email_validation.php @@ -7,12 +7,11 @@ class Email_validation extends \Zotlabs\Web\Controller { function post() { + $success = false; if($_POST['token']) { // This will redirect internally on success unless the channel is auto_created - if(! account_approve(trim(basename($_POST['token'])))) { - notice('Token verification failed.'); - } - else { + if(account_approve(trim(basename($_POST['token'])))) { + $success = true; if(get_config('system','auto_channel_create')) { $next_page = get_config('system', 'workflow_channel_next', 'profiles'); } @@ -21,7 +20,9 @@ class Email_validation extends \Zotlabs\Web\Controller { } } } - + if(! $success) { + notice( t('Token verification failed.') . EOL); + } } -- cgit v1.2.3 From 1620691cbe076b463e0c86542be8fa5be967ddfe Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 1 Mar 2018 16:38:14 -0800 Subject: add federation property to webfinger --- Zotlabs/Module/Wfinger.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php index 753721d27..81d4beaed 100644 --- a/Zotlabs/Module/Wfinger.php +++ b/Zotlabs/Module/Wfinger.php @@ -123,7 +123,8 @@ class Wfinger extends \Zotlabs\Web\Controller { $result['properties'] = [ 'http://webfinger.net/ns/name' => $r[0]['channel_name'], 'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'], - 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey'] + 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey'], + 'http://purl.org/zot/federation' => 'zot' ]; foreach($aliases as $alias) -- cgit v1.2.3 From dcfe9bc64f822af02021767bf8c70fbe9d847bda Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 2 Mar 2018 01:01:30 -0800 Subject: background work for caldav integration continued, modify mod_follow to allow it to be called from ajax without redirecting. --- Zotlabs/Module/Follow.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php index d8a86d0ce..04ac746cb 100644 --- a/Zotlabs/Module/Follow.php +++ b/Zotlabs/Module/Follow.php @@ -17,15 +17,20 @@ class Follow extends \Zotlabs\Web\Controller { $url = notags(trim($_REQUEST['url'])); $return_url = $_SESSION['return_url']; $confirm = intval($_REQUEST['confirm']); - + $interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1); $channel = \App::get_channel(); - $result = new_contact($uid,$url,$channel,true,$confirm); + $result = new_contact($uid,$url,$channel,$interactive,$confirm); if($result['success'] == false) { if($result['message']) notice($result['message']); - goaway($return_url); + if($interactive) { + goaway($return_url); + } + else { + json_return_and_die($result); + } } info( t('Channel added.') . EOL); @@ -53,7 +58,12 @@ class Follow extends \Zotlabs\Web\Controller { if(($can_view_stream) || ($result['abook']['xchan_network'] === 'rss')) \Zotlabs\Daemon\Master::Summon(array('Onepoll',$result['abook']['abook_id'])); - goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1'); + if($interactive) { + goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1'); + } + else { + json_return_and_die([ 'success' => true ]); + } } -- cgit v1.2.3 From b38ce967f36e0dc5a503fbca9477732cd8967ea6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 2 Mar 2018 12:41:50 -0800 Subject: sort settings/featured --- Zotlabs/Module/Settings/Featured.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php index 1da139206..542a05363 100644 --- a/Zotlabs/Module/Settings/Featured.php +++ b/Zotlabs/Module/Settings/Featured.php @@ -57,7 +57,10 @@ class Featured { } call_hooks('feature_settings', $settings_addons); - + + $this->sortpanels($settings_addons); + + $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_featured"), @@ -67,5 +70,15 @@ class Featured { )); return $o; } - -} \ No newline at end of file + + function sortpanels(&$s) { + $a = explode('
',$s); + if($a) { + usort($a,'featured_sort'); + $s = implode('
',$a); + } + } + +} + + -- cgit v1.2.3 From 4c69c5679736bb77d141a528c1e63a80d11c8026 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 2 Mar 2018 14:09:59 -0800 Subject: string change "Channel added" -> "Connection added" --- Zotlabs/Module/Follow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php index 04ac746cb..146c4e564 100644 --- a/Zotlabs/Module/Follow.php +++ b/Zotlabs/Module/Follow.php @@ -33,7 +33,7 @@ class Follow extends \Zotlabs\Web\Controller { } } - info( t('Channel added.') . EOL); + info( t('Connection added.') . EOL); $clone = array(); foreach($result['abook'] as $k => $v) { -- cgit v1.2.3 From ca1022675c84c862e9ae3180a47360040b24e9e2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 3 Mar 2018 15:19:39 -0800 Subject: There was no pdl for mod_thing; add one because it's only a link away from profile creation and remains on that page until you go elsewhere and new members may need help to find their way out --- Zotlabs/Module/Thing.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Thing.php b/Zotlabs/Module/Thing.php index f816632ab..c3d8ff802 100644 --- a/Zotlabs/Module/Thing.php +++ b/Zotlabs/Module/Thing.php @@ -20,6 +20,11 @@ class Thing extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); + if($_SERVER['REQUEST_METHOD'] === 'GET' && argc() < 2) { + profile_load($channel['channel_address']); + } + + $term_hash = (($_REQUEST['term_hash']) ? $_REQUEST['term_hash'] : ''); $name = escape_tags($_REQUEST['term']); -- cgit v1.2.3 From 471c3c4d068d1c6d4e149098d400d792fb3550a6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 3 Mar 2018 15:52:57 -0800 Subject: add dummy f= arg to suggestion urls, use directory version of suggest for newmember link instead of the suggest module as the UI is prettier. --- Zotlabs/Module/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php index b1552a694..85c0be6b6 100644 --- a/Zotlabs/Module/Directory.php +++ b/Zotlabs/Module/Directory.php @@ -17,7 +17,7 @@ class Directory extends \Zotlabs\Web\Controller { intval(local_channel()), dbesc($_GET['ignore']) ); - goaway(z_root() . '/directory?suggest=1'); + goaway(z_root() . '/directory?f=&suggest=1'); } $observer = get_observer_hash(); -- cgit v1.2.3