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