fix settings controllers and models
This commit is contained in:
parent
65ab7a4b1b
commit
0442f8a9a6
|
@ -5,10 +5,10 @@
|
|||
#####################
|
||||
# RASPISMS SETTINGS #
|
||||
#####################
|
||||
$bdd = descartes\Model::connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||
$bdd = \descartes\Model::_connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||
$internal_setting = new \controllers\internals\Setting($bdd);
|
||||
|
||||
$settings = $internal_setting->all();
|
||||
$settings = $internal_setting->get_all();
|
||||
foreach ($settings as $setting)
|
||||
{
|
||||
define('RASPISMS_SETTINGS_' . mb_convert_case($setting['name'], MB_CASE_UPPER), $setting['value']);
|
||||
|
|
|
@ -26,9 +26,9 @@ namespace controllers\internals;
|
|||
*
|
||||
* @return array || false
|
||||
*/
|
||||
public function all()
|
||||
public function get_all()
|
||||
{
|
||||
return $this->model_setting->all();
|
||||
return $this->model_setting->get_all();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,8 +29,6 @@ namespace controllers\publics;
|
|||
$bdd = \descartes\Model::_connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||
|
||||
$this->internal_user = new \controllers\internals\User($bdd);
|
||||
|
||||
\controllers\internals\Tool::verifyconnect();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
#####################
|
||||
# RASPISMS SETTINGS #
|
||||
#####################
|
||||
$bdd = descartes\Model::connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||
$bdd = \descartes\Model::_connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||
$internal_setting = new \controllers\internals\Setting($bdd);
|
||||
|
||||
$settings = $internal_setting->all();
|
||||
$settings = $internal_setting->get_all();
|
||||
foreach ($settings as $setting)
|
||||
{
|
||||
define('RASPISMS_SETTINGS_' . mb_convert_case($setting['name'], MB_CASE_UPPER), $setting['value']);
|
||||
|
|
|
@ -20,9 +20,9 @@ namespace models;
|
|||
/**
|
||||
* Return array of all settings.
|
||||
*/
|
||||
public function all(): array
|
||||
public function get_all(): array
|
||||
{
|
||||
return $this->_select('setting', [], '', false);
|
||||
return $this->_select('setting');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue