source: extensions/stop_spammers/maintain.inc.php @ 26522

Last change on this file since 26522 was 26522, checked in by plg, 10 years ago

new plugin to stop spammers

File size: 651 bytes
Line 
1<?php
2defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
3
4if (!defined("STOP_SPAMMERS_PATH"))
5{
6  define('STOP_SPAMMERS_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)));
7}
8
9include_once(STOP_SPAMMERS_PATH.'/include/install.inc.php');
10
11function plugin_install()
12{
13  stop_spammers_install();
14  define('stop_spammers_installed', true);
15}
16
17function plugin_uninstall()
18{
19  global $prefixeTable;
20 
21  $query = 'DROP TABLE '.$prefixeTable.'stop_spammers;';
22  pwg_query($query);
23}
24
25function plugin_activate()
26{
27  if (!defined('stop_spammers_installed')) // a plugin is activated just after its installation
28  {
29    stop_spammers_install();
30  }
31}
32?>
Note: See TracBrowser for help on using the repository browser.