diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 408f47519..88504dbee 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -1963,6 +1963,17 @@ $parameters = array( wpobj = WPSites.objects.get(pk=self.data['WPid']) + + + #get wp version + path_to_wordpress = wpobj.path + command = f"wp --path='{path_to_wordpress}' core version --skip-plugins --skip-themes" + Wp_version = ProcessUtilities.outputExecutioner(command, wpobj.owner.externalApp) + old_wp_version = Wp_version.rstrip('\n') + logging.writeToFile("Old site wp version:%s"% old_wp_version) + + + ### Create secure folder ACLManager.CreateSecureDir() tempPath = '%s/%s' % ('/usr/local/CyberCP/tmp', str(randint(1000, 9999))) @@ -2049,7 +2060,7 @@ $parameters = array( StagingPath = f'/home/{website.domain}/public_html' - command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core download --path={StagingPath}' + command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core download --path={StagingPath} --version={old_wp_version}' if ProcessUtilities.executioner(command, website.externalApp) == 0: raise BaseException('Failed to download wp core. [404]') diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index 05f3a7fb3..1d3cc9400 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -1782,13 +1782,13 @@ var PluginsList = []; function AddPluginToArray(cBox, name) { if (cBox.checked) { PluginsList.push(name); - alert(PluginsList); + // alert(PluginsList); } else { const index = PluginsList.indexOf(name); if (index > -1) { PluginsList.splice(index, 1); } - alert(PluginsList); + // alert(PluginsList); } } @@ -1797,13 +1797,13 @@ var ThemesList = []; function AddThemeToArray(cBox, name) { if (cBox.checked) { ThemesList.push(name); - alert(ThemesList); + // alert(ThemesList); } else { const index = ThemesList.indexOf(name); if (index > -1) { ThemesList.splice(index, 1); } - alert(ThemesList); + // alert(ThemesList); } } diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index d3eb0a9c7..5c8d2f4da 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -1850,11 +1850,6 @@ class WebsiteManager: else: return ACLManager.loadError() - - - - - background = ApplicationInstaller('CreateStagingNow', extraArgs) background.start()