PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 All 69 releases
← All changes | app/Http/Controllers/ActivityLoggerController.php +2 -9 2.3.0 → 2.4.5 View file →
@@ -6,18 +6,13 @@
6 6 use FluentSupport\App\Services\Helper;
7 7 use FluentSupport\Framework\Http\Request\Request;
8 8
9 9 /**
10 - * ActivityLoggerController class for REST API
11 - * This class is responsible for getting data for all request related to activity and activity settings
12 - * @package FluentSupport\App\Http\Controllers
13 - *
14 - * @version 1.0.0
10 + * Activity log endpoints and settings.
15 11 */
16 12 class ActivityLoggerController extends Controller
17 13 {
18 14 /**
19 - * getActivities method will get information regarding all activity with users(agent/customer) and activity settings
20 15 * @return \WP_REST_Response | array
21 16 */
22 17
23 18 public function getActivities (Request $request, Activity $activity)
@@ -40,15 +35,14 @@
40 35 }
41 36 }
42 37
43 38 /**
44 - * updateSettings method will update existing activity settings
45 39 * @return \WP_REST_Response | array
46 40 */
47 41 public function updateSettings (Request $request, Activity $activity)
48 42 {
49 43 try {
50 - // Get raw array - do not use sanitize_text_field on the whole object (it would turn array into empty string)
44 + // Read raw: sanitize_text_field on the array would turn it into an empty string.
51 45 $raw = $request->get('activity_settings', null);
52 46 $settings = is_array($raw) ? $raw : [];
53 47 $settings = [
54 48 'delete_days' => isset($settings['delete_days']) ? intval($settings['delete_days']) : 14,
@@ -63,9 +57,8 @@
63 57 }
64 58 }
65 59
66 60 /**
67 - * getSettings method will get the list of activity settings and return
68 61 * @return \WP_REST_Response | array
69 62 */
70 63 public function getSettings(Activity $activity)
71 64 {