Pārlūkot izejas kodu

Merge pull request #1968 from visuddhinanda/laravel

社区词典包括_USER_DICT_
visuddhinanda 2 gadi atpakaļ
vecāks
revīzija
026a1407d4
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      app/Http/Controllers/UserDictController.php

+ 4 - 1
app/Http/Controllers/UserDictController.php

@@ -61,7 +61,10 @@ class UserDictController extends Controller
             case 'community':
             case 'community':
                 $table = UserDict::select($indexCol)
                 $table = UserDict::select($indexCol)
                                 ->where('word', $request->get("word"))
                                 ->where('word', $request->get("word"))
-                                ->where('source', "_USER_WBW_");;
+                                ->where(function($query) {
+                                    $query->where('source', "_USER_WBW_")
+                                            ->orWhere('source','_USER_DICT_');
+                                });
                 break;
                 break;
             case 'compound':
             case 'compound':
                 $dict_id = DictApi::getSysDict('robot_compound');
                 $dict_id = DictApi::getSysDict('robot_compound');