fix workflow_channel_next in 2 places. Improve follows query.

This commit is contained in:
Mike Macgirvin 2022-10-08 19:57:16 +11:00
parent 2e0cc65f81
commit 3558bbc217
3 changed files with 10 additions and 9 deletions

View file

@ -4,7 +4,6 @@ namespace Code\Module;
use Code\Web\Controller;
use Code\Lib\Account;
use Code\Lib\Channel;
use Code\Render\Theme;
@ -20,7 +19,7 @@ class Email_validation extends Controller
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');
$next_page = get_config('system', 'workflow_channel_next', 'settings/profile_edit');
}
if ($next_page) {
goaway(z_root() . '/' . $next_page);
@ -40,7 +39,7 @@ class Email_validation extends Controller
$email = hex2bin(argv(1));
}
$o = replace_macros(Theme::get_template('email_validation.tpl'), [
return replace_macros(Theme::get_template('email_validation.tpl'), [
'$title' => t('Email Verification Required'),
'$desc' => sprintf(t('A verification token was sent to your email address [%s]. Enter that token here to complete the account verification step. Please allow a few minutes for delivery, and check your spam folder if you do not see the message.'), $email),
'$resend' => t('Resend Email'),
@ -48,7 +47,5 @@ class Email_validation extends Controller
'$submit' => t('Submit'),
'$token' => ['token', t('Validation token'), '', ''],
]);
return $o;
}
}

View file

@ -5,6 +5,7 @@ namespace Code\Module;
// Mastodon compatible "export follows"
use Code\Lib\Activity;
use Code\Web\Controller;
use Code\Lib\AbConfig;
@ -16,12 +17,15 @@ class Export_follows extends Controller
if (! local_channel()) {
return;
}
dbg(2);
$table = 'Account address,Show boosts' . "\n";
$connections = q("select * from abook where abook_channel = %d",
$connections = q("select abook_xchan from abook
left join abconfig on abconfig.xchan = abook_xchan and abook_channel = abconfig.chan
where abook_channel = %d and abconfig.cat = 'system' and abconfig.k = 'my_perms' and abconfig.v like '%%send_stream%%'
and abook_hidden = 0 and abook_pending = 0 and abook_self = 0",
intval(local_channel())
);
dbg(0);
if ($connections) {
$str = ids_to_querystr($connections, 'abook_xchan',true);
$locations = q("select hubloc_hash, hubloc_addr from hubloc where hubloc_hash in ($str) and hubloc_deleted = 0");

View file

@ -137,7 +137,7 @@ class New_channel extends Controller
change_channel($result['channel']['channel_id']);
$next_page = get_config('system', 'workflow_channel_next', 'profiles');
$next_page = get_config('system', 'workflow_channel_next', 'settings/profile_edit');
goaway(z_root() . '/' . $next_page);
}