From cdf7527c4383f8cd28ff3c597640863a82a63fed Mon Sep 17 00:00:00 2001 From: Origami11 Date: Mon, 16 Nov 2020 14:46:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/Front.php | 1 + src/HttpRequest.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Controller/Front.php b/src/Controller/Front.php index af064ad..0d42d4d 100644 --- a/src/Controller/Front.php +++ b/src/Controller/Front.php @@ -56,6 +56,7 @@ class Controller_Front extends Controller_Action $module = $this->loadClass($moduleFile, null, 'Module_'); if ($module) { // Инициализация модуля + $module->front = $this; $module->viewPath = Shortcut::getUrl('modulepath', $name); $module->name = $name; diff --git a/src/HttpRequest.php b/src/HttpRequest.php index 7693177..d34accf 100644 --- a/src/HttpRequest.php +++ b/src/HttpRequest.php @@ -18,11 +18,12 @@ class HttpRequest extends Collection implements ArrayAccess */ public function __construct() { - $list = array ( + $list = [ 'data' => $_REQUEST, 'get' => $_GET, 'post' => $_POST, - 'cookie' => $_COOKIE); + 'cookie' => $_COOKIE + ]; $ajax = $this->isAjax(); foreach ($list as $key => $value) {