First updates to work with new addon webpage.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7806 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2011-03-04 02:27:45 +00:00
parent c08b9b3a7f
commit 34961aa0ea
2 changed files with 5 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ void AddonsManager::initOnline(const XMLNode *xml)
const XMLNode *node = xml->getNode(i);
const std::string &name = node->getName();
// Ignore news/redirect, which is handled by network_http
if(name=="news" || name=="redirect") continue;
if(name=="include" || name=="message") continue;
if(node->getName()=="track" || node->getName()=="kart")
{
Addon addon(*node);

View File

@@ -82,9 +82,9 @@ void *NetworkHttp::mainLoop(void *obj)
// Initialise the online portion of the addons manager.
if(UserConfigParams::m_verbosity>=3)
printf("[addons] Downloading list.\n");
if(me->downloadFileSynchron("list"))
if(me->downloadFileSynchron("news.xml"))
{
std::string xml_file = file_manager->getAddonsFile("list");
std::string xml_file = file_manager->getAddonsFile("news.xml");
const XMLNode *xml = new XMLNode(xml_file);
me->checkNewServer(xml);
@@ -198,9 +198,9 @@ void NetworkHttp::updateNews(const XMLNode *xml)
for(unsigned int i=0; i<xml->getNumNodes(); i++)
{
const XMLNode *node = xml->getNode(i);
if(node->getName()!="news") continue;
if(node->getName()!="message") continue;
std::string news;
node->get("text", &news);
node->get("content", &news);
m_news.set(news);
error = false;
}