source: extensions/BanIP/maintain.class.php @ 31368

Last change on this file since 31368 was 31368, checked in by ddtddt, 8 years ago

[extensions] - BanIP - first release for test

File size: 631 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4class BanIP_maintain extends PluginMaintain
5{
6  function install($plugin_version, &$errors=array())
7  {
8    global $prefixeTable;
9
10        $query = "CREATE TABLE IF NOT EXISTS ". $prefixeTable.'ip_ban' ." (
11  id int(11) NOT NULL auto_increment,
12  ip char(50) NOT NULL default '',
13PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
14        pwg_query($query);
15  }
16
17  function update($old_version, $new_version, &$errors=array())
18  {
19        $this->install($new_version, $errors);
20  }
21
22  function uninstall()
23  {
24    global $prefixeTable;
25
26    pwg_query('DROP TABLE '.$prefixeTable.'ip_ban;');
27  }
28}
Note: See TracBrowser for help on using the repository browser.