]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_user.php
Introduced template call-back function 'doTemplateAdminListUserTitle':
[mailer.git] / inc / modules / admin / what-list_user.php
index dc797f59ad31608b5ade0a839e5c204ab860ca86..40f53bb89879c0c3f80bf128add605e809e683cf 100644 (file)
@@ -136,7 +136,6 @@ LIMIT 1",
                // Prepare data for template
                $content['email_link']        = generateEmailLink($content['email'], 'user_data');
                $content['last_online']       = generateDateTime($content['last_online'], 0);
-               if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $userid . '%}">}{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
                $content['joined']            = generateDateTime($content['joined'], 0);
                $content['last_update']       = generateDateTime($content['last_update'], 0);
                $content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], 0);
@@ -145,9 +144,16 @@ LIMIT 1",
                $content['lock_timestamp']    = generateDateTime($content['lock_timestamp'], 2);
                $content['nickname']          = '{--EXT_NICKNAME_404--}';
 
+               // Link to email_details if some are sent
+               if ($content['emails_sent'] > 0) {
+                       $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $userid . '%}">}{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
+               } // END - if
+
                // Nickname inclusion?
                // @TODO Rewrite these to filters
-               if (isExtensionInstalled('nickname')) $content['nickname'] = getNickname($content['userid']);
+               if (isExtensionInstalled('nickname')) {
+                       $content['nickname'] = getNickname($content['userid']);
+               } // END - if
 
                // Clickrate
                $content['click_rate'] = '0';
@@ -267,14 +273,20 @@ LIMIT 1",
 
                        // Get number of unconfirmed mails
                        $content['links'] = countSumTotalData($content['userid'], 'user_links', 'id', 'userid', true);
-                       if ($content['links'] > 0) $content['links'] = $base . '&amp;what=list_links&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['links'] . '%}</a>]';
+                       if ($content['links'] > 0) {
+                               $content['links'] = $base . '&amp;what=list_links&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['links'] . '%}</a>]';
+                       } // END - if
 
                        // Set link to sent mails if present
-                       if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
+                       if ($content['emails_sent'] > 0) {
+                               $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
+                       } // END - if
 
                        // Add nickname
                        $content['nickname'] = '{--EXT_NICKNAME_404--}';
-                       if (isExtensionInstalled('nickname')) $content['nickname'] = getNickname($content['userid']);
+                       if (isExtensionInstalled('nickname')) {
+                               $content['nickname'] = getNickname($content['userid']);
+                       } // END - if
 
                        // Clickrate
                        $content['rate'] = '0';
@@ -289,7 +301,9 @@ LIMIT 1",
                        $content['locked']         = countSumTotalData($content['userid'], 'user_points', 'locked_points');
 
                        // If we have at least one referal, make it clickable to referal list
-                       if ($content['refs'] > 0) $content['refs'] = $base . '&amp;what=list_refs&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['refs'] . '%}</a>]';
+                       if ($content['refs'] > 0) {
+                               $content['refs'] = $base . '&amp;what=list_refs&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['refs'] . '%}</a>]';
+                       } // END - if
 
                        // Is the extension 'country' installed?
                        // @TODO Rewrite this into a filter
@@ -314,16 +328,6 @@ LIMIT 1",
                // Remember all rows
                $content['rows'] = $OUT;
 
-               // Init title with "all accounts"
-               $content['title'] = '{--ADMIN_ALL_ACCOUNTS--}';
-               if (isGetRequestParameterSet('status')) {
-                       // Set title according to the 'status'
-                       $content['title'] = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter('status')));
-               } elseif (isGetRequestParameterSet('mode')) {
-                       // Set title according to the "mode"
-                       $content['title'] = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestParameter('mode')));
-               }
-
                // Merge more data again
                $content = merge_array($content, $templateContent);