Improve some error messages, add missing "use"
This commit is contained in:
parent
616cf82516
commit
ba8b16d5ed
3 changed files with 8 additions and 6 deletions
|
@ -27,6 +27,8 @@
|
|||
|
||||
namespace Baikal\Model;
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
class User extends \Flake\Core\Model\Db {
|
||||
const DATATABLE = "users";
|
||||
const PRIMARYKEY = "id";
|
||||
|
@ -281,7 +283,7 @@ class User extends \Flake\Core\Model\Db {
|
|||
function getPasswordHashForPassword($sPassword) {
|
||||
|
||||
try {
|
||||
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "system.yaml");
|
||||
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "config.yaml");
|
||||
} catch(\Exception $e) {}
|
||||
|
||||
return md5($this->get("username") . ':' . $config['parameters']['BAIKAL_AUTH_REALM'] . ':' . $sPassword);
|
||||
|
|
|
@ -257,19 +257,19 @@ class Framework extends \Flake\Core\Framework {
|
|||
protected static function initDbMysql(array $config) {
|
||||
|
||||
if (!$config['parameters']['PROJECT_DB_MYSQL_HOST']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_HOST, containing the MySQL host name, is not set.<br />You should set it in Specific/config.system.php</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_HOST, containing the MySQL host name, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
}
|
||||
|
||||
if (!$config['parameters']['PROJECT_DB_MYSQL_DBNAME']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_DBNAME, containing the MySQL database name, is not set.<br />You should set it in Specific/config.system.php</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_DBNAME, containing the MySQL database name, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
}
|
||||
|
||||
if (!$config['parameters']['PROJECT_DB_MYSQL_USERNAME']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_USERNAME, containing the MySQL database username, is not set.<br />You should set it in Specific/config.system.php</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_USERNAME, containing the MySQL database username, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
}
|
||||
|
||||
if (!$config['parameters']['PROJECT_DB_MYSQL_PASSWORD']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_PASSWORD, containing the MySQL database password, is not set.<br />You should set it in Specific/config.system.php</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_PASSWORD, containing the MySQL database password, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
2
Makefile
2
Makefile
|
@ -31,4 +31,4 @@ composer.lock: composer.json
|
|||
|
||||
clean:
|
||||
# Wipe out all local data, and go back to a clean install
|
||||
rm Specific/config.php Specific/config.system.php Specific/db/db.sqlite; true
|
||||
rm config/config.yaml config/system.yaml Specific/db/db.sqlite; true
|
||||
|
|
Loading…
Reference in a new issue