Only keep the latest *approved* version of an add-on if user does not have artist debug mode enabled

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11185 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-05-05 19:44:33 +00:00
parent 157081edf2
commit fa861267a0

View File

@@ -132,10 +132,15 @@ void AddonsManager::initOnline(const XMLNode *xml)
m_addons_list.lock();
if(index>=0)
{
// Only copy the data if a newer revision is found.
if(m_addons_list.getData()[index].getRevision()
< addon.getRevision() )
Addon& tmplist_addon = m_addons_list.getData()[index];
// Only copy the data if a newer revision is found (ignore unapproved
// revisions unless player is in the mode to see them)
if (tmplist_addon.getRevision() < addon.getRevision() &&
(addon.testStatus(Addon::AS_APPROVED) || UserConfigParams::m_artist_debug_mode))
{
m_addons_list.getData()[index].copyInstallData(addon);
}
}
else
{