fix sitemap, drop old tables
This commit is contained in:
parent
1f9024763d
commit
f52c257d41
3 changed files with 17 additions and 2 deletions
14
src/db/migrations/0001.sql
Normal file
14
src/db/migrations/0001.sql
Normal 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;
|
|
@ -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";
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue