diff --git a/utils.inc.php b/utils.inc.php index 48b7f93..ffd8453 100644 --- a/utils.inc.php +++ b/utils.inc.php @@ -14,7 +14,19 @@ function domainIsOnServer($domain) function wikiIsOnServer($path) { $configFile = glob('/home/*/'.$path.'/wakka.config.php')[0] ?? false; - return $configFile; + + if (!$configFile) { + return false; + } + + $wakkaConfig = []; + include_once($configFile); + return [ + 'path' => str_replace('wakka.config.php', '', $configFile), + 'config' => $wakkaConfig, + 'user' => '', + 'group' => '', + ]; } function checkIP($domain, $withWww = false, $noip6 = false) diff --git a/yeswiki-move.php b/yeswiki-move.php index a311c91..b81edcf 100755 --- a/yeswiki-move.php +++ b/yeswiki-move.php @@ -85,7 +85,7 @@ if ($from === $to) { $climate->error('ERROR : --from and --to parameters must be different.'."\n"); exit; } - +var_dump($fromWiki, $toWiki); $climate->bold()->underline()->out('Move a YesWiki'); $climate->out('This will move yeswiki on '.$from.' to '.$to.''); $climate->red('CAREFUL: the destination yeswiki will be replaced.'."\n");