In sql_load_notes, no longer adding offset clause if start = 0 since SQLite doesn't like offset without limit.
Switched from using "ilike" to "like" with lower(), since "ilike" is a PostgreSQL-specific extension.
Moved BACKEND flags from Database to Persistent to prevent need from circular imports (model files importing controller.Database).
- modify controller.Users.current() to return the user's groups
- update test_current() unit tests to expect empty groups list in results
- modify Main_page, Notebook_rss, Front_page, Tour_page, and Upgrade_page to accept a new groups parameter
- Main_page should add it as a hidden HTML variable
- update Wiki.js to read the hidden groups variable and display the groups in account settings
- make model.Notebook.sql_search_notes() search either with user_id or an anonymous user_id, not both
- update controller.Notebooks.search(), so if the anonymous user has access to the given notebook,
then run the search as the anonymous user instead of the given user id
- update unit tests
- don't search trash/deleted notebooks
- change model.Notebook.sql_search_notes() to be a static method
- take a first_notebook_id argument and a user_id argument
- join user_notebook on notebook_id and matches on user_notebook.user_id instead of notebook_id
- order by notebook_id = first_notebook desc, rank instead of just rank
- include search result for notebooks readable by anonymous user, but only if such a notebook is given as first_notebook_id
- update code that calls model.Notebook.sql_search_notes()
- update model.Note.to_dict() to include notebook_id
- modify Wiki.display_search_results()
- separate search results for the current notebook and results for all other notebooks
- indicate which notebook each result is from
- if there are results in other notebooks but no results in the current notebook, indicate that clearly
- when you click on a result note link in the current notebook, it should simply open a new note
- when you click on a result note link in another notebook, it should open in a new window
- test in IE
- update unit tests for:
- controller.Notebooks.search()
- model.Notebook.sql_search_notes()
- model.Note.to_dict()
character) titles from saving correctly.
Changed the literal quotation character in the starting wiki note to the
""" character entity so it doesn't show up as a change in the diff.
* Added new optional previous_revision params to default(), contents() and load_note() in controller.Notebooks.
These use Html_differ() to generate and return diffs.
* Updated Wiki.js:
* provide previous_revision when a revision is opened in a new window/tab
* call load_note() when two revisions when a revision is clicked in Changes_pulldown
* update compare_versions() to display a diff instead of opening the two revisions separately
* update load_editor():
* update all invocations of load_editor(), including in Editor.js, to accept a new previous_revision argument
* modify load_editor() to use the previous_revision argument (when supplied) to load a diff
* controller.Files.upload() now updates user quota storage.
* When a file is uploaded, the new storage bytes count is returned to the client and displayed.
then a new read-write notebook is created for you automatically. This fixes a
bug where you could delete a notebook and have only a read-only notebook
remaining, thereby having no way to add a new notebook.