summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
authorJozef Selesi <jozefs@users.sourceforge.net>2008-11-12 15:43:05 +0000
committerJozef Selesi <jozefs@users.sourceforge.net>2008-11-12 15:43:05 +0000
commit56dcb953b0b1fa9d47d6c1dd0f1f60a07ac98433 (patch)
tree4df9afddbd45367483e77a6b22e1f5bc011e1aa4 /core/controllers
parenta1ca946a89e00a2daa22069aabf60e7a1151e78b (diff)
Code cleanup, add test for time formatting function.
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/welcome.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index 4bc709b3..40b8390a 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -189,7 +189,6 @@ class Welcome_Controller extends Template_Controller {
ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic
tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut
perferendis doloribus asperiores repellat.";
- $seconds_in_a_year = 31556926;
if (empty($photos)) {
url::redirect("welcome");
@@ -199,7 +198,7 @@ class Welcome_Controller extends Template_Controller {
$photo = $photos[array_rand($photos)];
comment::create("John Doe", "johndoe@example.com",
substr($sample_text, 0, rand(30, strlen($sample_text))), $photo->id,
- time() - rand(0, 2 * $seconds_in_a_year));
+ time() - rand(0, 2 * comment::SECONDS_IN_A_YEAR));
}
url::redirect("welcome");