Skip to content

Commit 4369754

Browse files
committed
Fixed: FS#782 - issue with moving of web to other client
1 parent 9851f94 commit 4369754

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

interface/web/sites/web_domain_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,10 @@ function onAfterUpdate() {
346346
// Set the values for document_root, system_user and system_group
347347
$system_user = 'web'.$this->id;
348348
$system_group = 'client'.$client_id;
349-
//$document_root = str_replace("[client_id]",$client_id,$document_root);
349+
$document_root = str_replace("[client_id]",$client_id,$document_root);
350350

351-
// $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$this->id;
352-
$sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group' WHERE domain_id = ".$this->id;
351+
$sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$this->id;
352+
//$sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group' WHERE domain_id = ".$this->id;
353353
$app->db->query($sql);
354354
}
355355

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function update($event_name,$data) {
261261
// Remove trailing slash
262262
if(substr($tmp_symlink, -1, 1) == '/') $tmp_symlink = substr($tmp_symlink, 0, -1);
263263
// create the symlinks, if not exist
264-
if(!is_link($tmp_symlink)) {
264+
if(is_link($tmp_symlink)) {
265265
exec("rm -f ".escapeshellcmd($tmp_symlink));
266266
$app->log("Removed Symlink: rm -f ".$tmp_symlink,LOGLEVEL_DEBUG);
267267
}

0 commit comments

Comments
 (0)