Bugfix: the id of an addon should be taken from the id field, and only use

the lowercase name if no id is specified.
This might potentially break existing addons - though atm I don't think we
have any addons that have an id different from the lowercase name.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9506 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2011-08-15 07:03:54 +00:00
parent a8f624b9de
commit c7f501a845

View File

@@ -61,6 +61,8 @@ Addon::Addon(const XMLNode &xml)
std::string designer;
xml.get("name", &name );
m_name = StringUtils::removeHtmlEntities(name);
m_id = StringUtils::toLowerCase(name);
xml.get("id", &m_id );
xml.get("designer", &designer );
xml.get("status", &m_status );
@@ -71,8 +73,6 @@ Addon::Addon(const XMLNode &xml)
xml.get("file", &m_zip_file );
xml.get("description", &description );
m_id = StringUtils::toLowerCase(name);
m_name = StringUtils::removeHtmlEntities(name);
m_description = StringUtils::removeHtmlEntities(description);
m_designer = StringUtils::removeHtmlEntities(designer);