Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Added type property for tag reuse
givanzd681e689fd68
diff --git a/app/controller/content/category.php b/app/controller/content/category.phpindex cb6415e..b0bf552 100755--- a/app/controller/content/category.php+++ b/app/controller/content/category.php@@ -27,6 +27,8 @@ use Vvveb\Controller\Base;use Vvveb\Sql\CategorySQL;class Category extends Base {+ protected $type = 'category';+function index() {$category_name = $this->request->get['slug'] ?? '';$this->view->category_name = $category_name;@@ -40,7 +42,7 @@ class Category extends Base {$this->request->get['taxonomy_item_id'] = $category['taxonomy_item_id'];$this->view->category_name = $category['name'];} else {- $message = __('Category not found!');+ $message = sprintf(__('%s not found!'), ucfirst(__($this->type)));$this->notFound(true, ['message' => $message, 'title' => $message]);}}diff --git a/app/controller/content/tag.php b/app/controller/content/tag.phpindex c39d440..080bf4c 100755--- a/app/controller/content/tag.php+++ b/app/controller/content/tag.php@@ -22,14 +22,6 @@namespace Vvveb\Controller\Content;-use Vvveb\Controller\Base;--class Tag extends Base {- function index() {- //$post = Components::get('post');-- //if (! $post) {- //$this->notFound();- //}- }+class Tag extends Category {+ protected $type = 'tag';}