[TYPO3-core] RFC: Bug #6239: notifyStageChange() does not send emails, if groups are added to WS members/reviewers

Patrick Rodacker mailinglists at the-reflection.de
Sun Mar 2 22:49:09 CET 2008


Hi Masi,

Martin Kutschker wrote on 14.02.2008 15:43:
> Andreas Wolf schrieb:
>> I really like the feature, but I see one problem with the patch: A check
>> of $users[0] with is_array() should be added in these two lines:
> 
> No, the problem (because it is confusing) is that $users is used for two 
> distinct data sets: an array of user IDs and a PREF match array.
> 
> This can be amened easily:
> 
> if (!$noTablePrefix) {
>    preg_match_all('/be_groups_([0-9]+)/', $listOfEntries, $match_groups);
>    preg_match_all('/be_users_([0-9]+)/', $listOfEntries, $match_users);
>    $groups = $match_groups[1];
>    $users = $match_users[1];
> } else {
>    $groups = array();
>    $users = t3lib_BEfunc::trimExplode(',',$listOfEntries,1);
> }
...

> Now you have always an array (may be empty) for $users and $groups 
> always containing a list of IDs (without the table prefix).
> 
> Please change this as this will make the code much more readable.

I have added your suggestions and refactored the code a little bit. 
Recent patch is attached. Please let me know if there need some more 
changes.

Best regards
Patrick
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0006239_v2.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080302/e1823493/attachment.txt 


More information about the TYPO3-team-core mailing list