Line | |
---|
1 | <?php |
---|
2 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
3 | |
---|
4 | /** |
---|
5 | * The installation function is called by main.inc.php and maintain.inc.php |
---|
6 | * in order to install and/or update the plugin. |
---|
7 | * |
---|
8 | * That's why all operations must be conditionned : |
---|
9 | * - use "if empty" for configuration vars |
---|
10 | * - use "IF NOT EXISTS" for table creation |
---|
11 | * |
---|
12 | * Unlike the functions in maintain.inc.php, the name of this function must be unique |
---|
13 | * and not enter in conflict with other plugins. |
---|
14 | */ |
---|
15 | |
---|
16 | function scheduler_install() |
---|
17 | { |
---|
18 | global $conf, $prefixeTable; |
---|
19 | |
---|
20 | // add a new table |
---|
21 | pwg_query(' |
---|
22 | CREATE TABLE IF NOT EXISTS `'. $prefixeTable .'scheduler` ( |
---|
23 | `image_id` int(11) NOT NULL, |
---|
24 | `scheduled_for` datetime NOT NULL, |
---|
25 | `level` tinyint(4) DEFAULT NULL |
---|
26 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 |
---|
27 | ;'); |
---|
28 | } |
---|
29 | |
---|
30 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.