소스 검색

update: fix knowledge access data foreach

tokumeikoi 3 년 전
부모
커밋
d5504354bc
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      app/Http/Controllers/User/KnowledgeController.php
  2. 0 0
      public/assets/admin/umi.css

+ 5 - 3
app/Http/Controllers/User/KnowledgeController.php

@@ -64,9 +64,11 @@ class KnowledgeController extends Controller
     private function formatAccessData(&$body)
     {
         function getBetween($input, $start, $end){$substr = substr($input, strlen($start)+strpos($input, $start),(strlen($input) - strpos($input, $end))*(-1));return $substr;}
-        $accessData = getBetween($body, '<!--access start-->', '<!--access end-->');
-        if ($accessData) {
-            $body = str_replace($accessData, '<div class="v2board-no-access">'. __('You must have a valid subscription to view content in this area') .'</div>', $body);
+        while (strpos($body, '<!--access start-->') !== false) {
+            $accessData = '<!--access start-->' . getBetween($body, '<!--access start-->', '<!--access end-->') . '<!--access end-->';
+            if ($accessData) {
+                $body = str_replace($accessData, '<div class="v2board-no-access">'. __('You must have a valid subscription to view content in this area') .'</div>', $body);
+            }
         }
     }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
public/assets/admin/umi.css


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.