leilukin-tumbleblog/modules/sitemap/upgrades.php

27 lines
643 B
PHP
Raw Permalink Normal View History

2024-06-20 14:10:42 +00:00
<?php
if (!defined('UPGRADING') or !UPGRADING)
exit;
/**
* Function: sitemap_update_config
* Updates config settings for 2020.02 and upwards.
*
* Versions: 2020.01 => 2020.02
*/
function sitemap_update_config(): void {
$config = Config::current();
$array = $config->module_sitemap;
fallback($array["sitemap_path"], MAIN_DIR);
$set = $config->set("module_sitemap", $array);
if ($set === false)
error(
__("Error"),
__("Could not write the configuration file.")
);
}
sitemap_update_config();