Permalink
Browse files

New abuse reports upload the screenshot whenever possible

  • Loading branch information...
Lirusaito committed Nov 1, 2017
1 parent 188704d commit 4e6eaa2849595f6a92f5e36d9fcd4e456281e244
Showing with 6 additions and 24 deletions.
  1. +6 −24 indra/newview/llfloaterreporter.cpp
@@ -221,7 +221,6 @@ void LLFloaterReporter::draw()
void LLFloaterReporter::enableControls(BOOL enable)
{
getChildView("category_combo")->setEnabled(enable);
getChildView("screen_check")->setEnabled(enable);
getChildView("screenshot")->setEnabled(false);
getChildView("pick_btn")->setEnabled(enable);
getChildView("summary_edit")->setEnabled(enable);
@@ -389,19 +388,10 @@ void LLFloaterReporter::onClickSend(void *userdata)
}
else
{
if(self->getChild<LLUICtrl>("screen_check")->getValue())
{
self->getChildView("send_btn")->setEnabled(FALSE);
self->getChildView("cancel_btn")->setEnabled(FALSE);
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
else
{
self->sendReportViaLegacy(self->gatherReport());
LLUploadDialog::modalUploadFinished();
self->close();
}
self->getChildView("send_btn")->setEnabled(FALSE);
self->getChildView("cancel_btn")->setEnabled(FALSE);
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
}
}
@@ -646,20 +636,12 @@ LLSD LLFloaterReporter::gatherReport()
gGLManager.mGLRenderer.c_str(),
gGLManager.mDriverVersionVendorString.c_str());
// only send a screenshot ID if we're asked to and the email is
// going to LL - Estate Owners cannot see the screenshot asset
LLUUID screenshot_id = LLUUID::null;
if (getChild<LLUICtrl>("screen_check")->getValue())
{
screenshot_id = getChild<LLUICtrl>("screenshot")->getValue();
}
LLSD report = LLSD::emptyMap();
report["report-type"] = (U8) mReportType;
report["category"] = getChild<LLUICtrl>("category_combo")->getValue();
report["position"] = mPosition.getValue();
report["check-flags"] = (U8)0; // this is not used
report["screenshot-id"] = screenshot_id;
report["screenshot-id"] = getChild<LLUICtrl>("screenshot")->getValue();
report["object-id"] = mObjectID;
report["abuser-id"] = mAbuserID;
report["abuse-region-name"] = "";
@@ -743,7 +725,7 @@ class LLUserReportResponder : public LLHTTPClient::ResponderWithCompleted
void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url, const LLSD& report)
{
if(getChild<LLUICtrl>("screen_check")->getValue().asBoolean() && !sshot_url.empty())
if(!sshot_url.empty())
{
// try to upload screenshot
LLHTTPClient::post(sshot_url, report, new LLUserReportScreenshotResponder(report,

0 comments on commit 4e6eaa2

Please sign in to comment.