Heacy rewrite/cleanup:
[mailer.git] / inc / modules / member / what-stats.php
index 0d7043d169d65e71da207937ace58ed909a35100..12390580eeecf40b8f5a739977af9ba78f2378db 100644 (file)
@@ -118,12 +118,7 @@ if (!ifSqlHasZeroNums($result)) {
                $content['timestamp_sent']    = generateDateTime($content['timestamp_send'], '2');
 
                // Click rate
-               $content['click_rate'] = '0';
-
-               // Better protection against 'divison-by-zero'
-               if ($content['max_rec'] > 0) {
-                       $content['click_rate'] = ($content['clicks'] / $content['max_rec'] * 100);
-               } // END - if
+               $content['click_rate'] = calculatePercentageRate($content['clicks'], $content['max_rec']);
 
                // Load row template and switch colors
                $OUT .= loadTemplate('member_stats_row', TRUE, $content);