Merge branch 'master' of http://gitlab.edu.yar.ru/composer/PHP_Library
This commit is contained in:
commit
0f3d83c26a
6 changed files with 8 additions and 12 deletions
|
|
@ -81,7 +81,7 @@ class Connection_HttpRequest
|
|||
$port = ($this->proxy_port) ? $this->proxy_port : $this->port;
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
$socket = fsockopen($host, $port, $errno, $errstr, 30);
|
||||
$socket = @fsockopen($host, $port, $errno, $errstr, 30);
|
||||
if (is_resource($socket)) {
|
||||
$header = $this->getHeader();
|
||||
fwrite($socket, $header);
|
||||
|
|
|
|||
|
|
@ -318,11 +318,7 @@ class Controller_Component
|
|||
}
|
||||
|
||||
function addRequireJsPath($name, $path, $shim = null) {
|
||||
global $requireJsConfig;
|
||||
$requireJsConfig['paths'][$name] = $path;
|
||||
if ($shim) {
|
||||
$requireJsConfig['shim'][$name] = $shim;
|
||||
}
|
||||
Controller_Site::addRequireJsPath($name, $path, $shim);
|
||||
}
|
||||
|
||||
function actionIndex(/*.ComponentRequest.*/ $request) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Database extends PDO
|
|||
{
|
||||
|
||||
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']);
|
||||
if ($dsn['phptype'] == 'pgsql') {
|
||||
$connection->query('SET client_encoding="UTF-8"');
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ class Filter_Authorization {
|
|||
}
|
||||
$hash = self::getBrowserSign();
|
||||
// Если $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]) {
|
||||
// UserAccess::getUserById($_SESSION ['access']); // Поиск по идентификатору
|
||||
return true;
|
||||
|
|
@ -25,8 +25,8 @@ class Filter_Authorization {
|
|||
static function enter($id)
|
||||
{
|
||||
// $db->executeQuery("UPDATE visitor SET sid = '' WHERE id_visitor = " . $result->getInt('id_user'));
|
||||
session_register("access");
|
||||
session_register("time");
|
||||
// session_register("access");
|
||||
// session_register("time");
|
||||
|
||||
// $_SESSION ["group"] = $result->getInt('access');
|
||||
$_SESSION ["access"] = $id; // id_user
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class Validator_Validator
|
|||
$ruleObj->$p_name = $p_value;
|
||||
}
|
||||
$this->addRule($ruleObj);
|
||||
} else {
|
||||
} else if (!empty($rule)) {
|
||||
throw new Exception('Unknown validation rule "' . $rule . "'");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue