source: extensions/Front2Back/maintain.inc.php @ 10165

Last change on this file since 10165 was 10165, checked in by mistic100, 13 years ago

add config check for activation

File size: 778 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4function plugin_install()
5{
6        global $conf;
7
8        if (!isset($conf['Front2Back'])) {
9                $q = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
10                        VALUES ("Front2Back", ",thumbnail/verso/,pwg_high/verso/,", "Parametres Front2Back");';
11                pwg_query($q);
12        }
13}
14
15function plugin_activate()
16{
17        global $conf;
18
19        if (!isset($conf['Front2Back'])) {
20                $q = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
21                        VALUES ("Front2Back", ",thumbnail/verso/,pwg_high/verso/,", "Parametres Front2Back");';
22                pwg_query($q);
23        }
24}
25
26function plugin_uninstall()
27{
28        global $conf;
29
30        if (isset($conf['Front2Back'])) {
31                pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Front2Back";');
32        }
33}
34
35?>
Note: See TracBrowser for help on using the repository browser.