summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupactions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgroupactions.cpp')
-rw-r--r--indra/newview/llgroupactions.cpp44
1 files changed, 42 insertions, 2 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 84a1278767..aec6c23e34 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -53,6 +53,31 @@ class LLGroupHandler : public LLCommandHandler
public:
// requires trusted browser to trigger
LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { }
+
+ virtual bool canHandleUntrusted(
+ const LLSD& params,
+ const LLSD& query_map,
+ LLMediaCtrl* web,
+ const std::string& nav_type)
+ {
+ if (params.size() < 1)
+ {
+ return true; // don't block, will fail later
+ }
+
+ if (nav_type == NAV_TYPE_CLICKED)
+ {
+ return true;
+ }
+
+ const std::string verb = params[0].asString();
+ if (verb == "create")
+ {
+ return false;
+ }
+ return true;
+ }
+
bool handle(const LLSD& tokens, const LLSD& query_map,
LLMediaCtrl* web)
{
@@ -175,8 +200,7 @@ public:
virtual void processGroupData() = 0;
protected:
LLUUID mGroupId;
-private:
- bool mRequestProcessed;
+ bool mRequestProcessed;
};
class LLFetchLeaveGroupData: public LLFetchGroupMemberData
@@ -189,6 +213,22 @@ public:
{
LLGroupActions::processLeaveGroupDataResponse(mGroupId);
}
+ void changed(LLGroupChange gc)
+ {
+ if (gc == GC_PROPERTIES && !mRequestProcessed)
+ {
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupId);
+ if (!gdatap)
+ {
+ LL_WARNS() << "GroupData was NULL" << LL_ENDL;
+ }
+ else
+ {
+ processGroupData();
+ mRequestProcessed = true;
+ }
+ }
+ }
};
LLFetchLeaveGroupData* gFetchLeaveGroupData = NULL;