From a0bd195f07c6c890ad345f4f0ecd608b173aeb71 Mon Sep 17 00:00:00 2001 From: jianbo <20397795@qq.com> Date: Sun, 5 Jan 2020 11:47:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E2=80=9C=E7=8C=9C=E4=BD=A0?= =?UTF-8?q?=E5=96=9C=E6=AC=A2=E2=80=9D=E7=9A=84=E4=B8=80=E5=A4=84bug=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0get=5Fclient=5Fip=E6=94=B9=E5=90=8D=E4=B8=BAr?= =?UTF-8?q?am=5Fget=5Fclient=5Fip=20=EF=BC=8C=E9=81=BF=E5=85=8D=E5=92=8C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E7=9A=84=E6=8F=92=E4=BB=B6=E9=87=8D=E5=90=8D?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/api/ram-rest-comments-controller.php | 2 +- includes/ram-util.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/ram-rest-comments-controller.php b/includes/api/ram-rest-comments-controller.php index 8bcafb8..daab1d4 100644 --- a/includes/api/ram-rest-comments-controller.php +++ b/includes/api/ram-rest-comments-controller.php @@ -138,7 +138,7 @@ class RAM_REST_Comments_Controller extends WP_REST_Controller{ $userid=isset($request['userid'])?(int)$request['userid']:0; //被回复者 $formId =isset($request['formId'])?$request['formId']:""; - $authorIp =get_client_ip(); + $authorIp =ram_get_client_ip(); $authorIp= empty($authorIp)?'':$authorIp; $wf_enable_comment_check= get_option('wf_enable_comment_check'); diff --git a/includes/ram-util.php b/includes/ram-util.php index 751e112..20ce131 100644 --- a/includes/ram-util.php +++ b/includes/ram-util.php @@ -440,7 +440,7 @@ function decrypt_data( $appid, $sessionKey, $encryptedData, $iv, &$data ) { return $errors['OK']; } -function get_client_ip() +function ram_get_client_ip() { foreach (array( 'HTTP_CLIENT_IP', -- GitLab