Добавлен фильтр одинаковых записей в шапке шаблона

master 3.7.5.6
root 2 months ago
parent 7390df9a88
commit 78dac94217

@ -4251,7 +4251,7 @@ gettext -d cl_template "$*"
continue continue
else: else:
line = line.replace("#", '').strip() line = line.replace("#", '').strip()
if os.path.exists(line): if os.path.exists(line) and line not in commentsList:
commentsList.append(line) commentsList.append(line)
return commentsList return commentsList
@ -6243,6 +6243,8 @@ gettext -d cl_template "$*"
# Титл конфигурационного файла # Титл конфигурационного файла
title = "" title = ""
if ListOptTitle: if ListOptTitle:
# prevComments = self.getPrevComments(nameFileConfig, self.__titleHead)
# ListOptTitle = prevComments + [x for x in ListOptTitle if x not in prevComments]
title = self.getTitle(objHeadNew.comment, ListOptTitle, title = self.getTitle(objHeadNew.comment, ListOptTitle,
configPath=nameFileConfig) configPath=nameFileConfig)
@ -6543,7 +6545,11 @@ gettext -d cl_template "$*"
# Титл для объединения # Титл для объединения
if ListOptTitle: if ListOptTitle:
prevComments = self.getPrevComments(nameFileConfig, self.__titleHead) prevComments = self.getPrevComments(nameFileConfig, self.__titleHead)
ListOptTitle = prevComments + [x for x in ListOptTitle if x not in prevComments] newListOptTitle = []
for x in ListOptTitle:
if x not in prevComments and x not in newListOptTitle:
newListOptTitle.append(x)
ListOptTitle = newListOptTitle
title = self.getTitle(objTemplNew._comment, title = self.getTitle(objTemplNew._comment,
ListOptTitle, ListOptTitle,
configPath=nameFileConfig) configPath=nameFileConfig)

Loading…
Cancel
Save