summaryrefslogtreecommitdiff
path: root/htdocs/index.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2024-01-31 06:11:00 +0300
committerEvgeny Zinoviev <me@ch1p.io>2024-01-31 20:45:40 +0300
commitc0dc531ebefd8912819f3b6c8bda1fed3c7e750c (patch)
tree2c75aa9df182260aef09faf4befd81a4c2b9c5e2 /htdocs/index.php
parent48d688cdf7f9eae1bf11b8a6f0e5b98687c604cb (diff)
make it simple, but not simpler
Diffstat (limited to 'htdocs/index.php')
-rw-r--r--htdocs/index.php27
1 files changed, 2 insertions, 25 deletions
diff --git a/htdocs/index.php b/htdocs/index.php
index 150b14a..397696f 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -2,28 +2,5 @@
require_once __DIR__.'/../init.php';
-$r = (new Router())
- // route handler input
- // ----- ------- -----
- ->add('/', 'index')
- ->add('contacts/', 'contacts')
- ->add('projects.html', 'projects')
- ->add('blog/(\d+)/', 'post_id id=$(1)')
- ->add('([a-z0-9-]+)/', 'auto name=$(1)')
-
- ->add('feed.rss', 'RSS')
- ->add('rss/', 'RSS')
-
- ->add('admin/', 'admin/index')
- ->add('admin/{login,logout,log}/', 'admin/${1}')
-
- ->add('([a-z0-9-]+)/{delete,edit}/', 'admin/auto_${1} short_name=$(1)')
- ->add('([a-z0-9-]+)/create/', 'admin/page_add short_name=$(1)')
- ->add('write/', 'admin/post_add')
- ->add('admin/markdown-preview.ajax', 'admin/markdown_preview')
-
- ->add('uploads/', 'admin/uploads')
- ->add('uploads/{edit_note,delete}/(\d+)/','admin/upload_${1} id=$(1)')
-;
-
-(new RequestDispatcher($r))->dispatch(); \ No newline at end of file
+router_init();
+dispatch_request();