-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmaintain.inc.php
More file actions
executable file
·44 lines (34 loc) · 973 Bytes
/
maintain.inc.php
File metadata and controls
executable file
·44 lines (34 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
/**
* This class is used to expose maintenance methods to the plugins manager
* It must extends PluginMaintain and be named "PLUGINID_maintain"
* where PLUGINID is the directory name of your plugin
*/
class FancyFooter_maintain extends PluginMaintain
{
/**
* plugin installation
*
* perform here all needed step for the plugin installation
* such as create default config, add database tables,
* add fields to existing tables, create local folders...
*/
function install($plugin_version, &$errors=array())
{
$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("FancyFooter","","Footer configuration values");';
pwg_query($query);
}
function deactivate()
{
// Do nothing
}
function update($old_version, $new_version, &$errors=array())
{
// Do nothing
}
function uninstall()
{
conf_delete_param('FancyFooter');
}
}