Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Allow override for type_id

givanz93a67e2e94cb
diff --git a/admin/controller/crud.php b/admin/controller/crud.php
index b71b8ab..6d4368b 100755
--- a/admin/controller/crud.php
+++ b/admin/controller/crud.php
@@ -36,10 +36,13 @@ class Crud extends Base {
$this->view->{$this->type} = $this->data;
- if ($this->data_id && (! $this->data || (! isset($this->data[$this->type . '_id'])))) {
+ $this->type_id = $this->type_id ?? $this->type . '_id';
+
+ if ($this->data_id && (! $this->data || (! isset($this->data[$this->type_id])))) {
return $this->notFound(sprintf(__('%s not found!'), humanReadable(__($this->type))));
}
+
$admin_path = \Vvveb\adminPath();
$controllerPath = $admin_path . 'index.php?module=media/media';
$this->view->scanUrl = "$controllerPath&action=scan";