[Typo3-dev] Deny field list
Lars Houmark
lars at houmark.com
Sat Dec 18 14:42:16 CET 2004
Mathias,
I tried replying to your email from our website, but it also comes back.
Seems like your mailserver and ours do not like each other. You could try
contacting me at lh at i-survey.dk - maybe that helps. My MSN address is
lars at houmark.com
Sorry to the rest of you, but Mathias tried to contact me, but without luck.
Regards,
Lars Houmark
"Mathias Schreiber [wmdb]" <mathias.schreiber at wmdb.de> wrote in message
news:mailman.1.1103376111.28076.typo3-dev at lists.netfielders.de...
> Lars Houmark wrote:
>>>I will now follow my first approach and do a fully working example and
>>>supply it as soon as I'm finished.
>
> done :) man I love PHP. Simply compare anything with anything and it
> works... Rambo style coding :)
>
>> OK then, I'm not to do any further then, and hope to see a patch for the
>> next release. If you need any testing, then please email me the patch,
>> and I will test it ;)
>
> I have a last question on a topic that is not really covered by the CGL:
> I regex a bit to get the value and then write them to an array to compare
> it against the denyfields.
>
> ---------------- CODE ---------------------
> unset($checkArray);
> $ctypeString = ereg_replace(".*\[tt_content\]\[CType\]=", "",
> $item['params']);
> $ctype = ereg_replace("\&.*", "", $ctypeString);
> // maybe do this shorter soon
> $checkArray['CType'] = $ctype;
> // Check if a List Type is set at all
> if (strstr($item['params'],'[CType]=list')) {
> $list_typeString = ereg_replace(".*\[tt_content\]\[list_type\]=", "",
> $item['params']);
> $list_type = ereg_replace("\&.*", "", $list_typeString);
> // Maybe do this shorter soon.
> $checkArray['list_type'] = $list_type;
> }
> ---------------- CODE ---------------------
>
> I could also directly assign the vars to $checkArray by writing a rather
> long line of code:
>
> ---------------- CODE ---------------------
> unset($checkArray);
> $checkArray['CType'] = $ctype = ereg_replace("\&.*",
> "",ereg_replace(".*\[tt_content\]\[CType\]=", "", $item['params']));
> // Check if a List Type is set at all
> if (strstr($item['params'],'[CType]=list')) {
> $checkArray['list_type'] = ereg_replace("\&.*", "",
> ereg_replace(".*\[tt_content\]\[list_type\]=", "", $item['params']));
> }
> ---------------- CODE ---------------------
>
> less lines but harder to ready.
> I might save some bytes of RAM here due to not assigning stuff over and
> over again but I am not sure if the benefit over readability of code makes
> sense.
> What do you guys think?
>
> However - the patch is done :)
>
> --
> No Subject - No Realname - No Service!
> Respect the List/Newsgroup Rules!
> >> http://typo3.org/1438.0.html <<
More information about the TYPO3-dev
mailing list