Changeset 2503496
- Timestamp:
- 03/25/2021 06:10:22 PM (5 years ago)
- Location:
- site-search-360/trunk
- Files:
-
- 4 edited
-
class-sitesearch360-plugin.php (modified) (3 diffs)
-
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-plugin.php
r2482287 r2503496 394 394 } 395 395 396 private function checkRate() { 397 $current = get_option('ss360_rate_checker', true); 398 $minuteStamp = strval(floor(time() / 60)); 399 if ($current == NULL) { 400 update_option('ss360_rate_checker', $minuteStamp . '<#>1'); 401 return true; 402 } else { 403 $parts = explode('<#>', $current); 404 $minutePart = $parts[0]; 405 if ($minutePart != $minuteStamp) { 406 update_option('ss360_rate_checker', $minuteStamp . '<#>1'); 407 return true; 408 } 409 $count = intval($parts[1]); 410 if ($count > 300) { 411 return false; 412 } 413 update_option('ss360_rate_checker', $minuteStamp . '<#>' . ($count + 1)); 414 return true; 415 } 416 } 417 396 418 /** 397 419 * Sends a request to the Site Search 360 API index a specific post in the server-side search engine. … … 402 424 { 403 425 try { 404 $indexer = new SiteSearch360Indexer(1,0,''); 405 $indexer->indexSingle($postId); 426 if ($this->checkRate()) { 427 $indexer = new SiteSearch360Indexer(1,0,''); 428 $indexer->indexSingle($postId); 429 } 406 430 } catch (Error $e) { 407 431 return; … … 664 688 } 665 689 ?> 666 <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.2 3'; echo $ss360_v; ?> -->690 <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.24'; echo $ss360_v; ?> --> 667 691 <script type="text/javascript"> 668 692 var ss360Config = <?php echo json_encode($configuration); ?>; -
site-search-360/trunk/class-sitesearch360-tracker.php
r2482287 r2503496 83 83 } 84 84 85 $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.2 3';85 $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.24'; 86 86 87 87 $args = array( -
site-search-360/trunk/readme.txt
r2482287 r2503496 6 6 Requires at least: 4.0.0 7 7 Tested up to: 5.5 8 Stable tag: 1.1.2 38 Stable tag: 1.1.24 9 9 Requires PHP: 5.2.4 10 10 License: GPLv2 … … 78 78 79 79 == Changelog == 80 = 1.1.24 = 81 * Automatic re-indexing rate checking. 82 80 83 = 1.1.23 = 81 84 * Major fix. -
site-search-360/trunk/sitesearch360.php
r2482287 r2503496 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 38 Version: 1.1.24 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 3' );14 define( 'SITESEARCH360_VERSION', '1.1.24' ); 15 15 16 16 require_once 'class-sitesearch360-widget.php';
Note: See TracChangeset
for help on using the changeset viewer.