mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-30 09:07:22 +08:00
[admin] add grant props
This commit is contained in:
+7
-5
@@ -227,11 +227,13 @@ if ($compact == 1) {
|
||||
}
|
||||
|
||||
//check ReAnnounce
|
||||
$params = $_GET;
|
||||
unset($params['key'], $params['ip'], $params['ipv4'], $params['ipv6']);
|
||||
$reAnnounceQuery = http_build_query($params);
|
||||
$lockKey = md5($reAnnounceQuery);
|
||||
$log .= ", [CHECK_RE_ANNOUNCE], reAnnounceQuery: $reAnnounceQuery, lockKey: $lockKey";
|
||||
$lockParams = [];
|
||||
foreach(['info_hash', 'passkey', 'peer_id'] as $lockField) {
|
||||
$lockParams[$lockField] = $_GET[$lockField];
|
||||
}
|
||||
$lockString = http_build_query($lockParams);
|
||||
$lockKey = md5($lockString);
|
||||
$log .= ", [CHECK_RE_ANNOUNCE], lockString: $lockString, lockKey: $lockKey";
|
||||
$redis = $Cache->getRedis();
|
||||
if (!$redis->set($lockKey, TIMENOW, ['nx', 'ex' => 5])) {
|
||||
do_log("$log, [YES_RE_ANNOUNCE]");
|
||||
|
||||
@@ -306,7 +306,7 @@ JS;
|
||||
\Nexus\Nexus::js($warnMedalJs, 'footer', false);
|
||||
}
|
||||
//User meta
|
||||
$metas = $userRep->listMetas($CURUSER['id']);
|
||||
$metas = $userRep->listMetas($user['id']);
|
||||
$props = [];
|
||||
$metaKey = \App\Models\UserMeta::META_KEY_CHANGE_USERNAME;
|
||||
if ($metas->has($metaKey)) {
|
||||
@@ -358,14 +358,14 @@ if ($metas->has($metaKey)) {
|
||||
$rainbowID = $metas->get($metaKey)->first();
|
||||
if ($rainbowID->isValid()) {
|
||||
$props[] = sprintf(
|
||||
'<div><strong>[%s]</strong>(%s: %s)</div>',
|
||||
$rainbowID->metaKeyText, nexus_trans('label.deadline'), $rainbowID->deadline
|
||||
'<div><strong>[%s]</strong>(%s)</div>',
|
||||
$rainbowID->metaKeyText, $rainbowID->getDeadlineText()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($props)) {
|
||||
tr_small($lang_userdetails['row_user_props'], sprintf('<div style="display: inline">%s</div>', implode(' | ', $props)), 1);
|
||||
tr_small($lang_userdetails['row_user_props'], sprintf('<div style="display: flex;align-items: center">%s</div>', implode(' | ', $props)), 1);
|
||||
}
|
||||
|
||||
tr_small($lang_userdetails['row_torrent_comment'], ($torrentcomments && ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) ? "<a href=\"userhistory.php?action=viewcomments&id=".$id."\" title=\"".$lang_userdetails['link_view_comments']."\">".$torrentcomments."</a>" : $torrentcomments), 1);
|
||||
|
||||
Reference in New Issue
Block a user