Last change
on this file since 13371 was
12758,
checked in by patdenice, 13 years ago
|
Delete cache automaticaly if height or margin has changed
|
File size:
838 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | function plugin_install() |
---|
6 | { |
---|
7 | include(dirname(__FILE__).'/config_default.inc.php'); |
---|
8 | |
---|
9 | $query = ' |
---|
10 | INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) |
---|
11 | VALUES ("GThumb" , "'.addslashes(serialize($config_default)).'" , "GThumb plugin parameters");'; |
---|
12 | pwg_query($query); |
---|
13 | } |
---|
14 | |
---|
15 | function plugin_uninstall() |
---|
16 | { |
---|
17 | include_once(dirname(__FILE__).'/functions.inc.php'); |
---|
18 | gtdeltree(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'GThumb'); |
---|
19 | |
---|
20 | $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="GThumb" LIMIT 1;'; |
---|
21 | pwg_query($query); |
---|
22 | } |
---|
23 | |
---|
24 | function plugin_activate($plugin_id, $version) |
---|
25 | { |
---|
26 | if (in_array($version, array('2.3.a', '2.3.b'))) |
---|
27 | { |
---|
28 | include_once(PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/functions.inc.php'); |
---|
29 | gtdeltree(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'GThumb'); |
---|
30 | } |
---|
31 | } |
---|
32 | |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.