Browse Source

Fix failing test from merge with 2.3

Fix a failed test from bad merge and remove nested conditions.
mark_story 12 years ago
parent
commit
1c1701813b
1 changed files with 3 additions and 4 deletions
  1. 3 4
      lib/Cake/Utility/CakeTime.php

+ 3 - 4
lib/Cake/Utility/CakeTime.php

@@ -917,11 +917,10 @@ class CakeTime {
 		);
 
 		// When time has passed
+		if (!$backwards && $relativeDate) {
+			return sprintf($relativeString, $relativeDate);
+		}
 		if (!$backwards) {
-			if ($relativeDate) {
-				return __d('cake', '%s ago', $relativeDate);
-			}
-
 			return $aboutAgo[$fWord];
 		}