mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 21:17:45 +02:00
fix: update condition in home controller to redirect to install page
This commit is contained in:
parent
eb74e81c3d
commit
33f1b91d55
1 changed files with 2 additions and 3 deletions
|
|
@ -18,10 +18,9 @@ class HomeController extends BaseController
|
||||||
{
|
{
|
||||||
public function index(): RedirectResponse | string
|
public function index(): RedirectResponse | string
|
||||||
{
|
{
|
||||||
$connections = \CodeIgniter\Database\Config::getConnections();
|
|
||||||
$db = db_connect();
|
$db = db_connect();
|
||||||
if ($connections === [] || ! $db->tableExists('podcasts')) {
|
if ($db->getDatabase() === '' || ! $db->tableExists('podcasts')) {
|
||||||
// Cannot connect to the database or cannot find the podcasts table
|
// Database connection has not been set or could not find the podcasts table
|
||||||
// Redirecting to install page because it is likely that Castopod Host has not been installed yet.
|
// Redirecting to install page because it is likely that Castopod Host has not been installed yet.
|
||||||
// NB: as base_url wouldn't have been defined here, redirect to install wizard manually
|
// NB: as base_url wouldn't have been defined here, redirect to install wizard manually
|
||||||
$route = Services::routes()->reverseRoute('install');
|
$route = Services::routes()->reverseRoute('install');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue