Issue Feature Closed

#23493adding second parameter to $hookObj->execFinalQuery_idList

Adrian Föder 09/02/10, 09:55 updated 07/09/13, 09:44

Description

in extension’s pi class, there are the lines

// Calling hook for alternative creation of page ID list
if ($hookObj = $this->hookRequest(‘execFinalQuery_idList’)) {
$page_where = $hookObj->execFinalQuery_idList($list);
}

It would be very useful to add ‘$page_join’ as second parameter, so that it reads

$page_where = $hookObj->execFinalQuery_idList($list, $page_join);

The second parameter then could be passed by reference and modified at the hook’s inside function.
It makes sense to allow not only the modification of $page_where but also $page_join.

Another possibility to make sure downward compatibility could be something like

$hookRet = $hookObj->execFinalQuery_idList($list);
if(is_array($hookRet)) {
list($page_where, $page_join) = $hookRet
} else {
$page_where = $hookRet;
}

Best,
Adrian

(issue imported from #M15623)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.