瀏覽代碼

$realTitle 截取128字符

visuddhinanda 2 年之前
父節點
當前提交
b97ce0c0cf
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/Console/Commands/ImportArticleMap.php

+ 5 - 0
app/Console/Commands/ImportArticleMap.php

@@ -95,7 +95,12 @@ class ImportArticleMap extends Command
                 $dir = $data[1];
                 $title = $data[2];
                 $realTitle = "[{$id}]{$title}";
+                $realTitle = mb_substr($realTitle,0,128,'UTF-8');
                 $reference = $data[5];
+
+                $percent = (int)($inputRow*100/6984);
+                $this->info("[{$percent}%] doing ".$realTitle);
+
                 if($this->option('size')){
                     $currDir = 'tipitaka-sarupa-'.$currBlock;
                     if($currSize > $this->option('size')){