-
Notifications
You must be signed in to change notification settings - Fork 0
/
q2apro-flag-reasons-admin.php
40 lines (35 loc) · 1.02 KB
/
q2apro-flag-reasons-admin.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
<?php
class q2apro_flagreasons_admin
{
public function init_queries($tablesLc)
{
$tableName = qa_db_add_table_prefix('flagreasons');
if(!in_array($tableName, $tablesLc)) {
require_once QA_INCLUDE_DIR.'qa-app-users.php';
return '
CREATE TABLE `^flagreasons` (
`userid` int(10) UNSIGNED NOT NULL,
`postid` int(10) UNSIGNED NOT NULL,
`reasonid` int(10) UNSIGNED NOT NULL,
`notice` varchar(255) NULL,
PRIMARY KEY (userid, postid)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;
';
}
return null;
}
public function option_default($option)
{
switch($option) {
case 'q2apro_flagreasons_enabled':
return 1;
default:
return null;
}
}
public function allow_template($template)
{
return ($template!='admin');
}
}