diff --git a/include/functions.php b/include/functions.php
index 2670e05c..d4c3f9be 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -523,7 +523,7 @@ function get_user_class_name($class, $compact = false, $b_colored = false, $I18N
case UC_SYSOP: {$class_name = $this_lang_functions['text_sysops']; break;}
case UC_STAFFLEADER: {$class_name = $this_lang_functions['text_staff_leader']; break;}
}
- if ($class < UC_VIP && isset($settingAccount["{$class}_alias"])) {
+ if (isset($options['with_alias']) && $options['with_alias'] && $class < UC_VIP && isset($settingAccount["{$class}_alias"])) {
$alias = trim($settingAccount["{$class}_alias"]);
if (!empty($alias)) {
$class_name = sprintf('%s(%s)', $class_name, $alias);
@@ -3872,11 +3872,7 @@ function get_username($id, $big = false, $link = true, $bold = true, $target = f
}
$href = getSchemeAndHttpHost() . "/userdetails.php?id=$id";
- $options = [
-// 'uid' => $id,
-// 'with_role' => true,
- ];
- $username = ($link == true ? "" . $username . "" : $username) . $pics . ($withtitle == true ? " (" . ($arr['title'] == "" ? get_user_class_name($arr['class'],false,true,true, $options) : "".htmlspecialchars($arr['title'])) . ")" : "");
+ $username = ($link == true ? "" . $username . "" : $username) . $pics . ($withtitle == true ? " (" . ($arr['title'] == "" ? get_user_class_name($arr['class'],false,true,true, ['with_alias' => true]) : "".htmlspecialchars($arr['title'])) . ")" : "");
$username = "" . ( $bracket == true ? "(" . $username . ")" : $username) . "$medalHtml";
}
diff --git a/lang/chs/lang_mybonus.php b/lang/chs/lang_mybonus.php
index 74bd1daf..21bc88aa 100644
--- a/lang/chs/lang_mybonus.php
+++ b/lang/chs/lang_mybonus.php
@@ -151,6 +151,7 @@ $lang_mybonus = array
'reward_type_official_addition' => '官种加成',
'text_get_by_harem' => '后宫加成每小时将额外得到如下的魔力值',
'harem_additional_desc' => '后宫只考虑直属后宫。每个后宫加成值可在此查看',
+ 'harem_additional_note' => '注意:如果自己不做种,此加成值不会增加到用户账号上',
'harem_additional_factor' => '所得奖励为全部后宫的时魔(不考虑加成)之和,乘以后宫加成系数,当前值为:',
'text_bonus_summary' => '每小时获得的合计魔力值',
'col_count' => '数量',
diff --git a/lang/cht/lang_mybonus.php b/lang/cht/lang_mybonus.php
index 463564fa..9232a3b9 100644
--- a/lang/cht/lang_mybonus.php
+++ b/lang/cht/lang_mybonus.php
@@ -151,6 +151,7 @@ $lang_mybonus = array
'reward_type_official_addition' => '官種加成',
'text_get_by_harem' => '後宮加成每小時將額外得到如下的魔力值',
'harem_additional_desc' => '後宮只考慮直屬後宮。每個後宮加成值可在此查看',
+ 'harem_additional_note' => '註意:如果自己不做種,此加成值不會增加到用戶賬號上',
'harem_additional_factor' => '所得獎勵為全部後宮的時魔(不考慮加成)之和,乘以後宮加成系數,當前值為:',
'text_bonus_summary' => '每小時獲得的合計魔力值',
'col_count' => '數量',
diff --git a/lang/en/lang_mybonus.php b/lang/en/lang_mybonus.php
index c07236cf..fa57f0a5 100644
--- a/lang/en/lang_mybonus.php
+++ b/lang/en/lang_mybonus.php
@@ -151,6 +151,7 @@ where
- A is an intermediate variable
- Ti is the i<
'reward_type_official_addition' => 'Official addition',
'text_get_by_harem' => 'The harem addition will give the following additional bonus value per hour',
'harem_additional_desc' => "Only direct harems will be considered for the harem. Each harem's bonus addition value can be viewed here",
+ 'harem_additional_note' => 'Note: If you do not do the seeding yourself, this bonus value will not be added to the user account',
'harem_additional_factor' => 'The reward obtained is the sum of the hourly bonus of all the harems (regardless of the addition), multiplied by the harem bonus factor, with the current value of ',
'text_bonus_summary' => 'Total bonus gained per hour',
'col_count' => 'Counts',
diff --git a/public/details.php b/public/details.php
index 4c1f30e9..4f0aab5d 100644
--- a/public/details.php
+++ b/public/details.php
@@ -111,7 +111,6 @@ if (!$row) {
else {
$uprow = (isset($row['owner']) ? get_username($row['owner'], false, true, true, false, false, true) : "".$lang_details['text_unknown']."");
}
-
if ($CURUSER["id"] == $row["owner"])
$CURUSER["downloadpos"] = "yes";
if ($CURUSER["downloadpos"] != "no")
diff --git a/public/invite.php b/public/invite.php
index 841d457e..2fd8bcc5 100644
--- a/public/invite.php
+++ b/public/invite.php
@@ -9,7 +9,7 @@ $type = unesc($_GET["type"] ?? '');
$menuSelected = $_REQUEST['menu'] ?? 'invitee';
$pageSize = 50;
if (($CURUSER['id'] != $id && !user_can('viewinvite')) || !is_valid_id($id))
- stderr($lang_invite['std_sorry'],$lang_invite['std_permission_denied']);
+ stderr($lang_invite['std_sorry'],$lang_invite['std_permission_denied'], true, false);
$userRep = new \App\Repositories\UserRepository();
function inviteMenu ($selected = "invitee") {
global $lang_invite, $id, $CURUSER, $invitesystem, $userRep;
@@ -25,7 +25,9 @@ function inviteMenu ($selected = "invitee") {
$sendBtnText = $exception->getMessage();
$disabled = ' disabled';
}
- print ("
");
+ if ($CURUSER['id'] == $id) {
+ print ("");
+ }
end_main_frame();
}
@@ -54,6 +56,9 @@ if ($inv["invites"] != 1){
}
if ($type == 'new'){
+ if ($CURUSER['id'] != $id) {
+ stderr($lang_invite['std_sorry'],$lang_invite['std_permission_denied'], true, false);
+ }
try {
$sendBtnText = $userRep->getInviteBtnText($CURUSER['id']);
} catch (\Exception $exception) {
diff --git a/public/mybonus.php b/public/mybonus.php
index 9511a3f3..2ac51702 100644
--- a/public/mybonus.php
+++ b/public/mybonus.php
@@ -509,6 +509,7 @@ if ($bonusTableResult['has_harem_addition']) {
print("");
print("- ".sprintf($lang_mybonus['harem_additional_desc'], $CURUSER['id'])."
");
print("- ".$lang_mybonus['harem_additional_factor'].$bonusTableResult['harem_addition_factor']."
");
+ print("- ".$lang_mybonus['harem_additional_note']."
");
print("
");
}
diff --git a/public/userdetails.php b/public/userdetails.php
index 3f0cec11..8d89f790 100644
--- a/public/userdetails.php
+++ b/public/userdetails.php
@@ -195,11 +195,12 @@ if (($user["privacy"] != "strong") OR (user_can('prfmanage')) || $CURUSER['id']
}
*/
tr_small($lang_userdetails['text_user_id'], $userIdDisplay, 1);
+ $tmpInviteCount = $userInfo->temporary_invites()->count();
if ($CURUSER['id'] == $user['id'] || user_can('viewinvite')){
- if ($user["invites"] <= 0)
+ if ($user["invites"] <= 0 && $tmpInviteCount <= 0)
tr_small($lang_userdetails['row_invitation'], $lang_userdetails['text_no_invitation'], 1);
else
- tr_small($lang_userdetails['row_invitation'], "".$user['invites']."", 1);}
+ tr_small($lang_userdetails['row_invitation'], "".sprintf('%s(%s)', $user['invites'], $tmpInviteCount)."", 1);}
else{
if ($CURUSER['id'] != $user['id'] || get_user_class() != $viewinvite_class){
if ($user["invites"] <= 0)