|
|
|
|
@ -57,6 +57,20 @@ bool Save::check_save(string flag_save, string key_name) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Save::wrapper_check_save(string flag_save, string key_name) {
|
|
|
|
|
if (flag_save == "all") {
|
|
|
|
|
bool bool_flag_save = this->check_save("system", key_name);
|
|
|
|
|
if (bool_flag_save) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return this->check_save("global", key_name);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return this->check_save(flag_save, key_name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int Save::get_count_error() {
|
|
|
|
|
return process.get_count_error();
|
|
|
|
|
}
|
|
|
|
|
@ -82,7 +96,7 @@ void Save::save(string sections, string str_flag_save) {
|
|
|
|
|
for (const auto &key: *vec_param_names) {
|
|
|
|
|
if (map_gui->find(key) != map_gui->end()) {
|
|
|
|
|
value = (*map_gui)[key];
|
|
|
|
|
if (this->check_save(str_flag_save, key)) {
|
|
|
|
|
if (this->wrapper_check_save(str_flag_save, key)) {
|
|
|
|
|
if (value.length() != 0) {
|
|
|
|
|
cmd = "ubconfig --target " + str_flag_save + " set " + sections + " " +
|
|
|
|
|
key + "=\"" + value + "\"";
|
|
|
|
|
@ -117,7 +131,7 @@ void Save::save_one_cmd(string cmd1, string cmd_remove, string str_flag_save) {
|
|
|
|
|
for (const auto &key: *vec_param_names) {
|
|
|
|
|
if (map_gui->find(key) != map_gui->end()) {
|
|
|
|
|
value = (*map_gui)[key];
|
|
|
|
|
if (this->check_save(str_flag_save, key)) {
|
|
|
|
|
if (this->wrapper_check_save(str_flag_save, key)) {
|
|
|
|
|
if (value.length() != 0) {
|
|
|
|
|
cmd = cmd + key + "=\"" + value + "\" ";
|
|
|
|
|
}
|
|
|
|
|
|