source: extensions/scheduler/maintain.inc.php @ 28151

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

initial version of plugin Scheduler

File size: 1.3 KB
Line 
1<?php
2defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
3
4defined('SCHEDULER_ID') or define('SCHEDULER_ID', basename(dirname(__FILE__)));
5include_once(PHPWG_PLUGINS_PATH . SCHEDULER_ID . '/include/install.inc.php');
6
7/**
8 * plugin installation
9 *
10 * perform here all needed step for the plugin installation
11 * such as create default config, add database tables,
12 * add fields to existing tables, create local folders...
13 */
14function plugin_install() 
15{
16  scheduler_install();
17  define('scheduler_installed', true);
18}
19
20/**
21 * plugin activation
22 *
23 * this function is triggered adter installation, by manual activation
24 * or after a plugin update
25 * for this last case you must manage updates tasks of your plugin in this function
26 */
27function plugin_activate()
28{
29  if (!defined('scheduler_installed')) // a plugin is activated just after its installation
30  {
31    scheduler_install();
32  }
33}
34
35/**
36 * plugin unactivation
37 *
38 * triggered before uninstallation or by manual unactivation
39 */
40function plugin_unactivate()
41{
42}
43
44/**
45 * plugin uninstallation
46 *
47 * perform here all cleaning tasks when the plugin is removed
48 * you should revert all changes made by plugin_install()
49 */
50function plugin_uninstall() 
51{
52  global $prefixeTable;
53 
54  // delete table
55  pwg_query('DROP TABLE `'. $prefixeTable .'scheduler`;');
56}
57?>
Note: See TracBrowser for help on using the repository browser.