From bed2120b8609c211ea2200e56b73e2481aafa879 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 12 Apr 2011 19:00:54 -0700 Subject: [PATCH] Fix systemAgent stuff. --- .../controller/api/PhabricatorConduitAPIController.php | 8 +++++++- src/applications/people/storage/user/PhabricatorUser.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php b/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php index ddb01211a1..35a10d9d4b 100644 --- a/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php +++ b/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php @@ -119,7 +119,13 @@ class PhabricatorConduitAPIController $log->setConnectionID($connection_id); $log->setError((string)$error_code); $log->setDuration(1000000 * ($time_end - $time_start)); - $log->save(); + + // TODO: This is a hack, but the insert is comparatively expensive and + // we only really care about having these logs for real CLI clients, if + // even that. + if (empty($metadata['authToken'])) { + $log->save(); + } $result = array( 'result' => $result, diff --git a/src/applications/people/storage/user/PhabricatorUser.php b/src/applications/people/storage/user/PhabricatorUser.php index 400a57ad2a..6a2126f279 100644 --- a/src/applications/people/storage/user/PhabricatorUser.php +++ b/src/applications/people/storage/user/PhabricatorUser.php @@ -34,7 +34,7 @@ class PhabricatorUser extends PhabricatorUserDAO { protected $conduitCertificate; - protected $isSystemAgent; + protected $isSystemAgent = 0; private $preferences = null;