Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
6cb420b2
Commit
6cb420b2
authored
15 years ago
by
Leyla Farazha
Browse files
Options
Downloads
Patches
Plain Diff
added function for building a username from a legacy name and fixed group notice panel
reviewed by James
parent
c5c13a92
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llmessage/llcachename.cpp
+24
-0
24 additions, 0 deletions
indra/llmessage/llcachename.cpp
indra/llmessage/llcachename.h
+5
-0
5 additions, 0 deletions
indra/llmessage/llcachename.h
indra/newview/llpanelgroupnotices.cpp
+2
-2
2 additions, 2 deletions
indra/newview/llpanelgroupnotices.cpp
with
31 additions
and
2 deletions
indra/llmessage/llcachename.cpp
+
24
−
0
View file @
6cb420b2
...
...
@@ -527,6 +527,30 @@ std::string LLCacheName::cleanFullName(const std::string& full_name)
return
full_name
.
substr
(
0
,
full_name
.
find
(
" Resident"
));
}
//static
std
::
string
LLCacheName
::
buildUsername
(
const
std
::
string
&
full_name
)
{
std
::
string
::
size_type
index
=
full_name
.
find
(
' '
);
if
(
index
!=
std
::
string
::
npos
)
{
std
::
string
username
;
username
=
full_name
.
substr
(
0
,
index
);
std
::
string
lastname
=
full_name
.
substr
(
index
+
1
);
if
(
lastname
!=
"Resident"
)
{
username
=
username
+
"."
+
lastname
;
}
LLStringUtil
::
toLower
(
username
);
return
username
;
}
// if the input wasn't a correctly formatted legacy name just return it unchanged
return
full_name
;
}
// This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer.
// The reason it is a slot is so that the legacy get() function below can bind an old callback
// and pass it as a slot. The reason it isn't a boost::function is so that trackable behavior
...
...
This diff is collapsed.
Click to expand it.
indra/llmessage/llcachename.h
+
5
−
0
View file @
6cb420b2
...
...
@@ -91,6 +91,11 @@ class LLCacheName
// If name does not contain "Resident" returns it unchanged.
static
std
::
string
cleanFullName
(
const
std
::
string
&
full_name
);
// Converts a standard legacy name to a username
// "bobsmith123 Resident" -> "bobsmith"
// "Random Linden" -> "random.linden"
static
std
::
string
buildUsername
(
const
std
::
string
&
name
);
// If available, this method copies the group name into the string
// provided. The caller must allocate at least
// DB_GROUP_NAME_BUF_SIZE characters. If not available, this
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llpanelgroupnotices.cpp
+
2
−
2
View file @
6cb420b2
...
...
@@ -548,8 +548,8 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
msg
->
getU8
(
"Data"
,
"AssetType"
,
asset_type
,
i
);
msg
->
getU32
(
"Data"
,
"Timestamp"
,
timestamp
,
i
);
//
IDEVO clean up legacy "Resident"
name
s
name
=
LLCacheName
::
cleanFullN
ame
(
name
);
//
we only have the legacy name here, convert it to a user
name
name
=
LLCacheName
::
buildUsern
ame
(
name
);
LLSD
row
;
row
[
"id"
]
=
id
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment