Skip to content

Commit

Permalink
Доработка ф-ии component
Browse files Browse the repository at this point in the history
  • Loading branch information
deniart committed Jan 27, 2015
1 parent 806ab88 commit 0d4967f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/modules/viewer/plugs/function.component.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ function smarty_function_component($aParams, &$oSmarty)
*/
$aComponentParams = array();
if (isset($aParams['params']) and is_array($aParams['params'])) {
$aComponentParams = $aParams['params'];
$aComponentParams = array_merge($aParams['params'], $aParams);

This comment has been minimized.

Copy link
@mzhelskiy

mzhelskiy Jan 27, 2015

Contributor

В $aComponentParams будут попадать служебные параметры типа "_default_short" и "component"

} else {
unset($aParams['component']);
unset($aParams['_default_short']);
unset($aParams['template']);
$aComponentParams = $aParams;
}
$aComponentParams['params'] = $aComponentParams;

This comment has been minimized.

Copy link
@mzhelskiy

mzhelskiy Jan 27, 2015

Contributor

Зачем дублировать самого себя?

/**
* Получаем путь до шаблона
*/
Expand Down

0 comments on commit 0d4967f

Please sign in to comment.