Feature #16634
closedHook-Request for typo3/class.db_list.inc
0%
Description
Hello,
with the release of typo3_src-4.0 we have enhanced the service-table in extension 'civserv' with ws_versioning.
Therefore have introduced a hook in typo3/class.db_list.inc in the makeQueryArray subroutine. We would now like to ask for this hook to be added to the official TYPO3 distribution.
I include a patch for the hook
diff -u -r -N class.db_list.inc class.db_list.user > patch-typo3_db_list_inc-typo3_db_list_user-4.0.2
Further explanation:
In the civserv-extension service-records can be related to position-records.
I.E. an be_editor determines who will displayed in FE as a contact person for a given service the community is offering to the public.
Service-records are versioned while position-records are not. (This may be compared to news and categories in the tt_news-extension) We use the hook in the BE in order to display the list of positions (contact persons) related to the services (or versions of services!) in a workspace.
Kind regards!
britta
citeq
(issue imported from #M4361)
Files
Updated by Michael Stucki about 18 years ago
Sorry, I was just going to publish this patch for review when I realized that the attached file contains the wrong patch. This is a duplicate of #15425 (hook in t3lib_TCEmain) but what you are requesting is a hook in typo3/class.db_list.inc.
Please upload the correct patch again.
Updated by citeq about 18 years ago
Added the correct patch:
patch-typo3_db_list_inc-typo3_db_list_user-4.0.2
thanx
britta
Updated by Michael Stucki about 18 years ago
I had a look at it but propose a few changes:
- Rename the hook to "makeQueryArray_post" so it is clear where it is executed in the code.
- Move hook position down which makes it possible to change the query as such (e.g. 'GROUPBY' => '' is hardcoded and could not be changed otherwise).
- Send parameters directly, compile autogenerated values into an additional $_params array.
See bug_4361.diff for details.
Updated by citeq about 18 years ago
Hello Michael,
thank you for the proposal. I am going to rewrite the hook in the proposed way.
Only I wonder if a problem might arise with 'call-time pass-by-reference'?
$hookObj->makeQueryArray_post(&$queryParts, $this, $table, $id, $addWhere, $fieldList, $_params);
Could it be changed to:
$hookObj->makeQueryArray_post($queryParts, $this, $table, $id, $addWhere, $fieldList, $_params);
and then the hook-function makeQueryArray_post will do the reference bit?
kind regards
britta