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
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
currentTemp = self.extraArgs['tempStatusPath']
|
currentTemp = self.extraArgs['tempStatusPath']
|
||||||
self.extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
self.extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||||
self.extraArgs['SavedPlugins'] = SavedPlugins
|
self.extraArgs['SavedPlugins'] = SavedPlugins
|
||||||
@@ -1778,10 +1777,15 @@ $parameters = array(
|
|||||||
|
|
||||||
webobj = Websites.objects.get(domain= self.extraArgs['domainName'])
|
webobj = Websites.objects.get(domain= self.extraArgs['domainName'])
|
||||||
|
|
||||||
path ="/home/%s/public_html"%(self.extraArgs['domainName'])
|
if self.extraArgs['home'] == '0':
|
||||||
Finalurl = (self.extraArgs['domainName'])
|
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']),
|
AutoUpdates=(self.extraArgs['updates']), PluginUpdates=(self.extraArgs['Plugins']),
|
||||||
ThemeUpdates=(self.extraArgs['Themes']),)
|
ThemeUpdates=(self.extraArgs['Themes']),)
|
||||||
wpobj.save()
|
wpobj.save()
|
||||||
|
|||||||
@@ -289,6 +289,15 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
|
|||||||
var autoupdates = $scope.autoupdates;
|
var autoupdates = $scope.autoupdates;
|
||||||
var pluginupdates = $scope.pluginupdates;
|
var pluginupdates = $scope.pluginupdates;
|
||||||
var themeupdates = $scope.themeupdates;
|
var themeupdates = $scope.themeupdates;
|
||||||
|
|
||||||
|
var path = $scope.installPath;
|
||||||
|
|
||||||
|
var home = "1";
|
||||||
|
|
||||||
|
if (typeof path != 'undefined') {
|
||||||
|
home = "0";
|
||||||
|
}
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
|
|
||||||
title: WPtitle,
|
title: WPtitle,
|
||||||
@@ -303,6 +312,8 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
|
|||||||
Themes: themeupdates,
|
Themes: themeupdates,
|
||||||
websiteOwner: websiteOwner,
|
websiteOwner: websiteOwner,
|
||||||
package: package,
|
package: package,
|
||||||
|
home: home,
|
||||||
|
path: path,
|
||||||
}
|
}
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -54,16 +54,40 @@
|
|||||||
|
|
||||||
</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>#}
|
||||||
|
{# <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">
|
<div ng-hide="installationDetailsForm" class="form-group">
|
||||||
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input name="dom" type="text" class="form-control" ng-model="domainNameCreate"
|
<div class="input-group bootstrap-touchspin">
|
||||||
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" required>
|
<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>
|
||||||
<div ng-show="websiteCreationForm.dom.$error.pattern"
|
<div ng-show="websiteCreationForm.dom.$error.pattern"
|
||||||
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
|
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div ng-hide="installationDetailsForm" class="form-group">
|
<div ng-hide="installationDetailsForm" class="form-group">
|
||||||
<label class="col-sm-3 control-label">{% trans "Username" %}</label>
|
<label class="col-sm-3 control-label">{% trans "Username" %}</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
@@ -158,7 +182,7 @@
|
|||||||
<div ng-hide="installationDetailsForm" class="form-group">
|
<div ng-hide="installationDetailsForm" class="form-group">
|
||||||
<label class="col-sm-3 control-label"></label>
|
<label class="col-sm-3 control-label"></label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<button type="button" ng-click="createWordPresssite()"
|
<button type="button" ng-click="createWordPresssite()"
|
||||||
class="btn btn-primary btn-lg">{% trans "Create Website" %}</button>
|
class="btn btn-primary btn-lg">{% trans "Create Website" %}</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1293,7 +1293,13 @@ class WebsiteManager:
|
|||||||
extraArgs['Themes'] = data['Themes']
|
extraArgs['Themes'] = data['Themes']
|
||||||
extraArgs['websiteOwner'] = data['websiteOwner']
|
extraArgs['websiteOwner'] = data['websiteOwner']
|
||||||
extraArgs['package'] = data['package']
|
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))
|
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||||
|
|
||||||
background = ApplicationInstaller('wordpressInstallNew', extraArgs)
|
background = ApplicationInstaller('wordpressInstallNew', extraArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user