mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
bug fix mail creation ref https://github.com/usmannasir/cyberpanel/issues/1059
This commit is contained in:
@@ -209,7 +209,8 @@ class FileManager:
|
|||||||
try:
|
try:
|
||||||
currentFile = items.split(' ')
|
currentFile = items.split(' ')
|
||||||
currentFile = [a for a in currentFile if a != '']
|
currentFile = [a for a in currentFile if a != '']
|
||||||
if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total':
|
|
||||||
|
if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total' or currentFile[-1].startswith('mail.'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if len(currentFile) > 9:
|
if len(currentFile) > 9:
|
||||||
|
|||||||
@@ -23,17 +23,20 @@ class ChildDomainManager:
|
|||||||
checker = 0
|
checker = 0
|
||||||
|
|
||||||
for items in childDomains:
|
for items in childDomains:
|
||||||
dic = {
|
if items.domain == f'mail.{master.domain}':
|
||||||
'childDomain': items.domain,
|
pass
|
||||||
'path': items.path,
|
|
||||||
'childLunch': '/websites/' + self.masterDomain + '/' + items.domain
|
|
||||||
}
|
|
||||||
|
|
||||||
if checker == 0:
|
|
||||||
json_data = json_data + json.dumps(dic)
|
|
||||||
checker = 1
|
|
||||||
else:
|
else:
|
||||||
json_data = json_data + ',' + json.dumps(dic)
|
dic = {
|
||||||
|
'childDomain': items.domain,
|
||||||
|
'path': items.path,
|
||||||
|
'childLunch': '/websites/' + self.masterDomain + '/' + items.domain
|
||||||
|
}
|
||||||
|
|
||||||
|
if checker == 0:
|
||||||
|
json_data = json_data + json.dumps(dic)
|
||||||
|
checker = 1
|
||||||
|
else:
|
||||||
|
json_data = json_data + ',' + json.dumps(dic)
|
||||||
|
|
||||||
json_data = json_data + ']'
|
json_data = json_data + ']'
|
||||||
|
|
||||||
|
|||||||
@@ -2382,7 +2382,10 @@ class WebsiteManager:
|
|||||||
|
|
||||||
for web in websites:
|
for web in websites:
|
||||||
for child in web.childdomains_set.all():
|
for child in web.childdomains_set.all():
|
||||||
childDomains.append(child)
|
if child.domain == f'mail.{web.domain}':
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
childDomains.append(child)
|
||||||
|
|
||||||
pagination = self.getPagination(len(childDomains), recordsToShow)
|
pagination = self.getPagination(len(childDomains), recordsToShow)
|
||||||
json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber])
|
json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber])
|
||||||
|
|||||||
Reference in New Issue
Block a user