Skip to content

Commit a5bf6ca

Browse files
committed
bug fix while creating email
1 parent cbf4f2f commit a5bf6ca

File tree

10 files changed

+486
-471
lines changed

10 files changed

+486
-471
lines changed

install/install.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
952952

953953
os.chdir(self.path)
954954

955-
command = "wget http://cyberpanel.sh/CyberPanel.1.8.9.tar.gz"
955+
command = "wget http://cyberpanel.sh/CyberPanel.1.9.0.tar.gz"
956956
#command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
957957
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
958958
'CyberPanel Download',
@@ -961,7 +961,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
961961
##
962962

963963
count = 0
964-
command = "tar zxf CyberPanel.1.8.9.tar.gz"
964+
command = "tar zxf CyberPanel.1.9.0.tar.gz"
965965
#command = "tar zxf CyberPanelTemp.tar.gz"
966966
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
967967
'Extract CyberPanel',1, 1, os.EX_OSERR)
@@ -1053,8 +1053,8 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
10531053
try:
10541054
path = "/usr/local/CyberCP/version.txt"
10551055
writeToFile = open(path, 'w')
1056-
writeToFile.writelines('1.8\n')
1057-
writeToFile.writelines('9')
1056+
writeToFile.writelines('1.9\n')
1057+
writeToFile.writelines('0')
10581058
writeToFile.close()
10591059
except:
10601060
pass

loginSystem/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def loadLoginPage(request):
218218
firstName="Cyber",lastName="Panel", acl=acl, token=token)
219219
admin.save()
220220

221-
vers = version(currentVersion="1.8", build=9)
221+
vers = version(currentVersion="1.9", build=0)
222222
vers.save()
223223

224224
package = Package(admin=admin, packageName="Default", diskSpace=1000,

mailServer/mailserverManager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ def submitEmailCreation(self):
9292
userName = data['username']
9393
password = data['passwordByPass']
9494

95+
9596
admin = Administrator.objects.get(pk=userID)
9697
if ACLManager.checkOwnership(domainName, admin, currentACL) == 1:
9798
pass
9899
else:
99100
return ACLManager.loadErrorJson()
100101

102+
101103
## Create email entry
102104

103105
result = mailUtilities.createEmailAccount(domainName, userName, password)

plogical/adminPass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main():
3131
firstName="Cyber", lastName="Panel", acl=acl, token=token)
3232
admin.save()
3333

34-
vers = version(currentVersion="1.8", build=9)
34+
vers = version(currentVersion="1.9", build=0)
3535
vers.save()
3636

3737
package = Package(admin=admin, packageName="Default", diskSpace=1000,

plogical/cPanelImporter.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,11 @@ def CreateChildDomains(self):
440440
movePath = '%s/homedir/public_html/%s' % (
441441
CompletPathToExtractedArchive, ChildDocRoot.replace(self.documentRoot, '', 1).replace('/', ''))
442442

443-
print movePath
444-
445443
if os.path.exists(movePath):
446444
shutil.move(movePath, path)
447445
else:
448446
movePath = '%s/homedir/%s' % (
449447
CompletPathToExtractedArchive, ChildDocRoot.split('/')[-1].replace(self.documentRoot, '', 1).replace('/', ''))
450-
print movePath
451448
shutil.move(movePath, path)
452449

453450
command = 'chown -R %s:%s %s' % (externalApp, externalApp, path)

plogical/mailUtilities.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import os, getpass
1717
import hashlib
1818
import bcrypt
19+
import getpass
20+
1921
try:
2022
from mailServer.models import Domains, EUsers
2123
from emailPremium.models import DomainLimits, EmailLimits
@@ -113,7 +115,7 @@ def createEmailAccount(domain, userName, password):
113115
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py"
114116
execPath = execPath + " AfterEffects --domain " + domain
115117

116-
if os.getlogin() == 'root':
118+
if getpass.getuser() == 'root':
117119
## This is the case when cPanel Importer is running and token is not present in enviroment.
118120
ProcessUtilities.normalExecutioner(execPath)
119121
else:

static/backup/backup.js

100755100644
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
680680
$scope.couldNotConnect = true;
681681
$scope.scheduleFreq = true;
682682
$scope.scheduleBtn = true;
683+
$scope.localPath = true;
683684

684685
populateCurrentRecords();
685686

@@ -691,6 +692,12 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
691692
$scope.scheduleFreq = false;
692693
$scope.scheduleBtn = true;
693694

695+
if($scope.backupDest === 'Home'){
696+
$scope.localPath = false;
697+
}else{
698+
$scope.localPath = true;
699+
}
700+
694701
};
695702

696703
$scope.scheduleBtnView = function () {
@@ -719,6 +726,7 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
719726
var data = {
720727
backupDest: $scope.backupDest,
721728
backupFreq: $scope.backupFreq,
729+
localPath: $scope.localPathValue
722730
};
723731

724732
var config = {

0 commit comments

Comments
 (0)