From: Evan Prodromou Date: Thu, 16 Apr 2009 16:53:17 +0000 (-0400) Subject: allow snapshots to be disabled easily X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0838143d5855bb013b355d4abb7ec7a643ef37dc;p=quix0rs-gnu-social.git allow snapshots to be disabled easily --- diff --git a/lib/common.php b/lib/common.php index 05539af834..2c60b04421 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 a014d3435f..75850a301b 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.