parent
a53fc2a53e
commit
24ee6d02c4
|
@ -77,7 +77,7 @@ if (!defined('PSM_INSTALL') || !PSM_INSTALL) {
|
||||||
if ($db->getDbHost() === null) {
|
if ($db->getDbHost() === null) {
|
||||||
// no config file has been loaded, redirect the user to the install
|
// no config file has been loaded, redirect the user to the install
|
||||||
header('Location: install.php');
|
header('Location: install.php');
|
||||||
trigger_error("Could not load config file. Redirect to install failed, <a href=\"install.php\">click here</a>.", E_USER_ERROR);
|
die();
|
||||||
}
|
}
|
||||||
// config file has been loaded, check if we have a connection
|
// config file has been loaded, check if we have a connection
|
||||||
if (!$db->status()) {
|
if (!$db->status()) {
|
||||||
|
@ -87,7 +87,7 @@ if (!defined('PSM_INSTALL') || !PSM_INSTALL) {
|
||||||
if (!psm_load_conf()) {
|
if (!psm_load_conf()) {
|
||||||
// unable to load from config table
|
// unable to load from config table
|
||||||
header('Location: install.php');
|
header('Location: install.php');
|
||||||
trigger_error("Could not load config table. Redirect to install failed, <a href=\"install.php\">click here</a>.", E_USER_ERROR);
|
die();
|
||||||
}
|
}
|
||||||
// config load OK, make sure database version is up to date
|
// config load OK, make sure database version is up to date
|
||||||
$installer = new \psm\Util\Install\Installer($db);
|
$installer = new \psm\Util\Install\Installer($db);
|
||||||
|
|
|
@ -226,7 +226,7 @@ class ConfigController extends AbstractController {
|
||||||
|
|
||||||
if ($language_refresh) {
|
if ($language_refresh) {
|
||||||
header('Location: '.psm_build_url(array('mod' => 'config'), true, false));
|
header('Location: '.psm_build_url(array('mod' => 'config'), true, false));
|
||||||
trigger_error("Redirect failed.", E_USER_ERROR);
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['general_submit'])) {
|
if (isset($_POST['general_submit'])) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ class UpdateController extends AbstractController {
|
||||||
header('Location: '.psm_build_url(array(
|
header('Location: '.psm_build_url(array(
|
||||||
'mod' => 'server_status'
|
'mod' => 'server_status'
|
||||||
), true, false));
|
), true, false));
|
||||||
trigger_error("Redirect failed.", E_USER_ERROR);
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class LoginController extends AbstractController {
|
||||||
if ($result) {
|
if ($result) {
|
||||||
// success login, redirect
|
// success login, redirect
|
||||||
header('Location: '.psm_build_url($_SERVER['QUERY_STRING']));
|
header('Location: '.psm_build_url($_SERVER['QUERY_STRING']));
|
||||||
trigger_error("Redirect failed.", E_USER_ERROR);
|
die();
|
||||||
} else {
|
} else {
|
||||||
$this->addMessage(psm_get_lang('login', 'error_login_incorrect'), 'error');
|
$this->addMessage(psm_get_lang('login', 'error_login_incorrect'), 'error');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue