New abuse reports upload the screenshot whenever possible

This commit is contained in:
Liru
2017-11-01 18:15:47 -04:00
parent 188704d177
commit 4e6eaa2849

View File

@@ -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 @@ private:
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,