From 53b531f85349d98b6090a22b798e17e2b75a9f96 Mon Sep 17 00:00:00 2001 From: "CORP\\phedor" Date: Thu, 15 Mar 2018 14:48:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/Action.php | 1 + src/Controller/Component.php | 5 ++--- src/Database.php | 3 ++- src/Database/PDOStatement.php | 2 -- src/Path.php | 2 +- src/Registry.php | 2 +- src/Validator/Validator.php | 2 +- src/tales.php | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Controller/Action.php b/src/Controller/Action.php index 5d2d13e..6045d5b 100644 --- a/src/Controller/Action.php +++ b/src/Controller/Action.php @@ -331,6 +331,7 @@ class Controller_Action if ($this->view instanceof View_View) { $this->view->assignValues($this->ctrlValues); + /*.Widgets_Widget.*/$node = null; foreach ($this->childNodes as $name => $node) { $node->make($this); $this->view->setView($name, $node->view); diff --git a/src/Controller/Component.php b/src/Controller/Component.php index c389198..efc3cdf 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -271,10 +271,9 @@ class Controller_Component if(class_exists("Controller_Site")){ //Если мы в CMS2 $instance = Controller_Site::getInstance(); $instance->componentsConfig[] = $editor; - }else{ + } else { global $componentsConfig; - $componentsConfig[] = $editor; - + $componentsConfig[] = $editor; } } diff --git a/src/Database.php b/src/Database.php index b08d864..415619d 100644 --- a/src/Database.php +++ b/src/Database.php @@ -1,6 +1,7 @@ require_once "Database/PDOStatement.php"; + /** * Класс оболочка для PDO для замены Creole */ @@ -81,7 +82,7 @@ class Database extends PDO /** * Извлекает из базы первый элемент по запросу */ - public function fetchOneArray($query,$values=null) + public function fetchOneArray($query, $values = null) { /*.Database_PDOStatement.*/$sth = $this->prepare($query); $prep = $this->prepareValues($values); diff --git a/src/Database/PDOStatement.php b/src/Database/PDOStatement.php index 0cbd058..1274e6e 100644 --- a/src/Database/PDOStatement.php +++ b/src/Database/PDOStatement.php @@ -1,7 +1,5 @@ +/// /** * http://www.patternsforphp.com/wiki/Registry diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index 0af90e3..c6d52f9 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -1,6 +1,6 @@ +/// /** * Проверка коллекции diff --git a/src/tales.php b/src/tales.php index 0d727e8..2c9bc91 100644 --- a/src/tales.php +++ b/src/tales.php @@ -48,7 +48,7 @@ function phptal_component ($expression) { $begin = floatval(microtime(true)); /*.Controller_Component.*/$component = null; - if(class_exists("Controller_Site")){ //Если мы в CMS2 + if (class_exists("Controller_Site")) { //Если мы в CMS2 $component = Controller_Site::loadComponent($expression); } else { global $db, $registry; // Иначе обращаемся к глобальным переменным