@@ -98,13 +98,13 @@ |
||
98 | 98 | |
99 | 99 | if (config('LaravelLogger.loggerPaginationEnabled')) { |
100 | 100 | $userActivities = Activity::where('userId', $activity->userId) |
101 | - ->orderBy('created_at', 'desc') |
|
102 | - ->paginate(config('LaravelLogger.loggerPaginationPerPage')); |
|
101 | + ->orderBy('created_at', 'desc') |
|
102 | + ->paginate(config('LaravelLogger.loggerPaginationPerPage')); |
|
103 | 103 | $totalUserActivities = $userActivities->total(); |
104 | 104 | } else { |
105 | 105 | $userActivities = Activity::where('userId', $activity->userId) |
106 | - ->orderBy('created_at', 'desc') |
|
107 | - ->get(); |
|
106 | + ->orderBy('created_at', 'desc') |
|
107 | + ->get(); |
|
108 | 108 | $totalUserActivities = $userActivities->count(); |
109 | 109 | } |
110 | 110 |
@@ -19,10 +19,12 @@ discard block |
||
19 | 19 | if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) { |
20 | 20 | $ip = $_SERVER["REMOTE_ADDR"]; |
21 | 21 | if ($deep_detect) { |
22 | - if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) |
|
23 | - $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
|
24 | - if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) |
|
25 | - $ip = $_SERVER['HTTP_CLIENT_IP']; |
|
22 | + if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) { |
|
23 | + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
|
24 | + } |
|
25 | + if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) { |
|
26 | + $ip = $_SERVER['HTTP_CLIENT_IP']; |
|
27 | + } |
|
26 | 28 | } |
27 | 29 | } |
28 | 30 | $purpose = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose))); |
@@ -58,10 +60,12 @@ discard block |
||
58 | 60 | break; |
59 | 61 | case "address": |
60 | 62 | $address = array($ipdat->geoplugin_countryName); |
61 | - if (@strlen($ipdat->geoplugin_regionName) >= 1) |
|
62 | - $address[] = $ipdat->geoplugin_regionName; |
|
63 | - if (@strlen($ipdat->geoplugin_city) >= 1) |
|
64 | - $address[] = $ipdat->geoplugin_city; |
|
63 | + if (@strlen($ipdat->geoplugin_regionName) >= 1) { |
|
64 | + $address[] = $ipdat->geoplugin_regionName; |
|
65 | + } |
|
66 | + if (@strlen($ipdat->geoplugin_city) >= 1) { |
|
67 | + $address[] = $ipdat->geoplugin_city; |
|
68 | + } |
|
65 | 69 | $output = implode(", ", array_reverse($address)); |
66 | 70 | break; |
67 | 71 | case "city": |
@@ -45,13 +45,11 @@ |
||
45 | 45 | if (preg_match("/^[\d]+\.[\d]+(?:\.[\d]{0,2}$)?/",$ua_array[4],$matches)) |
46 | 46 | { |
47 | 47 | $return['version'] = $matches[0]; |
48 | - } |
|
49 | - else |
|
48 | + } else |
|
50 | 49 | { |
51 | 50 | $return['version'] = $ua_array[4]; |
52 | 51 | } |
53 | - } |
|
54 | - else |
|
52 | + } else |
|
55 | 53 | { |
56 | 54 | return false; |
57 | 55 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | protected $table; |
18 | 18 | |
19 | - /** |
|
19 | + /** |
|
20 | 20 | * The connection name for the model. |
21 | 21 | * |
22 | 22 | * @var string |
@@ -137,11 +137,11 @@ |
||
137 | 137 | |-------------------------------------------------------------------------- |
138 | 138 | */ |
139 | 139 | |
140 | - 'messages' => [ |
|
140 | + 'messages' => [ |
|
141 | 141 | 'logClearedSuccessfuly' => 'Activity log cleared successfully', |
142 | 142 | 'logDestroyedSuccessfuly' => 'Activity log deleted successfully', |
143 | 143 | 'logRestoredSuccessfuly' => 'Activity log restored successfully', |
144 | - ], |
|
144 | + ], |
|
145 | 145 | |
146 | 146 | /* |
147 | 147 | |-------------------------------------------------------------------------- |