summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-16 12:53:17 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-16 12:53:17 -0400
commit0838143d5855bb013b355d4abb7ec7a643ef37dc (patch)
treeb8e5c277eeae128a6ae8fbdd6f1f8863967f46c4 /lib
parent6a247acb45198c3748df48d8b14b71c8f8b839de (diff)
allow snapshots to be disabled easily
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php3
-rw-r--r--lib/snapshot.php4
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 05539af83..2c60b0442 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -158,7 +158,8 @@ $config =
array('subscribe' => null,
'welcome' => null),
'snapshot' =>
- array('run' => 'web',
+ array('enabled' => true,
+ 'run' => 'web',
'frequency' => 10000,
'reporturl' => 'http://laconi.ca/stats/report'),
);
diff --git a/lib/snapshot.php b/lib/snapshot.php
index a014d3435..75850a301 100644
--- a/lib/snapshot.php
+++ b/lib/snapshot.php
@@ -73,6 +73,10 @@ class Snapshot
static function check()
{
+ if (!common_config('snapshot', 'enabled')) {
+ return;
+ }
+
switch (common_config('snapshot', 'run')) {
case 'web':
// skip if we're not running on the Web.