diff options
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Directory.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Display.php | 5 | ||||
-rw-r--r-- | Zotlabs/Module/Email_validation.php | 11 | ||||
-rw-r--r-- | Zotlabs/Module/Follow.php | 20 | ||||
-rw-r--r-- | Zotlabs/Module/Go.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Register.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Settings/Featured.php | 19 | ||||
-rw-r--r-- | Zotlabs/Module/Thing.php | 5 | ||||
-rw-r--r-- | Zotlabs/Module/Wfinger.php | 3 |
9 files changed, 51 insertions, 22 deletions
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(); 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')) 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); + } } diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php index d8a86d0ce..146c4e564 100644 --- a/Zotlabs/Module/Follow.php +++ b/Zotlabs/Module/Follow.php @@ -17,18 +17,23 @@ 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); + info( t('Connection added.') . EOL); $clone = array(); foreach($result['abook'] as $k => $v) { @@ -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 ]); + } } 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'), 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 ) ; } } 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('<div class="panel">',$s); + if($a) { + usort($a,'featured_sort'); + $s = implode('<div class="panel">',$a); + } + } + +} + + 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']); 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) |