Commit Graph

2031 Commits

Author SHA1 Message Date
Toby Zerner
2c27b5c6d7 Applied fixes from StyleCI 2016-03-20 06:06:43 -04:00
Franz Liedke
68759bbc4a AbstractOAuth2Controller: Store provider and token in class properties
This way, they are available for subclasses to access them in one of
the template methods.

Refs #673.
2016-03-18 22:22:35 +09:00
Franz Liedke
f13956d94b Fix JSON serialization error on PHP 7
Closes #685.

Thanks to @sijad.
2016-03-18 21:11:54 +09:00
Toby Zerner
3a8b11e389 Extract sortMap variable
Also revert previous uncommitted change in dist file
2016-03-18 10:06:58 +10:30
Toby Zerner
3d49fc1315 Prevent users from being incorrectly able to delete their own discussions 2016-03-18 09:39:41 +10:30
Toby Zerner
087ab3fa1f Lighten discussion list hover color
When the list is shown in the side-pane, the background of the currently-selected discussion is the @control-bg. The hover color shouldn't be quite as strong as that.
2016-03-18 09:38:37 +10:30
Toby Zerner
1a95764909 Fix "sort by" dropdown being empty
Must be something in the latest version of Chrome that caused this to start being a problem, because @franzliedke started experiencing it a few days ago, and I only just experienced it for the first time yesterday.
2016-03-18 09:37:25 +10:30
Toby Zerner
41f48deddc Fix regression with maintenance of scroll position when jumping between discussion list filters 2016-03-18 09:36:09 +10:30
Toby Zerner
0211e4539c Remove unmaintained changelog
We will look at reintroducing once out of beta.
2016-03-18 09:34:48 +10:30
Toby Zerner
b45bd3a581 Upgrade to flarum-gulp 0.2.0 / Babel 6 2016-03-18 09:31:01 +10:30
Franz Liedke
f7e2e14909 Merge pull request #858 from sijad/update-mithril
Update Mithril
2016-03-16 10:11:05 +09:00
Sajjad Hasehmian
cba1868d9f Update Mithril 2016-03-16 00:48:01 +03:30
Toby Zerner
4037fb566c Increase avatar upload max file size 2016-03-14 09:25:02 +10:30
Toby Zerner
8888fb2586 Add missing super.init calls 2016-03-11 13:45:38 +10:30
Toby Zerner
9e9ef6fe0f Dramatically improve performance when typing in a modal
Since Mithril doesn't really offer granular redraw control, typing in a text input on a modal would trigger a redraw for the whole page (including the page content behind the modal) on every keystroke. This commit allows components to be "paused" so that their vdom subtree will be retained instead of reconstructed on subsequent redraws. When a modal is opened, we pause the main page component, and when it's closed, we unpause it. This means that while a modal is visible, only the content inside of the modal will be redrawn, dramatically improving performance.
2016-03-11 13:18:16 +10:30
Toby Zerner
e46878902a Remove sudo mode and add password confirmation when changing email address
closes #674
2016-03-11 12:44:18 +10:30
Toby Zerner
c95dbc0cb4 Remove white border from badges, decrease overlap 2016-03-11 12:01:47 +10:30
Toby Zerner
66398d423e Add padding between items in fieldsets on the settings page 2016-03-10 17:56:18 +10:30
Toby Zerner
6351c2354f Fix browser back button losing scroll position. ref #835 2016-03-10 17:55:35 +10:30
Toby Zerner
7c25880806 Fix posts being incorrectly visible on user page. closes #680
- When no discussions are visible, the query that filters posts by discussion visibility was incorrectly making all posts visible.
- Also hide user profiles altogether if discussions are not visible.
2016-03-10 17:50:29 +10:30
Toby Zerner
001c21c329 Clean up linting stuff. closes #852 2016-03-10 17:13:30 +10:30
Franz Liedke
7e872cc213 Whoopsie, fix syntax error 2016-03-08 00:05:53 +09:00
Franz Liedke
a1f8651894 Add another migration shortcut for defining default settings 2016-03-08 00:02:33 +09:00
Toby Zerner
c05f598dd0 Merge pull request #846 from sijad/extension-path
Remove 'extensions' path for writable check
2016-03-04 17:04:01 +10:30
Sajjad Hasehmian
979fef1163 Remove 'extensions' path for writable check 2016-03-04 09:55:40 +03:30
Daniel Klabbers
f1236a90b1 added integration with codecov to track coverage of tests 2016-03-03 11:50:09 +01:00
Toby Zerner
0671c676b4 Merge pull request #843 from Luceos/add-tests
adding new tests to cover api handlers
2016-03-03 20:53:15 +10:30
Daniel Klabbers
7e65a7fd5b adding new tests to cover api handlers, part 1 of #245 and #74 2016-03-03 11:00:11 +01:00
Toby Zerner
f1fb33cc55 Fix fatal error when deleting a discussion forever. closes #842 2016-03-03 12:52:53 +10:30
Toby Zerner
4fa89dbb13 Merge pull request #841 from Luceos/drop-ext-dir
Refactoring to drop extensions dir, see #774
2016-03-02 18:46:08 +10:30
Daniel Klabbers
c151bc700a Refactoring to drop extensions dir, see #774
satisfy nitpick
2016-03-02 09:04:10 +01:00
Toby Zerner
bc12114273 Merge pull request #840 from flarum/analysis-z4xEVE
Applied fixes from StyleCI
2016-03-01 14:21:22 +10:30
Toby Zerner
03051f376e Applied fixes from StyleCI 2016-02-29 22:51:13 -05:00
Toby Zerner
720b960515 Don't require a previous Post when saving event posts
A bit of an edge-case since it shouldn't really be possible to have a discussion with zero posts anymore, but when renaming an empty discussion (or taking any action that will create an "event post"), Flarum would crash. This is due to the MergeableInterface requiring these posts to be saved after a previous post.
2016-02-29 18:50:27 +10:30
Toby Zerner
0f3b942c97 Fix crash when sending notification to non-existent user
When renaming a discussion, an attempt is made to send a notification to the discussion's author. However, there is no check to see if the user account still exists - this can lead to a crash. While the check should technically be in the initiating code, it will probably slip through the cracks in other scenarios/extensions, so it's probably best that we safe-guard against this in the NotificationSyncer itself.
2016-02-29 18:48:02 +10:30
Toby Zerner
b0b388052a Fix regressions related to deleting posts
- On the front-end, correct the check to see if the discussion has no more posts
- On the back-end, run a query to count the posts instead of using the comments_count, because the comments_count does not include other deleted posts
2016-02-29 18:41:59 +10:30
Franz Liedke
730a46d885 More indentation cleanup 2016-02-26 13:10:32 +09:00
Toby Zerner
b461f157ca Use regex for username validation
Laravel's alpha_dash rule allows unicode letters including those with inflections, leading to issues like #832. As per discussion in #557, we are sticking with ASCII-only usernames for now.
2016-02-26 13:59:05 +10:30
Franz Liedke
bc95ab8ae1 Improve alignment of string 2016-02-26 12:20:37 +09:00
Toby Zerner
49ea5d7923 Simplify StyleCI config 2016-02-26 13:47:17 +10:30
Toby Zerner
556755ee8c Merge pull request #831 from flarum/analysis-qvQMPx
Applied fixes from StyleCI
2016-02-26 13:40:39 +10:30
Toby Zerner
63c355c20d Applied fixes from StyleCI 2016-02-25 22:09:39 -05:00
Toby Zerner
5fe8e6cd9a Fix StyleCI misconfiguration error
> The provided fixer 'unalign_double_arrow' cannot be disabled unless it was already enabled by your preset.
2016-02-26 13:36:19 +10:30
Toby Zerner
9e882d8023 Add StyleCI config 2016-02-26 13:35:09 +10:30
Toby Zerner
2f187dfd65 Delete a discussion when its last post is deleted. fixes #823 2016-02-26 13:26:09 +10:30
Toby Zerner
f375fd9241 Revert #687 + #197. fixes #785
Unfortunately we have no way to calculate the number of comment posts that are previous to the current viewing position of the discussion, without loading all of the posts which is going to be too expensive (even if we do it selectively somehow).
2016-02-26 13:11:52 +10:30
Toby Zerner
f6c3834b32 Recompile admin JS 2016-02-26 12:50:03 +10:30
Toby Zerner
3148f175cf Refactor Composer rendering for smoother animations
Also fixes a couple of miscellaneous bugs:
- Minimise the Composer when clicking the preview button in full-screen mode on desktop.
- Minimise the Composer when clicking the link to the discussion/post in the header on mobile/full-screen mode.
2016-02-26 12:49:49 +10:30
Franz Liedke
1cbab36fda Just a tad of cleanup 2016-02-25 23:29:55 +09:00
Daniel Klabbers
3f4b880e77 refactoring to support array closures migrations and fixed issues with previous pr for extension rewriting 2016-02-25 23:26:10 +09:00