aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-12-17 21:08:54 +0000
committerMario <mario@mariovavti.com>2021-12-17 21:08:54 +0000
commit2d9a4f4e42948767b06577f6263aa7b40956a3b6 (patch)
tree96935b8c6ff4a77b98d0a62eb14aaa7a0bde1e4a
parent565602538c28b7fd2e172b4ea6fdc0c907202842 (diff)
parent78972725aed933cca1b626749ab9b423eaea86a5 (diff)
downloadvolse-hubzilla-2d9a4f4e42948767b06577f6263aa7b40956a3b6.tar.gz
volse-hubzilla-2d9a4f4e42948767b06577f6263aa7b40956a3b6.tar.bz2
volse-hubzilla-2d9a4f4e42948767b06577f6263aa7b40956a3b6.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
-rw-r--r--Zotlabs/Module/Tokens.php23
1 files changed, 7 insertions, 16 deletions
diff --git a/Zotlabs/Module/Tokens.php b/Zotlabs/Module/Tokens.php
index 632e816ce..b1c8bb4bf 100644
--- a/Zotlabs/Module/Tokens.php
+++ b/Zotlabs/Module/Tokens.php
@@ -110,8 +110,8 @@ class Tokens extends Controller {
// If this is a new token, create a new abook record
- $closeness = get_pconfig($uid,'system','new_abook_closeness',80);
- $profile_assign = get_pconfig($uid,'system','profile_assign','');
+ $closeness = get_pconfig($channel['channel_id'], 'system', 'new_abook_closeness',80);
+ $profile_assign = get_pconfig($channel['channel_id'], 'system', 'profile_assign', '');
$r = abook_store_lowlevel(
[
@@ -132,11 +132,10 @@ class Tokens extends Controller {
}
/** If there is a default group for this channel, add this connection to it */
-
if ($channel['channel_default_group']) {
- $g = AccessList::by_hash($uid,$channel['channel_default_group']);
+ $g = AccessList::by_hash($channel['channel_id'], $channel['channel_default_group']);
if ($g) {
- AccessList::member_add($uid,'',$atoken_xchan,$g['id']);
+ AccessList::member_add($channel['channel_id'], '', $atoken_xchan,$g['id']);
}
}
}
@@ -281,8 +280,8 @@ class Tokens extends Controller {
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("tokens"),
'$permcat' => ['permcat', t('Select a role for this token'), $current_permcat, '', $permcats],
- '$title' => t('Guest Access Tokens'),
- '$desc' => $desc,
+ '$title' => t('Guest Access Tokens'),
+ '$desc' => $desc,
'$desc2' => $desc2,
'$tokens' => $t,
'$atoken' => $atoken,
@@ -291,15 +290,7 @@ class Tokens extends Controller {
'$name' => array('name', t('Login Name') . ' <span class="required">*</span>', (($atoken) ? $atoken['atoken_name'] : ''),''),
'$token'=> array('token', t('Login Password') . ' <span class="required">*</span>',(($atoken) ? $atoken['atoken_token'] : autoname(8)), ''),
'$expires'=> array('expires', t('Expires (yyyy-mm-dd)'), (($atoken['atoken_expires'] && $atoken['atoken_expires'] > NULL_DATE) ? datetime_convert('UTC',date_default_timezone_get(),$atoken['atoken_expires']) : ''), ''),
- '$them' => t('Their Settings'),
- '$me' => t('My Settings'),
- '$perms' => $perms,
- '$inherited' => t('inherited'),
- '$notself' => 1,
- '$self' => 0,
- '$permlbl' => t('Individual Permissions'),
- '$permnote' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can <strong>not</strong> change those settings here.'),
- '$submit' => t('Submit')
+ '$submit' => t('Submit')
));
return $o;
}