FIRE-10567: Support for upcoming OpenSim definable classified ads fee. Move check from GridInfo to login response.

meow-7.2.2
Cinders 2013-06-11 21:24:53 -06:00
parent e3ac1c7d1b
commit bcc9e83a25
5 changed files with 20 additions and 18 deletions

View File

@ -564,14 +564,6 @@ void LLGridManager::gridInfoResponderCB(GridEntry* grid_entry)
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_DIRECTORY_FEE] << LL_ENDL;
continue;
}
/// <FS:CR> NOTE: As far as I can tell, this setting doesn't exist on any platform at present,
/// adding it for the future while fixing FIRE-9814
check = "ClassifiedFee";
if (node->hasName(check))
{
grid_entry->grid[GRID_CLASSIFIED_FEE] = node->getTextContents();
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_CLASSIFIED_FEE] << LL_ENDL;
}
check = "CurrencySymbol";
if (node->hasName(check))
{

View File

@ -59,7 +59,6 @@ extern const char* DEFAULT_LOGIN_PAGE;
#define GRID_PROFILE_URI_VALUE "profileuri"
#define GRID_SENDGRIDINFO "SendGridInfoToViewerOnLogin"
#define GRID_DIRECTORY_FEE "DirectoryFee"
#define GRID_CLASSIFIED_FEE "ClassifiedFee"
#define GRID_CURRENCY_SYMBOL "CurrencySymbol"
#define GRID_REAL_CURRENCY_SYMBOL "RealCurrencySymbol"
#define GRID_MAXGROUPS "MaxGroups"
@ -258,6 +257,11 @@ public:
// </AW opensim>
void clearFavorites();
void addGrid(GridEntry* grid_info, AddState state);
// <FS:CR> FIRE-10567 - Variable classified fee
void setClassifiedFee(const S32 classified_fee) { sClassifiedFee = classified_fee; }
S32 getClassifiedFee() { return sClassifiedFee; }
// </FS:CR>
private:
friend class GridInfoRequestResponder;
@ -266,6 +270,7 @@ private:
void gridInfoResponderCB(GridEntry* grid_data);
void setGridData(const LLSD &grid_info) { mGridList[mGrid]=grid_info; }
S32 sClassifiedFee; // <FS:CR> FIRE-10567 - Variable classified fee
protected:

View File

@ -862,9 +862,7 @@ S32 FSPanelClassifiedEdit::getClassifiedFee()
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
LLSD grid_info;
LLGridManager::getInstance()->getGridData(grid_info);
fee = grid_info[GRID_CLASSIFIED_FEE].asInteger();
fee = LLGridManager::getInstance()->getClassifiedFee();
}
#endif // OPENSIM
return fee;

View File

@ -862,9 +862,7 @@ S32 LLPanelClassifiedEdit::getClassifiedFee()
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
LLSD grid_info;
LLGridManager::getInstance()->getGridData(grid_info);
fee = grid_info[GRID_CLASSIFIED_FEE].asInteger();
fee = LLGridManager::getInstance()->getClassifiedFee();
}
#endif // OPENSIM
return fee;

View File

@ -3873,9 +3873,18 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y
gSavedSettings.setString("WebProfileURL", web_profile_url);
LL_INFOS("LLStartup") << "web_profile_url : no web_profile_url answer, we use the default setting for the web : " << web_profile_url << LL_ENDL;
}
#endif // OPENSIM
// </FS:CR> FIRE-8063: Read Aurora web profile url from login data
// <FS:CR> FIRE-10567 - Set classified fee, if it's available.
if (response.has("classified_fee"))
{
S32 classified_fee = response["classified_fee"];
LLGridManager::getInstance()->setClassifiedFee(classified_fee);
}
else
{
LLGridManager::getInstance()->setClassifiedFee(0); // Free is a sensible default
}
#endif // OPENSIM
// </FS:CR>
// Default male and female avatars allowing the user to choose their avatar on first login.
// These may be passed up by SLE to allow choice of enterprise avatars instead of the standard
// "new ruth." Not to be confused with 'initial-outfit' below