Skip to content

Commit 7b748e2

Browse files
author
Till Brehm
committed
Fixed #2738 Installing package from APS to root of subdomain fails when/if. Thanks to @gardan for the patch.
1 parent 6ba2ada commit 7b748e2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

interface/lib/classes/aps_guicontroller.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,13 @@ public function validateInstallerInput($postinput, $pkg_details, $domains, $sett
574574
// Find out document_root and make sure no apps are installed twice to one location
575575
if(in_array($postinput['main_domain'], $domains))
576576
{
577-
$docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain
577+
$docroot = $app->db->queryOneRecord("SELECT document_root, web_folder FROM web_domain
578578
WHERE domain = ?", $this->getMainDomain($postinput['main_domain']));
579-
$new_path = $docroot['document_root'];
579+
if(trim($docroot['web_folder']) == '') {
580+
$new_path = $docroot['document_root'];
581+
} else {
582+
$new_path = $docroot['document_root'] . '/' . $docroot['web_folder'];
583+
}
580584
if(substr($new_path, -1) != '/') $new_path .= '/';
581585
$new_path .= $main_location;
582586

0 commit comments

Comments
 (0)