Project

General

Profile

Actions

Bug #22994

closed

Database context in userFunc

Added by Björn Jacob over 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

It seams when using cObject USER the userfunc doesn't respect the database context. I've got the following TS snippet:

foo = USER
foo {
userFunc = user_bar_userfuncs->user_bar_numberFormat
titleField = TEXT
titleField.field = title
}

Within the userFunc I'm having the following code:
$titleField = $local_cObj->cObjGetSingle($conf['titleField'], $conf['titleField.']);

The script is expected to return the uid of the content element respectively the tt_news uid. But it returns the page uid. This is a strange behaviour. Quite often I'm having this problem. So I'm suggesting the following.

Is it possible to extend the functionality of .field? It would be great if one could write something like .field = tableName.fieldName. This would help to get the data from the expected table.

What do you think?

(issue imported from #M14862)

Actions

Also available in: Atom PDF