BLOB

Modify views filter

If you need to modify views filter from your module, e.g when changing settings to a content type, you maybe whant a CCK autocomplete filed to be filtered as well.


/**
* Change views filter according to saved settings
*
* Thank heaven when you can manipulate views arguments in autocomplete CCK :-)
*
*/
function _save_allowed_node_types($node_types) {

$set_types = array();
foreach ($node_types as $key => $value) {
if ($value != "0") {
$set_types[$key] = $value;
}
}

$get_view = db_query('SELECT vid FROM {views_view}