Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Manoa Ratefiarison
ISPConfig 3
Commits
cb0520b8
Commit
cb0520b8
authored
15 years ago
by
tbrehm
Browse files
Options
Downloads
Patches
Plain Diff
Fixed: FS#833 - Subdomains doesn't follow when domain is changed.
parent
f5e1895c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interface/web/sites/web_domain_edit.php
+13
-1
13 additions, 1 deletion
interface/web/sites/web_domain_edit.php
with
13 additions
and
1 deletion
interface/web/sites/web_domain_edit.php
+
13
−
1
View file @
cb0520b8
<?php
<?php
/*
/*
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
Copyright (c) 2007
- 2009
, Till Brehm, projektfarm Gmbh
All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
Redistribution and use in source and binary forms, with or without modification,
...
@@ -353,6 +353,18 @@ class page_action extends tform_actions {
...
@@ -353,6 +353,18 @@ class page_action extends tform_actions {
$app
->
db
->
query
(
$sql
);
$app
->
db
->
query
(
$sql
);
}
}
//* If the domain name has been changed, we will have to change all subdomains
if
(
$this
->
dataRecord
[
"domain"
]
!=
''
&&
$this
->
oldDataRecord
[
"domain"
]
!=
''
&&
$this
->
dataRecord
[
"domain"
]
!=
$this
->
oldDataRecord
[
"domain"
])
{
$records
=
$app
->
db
->
queryAllRecords
(
"SELECT domain_id,domain FROM web_domain WHERE type = 'subdomain' AND domain LIKE '%."
.
$app
->
db
->
quote
(
$this
->
oldDataRecord
[
"domain"
])
.
"'"
);
foreach
(
$records
as
$rec
)
{
$subdomain
=
$app
->
db
->
quote
(
str_replace
(
$this
->
oldDataRecord
[
"domain"
],
$this
->
dataRecord
[
"domain"
],
$rec
[
'domain'
]));
$app
->
db
->
datalogUpdate
(
'web_domain'
,
"domain = '"
.
$subdomain
.
"'"
,
'domain_id'
,
$rec
[
'domain_id'
]);
}
unset
(
$records
);
unset
(
$rec
);
unset
(
$subdomain
);
}
}
}
function
onAfterDelete
()
{
function
onAfterDelete
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment