]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
allow snapshots to be disabled easily
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 16 Apr 2009 16:53:17 +0000 (12:53 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 16 Apr 2009 16:53:17 +0000 (12:53 -0400)
lib/common.php
lib/snapshot.php

index 05539af8345e70ffff73d0aee903787f11ae8c6b..2c60b044216fef9b00ed664713edf234bb1763aa 100644 (file)
@@ -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'),
         );
index a014d3435f068f96a016ad78c3c88195456a66f0..75850a301b58da1ffecf537a3fd999dcdad3f670 100644 (file)
@@ -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.