Index: trunk/phase3/includes/ProxyTools.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | * @return string |
69 | 69 | */ |
70 | 70 | function wfGetIP() { |
71 | | - global $wgIP, $wgUsePrivateIPs; |
| 71 | + global $wgIP, $wgUsePrivateIPs, $wgCommandLineMode; |
72 | 72 | |
73 | 73 | # Return cached result |
74 | 74 | if ( !empty( $wgIP ) ) { |
— | — | @@ -81,6 +81,8 @@ |
82 | 82 | # Client connecting to this webserver |
83 | 83 | if ( isset( $_SERVER['REMOTE_ADDR'] ) ) { |
84 | 84 | $ip = IP::canonicalize( $_SERVER['REMOTE_ADDR'] ); |
| 85 | + } elseif( $wgCommandLineMode ) { |
| 86 | + $ip = '127.0.0.1'; |
85 | 87 | } |
86 | 88 | if( $ip ) { |
87 | 89 | $ipchain[] = $ip; |