Merge remote-tracking branch 'upstream/develop' into dfrn-rework
This commit is contained in:
@@ -1735,13 +1735,28 @@ function admin_page_users(App $a)
|
||||
|
||||
$adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
|
||||
$_setup_users = function ($e) use ($adminlist) {
|
||||
$accounts = [
|
||||
L10n::t('Normal Account'),
|
||||
L10n::t('Automatic Follower Account'),
|
||||
L10n::t('Public Forum Account'),
|
||||
L10n::t('Automatic Friend Account')
|
||||
$page_types = [
|
||||
PAGE_NORMAL => L10n::t('Normal Account Page'),
|
||||
PAGE_SOAPBOX => L10n::t('Soapbox Page'),
|
||||
PAGE_COMMUNITY => L10n::t('Public Forum'),
|
||||
PAGE_FREELOVE => L10n::t('Automatic Friend Page'),
|
||||
PAGE_PRVGROUP => L10n::t('Private Forum')
|
||||
];
|
||||
$e['page-flags'] = $accounts[$e['page-flags']];
|
||||
$account_types = [
|
||||
ACCOUNT_TYPE_PERSON => L10n::t('Personal Page'),
|
||||
ACCOUNT_TYPE_ORGANISATION => L10n::t('Organisation Page'),
|
||||
ACCOUNT_TYPE_NEWS => L10n::t('News Page'),
|
||||
ACCOUNT_TYPE_COMMUNITY => L10n::t('Community Forum')
|
||||
];
|
||||
|
||||
|
||||
|
||||
$e['page-flags-raw'] = $e['page-flags'];
|
||||
$e['page-flags'] = $page_types[$e['page-flags']];
|
||||
|
||||
$e['account-type-raw'] = ($e['page_flags_raw']==0) ? $e['account-type'] : -1;
|
||||
$e['account-type'] = ($e['page_flags_raw']==0) ? $account_types[$e['account-type']] : "";
|
||||
|
||||
$e['register_date'] = Temporal::getRelativeDate($e['register_date']);
|
||||
$e['login_date'] = Temporal::getRelativeDate($e['login_date']);
|
||||
$e['lastitem_date'] = Temporal::getRelativeDate($e['lastitem_date']);
|
||||
@@ -1778,8 +1793,7 @@ function admin_page_users(App $a)
|
||||
array_push($users, array_pop($tmp_users));
|
||||
}
|
||||
|
||||
$th_users = array_map(null, [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Account')], $valid_orders
|
||||
);
|
||||
$th_users = array_map(null, [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Type')], $valid_orders);
|
||||
|
||||
$t = get_markup_template('admin/users.tpl');
|
||||
$o = replace_macros($t, [
|
||||
|
||||
@@ -23,9 +23,18 @@ function noscrape_init(App $a)
|
||||
|
||||
Profile::load($a, $which, $profile);
|
||||
|
||||
$json_info = [
|
||||
'addr' => $a->profile['addr'],
|
||||
'nick' => $which,
|
||||
'guid' => $a->profile['guid'],
|
||||
'key' => $a->profile['pubkey'],
|
||||
'homepage' => System::baseUrl()."/profile/{$which}",
|
||||
'comm' => ($a->profile['account-type'] == ACCOUNT_TYPE_COMMUNITY),
|
||||
];
|
||||
|
||||
if (!$a->profile['net-publish'] || $a->profile['hidewall']) {
|
||||
header('Content-type: application/json; charset=utf-8');
|
||||
$json_info = ["hide" => true];
|
||||
$json_info["hide"] = true;
|
||||
echo json_encode($json_info);
|
||||
exit;
|
||||
}
|
||||
@@ -36,17 +45,9 @@ function noscrape_init(App $a)
|
||||
|
||||
$contactPhoto = dba::selectFirst('contact', ['photo'], ['self' => true, 'uid' => $a->profile['uid']]);
|
||||
|
||||
$json_info = [
|
||||
'fn' => $a->profile['name'],
|
||||
'addr' => $a->profile['addr'],
|
||||
'nick' => $which,
|
||||
'guid' => $a->profile['guid'],
|
||||
'key' => $a->profile['pubkey'],
|
||||
'homepage' => System::baseUrl()."/profile/{$which}",
|
||||
'comm' => (x($a->profile, 'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY),
|
||||
'photo' => $contactPhoto["photo"],
|
||||
'tags' => $keywords
|
||||
];
|
||||
$json_info['fn'] = $a->profile['name'];
|
||||
$json_info['photo'] = $contactPhoto["photo"];
|
||||
$json_info['tags'] = $keywords;
|
||||
|
||||
if (is_array($a->profile) && !$a->profile['hide-friends']) {
|
||||
/// @todo What should this value tell us?
|
||||
|
||||
Reference in New Issue
Block a user