| @@ 73-80 (lines=8) @@ | ||
| 70 | ->fromPrefix('system_tplfile', 'f') |
|
| 71 | ->where($eb->eq('f.tpl_id', ':tplid')) |
|
| 72 | ->setParameter(':tplid', $id, \PDO::PARAM_INT); |
|
| 73 | } else { |
|
| 74 | $qb->select('f.*') |
|
| 75 | ->addSelect('s.tpl_source') |
|
| 76 | ->fromPrefix('system_tplfile', 'f') |
|
| 77 | ->leftJoinPrefix('f', 'system_tplsource', 's', $eb->eq('s.tpl_id', 'f.tpl_id')) |
|
| 78 | ->where($eb->eq('f.tpl_id', ':tplid')) |
|
| 79 | ->setParameter(':tplid', $id, \PDO::PARAM_INT); |
|
| 80 | } |
|
| 81 | $result = $qb->execute(); |
|
| 82 | if (!$result) { |
|
| 83 | return $tplfile; |
|
| @@ 309-317 (lines=9) @@ | ||
| 306 | ||
| 307 | $ret = array(); |
|
| 308 | ||
| 309 | if (!$getsource) { |
|
| 310 | $qb->select('*') |
|
| 311 | ->fromPrefix('system_tplfile', 'f'); |
|
| 312 | } else { |
|
| 313 | $qb->select('f.*') |
|
| 314 | ->addSelect('s.tpl_source') |
|
| 315 | ->fromPrefix('system_tplfile', 'f') |
|
| 316 | ->leftJoinPrefix('f', 'system_tplsource', 's', $eb->eq('s.tpl_id', 'f.tpl_id')); |
|
| 317 | } |
|
| 318 | if (isset($criteria) && ($criteria instanceof CriteriaElement)) { |
|
| 319 | $criteria->renderQb($qb); |
|
| 320 | } |
|