visuddhinanda пре 2 година
родитељ
комит
ed6b49b6bb
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      app/Http/Controllers/CorpusController.php

+ 2 - 3
app/Http/Controllers/CorpusController.php

@@ -275,10 +275,9 @@ class CorpusController extends Controller
             }else{
             }else{
                 $this->result['title'] = $chapter->toc;
                 $this->result['title'] = $chapter->toc;
                 $this->result['sub_title'] = $chapter->toc;
                 $this->result['sub_title'] = $chapter->toc;
-                $this->result['path'] = json_decode($chapter->path);
+                $this->result['path'] = json_decode($parent->path);
             }
             }
         }
         }
-
         $paraFrom = $para[0];
         $paraFrom = $para[0];
         $paraTo = end($para);
         $paraTo = end($para);
 
 
@@ -307,7 +306,7 @@ class CorpusController extends Controller
         //章节译文标题
         //章节译文标题
         $title = Sentence::select($this->selectCol)
         $title = Sentence::select($this->selectCol)
                     ->where('book_id',$parent->book)
                     ->where('book_id',$parent->book)
-                    ->where('paragraph',$parent->paragraph)
+                    ->where('paragraph',$parent->parent)
                     ->whereIn('channel_uid',$tranChannels)
                     ->whereIn('channel_uid',$tranChannels)
                     ->first();
                     ->first();
         if($title){
         if($title){