Changeset 3161302
- Timestamp:
- 10/02/2024 07:58:13 AM (17 months ago)
- Location:
- amazon-auto-links/trunk
- Files:
-
- 7 edited
-
amazon-auto-links.php (modified) (2 diffs)
-
include/core/_common/utility/interpreter/http/AmazonAutoLinks_HTTPClient.php (modified) (4 diffs)
-
include/core/component/custom_oembed/oembed/AmazonAutoLinks_CustomOEmbed_Endpoint.php (modified) (1 diff)
-
include/core/component/proxy/event/action/AmazonAutoLinks_Proxy_Event_Action_UnusableProxy.php (modified) (2 diffs)
-
include/core/component/proxy/utility/AmazonAutoLinks_Proxy_Utility.php (modified) (1 diff)
-
include/core/main/admin/report/http_request/AmazonAutoLinks_AdminPage_Tab_HTTPRequest.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amazon-auto-links/trunk/amazon-auto-links.php
r3082358 r3161302 6 6 * Author: Michael Uno (miunosoft) 7 7 * Author URI: https://michaeluno.jp 8 * Version: 5.4.3 b048 * Version: 5.4.3 9 9 * Text Domain: amazon-auto-links 10 10 * Domain Path: /language … … 19 19 */ 20 20 class AmazonAutoLinks_Registry_Base { 21 const VERSION = '5.4.3 b04'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!21 const VERSION = '5.4.3'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! 22 22 const NAME = 'Auto Amazon Links'; 23 23 const DESCRIPTION = 'Formerly, Amazon Auto Links. The plugin generates links of Amazon products just coming out today. You just pick categories and they appear even in JavaScript disabled browsers.'; -
amazon-auto-links/trunk/include/core/_common/utility/interpreter/http/AmazonAutoLinks_HTTPClient.php
r3069332 r3161302 546 546 547 547 if ( $_bProxySet ) { 548 548 /** 549 * @see AmazonAutoLinks_Proxy_Utility::getProxyArguments() 550 */ 549 551 $_aProxy = $_aProxy + array( 550 552 'host' => null, … … 552 554 'username' => null, 553 555 'password' => null, 556 'ip' => null, 557 'scheme' => null, 554 558 ); 555 559 curl_setopt( $_oCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP ); … … 563 567 curl_setopt( $_oCurl, CURLOPT_PROXYUSERPWD, $_aProxy[ 'username' ] . ':' . $_aProxy[ 'password' ] ); 564 568 } 565 566 569 } 567 570 … … 588 591 589 592 // Error handling 593 $_sHost = $_aProxy[ 'raw' ] !== $_aProxy[ 'host' ] 594 ? $_aProxy[ 'raw' ] . ' (' . $_aProxy[ 'host' ] . ')' 595 : $_aProxy[ 'raw' ]; 590 596 if ( ! $_bsResponse ) { 591 597 $_aErrorData = array( 'url' => $sURL ) + $_aProxy; 592 598 $_sHTTPCode = $_sHTTPCode ? $_sHTTPCode : 'CURL_CONNECTION_FAILURE'; 593 return new WP_Error( $_sHTTPCode, sprintf( 'The cURL connection failed with a proxy: %1$s.', $_ aProxy[ 'raw' ]), $_aErrorData );599 return new WP_Error( $_sHTTPCode, sprintf( 'The cURL connection failed with a proxy: %1$s.', $_sHost ), $_aErrorData ); 594 600 } 595 601 $_iResponseCode = ( integer ) $_sHTTPCode; 596 602 if ( $_iResponseCode >= 400 ) { 597 603 $_aErrorData = array( 'url' => $sURL ) + $_aProxy; 598 return new WP_Error( $_iResponseCode, sprintf( 'The cURL response returned an error with a proxy: %1$s.', $_ aProxy[ 'raw' ]), $_aErrorData );604 return new WP_Error( $_iResponseCode, sprintf( 'The cURL response returned an error with a proxy: %1$s.', $_sHost ), $_aErrorData ); 599 605 } 600 606 -
amazon-auto-links/trunk/include/core/component/custom_oembed/oembed/AmazonAutoLinks_CustomOEmbed_Endpoint.php
r3022483 r3161302 46 46 $_sNonce = wp_create_nonce( 'aal_custom_oembed' ); 47 47 $_sProviderSiteURL = $_oOption->get( array( 'custom_oembed', 'external_provider' ), '' ); 48 $_sEmbedSlug = ( string ) apply_filters( 'aal_filter_plugin_slug_oembed', 'amazon-auto-links' ); 48 49 $_sProviderEndpoint = filter_var( $_sProviderSiteURL, FILTER_VALIDATE_URL ) 49 ? untrailingslashit( $_sProviderSiteURL ) . '/ amazon-auto-links/embed/'50 : untrailingslashit( site_url() ) . '/ amazon-auto-links/embed/'; // using a custom non-existent url so when the plugin is deactivated, the iframe displays the 404 embedded page.50 ? untrailingslashit( $_sProviderSiteURL ) . '/' . $_sEmbedSlug . '/embed/' 51 : untrailingslashit( site_url() ) . '/' . $_sEmbedSlug . '/embed/'; // using a custom non-existent url so when the plugin is deactivated, the iframe displays the 404 embedded page. 51 52 $_sIFrameURL = add_query_arg( 52 53 array( 53 'embed' => ( string ) apply_filters( 'aal_filter_plugin_slug_oembed', 'amazon-auto-links' ), // usually the value is 1 for normal oEmbed posts but here we use a custom value to differentiate the request to process own custom outputs // [5.3.10] filter54 'embed' => $_sEmbedSlug, // usually the value is 1 for normal oEmbed posts but here we use a custom value to differentiate the request to process own custom outputs // [5.3.10] filter 54 55 // 'url' => ... the key is reserved by the core for oEmbed discovery routine and when used, it causes recursive requests. 55 56 'uri' => urlencode( AmazonAutoLinks_PluginUtility::getURLSanitized( $_GET[ 'url' ] ) ), // sanitization done -
amazon-auto-links/trunk/include/core/component/proxy/event/action/AmazonAutoLinks_Proxy_Event_Action_UnusableProxy.php
r2701172 r3161302 35 35 * The stored proxies will be saved at shutdown. 36 36 * @param array $aArguments 37 * @since 4.2.037 * @since 4.2.0 38 38 */ 39 39 public function replyToCaptureUnusableProxies( array $aArguments ) { 40 40 41 $_sHost = $this->getElement( $aArguments, array( 'proxy', 'host' ), '' ); 42 $_sPort = $this->getElement( $aArguments, array( 'proxy', 'port' ), '' ); 43 $_sUser = $this->getElement( $aArguments, array( 'proxy', 'username' ), '' ); 44 $_sPass = $this->getElement( $aArguments, array( 'proxy', 'password' ), '' ); 41 /** 42 * Allows the user to disable the updates of the list of unusable proxies. 43 * @since 5.4.3 44 */ 45 if ( ! ( boolean ) apply_filters( 'aal_filter_http_request_proxy_update_unusable', true ) ) { 46 return; 47 } 45 48 46 // scheme://username:password@host:port 47 $_sUserPass = ( $_sUser && $_sPass ) ? $_sUser . ':' . $_sPass . '@': ''; 48 $_sEntry = $_sUserPass . $_sHost . ':' . $_sPort; 49 $_sEntry = $this->getElement( $aArguments, array( 'proxy', 'raw' ), '' ); 49 50 $this->___aUnusableProxies[ $_sEntry ] = $_sEntry; // prevent duplicates by setting the value in key 50 51 if ( 1 === count( $this->___aUnusableProxies ) ) { … … 69 70 foreach( $this->___aUnusableProxies as $_sProxy ) { 70 71 71 $_aUnusables[] = $_sProxy;72 $_biIndex = array_search( $_sProxy, $_aProxies );72 $_aUnusables[] = $_sProxy; 73 $_biIndex = array_search( $_sProxy, $_aProxies ); 73 74 if ( false === $_biIndex ) { 74 75 continue; -
amazon-auto-links/trunk/include/core/component/proxy/utility/AmazonAutoLinks_Proxy_Utility.php
r3082358 r3161302 24 24 25 25 $_aProxy = parse_url( $sProxy ); 26 $_sIP = self::getIPFromHostName( $_aProxy[ 'host' ] ); 26 27 return array( 28 'scheme' => $_aProxy[ 'scheme' ], 29 'ip' => $_sIP, 27 30 'host' => isset( $_aProxy[ 'scheme' ] ) 28 ? $_aProxy[ 'scheme' ] . '://' . self::getIPFromHostName( $_aProxy[ 'host' ] )// cURL does not accept domain names31 ? $_aProxy[ 'scheme' ] . '://' . $_sIP // cURL does not accept domain names 29 32 : $_aProxy[ 'host' ], 30 33 'port' => $_aProxy[ 'port' ], -
amazon-auto-links/trunk/include/core/main/admin/report/http_request/AmazonAutoLinks_AdminPage_Tab_HTTPRequest.php
r2701172 r3161302 51 51 private function ___getCacheDataTable( array $aCache, $sNonce ) { 52 52 53 $_aData = $aCache[ 'data' ]; 53 $_aData = $this->getElementAsArray( $aCache, array( 'data' ) ) + array( 54 'body' => '', 55 'headers' => array(), 56 'cookies' => array(), 57 ); 58 $aCache[ 'name' ] = isset( $aCache[ 'name' ] ) ? $aCache[ 'name' ] : ''; 54 59 55 60 if ( is_wp_error( $_aData ) ) { … … 145 150 return "<div class='go-back'>" 146 151 . "<span class='dashicons dashicons-arrow-left-alt small-icon'></span>" 147 . "<a href=' {$_sProductsPageURL}'>"152 . "<a href='" . esc_url( $_sProductsPageURL ) . "'>" 148 153 . __( 'Go Back', 'amazon-auto-links' ) 149 154 . "</a>" -
amazon-auto-links/trunk/readme.txt
r3072213 r3161302 7 7 Tested up to: 6.5.2 8 8 Requires MySQL: 5.0.3 9 Stable tag: 5.4. 29 Stable tag: 5.4.3 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 185 185 = Do I need API Keys? = 186 186 187 For the category unit type, no, but for PA-APIunit types, yes. You need to issue a pair of API keys on the Amazon Associates logged-in page.187 For the Category unit type, no, but for other unit types, yes. You need to issue a pair of API keys on the Amazon Associates logged-in page. 188 188 189 189 For that, you need to have an account with [Amazon Product Advertising API](https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html). The keys can be obtained by logging in to [Amazon Web Services](http://aws.amazon.com/) and you need to get **Access Key ID** (public key) and **Secret Access Key** (private key). … … 406 406 == Changelog == 407 407 408 #### 5.4.2 - 04/17/2024 409 - Added a method to avoid the PHP warning, "gzuncompress(): data error" 408 #### 5.4.2 - 10/02/2024 409 - Fixed a bug that the `sort` shortcode argument did not take effect when used with the `asin` argument. 410 - Fixed a PHP critical error saying "Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty." 411 - Added the **Server** section in the **About** tab of the **Help** page. 412 - Added the ability to automatically update the default options of Country and Associate ID when the options of the Associates section are updated. 413 - Changed to show some About details only when the Debug Mode with back-end is enabled. 414 - Fixed a PHP warning saying "Deprecated: preg_replace(): Passing null to parameter #3" in PHP 8.2. 415 - Changed the timing of applying the sort order of PA-API Item-Lookup units. 416 - Added the ability to accept host names for HTTP proxies 417 - Fixed the broken format in the unusable HTTP proxy list 418 - Fixed a bug that the `aal_filter_plugin_slug_oembed` filter hook did not function 419 - Fixed raw strings to be sanitized 410 420 411 421 #### Old Log
Note: See TracChangeset
for help on using the changeset viewer.