Just found out, that I no longer are able to browse all records, when using AddFilter with SPM. The problem is that when clicking "Show all", the first page shows just fine, but when moving on to page 2 - the view is reset to the default view.
Packages_init from hooks/Packages.php:
Code: Select all
function Packages_init(&$options, $memberInfo, &$args){
$options->FilterPage = 'hooks/Packages_filter.php';
$options->DefaultSortField = '`Packages`.`Priority` desc, `Packages`.`DateCreated` asc';
$options->DefaultSortDirection = '';
$SetFilter = true;
for ($i = 0; $i < 20; $i++) {
if($_POST['FilterField'][$i] || $_GET['FilterField'][$i]){
$SetFilter = false;
}
}
if($SetFilter == true){
addFilter(60, 'and', 15, 'equal-to', 'No');
addFilter(64, 'and', 14, 'not-equal-to', 'UAT');
addFilter(68, 'and', 14, 'not-equal-to', 'Completed');
}
return TRUE;
}
Best regards, Søren