Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
#108 Bugfix: Class PDO not found
Browse files Browse the repository at this point in the history
Fixes #108
  • Loading branch information
oranges13 committed Nov 21, 2019
1 parent d81c3a6 commit 9307afe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions application/app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php namespace App\Providers;

use App\Server;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Schema;
use \Carbon\Carbon;
use PDO;

class AppServiceProvider extends ServiceProvider {

Expand All @@ -25,7 +27,7 @@ public function boot()
}

if(Schema::connection('local')->hasTable('servers')) {
$servers = \App\Server::get();
$servers = Server::get();

foreach ($servers as $server) {
Config::set('database.connections.'.$server->id.'.driver', 'mysql');
Expand All @@ -37,7 +39,7 @@ public function boot()
Config::set('database.connections.'.$server->id.'.collation', 'utf8_unicode_ci');
Config::set('database.connections.'.$server->id.'.charset', 'utf8');
Config::set('database.connections.'.$server->id.'.prefix', $server->db_prefix);
if(isset($server->db_ssl)) {
if(isset($server->db_ssl) && $server->db_ssl === 1) {
Config::set('database.connections.'.$server->id.'.options', array(
PDO::MYSQL_ATTR_SSL_CA => $server->db_ca,
PDO::MYSQL_ATTR_SSL_CERT => $server->db_cert,
Expand Down
2 changes: 1 addition & 1 deletion application/resources/assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $(document).ready(function() {

function checkUpdates() {

$.get('https://ftbastler.github.io/BoNeMEAL/updates.json', function(json) {
$.get('https://raw.githubusercontent.com/ftbastler/BoNeMEAL/master/updates.json', function(json) {
$('#update').html('<h3>' + json['title'] + '</h3><p>' + json['body'] + '</p><p><a href="https://github.com/ftbastler/BoNeMEAL/releases" class="btn btn-default">' + 'Download now!' + '</a></p>');
}).fail(function() {
$('#update').html('Error. Could not load updates.');
Expand Down
4 changes: 4 additions & 0 deletions updates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "BoNeMEAL v1.4.1",
"body": "<strong>SSL Mysql Connection Support</strong><br>Allows you to connect to MySQL servers that require SSL connections.<br>Various Bugfixes."
}

0 comments on commit 9307afe

Please sign in to comment.