From eac36d3e3280ed68fee4130fb234b0833bebb3d4 Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Fri, 20 Dec 2024 10:32:07 +0300 Subject: [PATCH] fix(move): get real user --- utils.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils.inc.php b/utils.inc.php index c5366f9..f2f477d 100644 --- a/utils.inc.php +++ b/utils.inc.php @@ -19,13 +19,17 @@ function wikiIsOnServer($path) return false; } + $re = '#/home/(.*)/#mU'; + $str = '/home/civamgardfr/civamgard.fr/'; + preg_match_all('#/home/(.*)/#mU', '/home/civamgardfr/civamgard.fr/', $user, PREG_SET_ORDER, 0); + $wakkaConfig = []; include_once($configFile); return [ 'path' => str_replace('wakka.config.php', '', $configFile), 'config' => $wakkaConfig, - 'user' => $path, - 'group' => $path, + 'user' => $user[0][1], + 'group' => $user[0][1], ]; }