Plugin Directory

Changeset 2604177 for shapepress-dsgvo


Ignore:
Timestamp:
09/24/2021 09:27:53 AM (5 years ago)
Author:
legalweb
Message:
  • added nonce check to forms where it was missing
  • added admin permission check on forms
  • disabled all integrations by default so user has to enable them again
Location:
shapepress-dsgvo/trunk
Files:
57 edited

Legend:

Unmodified
Added
Removed
  • shapepress-dsgvo/trunk/admin/tabs/v3/popup-notice/class-sp-dsgvo-cookie-notice-action.php

    r2604113 r2604177  
    1313        SPDSGVOSettings::set('show_notice_on_close', $this->get('show_notice_on_close', '0'));
    1414        SPDSGVOSettings::set('force_cookie_info', $this->get('force_cookie_info', '0'));
     15        SPDSGVOSettings::set('run_necessary_automatically', $this->get('run_necessary_automatically', '0'));
    1516        SPDSGVOSettings::set('mandatory_integrations_editable', $this->get('mandatory_integrations_editable', '0'));
    1617        SPDSGVOSettings::set('cookie_notice_text', $this->get('cookie_notice_text', ''));
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-embedding-api-base.php

    r2602888 r2604177  
    135135    {
    136136        $settings = array();
    137         $settings['enabled'] = '0';
     137        $settings['isEnabled'] = '0';
    138138        $settings['propertyId'] = '';
    139139        $settings['cookieNames'] = $this->cookieNames;
     
    165165        $settings = $this->getSettings();
    166166
    167         return $settings['enabled'] == '1';
     167        return $settings['isEnabled'] == '1';
    168168    }
    169169
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-integration-api-base.php

    r2604113 r2604177  
    158158    {
    159159        $settings = array();
    160         $settings['enabled'] = '0';
     160        $settings['isEnabled'] = '0';
    161161        $settings['propertyId'] = '';
    162162        $settings['useOwnCode'] = $ownCodeEnabledByDefault ? '1' : '0';
     
    185185    }
    186186
     187    public function validateJsCode($code){
     188
     189        return $code;
     190    }
     191
    187192    public final function checkIfIntegrationIsAllowed($integrationSlug)
    188193    {
     
    204209        $settings = $this->getSettings();
    205210
    206         return $settings['enabled'] == '1';
     211        return $settings['isEnabled'] == '1';
    207212    }
    208213
     
    260265        $settings = $this->getSettings();
    261266
    262         if ($settings['enabled'] == '0') return;
     267        if ($settings['isEnabled'] == '0') return;
    263268        $propertyId = $settings['propertyId'];
    264269
     
    283288        $settings = $this->getSettings();
    284289
    285         if ($settings['enabled'] == '0') return;
     290        if ($settings['isEnabled'] == '0') return;
    286291        $propertyId = $settings['propertyId'];
    287292
     
    307312        $settings = $this->getSettings();
    308313
    309         if ($settings['enabled'] == '0') return;
     314        if ($settings['isEnabled'] == '0') return;
    310315        $propertyId = $settings['propertyId'];
    311316
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-integration.php

    r2602888 r2604177  
    109109        die();
    110110    }
    111    
     111
     112    public function requireAdmin(){
     113        if(!current_user_can('administrator')){
     114            echo '0';
     115            die;
     116        }
     117    }
     118
     119    public function checkCSRF(){
     120
     121        $actionName = self::action().'-nonce';
     122        $submittedNonce = $_REQUEST['_wpnonce'];
     123
     124        if ( wp_verify_nonce( $submittedNonce, $actionName ) ) {
     125            return TRUE;
     126        } else
     127        {
     128            echo 'CSRF ERROR: Nonce not valid';
     129            die;
     130            //return FALSE;
     131        }
     132
     133    }
    112134}
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/facebook-feed/class-sp-dsgvo-facebook-feed-integration.php

    r2247191 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/facebook-feed/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/gmaps/class-sp-dsgvo-gmaps-api.php

    r2247191 r2604177  
    3333
    3434        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    35         if ($settings['enabled'] == '0' && empty($legacySettings) == false &&  in_array('google-maps', $legacySettings))
     35        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false &&  in_array('google-maps', $legacySettings))
    3636        {
    37             $settings['enabled'] = '1';
     37            $settings['isEnabled'] = '1';
    3838        }
    3939
    40         return $settings['enabled'] == '1';
     40        return $settings['isEnabled'] == '1';
    4141    }
    4242
     
    4646
    4747        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    48         if ($settings['enabled'] == '0' && empty($legacySettings) == false && in_array('google-maps', $legacySettings))
     48        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false && in_array('google-maps', $legacySettings))
    4949        {
    50             $settings['enabled'] = '1';
     50            $settings['isEnabled'] = '1';
    5151        }
    5252
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/gmaps/class-sp-dsgvo-gmaps-integration.php

    r2469299 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133        // delete old setting from times before we had embeddings
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/gmaps/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/instagram/class-sp-dsgvo-instagram-integration.php

    r2247191 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/instagram/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/openstreetmap/class-sp-dsgvo-openstreetmap-api.php

    r2280819 r2604177  
    3232
    3333        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    34         if ($settings['enabled'] == '0' && empty($legacySettings) == false &&  in_array('open-street-map', $legacySettings))
     34        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false &&  in_array('open-street-map', $legacySettings))
    3535        {
    36             $settings['enabled'] = '1';
     36            $settings['isEnabled'] = '1';
    3737        }
    3838
    39         return $settings['enabled'] == '1';
     39        return $settings['isEnabled'] == '1';
    4040    }
    4141
     
    4545
    4646        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    47         if ($settings['enabled'] == '0' && empty($legacySettings) == false && in_array('open-street-map', $legacySettings))
     47        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false && in_array('open-street-map', $legacySettings))
    4848        {
    49             $settings['enabled'] = '1';
     49            $settings['isEnabled'] = '1';
    5050        }
    5151
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/openstreetmap/class-sp-dsgvo-openstreetmap-integration.php

    r2469299 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133        // delete old setting from times before we had embeddings
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/openstreetmap/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/soundcloud/class-sp-dsgvo-soundcloud-integration.php

    r2247191 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
    2728        $settings = $this->apiInstance->getSettings();
    2829
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     30        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3031
    3132
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/soundcloud/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/twitter/class-sp-dsgvo-twitter-integration.php

    r2247191 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/twitter/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/vimeo/class-sp-dsgvo-vimeo-api.php

    r2247191 r2604177  
    3232
    3333        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    34         if ($settings['enabled'] == '0' && empty($legacySettings) == false &&  in_array('vimeo', $legacySettings))
     34        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false &&  in_array('vimeo', $legacySettings))
    3535        {
    36             $settings['enabled'] = '1';
     36            $settings['isEnabled'] = '1';
    3737        }
    3838
    39         return $settings['enabled'] == '1';
     39        return $settings['isEnabled'] == '1';
    4040    }
    4141
     
    4545
    4646        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    47         if ($settings['enabled'] == '0' && empty($legacySettings) == false &&  in_array('vimeo', $legacySettings))
     47        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false &&  in_array('vimeo', $legacySettings))
    4848        {
    49             $settings['enabled'] = '1';
     49            $settings['isEnabled'] = '1';
    5050        }
    5151
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/vimeo/class-sp-dsgvo-vimeo-integration.php

    r2469299 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133       // delete old setting from times before we had embeddings
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/vimeo/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/youtube/class-sp-dsgvo-youtube-api.php

    r2259265 r2604177  
    3232
    3333        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    34         if ($settings['enabled'] == '0' && empty($legacySettings) == false &&  in_array('youtube', $legacySettings))
     34        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false &&  in_array('youtube', $legacySettings))
    3535        {
    36             $settings['enabled'] = '1';
     36            $settings['isEnabled'] = '1';
    3737        }
    3838
    39         return $settings['enabled'] == '1';
     39        return $settings['isEnabled'] == '1';
    4040    }
    4141
     
    4545
    4646        $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
    47         if ($settings['enabled'] == '0' && empty($legacySettings) == false &&  in_array('youtube', $legacySettings))
     47        if ($settings['isEnabled'] == '0' && empty($legacySettings) == false &&  in_array('youtube', $legacySettings))
    4848        {
    49             $settings['enabled'] = '1';
     49            $settings['isEnabled'] = '1';
    5050        }
    5151
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/youtube/class-sp-dsgvo-youtube-integration.php

    r2469299 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->requireAdmin();
     28
    2729        $settings = $this->apiInstance->getSettings();
    2830
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     31        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3032
    3133        // delete old setting from times before we had embeddings
  • shapepress-dsgvo/trunk/includes/integrations/embeddings/youtube/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/mailchimp/MailchimpIntegration.php

    r2198743 r2604177  
    2020   
    2121    public function viewSubmit(){
     22
     23        $this->requireAdmin();
    2224
    2325        if($this->has('mailchimp_api_token')){
  • shapepress-dsgvo/trunk/includes/integrations/statistics/clicky/class-sp-dsgvo-clicky-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $hasValidLicense = isValidPremiumEdition();
    2831        if ($hasValidLicense == false)
     
    3437        $settings = SPDSGVOClickyApi::getInstance()->getSettings();
    3538
    36         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     39        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3740        $settings['propertyId'] = $this->get($this->slug.'_property_id', '');
    3841        $settings['useOwnCode'] = $this->get($this->slug.'_own_code', '0');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/clicky/page.php

    r2604113 r2604177  
    1919
    2020                <?php
    21                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     21                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2222                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2323                    '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/etracker/class-sp-dsgvo-etracker-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $hasValidLicense = isValidPremiumEdition();
    2831        if ($hasValidLicense == false)
     
    3437        $settings = SPDSGVOEtrackerApi::getInstance()->getSettings();
    3538
    36         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     39        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3740        $settings['propertyId'] = $this->get($this->slug.'_property_id', '');
    3841        $settings['useOwnCode'] = $this->get($this->slug.'_own_code', '0');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/etracker/page.php

    r2604113 r2604177  
    2121
    2222                <?php
    23                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     23                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2424                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2525                    '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/googleanalytics/class-sp-dsgvo-google-analytics-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $settings = SPDSGVOGoogleAnalyticsApi::getInstance()->getSettings();
    2831
    29         $settings['enabled'] = $this->get('ga_enable_analytics', '0');
     32        $settings['isEnabled'] = $this->get('ga_enable_analytics', '0');
    3033        $settings['propertyId'] = $this->get('ga_tag_number', '');
    3134        $settings['useOwnCode'] = $this->get('ga_own_code', '0');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/googleanalytics/page.php

    r2604113 r2604177  
    1818
    1919            <?php
    20             spDsgvoWriteInput('switch', '', 'ga_enable_analytics', $settings['enabled'],
     20            spDsgvoWriteInput('switch', '', 'ga_enable_analytics', $settings['isEnabled'],
    2121                __('Use Google Analytics', 'shapepress-dsgvo'),
    2222                '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/hotjar/class-sp-dsgvo-hotjar-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOHotjarApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     40        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3841        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3942        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/hotjar/page.php

    r2604113 r2604177  
    2323
    2424                <?php
    25                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     25                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2626                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2727                    '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/matomo/class-sp-dsgvo-matomo-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $settings = SPDSGVOMatomoApi::getInstance()->getSettings();
    2831
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     32        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3033        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3134        $settings['implementationMode'] = $this->get( $this->slug.'_implementationMode', '');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/matomo/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/mautic/class-sp-dsgvo-mautic-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $settings = SPDSGVOMauticApi::getInstance()->getSettings();
    2831
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     32        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3033        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3134        $settings['implementationMode'] = $this->get( $this->slug.'_implementationMode', '');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/mautic/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2323                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/piwik/class-sp-dsgvo-piwik-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $hasValidLicense = isValidPremiumEdition();
    2831        if ($hasValidLicense == false)
     
    3437        $settings = SPDSGVOPiwikApi::getInstance()->getSettings();
    3538
    36         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     39        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3740        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3841        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/piwik/page.php

    r2604113 r2604177  
    2121
    2222                <?php
    23                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     23                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2424                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2525                    '',
  • shapepress-dsgvo/trunk/includes/integrations/statistics/wpstatistics/class-sp-dsgvo-wpstatistics-integration.php

    r2204538 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $settings = SPDSGVOWpStatisticsApi::getInstance()->getSettings();
    2831
    29         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     32        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3033        $settings['cloudMode'] = '0';
    3134        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/statistics/wpstatistics/page.php

    r2604113 r2604177  
    2121
    2222                <?php
    23                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     23                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2424                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2525                    '',
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/googletagmanager/class-sp-dsgvo-google-tagmanager-api.php

    r2604113 r2604177  
    3737        $settings = $this->getSettings();
    3838
    39         if ($settings['enabled'] == '0') return;
     39        if ($settings['isEnabled'] == '0') return;
    4040        $propertyId = $settings['propertyId'];
    4141
     
    5757        $settings = $this->getSettings();
    5858
    59         if ($settings['enabled'] == '0') return;
     59        if ($settings['isEnabled'] == '0') return;
    6060        $propertyId = $settings['propertyId'];
    6161
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/googletagmanager/class-sp-dsgvo-google-tagmanager-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOGoogleTagmanagerApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get('gtag_enable', '0');
     40        $settings['isEnabled'] = $this->get('gtag_enable', '0');
    3841        $settings['propertyId'] = $this->get('gtag_tag_number', '');
    3942        $settings['useOwnCode'] = $this->get('gtag_own_code', '0');
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/googletagmanager/page.php

    r2604113 r2604177  
    2020
    2121                <?php
    22                 spDsgvoWriteInput('switch', '', 'gtag_enable', $settings['enabled'],
     22                spDsgvoWriteInput('switch', '', 'gtag_enable', $settings['isEnabled'],
    2323                    __('Use Google TagManager', 'shapepress-dsgvo'),
    2424                    '',
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/matomotagmanager/class-sp-dsgvo-matomo-tagmanager-api.php

    r2604113 r2604177  
    3737        $settings = $this->getSettings();
    3838
    39         if ($settings['enabled'] == '0') return;
     39        if ($settings['isEnabled'] == '0') return;
    4040        $propertyId = $settings['propertyId'];
    4141
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/matomotagmanager/class-sp-dsgvo-matomo-tagmanager-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOMatomoTagmanagerApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     40        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3841        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3942        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/matomotagmanager/page.php

    r2604113 r2604177  
    2121
    2222                <?php
    23                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     23                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2424                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2525                    '',
  • shapepress-dsgvo/trunk/includes/integrations/targeting/bingadsuet/class-sp-dsgvo-bing-ads-uet-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOBingAdsUetApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     40        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3841        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3942        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/targeting/bingadsuet/page.php

    r2604113 r2604177  
    2323
    2424                <?php
    25                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     25                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2626                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2727                    '',
  • shapepress-dsgvo/trunk/includes/integrations/targeting/criteo/class-sp-dsgvo-criteo-integration.php

    r2602888 r2604177  
    2525    public function viewSubmit(){
    2626
     27        $this->checkCSRF();
     28        $this->requireAdmin();
     29
    2730        $hasValidLicense = isValidPremiumEdition();
    2831        if ($hasValidLicense == false)
     
    3437        $settings = SPDSGVOCriteoApi::getInstance()->getSettings();
    3538
    36         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     39        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3740        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3841        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/targeting/criteo/page.php

    r2604113 r2604177  
    2323
    2424                <?php
    25                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     25                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2626                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2727                    '',
  • shapepress-dsgvo/trunk/includes/integrations/targeting/fbpixel/class-sp-dsgvo-fb-pixel-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition() || isValidBlogEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOFbPixelApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get('fb_enable_pixel', '0');
     40        $settings['isEnabled'] = $this->get('fb_enable_pixel', '0');
    3841        $settings['propertyId'] = $this->get('fb_pixel_number', '');
    3942        $settings['useOwnCode'] = $this->get('fb_own_code', '0');
  • shapepress-dsgvo/trunk/includes/integrations/targeting/fbpixel/page.php

    r2604113 r2604177  
    2323
    2424            <?php
    25             spDsgvoWriteInput('switch', '', 'fb_enable_pixel', $settings['enabled'],
     25            spDsgvoWriteInput('switch', '', 'fb_enable_pixel', $settings['isEnabled'],
    2626                __('Use Facebook Pixel', 'shapepress-dsgvo'),
    2727                '',
  • shapepress-dsgvo/trunk/includes/integrations/targeting/gadsense/class-sp-dsgvo-gadsense-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition() || isValidBlogEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOFbPixelApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     40        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3841        $settings['propertyId'] = $this->get($this->slug.'_property_id', '');
    3942        $settings['useOwnCode'] = $this->get($this->slug.'_own_code', '0');
  • shapepress-dsgvo/trunk/includes/integrations/targeting/gadsense/page.php

    r2604113 r2604177  
    2121
    2222            <?php
    23             spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     23            spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2424                sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2525                '',
  • shapepress-dsgvo/trunk/includes/integrations/targeting/linkedinpixel/class-sp-dsgvo-linkedin-pixel-integration.php

    r2602888 r2604177  
    2626    public function viewSubmit(){
    2727
     28        $this->checkCSRF();
     29        $this->requireAdmin();
     30
    2831        $hasValidLicense = isValidPremiumEdition();
    2932        if ($hasValidLicense == false)
     
    3538        $settings = SPDSGVOLinkedInPixelApi::getInstance()->getSettings();
    3639
    37         $settings['enabled'] = $this->get( $this->slug.'_enable', '0');
     40        $settings['isEnabled'] = $this->get( $this->slug.'_enable', '0');
    3841        $settings['propertyId'] = $this->get($this->slug.'_tag_number', '');
    3942        $settings['useOwnCode'] = '1';//$this->get($this->slug.'_own_code', '1');
  • shapepress-dsgvo/trunk/includes/integrations/targeting/linkedinpixel/page.php

    r2604113 r2604177  
    2323
    2424                <?php
    25                 spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['enabled'],
     25                spDsgvoWriteInput('switch', '', $apiInstance->getSlug().'_enable', $settings['isEnabled'],
    2626                    sprintf(__('Use %s', 'shapepress-dsgvo'), $apiInstance->getName()),
    2727                    '',
Note: See TracChangeset for help on using the changeset viewer.