Line | |
---|
1 | <?php |
---|
2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
3 | |
---|
4 | define( |
---|
5 | 'flickr2piwigo_default_config', |
---|
6 | serialize(array( |
---|
7 | 'api_key' => null, |
---|
8 | 'secret_key' => null, |
---|
9 | 'username' => null, |
---|
10 | )) |
---|
11 | ); |
---|
12 | |
---|
13 | |
---|
14 | function plugin_install() |
---|
15 | { |
---|
16 | global $conf; |
---|
17 | conf_update_param('flickr2piwigo', flickr2piwigo_default_config); |
---|
18 | mkdir($conf['data_location'].'flickr_cache/', 0755); |
---|
19 | } |
---|
20 | |
---|
21 | function plugin_activate() |
---|
22 | { |
---|
23 | global $conf; |
---|
24 | |
---|
25 | if (empty($conf['flickr2piwigo'])) |
---|
26 | { |
---|
27 | conf_update_param('flickr2piwigo', flickr2piwigo_default_config); |
---|
28 | } |
---|
29 | |
---|
30 | if (!file_exists($conf['data_location'].'flickr_cache/')) |
---|
31 | { |
---|
32 | mdir($conf['data_location'].'flickr_cache/', 0755); |
---|
33 | } |
---|
34 | } |
---|
35 | |
---|
36 | function plugin_uninstall() |
---|
37 | { |
---|
38 | pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "flickr2piwigo" LIMIT 1;'); |
---|
39 | } |
---|
40 | |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.