FIRE-7343: Seperate chat logs per grid
parent
bacb28ebfa
commit
0b2d220a2c
|
|
@ -631,7 +631,10 @@ void LLDir::setChatLogsDir(const std::string &path)
|
|||
}
|
||||
}
|
||||
|
||||
void LLDir::setPerAccountChatLogsDir(const std::string &username)
|
||||
// <FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
//void LLDir::setPerAccountChatLogsDir(const std::string &username)
|
||||
void LLDir::setPerAccountChatLogsDir(const std::string &gridname, const std::string &username, bool append)
|
||||
// <//FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
{
|
||||
// if both first and last aren't set, assume we're grabbing the cached dir
|
||||
if (!username.empty())
|
||||
|
|
@ -641,9 +644,21 @@ void LLDir::setPerAccountChatLogsDir(const std::string &username)
|
|||
std::string userlower(username);
|
||||
LLStringUtil::toLower(userlower);
|
||||
LLStringUtil::replaceChar(userlower, ' ', '_');
|
||||
// <FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
std::string gridlower(gridname);
|
||||
LLStringUtil::toLower(gridlower);
|
||||
LLStringUtil::replaceChar(gridlower, ' ', '_');
|
||||
// </FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
mPerAccountChatLogsDir = getChatLogsDir();
|
||||
mPerAccountChatLogsDir += mDirDelimiter;
|
||||
mPerAccountChatLogsDir += userlower;
|
||||
// <FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
// If the user has elected, append the grid name to chat log directories
|
||||
if (append && !gridname.empty())
|
||||
{
|
||||
mPerAccountChatLogsDir += "." + gridlower;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -160,7 +160,10 @@ class LLDir
|
|||
static std::string getForbiddenFileChars();
|
||||
|
||||
virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir
|
||||
virtual void setPerAccountChatLogsDir(const std::string &username); // Set the per user chat log directory.
|
||||
// <FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
//virtual void setPerAccountChatLogsDir(const std::string &username); // Set the per user chat log directory.
|
||||
virtual void setPerAccountChatLogsDir(const std::string &gridname, const std::string &username, bool append); // Set the per user chat log directory.
|
||||
// </FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
virtual void setLindenUserDir(const std::string &username); // Set the linden user dir to this user's dir
|
||||
virtual void setSkinFolder(const std::string &skin_folder);
|
||||
virtual void setSkinThemeFolder(const std::string &theme_folder); // KB: Catznip Viewer-skins
|
||||
|
|
|
|||
|
|
@ -18862,5 +18862,16 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSAppendGridToLogFolder</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Append grid name to chat log folder</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,11 @@ bool idle_startup()
|
|||
{
|
||||
gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
|
||||
}
|
||||
gDirUtilp->setPerAccountChatLogsDir(userid);
|
||||
// <FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
//gDirUtilp->setPerAccountChatLogsDir(userid);
|
||||
static LLCachedControl<bool> AppendGrid(gSavedSettings, "FSAppendGridToLogFolder");
|
||||
gDirUtilp->setPerAccountChatLogsDir(LLGridManager::getInstance()->getGridLabel(), userid, AppendGrid);
|
||||
// </FS:CR> FIRE-7343: Seperate chat logs per grid
|
||||
|
||||
LLFile::mkdir(gDirUtilp->getChatLogsDir());
|
||||
LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir());
|
||||
|
|
|
|||
Loading…
Reference in New Issue