Changeset 2482287
- Timestamp:
- 02/26/2021 03:45:39 PM (5 years ago)
- Location:
- site-search-360/trunk
- Files:
-
- 5 edited
-
class-sitesearch360-client.php (modified) (14 diffs)
-
class-sitesearch360-plugin.php (modified) (1 diff)
-
class-sitesearch360-tracker.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
sitesearch360.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
site-search-360/trunk/class-sitesearch360-client.php
r2482280 r2482287 42 42 public function deletePage( $url ) { 43 43 $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); 45 45 } 46 46 … … 53 53 $json = json_encode($post); 54 54 } 55 return $this->callApi($url, 'POST', $json );55 return $this->callApi($url, 'POST', $json, true); 56 56 } 57 57 … … 63 63 public function notifyCrawler($postUrl){ 64 64 $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); 66 66 } 67 67 … … 80 80 } 81 81 if($json !== false) { 82 return $this->callApi($url, 'POST', $json );82 return $this->callApi($url, 'POST', $json, true); 83 83 } else { 84 84 // don't call API when json is malformed … … 105 105 $payload['logic'] = $logic; 106 106 $payload['preventDuplicate'] = TRUE; 107 $res = $this->callApi($url, 'POST', $payload );107 $res = $this->callApi($url, 'POST', $payload, true); 108 108 return ('fid#' . $res['filter']['id']); 109 109 } … … 117 117 public function register($email, $domain) { 118 118 $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); 120 120 } 121 121 … … 131 131 $payload['siteId'] = $email; 132 132 $payload['password'] = $password; 133 return $this->callApi($url, 'POST', $payload );133 return $this->callApi($url, 'POST', $payload, false); 134 134 } 135 135 … … 149 149 $url = $this->searchUrl ."sites/?site=$site&query=$searchterm&limit=$limit&log=$log&groupResults=false"; 150 150 151 return $this->callApi($url, 'GET', null );151 return $this->callApi($url, 'GET', null, false); 152 152 } 153 153 154 154 public function presign(){ 155 155 $url = $this->baseUrl . 'users/jwt?token='.urlencode($this->token); 156 $res = $this->callApi($url, 'POST', null );156 $res = $this->callApi($url, 'POST', null, true); 157 157 return $res['authentication']; 158 158 } … … 162 162 $number_of_posts = $plugin->getAllPostCount(); 163 163 $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); 165 165 } 166 166 … … 173 173 $payload['ss360Config'] = json_encode($config); 174 174 $url = $this->baseUrl.'users/ss360Config?token='.urlencode($this->token); 175 return $this->callApi($url, 'PUT', $payload );175 return $this->callApi($url, 'PUT', $payload, true); 176 176 } 177 177 178 178 public function getGlobalSS360Config(){ 179 179 $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); 181 181 } 182 182 183 183 public function loadFilters(){ 184 184 $url = $this->baseUrl . 'filters?token='.urlencode($this->token); 185 return $this->callApi($url, 'GET', null );185 return $this->callApi($url, 'GET', null, true); 186 186 } 187 187 … … 297 297 public function loadConfig() { 298 298 $url = $this->baseUrl.'sites/config?token='.urlencode($this->token); 299 return $this->callApi($url, 'GET', NULL );299 return $this->callApi($url, 'GET', NULL, true); 300 300 } 301 301 … … 305 305 $payload['key'] = $key; 306 306 $payload['value'] = json_encode($json_val); 307 return $this->callApi($url, 'PUT', $payload );307 return $this->callApi($url, 'PUT', $payload, true); 308 308 } 309 309 310 310 public function emptyEntireIndex(){ 311 311 $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); 313 313 } 314 314 315 315 public function startRecrawl(){ 316 316 $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); 318 318 } 319 319 … … 323 323 $payload['key'] = 'indexer'; 324 324 $payload['value'] = $indexingType; 325 return $this->callApi($url, 'PUT', $payload );325 return $this->callApi($url, 'PUT', $payload, true); 326 326 } 327 327 328 328 public function detectInputs(){ 329 329 $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); 331 331 } 332 332 … … 335 335 } 336 336 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)) { 339 339 $failure = array(); 340 340 $failure['status'] = 'failure'; -
site-search-360/trunk/class-sitesearch360-plugin.php
r2482280 r2482287 664 664 } 665 665 ?> 666 <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.2 2'; echo $ss360_v; ?> -->666 <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.23'; echo $ss360_v; ?> --> 667 667 <script type="text/javascript"> 668 668 var ss360Config = <?php echo json_encode($configuration); ?>; -
site-search-360/trunk/class-sitesearch360-tracker.php
r2482280 r2482287 83 83 } 84 84 85 $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.2 2';85 $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.23'; 86 86 87 87 $args = array( -
site-search-360/trunk/readme.txt
r2482280 r2482287 6 6 Requires at least: 4.0.0 7 7 Tested up to: 5.5 8 Stable tag: 1.1.2 28 Stable tag: 1.1.23 9 9 Requires PHP: 5.2.4 10 10 License: GPLv2 … … 78 78 79 79 == Changelog == 80 = 1.1.23 = 81 * Major fix. 82 80 83 = 1.1.22 = 81 84 * Minor fix. -
site-search-360/trunk/sitesearch360.php
r2482280 r2482287 6 6 Description: 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. 7 7 Author: SEMKNOX GmbH 8 Version: 1.1.2 28 Version: 1.1.23 9 9 Author URI: https://sitesearch360.com 10 10 Text Domain: site-search-360 … … 12 12 */ 13 13 14 define( 'SITESEARCH360_VERSION', '1.1.2 2' );14 define( 'SITESEARCH360_VERSION', '1.1.23' ); 15 15 16 16 require_once 'class-sitesearch360-widget.php';
Note: See TracChangeset
for help on using the changeset viewer.