Rev | Line | |
---|
[12447] | 1 | <?php |
---|
| 2 | |
---|
| 3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 4 | |
---|
| 5 | function plugin_install() |
---|
| 6 | { |
---|
| 7 | global $prefixeTable; |
---|
| 8 | |
---|
| 9 | if (!defined('USERNOTES_TABLE')) define('USERNOTES_TABLE', $prefixeTable.'user_notes'); |
---|
| 10 | $query = "CREATE TABLE IF NOT EXISTS ". USERNOTES_TABLE ." ( |
---|
| 11 | user_id SMALLINT( 5 ) UNSIGNED NOT NULL , |
---|
| 12 | note VARCHAR( 255 ) NOT NULL , |
---|
| 13 | PRIMARY KEY (user_id))DEFAULT CHARSET=utf8;"; |
---|
| 14 | $result = pwg_query($query); |
---|
| 15 | |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | function plugin_uninstall() |
---|
| 19 | { |
---|
| 20 | global $prefixeTable; |
---|
| 21 | |
---|
| 22 | $q = 'DROP TABLE ' . $prefixeTable . 'user_notes;'; |
---|
| 23 | pwg_query($q); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.