Skip to content

Commit

Permalink
fix(core): Fix strict sql_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
64j committed May 1, 2019
1 parent 8773ba0 commit 031ac61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/plugins/templatesedit/class/templatesedit.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ protected function getTemplateVariables()
}

$sql = $this->evo->db->select('
DISTINCT tv.*, IF(tvc.value!="",tvc.value,tv.default_text) as value', $this->evo->getFullTableName('site_tmplvars') . ' AS tv
DISTINCT tv.*, IF(tvc.value!="",tvc.value,tv.default_text) as value, tvtpl.rank', $this->evo->getFullTableName('site_tmplvars') . ' AS tv
INNER JOIN ' . $this->evo->getFullTableName('site_tmplvar_templates') . ' AS tvtpl ON tvtpl.tmplvarid = tv.id
LEFT JOIN ' . $this->evo->getFullTableName('site_tmplvar_contentvalues') . ' AS tvc ON tvc.tmplvarid=tv.id AND tvc.contentid="' . $this->doc['id'] . '"
LEFT JOIN ' . $this->evo->getFullTableName('site_tmplvar_access') . ' AS tva ON tva.tmplvarid=tv.id', 'tvtpl.templateid="' . $this->doc['template'] . '" AND (1="' . $_SESSION['mgrRole'] . '" OR ISNULL(tva.documentgroup)' . (!$docgrp ? '' : ' OR tva.documentgroup IN (' . $docgrp . ')') . ')', 'tvtpl.rank, tv.rank, tv.id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ protected function getDefaultCategories()
$sql = $this->evo->db->query('
SELECT *, category AS title
FROM ' . $this->evo->getFullTableName('categories') . '
ORDER BY rank, category
ORDER BY category
');

if ($this->evo->db->getRecordCount($sql)) {
Expand Down

0 comments on commit 031ac61

Please sign in to comment.