[TYPO3-german] Template mit Subpart
Georg Rehfeld
georg.rehfeld at gmx.de
Sun Jun 17 19:47:31 CEST 2007
Hi Christian,
Christian Hensel wrote:
> damit hat es prima geklappt, habe es aber elicht modifiziert:
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
> '*',
> 'be_users',
> 'disable=1 and deleted=0'
> );
Du solltest besser _nicht_ 'disable=1 and deleted=0' benutzen, sondern
eben doch $this->cObj->enableFields('be_users'), weil die Methode eben
mehr tut, als immer diesen String zurückzuliefern. Kommentar der Methode
aus sysext/cms/tslib/class.tslib_content.php:
/*
* Returns a part of a WHERE clause which will filter out records with
* start/end times or hidden/fe_groups fields set to values that should
* de-select them according to the current time, preview settings or
* user login. Definitely a frontend function.
*
* THIS IS A VERY IMPORTANT FUNCTION: Basically you must add the output
* from this function for EVERY select query you create for selecting
* records of tables in your own applications - thus they will always be
* filtered according to the "enablefields" configured in TCA.
*
* Simply calls t3lib_pageSelect::enableFields() BUT will send the
* show_hidden flag along! This means this function will work in
* conjunction with the preview facilities of the frontend engine/Admin
* Panel.
*
* @param string The table for which to get the where clause.
* @param boolean If set, then you want NOT to filter out hidden
* records. Otherwise hidden record are filtered based
* on the current preview settings.
* @return string The part of the where clause in the form
* " AND [fieldname]=0 AND ...". Eg.
* " AND hidden=0 AND starttime < 123345567"
* @see t3lib_pageSelect::enableFields()
*/
function enableFields($table,$show_hidden=0) { ...
Gruß, Georg
--
___ ___
| + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
|_|_\ |___ georg.rehfeld.nospam at gmx.de +49 (40) 23 53 27 10
(Delete .nospam from mail address)
More information about the TYPO3-german
mailing list