summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-05-21 14:01:31 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-05-21 14:01:31 -0700
commit061da28f58b29954d06f7a6699474b12bb9f4c63 (patch)
tree30ecb2d3e055ffdcc75ab5c7790057cb904c7510 /indra/newview/llviewermenu.cpp
parent2720449daa4b07188fd9a2f24246817f963c6d5c (diff)
EXP-1941: Adding in debug setting to force enable purchase flow disregarding other checks including maturity.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 12aed8f448..a5effe4f09 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -111,6 +111,9 @@
#include "lltoolgrab.h"
#include "llwindow.h"
#include "boost/unordered_map.hpp"
+#ifndef STINSON_ADULT_CHECK_HACK
+#include "llviewercontrol.h"
+#endif // STINSON_ADULT_CHECK_HACK
using namespace LLVOAvatarDefines;
@@ -335,7 +338,11 @@ void LLMenuParcelObserver::changed()
{
gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL));
+#ifndef STINSON_ADULT_CHECK_HACK
+ BOOL buyable = gSavedSettings.getBOOL("AdultCheckEnablePurchse") || enable_buy_land(NULL);
+#else // STINSON_ADULT_CHECK_HACK
BOOL buyable = enable_buy_land(NULL);
+#endif // STINSON_ADULT_CHECK_HACK
gMenuHolder->childSetEnabled("Land Buy", buyable);
gMenuHolder->childSetEnabled("Buy Land...", buyable);
}
@@ -3241,6 +3248,12 @@ void append_aggregate(std::string& string, const LLAggregatePermissions& ag_perm
bool enable_buy_object()
{
+#ifndef STINSON_ADULT_CHECK_HACK
+ if (gSavedSettings.getBOOL("AdultCheckEnablePurchse"))
+ {
+ return true;
+ }
+#endif // STINSON_ADULT_CHECK_HACK
// In order to buy, there must only be 1 purchaseable object in
// the selection manger.
if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != 1) return false;
@@ -5928,6 +5941,12 @@ class LLWorldEnableBuyLand : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+#ifndef STINSON_ADULT_CHECK_HACK
+ if (gSavedSettings.getBOOL("AdultCheckEnablePurchse"))
+ {
+ return true;
+ }
+#endif // STINSON_ADULT_CHECK_HACK
bool new_value = LLViewerParcelMgr::getInstance()->canAgentBuyParcel(
LLViewerParcelMgr::getInstance()->selectionEmpty()
? LLViewerParcelMgr::getInstance()->getAgentParcel()