RCFilters UI: Limit filter popup height
[lhc/web/wiklou.git] / languages / Language.php
index 8c7ce31..a1cc4bc 100644 (file)
@@ -4000,8 +4000,9 @@ class Language {
                if ( $time === false ) { // Unknown format. Return it as-is in case.
                        return $str;
                } elseif ( $time !== strtotime( $str, $now + 1 ) ) { // It's a relative timestamp.
-                       // The result differs based on current time, so it's a duration length.
-                       return $this->formatDuration( $time );
+                       // The result differs based on current time, so the difference
+                       // is a fixed duration length.
+                       return $this->formatDuration( $time - $now );
                } else { // It's an absolute timestamp.
                        if ( $time === 0 ) {
                                // wfTimestamp() handles 0 as current time instead of epoch.
@@ -4507,7 +4508,7 @@ class Language {
                # such as action=raw much more expensive than they need to be.
                # This will hopefully cover most cases.
                $talk = preg_replace_callback( '/{{grammar:(.*?)\|(.*?)}}/i',
-                       [ &$this, 'replaceGrammarInNamespace' ], $talk );
+                       [ $this, 'replaceGrammarInNamespace' ], $talk );
                return str_replace( ' ', '_', $talk );
        }