Fixed duplicate creation of directory protection, fixes #1450
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
@@ -696,7 +696,7 @@ class nginx {
|
|||||||
protected function getHtpasswds($domain) {
|
protected function getHtpasswds($domain) {
|
||||||
|
|
||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT DISTINCT *
|
SELECT *
|
||||||
FROM `" . TABLE_PANEL_HTPASSWDS . "` AS a
|
FROM `" . TABLE_PANEL_HTPASSWDS . "` AS a
|
||||||
JOIN `" . TABLE_PANEL_DOMAINS . "` AS b USING (`customerid`)
|
JOIN `" . TABLE_PANEL_DOMAINS . "` AS b USING (`customerid`)
|
||||||
WHERE b.customerid = :customerid AND b.domain = :domain
|
WHERE b.customerid = :customerid AND b.domain = :domain
|
||||||
@@ -733,6 +733,10 @@ class nginx {
|
|||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove duplicate entries
|
||||||
|
$returnval = array_map("unserialize", array_unique(array_map("serialize", $returnval)));
|
||||||
|
|
||||||
return $returnval;
|
return $returnval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user