1
0
mirror of https://github.com/flarum/core.git synced 2025-08-22 16:14:00 +02:00
Commit Graph

8740 Commits

Author SHA1 Message Date
Toby Zerner
1b692e4981 Update some APIs
- Rename DiscussionSearchWillBePerformed to ConfigureDiscussionSearch, same with users
- Add some handy methods
2015-10-11 22:31:06 +10:30
Toby Zerner
3655dca371 Fix extension uninstallation 2015-10-11 22:29:25 +10:30
Toby Zerner
8c0ce38e78 Make sure activation status/email is returned when creating a user 2015-10-11 22:29:14 +10:30
Toby Zerner
7aaeea3a17 Show posts even if they don't have a user 2015-10-11 22:28:23 +10:30
Toby Zerner
972116f5bb Import admin translations 2015-10-11 22:24:33 +10:30
Toby Zerner
030e0c9938 Update API, add default translations 2015-10-11 22:24:12 +10:30
Toby Zerner
5bae959353 Update API, add default translations 2015-10-11 22:23:06 +10:30
Toby Zerner
5f9d45c4ab Update for composer branch 2015-10-11 18:51:25 +10:30
Toby Zerner
cdcf68cf5a Update for composer branch 2015-10-11 18:01:29 +10:30
Toby Zerner
b7c06ece8a Fix autoload namespace 2015-10-11 17:44:35 +10:30
Toby Zerner
afc383d443 Fix typos in description 2015-10-11 17:42:41 +10:30
Toby Zerner
fde7921487 Update for composer branch 2015-10-11 17:30:11 +10:30
Toby Zerner
57ed9dad5f Update for composer branch 2015-10-11 17:02:19 +10:30
Toby Zerner
faa0b6f2ce Update for composer branch 2015-10-11 16:35:01 +10:30
Toby Zerner
fca470604e Update for composer branch 2015-10-11 16:15:07 +10:30
Toby Zerner
eee3f9ca92 Update for composer branch 2015-10-11 15:30:19 +10:30
Toby Zerner
83f5981f83 Update compile script 2015-10-11 15:28:35 +10:30
Toby Zerner
1f5e5af18a Fix ConfigureNotificationTypes API 2015-10-11 13:08:57 +10:30
Toby Zerner
ccda85cc29 Update for composer branch 2015-10-11 13:02:57 +10:30
Toby Zerner
0ddd1dcd59 Rename initializer 2015-10-11 13:01:53 +10:30
Toby Zerner
d9fde337e3 Rename initializer 2015-10-11 13:01:33 +10:30
Toby Zerner
4a85063702 Move gitignore rules 2015-10-11 11:44:59 +10:30
Toby Zerner
37d7874705 Update for composer branch
Also remove sticky notification
2015-10-11 11:43:13 +10:30
Toby Zerner
5645c79c31 External helpers are included by default now 2015-10-11 11:37:23 +10:30
Toby Zerner
ae3a0d2ef3 Add more info to composer.json 2015-10-11 11:18:30 +10:30
Toby Zerner
2b85b1bf12 Add more info to composer.json 2015-10-11 11:18:05 +10:30
Toby Zerner
a48f396649 Concatenate items in {second}, not {first} 2015-10-11 10:09:22 +10:30
Toby Zerner
47b5919480 Fix installation 2015-10-11 10:05:40 +10:30
Toby Zerner
ccc1b02991 Fix migration namespace 2015-10-11 10:04:40 +10:30
Toby Zerner
f71db2d3c7 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
Toby Zerner
2032dc20bb Bundle unminified JS; minify via ClosureCompilerService when in production
Falls back to a less effective minification library if ClosureCompilerService errors or is unavailable. Minification takes a while (20 seconds or so), but it only happens when assets are modified. Still, this means enabling/disabling extensions is taking far too long. Possible solutions:

- Don't minify initially; set a process running in the background to do minification, and server unminified assets in the meantime.
- Refactor compiler to send each JS file to CCS individually, only if that particular file has been modified.

flarum/gulp has also been updated to no longer support uglification.

closes #582
2015-10-09 00:33:53 +10:30
Toby Zerner
a351c2ef3c Update APIs, clean up 2015-10-08 23:02:41 +10:30
Toby Zerner
8458b59e78 Add translations for lib.series 2015-10-08 22:50:28 +10:30
Toby Zerner
6192901bc5 Simplify gitignore
No need to try and cover everything, people can add global gitignore rules if their OS is generating weird files.
2015-10-08 22:50:13 +10:30
Toby Zerner
223b6a4065 Make punctuate translatable, rename to punctuateSeries 2015-10-08 22:42:03 +10:30
Toby Zerner
3a72037fd4 Flush forum assets when extensions are enabled/disabled 2015-10-08 17:46:03 +10:30
Toby Zerner
574a1c6e57 Only show restore button for comment posts 2015-10-08 17:45:44 +10:30
Toby Zerner
ce0f77d858 Don't require composer installers 2015-10-08 16:54:33 +10:30
Toby Zerner
d12d8fa5dd Update various event APIs 2015-10-08 16:49:11 +10:30
Toby Zerner
6bf93ae9f7 Major refactor and improvements
- Reorganised all namespaces and class names for consistency and structure. Following PSR bylaws (Abstract prefix, Interface/Trait suffix).
  - Move models into root of Core, because writing `use Flarum\Core\Discussion` is nice. Namespace the rest by type. (Namespacing by entity was too arbitrary.)
  - Moved some non-domain stuff out of Core: Database, Formatter, Settings.
  - Renamed config table and all references to "settings" for consistency.
  - Remove Core class and add url()/isInstalled()/inDebugMode() as instance methods of Foundation\Application.
  - Cleanup, docblocking, etc.

- Improvements to HTTP architecture
  - API and forum/admin Actions are now actually all the same thing (simple PSR-7 Request handlers), renamed to Controllers.
  - Upgrade to tobscure/json-api 0.2 branch.
  - Where possible, moved generic functionality to tobscure/json-api (e.g. pagination links). I'm quite happy with the backend balance now re: #262

- Improvements to other architecture
  - Use Illuminate's Auth\Access\Gate interface/implementation instead of our old Locked trait. We still use events to actually determine the permissions though. Our Policy classes are actually glorified event subscribers.
  - Extract model validation into Core\Validator classes.
  - Make post visibility permission stuff much more efficient and DRY.

- Renamed Flarum\Event classes for consistency. ref #246
  - `Configure` prefix for events dedicated to configuring an object.
  - `Get` prefix for events whose listeners should return something.
  - `Prepare` prefix when a variable is passed by reference so it can be modified.
  - `Scope` prefix when a query builder is passed.

- Miscellaneous improvements/bug-fixes. I'm easily distracted!
  - Increase default height of post composer.
  - Improve post stream redraw flickering in Safari by keying loading post placeholders with their IDs. ref #451
  - Use a PHP JavaScript minification library for minifying TextFormatter's JavaScript, instead of ClosureCompilerService (can't rely on external service!)
  - Use UrlGenerator properly in various places. closes #123
  - Make Api\Client return Response object. closes #128
  - Allow extensions to specify custom icon images.
  - Allow external API/admin URLs to be optionally specified in config.php. If the value or "url" is an array, we look for the corresponding path inside. Otherwise, we append the path to the base URL, using the corresponding value in "paths" if present. closes #244
2015-10-08 14:28:02 +10:30
Toby Zerner
4be8270c1a Update APIs 2015-10-07 23:07:44 +10:30
Toby Zerner
c98444382d Update icon API 2015-10-07 23:01:00 +10:30
Toby Zerner
e6d0454409 Merge pull request #7 from dcsjapan/core-strings
Update core YML with extracted strings
2015-10-07 22:57:14 +10:30
dcsjapan
89ab96ae15 Update core YML with extracted strings
See flarum/core#265
- Fixes namespacing of reorganized core keys (flarum/core#563)
- Includes strings for the admin interface (flarum/core#575)
- Includes a couple of leftover core strings (flarum/core#577)
2015-10-06 12:14:05 +09:00
dcsjapan
ed2ee7de4c Fixes namespace errors in keys for the two extracted strings. 2015-10-06 09:56:12 +09:00
dcsjapan
f53c46f85c Extract leftover core strings
Adds app.trans calls for a couple strings in core:
- The "there are no discussions" message in DiscussionList.js
- The user deletion confirmation message in UserControls.js
- Also adds new HTML-style tags to LogInModal.js and SignUpModal.js
2015-10-06 05:52:03 +09:00
dcsjapan
3a35f270be Extract admin strings
Adds app.trans calls for strings used by the admin UI.
- Strings for AddExtensionModal.js not included.
- Corresponding YAML will be sent later w/ more extracted strings.
2015-10-05 19:06:41 +09:00
Toby Zerner
b667cd4d0c Fix installation 2015-10-03 17:38:23 +09:30
Toby Zerner
766bdb3cbb Remove unnecessary information from composer.json 2015-10-03 17:37:04 +09:30
Toby Zerner
55c53677e5 Remove unnecessary information from composer.json 2015-10-03 17:36:08 +09:30