Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
Also updated assets, Version number
  • Loading branch information
ssddanbrown committed Jul 2, 2017
2 parents 3903fda + 314d98a commit 67d9e24
Show file tree
Hide file tree
Showing 109 changed files with 2,156 additions and 454 deletions.
3 changes: 3 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function boot()
\Blade::directive('icon', function($expression) {
return "<?php echo icon($expression); ?>";
});

// Allow longer string lengths after upgrade to utf8mb4
\Schema::defaultStringLength(191);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
*/

'locale' => env('APP_LANG', 'en'),
'locales' => ['en', 'de', 'es', 'fr', 'nl', 'pt_BR', 'sk'],
'locales' => ['en', 'de', 'es', 'fr', 'nl', 'pt_BR', 'sk', 'ja'],

/*
|--------------------------------------------------------------------------
Expand Down
15 changes: 12 additions & 3 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
}
}

$mysql_host = env('DB_HOST', 'localhost');
$mysql_host_exploded = explode(':', $mysql_host);
$mysql_port = env('DB_PORT', 3306);
if (count($mysql_host_exploded) > 1) {
$mysql_host = $mysql_host_exploded[0];
$mysql_port = intval($mysql_host_exploded[1]);
}

return [

/*
Expand Down Expand Up @@ -70,12 +78,13 @@

'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'host' => $mysql_host,
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'port' => $mysql_port,
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false,
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UpdateDbEncodingToUt8mb4 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$database = DB::getDatabaseName();
$tables = DB::select('SHOW TABLES');
$pdo = DB::getPdo();
$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
$pdo->exec('ALTER DATABASE `'.$database.'` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
$key = 'Tables_in_' . $database;
foreach ($tables as $table) {
$tableName = $table->$key;
$pdo->exec('ALTER TABLE `'.$tableName.'` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
}
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$database = DB::getDatabaseName();
$tables = DB::select('SHOW TABLES');
$pdo = DB::getPdo();
$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
$pdo->exec('ALTER DATABASE `'.$database.'` CHARACTER SET utf8 COLLATE utf8_unicode_ci');
$key = 'Tables_in_' . $database;
foreach ($tables as $table) {
$tableName = $table->$key;
$pdo->exec('ALTER TABLE `'.$tableName.'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci');
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"axios": "^0.16.1",
"babel-preset-es2015": "^6.24.1",
"clipboard": "^1.5.16",
"codemirror": "^5.26.0",
"dropzone": "^4.0.1",
"gulp-util": "^3.0.8",
"markdown-it": "^8.3.1",
Expand Down
2 changes: 1 addition & 1 deletion public/css/export-styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/styles.css

Large diffs are not rendered by default.

47 changes: 29 additions & 18 deletions public/js/common.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions public/libs/highlightjs/highlight.min.js

This file was deleted.

12 changes: 6 additions & 6 deletions public/libs/tinymce/license.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999

Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand All @@ -10,7 +10,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand Down Expand Up @@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library or other
Expand Down Expand Up @@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

NO WARRANTY
NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
Expand All @@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

Expand Down
2 changes: 1 addition & 1 deletion public/libs/tinymce/plugins/advlist/plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/libs/tinymce/plugins/anchor/plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/libs/tinymce/plugins/autolink/plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 67d9e24

Please sign in to comment.