@@ 94-96 (lines=3) @@ | ||
91 | ->where('moderate', '=', 0); |
|
92 | ||
93 | // check if comments is depend of language locale |
|
94 | if ((int)$configs['onlyLocale'] === 1) { |
|
95 | $query = $query->where('lang', '=', $this->request->getLanguage()); |
|
96 | } |
|
97 | ||
98 | // get comments with offset and limit |
|
99 | $records = $query->skip($offset) |
|
@@ 154-156 (lines=3) @@ | ||
151 | // get data from db by comment id |
|
152 | $records = CommentAnswer::where('comment_id', '=', $commentId) |
|
153 | ->where('moderate', '=', 0); |
|
154 | if ((int)$configs['onlyLocale'] === 1) { |
|
155 | $records = $records->where('lang', '=', $this->request->getLanguage()); |
|
156 | } |
|
157 | ||
158 | // check objects count |
|
159 | if ($records->count() < 1) { |
|
@@ 198-200 (lines=3) @@ | ||
195 | foreach ($path as $id => $uri) { |
|
196 | $query = CommentPost::where('pathway', '=', $uri)->where('moderate', '=', 0); |
|
197 | // check if comments is depend of language locale |
|
198 | if ((int)$configs['onlyLocale'] === 1) { |
|
199 | $query = $query->where('lang', '=', $this->request->getLanguage()); |
|
200 | } |
|
201 | // set itemId => count |
|
202 | $count[(int)$id] = $query->count(); |
|
203 | } |