ソースを参照

[enhance] search results in help (#2022)

version-14
Faris Ansari 9年前
committed by Rushabh Mehta
コミット
add9c74779
1個のファイルの変更3行の追加1行の削除
  1. +3
    -1
      frappe/utils/help.py

+ 3
- 1
frappe/utils/help.py ファイルの表示

@@ -81,7 +81,9 @@ class HelpDatabase(object):

def search(self, words):
self.connect()
return self.db.sql('select title, intro, path from help where match(content) against (%s) limit 10', words)
return self.db.sql('''
select title, intro, path from help where title like '%{term}%' union
select title, intro, path from help where match(content) against ('{term}') limit 10'''.format(term=words))

def get_content(self, path):
self.connect()


読み込み中…
キャンセル
保存