[TYPO3-project-formidable] datahandler:DB: Question: Why doesn't save tstamp etc?
Hauke Hain
newgrp at googlemail.com
Sat Feb 28 12:35:30 CET 2009
Hi Jerome,
Add the following in ameos_formidable\api\class.maindatahandler.php
function fillStandardTYPO3fields() {
if(strtolower(trim($this->oForm->_navConf("/control/datahandler/fillstandardtypo3fields")))=='true')
{
return TRUE;
}
return FALSE;
}
Add the following in line 177 in file
ameos_formidable\api\base\dh_db\api\class.tx_dhdb.php (// creating data)::
if ($this->fillStandardTYPO3fields()) {
$aFormData['pid'] = $GLOBALS['TSFE']->id;
$aFormData['cruser_id'] =
$GLOBALS['TSFE']->fe_user->user['uid'];
$aFormData['crdate'] = time();
$aFormData['tstamp'] = time();
}
I added the changed files.
Example for XML-Configuration:
<datahandler:DB>
<tablename>fe_users</tablename>
<keyname>uid</keyname>
<fillStandardTYPO3fields>True</fillStandardTYPO3fields>
</datahandler:DB>
Regards,
Hauke
PS: It only works for sql inserts, for editing you have to add the same code
in the right place. I didn't make it, because I am not able to test it
(editing) yet.
"Jérôme Schneider" <typo3dev at ameos.com> schrieb im Newsbeitrag
news:mailman.1.1235811748.12084.typo3-project-formidable at lists.netfielders.de...
> Hi Hauke,
> Yes, it would be very useful indeed !
>
> If you submit a patch I will gladly review it for integration in the SVN.
>
> Best regards,
> Jerome
>
More information about the TYPO3-project-formidable
mailing list