MantisBT-Discord – Blame information for rev 2
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
2 | office | 1 | <?php |
2 | /** |
||
3 | * Discord Integration |
||
4 | * Copyright (C) 2014 Karim Ratib (karim.ratib@gmail.com) |
||
5 | * |
||
6 | * Discord Integration is free software; you can redistribute it and/or |
||
7 | * modify it under the terms of the GNU General Public License 2 |
||
8 | * as published by the Free Software Foundation. |
||
9 | * |
||
10 | * Discord Integration is distributed in the hope that it will be useful, |
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | * GNU General Public License for more details. |
||
14 | * |
||
15 | * You should have received a copy of the GNU General Public License |
||
16 | * along with Discord Integration; if not, write to the Free Software |
||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
||
18 | * or see http://www.gnu.org/licenses/. |
||
19 | */ |
||
20 | |||
21 | form_security_validate( 'plugin_Discord_config_edit' ); |
||
22 | |||
23 | auth_reauthenticate( ); |
||
24 | access_ensure_global_level( config_get( 'manage_plugin_threshold' ) ); |
||
25 | |||
26 | $f_url_webhook = gpc_get_string( 'url_webhook' ); |
||
27 | #$f_bot_name = gpc_get_string( 'bot_name' ); |
||
28 | #$f_bot_icon = gpc_get_string( 'bot_icon' ); |
||
29 | $f_skip_bulk = gpc_get_bool( 'skip_bulk' ); |
||
30 | $f_link_names = gpc_get_bool( 'link_names' ); |
||
31 | #$f_default_channel = gpc_get_string( 'default_channel' ); |
||
32 | $f_language = gpc_get_string( 'language' ); |
||
33 | |||
34 | if( plugin_config_get( 'url_webhook' ) != $f_url_webhook ) { |
||
35 | plugin_config_set( 'url_webhook', $f_url_webhook ); |
||
36 | } |
||
37 | |||
38 | #if( plugin_config_get( 'bot_name' ) != $f_bot_name ) { |
||
39 | # plugin_config_set( 'bot_name', $f_bot_name ); |
||
40 | #} |
||
41 | |||
42 | #if( plugin_config_get( 'bot_icon' ) != $f_bot_icon ) { |
||
43 | # plugin_config_set( 'bot_icon', $f_bot_icon ); |
||
44 | #} |
||
45 | |||
46 | if( plugin_config_get( 'skip_bulk' ) != $f_skip_bulk ) { |
||
47 | plugin_config_set( 'skip_bulk', $f_skip_bulk ); |
||
48 | } |
||
49 | |||
50 | if( plugin_config_get( 'link_names' ) != $f_link_names ) { |
||
51 | plugin_config_set( 'link_names', $f_link_names ); |
||
52 | } |
||
53 | |||
54 | #if( plugin_config_get( 'default_channel' ) != $f_default_channel ) { |
||
55 | # plugin_config_set( 'default_channel', $f_default_channel ); |
||
56 | #} |
||
57 | |||
58 | if( plugin_config_get( 'language' ) != $f_language ) { |
||
59 | plugin_config_set( 'language', $f_language ); |
||
60 | } |
||
61 | |||
62 | form_security_purge( 'plugin_Discord_config_edit' ); |
||
63 | |||
64 | print_successful_redirect( plugin_page( 'config', true ) ); |