<?php

Class SPDSGVONoticeAction extends SPDSGVOAjaxAction{

    protected $action = 'notice-action';

    protected function run(){
       
        $noticeKey = $this->get('id');
        //error_log('notice-action: '.$noticeKey);
        
        if ($noticeKey == NULL || $noticeKey == '')
        {
            echo "invalid notice key";
            die;
        }
        
        if ($noticeKey == 'google-gdpr-refresh-notice') {
            SPDSGVOSettings::set('google_gdpr_refresh_notice', '1');
        }
        
        die;
    }
}

SPDSGVONoticeAction::listen();