fix upgrade script

This commit is contained in:
crispycat 2024-05-23 16:38:08 -04:00
parent 4daf406b41
commit d344acd964

View File

@ -4,11 +4,13 @@ $this->log("Backing up config.php");
copy(ROOT . "/config.php", ROOT . "/config.old.php");
$this->runScript(PACKAGE, "copy_files");
copy(PACKAGE_PATH . "/index.php", ROOT . "/index.php");
copy(PACKAGE_PATH . "/package.php", ROOT . "/package.php");
$this->app->database->renameColumn($this->app->assets->getTable("\\Crispage\\Assets\\Plugin"), "runnable", "classname");
$this->log("Creating new config.php");
$template = file_get_contents(PACKAGE_PATH . "/config_template.php");
$template = file_get_contents(ROOT . "/packages/crispage.core/config_template.php");
$nmatches = preg_match_all(\Crispage\Text\I18n::TS_REGEX, $template, $matches, PREG_OFFSET_CAPTURE);
$pos = 0;
$config = "";