|
...
|
...
|
@@ -119,6 +119,8 @@ class ProjectImport extends Command |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$v[0] = $this->special2str($v[0]);
|
|
|
|
|
|
|
|
$total_count += 1;
|
|
|
|
try {
|
|
|
|
if ($task->type == ImportTask::TYPE_NEWS) {
|
|
...
|
...
|
@@ -200,6 +202,30 @@ class ProjectImport extends Command |
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//特殊字符转换
|
|
|
|
protected function special2str($str)
|
|
|
|
{
|
|
|
|
if (strpos($str, ';') === false) {
|
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
|
|
|
|
$list = [
|
|
|
|
'<' => '<',
|
|
|
|
'>' => '>',
|
|
|
|
'&' => '&',
|
|
|
|
'´' => "'",
|
|
|
|
'"' => '"',
|
|
|
|
' ' => ' ',
|
|
|
|
''' => "'"
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($list as $k => $v) {
|
|
|
|
$str = str_replace($k, $v, $str);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
|
|
|
|
//发送站内通知
|
|
|
|
protected function send_mail($user_list, $time, $type, $success_count, $repeat_count, $fail_count, $reason, $fail_line = [])
|
|
|
|
{
|
...
|
...
|
|