[TYPO3-core] RFC: Bug #7096: Consistent interface for AJAX calls in the TYPO3 Backend
Benjamin Mack
mack at xnos.org
Tue Jan 8 16:44:09 CET 2008
Hey Ingo,
Ingo Renner wrote:
> * rename TYPO3AJAX->output() to ...->render()
will fix in final commit.
> * either make TYPO3_AJAX a variable or remove the part in init.php where
> you define it as false
> -- reason: constants are "constant" and don't change/have different
> values, you still check for a "true" TYPO3AJAX constant, if you want it
> to be true or false, use a (global) variable
Well, I have to say "no" to that one. Reasons:
a) Similar thing used in init.php already to define the request in CLI
mode, and I think we could see the AJAX mode similar to the CLI mode (a
"special" request).
from init.php: "if (defined('TYPO3_cliMode') && TYPO3_cliMode)"
Right now, this checks if the constant is defined and if defined, if it
is set. Well, it is probably always set if defined. So, I take it a bit
further and define it with every request, so I only have to check if it
is set.
b) it's not a variable. It should be (and is right now) constant for one
whole request, it just get's defined either in ajax.php or in init.php.
So, the reason why I define it in init.php() is that is defined all the
time at some point.
c) I don't want people to override this setting if it would be a global
variable, it should be fixed.
d) I could still be swung over to name the constant "TYPO3_ajaxMode" to
make it similar to the TYPO3_cliMode.
and: still no +1 ?
--
greetings,
benni.
-SDG-
www.xnos.de // www.xnos.org
More information about the TYPO3-team-core
mailing list