Skip to:
Content

bbPress.org

Changeset 5000


Ignore:
Timestamp:
06/25/2013 04:52:48 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Revert part of r4995 that introduced strict comparisons in bbp_get_time_since() against return values of floor(), which returns a float. See #2358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/functions.php

    r4995 r5000  
    153153                // Finding the biggest chunk (if the chunk fits, break)
    154154                $count = floor( $since / $seconds );
    155                 if ( 0 !== $count ) {
     155                if ( 0 != $count ) {
    156156                    break;
    157157                }
     
    165165
    166166                // Set output var
    167                 $output = ( 1 === $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];
     167                $output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];
    168168
    169169                // Step two: the second chunk
     
    174174
    175175                    // Add to output var
    176                     if ( 0 !== $count2 ) {
    177                         $output .= ( 1 === $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2];
     176                    if ( 0 != $count2 ) {
     177                        $output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2];
    178178                    }
    179179                }
     
    187187
    188188        // Append 'ago' to the end of time-since if not 'right now'
    189         if ( $output !== $right_now_text ) {
     189        if ( $output != $right_now_text ) {
    190190            $output = sprintf( $ago_text, $output );
    191191        }
Note: See TracChangeset for help on using the changeset viewer.