fix sitemap, drop old tables

This commit is contained in:
Freya Murphy 2024-09-18 15:03:04 -04:00
parent 1f9024763d
commit f52c257d41
Signed by: freya
GPG key ID: 744AB800E383AE52
3 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,14 @@
BEGIN TRANSACTION;
SET search_path = public;
-- Migration Start
DROP TABLE admin.request_log;
DROP TYPE admin.request_log_method_type;
DROP SEQUENCE sys.request_log_id_seq;
DROP TABLE admin.banned;
-- Migration End;
-- Set Current Revision
UPDATE sys.database_info SET curr_revision = 2 WHERE name = current_database();
COMMIT TRANSACTION;

View file

@ -39,7 +39,8 @@ class _meta_controller extends Controller {
$blog = $blog_modal->get_data()['blog'];
foreach ($blog as $name => $_) {
$this->sitemap_page("blog/post?name={$name}", 0.5);
$name = substr($name, 0, -3);
$this->sitemap_page("blog/post/{$name}", 0.5);
}
echo "</urlset>\n";

View file

@ -29,7 +29,7 @@ class Blog_model extends Model {
$data['blog'] = $blog;
}
public function get_data(): ?array {
public function get_data(): array {
$data = parent::get_base_data('blog');
$this->load_blog($data);
$data['title'] = lang('title');