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

Last change on this file since 9823 was 9786, checked in by mistic100, 14 years ago

[extensions] AdminMessages

  • compatibility with 2.2.0
  • new language rows
File size: 893 bytes
RevLine 
[9421]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` )
[9786]20        ) DEFAULT CHARSET=utf8;");
[9421]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.