summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-07-15 17:14:45 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-07-15 17:14:45 -0700
commit474457ea7ea1bd178682788426a4cf40c3fffdcd (patch)
treecb372ccff994ca3802f67875c2728400a0d6c38c /indra
parent4562228a8ef833182ff055b00b0e569803d8b329 (diff)
DEV-51021 Viewer returns misleading error message when a blocked user attempts to change his display name
reviewed by Richard cc#220
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelme.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml7
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 0fc2a78bcd..5e8e07b962 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -395,8 +395,18 @@ void LLPanelMyProfileEdit::onClickSetName()
llinfos << "name-change now " << LLDate::now() << " next_update "
<< LLDate(av_name.mNextUpdate) << llendl;
F64 now_secs = LLDate::now().secondsSinceEpoch();
+
if (now_secs < av_name.mNextUpdate)
{
+ // if the update time is more than a year in the future, it means updates have been blocked
+ // show a more general message
+ const int YEAR = 60*60*24*365;
+ if (now_secs + YEAR < av_name.mNextUpdate)
+ {
+ LLNotificationsUtil::add("SetDisplayNameBlocked");
+ return;
+ }
+
// ...can't update until some time in the future
F64 next_update_local_secs =
av_name.mNextUpdate - LLStringOps::getLocalTimeOffset();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 92e71e3b01..616904d7f6 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3232,6 +3232,13 @@ Sorry, you cannot [http://wiki.secondlife.com/wiki/Setting_your_display_name cha
</notification>
<notification
+ icon="alertmodal.tga"
+ name="SetDisplayNameBlocked"
+ type="alert">
+Sorry, you cannot change your display name. If you feel this is in error, please contact support.
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="SetDisplayNameFailedLength"
type="alertmodal">