diff --git a/Changelog b/Changelog index 9f42f629f..7bf2c6086 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2017-09-01 DariusIII + * Chg: Update value fetching and autoloading * Chg: Update database connection settings * Chg: Update Movie class * Chg: Remove now unused nntmux/db/Settings class diff --git a/app/Models/Settings.php b/app/Models/Settings.php index fe40dc396..b3dc1530d 100644 --- a/app/Models/Settings.php +++ b/app/Models/Settings.php @@ -215,8 +215,8 @@ class Settings extends Model { $setting = self::settingToArray($setting); $result = self::query()->where([ - 'section' => $setting['section'], - 'subsection' => $setting['subsection'], + 'section' => $setting['section'] ?? '', + 'subsection' => $setting['subsection'] ?? '', 'name' => $setting['name'], ])->value('value'); diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 9454a2638..79c3248f4 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -3,6 +3,7 @@ require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'nntmux'.DIRECTORY_SEPARATOR.'constants.php'; require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'nntmux'.DIRECTORY_SEPARATOR.'bootstrap.php'; require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'nntmux.php'; +require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php'; require_once __DIR__.DIRECTORY_SEPARATOR.'yenc.php'; require __DIR__.DIRECTORY_SEPARATOR.'app.php'; @@ -20,6 +21,4 @@ if (! defined('NN_ROOT')) { define('NN_ROOT', dirname(NN_APP_PATH, 2)); } -require_once NN_ROOT.DS.'vendor'.DS.'autoload.php'; - $app->make(Kernel::class)->bootstrap(); diff --git a/nntmux/db/DB.php b/nntmux/db/DB.php index e7a050523..e7c38936a 100755 --- a/nntmux/db/DB.php +++ b/nntmux/db/DB.php @@ -117,7 +117,7 @@ class DB extends \PDO 'dbname' => env('DB_NAME', 'nntmux'), 'dbpass' => env('DB_PASSWORD', 'nntmux'), 'dbport' => env('DB_PORT', '3306'), - 'dbsock' => env('DB_SOCKET'), + 'dbsock' => env('DB_SOCKET', ''), 'dbtype' => env('DB_SYSTEM', 'mysql'), 'dbuser' => env('DB_USER', 'nntmux'), 'log' => new ColorCLI(), @@ -172,8 +172,6 @@ class DB extends \PDO if (defined('NN_SQL_DELETE_QUICK') && NN_SQL_DELETE_QUICK) { $this->DELETE_QUICK = ' QUICK '; } - - return $this->pdo; } public function __destruct()