summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-09-29 19:33:03 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-09-29 19:33:03 +0100
commit4dfb0b7b2d76cf288cca34c23218c4769ec76991 (patch)
treecdd7992b4c3cb3bf35113fd80afada67a54ce581 /indra/newview
parent2669b54e2c25ca705c4a41a89d46dee7a199757e (diff)
finally, properly(?) deal with submitting empty text.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoastscripttextbox.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp
index 23ae4c142d..95f70eda88 100644
--- a/indra/newview/lltoastscripttextbox.cpp
+++ b/indra/newview/lltoastscripttextbox.cpp
@@ -63,8 +63,6 @@ LLToastScriptTextbox::LLToastScriptTextbox(LLNotificationPtr& notification)
llwarns << "LABEL " << notification->getLabel() << llendl;
llwarns << "URL " << notification->getURL() << llendl;
- //message subject
- //const std::string& subject = payload["subject"].asString();
//message body
const std::string& message = payload["message"].asString();
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3a8f76aca1..e284d8d154 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6180,9 +6180,12 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response)
std::string rtn_text;
S32 button_idx;
button_idx = LLNotification::getSelectedOption(notification, response);
- if (response[TEXTBOX_MAGIC_TOKEN].isString())
+ if (response[TEXTBOX_MAGIC_TOKEN].isDefined())
{
- rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString();
+ if (response[TEXTBOX_MAGIC_TOKEN].isString())
+ rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString();
+ else
+ rtn_text.clear(); // bool marks empty string
}
else
{