Check current balance before allowing bulk uploads
parent
d0f22f655b
commit
a22009d0cc
|
|
@ -518,6 +518,15 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::
|
|||
LLSD args;
|
||||
args["COST"] = expected_upload_cost;
|
||||
args["COUNT"] = expected_upload_count;
|
||||
// <FS:Ansariel> Check balance before trying to upload
|
||||
S32 current_balance = gStatusBar->getBalance();
|
||||
if (expected_upload_cost > current_balance)
|
||||
{
|
||||
args["BALANCE"] = current_balance;
|
||||
LLNotificationsUtil::add("NotEnoughMoneyForBulkUpload", args);
|
||||
return;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
LLNotificationsUtil::add("BulkUploadCostConfirmation", args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2));
|
||||
|
||||
if (filtered_filenames.size() > expected_upload_count)
|
||||
|
|
|
|||
|
|
@ -3552,6 +3552,10 @@ Voreinstellung überschreiben oder einen anderen Namen wählen
|
|||
Das Hochladen von [COUNT] Gegenständen wird insgesamt [COST] L$ kosten. Möchten Sie mit dem Hochladen fortfahren?
|
||||
<usetemplate name="okcancelignore" notext="Abbrechen" yestext="Hochladen" ignoretext="Mehrfach-Uploads bestätigen"/>
|
||||
</notification>
|
||||
<notification name="NotEnoughMoneyForBulkUpload">
|
||||
Ihr aktueller Kontostand von [BALANCE] L$ reicht nicht aus, um [COUNT] Gegenstände für insgesamt [COST] L$ hochzuladen.
|
||||
<usetemplate name="okbutton" yestext="OK"/>
|
||||
</notification>
|
||||
<notification name="BulkUploadNoCompatibleFiles">
|
||||
Die ausgewählten Dateien können nicht per Mehrfach-Upload hochgeladen werden.
|
||||
<usetemplate name="okbutton" yestext="OK"/>
|
||||
|
|
|
|||
|
|
@ -9258,6 +9258,16 @@ This will upload [COUNT] items at a total cost of L$[COST]. Do you wish to conti
|
|||
notext="Cancel"
|
||||
yestext="Upload"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="NotEnoughMoneyForBulkUpload"
|
||||
type="alertmodal">
|
||||
Your current balance of L$[BALANCE] is not enough to upload [COUNT] items at a total cost of L$[COST].
|
||||
<usetemplate
|
||||
name="okbutton"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
|
|
|
|||
Loading…
Reference in New Issue