aboutsummaryrefslogtreecommitdiffstats
path: root/admin/post/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/post/index.php')
-rw-r--r--admin/post/index.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/admin/post/index.php b/admin/post/index.php
index e66d3b2..43d960a 100644
--- a/admin/post/index.php
+++ b/admin/post/index.php
@@ -28,6 +28,13 @@ $lastSite = ceil($count / $site_size);
$currentSite = HTTP::GET('site') ?? 1;
$currentSite = intval($currentSite);
+#===============================================================================
+# Redirect to post create form if no post exists
+#===============================================================================
+if(!$count) {
+ HTTP::redirect(Application::getAdminURL('post/insert.php'));
+}
+
if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
Application::error404();
}