fix Database connection [default] not configured

This commit is contained in:
xiaomlove
2022-06-12 21:32:15 +08:00
parent 43156f7fc5
commit 024ef8b665
4 changed files with 5 additions and 5 deletions

View File

@@ -680,7 +680,7 @@ class TrackerRepository extends BaseRepository
$log .= "[SP_STATE_REAL]: $spStateReal";
$promotionInfo = apply_filter('torrent_promotion', $torrent->toArray());
do_log("promotionInfo from filter torrent_promotion by torrent: " . $torrent->id . ", get : " . json_encode($promotionInfo));
if ($promotionInfo['sp_state'] != $spStateReal) {
if (isset($promotionInfo['__ignore_global_sp_state']) && $promotionInfo['sp_state'] != $spStateReal) {
$spStateReal = $promotionInfo['sp_state'];
$log .= "[CHANGE_SP_STATE_REAL_BY_FILTER_TORRENT_PROMOTION]: $spStateReal";
}

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.14');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-06-11');
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.15');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-06-12');
defined('IN_TRACKER') || define('IN_TRACKER', true);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

View File

@@ -4059,7 +4059,7 @@ function get_category_row($catid = NULL)
{
global $Cache;
static $rows;
if (!$rows && !$rows = $Cache->get_value('category_content')){
if (!$rows && !$rows = (array)$Cache->get_value('category_content')){
$res = sql_query("SELECT categories.*, searchbox.name AS catmodename FROM categories LEFT JOIN searchbox ON categories.mode=searchbox.id");
while($row = mysql_fetch_array($res)) {
$rows[$row['id']] = $row;

View File

@@ -290,7 +290,7 @@ class NexusDB
public static function table($table): \Illuminate\Database\Query\Builder
{
if (IN_NEXUS) {
return Capsule::table($table);
return Capsule::table($table, null, self::ELOQUENT_CONNECTION_NAME);
}
return DB::table($table);
}