mirror of
https://github.com/flarum/core.git
synced 2025-09-04 05:25:37 +02:00
Compare commits
16 Commits
v0.1.0-bet
...
v0.1.0-bet
Author | SHA1 | Date | |
---|---|---|---|
|
bbe62f400f | ||
|
fc5977f86f | ||
|
796b57753d | ||
|
88e43cc694 | ||
|
6370f7ecff | ||
|
d9d7027ed0 | ||
|
1106a2e3a3 | ||
|
b7f666525c | ||
|
40dc6ac604 | ||
|
15e1a154e5 | ||
|
57d5846b64 | ||
|
fb6b51b1cf | ||
|
57f73c9638 | ||
|
7705a2b7d7 | ||
|
f591585d02 | ||
|
45afc33eb0 |
13
CHANGELOG.md
Normal file
13
CHANGELOG.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## [0.1.0-beta.8.1](https://github.com/flarum/core/compare/v0.1.0-beta.8...v0.1.0-beta.8.1)
|
||||
|
||||
### Fixed
|
||||
- Fix live output in `migrate:reset` command ([f591585](https://github.com/flarum/core/commit/f591585d02f8c4ff0211c5bf4413dd6baa724c05))
|
||||
- Fix search with database prefix ([7705a2b](https://github.com/flarum/core/commit/7705a2b7d751943ef9d0c7379ec34f8530b99310))
|
||||
- Fix invalid join time of admin user created by installer ([57f73c9](https://github.com/flarum/core/commit/57f73c9638eeb825f9e336ed3c443afccfd8995e))
|
||||
- Ensure InnoDB engine is used for all tables ([fb6b51b](https://github.com/flarum/core/commit/fb6b51b1cfef0af399607fe038603c8240800b2b))
|
||||
- Fix dropping foreign keys in `down` migrations ([57d5846](https://github.com/flarum/core/commit/57d5846b647881009d9e60f9ffca20b1bb77776e))
|
||||
- Fix discussion list scroll position not being maintained when hero is not visible ([40dc6ac](https://github.com/flarum/core/commit/40dc6ac604c2a0973356b38217aa8d09352daae5))
|
||||
- Fix empty meta description tag ([88e43cc](https://github.com/flarum/core/commit/88e43cc6940ee30d6529e9ce659471ec4fb1c474))
|
||||
- Remove empty attributes on `<html>` tag ([796b577](https://github.com/flarum/core/commit/796b57753d34d4ea741dbebcbc550b17808f6c94))
|
2
js/dist/forum.js
vendored
2
js/dist/forum.js
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js.map
vendored
2
js/dist/forum.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -102,7 +102,7 @@ export default class IndexPage extends Page {
|
||||
// previous hero. Maintain the same scroll position relative to the bottom
|
||||
// of the hero so that the sidebar doesn't jump around.
|
||||
const oldHeroHeight = app.cache.heroHeight;
|
||||
const heroHeight = app.cache.heroHeight = this.$('.Hero').outerHeight();
|
||||
const heroHeight = app.cache.heroHeight = this.$('.Hero').outerHeight() || 0;
|
||||
const scrollTop = app.cache.scrollTop;
|
||||
|
||||
$('#app').css('min-height', $(window).height() + heroHeight);
|
||||
|
@@ -47,10 +47,11 @@ return [
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('discussions', function (Blueprint $table) use ($schema) {
|
||||
$table->dropForeign([
|
||||
'user_id', 'last_posted_user_id', 'hidden_user_id',
|
||||
'first_post_id', 'last_post_id'
|
||||
]);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropForeign(['last_posted_user_id']);
|
||||
$table->dropForeign(['hidden_user_id']);
|
||||
$table->dropForeign(['first_post_id']);
|
||||
$table->dropForeign(['last_post_id']);
|
||||
|
||||
Migration::fixIndexNames($schema, $table);
|
||||
});
|
||||
|
@@ -37,7 +37,8 @@ return [
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('discussion_user', function (Blueprint $table) use ($schema) {
|
||||
$table->dropForeign(['user_id', 'discussion_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropForeign(['discussion_id']);
|
||||
|
||||
Migration::fixIndexNames($schema, $table);
|
||||
});
|
||||
|
@@ -37,7 +37,8 @@ return [
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('group_user', function (Blueprint $table) use ($schema) {
|
||||
$table->dropForeign(['user_id', 'group_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropForeign(['group_id']);
|
||||
|
||||
Migration::fixIndexNames($schema, $table);
|
||||
});
|
||||
|
@@ -41,7 +41,8 @@ return [
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('notifications', function (Blueprint $table) use ($schema) {
|
||||
$table->dropForeign(['user_id', 'from_user_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropForeign(['from_user_id']);
|
||||
|
||||
Migration::fixIndexNames($schema, $table);
|
||||
});
|
||||
|
@@ -43,10 +43,10 @@ return [
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('posts', function (Blueprint $table) use ($schema) {
|
||||
$table->dropForeign([
|
||||
'user_id', 'discussion_id',
|
||||
'edited_user_id', 'hidden_user_id'
|
||||
]);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropForeign(['discussion_id']);
|
||||
$table->dropForeign(['edited_user_id']);
|
||||
$table->dropForeign(['hidden_user_id']);
|
||||
|
||||
Migration::fixIndexNames($schema, $table);
|
||||
});
|
||||
|
@@ -71,11 +71,8 @@ class ResetCommand extends AbstractCommand
|
||||
|
||||
$this->info('Rolling back extension: '.$extensionName);
|
||||
|
||||
$notes = $this->manager->migrateDown($extension);
|
||||
|
||||
foreach ($notes as $note) {
|
||||
$this->info($note);
|
||||
}
|
||||
$this->manager->getMigrator()->setOutput($this->output);
|
||||
$this->manager->migrateDown($extension);
|
||||
|
||||
$this->info('DONE.');
|
||||
}
|
||||
|
@@ -25,7 +25,9 @@ class DatabaseServiceProvider extends AbstractServiceProvider
|
||||
$this->app->singleton('flarum.db', function () {
|
||||
$factory = new ConnectionFactory($this->app);
|
||||
|
||||
$connection = $factory->make($this->app->config('database'));
|
||||
$dbConfig = $this->app->config('database');
|
||||
$dbConfig['engine'] = 'InnoDB';
|
||||
$connection = $factory->make($dbConfig);
|
||||
$connection->setEventDispatcher($this->app->make('Illuminate\Contracts\Events\Dispatcher'));
|
||||
|
||||
return $connection;
|
||||
|
@@ -53,7 +53,7 @@ class FulltextGambit implements GambitInterface
|
||||
$query
|
||||
->addSelect('posts_ft.most_relevant_post_id')
|
||||
->join(
|
||||
new Expression('('.$subquery->toSql().') '.$grammar->wrap('posts_ft')),
|
||||
new Expression('('.$subquery->toSql().') '.$grammar->wrapTable('posts_ft')),
|
||||
'posts_ft.discussion_id', '=', 'discussions.id'
|
||||
)
|
||||
->addBinding($subquery->getBindings(), 'join')
|
||||
|
@@ -223,22 +223,24 @@ class ExtensionManager
|
||||
*
|
||||
* @param Extension $extension
|
||||
* @param bool|true $up
|
||||
* @return array Notes from the migrator.
|
||||
* @return void
|
||||
*/
|
||||
public function migrate(Extension $extension, $up = true)
|
||||
{
|
||||
if ($extension->hasMigrations()) {
|
||||
$migrationDir = $extension->getPath().'/migrations';
|
||||
if (! $extension->hasMigrations()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->bind('Illuminate\Database\Schema\Builder', function ($container) {
|
||||
return $container->make('Illuminate\Database\ConnectionInterface')->getSchemaBuilder();
|
||||
});
|
||||
$migrationDir = $extension->getPath().'/migrations';
|
||||
|
||||
if ($up) {
|
||||
$this->migrator->run($migrationDir, $extension);
|
||||
} else {
|
||||
$this->migrator->reset($migrationDir, $extension);
|
||||
}
|
||||
$this->app->bind('Illuminate\Database\Schema\Builder', function ($container) {
|
||||
return $container->make('Illuminate\Database\ConnectionInterface')->getSchemaBuilder();
|
||||
});
|
||||
|
||||
if ($up) {
|
||||
$this->migrator->run($migrationDir, $extension);
|
||||
} else {
|
||||
$this->migrator->reset($migrationDir, $extension);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ class Application extends Container implements ApplicationContract
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '0.1.0-beta.8';
|
||||
const VERSION = '0.1.0-beta.8.1';
|
||||
|
||||
/**
|
||||
* The base path for the Flarum installation.
|
||||
|
@@ -28,7 +28,7 @@ class Meta
|
||||
|
||||
$meta = [
|
||||
'viewport' => 'width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1',
|
||||
'description' => array_get($forumApiDocument, 'data.attributes.forumDescription'),
|
||||
'description' => array_get($forumApiDocument, 'data.attributes.description'),
|
||||
'theme-color' => array_get($forumApiDocument, 'data.attributes.themePrimaryColor')
|
||||
];
|
||||
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Flarum\Install\Console;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use Flarum\Console\AbstractCommand;
|
||||
use Flarum\Database\DatabaseMigrationRepository;
|
||||
@@ -238,6 +239,8 @@ class InstallCommand extends AbstractCommand
|
||||
|
||||
$factory = new ConnectionFactory($this->application);
|
||||
|
||||
$laravelDbConfig['engine'] = 'InnoDB';
|
||||
|
||||
$this->db = $factory->make($laravelDbConfig);
|
||||
$version = $this->db->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
|
||||
|
||||
@@ -294,7 +297,7 @@ class InstallCommand extends AbstractCommand
|
||||
'username' => $admin['username'],
|
||||
'email' => $admin['email'],
|
||||
'password' => (new BcryptHasher)->make($admin['password']),
|
||||
'joined_at' => time(),
|
||||
'joined_at' => Carbon::now(),
|
||||
'is_email_confirmed' => 1,
|
||||
]);
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<!doctype html>
|
||||
<html dir="{{ $direction }}" lang="{{ $language }}">
|
||||
<html @if ($direction) dir="{{ $direction }}" @endif
|
||||
@if ($language) lang="{{ $language }}" @endif>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ $title }}</title>
|
||||
|
Reference in New Issue
Block a user