Mark-H/EvoGallery — Issue #33: Why renderGalleries() method uses parent field for selecting galleries by docId and excludeDocs?
Author: pavelzhila
Created: 2011-11-02 12:04:12+00:00
State: open

This is quite strange because it's imposible to include or exclude specific document.

if ($this->config['docId'] != '*' && !empty($this->config['docId']))
{
if (strpos($this->config['docId'], ',') !== false)
{
$docSelect = 'parent IN ('.explode(',', $this->config['docId']).')';
}
else
$docSelect = 'parent = ' . $this->config['docId'];
}
if ($this->config['excludeDocs'] > 0)
{
$excludeDocs = '';
if (strpos($this->config['excludeDocs'], ',') !== false)
{
$excludeDocs = 'parent NOT IN ('.explode(',', $this->config['excludeDocs']).')';
}
else
$excludeDocs .= 'parent != ' . $this->config['excludeDocs'];
if (!empty($docSelect))
$docSelect.= ' AND ';
$docSelect.= $excludeDocs;
}