-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
module.php
40 lines (30 loc) · 931 Bytes
/
module.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
<?php
class SxReportingModule extends OBFModule
{
public $name = 'Reporting v1.0';
public $description = 'Reporting module for SOCAN and SoundExchange.';
public function callbacks()
{
}
public function install()
{
// add permissions data for this module
$this->db->insert('users_permissions', [
'category'=>'administration',
'description'=>'sx reporting module',
'name'=>'sx_reporting_module'
]);
return true;
}
public function uninstall()
{
// remove permissions data for this module
$this->db->where('name','sx_reporting_module');
$permission = $this->db->get_one('users_permissions');
$this->db->where('permission_id',$permission['id']);
$this->db->delete('users_permissions_to_groups');
$this->db->where('id',$permission['id']);
$this->db->delete('users_permissions');
return true;
}
}