jdarwood007 commited on 2019-12-08 09:05:46
Showing 2 changed files, with 47 additions and 2 deletions.
... | ... |
@@ -273,6 +273,7 @@ class SFS |
273 | 273 |
$sort_types = array( |
274 | 274 |
'id_type' =>'l.id_type', |
275 | 275 |
'log_time' => 'l.log_time', |
276 |
+ 'url' => 'l.url', |
|
276 | 277 |
'member' => 'mem.id_member', |
277 | 278 |
'username' => 'l.username', |
278 | 279 |
'email' => 'l.email', |
... | ... |
@@ -337,6 +338,21 @@ class SFS |
337 | 338 |
'reverse' => 'l.log_time', |
338 | 339 |
), |
339 | 340 |
), |
341 |
+ 'url' => array( |
|
342 |
+ 'header' => array( |
|
343 |
+ 'value' => $txt['sfs_log_header_url'], |
|
344 |
+ 'class' => 'lefttext', |
|
345 |
+ ), |
|
346 |
+ 'data' => array( |
|
347 |
+ 'db' => 'url', |
|
348 |
+ 'class' => 'smalltext', |
|
349 |
+ 'style' => 'word-wrap: break-word;', |
|
350 |
+ ), |
|
351 |
+ 'sort' => array( |
|
352 |
+ 'default' => 'l.url DESC', |
|
353 |
+ 'reverse' => 'l.url', |
|
354 |
+ ), |
|
355 |
+ ), |
|
340 | 356 |
'member' => array( |
341 | 357 |
'header' => array( |
342 | 358 |
'value' => $txt['sfs_log_header_member'], |
... | ... |
@@ -482,6 +498,7 @@ class SFS |
482 | 498 |
l.id_sfs, |
483 | 499 |
l.id_type, |
484 | 500 |
l.log_time, |
501 |
+ l.url, |
|
485 | 502 |
l.id_member, |
486 | 503 |
l.username, |
487 | 504 |
l.email, |
... | ... |
@@ -510,6 +527,7 @@ class SFS |
510 | 527 |
'id' => $row['id_sfs'], |
511 | 528 |
'type' => $txt['sfs_log_types_' . $row['id_type']], |
512 | 529 |
'time' => timeformat($row['log_time']), |
530 |
+ 'url' => preg_replace('~http(s)?://~i', 'hxxp\\1://', $row['url']), |
|
513 | 531 |
'timestamp' => forum_time(true, $row['log_time']), |
514 | 532 |
'member_link' => $row['id_member'] ? '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>' : (empty($row['real_name']) ? ($txt['guest'] . (!empty($row['extra']['member_acted']) ? ' (' . $row['extra']['member_acted'] . ')' : '')) : $row['real_name']), |
515 | 533 |
'username' => $row['username'], |
... | ... |
@@ -909,10 +927,22 @@ die; |
909 | 927 |
|
910 | 928 |
$smcFunc['db_insert']('', |
911 | 929 |
'{db_prefix}log_sfs', |
912 |
- array('id_type' => 'int', 'log_time' => 'int', 'id_member' => 'int', 'username' => 'string', 'email' => 'string', 'ip' => 'string', 'ip2' => 'string', 'checks' => 'string', 'result' => 'string'), |
|
930 |
+ array( |
|
931 |
+ 'id_type' => 'int', |
|
932 |
+ 'log_time' => 'int', |
|
933 |
+ 'url' => 'string', |
|
934 |
+ 'id_member' => 'int', |
|
935 |
+ 'username' => 'string', |
|
936 |
+ 'email' => 'string', |
|
937 |
+ 'ip' => 'string', |
|
938 |
+ 'ip2' => 'string', |
|
939 |
+ 'checks' => 'string', |
|
940 |
+ 'result' => 'string' |
|
941 |
+ ), |
|
913 | 942 |
array( |
914 | 943 |
$blockType, // Blocked request |
915 | 944 |
time(), |
945 |
+ $smcFunc['htmlspecialchars']($_SERVER['REQUEST_URL']), |
|
916 | 946 |
$user_info['id'], |
917 | 947 |
$type == 'username' ? $check['value'] : '', |
918 | 948 |
$type == 'email' ? $check['value'] : '', |
... | ... |
@@ -934,10 +964,22 @@ die; |
934 | 964 |
|
935 | 965 |
$smcFunc['db_insert']('', |
936 | 966 |
'{db_prefix}log_sfs', |
937 |
- array('id_type' => 'int', 'log_time' => 'int', 'id_member' => 'int', 'username' => 'string', 'email' => 'string', 'ip' => 'string', 'ip2' => 'string', 'checks' => 'string', 'result' => 'string'), |
|
967 |
+ array( |
|
968 |
+ 'id_type' => 'int', |
|
969 |
+ 'log_time' => 'int', |
|
970 |
+ 'url' => 'string', |
|
971 |
+ 'id_member' => 'int', |
|
972 |
+ 'username' => 'string', |
|
973 |
+ 'email' => 'string', |
|
974 |
+ 'ip' => 'string', |
|
975 |
+ 'ip2' => 'string', |
|
976 |
+ 'checks' => 'string', |
|
977 |
+ 'result' => 'string' |
|
978 |
+ ), |
|
938 | 979 |
array( |
939 | 980 |
0, // Debug type. |
940 | 981 |
time(), |
982 |
+ $smcFunc['htmlspecialchars']($_SERVER['REQUEST_URL']), |
|
941 | 983 |
$user_info['id'], |
942 | 984 |
'', // Username |
943 | 985 |
|
... | ... |
@@ -1183,6 +1225,7 @@ die; |
1183 | 1225 |
} |
1184 | 1226 |
|
1185 | 1227 |
$searchTypes = array( |
1228 |
+ 'url' => array('sql' => 'l.url', 'label' => $txt['sfs_log_search_url']), |
|
1186 | 1229 |
'member' => array('sql' => 'mem.real_name', 'label' => $txt['sfs_log_search_member']), |
1187 | 1230 |
'username' => array('sql' => 'l.username', 'label' => $txt['sfs_log_search_username']), |
1188 | 1231 |
'email' => array('sql' => 'l.email', 'label' => $txt['sfs_log_search_email']), |
... | ... |
@@ -56,12 +56,14 @@ $txt['sfs_request_blocked'] = 'Your request was denied as one or more emails, us |
56 | 56 |
|
57 | 57 |
/* Admin Section Logs */ |
58 | 58 |
$txt['sfs_log_no_entries_found'] = 'No Entries found in the SFS logs'; |
59 |
+$txt['sfs_log_search_url'] = 'URL'; |
|
59 | 60 |
$txt['sfs_log_search_member'] = 'Member'; |
60 | 61 |
$txt['sfs_log_search_username'] = 'Username'; |
61 | 62 |
$txt['sfs_log_search_email'] = 'Email'; |
62 | 63 |
$txt['sfs_log_search_ip'] = 'IP Address'; |
63 | 64 |
$txt['sfs_log_search_ip2'] = 'IP Address (Ban Check)'; |
64 | 65 |
$txt['sfs_log_header_type'] = 'Log Type'; |
66 |
+$txt['sfs_log_header_url'] = 'URL'; |
|
65 | 67 |
$txt['sfs_log_header_time'] = 'Time'; |
66 | 68 |
$txt['sfs_log_header_member'] = 'Member'; |
67 | 69 |
$txt['sfs_log_header_username'] = 'Username'; |
68 | 70 |