From e3e8dfed30bdb1f831877108f4b201fb4e1ac9fa Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 15 Jan 2014 10:21:05 -0600
Subject: [PATCH] Don't generate staff statistics for AJAX requests

---
 scp/staff.inc.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scp/staff.inc.php b/scp/staff.inc.php
index 359663a4c..73fe46d38 100644
--- a/scp/staff.inc.php
+++ b/scp/staff.inc.php
@@ -123,7 +123,9 @@ if($ost->isUpgradePending() && !$exempt) {
     $sysnotice.=' <a href="settings.php">Enable</a>.';
 }
 
-$nav = new StaffNav($thisstaff);
+if (!defined('AJAX_REQUEST'))
+    $nav = new StaffNav($thisstaff);
+
 //Check for forced password change.
 if($thisstaff->forcePasswdChange() && !$exempt) {
     # XXX: Call staffLoginPage() for AJAX and API requests _not_ to honor
-- 
GitLab