source: extensions/flickr2piwigo/maintain.inc.php @ 16070

Last change on this file since 16070 was 16070, checked in by mistic100, 12 years ago

mistyped "mkdir"

File size: 802 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4define(
5  'flickr2piwigo_default_config', 
6  serialize(array(
7    'api_key' => null,
8    'secret_key' => null,
9    'username' => null,
10    ))
11  );
12 
13
14function plugin_install() 
15{
16  global $conf;
17  conf_update_param('flickr2piwigo', flickr2piwigo_default_config);
18  mkdir($conf['data_location'].'flickr_cache/', 0755);
19}
20
21function 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
36function 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.