Merge branch 'dev' into oauth2
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 ]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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 ) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function sortpanels(&$s) {
|
||||
$a = explode('<div class="panel">',$s);
|
||||
if($a) {
|
||||
usort($a,'featured_sort');
|
||||
$s = implode('<div class="panel">',$a);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user