Commit Graph

2262 Commits

Author SHA1 Message Date
Toby Zerner
beb2f91fef 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
2391471937 Clean up linting stuff. closes #852 2016-03-10 17:13:30 +10:30
Franz Liedke
f631b98df6 Whoopsie, fix syntax error 2016-03-08 00:05:53 +09:00
Franz Liedke
01cb5c4478 Add another migration shortcut for defining default settings 2016-03-08 00:02:33 +09:00
Toby Zerner
fc517ca94d Merge pull request #846 from sijad/extension-path
Remove 'extensions' path for writable check
2016-03-04 17:04:01 +10:30
Sajjad Hasehmian
393fa67d2d Remove 'extensions' path for writable check 2016-03-04 09:55:40 +03:30
Daniel Klabbers
cb6ac9e9e2 added integration with codecov to track coverage of tests 2016-03-03 11:50:09 +01:00
Toby Zerner
7d2f24bb47 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
5a7b57df96 adding new tests to cover api handlers, part 1 of #245 and #74 2016-03-03 11:00:11 +01:00
Toby Zerner
a75a76e95b Fix fatal error when deleting a discussion forever. closes #842 2016-03-03 12:52:53 +10:30
Toby Zerner
639f5c0114 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
15c0a8c2db Refactoring to drop extensions dir, see #774
satisfy nitpick
2016-03-02 09:04:10 +01:00
Toby Zerner
1b5b91c85b Merge pull request #840 from flarum/analysis-z4xEVE
Applied fixes from StyleCI
2016-03-01 14:21:22 +10:30
Toby Zerner
5d5f47aab2 Applied fixes from StyleCI 2016-02-29 22:51:13 -05:00
Toby Zerner
24713733fc 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
56b39f9fba 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
cdbc4b9717 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
594a2ba8cc More indentation cleanup 2016-02-26 13:10:32 +09:00
Toby Zerner
445517ee84 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
b4cf197cc6 Improve alignment of string 2016-02-26 12:20:37 +09:00
Toby Zerner
102db3c913 Simplify StyleCI config 2016-02-26 13:47:17 +10:30
Toby Zerner
0ccfad3931 Merge pull request #831 from flarum/analysis-qvQMPx
Applied fixes from StyleCI
2016-02-26 13:40:39 +10:30
Toby Zerner
a6cf10f854 Applied fixes from StyleCI 2016-02-25 22:09:39 -05:00
Toby Zerner
83c22d73a4 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
952b4693da Add StyleCI config 2016-02-26 13:35:09 +10:30
Toby Zerner
c7b6426fd4 Delete a discussion when its last post is deleted. fixes #823 2016-02-26 13:26:09 +10:30
Toby Zerner
acdb1ff749 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
50e56ac0a1 Recompile admin JS 2016-02-26 12:50:03 +10:30
Toby Zerner
82fc4dd483 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
5390187a4f Just a tad of cleanup 2016-02-25 23:29:55 +09:00
Daniel Klabbers
e4412178b1 refactoring to support array closures migrations and fixed issues with previous pr for extension rewriting 2016-02-25 23:26:10 +09:00
Franz Liedke
2b5dab73f9 Use the new migration shortcuts in most of core's migrations 2016-02-25 00:50:54 +09:00
Franz Liedke
db7a03fbe5 Add some handy shortcuts for typical migration tasks
This will make it much easier for extension developers (and also less
error-prone) to create migrations for things like creating tables,
renaming columns and so on...
2016-02-25 00:50:03 +09:00
Franz Liedke
ad95a44e7d Remove obsolete AbstractMigration class 2016-02-24 23:22:52 +09:00
Franz Liedke
59613910b1 Update generate:migration command to deal with new migration structure 2016-02-24 23:20:33 +09:00
Franz Liedke
13fe162db3 Add two missing copyright headers 2016-02-24 22:25:09 +09:00
Franz Liedke
51955504aa Revamp migration structure
They are now simply files that return an array of closures, for
running the named "up" and "down" actions, respectively.

Related to #732.
2016-02-24 22:23:49 +09:00
Toby Zerner
05fe4446bf Fix crash when displaying a discussion with no posts. closes #823 2016-02-22 22:22:49 +10:30
Toby Zerner
71d2e71908 Condense into value/oninput into bidi 2016-02-22 21:22:18 +10:30
Toby Zerner
93f3f22623 Merge pull request #811 from sijad/firefox-fix
Fix login box autocomplete in firefox
2016-02-22 21:09:18 +10:30
Franz Liedke
ff69dade15 Merge pull request #817 from flarum/revert-813-typehint
Revert "typehint fix, opening for implementation"
2016-02-18 17:35:17 +01:00
Franz Liedke
17851c4dfe Revert "typehint fix, opening for implementation" 2016-02-18 17:33:34 +01:00
Franz Liedke
46dfdf2deb Merge pull request #813 from Luceos/typehint
typehint fix, opening for implementation
2016-02-17 16:12:15 +01:00
Daniel Klabbers
d944a9e618 typehint fix, opening for implementation 2016-02-17 13:34:13 +01:00
Sajjad Hasehmian
2143a96c19 Fix login box autocomplete 2016-02-16 21:08:45 +03:30
Toby Zerner
d7fe3ca35b Merge pull request #787 from sijad/401-page
401 for unauthorised request to settings, notifications page
2016-02-15 21:04:39 +10:30
Daniël Klabbers
48e29ed168 Merge pull request #801 from Luceos/extension_fix
Extension fix
2016-02-14 22:18:08 +01:00
Daniel Klabbers
0ad4c0ac61 fixes #800, forgot these controllers 2016-02-13 20:33:33 +01:00
Daniel Klabbers
458f4f811c fixes #799, now properly assigning a id 2016-02-13 20:32:46 +01:00
Sajjad Hasehmian
e90dfe04fd 401 for unauthorised request to settings, notifications page fixes #714 2016-02-11 09:59:01 +03:30