Use per-body info url instead of fixed address when possible.

ver1_5_1
Chris Laurel 2002-08-25 04:18:27 +00:00
parent b2d29e438d
commit 7b01e0ba42
1 changed files with 8 additions and 4 deletions

View File

@ -1315,11 +1315,15 @@ void ShowWWWInfo(const Selection& sel)
string url;
if (sel.body != NULL)
{
string name = sel.body->getName();
for (int i = 0; i < name.size(); i++)
name[i] = tolower(name[i]);
url = sel.body->getInfoURL();
if (url.empty())
{
string name = sel.body->getName();
for (int i = 0; i < name.size(); i++)
name[i] = tolower(name[i]);
url = string("http://www.nineplanets.org/") + name + ".html";
url = string("http://www.nineplanets.org/") + name + ".html";
}
}
else if (sel.star != NULL)
{