summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerhelp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerhelp.cpp')
-rw-r--r--indra/newview/llviewerhelp.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 0e0727e382..056260791c 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -39,6 +39,7 @@
#include "llviewercontrol.h"
#include "llversionviewer.h"
#include "llappviewer.h"
+#include "lllogininstance.h"
#include "llviewerhelputil.h"
#include "llviewerhelp.h"
@@ -51,17 +52,25 @@ void LLViewerHelp::showTopic(const std::string &topic)
{
showHelp();
+ // allow overriding the help server with a local help file
if( gSavedSettings.getBOOL("HelpUseLocal") )
{
LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
helpbrowser->navigateToLocalPage( "help-offline" , "index.html" );
+ return;
}
- else
+
+ // use a special login topic before the user logs in
+ std::string help_topic = topic;
+ if (! LLLoginInstance::getInstance()->authSuccess())
{
- const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo();
- std::string helpURL = LLViewerHelpUtil::buildHelpURL( topic, gSavedSettings, osinfo );
- setRawURL( helpURL );
+ help_topic = preLoginTopic();
}
+
+ // work out the URL for this topic and display it
+ const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo();
+ std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo );
+ setRawURL( helpURL );
}
std::string LLViewerHelp::defaultTopic()
@@ -70,6 +79,12 @@ std::string LLViewerHelp::defaultTopic()
return "this_is_fallbacktopic";
}
+std::string LLViewerHelp::preLoginTopic()
+{
+ // *hack: to be done properly
+ return "pre_login_help";
+}
+
//////////////////////////////
// our own interfaces