use correct makeCorrect(Dir/File) everywhere

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-19 17:13:41 +01:00
parent 8e84a4ff44
commit c4024c8107
53 changed files with 328 additions and 345 deletions

View File

@@ -37,7 +37,7 @@ function correctErrorDocument($errdoc = null, $throw_exception = false) {
) {
// a file
if (substr($errdoc, 0, 1) != '"') {
$errdoc = makeCorrectFile($errdoc);
$errdoc = \Froxlor\FileDir::makeCorrectFile($errdoc);
// apache needs a starting-slash (starting at the domains-docroot)
if (!substr($errdoc, 0, 1) == '/') {
$errdoc = '/'.$errdoc;

View File

@@ -32,7 +32,7 @@ function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot
$header = "## GENERATED BY FROXLOR\n";
$header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n";
$awstats_dir = makeCorrectDir($customerDocroot.'/awstats/'.$siteDomain.'/');
$awstats_dir = \Froxlor\FileDir::makeCorrectDir($customerDocroot.'/awstats/'.$siteDomain.'/');
if (!is_dir($awstats_dir)) {
safe_exec('mkdir -p '.escapeshellarg($awstats_dir));
}
@@ -53,17 +53,17 @@ function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot
'/\{AWSTATS_CONF\}/'
);
$replace = array(
makeCorrectFile($logFile),
\Froxlor\FileDir::makeCorrectFile($logFile),
$siteDomain,
$hostAliases,
$awstats_dir,
makeCorrectDir(Settings::Get('system.awstats_conf'))
\Froxlor\FileDir::makeCorrectDir(Settings::Get('system.awstats_conf'))
);
// File names
$domain_file = makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.' . $siteDomain . '.conf');
$domain_file = \Froxlor\FileDir::makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.' . $siteDomain . '.conf');
$model_file = \Froxlor\Froxlor::getInstallDir().'/templates/misc/awstats/awstats.froxlor.model.conf';
$model_file = makeCorrectFile($model_file);
$model_file = \Froxlor\FileDir::makeCorrectFile($model_file);
// Test if the file exists
if (file_exists($domain_file)) {

View File

@@ -22,7 +22,7 @@
*/
function getThemes() {
$themespath = makeCorrectDir(\Froxlor\Froxlor::getInstallDir().'/templates/');
$themespath = \Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir().'/templates/');
$themes_available = array();
if (is_dir($themespath)) {

View File

@@ -78,7 +78,7 @@ function updateCounters($returndebuginfo = false) {
while($customer_emails_row = $customer_emails_result_stmt->fetch(PDO::FETCH_ASSOC)) {
if($customer_emails_row['destination'] != '') {
$customer_emails_row['destination'] = explode(' ', makeCorrectDestination($customer_emails_row['destination']));
$customer_emails_row['destination'] = explode(' ', \Froxlor\FileDir::makeCorrectDestination($customer_emails_row['destination']));
$customer_email_forwarders+= count($customer_emails_row['destination']);
if(in_array($customer_emails_row['email_full'], $customer_emails_row['destination'])) {