12
12
die ('Stop!!! ' );
13
13
}
14
14
15
- $ select_options = array ();
16
-
15
+ $ select_options = [];
17
16
$ contents = '' ;
18
17
19
18
$ xtpl = new XTemplate ('edit.tpl ' , NV_ROOTDIR . '/themes/ ' . $ global_config ['module_theme ' ] . '/modules/ ' . $ module_file );
27
26
$ idfile = $ nv_Request ->get_int ('idfile ' , 'post ' , 0 );
28
27
29
28
$ authorSubmit = isset ($ _POST ['pozauthor ' ]['author ' ]) ? $ _POST ['pozauthor ' ]['author ' ] : '' ;
30
- if (preg_match ('/^([^\<]+)\<([^\>]+)\>$/ ' , $ authorSubmit , $ m ) and nv_check_valid_email (trim ($ m [2 ])) == '' ) {
31
- $ authorSubmit = trim (strip_tags ($ m [1 ])) . ' < ' . trim ($ m [2 ]) . '> ' ;
29
+ if (preg_match ('/^([^\<]+)\<([^\>]+)\>$/ ' , $ authorSubmit , $ m )) {
30
+ $ check = nv_check_valid_email (trim ($ m [2 ]), true );
31
+ if ($ check [0 ] == '' ) {
32
+ $ authorSubmit = trim (strip_tags ($ m [1 ])) . ' < ' . $ check [1 ] . '> ' ;
33
+ } else {
34
+ $ authorSubmit = false ;
35
+ }
32
36
} else {
33
37
$ authorSubmit = false ;
34
38
}
35
39
36
- $ lang_translator = $ nv_Request ->get_array ('pozauthor ' , 'post ' , array () );
37
- $ lang_translator_save = array () ;
40
+ $ lang_translator = $ nv_Request ->get_array ('pozauthor ' , 'post ' , [] );
41
+ $ lang_translator_save = [] ;
38
42
39
43
$ langtype = isset ($ lang_translator ['langtype ' ]) ? strip_tags ($ lang_translator ['langtype ' ]) : 'lang_module ' ;
40
44
59
63
60
64
nv_insert_logs (NV_LANG_DATA , $ module_name , $ lang_module ['nv_admin_edit ' ] . ' -> ' . $ language_array [$ dirlang ]['name ' ], $ module . ' : idfile = ' . $ idfile , $ admin_info ['userid ' ]);
61
65
62
- $ pozlang = $ nv_Request ->get_array ('pozlang ' , 'post ' , array () );
66
+ $ pozlang = $ nv_Request ->get_array ('pozlang ' , 'post ' , [] );
63
67
64
68
if (!empty ($ pozlang )) {
65
69
$ sth = $ db ->prepare ('UPDATE ' . NV_LANGUAGE_GLOBALTABLE . ' SET lang_ ' . $ dirlang . '= :lang_value WHERE id= :id ' );
71
75
}
72
76
}
73
77
74
- $ pozlangkey = $ nv_Request ->get_array ('pozlangkey ' , 'post ' , array () );
75
- $ pozlangval = $ nv_Request ->get_array ('pozlangval ' , 'post ' , array () );
78
+ $ pozlangkey = $ nv_Request ->get_array ('pozlangkey ' , 'post ' , [] );
79
+ $ pozlangval = $ nv_Request ->get_array ('pozlangval ' , 'post ' , [] );
76
80
77
81
$ sizeof = sizeof ($ pozlangkey );
78
82
$ sth = $ db ->prepare ('INSERT INTO ' . NV_LANGUAGE_GLOBALTABLE . ' (idfile, lang_key, lang_ ' . $ dirlang . ') VALUES ( ' . $ idfile . ', :lang_key, :lang_value) ' );
102
106
103
107
if (!empty ($ dirlang ) and !empty ($ module )) {
104
108
if (empty ($ author_lang )) {
105
- $ array_translator = array () ;
109
+ $ array_translator = [] ;
106
110
$ array_translator ['author ' ] = '' ;
107
111
$ array_translator ['createdate ' ] = '' ;
108
112
$ array_translator ['copyright ' ] = '' ;
161
165
162
166
include NV_ROOTDIR . '/includes/header.php ' ;
163
167
echo nv_admin_theme ($ contents );
164
- include NV_ROOTDIR . '/includes/footer.php ' ;
168
+ include NV_ROOTDIR . '/includes/footer.php ' ;
0 commit comments