Updated copyright year.
[mailer.git] / inc / extensions / sql_patches / mode-remove.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 01/14/2013 *
4  * ===================                          Last change: 01/14/2013 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-remove.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Steps for removal of ext-sql_patches             *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Schritte zum Entfernen von ext-sql_patches       *
12  * -------------------------------------------------------------------- *
13  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
14  * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
15  * For more information visit: http://mxchange.org                      *
16  *                                                                      *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or    *
20  * (at your option) any later version.                                  *
21  *                                                                      *
22  * This program is distributed in the hope that it will be useful,      *
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
25  * GNU General Public License for more details.                         *
26  *                                                                      *
27  * You should have received a copy of the GNU General Public License    *
28  * along with this program; if not, write to the Free Software          *
29  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
30  * MA  02110-1301  USA                                                  *
31  ************************************************************************/
32
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
35         die();
36 } // END - if
37
38 // Drop tables
39 addDropTableSql('admin_menu_las');
40 addDropTableSql('admin_menu_las_data');
41 addDropTableSql('admin_las_stats');
42 addDropTableSql('dns_cache');
43 addDropTableSql('server_name_log');
44
45 // Delete admin menu entries
46 addExtensionSql("DELETE LOW_PRIORITY FROM
47         `{?_MYSQL_PREFIX?}_admin_menu`
48 WHERE
49         `what`
50 IN (
51         'config_extensions',
52         'config_home',
53         'list_unconfirmed',
54         'config_refid',
55         'config_title',
56         'config_admin',
57         'config_proxy',
58         'config_session',
59         'list_filter',
60         'list_point_accounts'
61 )");
62
63 // Delete/update member menu entries
64 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE
65 `what`='stats2' OR
66 (`action`='stats' AND (`what`='' OR `what` IS NULL)) OR
67 (`action`='extras' AND (`what`='' OR `what` IS NULL)) OR
68 (`action`='rals' AND (`what`='' OR `what` IS NULL)) OR
69 (`action`='account' AND (`what`='' OR `what` IS NULL)) OR
70 `action`='earn'");
71 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='main' WHERE
72 `action`='stats' OR
73 `action`='extras' OR
74 `action`='rals' OR
75 `action`='account'");
76
77 // Remove points data
78 unregisterExtensionPointsData('pool_payback');
79 unregisterExtensionPointsData('mail_deleted');
80 unregisterExtensionPointsData('admin_add_single');
81 unregisterExtensionPointsData('admin_add_all');
82
83 // Unregister filter
84 unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', TRUE, isExtensionDryRun());
85 unregisterFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', TRUE, isExtensionDryRun());
86 unregisterFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', TRUE, isExtensionDryRun());
87 unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', TRUE, isExtensionDryRun());
88 unregisterFilter(__FILE__, __LINE__, 'determine_menu_mode', 'DETERMINE_MENU_MODE_GENERIC', TRUE, isExtensionDryRun());
89 unregisterFilter(__FILE__, __LINE__, 'config_userid_exclusion_sql', 'EXCLUDE_DEFAULT_REFID', TRUE, isExtensionDryRun());
90
91 // Remove modules
92 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='ajax'");
93
94 // [EOF]
95 ?>