1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } |
---|
4 | |
---|
5 | ini_set('error_reporting', E_ALL); |
---|
6 | ini_set('display_errors', true); |
---|
7 | |
---|
8 | defined('AMM_DIR') || define('AMM_DIR' , basename(dirname(__FILE__))); |
---|
9 | defined('AMM_PATH') || define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/'); |
---|
10 | @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/tables.class.inc.php'); |
---|
11 | |
---|
12 | |
---|
13 | global $gpc_installed, $lang; //needed for plugin manager compatibility |
---|
14 | |
---|
15 | $gpc_installed=false; |
---|
16 | if(file_exists(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php')) |
---|
17 | { |
---|
18 | @include_once("amm_install.class.inc.php"); |
---|
19 | $gpc_installed=true; |
---|
20 | } |
---|
21 | |
---|
22 | load_language('plugin.lang', AMM_PATH); |
---|
23 | |
---|
24 | function plugin_install($plugin_id, $plugin_version, &$errors) |
---|
25 | { |
---|
26 | global $prefixeTable, $gpc_installed; |
---|
27 | if($gpc_installed) |
---|
28 | { |
---|
29 | //$menu->register('mbAMM_links', 'Links', 0, 'AMM'); |
---|
30 | //$menu->register('mbAMM_randompict', 'Random pictures', 0, 'AMM'); |
---|
31 | $amm=new AMM_install($prefixeTable, __FILE__); |
---|
32 | $result=$amm->install(); |
---|
33 | } |
---|
34 | else |
---|
35 | { |
---|
36 | array_push($errors, l10n('Grum Plugin Classes is not installed')); |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | function plugin_activate($plugin_id, $plugin_version, &$errors) |
---|
41 | { |
---|
42 | } |
---|
43 | |
---|
44 | function plugin_deactivate($plugin_id) |
---|
45 | { |
---|
46 | } |
---|
47 | |
---|
48 | function plugin_uninstall($plugin_id) |
---|
49 | { |
---|
50 | global $prefixeTable; |
---|
51 | $amm=new AMM_install($prefixeTable, __FILE__); |
---|
52 | $result=$amm->uninstall(); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | ?> |
---|