diff --git a/ba/ba1700.cpp b/ba/ba1700.cpp index 6dbe94a9a..b7424dba4 100755 --- a/ba/ba1700.cpp +++ b/ba/ba1700.cpp @@ -1,11 +1,14 @@ #include +#include + #include #include #include #include #include #include +#include #include #include #include @@ -90,7 +93,8 @@ protected: // TSheet virtual bool on_key(KEY key); static bool quit_handler(TMask_field& f, KEY k); static bool tutti_handler(TMask_field& f, KEY k); - int get_module_number(const char * module) const; + int get_module_number(const char* module) const; + bool has_module(int modnumber) const; protected: static bool path_handler(TMask_field& fld, KEY key); @@ -188,6 +192,16 @@ static int compare_modules(const TObject** o1, const TObject** o2) return res; } +bool TInstaller_mask::has_module(int modnumber) const +{ + if (modnumber == SRAUT) + { + char s[16]; + if (CGetCampoStpValue("Servers", s, sizeof(s))) + return atoi(s) > 0; + } + return main_app().has_module(modnumber,CHK_DONGLE); +} int TInstaller_mask::precheck_modules(bool only_newer) { @@ -207,7 +221,7 @@ int TInstaller_mask::precheck_modules(bool only_newer) ((release > currrelease) || (release == currrelease && (only_newer ? patchlevel>rigar.get_int(C_CURRPATCH): patchlevel>=rigar.get_int(C_CURRPATCH)) )) - && main_app().has_module(modnumber,CHK_DONGLE) ) + && has_module(modnumber) ) { // checca il modulo o la patch se ho installata la stessa versione const bool chk = rigar.get_char(C_ISPATCH) != 'X' || release == rigar.get(C_CURRRELEASE); @@ -225,10 +239,10 @@ int TInstaller_mask::get_module_number(const char * module) const if (module && * module) { TScanner scanner(AUT_FILE); - bool ok = FALSE; for (aut = 0; scanner.line() != ""; aut++) - if (strncmp(scanner.token(), module, 2) == 0) { ok = TRUE; break; } + if (scanner.token().starts_with(module)) + { ok = TRUE; break; } } return ok ? aut : -1; } @@ -297,12 +311,9 @@ bool TInstaller_mask::autoload() TFilename remote_ini = http_path; remote_ini << TInstall_ini::default_name(); { - TIndwin contacting(60,TR("Sto contattando il server HTTP..."),FALSE,FALSE); + TIndwin contacting(60,TR("Connessione al server HTTP..."),FALSE,FALSE); httpresult=http_get(http_server, remote_ini, ininame); } -// if (!httpresult) -// return error_box(FR("Impossibile trasferire %s da %s"), -// (const char*)remote_ini, (const char*)http_server); } } @@ -519,9 +530,9 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini) if (curini.get("Versione", submodule).empty()) { TString msg; - msg << TR("L'installazione del modulo '") << module - << TR("'\nrichiede la presenza del modulo '") << submodule - << TR("':\nSi desidera procedere alla sua installazione?"); + msg.format(FR("L'installazione del modulo %s richiede la presenza del modulo %s."), + (const char*)module, (const char*)submodule); + msg << '\n' << TR("Si desidera procedere alla sua installazione?"); ok = yesno_box(msg); if (ok) ok = install(submodule, 0); diff --git a/ba/ba7300.cpp b/ba/ba7300.cpp index f9ab282ae..d68eba111 100755 --- a/ba/ba7300.cpp +++ b/ba/ba7300.cpp @@ -542,7 +542,7 @@ void TMail_flood_app::send_records(TCursor& cur) ininame = dir; ininame << SLASH << "tr" << cur.pos() << ".ini"; TConfig ini(ininame, "Transaction"); - ini.set("Action", "SaveAndExit"); // Funziona qualsiasi nome diverso da Modify, Insert e Run + ini.set("Action", "Link"); ini.set("Mode", "A"); fill_key(curr, ini); } diff --git a/ba/ba8100.cpp b/ba/ba8100.cpp index 2790619ac..7d0b5936d 100755 --- a/ba/ba8100.cpp +++ b/ba/ba8100.cpp @@ -408,7 +408,7 @@ void TSelector_app::main_loop() break; default: save_cursor_key(cur, ini); - run_transaction("Modify"); + run_transaction("Link"); break; } }