CMS MADE SIMPLE FORGE

LISE

 

[#11136] "Filter system" values for active items only.

avatar
Created By: Darren Kierman (kierweb)
Date Submitted: 2016-08-27 13:46

Assigned To:
Resolution: None
State: Open
Summary:
"Filter system" values for active items only.
Detailed Description:
I had to change the coding within
modules/LISE/lib/class.LISEFielddefOperations.php to stop the filter drop downs
picking up values from disabled LISE items.

I had to change the $query statement in "LoadValuesForFieldDef" to

$query = "SELECT DISTINCT value FROM " . cms_db_prefix() . "module_" .
$mod->_GetModuleAlias() . "_fieldval AS v LEFT JOIN " . cms_db_prefix() .
"module_" . $mod->_GetModuleAlias() . "_item AS i ON v.item_id = i.item_id WHERE
active = 1 AND fielddef_id = ? GROUP BY value ASC";

A possible feature could be to add a flag to the {LISE} tag to allow either way
of working ... i.e. activeonly="1"

Thanks for listening!

Darren

History