@@ -2224,11 +2224,11 @@ discard block |
||
2224 | 2224 | if (isset($this->snippetCache[$snip_name])) { |
2225 | 2225 | $snippetObject['name'] = $snip_name; |
2226 | 2226 | $snippetObject['content'] = $this->snippetCache[$snip_name]; |
2227 | - if (isset($this->snippetCache["{$snip_name}Props"])) { |
|
2228 | - if (!isset($this->snippetCache["{$snip_name}Props"])) { |
|
2229 | - $this->snippetCache["{$snip_name}Props"] = ''; |
|
2227 | + if (isset($this->snippetCache["{$snip_name}props"])) { |
|
2228 | + if (!isset($this->snippetCache["{$snip_name}props"])) { |
|
2229 | + $this->snippetCache["{$snip_name}props"] = ''; |
|
2230 | 2230 | } |
2231 | - $snippetObject['properties'] = $this->snippetCache["{$snip_name}Props"]; |
|
2231 | + $snippetObject['properties'] = $this->snippetCache["{$snip_name}props"]; |
|
2232 | 2232 | } |
2233 | 2233 | } elseif (substr($snip_name, 0, 1) === '@' && isset($this->pluginEvent[trim($snip_name, '@')])) { |
2234 | 2234 | $snippetObject['name'] = trim($snip_name, '@'); |
@@ -2253,7 +2253,7 @@ discard block |
||
2253 | 2253 | $snippetObject['content'] = $snip_content; |
2254 | 2254 | $snippetObject['properties'] = $snip_prop; |
2255 | 2255 | $this->snippetCache[$snip_name] = $snip_content; |
2256 | - $this->snippetCache["{$snip_name}Props"] = $snip_prop; |
|
2256 | + $this->snippetCache["{$snip_name}props"] = $snip_prop; |
|
2257 | 2257 | } |
2258 | 2258 | return $snippetObject; |
2259 | 2259 | } |
@@ -3569,7 +3569,7 @@ discard block |
||
3569 | 3569 | } |
3570 | 3570 | // build query |
3571 | 3571 | $access = ($this->isFrontend() ? "sc.privateweb=0" : "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0") . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
3572 | - $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc |
|
3572 | + $result = $this->db->select("distinct {$fields}", "{$tblsc} sc |
|
3573 | 3573 | LEFT JOIN {$tbldg} dg on dg.document = sc.id", "sc.parent = '{$id}' AND ({$access}) GROUP BY sc.id", "{$sort} {$dir}"); |
3574 | 3574 | $resourceArray = $this->db->makeArray($result); |
3575 | 3575 | $this->tmpCache[__FUNCTION__][$cacheKey] = $resourceArray; |
@@ -3606,7 +3606,7 @@ discard block |
||
3606 | 3606 | } |
3607 | 3607 | // build query |
3608 | 3608 | $access = ($this->isFrontend() ? "sc.privateweb=0" : "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0") . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
3609 | - $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc |
|
3609 | + $result = $this->db->select("distinct {$fields}", "{$tblsc} sc |
|
3610 | 3610 | LEFT JOIN {$tbldg} dg on dg.document = sc.id", "sc.parent = '{$id}' AND sc.published=1 AND sc.deleted=0 AND ({$access}) GROUP BY sc.id", "{$sort} {$dir}"); |
3611 | 3611 | $resourceArray = $this->db->makeArray($result); |
3612 | 3612 | |
@@ -3662,7 +3662,7 @@ discard block |
||
3662 | 3662 | $tblsc = $this->getFullTableName('site_content'); |
3663 | 3663 | $tbldg = $this->getFullTableName('document_groups'); |
3664 | 3664 | |
3665 | - $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc |
|
3665 | + $result = $this->db->select("distinct {$fields}", "{$tblsc} sc |
|
3666 | 3666 | LEFT JOIN {$tbldg} dg on dg.document = sc.id", "sc.parent = '{$parentid}' {$published} {$deleted} {$where} AND ({$access}) GROUP BY sc.id", ($sort ? "{$sort} {$dir}" : ""), $limit); |
3667 | 3667 | |
3668 | 3668 | $resourceArray = $this->db->makeArray($result); |
@@ -3728,7 +3728,7 @@ discard block |
||
3728 | 3728 | $tblsc = $this->getFullTableName('site_content'); |
3729 | 3729 | $tbldg = $this->getFullTableName('document_groups'); |
3730 | 3730 | |
3731 | - $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc |
|
3731 | + $result = $this->db->select("distinct {$fields}", "{$tblsc} sc |
|
3732 | 3732 | LEFT JOIN {$tbldg} dg on dg.document = sc.id", "(sc.id IN (" . implode(',', $ids) . ") {$published} {$deleted} {$where}) AND ({$access}) GROUP BY sc.id", ($sort ? "{$sort} {$dir}" : ""), $limit); |
3733 | 3733 | |
3734 | 3734 | $resourceArray = $this->db->makeArray($result); |
@@ -4320,7 +4320,7 @@ discard block |
||
4320 | 4320 | $template = $doc['content']; |
4321 | 4321 | break; |
4322 | 4322 | case 'SELECT': |
4323 | - $this->db->getValue($this->db->query("SELECT {$template}")); |
|
4323 | + $this->db->getValue($this->db->query("select {$template}")); |
|
4324 | 4324 | break; |
4325 | 4325 | default: |
4326 | 4326 | if (!($template = $this->getChunk($tpl))) { |