forked from marlencrabapple/Glaukaba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_defaults.pl
executable file
·170 lines (152 loc) · 10.7 KB
/
config_defaults.pl
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
use strict;
BEGIN {
use constant S_NOADMIN => 'No NUKE_PASS defined in the configuration'; # Returns error when the config is incomplete
use constant S_NOSECRET => 'No SECRET defined in the configuration'; # Returns error when the config is incomplete
use constant S_NOSQL => 'No SQL settings defined in the configuration'; # Returns error when the config is incomplete
use constant S_NOUSER => 'No default admin credentials defined in the configuration'; # Returns error when the config is incomplete
die S_NOADMIN unless(defined &NUKE_PASS);
die S_NOSECRET unless(defined &SECRET);
die S_NOSQL unless(defined &SQL_DBI_SOURCE);
die S_NOSQL unless(defined &SQL_USERNAME);
die S_NOSQL unless(defined &SQL_PASSWORD);
die S_NOUSER unless(defined &DEFAULT_USER);
die S_NOUSER unless(defined &DEFAULT_PASS);
die S_NOUSER unless(defined &DEFAULT_EMAIL);
eval "use constant BOARD_DIR => ''" unless(defined BOARD_DIR);
eval "use constant USE_CLOUDFLARE => 0" unless(defined &USE_CLOUDFLARE);
eval "use constant USE_FASTCGI => 0" unless(defined &USE_FASTCGI);
eval "use constant USE_SMTP => 0" unless(defined &USE_SMTP);
eval "use constant SMTP_INFO => 0" unless(defined &SMTP_INFO);
eval "use constant IP_VAR => 0" unless(defined &IP_VAR);
eval "use constant SQL_TABLE => 'comments'" unless(defined &SQL_TABLE);
eval "use constant SQL_ADMIN_TABLE => 'admin'" unless(defined &SQL_ADMIN_TABLE);
eval "use constant SQL_USER_TABLE => 'users'" unless(defined &SQL_USER_TABLE);
eval "use constant SQL_MESSAGE_TABLE => 'msgs'" unless(defined &SQL_MESSAGE_TABLE);
eval "use constant SQL_PROXY_TABLE => 'proxy'" unless(defined &SQL_PROXY_TABLE);
eval "use constant SQL_REPORT_TABLE => 'reports'" unless(defined &SQL_REPORT_TABLE);
eval "use constant SQL_BANREQUEST_TABLE => 'banrequests'" unless(defined &SQL_BANREQUEST_TABLE);
eval "use constant SQL_DELETED_TABLE => 'deleted'" unless(defined &SQL_DELETED_TABLE);
eval "use constant SQL_LOG_TABLE => 'log'" unless(defined &SQL_LOG_TABLE);
eval "use constant SQL_PASS_TABLE => 'passes'" unless(defined &SQL_PASS_TABLE);
eval "use constant SQL_SESSION_TABLE => 'sessions'" unless(defined &SQL_SESSION_TABLE);
eval "use constant USE_TEMPFILES => 1" unless(defined &USE_TEMPFILES);
eval "use constant TITLE => 'Wakaba image board'" unless(defined &TITLE);
eval "use constant SHOWTITLETXT => 1" unless(defined &SHOWTITLETXT);
eval "use constant SHOWTITLEIMG => 0" unless(defined &SHOWTITLEIMG);
eval "use constant TITLEIMG => 'title.jpg'" unless(defined &TITLEIMG);
eval "use constant TITLEIMGSCRIPT => ''" unless(defined &TITLEIMGSCRIPT);
eval "use constant FAVICON => 'wakaba.ico'" unless(defined &FAVICON);
eval "use constant HOME => '../'" unless(defined &HOME);
eval "use constant IMAGES_PER_PAGE => 15" unless(defined &IMAGES_PER_PAGE);
eval "use constant REPLIES_PER_THREAD => 5" unless(defined &REPLIES_PER_THREAD);
eval "use constant IMAGE_REPLIES_PER_THREAD => 0" unless(defined &IMAGE_REPLIES_PER_THREAD);
eval "use constant S_ANONAME => 'Anonymous'" unless(defined &S_ANONAME);
eval "use constant S_ANOTEXT => ''" unless(defined &S_ANOTEXT);
eval "use constant S_ANOTITLE => ''" unless(defined &S_ANOTITLE);
eval "use constant SILLY_ANONYMOUS => ''" unless(defined &SILLY_ANONYMOUS);
eval "use constant DEFAULT_STYLE => 'Yotsuba B'" unless(defined &DEFAULT_STYLE);
eval "use constant SOCIAL => 0" unless(defined &SOCIAL);
eval "use constant ADD_BREAKS => 0" unless(defined &ADD_BREAKS);
eval "use constant ENABLE_JSON => 1" unless(defined &ENABLE_JSON);
eval "use constant SHOW_STAFF_POSTS => 0" unless(defined &SHOW_STAFF_POSTS);
eval "use constant AUTO_NOKO => 0" unless(defined &AUTO_NOKO);
eval "use constant SILENT_SAGE => 0" unless(defined &SILENT_SAGE);
eval "use constant MAX_KB => 5000" unless(defined &MAX_KB);
eval "use constant MAX_W => 250" unless(defined &MAX_W);
eval "use constant MAX_H => 250" unless(defined &MAX_H);
eval "use constant MAX_RES => 9000" unless(defined &MAX_RES);
eval "use constant MAX_POSTS => 500" unless(defined &MAX_POSTS);
eval "use constant MAX_THREADS => 0" unless(defined &MAX_THREADS);
eval "use constant MAX_AGE => 0" unless(defined &MAX_AGE);
eval "use constant MAX_MEGABYTES => 0" unless(defined &MAX_MEGABYTES);
eval "use constant MAX_FIELD_LENGTH => 100" unless(defined &MAX_FIELD_LENGTH);
eval "use constant MAX_COMMENT_LENGTH => 8192" unless(defined &MAX_COMMENT_LENGTH);
eval "use constant MAX_LINES_SHOWN => 15" unless(defined &MAX_LINES_SHOWN);
eval "use constant MAX_IMAGE_WIDTH => 16384" unless(defined &MAX_IMAGE_WIDTH);
eval "use constant MAX_IMAGE_HEIGHT => 16384" unless(defined &MAX_IMAGE_HEIGHT);
eval "use constant MAX_IMAGE_PIXELS => 50000000" unless(defined &MAX_IMAGE_PIXELS);
eval "use constant ENABLE_CAPTCHA => 0" unless(defined &ENABLE_CAPTCHA);
eval "use constant SQL_CAPTCHA_TABLE => 'captcha'" unless(defined &SQL_CAPTCHA_TABLE);
eval "use constant CAPTCHA_LIFETIME => 1440" unless(defined &CAPTCHA_LIFETIME);
eval "use constant CAPTCHA_SCRIPT => 'captcha.pl'" unless(defined &CAPTCHA_SCRIPT);
eval "use constant CAPTCHA_HEIGHT => 18" unless(defined &CAPTCHA_HEIGHT);
eval "use constant CAPTCHA_SCRIBBLE => 0.2" unless(defined &CAPTCHA_SCRIBBLE);
eval "use constant CAPTCHA_SCALING => 0.15" unless(defined &CAPTCHA_SCALING);
eval "use constant CAPTCHA_ROTATION => 0.3" unless(defined &CAPTCHA_ROTATION);
eval "use constant CAPTCHA_SPACING => 2.5" unless(defined &CAPTCHA_SPACING);
eval "use constant RECAPTCHA_PRIVATE_KEY => ''" unless(defined &RECAPTCHA_PRIVATE_KEY);
eval "use constant RECAPTCHA_PUBLIC_KEY => ''" unless(defined &RECAPTCHA_PUBLIC_KEY);
eval "use constant PREVALIDATE_RECAPTCHA => 0" unless(defined &PREVALIDATE_RECAPTCHA);
eval "use constant PREVAL_KEY_LIFETIME => 120" unless(defined &PREVAL_KEY_LIFETIME);
eval "use constant PASS_ENABLED => 0" unless(defined &PASS_ENABLED);
eval "use constant ENABLE_LIST => 0" unless(defined &ENABLE_LIST);
eval "use constant ENABLE_CATALOG => 2" unless(defined &ENABLE_CATALOG);
eval "use constant REWRITTEN_URLS => 0" unless(defined &REWRITTEN_URLS);
eval "use constant ENABLE_DNSBL => 1" unless(defined &ENABLE_DNSBL);
eval "use constant ENABLE_LOAD => 0" unless(defined &ENABLE_LOAD);
eval "use constant LOAD_SENDER_SCRIPT => 'sender.pl'" unless(defined &LOAD_SENDER_SCRIPT);
eval "use constant LOAD_LOCAL => 999" unless(defined &LOAD_LOCAL);
eval "use constant LOAD_HOSTS => ()" unless(defined &LOAD_HOSTS);
eval "use constant ENABLE_PROXY_CHECK => 0" unless(defined &ENABLE_PROXY_CHECK);
eval "use constant PROXY_COMMAND => ''" unless(defined &PROXY_COMMAND);
eval "use constant PROXY_WHITE_AGE => 604800" unless(defined &PROXY_WHITE_AGE);
eval "use constant PROXY_BLACK_AGE => 604800" unless(defined &PROXY_BLACK_AGE);
eval "use constant THUMBNAIL_SMALL => 1" unless(defined &THUMBNAIL_SMALL);
eval "use constant THUMBNAIL_QUALITY => 70" unless(defined &THUMBNAIL_QUALITY);
eval "use constant DELETED_THUMBNAIL => ''" unless(defined &DELETED_THUMBNAIL);
eval "use constant DELETED_IMAGE => ''" unless(defined &DELETED_IMAGE);
eval "use constant ALLOW_TEXTONLY => 1" unless(defined &ALLOW_TEXTONLY);
eval "use constant ALLOW_IMAGES => 1" unless(defined &ALLOW_IMAGES);
eval "use constant ALLOW_TEXT_REPLIES => 1" unless(defined &ALLOW_TEXT_REPLIES);
eval "use constant ALLOW_IMAGE_REPLIES => 1" unless(defined &ALLOW_IMAGE_REPLIES);
eval "use constant ALLOW_UNKNOWN => 0" unless(defined &ALLOW_UNKNOWN);
eval "use constant MUNGE_UNKNOWN => '.unknown'" unless(defined &MUNGE_UNKNOWN);
eval "use constant FORBIDDEN_EXTENSIONS => ('php','php3','php4','phtml','shtml','cgi','pl','pm','py','r','exe','dll','scr','pif','asp','cfm','jsp','rb')" unless(defined &FORBIDDEN_EXTENSIONS);
eval "use constant RENZOKU => 5" unless(defined &RENZOKU);
eval "use constant RENZOKU2 => 10" unless(defined &RENZOKU2);
eval "use constant RENZOKU3 => 900" unless(defined &RENZOKU3);
eval "use constant NOSAGE_WINDOW => 1200" unless(defined &NOSAGE_WINDOW);
eval "use constant USE_SECURE_ADMIN => 0" unless(defined &USE_SECURE_ADMIN);
eval "use constant CHARSET => 'utf-8'" unless(defined &CHARSET);
eval "use constant CONVERT_CHARSETS => 1" unless(defined &CONVERT_CHARSETS);
eval "use constant TRIM_METHOD => 0" unless(defined &TRIM_METHOD);
eval "use constant ARCHIVE_MODE => 0" unless(defined &ARCHIVE_MODE);
eval "use constant DATE_STYLE => 'futaba'" unless(defined &DATE_STYLE);
eval "use constant DISPLAY_ID => 0" unless(defined &DISPLAY_ID);
eval "use constant EMAIL_ID => 'Heaven'" unless(defined &EMAIL_ID);
eval "use constant TRIPKEY => '!'" unless(defined &TRIPKEY);
eval "use constant ENABLE_WAKABAMARK => 1" unless(defined &ENABLE_WAKABAMARK);
eval "use constant APPROX_LINE_LENGTH => 150" unless(defined &APPROX_LINE_LENGTH);
eval "use constant STUPID_THUMBNAILING => 0" unless(defined &STUPID_THUMBNAILING);
eval "use constant ALTERNATE_REDIRECT => 0" unless(defined &ALTERNATE_REDIRECT);
eval "use constant COOKIE_PATH => 'root'" unless(defined &COOKIE_PATH);
eval "use constant STYLE_COOKIE => 'wakabastyle'" unless(defined &STYLE_COOKIE);
eval "use constant FORCED_ANON => 0" unless(defined &FORCED_ANON);
eval "use constant SPAM_TRAP => 1" unless(defined &SPAM_TRAP);
eval "use constant SPOILERIMAGE_ENABLED => 1" unless(defined &SPAM_TRAP);
eval "use constant NSFWIMAGE_ENABLED => 0" unless(defined &SPAM_TRAP);
eval "use constant ENABLE_WEBM => 0" unless(defined &ENABLE_WEBM);
eval "use constant IMG_DIR => 'src/'" unless(defined &IMG_DIR);
eval "use constant THUMB_DIR => 'thumb/'" unless(defined &THUMB_DIR);
eval "use constant RES_DIR => 'res/'" unless(defined &RES_DIR);
eval "use constant ARCHIVE_DIR => 'arch/'" unless (defined &ARCHIVE_DIR);
eval "use constant REDIR_DIR => 'redir/'" unless (defined &REDIR_DIR);
eval "use constant CSS_DIR => 'css/'" unless (defined &CSS_DIR);
eval "use constant HTML_SELF => 'wakaba.html'" unless(defined &HTML_SELF);
eval "use constant PAGE_EXT => '.html'" unless(defined &PAGE_EXT);
eval "use constant ERRORLOG => ''" unless(defined &ERRORLOG);
eval "use constant CONVERT_COMMAND => 'convert'" unless(defined &CONVERT_COMMAND);
eval "use constant FFMPEG_PATH => 'ffmpeg'" unless(defined &FFMPEG_PATH);
eval "use constant FFPROBE_PATH => 'ffprobe'" unless(defined &FFPROBE_PATH);
eval "use constant ENABLE_EVENT_HANDLERS => 0" unless(defined &ENABLE_EVENT_HANDLERS);
eval "use constant EVENT_HANDLERS => {}" unless(defined &EVENT_HANDLERS);
unless(defined &SPAM_FILES)
{
if(defined &SPAM_FILE) { eval "use constant SPAM_FILES => (SPAM_FILE)" }
else { eval "use constant SPAM_FILES => ('spam.txt')" }
}
eval "use constant FILETYPES => ()" unless(defined &FILETYPES);
eval "use constant GLAUKABA_VERSION => 'trunk'" unless(defined &GLAUKABA_VERSION);
eval "use constant DISPLAY_VERSION => 0" unless(defined &DISPLAY_VERSION);
}
1;