-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.php
48 lines (40 loc) · 1.53 KB
/
setup.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
<?php /* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')){
die('You should not access this file directly.');
}
/**
* Name: Project Exporter
* Directory: exporters
* Version 1.0
* Type: user
* UI Name: Project Exporter
* UI Icon: projectexporter.png
*/
$config = array();
$config['mod_name'] = 'Project Exporter'; // name the module
$config['mod_version'] = '1.0'; // add a version number
$config['mod_directory'] = 'exporters'; // tell dotProject where to find this module
$config['mod_setup_class'] = 'CSetupProjectExporter'; // the name of the PHP setup class (used below)
$config['mod_type'] = 'user'; // 'core' for modules distributed with dP by standard, 'user' for additional modules from dotmods
$config['mod_ui_name'] = $config['mod_name']; // the name that is shown in the main menu of the User Interface
$config['mod_ui_icon'] = 'projectexporter.png';// name of a related icon
$config['mod_description'] = 'Export data from projects'; // some description of the module
$config['mod_config'] = false; // show 'configure' link in viewmods
if (@$a == 'setup') {
echo w2PshowModuleConfig( $config );
}
class CSetupProjectExporter
{
public function install() {
global $AppUI;
$perms = $AppUI->acl();
return $perms->registerModule('Project Exporter', 'exporters');
}
public function configure() { return false; }
public function remove() {
global $AppUI;
$perms = $AppUI->acl();
return $perms->unregisterModule('exporters');
}
public function upgrade($old_version) { return false; }
}