This commit is contained in:
origami11 2017-06-22 16:09:05 +03:00
commit 0f3d83c26a
6 changed files with 8 additions and 12 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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"');

View file

@ -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

View file

@ -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 . "'");
}
}