正在显示
2 个修改的文件
包含
32 行增加
和
10 行删除
| @@ -226,12 +226,23 @@ class HtmlCollect extends Command | @@ -226,12 +226,23 @@ class HtmlCollect extends Command | ||
| 226 | $path = $arr['path'] ?? ''; | 226 | $path = $arr['path'] ?? ''; |
| 227 | $query = $arr['query'] ?? ''; | 227 | $query = $arr['query'] ?? ''; |
| 228 | 228 | ||
| 229 | - if ( | ||
| 230 | - (strpos($host, '.globalso.') === false) && | ||
| 231 | - (strpos($host, '.goodao.') === false) && | ||
| 232 | - $path && (strpos($path, '.') !== false) | ||
| 233 | - ) { | 229 | + $web_url_domain = $domain; |
| 230 | + $home_url = $domain; | ||
| 231 | + $url_web_config = 'https://' . $domain . '/wp-content/cache/user_config.text'; | ||
| 232 | + $data_config = http_get($url_web_config, ['charset' => 'UTF-8']); | ||
| 233 | + if ($data_config) { | ||
| 234 | + $web_url_arr = parse_url($data_config['web_url_domain']); | ||
| 235 | + if (isset($web_url_arr['host'])) { | ||
| 236 | + $web_url_domain = $web_url_arr['host']; | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + $home_url_arr = parse_url($data_config['home_url']); | ||
| 240 | + if (isset($home_url_arr['host'])) { | ||
| 241 | + $home_url = $home_url_arr['host']; | ||
| 242 | + } | ||
| 243 | + } | ||
| 234 | 244 | ||
| 245 | + if (empty($host) || $host == $web_url_domain || $host == $home_url) { | ||
| 235 | $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); | 246 | $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); |
| 236 | if (!$source) { | 247 | if (!$source) { |
| 237 | return [ | 248 | return [ |
| @@ -226,12 +226,23 @@ class HtmlLanguageCollect extends Command | @@ -226,12 +226,23 @@ class HtmlLanguageCollect extends Command | ||
| 226 | $path = $arr['path'] ?? ''; | 226 | $path = $arr['path'] ?? ''; |
| 227 | $query = $arr['query'] ?? ''; | 227 | $query = $arr['query'] ?? ''; |
| 228 | 228 | ||
| 229 | - if ( | ||
| 230 | - (strpos($host, '.globalso.') === false) && | ||
| 231 | - (strpos($host, '.goodao.') === false) && | ||
| 232 | - $path && (strpos($path, '.') !== false) | ||
| 233 | - ) { | 229 | + $web_url_domain = $domain; |
| 230 | + $home_url = $domain; | ||
| 231 | + $url_web_config = 'https://' . $domain . '/wp-content/cache/user_config.text'; | ||
| 232 | + $data_config = http_get($url_web_config, ['charset' => 'UTF-8']); | ||
| 233 | + if ($data_config) { | ||
| 234 | + $web_url_arr = parse_url($data_config['web_url_domain']); | ||
| 235 | + if (isset($web_url_arr['host'])) { | ||
| 236 | + $web_url_domain = $web_url_arr['host']; | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + $home_url_arr = parse_url($data_config['home_url']); | ||
| 240 | + if (isset($home_url_arr['host'])) { | ||
| 241 | + $home_url = $home_url_arr['host']; | ||
| 242 | + } | ||
| 243 | + } | ||
| 234 | 244 | ||
| 245 | + if (empty($host) || $host == $web_url_domain || $host == $home_url) { | ||
| 235 | $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); | 246 | $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); |
| 236 | if (!$source) { | 247 | if (!$source) { |
| 237 | return [ | 248 | return [ |
-
请 注册 或 登录 后发表评论