Skip to content

Commit dbd9756

Browse files
committed
Оптимизации.
1 parent 76202a7 commit dbd9756

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/Subscribers/OnAfterSaveOptionsHandler.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Bitrix\Main\ArgumentNullException;
66
use Bitrix\Main\ArgumentOutOfRangeException;
7-
use ProklUng\Module\Boilerplate\Options\ModuleManager;
7+
use Proklung\Symfony\Router\Utils\OptionsManager;
88

99
/**
1010
* Class OnAfterSaveOptionsHandler
@@ -22,13 +22,11 @@ class OnAfterSaveOptionsHandler
2222
*/
2323
public function handler() : void
2424
{
25-
$moduleManager = new ModuleManager('proklung.symfony.router');
26-
27-
if ($moduleManager->get('php_router_config_path')
25+
if (OptionsManager::option('php_router_config_path')
2826
&&
29-
$moduleManager->get('native_config_file_path')
27+
OptionsManager::option('native_config_file_path')
3028
) {
31-
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/local/routes/' . $moduleManager->get('php_router_config_path');
29+
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/local/routes/' . OptionsManager::option('php_router_config_path');
3230
if (@file_exists($filePath)
3331
&& !$this->isFilesAreEqual($filePath, __DIR__ . '/../../configs/route_config_template.php.tmpl')) {
3432
@unlink($filePath . '.backup');

0 commit comments

Comments
 (0)