12345678910111213141516171819 |
- def browse():
- db = current.plugin_ckeditor.db
- table_upload = current.plugin_ckeditor.settings.table_upload
- browse_filter = current.plugin_ckeditor.settings.browse_filter
- set = db(table_upload.id>0)
- for key, val in browse_filter.items():
- if value[0] == '<':
- set = set(table_upload[key]<value[1:])
- elif value[0] == '>':
- set = set(table_upload[key]>value[1:])
- elif value[0] == '!':
- set = set(table_upload[key]!=value[1:])
- else:
- set = set(table_upload[key]==value)
-
- rows = set.select(orderby=table_upload.title)
-
- return dict(rows=rows, cknum=request.vars.CKEditorFuncNum)
-
|