| 883 | } |
| 884 | |
| 885 | bool UpdatePlugin(const Info& info, String& errmsg) |
| 886 | { |
| 887 | std::list<internal_plugin::Info> list; |
| 888 | if (!internal_plugin::LoadFromXML(info.m_locationType, list, errmsg)) |
| 889 | return false; |
| 890 | for (auto it = list.begin(); it != list.end(); ++it) |
| 891 | { |
| 892 | if (it->m_name == info.m_name) |
| 893 | { |
| 894 | list.insert(it, info); |
| 895 | list.erase(it); |
| 896 | break; |
| 897 | } |
| 898 | } |
| 899 | if (!internal_plugin::SaveToXML(info.m_locationType, list, errmsg)) |
| 900 | return false; |
| 901 | CAllThreadsScripts::GetActiveSet()->ReloadAllScripts(); |
| 902 | return true; |
| 903 | } |
| 904 | |
| 905 | bool RemovePlugin(const Info& info, String& errmsg) |
| 906 | { |
no test coverage detected