File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,18 @@ private function httpRequest($msg) {
709709 //$msg->remote_addr=$_SERVER['REMOTE_ADDR'];
710710 //$msg->sender_info['remote_addr']=$_SERVER['REMOTE_ADDR'];
711711 $ si =(array )json_decode ($ msg ->sender_info ,true );
712- $ si ['remote_addr ' ]=$ _SERVER ['REMOTE_ADDR ' ];
712+ if (defined ('IN_PHPBB ' ))
713+ {
714+ global $ request ;
715+ if (method_exists ($ request ,'server ' ))
716+ {
717+ $ si ['remote_addr ' ]=$ request ->server ('REMOTE_ADDR ' );
718+ }
719+ }
720+ else
721+ {
722+ $ si ['remote_addr ' ]=$ _SERVER ['REMOTE_ADDR ' ];
723+ }
713724 $ msg ->sender_info =json_encode ($ si );
714725 if (((isset ($ this ->work_url ) && $ this ->work_url !== '' ) && ($ this ->server_changed + $ this ->server_ttl > time ()))
715726 || $ this ->stay_on_server == true ) {
You can’t perform that action at this time.
0 commit comments