[FEATURE] Use FlashMessage in be_user module
authorbidau <ismael.bidau@ensci.com>
Thu, 28 Jul 2011 12:26:08 +0000 (14:26 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Mon, 1 Aug 2011 06:10:10 +0000 (08:10 +0200)
Add FlashMessages:
* info about cached grouplists being updated
* when there are too many users to show

Change-Id: Iedd62f7731e61a6dff7ca9b6d477d75524351828
Resolves: #28543
Reviewed-on: http://review.typo3.org/3817
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
Reviewed-by: Stefan Neufeind
Reviewed-by: Georg Ringer
typo3/sysext/beuser/mod/index.php

index 280a8fd..784bb40 100755 (executable)
@@ -1397,8 +1397,22 @@ class SC_mod_tools_be_user_index {
                                $TDparams=' nowrap="nowrap" class="'.($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6').'" valign="top"';
                        }
                        $outTable='<table border="0" cellpadding="2" cellspacing="2">' . $outTable . '</table>';
-                       $outTable .= '<br /><br />' . $GLOBALS['LANG']->getLL('cachedGrouplistsUpdated', TRUE);
-                       $outTable.=$tooManyUsers?'<br /><br /><strong><span class="typo3-red">' . $tooManyUsers . '</span></strong>':'';
+                       $flashMessageCachedGrouplistsUpdated = t3lib_div::makeInstance(
+                               't3lib_FlashMessage',
+                               '',
+                               $GLOBALS['LANG']->getLL('cachedGrouplistsUpdated', TRUE),
+                               t3lib_FlashMessage::INFO
+                       );
+                       t3lib_FlashMessageQueue::addMessage($flashMessageCachedGrouplistsUpdated);
+                       if ($tooManyUsers) {
+                               $flashMessageTooManyUsers = t3lib_div::makeInstance(
+                                       't3lib_FlashMessage',
+                                       '',
+                                       $tooManyUsers,
+                                       t3lib_FlashMessage::ERROR
+                               );
+                               t3lib_FlashMessageQueue::addMessage($flashMessageTooManyUsers);
+                       }
                        $content.= $this->doc->spacer(10);
                        $content.= $this->doc->section($GLOBALS['LANG']->getLL('result', TRUE),$outTable,0,1);
                }