-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.php
98 lines (75 loc) · 4 KB
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
$routes = array();
$advanced_routes = array();
$routes[''] = 'common/home';
$routes['feed'] = 'blog/feed';
$routes['feed/full'] = 'blog/feed/firehose';
$routes['sitemap'] = 'information/sitemap';
$routes['clearcache'] = 'admin/cache';
$routes['clearrevision'] = 'admin/cache/revision';
$routes['webmention'] = 'webmention/receive';
$routes['token'] = 'auth/token';
$routes['micropub'] = 'micropub/receive';
//$routes['micropub_dev'] = 'micropub/receivenew';
$routes['media'] = 'micropub/mediaendpoint';
#$routes['logstore'] = 'logs/endpoint';
$routes['login'] = 'auth/login';
$routes['login_callback'] = 'auth/login/callback';
$routes['login_token'] = 'auth/login/tokencallback';
$routes['logout'] = 'auth/logout';
$routes['contact'] = 'contacts/view';
$routes['people'] = 'people/view';
$routes['people/merge'] = 'people/view/merge';
$routes['micropub-send'] = 'micropub/client/send';
$routes['new'] = 'micropub/client';
$routes['live'] = 'micropub/client/live';
$routes['edit'] = 'micropub/client/editPost';
$routes['delete'] = 'micropub/client/deletePost';
$routes['unauthorized'] = 'error/unauthorized';
$routes['404'] = 'error/not_found';
$routes['new/note'] = 'micropub/client/note';
$routes['new/checkin'] = 'micropub/client/checkin';
$routes['manage/contacts'] = 'micropub/client/contacts';
$routes['undelete'] = 'micropub/client/undeletePost';
$routes['vouchsearch'] = 'webmention/vouch/get';
$routes['activity'] = 'information/activity';
$routes['whitelist'] = 'information/whitelist';
$routes['whitelist/delete'] = 'information/whitelist/remove';
$routes['whitelist/private'] = 'information/whitelist/makeprivate';
$routes['whitelist/public'] = 'information/whitelist/makepublic';
$routes['manifest'] = 'webmention/notification/manifest';
$routes['subscribe'] = 'webmention/notification/subscribe';
$routes['unsubscribe'] = 'webmention/notification/unsubscribe';
$advanced_routes[] = array('controller' => 'blog/pages',
'expression' => '`^page/(?P<id>\w+)`i',
'reverse' => 'page/{slug}');
$advanced_routes[] = array('controller' => 'webmention/queue',
'expression' => '`^queue/(?P<id>\d+)`i',
'reverse' => 'queue/{id}');
$advanced_routes[] = array('controller' => 'information/category',
'expression' => '`^category/(?P<name>\w+)/?`i',
'reverse' => 'category/{name}');
$advanced_routes[] = array('controller' => 'common/shortener',
'expression' => '`^s/(?P<eid>.+)`',
'reverse' => 's/{eid}');
//redirects if case is not correct or if there is no trailing slash when the slug is missing
$advanced_routes[] = array('controller' => 'common/fixroute',
'expression' => '`^[a-z]+/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<daycount>\d+)/?.*`i',
'reverse' => 'post/{year}/{month}/{day}/{daycount}/{slug}');
//The way this file is processed, the later routes have precedence
$advanced_routes[] = array('controller' => 'blog/post',
'expression' => '`^(?P<type>\w+)/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<daycount>\d+)/(?P<slug>.*)`',
'reverse' => '{type}/{year}/{month}/{day}/{daycount}/{slug}');
$advanced_routes[] = array('controller' => 'blog/post/latest',
'expression' => '`^(?P<type>\w+)/?$`',
'reverse' => '{type}/');
$advanced_routes[] = array('controller' => 'information/author',
'expression' => '`^author/(?P<id>\d+)`i',
'reverse' => 'author/{id}');
$advanced_routes[] = array('controller' => 'information/archive/day',
'expression' => '`^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?`i',
'reverse' => '{year}/{month}/{day}');
$advanced_routes[] = array('controller' => 'information/archive',
'expression' => '`^(?P<year>\d{4})/(?P<month>\d{1,2})/?`i',
'reverse' => '{year}/{month}');
?>