Actions
Feature #19113
closedEnable USER object to become USER_INT on the fly
Start date:
2008-07-16
Due date:
% Done:
0%
Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:
Description
Sometimes USER objects need to become USER_INT. The attached patch makes it possible.
USER object now can call a method of tslib_cObj to convert themselves from USER to USER_INT. Any existing output will be discarded and they will be called again as a USER_INT object. Here is code example:
if ($this->cObj->getUserObjType() == tslib_cObj::OT_USER) { $content = 'I am running as USER object now.'; if (!$this->conf['allowCaching']) { $this->cObj->convertToUSER_INT(); return ''; } } else { $content .= 'I am running as USER_INT right now'; }
Extension can (and should!) check if it is running as USER or USER_INT. Additionally extensions must have "includeLibs" just like any other USER_INT in their TS setup. But they must be declared as USER.
Patch and test extension are attached.
(issue imported from #M8985)
Files
Actions