Commit Graph

3196 Commits

Author SHA1 Message Date
Franz Liedke
46e0e7e042 Add an issue template for security vulnerabilities 2018-12-10 22:43:03 +01:00
David Sevilla Martín
6d185eecf1 Add 'hasPermission' helper to Group (#1688)
* Add Group@hasPermission helper

* Improve performance of method
2018-12-10 22:32:21 +01:00
Franz Liedke
7ffca76c61 Fix incorrect column name for registration token
Oversight from the database renamings, I suppose.

Fixes #1691.
2018-12-09 23:17:04 +01:00
Toby Zerner
13ce2d1e3d Performance: Actually make use of the translator cache
We had added a `storage/locale` directory to our skeleton, but we had
forgotten to hook it up with the translator. Enabling caching saves
parsing that locale YAML files on every pageload which should be good
for performance.

The locale cache will be cleared whenever an extension that uses the
`Locales` or `LanguagePack` extenders is enabled/disabled. If debug
mode is ON, then the caching mechanism will automatically check if any
of the loaded YAML files are dirty and update accordingly.
2018-12-07 09:38:08 +10:30
Toby Zerner
6b6fce878a Add another commit 2018-12-07 09:13:44 +10:30
Franz Liedke
36a0231796 Release version 0.1.0-beta.8.1 2018-12-06 00:47:38 +01:00
Franz Liedke
de73685764 Do not create tables as InnoDB automatically, rely on connection default
As argued in #1675, this makes us slightly less reliant on MySQL.
2018-12-06 00:34:43 +01:00
Toby Zerner
d7fd5ef11e Don't output empty html tag attributes
From https://discuss.flarum.org/d/17817-meta-description-is-empty/8
ref #1677
2018-12-04 09:47:49 +10:30
Toby Zerner
2b9e969b95 Fix empty meta description tag. Fixes #1677 2018-12-04 09:28:24 +10:30
Toby Zerner
126551366b Set the default engine in the installer
The installer doesn't use DatabaseServiceProvider, so we need to set
the default engine in the config here too.

Fixes #1675
2018-12-04 09:12:19 +10:30
Toby Zerner
93531c6636 Fix oopsie in d6632c061d 2018-12-04 08:54:33 +10:30
flarum-bot
d399c38b96 Bundled output for commit eefac062a1 [skip ci] 2018-12-02 22:26:12 +00:00
Toby Zerner
eefac062a1 Update changelog 2018-12-03 08:51:27 +10:30
Toby Zerner
4365fa3c52 Fix discussion list scroll position not being maintained when hero is not visible 2018-12-03 08:50:54 +10:30
Toby Zerner
83cdea35ea Add changelog 2018-12-02 08:08:44 +10:30
Franz Liedke
c23b7f33eb Migrations: Fix dropping foreign keys
Passing an array to dropForeign does not mean dropping multiple indices,
but rather dropping a key on multiple tables.

Passing a string means that this string will be interpreted as index
name, not as name of the indexed column. Passing an array with one
string is therefore correct, in order to benefit from automatic index
name generation.
2018-11-30 14:02:37 +01:00
Franz Liedke
d6632c061d Set InnoDB for DB connection and new tables
Refs #1661.
2018-11-29 23:21:58 +01:00
Franz Liedke
7092b3bfff Installer: Fix invalid join time of admin user
Fixes #1664.
2018-11-29 22:56:56 +01:00
Franz Liedke
42dfcf3e40 Fix search with database prefix
wrap() only adds a table prefix when referencing a column with a table
name (such as `foo.bar`) - when only a single identifier is provided, it
is assumed to be a column name, which does not need a prefix.

Fixes #1659.
2018-11-29 22:50:32 +01:00
Franz Liedke
13005b0363 Fix live output in ResetCommand
This was forgotten in aab06e0.

Fixes #1663.
2018-11-29 22:04:01 +01:00
Franz Liedke
ff17cba95a Fix code style and doc block 2018-11-29 21:31:12 +01:00
Daniël Klabbers
992bd2f3ad Up the version (#1582) 2018-11-29 00:34:49 +01:00
Franz Liedke
521a592d43 Always invalidate all user email tokens
Reported by B. Dhiyaneshwaran of Geek Freak.
2018-11-29 00:33:42 +01:00
Toby Zerner
0ff0f45150 Merge pull request #1656 from flarum/tz/fix-index-names
Fix index names in migrations
2018-11-27 22:32:17 +10:30
Toby Zerner
41688c73f8 Fix index names in migrations
This can be reverted when we upgrade to Laravel 5.7.
2018-11-27 12:19:13 +10:30
David Sevilla Martín
84b4f4832d Throw FileNotFoundException when FileSource path does not exist
Closes #1649.
2018-11-22 23:40:38 +01:00
David Sevilla Martín
bd210636e8 Fix frontend extender using old container & wrong class 2018-11-22 21:17:32 +01:00
Franz Liedke
9b7957815f Remove obsolete property accessor in User model
The locale field does not exist, and the accessor code was broken.

Closes #1653.
2018-11-22 21:12:25 +01:00
Toby Zerner
b68767abdd Clearer delineation of installation pointer 2018-11-22 18:37:00 +10:30
Toby Zerner
d4cebc5901 Include LESS mixins and variables in all frontend compilers 2018-11-22 12:09:50 +10:30
Toby Zerner
1ea8dbed03 Consolidate ControllerRouteHandler into RouteHandlerFactory
Also allow closure to be passed for frontend content when creating routes
2018-11-22 12:09:50 +10:30
Toby Zerner
171f9184d9 Refactor frontend code to allow for extension of assets
- Simpler class naming:
    Frontend\CompilerFactory → Frontend\Assets
    Frontend\HtmlDocumentFactory → Frontend\Frontend
    Frontend\HtmlDocument → Frontend\Document

- Remove AssetInterface and simply collect callbacks in Frontend\Assets
  instead

- Remove ContentInterface because it serves no purpose (never type-
  hinted or type-checked)

- Commit and add asset URLs to the Document via a content callback
  instead of in the Document factory class itself

- Add translations and locale assets to Assets separate to the assets
  factory, as non-forum/admin asset bundles probably won't want them

- Update Frontend Extender to allow the creation of new asset bundles

- Make custom LESS validation listener a standalone class instead of
  extending RecompileFrontendAssets
2018-11-22 12:09:50 +10:30
flarum-bot
59330d8fe6 Bundled output for commit dc71192d77 [skip ci] 2018-11-21 21:38:27 +00:00
Toby Zerner
fedc1f6fe4 Apply fixes from StyleCI (#1651)
[ci skip] [skip ci]
2018-11-22 08:04:41 +10:30
Toby Zerner
dc71192d77 Fix build errors by updating webpack-cli 2018-11-22 08:04:08 +10:30
Toby Zerner
e98a1d33e9 Add "clear cache" button to admin 2018-11-22 08:03:43 +10:30
Toby Zerner
1b788a09f7 Fix old session method name 2018-11-22 07:24:44 +10:30
Toby Zerner
3394abde2b Fix positioning of hamburger menu unread indicator 2018-11-22 07:24:01 +10:30
Toby Zerner
eea80766a2 Revert "Configure external links before dispatching event"
This reverts commit fd97e787dd.

Fixes #1650
2018-11-22 07:21:16 +10:30
Toby Zerner
28af13a081 Change watch command to dev 2018-11-21 18:31:54 +10:30
Toby Zerner
f915f38e95 Make npm package private, update deps 2018-11-21 18:31:24 +10:30
Toby Zerner
ae69b6847f Remove sudo: false
See https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2018-11-21 18:27:12 +10:30
Toby Zerner
37d2d29c8f Update README, CONTRIBUTING 2018-11-21 18:26:32 +10:30
Toby Zerner
bcad0426d7 Remove copyright year from LICENSE
So we don't have to worry about keeping it updated
2018-11-21 18:24:59 +10:30
Toby Zerner
7250e28700 Typehint Frontend extender arguments 2018-11-16 15:19:51 +10:30
Toby Zerner
d4bf453a5b Fix empty JS files not actually being empty 2018-11-16 15:17:57 +10:30
Daniël Klabbers
c9d36d6824 up the font-awesome dependency (#1642)
new version of components/font-awesome was tagged, let's up the minimum to allow for more icons:

https://packagist.org/packages/components/font-awesome
2018-11-14 17:12:27 +01:00
Toby Zerner
67f7b8d395 Only say that we're migrating an extension if it has migrations 2018-11-14 16:41:36 +10:30
Toby Zerner
ff22b8abdc Publish core assets when migrating 2018-11-14 16:41:07 +10:30
Toby Zerner
c9c9af195c Fix extension names not being displayed when running migrations 2018-11-14 16:28:00 +10:30