Remove HelpUseLocal setting variable. Hide local html skin dir.
We assert that the local html directory is no longer used. Remove machinery related to its use, notably HelpUseLocal, the code that checks it and the code that sets and examines special flag URL "__local". Before actually killing off the local skins/default/html directory, make viewer_manifest.py rename it but continue packaging it as html.old. If this doesn't cause a panic, we can proceed with removing it entirely.meow-7.2.2
parent
3653727e7f
commit
fdddd37db0
|
|
@ -4040,17 +4040,6 @@
|
|||
<key>Value</key>
|
||||
<integer>305</integer>
|
||||
</map>
|
||||
<key>HelpUseLocal</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If set, always use this for help: skins/default/html/[LANGUAGE]/help-offline/index.html</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>HelpURLFormat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -77,15 +77,7 @@ void LLFloaterHelpBrowser::onOpen(const LLSD& key)
|
|||
gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
|
||||
|
||||
std::string topic = key.asString();
|
||||
|
||||
if (topic == "__local")
|
||||
{
|
||||
mBrowser->navigateToLocalPage( "help-offline" , "index.html" );
|
||||
}
|
||||
else
|
||||
{
|
||||
mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic));
|
||||
}
|
||||
mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic));
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
|
|||
|
|
@ -3281,11 +3281,8 @@ bool process_login_success_response()
|
|||
{
|
||||
// replace the default help URL format
|
||||
gSavedSettings.setString("HelpURLFormat",text);
|
||||
|
||||
// don't fall back to Standalone's pre-connection static help
|
||||
gSavedSettings.setBOOL("HelpUseLocal", false);
|
||||
}
|
||||
|
||||
|
||||
std::string home_location = response["home"];
|
||||
if(!home_location.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,12 +71,6 @@ LLHelpHandler gHelpHandler;
|
|||
|
||||
std::string LLViewerHelp::getURL(const std::string &topic)
|
||||
{
|
||||
// allow overriding the help server with a local help file
|
||||
if( gSavedSettings.getBOOL("HelpUseLocal") )
|
||||
{
|
||||
return "__local";
|
||||
}
|
||||
|
||||
// if the help topic is empty, use the default topic
|
||||
std::string help_topic = topic;
|
||||
if (help_topic.empty())
|
||||
|
|
|
|||
|
|
@ -28,7 +28,10 @@ $/LicenseInfo$
|
|||
"""
|
||||
import sys
|
||||
import os.path
|
||||
import errno
|
||||
import glob
|
||||
import re
|
||||
import shutil
|
||||
import tarfile
|
||||
import time
|
||||
import random
|
||||
|
|
@ -136,6 +139,30 @@ class ViewerManifest(LLManifest):
|
|||
self.path("*/*/*.html")
|
||||
self.path("*/*/*.gif")
|
||||
self.end_prefix("*/html")
|
||||
|
||||
# The claim is that we never use local html files any
|
||||
# longer. But rather than commenting out the "*/html"
|
||||
# block above, let's rename every html subdirectory we
|
||||
# copied as html.old. That way, if we're wrong, a user
|
||||
# actually does have the relevant files; s/he just needs
|
||||
# to rename every html.old directory back to html to
|
||||
# recover them. (Possibly I could accomplish the rename
|
||||
# with clever use of self.prefix(), but the leading "*"
|
||||
# perplexes me.)
|
||||
for htmldir in glob.glob(os.path.join(self.get_dst_prefix(), "*", "html")):
|
||||
htmlold = htmldir + ".old"
|
||||
print "Renaming %r => %r" % (htmldir, os.path.basename(htmlold))
|
||||
try:
|
||||
os.rename(htmldir, htmlold)
|
||||
except OSError, err:
|
||||
if err.errno != errno.ENOTEMPTY:
|
||||
raise
|
||||
# If we already have a directory by that name and
|
||||
# it's not empty, remove it and retry.
|
||||
shutil.rmtree(htmlold)
|
||||
# If it still blows up, let the exception propagate.
|
||||
os.rename(htmldir, htmlold)
|
||||
|
||||
self.end_prefix("skins")
|
||||
|
||||
# local_assets dir (for pre-cached textures)
|
||||
|
|
|
|||
Loading…
Reference in New Issue