feat: eliminate htaccess.conf, move all URL routes to pp_routes (v0.329-0.330)
- Add category_id, page_id, article_id, type columns to pp_routes (migration 0.329) - Move routing block in index.php before checkUrlParams() with Redis cache - Routes for categories, pages, articles now stored in pp_routes instead of .htaccess - Delete category/page/article routes on entity delete in respective repositories - Eliminate libraries/htaccess.conf: generate .htaccess content entirely from PHP - Move 32 static system routes (koszyk, logowanie, newsletter, AJAX modules, etc.) plus dynamic language/producer routes to pp_routes with type='system' - Invalidate pp_routes Redis cache on every htacces() regeneration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -360,6 +360,9 @@ class ArticleRepository
|
||||
public function archive(int $articleId): bool
|
||||
{
|
||||
$result = $this->db->update('pp_articles', ['status' => -1], ['id' => $articleId]);
|
||||
if ($result) {
|
||||
$this->db->delete('pp_routes', ['article_id' => $articleId]);
|
||||
}
|
||||
return (bool)$result;
|
||||
}
|
||||
|
||||
@@ -381,6 +384,7 @@ class ArticleRepository
|
||||
$this->db->delete('pp_articles_langs', ['article_id' => $articleId]);
|
||||
$this->db->delete('pp_articles_images', ['article_id' => $articleId]);
|
||||
$this->db->delete('pp_articles_files', ['article_id' => $articleId]);
|
||||
$this->db->delete('pp_routes', ['article_id' => $articleId]);
|
||||
$this->db->delete('pp_articles', ['id' => $articleId]);
|
||||
|
||||
\Shared\Helpers\Helpers::delete_dir('../upload/article_images/article_' . $articleId . '/');
|
||||
|
||||
Reference in New Issue
Block a user