[TYPO3-ect] bananas - question about captcha
Elmar Hinz
elmar.DOT.hinz at team.MINUS.red.DOT.net
Fri Feb 9 23:00:27 CET 2007
Am Fri, 09 Feb 2007 14:39:04 +0100 schrieb Daniel Brüßler:
> Hello,
>
> I still have problems with getting the data stored.
> $this->selectHashArray is empty, before exec_INSERTquery is called.
>
> ++------------------------------------
>
> first I changed this (in form-controller):
>
> --------
> $captchaClassName = tx_div::makeInstanceClassName('tx_lib_captcha');
> $captcha = new $captchaClassName($this);
> if(!$captcha->ok($this->getClassName())) { // same ID as in captchaAction
> ...
> }
> --------
>
> to this, so that the insert-function of the model will be called:
> --------
> $captchaClassName = tx_div::makeInstanceClassName('tx_lib_captcha');
> $captcha = new $captchaClassName($this);
> if(1==1) {
> $modelClassName =
> tx_div::makeInstanceClassName('tx_bananas_models_board');
> $model = new $modelClassName($this, $validator);
> $success = $model->insert();
>
> ...
> }else{
> print '-- data was not stored --';
> }
> --------
>
>
> but the insert-function of the model doesn't get the values in $insertArray
>
> ----
> foreach($this->selectHashArray('title, text, author, email, url') as
> $key => $value) {
> $insertArray[$key] = htmlspecialchars($value);
> }
> $insertArray['hidden'] = (integer)
> $this->getConfiguration('moderatedSubmits');
> $insertArray['tstamp'] = $insertArray['crdate'] = time();
> $insertArray['pid'] = (integer)
> array_pop(tx_div::toListArray($this->getConfiguration('tt_content.pages')));
> $insertArray['url'] = ($insertArray['url'] == 'http://') ? '' :
> $insertArray['url'];
>
> --------
>
>
> this is the content of the array:
> --------
> Array
> (
> [title] =>
> [text] =>
> [author] =>
> [email] =>
> [url] =>
> [hidden] => 0
> [crdate] => 1171027264
> [tstamp] => 1171027264
> [pid] => 32
> )
> --------
>
>
> why is $this->selectHashArray is empty?
>
>
> kind regards
> Daniel Brüßler
Hi Daniel,
I try to find out if I can reproduce this and find a clue.
Regards
Elmar
More information about the TYPO3-team-extension-coordination
mailing list