Ignore:
Timestamp:
Jun 7, 2011, 9:44:37 PM (13 years ago)
Author:
mistic100
Message:

big code cleaning

File:
1 edited

Legend:

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

    r10984 r11267  
    33
    44// Default configuration
    5 define('default_config', serialize(array(
    6   'icon_color' => 'outline_ff3363.png',
    7   'icon_color_over' => 'outline_ff7700.png',
    8 )));
     5define(
     6  'default_config',
     7  serialize(array(
     8    'icon_color' => 'outline_ff3363.png',
     9    'icon_color_over' => 'outline_ff7700.png',
     10    ))
     11  );
    912
    1013// Installation
    11 function plugin_install() {
     14function plugin_install()
     15{
    1216  global $prefixeTable;
    1317
    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;");
     18  pwg_query("
     19CREATE TABLE `" . $prefixeTable . "comments_categories` (
     20  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
     21  `category_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
     22  `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     23  `author` varchar(255) DEFAULT NULL,
     24  `author_id` smallint(5) DEFAULT NULL,
     25  `content` longtext,
     26  `validated` enum('true','false') NOT NULL DEFAULT 'false',
     27  `validation_date` datetime DEFAULT NULL,
     28  PRIMARY KEY (`id`)
     29) DEFAULT CHARSET=utf8
     30;");
    2531 
    26   pwg_query("INSERT INTO " . CONFIG_TABLE . "(param,value,comment) VALUES('comments_on_albums', '" . default_config . "', 'Parametres du plugin Comments on Albums');");
     32  pwg_query("
     33INSERT INTO " . CONFIG_TABLE . "(param,value,comment)
     34VALUES(
     35  'comments_on_albums',
     36  '" . default_config . "',
     37  'Comments on Albums plugin'
     38)
     39;");
    2740}
    2841
    2942// Uninstallation
    30 function plugin_uninstall() {
     43function plugin_uninstall()
     44{
    3145  global $prefixeTable;
    3246
Note: See TracChangeset for help on using the changeset viewer.