|
@@ 4834-4838 (lines=5) @@
|
| 4831 |
|
if ($tvsort != '') { |
| 4832 |
|
$tvsort = 'tv.' . implode(',tv.', array_filter(array_map('trim', explode(',', $tvsort)))); |
| 4833 |
|
} |
| 4834 |
|
if ($tvidnames == "*") { |
| 4835 |
|
$query = "tv.id<>0"; |
| 4836 |
|
} else { |
| 4837 |
|
$query = (is_numeric($tvidnames[0]) ? "tv.id" : "tv.name") . " IN ('" . implode("','", $tvidnames) . "')"; |
| 4838 |
|
} |
| 4839 |
|
|
| 4840 |
|
$this->getUserDocGroups(); |
| 4841 |
|
|
|
@@ 5011-5015 (lines=5) @@
|
| 5008 |
|
$fields = ($fields == '') ? 'tv.*' : 'tv.' . implode(',tv.', array_filter(array_map('trim', explode(',', $fields)))); |
| 5009 |
|
$sort = ($sort == '') ? '' : 'tv.' . implode(',tv.', array_filter(array_map('trim', explode(',', $sort)))); |
| 5010 |
|
|
| 5011 |
|
if ($idnames == '*') { |
| 5012 |
|
$query = 'tv.id<>0'; |
| 5013 |
|
} else { |
| 5014 |
|
$query = (is_numeric($idnames[0]) ? 'tv.id' : 'tv.name') . " IN ('" . implode("','", $idnames) . "')"; |
| 5015 |
|
} |
| 5016 |
|
|
| 5017 |
|
$rs = $this->getDatabase()->select("{$fields}, IF(tvc.value != '', tvc.value, tv.default_text) as value", $this->getDatabase()->getFullTableName('site_tmplvars') . " tv |
| 5018 |
|
INNER JOIN " . $this->getDatabase()->getFullTableName('site_tmplvar_templates') . " tvtpl ON tvtpl.tmplvarid = tv.id |