koblog/bl-kernel/helpers/updater.class.php
Kazhnuz e8cebf6c10 ♻️ 💥 (pages): use the "article" type instead of published
It makes more sense to use the type of page you have for the type, and it prepare published to be a state instead of a type
2025-01-23 22:41:26 +01:00

20 lines
No EOL
573 B
PHP

<?php defined('KOBLOG') or die('Koblog CMS.');
class KoblogUpdater {
// Special function to upgrade
public static function upgradeArticlesToPageTypes()
{
global $pages;
foreach ($pages->db as $key => $fields) {
if ($fields['type'] === "published") {
$pages->db[$key]['type'] = "article";
} else {
//$pages->db[$key]['sticky'] = false; // Not really important for static
}
}
return $pages->save();
}
}