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], ]; }