aboutsummaryrefslogtreecommitdiffstats
path: root/admin/page/index.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-07-01 15:08:56 +0200
committerThomas Lange <code@nerdmind.de>2021-07-01 15:08:56 +0200
commitcd87a869b1d52fd65f53875527abf3205a4098a0 (patch)
tree097c33fb9fe6fdaa5a03c6eef5e9e0df742c66dc /admin/page/index.php
parent1782dbf4ea283e75f49dcaae0dac9fbe53ed56bd (diff)
downloadblog-cd87a869b1d52fd65f53875527abf3205a4098a0.tar.gz
blog-cd87a869b1d52fd65f53875527abf3205a4098a0.tar.xz
blog-cd87a869b1d52fd65f53875527abf3205a4098a0.zip
Redirect to entity create form if no entity exists
Diffstat (limited to 'admin/page/index.php')
-rw-r--r--admin/page/index.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/admin/page/index.php b/admin/page/index.php
index 5a2a931..2ec4eab 100644
--- a/admin/page/index.php
+++ b/admin/page/index.php
@@ -28,6 +28,13 @@ $lastSite = ceil($count / $site_size);
$currentSite = HTTP::GET('site') ?? 1;
$currentSite = intval($currentSite);
+#===============================================================================
+# Redirect to page create form if no page exists
+#===============================================================================
+if(!$count) {
+ HTTP::redirect(Application::getAdminURL('page/insert.php'));
+}
+
if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
Application::error404();
}