Include hooks for deleting videos when the field is removed and also when the video is updated (the old video should be removed from cameratag).

In lights of GDPR it should be more clear that videos are being removed when the field is removed or updated.

Comments

joaogarin created an issue. See original summary.

sepgil’s picture

Status: Active » Needs work
+  $form['cameratag_rest_api_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t('REST API Key'),
+    '#default_value' => variable_get('cameratag_rest_api_key'),
+    '#size' => 36,
+    '#maxlength' => 36,
+    '#description' => t('REST API Key of your cameratag accoun. To find this visit your <a target="_blank" href="https://cameratag.com/cameras">Camera Tag admin panel</a>, select My account from the menu and click "Credentials".'),
+  );
+

There is a typo here, a missing t on account.

+    watchdog('cameratag', 'Error while executing delete request to %url: %error.', [
+      '%url' => $url,
+      '%error' => $response->data,
+    ], WATCHDOG_ERROR);

I think you can use the @ for the url, right? Is $response->data an array? Don't you need print_r(..., TRUE) in that case?

joaogarin’s picture

StatusFileSize
new2.36 KB

Thanks for the feedback, made some adaptations.

joaogarin’s picture

Status: Needs work » Needs review
joaogarin’s picture

Status: Needs review » Reviewed & tested by the community
joaogarin’s picture

StatusFileSize
new2.29 KB

Fixing patch.

  • joaogarin committed 397f6f7 on 7.x-1.x
    Issue #2962419 by joaogarin, sepgil: Make sure videos are deleted when...
joaogarin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.