File tree 4 files changed +16
-4
lines changed
4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ public static function handleLogAjaxRequest()
125
125
// Frontend request
126
126
if ($ requestType == 'log ' && !empty ($ _POST ['cookieData ' ])) {
127
127
echo json_encode ([
128
- 'success ' => Log::add ($ _POST ['cookieData ' ]),
128
+ // 'success' => Log::add($_POST['cookieData']),
129
+ 'success ' => Log::delete (),
129
130
]);
130
131
} elseif ($ requestType == 'consent_history ' && !empty ($ _POST ['uid ' ])) {
131
132
echo json_encode (Log::getConsentHistory ($ _POST ['uid ' ]));
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ public static function add($cookieData)
74
74
75
75
/**
76
76
* Get consent history.
77
- *
78
77
* @param mixed $uid
79
78
*/
80
79
public static function getConsentHistory ($ uid )
@@ -93,6 +92,9 @@ public static function getConsentHistory($uid)
93
92
94
93
// Get logs
95
94
$ logs = get_option ('rrze_legal_consent_log ' );
95
+ if (!$ logs || !is_array ($ logs )) {
96
+ return $ consentHistory ;
97
+ }
96
98
97
99
foreach ($ logs as $ logItem ) {
98
100
$ consentList = [];
@@ -132,4 +134,13 @@ public static function getConsentHistory($uid)
132
134
133
135
return $ consentHistory ;
134
136
}
137
+
138
+ /**
139
+ * Delete consent log
140
+ * @return void
141
+ */
142
+ public static function delete ()
143
+ {
144
+ return delete_option ('rrze_legal_consent_log ' );
145
+ }
135
146
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rrze-legal" ,
3
- "version" : " 2.6.16 " ,
3
+ "version" : " 2.6.17 " ,
4
4
"main" : " rrze-legal.php" ,
5
5
"scripts" : {
6
6
"start" : " webpack --mode=development --watch" ,
Original file line number Diff line number Diff line change 4
4
Plugin Name: RRZE Legal
5
5
Plugin URI: https://gitlab.rrze.fau.de/rrze-webteam/rrze-legal
6
6
Description: Legal Mandatory Information & GDPR.
7
- Version: 2.6.16
7
+ Version: 2.6.17
8
8
Author: RRZE Webteam
9
9
Author URI: https://blogs.fau.de/webworking/
10
10
License: GNU General Public License Version 3
You can’t perform that action at this time.
0 commit comments