Changeset 2729570
- Timestamp:
- 05/24/2022 03:41:27 PM (4 years ago)
- Location:
- widgets-for-amazon/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
includes/Plugin.php (modified) (3 diffs)
-
widgets-for-amazon.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
widgets-for-amazon/trunk/README.txt
r2729563 r2729570 7 7 Requires PHP: 7.0 8 8 Tested up to: 5.9 9 Stable tag: 1.0.1 89 Stable tag: 1.0.19 10 10 License: GPLv3 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 52 52 == Changelog == 53 53 54 #### 1.0.1 8- 2022-05-2454 #### 1.0.19 - 2022-05-24 55 55 56 56 - Added support for 404 page. -
widgets-for-amazon/trunk/includes/Plugin.php
r2729563 r2729570 47 47 { 48 48 $query = $_SERVER['REQUEST_URI']; 49 50 $questionPos = strpos($query, '?'); 51 if ($questionPos && $questionPos >= 0) 52 $query = substr($query, 0, $questionPos); 53 49 54 if (Tools::endsWith('/', $query)) 50 55 $query = substr($query, 0, strlen($query) - 1); 51 56 52 57 $slashPos = strrpos($query, '/'); 53 if ($slashPos >= 0)58 if ($slashPos && $slashPos >= 0) 54 59 $query = substr($query, $slashPos + 1); 55 60 } … … 59 64 } 60 65 61 $query = str_replace('"', '', $query); 66 $query = str_replace('"', ' ', $query); 67 $query = str_replace('?', ' ', $query); 68 $query = str_replace('&', ' ', $query); 62 69 $inputForScript = 'category="' . $noResultsPageCategory . '" keywords="' . $query . '"'; 63 70 … … 165 172 166 173 if (!$keywords) 167 return ('// Keywords missing => Cannot create search box widget for "amazon-search-' . $index . '".' . "\n");174 return 'console.log("Keywords missing => Cannot create search box widget for \"amazon-search-' . $index . '\".");'; 168 175 169 176 if (!$affiliateTag) -
widgets-for-amazon/trunk/widgets-for-amazon.php
r2729563 r2729570 5 5 * Plugin URI: https://blog.eggnstone.com/blog/widgets-for-amazon-for-wordpress 6 6 * Description: Widgets for Amazon by eggnstone 7 * Version: 1.0.1 87 * Version: 1.0.19 8 8 * Author: eggnstone 9 9 * Author URI: https://eggnstone.com
Note: See TracChangeset
for help on using the changeset viewer.