Plugin Directory

Changeset 756717


Ignore:
Timestamp:
08/15/2013 02:22:24 PM (13 years ago)
Author:
marcelioleal
Message:

hot fix wp plugin config

Location:
siteapps/trunk/classes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • siteapps/trunk/classes/PluginConfig.php

    r753877 r756717  
    4141    public function saveOptions($options)
    4242    {
     43        $options = array_merge(PluginConfig::getDefaultOptions(), $options);
    4344        update_option(SITEAPPS_PLUGIN_NAME, $options);
    4445    }
  • siteapps/trunk/classes/SiteAppsAPI.php

    r753877 r756717  
    5050    {
    5151        $segmentsParam  = json_encode(array('site_id' => $siteAppsId, 'user_email' => $email));
     52       
    5253        $hash           = hash_hmac('sha256', $segmentsParam, $privateKey . $userKey);
    5354        $segments       = $this->getResponse('Segment/getSegments', $hash, $segmentsParam, $publicKey);
     
    8586            return $this->getSegments($siteAppsId, $email, $userKey, $privateKey, $publicKey);
    8687        } catch (Exception $e) {
    87             //$this->messages->addCustomMessage($e->getMessage(), true);
     88            //$this->messages->addCustomMessage($e->getMessage() . $publicKey, true);
    8889            return array();
    8990        }
  • siteapps/trunk/classes/SiteAppsCallbacks.php

    r753877 r756717  
    5757       
    5858        if ($this->isValidSiteAppsId($_POST['sa_id'])) {
    59             $options = array();
     59            $options = PluginConfig::getOptions();
    6060            $options['id']                  = (int) $_POST['sa_id'];
    6161            $options['user_key']            = $_POST['sa_user_key'];
Note: See TracChangeset for help on using the changeset viewer.