From 4ac027b8ee58b57cc8c73e6804e3fe34e84df792 Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Tue, 23 Jan 2024 18:12:29 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=9D=D0=B5=D0=B8=D1=81=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=B7=D1=83=D0=B5=D0=BC=D1=8B=D0=B9=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/Component.php | 2 +- src/Form/Select.php | 2 +- src/View/Plain.php | 2 +- src/View/Top.php | 30 ++---------------------------- 4 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/Controller/Component.php b/src/Controller/Component.php index 92aea5b..39308a8 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -219,7 +219,7 @@ class Component /** * Генерация интерфейса для выбора галлереи фотографии */ - public function setParameters($view/*: Composite*/, $options = null) + public function setParameters(Composite $view, $options = null) { $form = new Form(); diff --git a/src/Form/Select.php b/src/Form/Select.php index 3a4ec2c..44d26f4 100644 --- a/src/Form/Select.php +++ b/src/Form/Select.php @@ -8,7 +8,7 @@ class Select extends Field public $options = array(); public function __construct ($input, $factory) { - parent::__construct($input, $factory); + parent::__construct($input); if ($factory != null) { $factory->create($this, $input); diff --git a/src/View/Plain.php b/src/View/Plain.php index fae072c..5ffb102 100644 --- a/src/View/Plain.php +++ b/src/View/Plain.php @@ -8,7 +8,7 @@ */ namespace ctiso\View; -class Plain +class Plain extends \stdClass { protected $document; protected $values = array(); diff --git a/src/View/Top.php b/src/View/Top.php index f27e44e..4779624 100644 --- a/src/View/Top.php +++ b/src/View/Top.php @@ -28,32 +28,6 @@ class Top extends Composite return false; } - private function groupFiles(array $list, $debugMode = true) - { - $debug = ($debugMode) ? 'debug=1' : ''; - $path = parse_url($this->config->get('system', 'web'), PHP_URL_PATH); - - $groups = array(); - $use = array(); - - $result = array(); - foreach ($list as $file) { - $name = $this->findGroup($groups, $file); - if ($name) { - $use[$name] = 1; - } else { - $result[] = $file; - } - } - $list = array(); - foreach ($use as $name => $value) { - $list[] = $groups[$name]; - } - - return array_merge($list, $result); - } - - function getId($pref) { $this->mid++; @@ -72,8 +46,8 @@ class Top extends Composite // Скрипты и стили $this->set('scriptstring', $this->getScriptRaw()); - $this->set('scripts', array_unique($this->groupFiles($this->getScripts(), false))); - $this->set('stylesheet', array_unique($this->groupFiles($this->getStyleSheet(), false))); + $this->set('scripts', array_unique($this->getScripts())); + $this->set('stylesheet', array_unique($this->getStyleSheet())); $this->require = array('admin' => 'ma'); $this->deps = array();