summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermenu.cpp20
-rw-r--r--indra/newview/llvovolume.cpp8
2 files changed, 16 insertions, 12 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index cc33dfcfef..9290b4c5a6 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3278,16 +3278,6 @@ void handle_buy_object(LLSaleInfo sale_info)
return;
}
- S32 price = sale_info.getSalePrice();
-
- if (price > 0 && price > gStatusBar->getBalance())
- {
- LLStringUtil::format_map_t args;
- args["AMOUNT"] = llformat("%d", price);
- LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price );
- return;
- }
-
LLFloaterBuy::show(sale_info);
}
@@ -4554,6 +4544,16 @@ void handle_buy()
BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
if (!valid) return;
+ S32 price = sale_info.getSalePrice();
+
+ if (price > 0 && price > gStatusBar->getBalance())
+ {
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", price);
+ LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price );
+ return;
+ }
+
if (sale_info.getSaleType() == LLSaleInfo::FS_CONTENTS)
{
handle_buy_contents(sale_info);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index d6453111d7..24e2f745d4 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1978,9 +1978,13 @@ bool LLVOVolume::hasMediaPermission(const LLMediaEntry* media_entry, MediaPermTy
}
// Group permissions
- else if (0 != (media_perms & LLMediaEntry::PERM_GROUP) && permGroupOwner())
+ else if (0 != (media_perms & LLMediaEntry::PERM_GROUP))
{
- return true;
+ LLPermissions* obj_perm = LLSelectMgr::getInstance()->findObjectPermissions(this);
+ if (obj_perm && gAgent.isInGroup(obj_perm->getGroup()))
+ {
+ return true;
+ }
}
// Owner permissions