summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-08 02:56:49 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-08 02:56:49 +0000
commitbc36ba609db3b030d28a8768023b35441f8b9b9e (patch)
treec08b06dc707c53313066f966d9e3179d15244ad0 /core/controllers
parent8bf388a6f671faba94f46ad9e982139c211378ee (diff)
Add akismet::$test_mode, initialize it to TEST_MODE and don't contact
akismet if it's on. Force it on in the scaffolding so that we don't try to run all comments we add from there through Akismet.
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/welcome.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index 1509c54e..c77e90a9 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -298,6 +298,7 @@ class Welcome_Controller extends Template_Controller {
url::redirect("welcome");
}
+ akismet::$test_mode = 1;
for ($i = 0; $i < $count; $i++) {
$photo = $photos[array_rand($photos)];
comment::create(
@@ -305,6 +306,7 @@ class Welcome_Controller extends Template_Controller {
"johndoe@example.com",
$this->random_phrase(rand(8, 500)), $photo->id);
}
+ akismet::$test_mode = 0;
url::redirect("welcome");
}