aboutsummaryrefslogtreecommitdiffstats
path: root/admin/page
diff options
context:
space:
mode:
Diffstat (limited to 'admin/page')
-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();
}