рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -36,16 +36,16 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
Log.Writeln_("Публикация компонент разрешена только для Windows");
|
||||
return false;
|
||||
}
|
||||
if (!Current.HasAccount()) {
|
||||
if (!Global.mainModule.HasAccount()) {
|
||||
Log.Writeln_("Окно компонент было открыто до синхронизации прав");
|
||||
return false;
|
||||
}
|
||||
if (!Current.getAccount().role.equals(AccountRole.Admin)) {
|
||||
if (!Global.mainModule.getAccount().role.equals(AccountRole.Admin)) {
|
||||
Log.Writeln_("Вы не являетесь администратором");
|
||||
}
|
||||
;
|
||||
if (Current_.Check(Log, Current.Component)) {
|
||||
target = Current.getComponent();
|
||||
if (Global.mainModule.Check(Log, Current.Component)) {
|
||||
target = Global.mainModule.getComponent();
|
||||
target.needs_update_minimal_version = false;
|
||||
f.fields.cbUpdateMinimalVersion.setSelected(false);
|
||||
f.fields.lMinimalVersion.setText(String.valueOf(target.minimal_version));
|
||||
@@ -72,7 +72,7 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
String change_description = (f.Result == null) ? "не указаны" : f.Result;
|
||||
String change_record_header = String.join(" ",
|
||||
Utils_.Brackets(Utils_.print_date(new Date())) + ":",
|
||||
Current.getAccount().name + Utils_.RBrackets(Current.getAccount().email),
|
||||
Global.mainModule.getAccount().name + Utils_.RBrackets(Global.mainModule.getAccount().email),
|
||||
"публикует версию", Utils_.DQuotes(target.version)
|
||||
);
|
||||
String change_record = String.join("\n", change_record_header, "Изменения:",
|
||||
|
||||
Reference in New Issue
Block a user