mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 15:56:11 +01:00
bug fix: install wp in sub folder
This commit is contained in:
@@ -1748,7 +1748,6 @@ $parameters = array(
|
||||
pass
|
||||
|
||||
|
||||
|
||||
currentTemp = self.extraArgs['tempStatusPath']
|
||||
self.extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||
self.extraArgs['SavedPlugins'] = SavedPlugins
|
||||
@@ -1778,10 +1777,15 @@ $parameters = array(
|
||||
|
||||
webobj = Websites.objects.get(domain= self.extraArgs['domainName'])
|
||||
|
||||
path ="/home/%s/public_html"%(self.extraArgs['domainName'])
|
||||
if self.extraArgs['home'] == '0':
|
||||
path = self.extraArgs['path']
|
||||
finalPath = "/home/" + self.extraArgs['domainName'] + "/public_html/" + path + "/"
|
||||
Finalurl = f'{self.extraArgs["domainName"]}/{path}'
|
||||
else:
|
||||
finalPath = "/home/" + self.extraArgs['domainName'] + "/public_html/"
|
||||
Finalurl = (self.extraArgs['domainName'])
|
||||
|
||||
wpobj = WPSites(owner=webobj, title=self.extraArgs['blogTitle'], path=path, FinalURL=Finalurl,
|
||||
wpobj = WPSites(owner=webobj, title=self.extraArgs['blogTitle'], path=finalPath, FinalURL=Finalurl,
|
||||
AutoUpdates=(self.extraArgs['updates']), PluginUpdates=(self.extraArgs['Plugins']),
|
||||
ThemeUpdates=(self.extraArgs['Themes']),)
|
||||
wpobj.save()
|
||||
|
||||
@@ -289,6 +289,15 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
|
||||
var autoupdates = $scope.autoupdates;
|
||||
var pluginupdates = $scope.pluginupdates;
|
||||
var themeupdates = $scope.themeupdates;
|
||||
|
||||
var path = $scope.installPath;
|
||||
|
||||
var home = "1";
|
||||
|
||||
if (typeof path != 'undefined') {
|
||||
home = "0";
|
||||
}
|
||||
|
||||
var data = {
|
||||
|
||||
title: WPtitle,
|
||||
@@ -303,6 +312,8 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
|
||||
Themes: themeupdates,
|
||||
websiteOwner: websiteOwner,
|
||||
package: package,
|
||||
home: home,
|
||||
path: path,
|
||||
}
|
||||
var config = {
|
||||
headers: {
|
||||
|
||||
@@ -54,16 +54,40 @@
|
||||
|
||||
</div>
|
||||
|
||||
{# <div ng-hide="installationDetailsForm" class="form-group">#}
|
||||
{# <label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>#}
|
||||
{# <div class="col-sm-6">#}
|
||||
{# <input name="dom" type="text" class="form-control" ng-model="domainNameCreate"#}
|
||||
{# placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" required>#}
|
||||
{# </div>#}
|
||||
{# <div ng-show="websiteCreationForm.dom.$error.pattern"#}
|
||||
{# class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>#}
|
||||
{# </div>#}
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="dom" type="text" class="form-control" ng-model="domainNameCreate"
|
||||
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" required>
|
||||
<div class="input-group bootstrap-touchspin">
|
||||
<span
|
||||
class="input-group-addon bootstrap-touchspin-prefix"
|
||||
style="display: none;"></span>
|
||||
<input ng-model="domainNameCreate" id="touchspin-demo-1" class="form-control"
|
||||
type="text" value="55"
|
||||
name="touchspin-demo-1"
|
||||
style="display: block;" placeholder="{% trans "Do not enter WWW, it will be auto created!" %}">
|
||||
<span class="input-group-addon bootstrap-touchspin-postfix">/</span>
|
||||
<span style="width: 25%" class="input-group-btn">
|
||||
<input id="touchspin-demo-1" class="form-control"
|
||||
placeholder="{% trans "Leave empty for default" %}"
|
||||
type="text" value="Leave empty for default"
|
||||
name="touchspin-demo-1" ng-model="installPath"
|
||||
style="display: block;"></span></div>
|
||||
</div>
|
||||
<div ng-show="websiteCreationForm.dom.$error.pattern"
|
||||
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Username" %}</label>
|
||||
<div class="col-sm-6">
|
||||
|
||||
@@ -1293,7 +1293,13 @@ class WebsiteManager:
|
||||
extraArgs['Themes'] = data['Themes']
|
||||
extraArgs['websiteOwner'] = data['websiteOwner']
|
||||
extraArgs['package'] = data['package']
|
||||
extraArgs['home'] = "1"
|
||||
extraArgs['home'] = data['home']
|
||||
try:
|
||||
extraArgs['path'] = data['path']
|
||||
if extraArgs['path'] == '':
|
||||
extraArgs['home'] = '1'
|
||||
except:
|
||||
pass
|
||||
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||
|
||||
background = ApplicationInstaller('wordpressInstallNew', extraArgs)
|
||||
|
||||
Reference in New Issue
Block a user