mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Loop 에 사용되는 변수 한번만 호출하기
스킨의 loop로 인한 불필요한 쿼리 발생 방지 https://github.com/xpressengine/xe-core/pull/1711 를 보고 빠르게 만들어 보았습니다.
This commit is contained in:
parent
6745497ad7
commit
d1ada21087
1 changed files with 1 additions and 1 deletions
|
|
@ -509,7 +509,7 @@ class TemplateHandler
|
|||
{
|
||||
$expr_m[2] .= '=>' . trim($expr_m[3]);
|
||||
}
|
||||
$nodes[$idx - 1] .= "<?php if({$expr_m[1]}&&count({$expr_m[1]}))foreach({$expr_m[1]} as {$expr_m[2]}){ ?>";
|
||||
$nodes[$idx - 1] .= "<?php \$t" . abs($idx-1) . "={$expr_m[1]};if(\$t" . abs($idx-1) . "&&count(\$t" . abs($idx-1) . "))foreach(\$t" . abs($idx-1) . " as {$expr_m[2]}){ ?>";
|
||||
}
|
||||
elseif($expr_m[4])
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue