Поправил регистр

This commit is contained in:
origami11 2017-06-07 13:54:45 +03:00
parent 785da9007a
commit ebeb727717
3 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ class Database extends PDO
{ {
if ($dsn['phptype'] == 'pgsql' || $dsn['phptype'] == 'mysql') { if ($dsn['phptype'] == 'pgsql' || $dsn['phptype'] == 'mysql') {
$port = (isset($dsn['port'])) ? "port={$dsn['port']};" : ""; $port = (isset($dsn['port'])) ? "port={$dsn['port']};" : "";
/*.Database.*/$connection = new static("{$dsn['phptype']}:host={$dsn['hostspec']}; $port dbname={$dsn['database']}", $dsn['username'], $dsn['password']); /*.Database.*/$connection = new static("{$dsn['phptype']}:host={$dsn['hostspec']}; $port dbname={$dsn['database']}", $dsn['username'], $dsn['password']);
if ($dsn['phptype'] == 'pgsql') { if ($dsn['phptype'] == 'pgsql') {
$connection->query('SET client_encoding="UTF-8"'); $connection->query('SET client_encoding="UTF-8"');

View file

@ -10,8 +10,8 @@ class Filter_Authorization {
} }
$hash = self::getBrowserSign(); $hash = self::getBrowserSign();
// Если $hash не совпадает $_SESSION['hash'] то удаляем сессию // Если $hash не совпадает $_SESSION['hash'] то удаляем сессию
if (isset($_SESSION ['access']) && isset($_SESSION[self::SESSION_BROWSER_SIGN_KEYNAME])) { // print_r($_SESSION);
if (isset($_SESSION['access']) && isset($_SESSION[self::SESSION_BROWSER_SIGN_KEYNAME])) {
if ($hash == $_SESSION[self::SESSION_BROWSER_SIGN_KEYNAME]) { if ($hash == $_SESSION[self::SESSION_BROWSER_SIGN_KEYNAME]) {
// UserAccess::getUserById($_SESSION ['access']); // Поиск по идентификатору // UserAccess::getUserById($_SESSION ['access']); // Поиск по идентификатору
return true; return true;
@ -25,8 +25,8 @@ class Filter_Authorization {
static function enter($id) static function enter($id)
{ {
// $db->executeQuery("UPDATE visitor SET sid = '' WHERE id_visitor = " . $result->getInt('id_user')); // $db->executeQuery("UPDATE visitor SET sid = '' WHERE id_visitor = " . $result->getInt('id_user'));
session_register("access"); // session_register("access");
session_register("time"); // session_register("time");
// $_SESSION ["group"] = $result->getInt('access'); // $_SESSION ["group"] = $result->getInt('access');
$_SESSION ["access"] = $id; // id_user $_SESSION ["access"] = $id; // id_user