Ignore:
Timestamp:
May 22, 2011, 12:34:18 PM (14 years ago)
Author:
mistic100
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_on_Albums/maintain.inc.php

    r9766 r10984  
    44// Default configuration
    55define('default_config', serialize(array(
    6         'icon_color' => 'outline_ff3363.png',
    7         'icon_color_over' => 'outline_ff7700.png',
     6  'icon_color' => 'outline_ff3363.png',
     7  'icon_color_over' => 'outline_ff7700.png',
    88)));
    99
    1010// Installation
    1111function plugin_install() {
    12         global $prefixeTable;
     12  global $prefixeTable;
    1313
    14         pwg_query("CREATE TABLE `" . $prefixeTable . "comments_categories` (
    15                 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    16                 `category_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
    17                 `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    18                 `author` varchar(255) DEFAULT NULL,
    19                 `author_id` smallint(5) DEFAULT NULL,
    20                 `content` longtext,
    21                 `validated` enum('true','false') NOT NULL DEFAULT 'false',
    22                 `validation_date` datetime DEFAULT NULL,
    23                 PRIMARY KEY (`id`)
    24         ) DEFAULT CHARSET=utf8;");
    25        
    26         pwg_query("INSERT INTO " . CONFIG_TABLE . "(param,value,comment) VALUES('comments_on_albums', '" . default_config . "', 'Parametres du plugin Comments on Albums');");
     14  pwg_query("CREATE TABLE `" . $prefixeTable . "comments_categories` (
     15    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
     16    `category_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
     17    `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     18    `author` varchar(255) DEFAULT NULL,
     19    `author_id` smallint(5) DEFAULT NULL,
     20    `content` longtext,
     21    `validated` enum('true','false') NOT NULL DEFAULT 'false',
     22    `validation_date` datetime DEFAULT NULL,
     23    PRIMARY KEY (`id`)
     24  ) DEFAULT CHARSET=utf8;");
     25 
     26  pwg_query("INSERT INTO " . CONFIG_TABLE . "(param,value,comment) VALUES('comments_on_albums', '" . default_config . "', 'Parametres du plugin Comments on Albums');");
    2727}
    2828
    2929// Uninstallation
    3030function plugin_uninstall() {
    31         global $prefixeTable;
     31  global $prefixeTable;
    3232
    33         pwg_query("DROP TABLE `" . $prefixeTable . "comments_categories`;");
    34         pwg_query("DELETE FROM " . CONFIG_TABLE . " WHERE `param` = 'comments_on_albums';");
     33  pwg_query("DROP TABLE `" . $prefixeTable . "comments_categories`;");
     34  pwg_query("DELETE FROM " . CONFIG_TABLE . " WHERE `param` = 'comments_on_albums';");
    3535}
    3636?>
Note: See TracChangeset for help on using the changeset viewer.