Plugin Directory

Changeset 3400110


Ignore:
Timestamp:
11/21/2025 01:21:13 AM (4 months ago)
Author:
infility
Message:

v2.14.35 (20251121) Ben: 修复wcf7表单代理ip出现2个时,地址显示错误问题

Location:
infility-global/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • infility-global/trunk/infility_global.php

    r3399332 r3400110  
    44Plugin URI: https://www.infility.cn/
    55Description: Infility公共插件
    6 Version: 2.14.34
     6Version: 2.14.35
    77Author: Infility
    88Author URI: https://www.infility.cn/
     
    134134v2.14.31 (20251119) Ben: 新增导入term的seo标题和描述
    135135v2.14.34 (20251120) Ben: 新增古腾堡模块转换不变quote
     136v2.14.35 (20251121) Ben: 修复wcf7表单代理ip出现2个时,地址显示错误问题
    136137*/
    137138
     
    139140    function __construct()
    140141    {
    141         define( 'INFILITY_GLOBAL_VERSION', '2.14.34' );
     142        define( 'INFILITY_GLOBAL_VERSION', '2.14.35' );
    142143        define( 'INFILITY_GLOBAL_PATH', plugin_dir_path( __FILE__ ) ); // fullpath/wp-content/plugins/infility-global/ // 有斜杠
    143144        define( 'INFILITY_GLOBAL_URL', plugins_url( '/', __FILE__ ) ); // https://the_domain/wp-content/plugins/infility-global/ // 斜杠是自己加的
  • infility-global/trunk/readme.txt

    r3399332 r3400110  
    367367= 2.14.34 =
    368368新增古腾堡模块转换不变quote
     369
     370= 2.14.35 =
     371修复wcf7表单代理ip出现2个时,地址显示错误问题
  • infility-global/trunk/widgets/contact-form-plugins/contact-form-plugins.php

    r3341372 r3400110  
    340340            $trackingInfo .= __('Proxy Server IP:','infility-global') . ' ' . $_SERVER["HTTP_X_FORWARDED_FOR"] . $lineBreak;
    341341            if (  is_plugin_active( 'geoip-detect/geoip-detect.php' ) ) {
    342                 $trackingcountryproxy = geoip_detect_get_info_from_ip($_SERVER["HTTP_X_FORWARDED_FOR"]);
     342                if(strstr($_SERVER["HTTP_X_FORWARDED_FOR"],',')){
     343                    $x_forwarded_for = trim(explode(',',$_SERVER["HTTP_X_FORWARDED_FOR"])[1]);
     344                }else{
     345                    $x_forwarded_for = $_SERVER["HTTP_X_FORWARDED_FOR"];
     346                }
     347                $trackingcountryproxy = geoip_detect_get_info_from_ip($x_forwarded_for);
    343348                $trackingInfo .= __('Country:','infility-global') . ' ' . $trackingcountryproxy->country_name . ' (' . $trackingcountryproxy->country_code . ' - ' . $trackingcountryproxy->continent_code . ')';
    344349                $trackingInfoNoIp .= __('Country:','infility-global') . ' ' . $trackingcountryproxy->country_name . ' (' . $trackingcountryproxy->country_code . ' - ' . $trackingcountryproxy->continent_code . ')';
Note: See TracChangeset for help on using the changeset viewer.