This commit is contained in:
parent
2c0d9712eb
commit
a3116f7670
1 changed files with 11 additions and 0 deletions
|
@ -369,7 +369,18 @@ function upgradeWiki($srcDir, $destDir, $nobackup = false)
|
|||
$output .= 'File not found "' . $f . '"' . "\n";
|
||||
}
|
||||
}
|
||||
exec("cat $destDir/wakka.config.php | grep hibernate", $outputHibernate);
|
||||
$outputHibernate = implode('', $outputHibernate);
|
||||
$isHibernating = str_contains($outputHibernate, 'hibernate');
|
||||
if ($isHibernating) {
|
||||
$output .= '==== Get YesWiki out of hibernation';
|
||||
$output .= cli("sed -r -i -e \"s/(['\\\"]wiki_status['\\\"].*)/'wiki_status' => 'running',/\" $destDir/wakka.config.php");
|
||||
}
|
||||
$output .= runUpgrades($sudo, $destDir, array_diff($installedExtensions, $defaultExtensions));
|
||||
if ($isHibernating) {
|
||||
$output .= '==== Get YesWiki back in hibernation';
|
||||
$output .= cli("sed -r -i -e \"s/(['\\\"]wiki_status['\\\"].*)/'wiki_status' => 'hibernate',/\" $destDir/wakka.config.php");
|
||||
}
|
||||
$version = trim(cli("cat $destDir/includes/constants.php | grep YESWIKI_RELEASE | sed -r -e \"s/.*([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/\""));
|
||||
$output .= '==== Change YesWiki version to '.$version.' '. $bars;
|
||||
$output .= cli("sed -r -i -e \"s/(['\\\"]yeswiki_release['\\\"].*)/'yeswiki_release' => '$version',/\" $destDir/wakka.config.php");
|
||||
|
|
Loading…
Add table
Reference in a new issue