1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 02:31:17 +02:00
Commit Graph

824 Commits

Author SHA1 Message Date
Sajjad Hasehmian
74e1b14177 Show alert for unverified User 2016-03-22 18:52:32 +04:30
Franz Liedke
701ea5ed26 info: Show commit hashes for Flarum core and extensions 2016-03-22 00:55:10 +09:00
Franz Liedke
0175eb490b info: Show loaded PHP extensions 2016-03-22 00:33:39 +09:00
Franz Liedke
a8c1641066 info: Show installation path 2016-03-22 00:29:58 +09:00
Franz Liedke
c90bc3a753 info: Show base URL 2016-03-22 00:28:02 +09:00
Franz Liedke
fb954a0e0d info: Print PHP version, too 2016-03-22 00:22:40 +09:00
Franz Liedke
e3ddb8149d Make console command descriptions consistent 2016-03-20 23:16:08 +09:00
Franz Liedke
f2997322b0 Get rid of some repetition 2016-03-20 23:15:26 +09:00
Franz Liedke
fba4d982ba Add first, basic version of info command
This will hopefully help in debugging some problems.
2016-03-20 23:12:20 +09:00
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
3d49fc1315 Prevent users from being incorrectly able to delete their own discussions 2016-03-18 09:39:41 +10:30
Toby Zerner
4037fb566c Increase avatar upload max file size 2016-03-14 09:25:02 +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
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
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
Sajjad Hasehmian
979fef1163 Remove 'extensions' path for writable check 2016-03-04 09:55:40 +03:30
Toby Zerner
f1fb33cc55 Fix fatal error when deleting a discussion forever. closes #842 2016-03-03 12:52:53 +10:30
Daniel Klabbers
c151bc700a Refactoring to drop extensions dir, see #774
satisfy nitpick
2016-03-02 09:04:10 +01:00
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
63c355c20d Applied fixes from StyleCI 2016-02-25 22:09:39 -05:00
Toby Zerner
2f187dfd65 Delete a discussion when its last post is deleted. fixes #823 2016-02-26 13:26:09 +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
Franz Liedke
14042bedaf 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
b2b3e8ff89 Remove obsolete AbstractMigration class 2016-02-24 23:22:52 +09:00
Franz Liedke
0411cc5137 Update generate:migration command to deal with new migration structure 2016-02-24 23:20:33 +09:00
Franz Liedke
44586ed4c2 Revert "typehint fix, opening for implementation" 2016-02-18 17:33:34 +01:00
Daniel Klabbers
f9419926a5 typehint fix, opening for implementation 2016-02-17 13:34:13 +01:00
Toby Zerner
28b5ab620b Merge pull request #787 from sijad/401-page
401 for unauthorised request to settings, notifications page
2016-02-15 21:04:39 +10:30
Daniel Klabbers
ef83a4681b fixes #800, forgot these controllers 2016-02-13 20:33:33 +01:00
Daniel Klabbers
5179d2eb52 fixes #799, now properly assigning a id 2016-02-13 20:32:46 +01:00
Sajjad Hasehmian
28ed01ffcc 401 for unauthorised request to settings, notifications page fixes #714 2016-02-11 09:59:01 +03:30
Daniel Klabbers
b11b952aff Implemented extensions as an object, usable by backend and frontend. 2016-02-10 15:13:51 +01:00
Franz Liedke
10f3846646 Merge pull request #786 from Luceos/imports
reordering and removing unused imports
2016-02-10 15:02:37 +01:00
Franz Liedke
03db2b4cc0 Installer: Fix models not being ready for use when running migrations
This was a regression after the recent introduction of a new migration that actually uses models.
Maybe we should change this.

See https://discuss.flarum.org/d/2023-can-t-manage-to-install-the-development-version-503-service-unavailable/8
2016-02-10 14:07:29 +01:00
Daniel Klabbers
20e4f64025 reordering and removing unused imports 2016-02-10 11:00:37 +01:00
Sajjad Hasehmian
45a4849448 Correct redirect uri in OAuth2 Controller (fixes #778) 2016-02-09 18:01:59 +03:30
Toby Zerner
f2b6b61811 Merge pull request #748 from JoshyPHP/Minifiers
Added support for new minifiers
2016-02-07 11:37:15 +10:30
Franz Liedke
373452b395 Store discussion slug in database table
In preparation for #646.
2016-02-04 11:46:30 +01:00
Toby Zerner
51d6a23b83 Refactor ListPostsController, make filtering extensible
It became apparent in https://github.com/flarum/core/issues/319#issuecomment-170558573 that there was no way for extensions to add filter parameters to the /api/posts endpoint (e.g. /api/posts?filter[mentioned]=1). Simply adding an event to modify the `$where` array severely limits how much can be done with the query. This commit refactors the controller so that filters are applied directly to the query Builder, and exposes the Builder in a new `ConfigurePostsQuery` event.
2016-01-31 17:06:38 +10:30
Toby Zerner
553a49af56 Fix fatal error
"PHP Fatal error:  Cannot use Symfony\Component\Translation\Translator as Translator because the name is already in use"
2016-01-31 15:35:53 +10:30