Browse Source

Prevented an additional s from being tacked on to the end of classes ending with s

Ace 8 years ago
parent
commit
db9df671d4
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      classes/invite_tree.class.php

+ 4
- 1
classes/invite_tree.class.php View File

174
           if ($LastClass == 'Torrent Celebrity') {
174
           if ($LastClass == 'Torrent Celebrity') {
175
              $LastClass = 'Torrent Celebrities';
175
              $LastClass = 'Torrent Celebrities';
176
           } else {
176
           } else {
177
-            $LastClass.='s';
177
+            // Prevent duplicate letterss
178
+            if (substr($LastClass, -1) != 's') {
179
+              $LastClass.='s';
180
+            }
178
           }
181
           }
179
         }
182
         }
180
         $LastClass = "$ClassCount $LastClass (" . number_format(($ClassCount / $Count) * 100) . '%)';
183
         $LastClass = "$ClassCount $LastClass (" . number_format(($ClassCount / $Count) * 100) . '%)';

Loading…
Cancel
Save