Assembla home | Assembla project page
 

Changeset 173

Show
Ignore:
Timestamp:
03/16/08 00:30:35 (8 months ago)
Author:
tobias382
Message:

Modified assignments in getCountdown() in the base plugin class to use the %= operator

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Plugin/Abstract/Base.php

    r172 r173  
    382382        if ($days > 0) { 
    383383            $return[] = $days . 'd'; 
    384             $time = $time % 86400; 
     384            $time %= 86400; 
    385385        } 
    386386 
     
    388388        if ($hours > 0) { 
    389389            $return[] = $hours . 'h'; 
    390             $time = $time % 3600; 
     390            $time %= 3600; 
    391391        } 
    392392 
     
    394394        if ($minutes > 0) { 
    395395            $return[] = $minutes . 'm'; 
    396             $time = $time % 60; 
     396            $time %= 60; 
    397397        } 
    398398 
    399         $return[] = $time . 's'; 
     399                if ($time > 0) { 
     400                        $return[] = $time . 's'; 
     401                } 
    400402 
    401403        return implode(' ', $return);