source: extensions/scheduler/include/install.inc.php @ 25035

Last change on this file since 25035 was 19232, checked in by plg, 12 years ago

initial version of plugin Scheduler

File size: 791 bytes
Line 
1<?php
2defined('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
16function scheduler_install() 
17{
18  global $conf, $prefixeTable;
19 
20  // add a new table
21        pwg_query('
22CREATE 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.