source: extensions/Admin_Messages/maintain.inc.php @ 28115

Last change on this file since 28115 was 12356, checked in by mistic100, 13 years ago

Reorganize language files

File size: 914 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4// Configuration par défaut
5define('default_config' , serialize(array(
6  'nb_messages' => 5,
7  'free_name' => false,
8)));
9
10// Installation
11function plugin_install() {
12  global $prefixeTable;
13
14  pwg_query("CREATE TABLE `" . $prefixeTable . "admin_messages` (
15    `id` INT NOT NULL AUTO_INCREMENT ,
16    `add_date` DATETIME NOT NULL ,
17    `author` VARCHAR( 255 ) NOT NULL ,
18    `content` TEXT NULL ,
19    PRIMARY KEY ( `id` )
20  ) DEFAULT CHARSET=utf8;");
21   
22  pwg_query("INSERT INTO " . CONFIG_TABLE . "(param,value,comment) VALUES('admin_messages', '" . default_config . "', 'Parametres du plugin Admin Messages');");
23}
24
25// Désinstallation
26function plugin_uninstall() {
27  global $prefixeTable;
28
29  pwg_query("DROP TABLE `" . $prefixeTable . "admin_messages`;");
30  pwg_query("DELETE FROM " . CONFIG_TABLE . " WHERE `param` = 'admin_messages';");
31}
32?>
Note: See TracBrowser for help on using the repository browser.