1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

#2606 - Downloads RSS feed userclass check

Now checks against the userclasses of the user (when logged in) or guest.

If not logged in, returns public/guest items, otherwise use classes of logged in user.
This commit is contained in:
Tijn Kuyper 2019-10-23 12:21:05 +02:00
parent 7f720dfad1
commit 430dd50559
No known key found for this signature in database
GPG Key ID: AAEA3CC2C5A308F2

View File

@ -60,8 +60,8 @@ if (!defined('e107_INIT')) { exit; }
$topic = "";
}
$path='';
$class_list = "0,251,252,253";
$query = "SELECT d.*, dc.* FROM #download AS d LEFT JOIN #download_category AS dc ON d.download_category = dc.download_category_id WHERE {$topic} d.download_active > 0 AND d.download_class IN (".$class_list.") ORDER BY d.download_datestamp DESC LIMIT 0,".$this -> limit;
//$class_list = "0,251,252,253";
$query = "SELECT d.*, dc.* FROM #download AS d LEFT JOIN #download_category AS dc ON d.download_category = dc.download_category_id WHERE {$topic} d.download_active > 0 AND d.download_class IN (".USERCLASS_LIST.") ORDER BY d.download_datestamp DESC LIMIT 0,".$this -> limit;
$sql -> db_Select_gen($query);
// $sql->db_Select("download", "*", "{$topic} download_active > 0 AND download_class IN (".$class_list.") ORDER BY download_datestamp DESC LIMIT 0,".$this -> limit);