diff options
| author | Merov Linden <merov@lindenlab.com> | 2010-09-08 23:06:01 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2010-09-08 23:06:01 -0700 |
| commit | 657f75b89de4cfd5ade82e3bc30e236cd2533017 (patch) | |
| tree | 09d6b1bcf6a89795dfa1bf5b8acaa1de77344ee3 /indra/newview/llnearbychatbar.cpp | |
| parent | 39e5d2ecf04deceda92d6a53413298ca1c3bc0c7 (diff) | |
| parent | a2fb3fabc7926dd105393391f334baa78f232640 (diff) | |
Pull from lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
| -rw-r--r-- | indra/newview/llnearbychatbar.cpp | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 4f9845d704..a8e4a759b7 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -103,10 +103,10 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) , mViewAllItemIndex(0) , mGetMoreItemIndex(0) { - LLButton::Params button_params = p.combo_button; + LLBottomtrayButton::Params button_params = p.combo_button; button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); - mButton = LLUICtrlFactory::create<LLButton>(button_params); + mButton = LLUICtrlFactory::create<LLBottomtrayButton>(button_params); mButton->reshape(getRect().getWidth(),getRect().getHeight()); mButton->setCommitCallback(boost::bind(&LLGestureComboList::onButtonCommit, this)); @@ -865,14 +865,30 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - if (tokens.size() < 2) return false; - S32 channel = tokens[0].asInteger(); - - // Send unescaped message, see EXT-6353. - std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); - - send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); - return true; + bool retval = false; + // Need at least 2 tokens to have a valid message. + if (tokens.size() < 2) + { + retval = false; + } + else + { + S32 channel = tokens[0].asInteger(); + // VWR-19499 Restrict function to chat channels greater than 0. + if ((channel > 0) && (channel < 2147483647)) + { + retval = true; + // Send unescaped message, see EXT-6353. + std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); + send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); + } + else + { + retval = false; + // Tell us this is an unsupported SLurl. + } + } + return retval; } }; |
