Commit Graph

696 Commits

Author SHA1 Message Date
Toby Zerner
b4439dc6b3 Automatically include the appropriate translations from extensions 2015-11-02 18:51:12 +10:30
Toby Zerner
72a2749943 Fall back to en after the forum's default locale
Since we'll be encouraging (requiring?) people to include an "en" translation in extensions they want to put on the Marketplace, we should have a further fallback to "en" if it can't find translations in the forum's default language. That way if people only use extensions from the Marketplace, they'll hardly ever see any key names.

Thanks to @dcsjapan for the suggestion.
2015-11-02 17:55:31 +10:30
Toby Zerner
f13ded1255 Fix error when renaming discussion
Discussion/user info is needed when serialising posts (checking permissions, etc.) so we can't just use the ID.
2015-11-02 17:53:26 +10:30
Toby Zerner
90def3f0db Fix permissions being incorrectly granted 2015-11-01 09:38:25 +10:30
Franz Liedke
17619843b5 Update to newest version of Whoops middleware 2015-10-31 12:56:38 +01:00
Toby Zerner
d46316e979 Use relative path for core migrations 2015-10-31 18:22:03 +10:30
Toby Zerner
b44ffd9f8d Only attempt to get default locale if db is up to date 2015-10-31 18:21:39 +10:30
Toby Zerner
953f81176b Fix check for whether there is a translation for a group name 2015-10-31 18:20:55 +10:30
Toby Zerner
73c44adb96 Merge pull request #615 from oldskool/ip-logging
Minor changes:
- Rename/restyle migration, fix namespace
- Make IP address optional on PostReply command
2015-10-31 10:04:06 +10:30
Toby Zerner
95e3ff8fa8 Update for new tobscure/json-api relationship handling 2015-10-30 11:03:38 +10:30
Toby Zerner
a3a5d0a351 Disable extensions that require credentials by default 2015-10-29 17:52:52 +10:30
Jan Dorsman
49fddbd450 WIP IP Logging 2015-10-27 21:53:21 +01:00
Kirk Bushell
400aa4fef9 Added more tests 2015-10-27 13:22:30 +00:00
Toby Zerner
68498cedae Use exception handlers instead of JsonApiSerializableInterface 2015-10-26 11:14:48 +10:30
Toby Zerner
0a65d2bb0d i18n: Make cross-file translation references work 2015-10-24 13:16:26 +10:30
Toby Zerner
59fa623f11 Don't let users view discussions without permission
closes #599
2015-10-22 21:52:31 +10:30
Toby Zerner
9836fa64ed Allow hyphens in referenced key names 2015-10-22 17:01:21 +10:30
Toby Zerner
415b68f84f Add flood control
closes #271
2015-10-22 16:57:48 +10:30
Toby Zerner
ea98e4bda9 More helpful avatar upload error messages
ref #165, #118
2015-10-22 10:40:38 +10:30
Toby Zerner
fc7db914db Translate basic HTML views
app('view') call to set translator is temporary. See #189
2015-10-21 11:36:49 +10:30
Toby Zerner
a7c2a7a2d3 Increase username max length
Not sure why it was at 8!
2015-10-21 11:13:55 +10:30
Toby Zerner
12830265d9 Change back to 401 error on invalid login
See 26a821e3e2 (commitcomment-13866552)
2015-10-21 09:04:58 +10:30
Toby Zerner
845daf1ab6 Don't use array_filter flag (PHP 5.6 only) 2015-10-20 22:25:20 +10:30
Toby Zerner
22ffb76cb5 Fix installation 2015-10-20 22:07:35 +10:30
Toby Zerner
26a821e3e2 Improve client XHR error handling
The default XHR error handler produce an alert which is appropriate to the response status code. It can be overridden per-request (by specifying the `errorHandler` option) so that the alert can be suppressed or displayed in a different position (e.g. inside a modal).

ref #118
2015-10-20 12:48:26 +10:30
Toby Zerner
7490709af8 Fix migrate command and generated migration namespace 2015-10-19 16:48:16 +10:30
Toby Zerner
96c42ed337 Translate group names during serialization
closes #564
2015-10-19 15:44:28 +10:30
Toby Zerner
1242fa79af Implement proper update process
If the version in the settings table mismatches the code version, then we return a 503 error for all requests coming through index.php and api.php, while admin.php serves up a form prompting for the database password which will run outstanding migrations.
2015-10-19 15:09:54 +10:30
Toby Zerner
ddfedcb4dd Add Interface suffix to SettingsRepository 2015-10-19 14:58:47 +10:30
Toby Zerner
43c44efe3d Make emails translatable
closes #267
2015-10-19 11:23:39 +10:30
Toby Zerner
7e763ec22b Gracefully fail for LESS compilation errors, not just parsing ones 2015-10-17 15:55:03 +10:30
Toby Zerner
e0b6aacc9e Prevent crash when no locales are enabled 2015-10-16 14:02:09 +10:30
Toby Zerner
46ba8a3b8d cs fix 2015-10-15 22:51:26 +10:30
Toby Zerner
c08b62af80 Refactor translation and validation
We now use Symfony's Translation component. Yay! We get more powerful pluralisation and better a fallback mechanism. Will want to implement the caching mechanism at some point too. The API is replicated in JavaScript, which could definitely use some testing.

Validators have been refactored so that they are decoupled from models completely (i.e. they simply validate arrays of user input). Language packs should include Laravel's validation messages.

ref #267
2015-10-15 22:30:45 +10:30
Toby Zerner
dfb9f23eee Fix default forum route controller 2015-10-14 17:03:29 +10:30
Toby Zerner
4b3e1b16d9 Remove forum. prefix from permissions
closes #425
2015-10-14 16:11:00 +10:30
Toby Zerner
cde8dd0dc4 Store temporary files in storage dir
closes #482
2015-10-14 15:49:31 +10:30
Toby Zerner
b928cb523a CS fix 2015-10-14 12:26:48 +10:30
Toby Zerner
60bdbe6e52 Show 404 errors as the "pretty" page even in debug mode
closes #503
2015-10-14 12:23:20 +10:30
Toby Zerner
b83c81c06e Clean up 2015-10-14 11:14:36 +10:30
Toby Zerner
2ae7392dea Publish core/extension assets
Core assets are copied into the root/assets directory on installation.

The contents of an "assets" directory within any extension is copied into root/assets/extensions/{name}/ whenever the extension is enabled, and deleted whenever the extension is uninstalled.

Still needs to be refactored
2015-10-13 16:52:45 +10:30
Toby Zerner
6df48b04c2 Fix installation regressions 2015-10-13 15:55:18 +10:30
Toby Zerner
4c2ff6e82d Revamp admin extensions page
- New look
- Groups extensions by keywords
2015-10-12 15:02:59 +10:30
Toby Zerner
b53e612007 Fix failing tests + CS 2015-10-11 23:37:51 +10:30
Toby Zerner
1c3fda4a71 Update some APIs
- Rename DiscussionSearchWillBePerformed to ConfigureDiscussionSearch, same with users
- Add some handy methods
2015-10-11 22:31:06 +10:30
Toby Zerner
663de42917 Fix extension uninstallation 2015-10-11 22:29:25 +10:30
Toby Zerner
cde7dd3ce1 Make sure activation status/email is returned when creating a user 2015-10-11 22:29:14 +10:30
Toby Zerner
60483b2c62 Fix ConfigureNotificationTypes API 2015-10-11 13:08:57 +10:30
Toby Zerner
0b888ea342 Fix installation 2015-10-11 10:05:40 +10:30
Toby Zerner
6f1c46819e Minify each JS file individually, caching the result
This means that the expensive minification process will only be run for a file if it hasn't before. Greatly speeds up extension enabling/disabling.

Also:
- Don't check file last modification times in production for a bit of extra perf.
- Only flush CSS when theme settings are changed. This speeds up the page reload a bit.
2015-10-09 01:52:51 +10:30