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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user