Ignore:
Timestamp:
Apr 29, 2012, 5:09:28 PM (12 years ago)
Author:
mistic100
Message:

update for 2.4
delete useless admin page
now compatible with RV Thumb Scroller

File:
1 edited

Legend:

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

    r11267 r14528  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    33
    4 // Default configuration
    5 define(
    6   'default_config',
    7   serialize(array(
    8     'icon_color' => 'outline_ff3363.png',
    9     'icon_color_over' => 'outline_ff7700.png',
    10     ))
    11   );
    12 
    13 // Installation
    144function plugin_install()
    155{
     
    2919) DEFAULT CHARSET=utf8
    3020;");
    31  
    32   pwg_query("
    33 INSERT INTO " . CONFIG_TABLE . "(param,value,comment)
    34 VALUES(
    35   'comments_on_albums',
    36   '" . default_config . "',
    37   'Comments on Albums plugin'
    38 )
    39 ;");
    4021}
    4122
    42 // Uninstallation
     23function plugin_activate()
     24{
     25  global $conf;
     26 
     27  if (isset($conf['comments_on_albums']))
     28  {
     29    pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="comments_on_albums" LIMIT 1;');
     30  }
     31}
     32
    4333function plugin_uninstall()
    4434{
     
    4636
    4737  pwg_query("DROP TABLE `" . $prefixeTable . "comments_categories`;");
    48   pwg_query("DELETE FROM " . CONFIG_TABLE . " WHERE `param` = 'comments_on_albums';");
    4938}
    5039?>
Note: See TracChangeset for help on using the changeset viewer.