Plugin Directory

Changeset 2482287


Ignore:
Timestamp:
02/26/2021 03:45:39 PM (5 years ago)
Author:
dsky
Message:

major fix

Location:
site-search-360/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • site-search-360/trunk/class-sitesearch360-client.php

    r2482280 r2482287  
    4242    public function deletePage( $url ) {
    4343        $url = $this->baseUrl . 'sites/page?url='.urlencode($url).'&token='.urlencode($this->token);
    44         return $this->callApi($url, 'DELETE', null);
     44        return $this->callApi($url, 'DELETE', null, true);
    4545    }
    4646
     
    5353            $json = json_encode($post);
    5454        }
    55         return $this->callApi($url, 'POST', $json);
     55        return $this->callApi($url, 'POST', $json, true);
    5656    }
    5757
     
    6363    public function notifyCrawler($postUrl){
    6464        $url = $this->baseUrl . 'sites/page?token='.urlencode($this->token).'&url='.urlencode($postUrl);
    65         return $this->callApi($url, 'POST', array());
     65        return $this->callApi($url, 'POST', array(), true);
    6666    }
    6767
     
    8080        }
    8181        if($json !== false) {
    82             return $this->callApi($url, 'POST', $json);
     82            return $this->callApi($url, 'POST', $json, true);
    8383        } else {
    8484            // don't call API when json is malformed
     
    105105        $payload['logic'] = $logic;
    106106        $payload['preventDuplicate'] = TRUE;
    107         $res = $this->callApi($url, 'POST', $payload);
     107        $res = $this->callApi($url, 'POST', $payload, true);
    108108        return ('fid#' . $res['filter']['id']);
    109109    }
     
    117117    public function register($email, $domain) {
    118118        $url = $this->baseUrl . 'users?email='.urlencode($email).'&site='.urlencode($domain).'&source=WORDPRESS';
    119         return $this->callApi($url, 'POST', null);
     119        return $this->callApi($url, 'POST', null, false);
    120120    }
    121121
     
    131131        $payload['siteId'] = $email;
    132132        $payload['password'] = $password;
    133         return $this->callApi($url, 'POST', $payload);
     133        return $this->callApi($url, 'POST', $payload, false);
    134134    }
    135135
     
    149149        $url = $this->searchUrl ."sites/?site=$site&query=$searchterm&limit=$limit&log=$log&groupResults=false";
    150150       
    151         return $this->callApi($url, 'GET', null);
     151        return $this->callApi($url, 'GET', null, false);
    152152    }
    153153
    154154    public function presign(){
    155155        $url = $this->baseUrl . 'users/jwt?token='.urlencode($this->token);
    156         $res = $this->callApi($url, 'POST', null);
     156        $res = $this->callApi($url, 'POST', null, true);
    157157        return $res['authentication'];
    158158    }
     
    162162        $number_of_posts = $plugin->getAllPostCount();
    163163        $url = $this->baseUrl . 'users/plan?token='.urlencode($this->token).'&pageCount='.$number_of_posts;
    164         return $this->callApi($url, 'GET', null);
     164        return $this->callApi($url, 'GET', null, true);
    165165    }
    166166
     
    173173        $payload['ss360Config'] = json_encode($config);
    174174        $url = $this->baseUrl.'users/ss360Config?token='.urlencode($this->token);
    175         return $this->callApi($url, 'PUT', $payload);
     175        return $this->callApi($url, 'PUT', $payload, true);
    176176    }
    177177
    178178    public function getGlobalSS360Config(){
    179179        $url = $this->baseUrl.'users/ss360Config?siteId='.urlencode($this->siteId).'&token='.urlencode($this->token);
    180         return $this->callApi($url, 'GET', null);
     180        return $this->callApi($url, 'GET', null, true);
    181181    }
    182182
    183183    public function loadFilters(){
    184184        $url = $this->baseUrl . 'filters?token='.urlencode($this->token);
    185         return $this->callApi($url, 'GET', null);
     185        return $this->callApi($url, 'GET', null, true);
    186186    }
    187187
     
    297297    public function loadConfig() {
    298298        $url = $this->baseUrl.'sites/config?token='.urlencode($this->token);
    299         return $this->callApi($url, 'GET', NULL);
     299        return $this->callApi($url, 'GET', NULL, true);
    300300    }
    301301
     
    305305        $payload['key'] = $key;
    306306        $payload['value'] = json_encode($json_val);
    307         return $this->callApi($url, 'PUT', $payload);
     307        return $this->callApi($url, 'PUT', $payload, true);
    308308    }
    309309
    310310    public function emptyEntireIndex(){
    311311        $url = $this->baseUrl.'sites/pages?urlPattern=.*&token='.urlencode($this->token);
    312         return $this->callApi($url, 'DELETE', null);
     312        return $this->callApi($url, 'DELETE', null, true);
    313313    }
    314314
    315315    public function startRecrawl(){
    316316        $url = $this->baseUrl.'sites/reindex?token='.urlencode($this->token).'&pageLimit=-1&siteId='.$this->siteId;
    317         return $this->callApi($url, 'POST', array());
     317        return $this->callApi($url, 'POST', array(), true);
    318318    }
    319319
     
    323323        $payload['key'] = 'indexer';
    324324        $payload['value'] = $indexingType;
    325         return $this->callApi($url, 'PUT', $payload);   
     325        return $this->callApi($url, 'PUT', $payload, true);
    326326    }
    327327
    328328    public function detectInputs(){
    329329        $url = $this->baseUrl . 'sites/detectInputs?token='.urlencode($this->token).'&url='.urlencode(get_site_url());
    330         return $this->callApi($url, 'GET', null);
     330        return $this->callApi($url, 'GET', null, true);
    331331    }
    332332   
     
    335335    }
    336336
    337     private function callApi($url, $method, $payload) {
    338         if ($this->token === NULL || strlen($this->token) === 0) {
     337    private function callApi($url, $method, $payload, $protected) {
     338        if ($protected && ($this->token === NULL || strlen($this->token) === 0)) {
    339339            $failure = array();
    340340            $failure['status'] = 'failure';
  • site-search-360/trunk/class-sitesearch360-plugin.php

    r2482280 r2482287  
    664664                    }
    665665                    ?>
    666                     <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.22'; echo $ss360_v; ?> -->
     666                    <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.23'; echo $ss360_v; ?> -->
    667667                    <script type="text/javascript">
    668668                        var ss360Config = <?php echo json_encode($configuration); ?>;
  • site-search-360/trunk/class-sitesearch360-tracker.php

    r2482280 r2482287  
    8383        }
    8484
    85         $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.22';
     85        $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.23';
    8686
    8787        $args = array(
  • site-search-360/trunk/readme.txt

    r2482280 r2482287  
    66Requires at least: 4.0.0
    77Tested up to: 5.5
    8 Stable tag: 1.1.22
     8Stable tag: 1.1.23
    99Requires PHP: 5.2.4
    1010License: GPLv2
     
    7878
    7979== Changelog ==
     80= 1.1.23 =
     81* Major fix.
     82
    8083= 1.1.22 =
    8184* Minor fix.
  • site-search-360/trunk/sitesearch360.php

    r2482280 r2482287  
    66Description: Site Search 360 enhances and improves your standard WordPress search with search suggests, autocompletion, semantic search, and a whole lot of customization. Also, you'll be amazed of how much faster you get relevant search results.
    77Author: SEMKNOX GmbH
    8 Version: 1.1.22
     8Version: 1.1.23
    99Author URI: https://sitesearch360.com
    1010Text Domain: site-search-360
     
    1212*/
    1313
    14 define( 'SITESEARCH360_VERSION', '1.1.22' );
     14define( 'SITESEARCH360_VERSION', '1.1.23' );
    1515
    1616require_once 'class-sitesearch360-widget.php';
Note: See TracChangeset for help on using the changeset viewer.