-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.php
51 lines (47 loc) · 2.15 KB
/
index.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
<?php
require_once(dirname(__FILE__) . '/vendor/autoload.php');
$ok = @session_start();
if(!$ok){
session_regenerate_id(true);
session_start();
}
$local = new Model_LocalConfig();
if ($local->getHideExceptions()) {
ini_set('display_errors', 'Off');
} else {
error_reporting(-1);
ini_set('display_errors', 'On');
}
try {
Toro::serve(array(
"/" => "Controller_PostList",
"/available" => "Controller_Available",
"/tag/:number/:alpha" => "Controller_Tag",
"/login" => "Controller_Login",
"/logout" => "Controller_Logout",
"/posts" => "Controller_PostList",
"/posts/new" => "Controller_PostNew",
"/posts/:number/edit" => "Controller_PostEdit",
"/posts/:number/notify-comment" => "Controller_PostCommentNotify",
"/posts/:number" => "Controller_Post",
"/posts/:number/upvote" => "Controller_PostUpvote",
"/posts/:number/:alpha" => "Controller_Post",
"/profile" => "Controller_Profile",
"/users" => "Controller_UserList",
"/users-fragment/:number" => "Controller_UserListFragment",
"/user/:number/upvote" => "Controller_UserUpvote",
"/:string/posts" => "Controller_UserPosts",
"/(.*)" => "Controller_UserProfile",
"/map" => "Controller_Map",
"/map/users" => "Controller_MapUsers",
"/search" => "Controller_Search",
"/feed" => "Controller_Feed",
));
} catch (Exception $e) {
if ($local->getHideExceptions()) {
mail("kalen@magemail.co", "MageHero Exception: " . $e->getMessage(), $e->getTraceAsString());
die("Uh-oh. Something's not right. Heroes have been deployed to fix it.");
} else {
throw $e;
}
}