fix: Неиспользуемый код

This commit is contained in:
origami11@yandex.ru 2024-01-23 18:12:29 +03:00
parent c514d747b8
commit 4ac027b8ee
4 changed files with 5 additions and 31 deletions

View file

@ -219,7 +219,7 @@ class Component
/** /**
* Генерация интерфейса для выбора галлереи фотографии * Генерация интерфейса для выбора галлереи фотографии
*/ */
public function setParameters($view/*: Composite*/, $options = null) public function setParameters(Composite $view, $options = null)
{ {
$form = new Form(); $form = new Form();

View file

@ -8,7 +8,7 @@ class Select extends Field
public $options = array(); public $options = array();
public function __construct ($input, $factory) { public function __construct ($input, $factory) {
parent::__construct($input, $factory); parent::__construct($input);
if ($factory != null) { if ($factory != null) {
$factory->create($this, $input); $factory->create($this, $input);

View file

@ -8,7 +8,7 @@
*/ */
namespace ctiso\View; namespace ctiso\View;
class Plain class Plain extends \stdClass
{ {
protected $document; protected $document;
protected $values = array(); protected $values = array();

View file

@ -28,32 +28,6 @@ class Top extends Composite
return false; 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) function getId($pref)
{ {
$this->mid++; $this->mid++;
@ -72,8 +46,8 @@ class Top extends Composite
// Скрипты и стили // Скрипты и стили
$this->set('scriptstring', $this->getScriptRaw()); $this->set('scriptstring', $this->getScriptRaw());
$this->set('scripts', array_unique($this->groupFiles($this->getScripts(), false))); $this->set('scripts', array_unique($this->getScripts()));
$this->set('stylesheet', array_unique($this->groupFiles($this->getStyleSheet(), false))); $this->set('stylesheet', array_unique($this->getStyleSheet()));
$this->require = array('admin' => 'ma'); $this->require = array('admin' => 'ma');
$this->deps = array(); $this->deps = array();