wip yeswiki-move with dump
Some checks failed
/ test (push) Has been cancelled

This commit is contained in:
Florian Schmitt 2024-12-07 18:35:31 +03:00
parent b8788b4c96
commit 024f7844f7
2 changed files with 14 additions and 2 deletions

View file

@ -14,7 +14,19 @@ function domainIsOnServer($domain)
function wikiIsOnServer($path) function wikiIsOnServer($path)
{ {
$configFile = glob('/home/*/'.$path.'/wakka.config.php')[0] ?? false; $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) function checkIP($domain, $withWww = false, $noip6 = false)

View file

@ -85,7 +85,7 @@ if ($from === $to) {
$climate->error('ERROR : --from and --to parameters must be different.'."\n"); $climate->error('ERROR : --from and --to parameters must be different.'."\n");
exit; exit;
} }
var_dump($fromWiki, $toWiki);
$climate->bold()->underline()->out('Move a YesWiki'); $climate->bold()->underline()->out('Move a YesWiki');
$climate->out('This will move yeswiki on <bold>'.$from.'</bold> to <bold>'.$to.'</bold>'); $climate->out('This will move yeswiki on <bold>'.$from.'</bold> to <bold>'.$to.'</bold>');
$climate->red('CAREFUL: the destination yeswiki will be replaced.'."\n"); $climate->red('CAREFUL: the destination yeswiki will be replaced.'."\n");