Fix design validation, canonical routes, media headers and favicon
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Controller;
|
||||
use App\Content\BlockTemplates;
|
||||
use App\Content\Html;
|
||||
use App\Content\Media;
|
||||
use App\Content\PageDraft;
|
||||
use App\Content\PageTemplates;
|
||||
use App\Content\Repository;
|
||||
use App\Http\Request;
|
||||
@@ -29,7 +30,7 @@ final class StudioController extends AdminController
|
||||
$data['name'] = $this->input($request, 'name');
|
||||
$data['slug'] = $this->input($request, 'slug');
|
||||
try {
|
||||
if (!$this->slug($data['slug']) || in_array($data['slug'], ['admin', 'assets', 'home', 'account', 'mcp', 'palette', 'favicon'], true)
|
||||
if (!$this->slug($data['slug']) || in_array($data['slug'], PageDraft::RESERVED, true)
|
||||
|| $data['name'] === '' || mb_strlen($data['name']) > 100) {
|
||||
throw new RuntimeException('请填写页面名称及可用的网址标识。');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user